/* ===== WordPress integration layer ===== */
.screen-reader-text{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(1px,1px,1px,1px);white-space:nowrap}
.skip-link:focus{position:fixed!important;top:8px;left:8px;width:auto;height:auto;clip:auto;z-index:200;padding:10px 16px;background:var(--text);color:var(--ink-0);border-radius:10px}
.admin-bar .nav{top:32px}
@media(max-width:782px){.admin-bar .nav{top:46px}}
@media(max-width:600px){.admin-bar .nav{top:0}}
body{min-height:100vh}
main{display:block}
:focus-visible{outline:2px solid var(--amber);outline-offset:3px;border-radius:6px}
.nav .site-links a{display:block}
@media(max-width:900px){
  .nav .site-links{display:none}
  .nav.open .site-links{display:flex;flex-direction:column;position:absolute;top:68px;left:0;right:0;background:rgba(5,7,15,.97);padding:16px;border-bottom:1px solid var(--line);margin:0}
}

/* Card media: WP thumbnails */
.place-card .ph img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.place-card .ph .tag{z-index:3}
.place-card h3{font-family:var(--display);font-weight:500}
.rail .place-card{min-width:0}

/* Pagination (the_posts_pagination) */
.pagination{margin-top:56px}
.pagination .nav-links{display:flex;gap:6px;justify-content:center;flex-wrap:wrap}
.pagination .page-numbers{min-width:42px;height:42px;display:grid;place-items:center;border-radius:12px;border:1px solid var(--line);font-size:14px;color:var(--muted);padding:0 12px;transition:.2s}
.pagination a.page-numbers:hover{border-color:var(--line-2);color:var(--text)}
.pagination .page-numbers.current{background:var(--text);color:var(--ink-0);border-color:var(--text)}
.pagination .page-numbers.dots{border:0}

