/* Preserve banner locations and keep optional notices accessible on mobile. */
.mobile-site-notices{display:none}
.home-ad-inquiry{margin:10px 0;text-align:right;font-weight:700;color:var(--green)}
.main-banners,.premium-ad-strip{min-height:0;align-content:start}
/* Temporary: keep ad data and position previews, but hide these slots on the home page. */
html:not([data-ad-preview-ready="true"]) .main-banners>[data-ad-slot="main-5"],
html:not([data-ad-preview-ready="true"]) .main-banners>[data-ad-slot="main-6"],
html:not([data-ad-preview-ready="true"]) .main-banners>[data-ad-slot="main-7"],
html:not([data-ad-preview-ready="true"]) .main-banners>[data-ad-slot="main-8"],
html:not([data-ad-preview-ready="true"]) .premium-ad-strip{display:none}
html:not([data-ad-preview-ready="true"]) .main-banners{grid-template-rows:auto}
.main-banners:empty,.premium-ad-strip:empty,.banner-pair:empty,.bottom-ad:empty,#partners:not(:has(.ad)){display:none}
.home-top:has(.main-banners:empty){display:block}.home-top:has(.main-banners:empty) .categories{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}
.listing-writing-guide{background:#f0f6f1;padding:16px;border:1px solid #d8e6db;line-height:1.8}
.listing-writing-guide p{margin:6px 0 0}.listing-writing-guide strong{font-size:18px}
#startup-retry{margin:16px 0}#startup-retry p{margin:0 0 10px}
@media(min-width:801px){.mobile-home-heading{display:block;margin:20px 0}.mobile-home-heading h1{display:block;font-size:26px;margin:8px 0}.mobile-home-intro{color:var(--muted)}}
@media(max-width:800px){
 .mobile-site-notices:not(:empty){display:block;margin:12px 0;border:1px solid #dbe7de;background:#f0f6f1;border-radius:4px}
 .mobile-site-notices summary{padding:13px;font-size:15px;font-weight:700;cursor:pointer;color:var(--deep)}
 .mobile-site-notices article{padding:14px;border-top:1px solid #dbe7de}
 .mobile-site-notices h2{font-size:18px;margin:0 0 10px}
 .mobile-site-notices img{width:100%;height:auto}.mobile-site-notices p{white-space:pre-line;line-height:1.7}
 .home-ad-inquiry{font-size:14px}.main-banners,.premium-ad-strip{margin-bottom:12px}
 .category-ads{display:grid}.bottom-ad{display:block}
}

@media(max-width:800px){
 #main:has(>.mobile-home-heading){display:flex;flex-direction:column}
 #main:has(>.mobile-home-heading) .home-top{display:contents}
 #main>.mobile-site-notices{order:0}#main>.mobile-home-heading{order:1}
 #main .home-top>.categories{order:2}#main .home-top>.main-banners{order:3}
 #main>.intro-line{order:4}#main>.premium-ad-strip{order:5}
 #main>.home-primary-listings{order:6}#main>.home-ad-inquiry{order:7}
 #main>.banner-pair{order:8}#main>#market-section{order:9}
 #main>.category-ads{order:10}#main>#partners{order:11}
 #main>.bottom-ad{order:12}#main>.notice{order:13}
}

@media(min-width:801px){
 .home-top:not(.no-side-menu):has(.main-banners>.ad:only-child){grid-template-columns:minmax(0,1fr) 320px;align-items:start}
 .home-top:has(.main-banners>.ad:only-child) .categories{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-content:start;gap:8px;padding:12px}
 .home-top:has(.main-banners>.ad:only-child) .categories button{min-height:64px;border:1px solid var(--line)}
 .main-banners:has(>.ad:only-child){grid-template-columns:1fr;grid-template-rows:auto}
}
