/* Dark mode: loaded after institute.css and light.css; every rule is scoped to [data-theme=dark] */
[data-theme=dark]{--bg:#161616;--bg2:#1d1d1d;--ink:#f8f3ec;--muted:#a8a39a;--line:rgba(248,243,236,.17);color-scheme:dark}

/* header once the hero is behind it */
[data-theme=dark] .hdr.solid{background:rgba(22,22,22,.88);color:var(--cream);border-color:var(--line)}
[data-theme=dark] .hdr.solid .btn{background:var(--accent);color:var(--navy);border-color:var(--accent)}

/* buttons that were dark-on-cream */
[data-theme=dark] .sec:not(.dark) .btn:not(.btn-ghost){background:var(--accent);color:var(--navy);border-color:var(--accent)}
[data-theme=dark] .sec:not(.dark) .btn:not(.btn-ghost):hover{background:#ff6a40;border-color:#ff6a40}

/* sections: alternate the darks so the rhythm survives */
[data-theme=dark] .sec.dark{background:#0f0f0f}
[data-theme=dark] .sec.prism{background:linear-gradient(to bottom,#161616 0,#0f0f0f 240px),#0f0f0f}
[data-theme=dark] .sec.paper{background:var(--bg2)}
[data-theme=dark] .ftr{border-top:1px solid var(--line)}

/* body copy that was hard-coded dark */
[data-theme=dark] .story p:not(.meta),[data-theme=dark] .case p:not(.meta),[data-theme=dark] .step p,
[data-theme=dark] .tl p,[data-theme=dark] .inv p{color:#cfc9bf}
[data-theme=dark] .pull{color:#ff7a52!important}
[data-theme=dark] .tl-link{color:#ff7a52}

/* how it works, judging, timeline */
[data-theme=dark] .step.on .n{color:var(--accent)}
[data-theme=dark] .step em{color:#ff7a52}
[data-theme=dark] .forms li{border-color:var(--line)}
[data-theme=dark] .rb i{background:rgba(248,243,236,.14)}
[data-theme=dark] .rb i::after{background:var(--cream)}
[data-theme=dark] .rb.hot i::after{background:var(--accent)}
[data-theme=dark] .rb.hot b{color:var(--accent)}
[data-theme=dark] .tl li::before{background:var(--bg2);border-color:var(--cream)}
[data-theme=dark] .tl li.done::before{background:var(--cream)}
[data-theme=dark] .tl::before{background:var(--line)}
[data-theme=dark] .tl::after{background:var(--cream)}

/* art under the surface */
[data-theme=dark] .collage .c2{border-color:var(--bg2)}
[data-theme=dark] .collage figcaption,[data-theme=dark] .fine{color:var(--muted)}
[data-theme=dark] .case{border-color:var(--line)}
[data-theme=dark] .cases{border-color:var(--line)}

/* apply band */
[data-theme=dark] .apply-band{border-top-color:var(--line)}

/* about columns (dark section, dark theme) */
[data-theme=dark] .about-cols{border-top-color:rgba(244,239,230,.22)}
[data-theme=dark] .about-cols>div{border-bottom-color:rgba(244,239,230,.22)}
[data-theme=dark] .about-cols>div+div{border-left-color:rgba(244,239,230,.22)}

/* v5: judge closed note, inspiration, how it works panels, modal, judges, awards, faq, about prose */
[data-theme=dark] .judge-closed-note{border-top-color:var(--line);color:var(--muted)}
[data-theme=dark] .judge-closed-note a{color:var(--accent)}
[data-theme=dark] .judge-closed-note a:hover{color:var(--cream)}

[data-theme=dark] .insp-cards>*,[data-theme=dark] .insp-card{border-top-color:var(--line)}
[data-theme=dark] .insp-cards>*:hover,[data-theme=dark] .insp-card:hover{border-top-color:var(--accent)}
[data-theme=dark] .insp-cards a,[data-theme=dark] .insp-card a{color:var(--accent)}
[data-theme=dark] .btn-icon{background:var(--bg2);border-color:var(--line);color:var(--ink)}
[data-theme=dark] .btn-icon:hover{background:var(--accent);color:var(--navy);border-color:var(--accent)}
[data-theme=dark] .reel-card{background:var(--bg2);border-color:var(--line)}
[data-theme=dark] .reel-frame{background:rgba(255,255,255,.04)}
[data-theme=dark] .reel-foot{border-top-color:var(--line)}
[data-theme=dark] .reel-foot a{color:var(--accent)}
[data-theme=dark] .dance-grid,[data-theme=dark] .dance-grid li,[data-theme=dark] .dance-grid>a{border-color:var(--line)}
[data-theme=dark] .dance-grid a:hover{background:rgba(255,74,28,.08)}
[data-theme=dark] .dance-grid .meta,[data-theme=dark] .dance-grid .src,[data-theme=dark] .dance-grid .tag,[data-theme=dark] .dance-grid small,[data-theme=dark] .dance-grid a>span:first-child{color:var(--accent)}
[data-theme=dark] .dance-grid a:hover h4,[data-theme=dark] .dance-grid a:hover h3,[data-theme=dark] .dance-grid a:hover b,[data-theme=dark] .dance-grid a:hover strong,[data-theme=dark] .dance-grid a:hover .title,[data-theme=dark] .dance-grid a:hover>span:last-child{color:var(--accent)}

[data-theme=dark] .layers li:hover{background:rgba(255,255,255,.04)}
[data-theme=dark] .layers li>span{color:var(--accent)}
[data-theme=dark] .layers p{color:#cfc9bf}
[data-theme=dark] .layers .gap{background:#0f0f0f}
[data-theme=dark] .layers .gap:hover{background:#141414}
[data-theme=dark] .panel{background:rgba(255,255,255,.03);border-color:var(--line)}
[data-theme=dark] .panel p{color:#cfc9bf}
[data-theme=dark] .panel.dark2{background:#0f0f0f;color:var(--cream);border-color:rgba(248,243,236,.22)}

[data-theme=dark] dialog.sp-modal{background:var(--bg2);color:var(--ink);border-color:var(--line);box-shadow:0 40px 100px -20px rgba(0,0,0,.85)}
[data-theme=dark] .sp-modal-card,[data-theme=dark] .sp-preview-card,[data-theme=dark] .sp-modal-grid>*,[data-theme=dark] .sp-preview-grid>*,[data-theme=dark] .sp-modal-cards>*,[data-theme=dark] dialog.sp-modal ul>li{background:rgba(255,255,255,.03);border-color:var(--line)}
[data-theme=dark] .sp-modal-card .meta,[data-theme=dark] .sp-preview-card .meta,[data-theme=dark] dialog.sp-modal .meta{color:var(--accent)}

[data-theme=dark] .judge-card{background:rgba(255,255,255,.02);border-color:var(--line)}
[data-theme=dark] .j-num,[data-theme=dark] .j-top .meta,[data-theme=dark] .j-top span,[data-theme=dark] .j-open{color:var(--accent)}
[data-theme=dark] .j-bio,[data-theme=dark] .j-ideas li{color:#cfc9bf}
[data-theme=dark] .j-work-btn{color:var(--cream)}
[data-theme=dark] .j-work-btn:hover{color:var(--accent)}
[data-theme=dark] .fenne-piece{background:rgba(255,255,255,.03);border-color:var(--line)}
[data-theme=dark] .fenne-piece h4,[data-theme=dark] .poem-body p{color:var(--cream)!important}
[data-theme=dark] .j-links a{color:var(--accent)}
[data-theme=dark] .j-links a:hover{color:var(--cream)}

[data-theme=dark] .perks-grid>*,[data-theme=dark] .perk-card,[data-theme=dark] .award-card{background:rgba(255,255,255,.025);border-color:var(--line)}
[data-theme=dark] .award-card:hover{border-color:var(--accent)}
[data-theme=dark] .perks-grid .meta,[data-theme=dark] .perks-grid .n,[data-theme=dark] .perks-grid>*>span:first-child,[data-theme=dark] .perk-num,
[data-theme=dark] .award-card .meta,[data-theme=dark] .award-card .n,[data-theme=dark] .award-card>span:first-child,[data-theme=dark] .award-num{color:var(--accent)}

[data-theme=dark] .faq-cat,[data-theme=dark] .faq-item summary::after,[data-theme=dark] .faq-item summary:hover,[data-theme=dark] .faq-ans a,[data-theme=dark] .faq-item a{color:var(--accent)}
[data-theme=dark] .faq-ans,[data-theme=dark] .faq-item>div,[data-theme=dark] .faq-item>p{color:#cfc9bf}

[data-theme=dark] .about-prose{color:#cfc9bf}
[data-theme=dark] .about-prose>p:first-child{color:var(--cream)}
[data-theme=dark] .about-contact{border-top-color:rgba(244,239,230,.22);color:var(--muted)}

