/* Night Drive full-site theme (preview only). Hand-written, additive: loaded after the site's own styles.css (which is
   byte-identical to the live file) and switched on by one attribute, <html data-theme="night">, which site/build.mjs adds to
   site/night-drive.html only. Road and the original page never load this file.

   Intent: one continuous dusk drive from the header to the footer. The hero is the site's green going to dusk, the
   Episodes band is the darkest stretch of night, the lower exits sit on a deep green-black with a soft street-lamp glow at
   each sign, and the footer is the deepest tone. Every change between them is a gradient, never a hard edge.
   Nothing here changes a size, margin, padding or border width, so no section moves (heights are reported in the README).

   Second part: the preview toggle "Glowing glass" (html[data-buttons="glass"], set by the Night Drive script from
   ?buttons=glass or the banner toggle) restyles the site's own buttons. "Original yellow" (the default) leaves them as
   they are, apart from the two dark-surface adjustments the live site already uses in its footer (light outline buttons,
   a light hover shadow), so they stay legible on the dark page. */

/* ---------- palette ---------- */
html[data-theme="night"]{color-scheme:dark;
  --n-page:#0A1C13;        /* the lower exits */
  --n-deep:#06140D;        /* the middle of the Episodes band */
  --n-foot:#050E09;        /* the footer */
  --n-card:#10261B;        /* cards on the page */
  --n-rim:rgba(255,236,190,.14);
  --n-text:#F4F7F5;--n-text-2:#C3CEC7;--n-text-3:#AEBBB3;
  --n-link:#8FE3B0;--n-link-hover:#FFE27A;
  --n-edge:rgba(255,236,190,.3)}
html[data-theme="night"] body{background:var(--n-page)}
html[data-theme="night"] .page{background:var(--n-page);color:var(--n-text)}
/* links: zero specificity, like the site's own rule, so every component colour still wins; visited = default */
:where(html[data-theme="night"]) :where(.page) :where(a){color:var(--n-link)}
:where(html[data-theme="night"]) :where(.page) :where(a:hover){color:var(--n-link-hover)}