/* Filters: Bortle radio scale */
.bscale .bopt{aspect-ratio:1;border-radius:8px;font-family:var(--mono);font-size:12px;border:1px solid var(--line);display:grid;place-items:center;cursor:pointer;transition:.2s;position:relative}
.bscale .bopt input{position:absolute;opacity:0;pointer-events:none}
.bscale .bopt.on,.bscale .bopt:has(input:checked){outline:2px solid var(--amber);outline-offset:1px}
.bscale .bopt:hover{transform:translateY(-2px)}
.filters .switch{cursor:pointer}
.active-filters a.tag{cursor:pointer}
.active-filters a.tag:hover{border-color:var(--red);color:var(--red)}
.chart{aspect-ratio:auto;height:460px}
.chart .dss-map{background:#0a0f1f}

/* Leaflet dark */
.leaflet-container{background:#0a0f1f;font-family:var(--sans)}
.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:var(--ink-2);color:var(--text);border:1px solid var(--line-2);box-shadow:0 20px 40px rgba(0,0,0,.5)}
.leaflet-popup-content a{color:var(--amber)}
.leaflet-popup-content small{color:var(--muted)}
.leaflet-control-attribution{background:rgba(5,7,15,.7)!important;color:var(--dim)!important}
.leaflet-control-attribution a{color:var(--muted)!important}
.leaflet-bar a{background:var(--ink-2);color:var(--text);border-color:var(--line)}
.leaflet-bar a:hover{background:var(--ink-3)}
.dsn-pin{border-radius:50%;background:var(--teal);box-shadow:0 0 0 3px rgba(79,209,197,.25),0 0 14px 4px rgba(79,209,197,.55)}
.dsn-pin.unc{background:var(--star);box-shadow:0 0 0 3px rgba(255,246,224,.15),0 0 10px 2px rgba(255,246,224,.4)}
.dsn-pin.main{background:var(--red);box-shadow:0 0 0 4px rgba(255,90,78,.25),0 0 0 0 rgba(255,90,78,.6);animation:pulse 1.8s infinite}
.map .dss-map{width:100%;height:100%}
.map{height:400px}
.dss-map{height:400px}

/* Place hero */
.p-hero h1{font-size:clamp(40px,6.2vw,84px);margin:18px 0 18px}
.p-hero .hero-sky{position:absolute;inset:0}
.p-hero.no-photo{height:62vh;min-height:440px}
.p-hero img{inset:-10% 0 auto 0}
.qbar b{display:block;word-break:break-word}
.side .card .row span:last-child{max-width:62%}
.see a{display:block;padding:20px;border-radius:var(--r);border:1px solid var(--line);background:rgba(255,255,255,.02);transition:.3s var(--ease)}
.see a:hover{border-color:rgba(255,180,84,.4);transform:translateY(-3px)}
.see a b{display:block;font-family:var(--display);font-weight:500;font-size:19px;color:var(--text);margin:10px 0 4px}
.see a span{font-size:13px;color:var(--muted);line-height:1.5;display:block}
.see a em{font-style:normal;font-size:22px;color:var(--amber)}
.prose .see a{border-bottom:1px solid var(--line)}
.prose ul,.prose ol,.article ul,.article ol{margin:0 0 20px 1.3em}
.prose li,.article li{margin-bottom:8px}
.prose h3,.article h3{font-size:24px;color:var(--text);margin:34px 0 12px}
.prose strong,.article strong{color:var(--text);font-weight:600}
.prose img,.article img{border-radius:var(--r);margin:24px 0}
.prose table,.article table{width:100%;border-collapse:collapse;margin:24px 0;font-size:15px;display:block;overflow-x:auto}
.prose th,.prose td,.article th,.article td{padding:12px 14px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}
.prose th,.article th{font-family:var(--mono);font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:var(--dim);font-weight:400}
.prose blockquote:not(.pull),.article blockquote{border-left:2px solid var(--amber);padding:6px 0 6px 22px;margin:28px 0;font-family:var(--display);font-style:italic;font-size:22px;color:var(--star)}
.prose dl{display:grid;grid-template-columns:auto 1fr;gap:10px 20px;margin-bottom:22px}
.prose dt{color:var(--dim)}
.prose figure{margin:24px 0}
.prose figcaption,.article figcaption{font-size:13px;color:var(--dim);margin-top:8px}
.prose details{border-bottom:1px solid var(--line);padding:4px 0}
.prose summary{cursor:pointer;padding:16px 0;color:var(--text);font-weight:500}
.prose .dss-grid,.article .dss-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:14px;margin:20px 0}
.prose .dss-card,.article .dss-card{border:1px solid var(--line);border-radius:var(--r);padding:16px 18px;background:rgba(255,255,255,.02);transition:.3s var(--ease)}
.prose .dss-card:hover,.article .dss-card:hover{border-color:rgba(255,180,84,.4);transform:translateY(-2px)}
.prose .dss-card a,.article .dss-card a{border:0;color:var(--text)}
.prose .dss-card h3,.article .dss-card h3{font-size:18px;margin:0 0 6px}
.prose .dss-card p,.article .dss-card p{font-size:13px;color:var(--muted);margin:0}
.notice p{color:var(--muted)}

/* Taxonomy */
.r-hero .big{word-break:break-word}
.shape-core{position:relative;z-index:2;text-align:center}
.shape-core b{display:block;font-family:var(--display);font-size:64px;font-weight:300;line-height:1}
.shape-core small{font-family:var(--mono);font-size:12px;color:var(--dim);letter-spacing:.14em;text-transform:uppercase}
.bdist i.none{background:repeating-linear-gradient(45deg,var(--ink-3) 0 4px,transparent 4px 8px);border:1px solid var(--line)}

/* Articles (page.php) */
.article-wrap{display:grid;grid-template-columns:220px minmax(0,720px);gap:60px;justify-content:center;align-items:start;padding-bottom:40px}
.article-wrap .toc{position:sticky;top:96px}
.article-wrap .article{margin:0;max-width:none;padding:0}
.article h2{scroll-margin-top:100px}
.article > p:first-of-type::first-letter{font-family:var(--display);float:left;font-size:78px;line-height:.8;padding:8px 12px 0 0;color:var(--star)}
@media(max-width:1000px){.article-wrap{grid-template-columns:minmax(0,1fr)}.article-wrap .toc{display:none}}
.a-hero .eyebrow{justify-content:center}
.pn{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.pn a{padding:26px;display:flex;flex-direction:column;gap:8px}
.pn a.next{text-align:right;grid-column:2}
.pn small{font-family:var(--mono);font-size:12px;color:var(--amber);letter-spacing:.08em;text-transform:uppercase}
.pn b{font-family:var(--display);font-weight:500;font-size:22px}
@media(max-width:700px){.pn{grid-template-columns:1fr}.pn a.next{grid-column:auto}}
.guide-list.three{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:20px}

/* Calendar */
.mstrip button .mm::after{transform:translateX(var(--s,0))}
.ym.now{border-color:rgba(255,180,84,.45);box-shadow:0 0 0 1px rgba(255,180,84,.2)}
.ym.now small::after{content:" · NOW";color:var(--red)}
.ev-read,.ev-legend{padding:30px}
.phases{gap:4px}

/* Homepage bits */
.mq{color:var(--text)}
.mq:hover{color:var(--amber)}
.hero .hero-search input[type=search]::-webkit-search-cancel-button{filter:invert(1)}
.cta .btn{margin-top:6px}

/* Reduced motion: no star twinkle on placeholders */
@media (prefers-reduced-motion:reduce){.ph-sky::before{animation:none}}

/* Headline reveal runs on CSS alone so titles never wait for JavaScript */
.split-line>span{transform:none;animation:dsnRise 1.1s var(--ease) .05s both}
.split-line:nth-child(2)>span{animation-delay:.17s}
.split-line:nth-child(3)>span{animation-delay:.29s}
@keyframes dsnRise{from{transform:translateY(110%)}to{transform:none}}
.p-hero{background:var(--ink-1)}
.p-hero img{animation:dsnFade 1.4s ease both}
@keyframes dsnFade{from{opacity:0}to{opacity:1}}
@media (prefers-reduced-motion:reduce){.split-line>span,.p-hero img{animation:none}}

/* Section classes set vertical padding on .wrap elements; keep the side gutter */
.wrap{padding-left:24px;padding-right:24px}
.wrap.page-hero,.wrap.r-hero,.wrap.intro,.wrap.layout,.wrap.explore,.wrap.article-wrap,.wrap.bortle-sim,.wrap.ladder{padding-left:24px;padding-right:24px}
@media(max-width:640px){.wrap,.wrap.page-hero,.wrap.r-hero,.wrap.intro,.wrap.layout,.wrap.explore,.wrap.article-wrap,.wrap.bortle-sim,.wrap.ladder{padding-left:16px;padding-right:16px}}
.shape{width:100%}

/* Keep descenders (g, j, p, q, y) of large headlines from being clipped by the reveal mask */
.split-line{padding-bottom:.14em;margin-bottom:-.14em}

/* ===== Accessibility pass (1.1.0) ===== */
/* Sidebar, filter and footer labels are real h2s now (no h1 -> h4 jumps); keep their small look */
h2.foot-h,h2.mini-h{line-height:1.5;letter-spacing:.12em}
/* Anchor jumps and keyboard focus land below the fixed header */
html{scroll-padding-top:96px}
html:has(body.admin-bar){scroll-padding-top:128px}
/* Small inline links get a 24px tap target (WCAG 2.2 target size) */
.breadcrumb a,.hero-quick a,.a-meta a{display:inline-block;min-height:24px;padding:3px 0;line-height:18px}
.filters label{min-height:24px}
/* Primary button: keep the hover glow on the darker red */
.btn-primary:hover{background:#c9342a}
/* Map pins show a visible focus ring for keyboard users */
.leaflet-marker-icon:focus-visible{outline:2px solid var(--amber);outline-offset:3px}