/* ---------- header, readout bar and the open phone menu ---------- */
html[data-theme="night"] .hdr{background:#07140D;border-bottom-color:#1C3527}
html[data-theme="night"] .page a.nl{color:var(--n-text)}
html[data-theme="night"] .page a.nl:hover,html[data-theme="night"] .page a.nl[aria-current]{color:var(--n-link-hover)}
html[data-theme="night"] .nl::after{background:var(--y)}
html[data-theme="night"] .here{background:#0C1A13;box-shadow:inset 0 1px 0 rgba(255,236,190,.08)}
@media (max-width:860px){
  html[data-theme="night"] .hdr-nav{background:#0A1A12;border-bottom-color:#1C3527;box-shadow:0 18px 30px rgba(0,0,0,.45)}
  html[data-theme="night"] .page a.nl{border-bottom-color:rgba(255,255,255,.12)}
}

/* ---------- hero: the site's green, falling to dusk at its lower edge ---------- */
html[data-theme="night"] .hero{background:linear-gradient(180deg,#034A2E 0%,#043D27 52%,#062C1D 100%)}
html[data-theme="night"] .duo .ph{border-color:#E4ECE6}

/* ---------- the road: lit edge lines the whole way down; the stretch ahead fades into the dark ---------- */
html[data-theme="night"] .route::before{content:"";position:absolute;top:0;bottom:0;left:calc(var(--road-x) - 8px);width:26px;
  border-left:2px solid var(--n-edge);border-right:2px solid var(--n-edge);pointer-events:none}
html[data-theme="night"] .road-ahead::after{background:rgba(10,28,19,.84)}
html[data-theme="night"] .arm{background:#9AA39E}
html[data-theme="night"] .node{box-shadow:0 0 0 3px rgba(255,236,190,.3),0 0 18px rgba(255,210,58,.3)}
html[data-theme="night"] .sign{box-shadow:inset 0 0 0 4px var(--g),inset 0 0 0 7px #fff,0 0 28px rgba(255,236,190,.14)}
/* a soft street-lamp glow behind every exit sign keeps the section rhythm without a hard divider */
html[data-theme="night"] .sec-head::before{content:"";position:absolute;z-index:-1;left:-3rem;top:-2.5rem;width:min(40rem,100%);height:13rem;
  background:radial-gradient(closest-side,rgba(255,214,120,.075),transparent);pointer-events:none}
html[data-theme="night"] .sec-sub{color:var(--n-text-2)}

/* the Episodes band: no light seam at either end now; it opens from the hero's dusk, is the darkest stretch, and eases
   back into the page colour (replaces the light-page band from fit-night-drive.css: no dawn, no paper) */
html[data-theme="night"] #episodes:has(> .msl-lib--night)::before{background:
    radial-gradient(1.4px 1.4px at 30px 40px,rgba(255,255,255,.7),transparent) 0 0/310px 230px repeat-x,
    radial-gradient(1px 1px at 140px 90px,rgba(255,255,255,.55),transparent) 0 0/310px 230px repeat-x,
    radial-gradient(1.2px 1.2px at 230px 25px,rgba(255,255,255,.6),transparent) 0 0/310px 230px repeat-x,
    radial-gradient(1px 1px at 80px 160px,rgba(255,255,255,.4),transparent) 0 0/310px 230px repeat-x,
    radial-gradient(1100px 200px at 50% calc(100% - 3rem),rgba(255,150,60,.07),transparent 70%),
    linear-gradient(180deg,#062C1D 0,#071F15 calc(var(--nd-top) + 8rem),var(--n-deep) 45%,#08170F calc(100% - 10rem),var(--n-page) 100%)}

/* ---------- Your guides ---------- */
html[data-theme="night"] .guide,html[data-theme="night"] .item{background:var(--n-card);border-color:var(--n-rim)}
html[data-theme="night"] .role{color:var(--n-link)}
html[data-theme="night"] .guide-lane,html[data-theme="night"] .item-sub{color:var(--n-text-2)}
html[data-theme="night"] .h-s,html[data-theme="night"] .fine{color:var(--n-text-3)}
html[data-theme="night"] .lanes li{border-color:rgba(143,227,176,.55);color:var(--n-link)}
html[data-theme="night"] .contact{border-top-color:rgba(255,255,255,.14)}
html[data-theme="night"] .page .guide a.host-social{color:var(--n-link);border-color:rgba(255,255,255,.22);background:rgba(255,255,255,.04)}
html[data-theme="night"] .page .guide a.host-social:hover{color:var(--n-link-hover);border-color:var(--n-link-hover);background:rgba(255,255,255,.08)}

/* ---------- Weekly idea: the yellow card becomes a dark panel with a warm lit rim (same box, rim drawn inside) ---------- */
html[data-theme="night"] .soon{background:radial-gradient(120% 90% at 0% 0%,rgba(255,210,58,.1),transparent 60%),linear-gradient(160deg,#16291C,#0F2219);
  box-shadow:inset 0 0 0 1.5px rgba(255,210,58,.5),0 0 40px -10px rgba(255,210,58,.18)}
html[data-theme="night"] .soon-copy p{color:#DCE4DF}
html[data-theme="night"] .soon .tag-ink{background:#0F1A15;color:var(--y);box-shadow:inset 0 0 0 1.5px rgba(255,210,58,.65)}
html[data-theme="night"] .msl-nl-placeholder{border-color:rgba(255,236,190,.42);background:rgba(0,0,0,.28);color:var(--n-text)}
html[data-theme="night"] .msl-nl-placeholder-s,html[data-theme="night"] .msl-inert-note{color:var(--n-text-2)}

/* ---------- Store: the light product renders get a dark mat and a fine warm rule, like framed prints ---------- */
html[data-theme="night"] .item-art{background:#E3E8E3}
html[data-theme="night"] .item-art::after{content:"";position:absolute;inset:0;pointer-events:none;
  box-shadow:inset 0 0 0 6px var(--n-card),inset 0 0 0 7.5px rgba(255,236,190,.4),inset 0 0 24px 6px rgba(6,20,13,.35)}
html[data-theme="night"] .item-art .render{filter:brightness(.94)}

/* ---------- footer: the deepest tone, reached by a gradient, not an edge ---------- */
html[data-theme="night"] .foot{background:linear-gradient(180deg,var(--n-page) 0,var(--n-foot) 7rem)}
html[data-theme="night"] .foot-base{border-top-color:rgba(255,236,190,.14)}

/* ---------- "Original yellow" on the dark page: the live styles, plus the dark-surface variants the live footer already
   uses (outline buttons in light, a light hover shadow), so Menu and every outline stay legible ---------- */
html[data-theme="night"] .page .btn-line{color:var(--n-text);border-color:rgba(244,247,245,.8)}
html[data-theme="night"] .page .hdr-toggle[aria-expanded="true"]{background:var(--n-text);border-color:var(--n-text);color:var(--ink)}
@media (hover:hover){html[data-theme="night"] .page .btn:hover{box-shadow:0 3px 0 var(--n-text)}}

/* ---------- preview toggle "Glowing glass": the site's own buttons, no markup change ----------
   Same box as the original (the 2px border stays 2px), so nothing shifts. Primary (.btn): warm gold-tinted glass,
   gold rim, specular top edge, restrained glow. Secondary (.btn-line, .btn-white, the social chips): clear glass,
   light rim, no glow. No shimmer or animation; the site's own reduced-motion rules still remove its transitions. */
html[data-buttons="glass"] .page .btn{
  background:linear-gradient(180deg,rgba(255,240,190,.22),rgba(255,214,90,.09) 46%,rgba(255,210,58,.05) 54%,rgba(255,210,58,.14)),rgba(14,22,16,.6);
  border-color:rgba(255,214,90,.82);color:#FFE8A3;text-shadow:0 0 10px rgba(255,210,58,.22);
  box-shadow:inset 0 1px 0 rgba(255,248,220,.5),inset 0 -3px 8px -3px rgba(255,210,58,.3),0 0 14px -2px rgba(255,210,58,.34);
  -webkit-backdrop-filter:blur(6px) saturate(1.15);backdrop-filter:blur(6px) saturate(1.15)}
html[data-buttons="glass"] .page a.btn{color:#FFE8A3}
html[data-buttons="glass"] .page .btn-line,html[data-buttons="glass"] .page .btn-white,html[data-buttons="glass"] .page a.btn-white,
html[data-buttons="glass"] .page .guide a.host-social,html[data-buttons="glass"] .page .foot a.host-social{
  background:linear-gradient(180deg,rgba(255,255,255,.13),rgba(255,255,255,.035) 50%,rgba(255,255,255,.07)),rgba(8,16,11,.4);
  border-color:rgba(244,247,245,.5);color:var(--n-text);text-shadow:none;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.32),0 1px 2px rgba(0,0,0,.45)}
html[data-buttons="glass"] .page .guide a.host-social{color:var(--n-link)}
@media (hover:hover){
  html[data-buttons="glass"] .page .btn:hover{filter:brightness(1.1);
    box-shadow:inset 0 1px 0 rgba(255,248,220,.6),inset 0 -3px 8px -3px rgba(255,210,58,.36),0 0 20px -2px rgba(255,210,58,.5)}
  html[data-buttons="glass"] .page .btn-line:hover,html[data-buttons="glass"] .page .btn-white:hover,
  html[data-buttons="glass"] .page .guide a.host-social:hover,html[data-buttons="glass"] .page .foot a.host-social:hover{filter:none;
    border-color:rgba(255,224,120,.8);color:#FFE8A3;background:linear-gradient(180deg,rgba(255,255,255,.17),rgba(255,255,255,.06) 50%,rgba(255,255,255,.1)),rgba(8,16,11,.4);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.4),0 0 12px -4px rgba(255,210,58,.4)}
}
html[data-buttons="glass"] .page .btn:active{filter:none;box-shadow:inset 0 2px 8px rgba(0,0,0,.5),inset 0 0 0 1px rgba(255,214,90,.4)}
html[data-buttons="glass"] .page .hdr-toggle[aria-expanded="true"]{background:linear-gradient(180deg,rgba(255,255,255,.26),rgba(255,255,255,.12)),rgba(8,16,11,.4);
  border-color:var(--n-text);color:#fff;box-shadow:inset 0 2px 6px rgba(0,0,0,.35)}
html[data-buttons="glass"] .page .btn:disabled,html[data-buttons="glass"] .page .btn[aria-disabled="true"]{opacity:.5;filter:saturate(.4);box-shadow:none;text-shadow:none;cursor:not-allowed}
