/* ═══════════════════════════════════════════════════════════════
   STRATUS — atmospheric observatory
   Glass instruments over a living, scroll-scrubbed WebGL sky.
   ═══════════════════════════════════════════════════════════════ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --ease: cubic-bezier(.22,.8,.24,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --radius: 16px;
  --lens-x: 82vw;
  --lens-y: 58vh;
  --lens-rot: 0deg;
  --lens-label-rot: 0deg;
  --lens-scale: .94;
}

/* ——— phase palettes: the page's ink & glass follow the sky ——— */
body[data-phase="0"] {
  --ink: #f8efe3; --ink-soft: rgba(248,239,227,.76); --ink-faint: rgba(248,239,227,.6);
  --card: rgba(22,16,30,.58); --card-brd: rgba(255,220,180,.24);
  --accent: #ffb265; --glass-blur: 14px;
  --shadow: 0 18px 50px rgba(10,5,20,.35);
}
body[data-phase="1"] {
  --ink: #10233c; --ink-soft: rgba(16,35,60,.78); --ink-faint: rgba(16,35,60,.66);
  --card: rgba(255,255,255,.55); --card-brd: rgba(255,255,255,.75);
  --accent: #0b5da5; --glass-blur: 16px;
  --shadow: 0 18px 50px rgba(30,70,120,.22);
}
body[data-phase="2"] {
  --ink: #eef2f3; --ink-soft: rgba(238,242,243,.76); --ink-faint: rgba(238,242,243,.6);
  --card: rgba(9,12,16,.6); --card-brd: rgba(220,235,240,.16);
  --accent: #ffd66b; --glass-blur: 14px;
  --shadow: 0 18px 60px rgba(0,0,0,.45);
}
body[data-phase="3"] {
  --ink: #fbeae2; --ink-soft: rgba(251,234,226,.78); --ink-faint: rgba(251,234,226,.6);
  --card: rgba(20,10,20,.6); --card-brd: rgba(255,160,130,.2);
  --accent: #ff8d7e; --glass-blur: 14px;
  --shadow: 0 18px 55px rgba(15,5,15,.45);
}
body[data-phase="4"] {
  --ink: #e6edfb; --ink-soft: rgba(230,237,251,.75); --ink-faint: rgba(230,237,251,.58);
  --card: rgba(5,8,16,.62); --card-brd: rgba(160,200,255,.16);
  --accent: #9fd8ff; --glass-blur: 12px;
  --shadow: 0 18px 55px rgba(0,0,5,.55);
}
/* no-WebGL uses the 2D canvas fallback, so phase palettes above still drive contrast. */

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  scrollbar-width: thin;
  scrollbar-color: #ffb265 rgba(5,8,16,.72);
}
html, body { overflow-x: clip; }

body {
  font-family: 'Outfit', sans-serif;
  font-optical-sizing: auto;
  font-feature-settings: "kern" 1, "tnum" 1;
  text-rendering: geometricPrecision;
  font-weight: 300;
  background: #0c1322; /* under the canvas, & no-webgl fallback */
  color: var(--ink);
  line-height: 1.6;
  transition: color .8s var(--ease);
  padding-bottom: 54px; /* statusbar clearance */
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(255,178,101,.18);
}
body.no-webgl {
  background: linear-gradient(180deg, #1c2447 0%, #40406e 34%, #b06a4a 72%, #f5a35c 100%);
  background-attachment: fixed;
}

::selection { background: var(--accent); color: #0c1322; }

::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: rgba(5,8,16,.72); }
::-webkit-scrollbar-thumb {
  border: 3px solid rgba(5,8,16,.72);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffb265, #9fd8ff);
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #ffd39c, #bde6ff); }

a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: fixed; left: 1rem; top: 1rem; z-index: 80;
  transform: translateY(-140%);
  background: rgba(5,8,16,.88);
  border: 1px solid var(--card-brd);
  border-radius: 999px;
  color: var(--ink);
  padding: .7rem 1rem;
  text-decoration: none;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .1em;
  transition: transform .25s var(--ease);
}
.skip-link:focus-visible { transform: translateY(0); }

/* ——— sky & particles ——— */
#sky, #particles {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: -2; display: block;
}
#particles { z-index: -1; pointer-events: none; }

.sky-overlay {
  position: fixed; inset: 0; z-index: -1;
  pointer-events: none; overflow: hidden;
}
.sky-overlay::before {
  content: ""; position: absolute; inset: -10%;
  opacity: .17;
  background-image:
    radial-gradient(circle at 20% 35%, rgba(255,255,255,.55) 0 1px, transparent 1.4px),
    radial-gradient(circle at 78% 24%, rgba(255,255,255,.38) 0 1px, transparent 1.5px),
    radial-gradient(circle at 58% 72%, rgba(255,255,255,.28) 0 1px, transparent 1.6px);
  background-size: 17px 19px, 23px 29px, 31px 37px;
  mix-blend-mode: soft-light;
}
.sky-overlay::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 50% 42%, transparent 0 42%, rgba(0,0,0,.24) 74%, rgba(0,0,0,.46) 100%),
    linear-gradient(90deg, rgba(255,255,255,.08), transparent 12%, transparent 88%, rgba(255,255,255,.06));
  opacity: .52;
}
.field-grid {
  position: absolute; inset: 8vh 4vw 10vh;
  opacity: .12;
  background:
    linear-gradient(rgba(255,255,255,.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.28) 1px, transparent 1px);
  background-size: 120px 120px;
  mask-image: radial-gradient(ellipse at 50% 48%, #000 0 52%, transparent 76%);
}
.reticle {
  position: absolute;
  width: clamp(190px, 24vw, 360px);
  aspect-ratio: 1;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 50%;
  opacity: .22;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 0 48px rgba(255,255,255,.08);
}
.reticle::before,
.reticle::after {
  content: ""; position: absolute; inset: 50% auto auto 50%;
  width: 116%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.48), transparent);
  transform: translate(-50%, -50%);
}
.reticle::after { transform: translate(-50%, -50%) rotate(90deg); }
.reticle-a { right: 6vw; top: 18vh; }
.reticle-b { left: -7vw; bottom: 9vh; width: clamp(220px, 30vw, 430px); opacity: .14; }
.ridge-readout {
  position: absolute; right: clamp(1rem, 4vw, 4rem); bottom: clamp(5.5rem, 9vh, 7rem);
  color: rgba(255,255,255,.58);
  font-size: .58rem; font-weight: 600; letter-spacing: .2em;
  text-shadow: 0 1px 12px rgba(0,0,0,.45);
  writing-mode: vertical-rl;
}
.sky-lens {
  position: absolute;
  left: var(--lens-x);
  top: var(--lens-y);
  width: clamp(140px, 15vw, 230px);
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) rotate(var(--lens-rot)) scale(var(--lens-scale));
  transform-origin: 50% 50%;
  background:
    radial-gradient(circle at 42% 34%, rgba(255,255,255,.36), transparent 0 5%, rgba(255,255,255,.09) 6% 34%, transparent 62%),
    radial-gradient(circle, rgba(255,255,255,.06), rgba(255,255,255,.015) 54%, transparent 72%);
  border: 1px solid rgba(255,255,255,.24);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.08),
    inset 0 0 36px rgba(255,255,255,.08),
    0 0 58px rgba(255,255,255,.13);
  backdrop-filter: blur(3px) saturate(1.5) contrast(1.12);
  -webkit-backdrop-filter: blur(3px) saturate(1.5) contrast(1.12);
  transition: opacity 1.1s var(--ease-out), transform .7s var(--ease-out), border-color .8s var(--ease);
}
body.loaded .sky-lens { opacity: .62; --lens-scale: 1; }
body.optic-lock .sky-lens {
  opacity: .9;
  border-color: color-mix(in srgb, var(--accent) 56%, rgba(255,255,255,.34));
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.12),
    inset 0 0 44px rgba(255,255,255,.12),
    0 0 70px color-mix(in srgb, var(--accent) 34%, transparent);
}
.sky-lens::before,
.sky-lens::after {
  content: "";
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  pointer-events: none;
}
.sky-lens::before {
  border: 1px solid rgba(255,255,255,.34);
  background:
    linear-gradient(90deg, transparent 48%, rgba(255,255,255,.46) 49% 51%, transparent 52%),
    linear-gradient(0deg, transparent 48%, rgba(255,255,255,.38) 49% 51%, transparent 52%);
  mask-image: radial-gradient(circle, transparent 0 11%, #000 12% 100%);
}
.sky-lens::after {
  inset: 4%;
  border: 1px dashed rgba(255,255,255,.28);
  box-shadow: 0 0 0 24px rgba(255,255,255,.015);
}
.lens-bearing,
.lens-phase {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.86);
  text-shadow: 0 1px 12px rgba(0,0,0,.46);
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.lens-bearing {
  top: 50%;
  transform: translate(-50%, -50%) rotate(var(--lens-label-rot));
  font-size: .68rem;
  color: var(--accent);
}
.lens-phase {
  bottom: -1.9rem;
  font-size: .56rem;
  opacity: .78;
}
body[data-phase="1"] .sky-lens {
  mix-blend-mode: multiply;
  border-color: rgba(16,35,60,.28);
}
body[data-phase="1"] .lens-bearing,
body[data-phase="1"] .lens-phase { color: rgba(16,35,60,.72); text-shadow: 0 1px 12px rgba(255,255,255,.45); }

/* ——— top bar ——— */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: calc(.7rem + env(safe-area-inset-top)) clamp(1rem, 3.5vw, 2.4rem) .7rem;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(7,10,18,.5), rgba(7,10,18,.26) 60%, rgba(7,10,18,0));
  border-bottom: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(12px) saturate(1.15);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  transition: color .8s var(--ease), background .8s var(--ease), border-color .8s var(--ease);
}
body[data-phase="1"] .topbar {
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.28) 60%, rgba(255,255,255,0));
  border-color: rgba(16,35,60,.12);
}

.brand {
  display: inline-flex; align-items: center; gap: .55rem;
  min-height: 44px; min-width: 44px;
  text-decoration: none;
  font-weight: 500; letter-spacing: .34em; font-size: .82rem;
  text-shadow: 0 1px 14px rgba(0,0,0,.25);
  white-space: nowrap;
  transition: color .35s var(--ease), transform .35s var(--ease);
}
body[data-phase="1"] .brand { text-shadow: 0 1px 14px rgba(255,255,255,.4); }
.brand:hover { color: var(--accent); transform: translateY(-1px); }

.timeline { display: flex; gap: .25rem; }
.timeline button {
  appearance: none; border: 0; background: none; cursor: pointer;
  color: var(--ink-soft); font: inherit;
  font-size: .68rem; font-weight: 500; letter-spacing: .14em;
  min-width: 44px; min-height: 44px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem;
  transition: color .5s var(--ease);
}
.timeline button i {
  width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; opacity: .45;
  transition: transform .4s var(--ease), opacity .4s var(--ease), box-shadow .4s var(--ease);
}
.timeline button.on { color: var(--accent); }
.timeline button.on i { opacity: 1; transform: scale(1.5); box-shadow: 0 0 12px currentColor; }
.timeline button:hover, .timeline button:focus-visible { color: var(--ink); }
.timeline button:hover i { opacity: .9; transform: scale(1.22); }
.timeline button:focus-visible i { opacity: 1; transform: scale(1.34); }

.clock {
  text-align: right; line-height: 1.25;
  font-variant-numeric: tabular-nums;
  font-size: .82rem; font-weight: 400; letter-spacing: .1em;
  text-shadow: 0 1px 12px rgba(0,0,0,.3);
  min-width: 10.7rem;
}
body[data-phase="1"] .clock { text-shadow: 0 1px 12px rgba(255,255,255,.4); }
.clock small { display: block; font-size: .56rem; letter-spacing: .2em; color: var(--ink-faint); }

/* ——— panels ——— */
.panel {
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(7rem, 14vh, 11rem) clamp(1.25rem, 5vw, 4rem);
  scroll-margin-top: 5.6rem;
}
.panel:not(.hero) { justify-content: flex-start; }
.wrap { width: min(1120px, 100%); margin-inline: auto; position: relative; }
main, .site-foot { position: relative; z-index: 1; }

.ghost {
  position: absolute; top: clamp(2rem, 8vh, 5rem); left: clamp(.5rem, 3vw, 3rem);
  font-weight: 100; font-size: clamp(5.5rem, 19vw, 15rem);
  letter-spacing: 0; line-height: 1;
  color: var(--ink); opacity: .1;
  user-select: none; pointer-events: none;
  font-variant-numeric: tabular-nums;
  transition: color .8s var(--ease);
}
.ghost.right { left: auto; right: clamp(.5rem, 3vw, 3rem); }

.kicker {
  font-size: .72rem; font-weight: 500;
  letter-spacing: .24em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.1rem;
  text-shadow: 0 1px 10px rgba(0,0,0,.25);
  font-variant-numeric: tabular-nums;
}
body[data-phase="1"] .kicker { text-shadow: none; }

h1 {
  font-size: clamp(3.6rem, 11.4vw, 10.8rem);
  font-weight: 100;
  letter-spacing: clamp(.07em, 1.25vw, .18em);
  margin-right: calc(clamp(.07em, 1.25vw, .18em) * -1);
  line-height: 1.02;
  text-shadow: 0 4px 40px rgba(0,0,0,.3);
  text-wrap: balance;
}
h1 b { font-weight: inherit; display: inline-block; }

h2 {
  font-size: clamp(2.1rem, 5.4vw, 4rem);
  font-weight: 200;
  line-height: 1.06; letter-spacing: 0;
  margin-bottom: 1.4rem;
  text-shadow: 0 3px 30px rgba(0,0,0,.28);
  text-wrap: balance;
}
body[data-phase="1"] h1, body[data-phase="1"] h2 { text-shadow: 0 3px 30px rgba(255,255,255,.45); }
.lead, .logbody, .note, .convlog li, .archive td, .poem { text-wrap: pretty; }

.phead { max-width: 42rem; margin-bottom: clamp(2.2rem, 5vh, 3.6rem); }
.phead.center { margin-inline: auto; text-align: center; }
.lead { font-size: clamp(1rem, 1.5vw, 1.12rem); color: var(--ink-soft); font-weight: 300; max-width: 38rem; }
.lead.centered { margin-inline: auto; }

.poem {
  font-family: 'Newsreader', serif;
  font-style: italic; font-weight: 300;
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  line-height: 1.5;
  color: var(--ink);
  text-shadow: 0 2px 22px rgba(0,0,0,.3);
  margin-top: clamp(2.4rem, 6vh, 4rem);
}
body[data-phase="1"] .poem { text-shadow: 0 2px 22px rgba(255,255,255,.5); }

/* ——— glass cards ——— */
.card {
  background:
    linear-gradient(145deg, rgba(255,255,255,.11), rgba(255,255,255,.025) 34%, rgba(0,0,0,.08) 100%),
    var(--card);
  border: 1px solid var(--card-brd);
  border-radius: var(--radius);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.25);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.25);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.07);
  padding: 1.4rem 1.5rem;
  transition: background .8s var(--ease), border-color .8s var(--ease),
              transform .6s var(--ease), box-shadow .8s var(--ease);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.card::before { /* glass edge highlight */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent);
  opacity: .5; pointer-events: none;
}
.card::after {
  content: ""; position: absolute; inset: .72rem;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: calc(var(--radius) - 7px);
  opacity: .8; pointer-events: none;
  mask-image: linear-gradient(135deg, #000 0 18%, transparent 18% 82%, #000 82%);
}
.card > * { position: relative; z-index: 1; }
.card:hover,
.card:focus-within {
  transform: translateY(-4px);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.11), 0 0 34px rgba(255,255,255,.07);
}

.loghead {
  font-size: .64rem; font-weight: 600; letter-spacing: .22em;
  color: var(--accent); margin-bottom: .8rem; text-transform: uppercase;
}
.logbody { font-size: .98rem; color: var(--ink-soft); }
.lv { color: var(--accent); font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* hero */
.hero .wrap { text-align: left; }
.hero-wrap { min-height: min(720px, 78vh); display: flex; flex-direction: column; justify-content: center; }
.hero h1 { margin: .2rem 0 1.6rem; }
.hero .poem { margin-top: 0; margin-bottom: 2rem; font-size: clamp(1.15rem, 2.4vw, 1.55rem); }
.chips { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: 2.4rem; }
.chip {
  font-size: .62rem; font-weight: 500; letter-spacing: .18em;
  padding: .52rem .85rem; border-radius: 8px;
  border: 1px solid var(--card-brd);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02)), var(--card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background .8s var(--ease), border-color .8s var(--ease);
}
.chip:hover {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(255,255,255,.13), rgba(255,255,255,.03)), var(--card);
}
.logline { max-width: 34rem; }
.station-plate {
  position: absolute;
  right: 0; top: clamp(5rem, 13vh, 8rem);
  width: min(310px, 29vw);
  padding-top: 1.25rem;
}
.station-plate::before {
  height: auto; inset: auto 1.35rem 1.35rem auto;
  width: 7.8rem; aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 45%, rgba(255,255,255,.22) 46% 47%, transparent 48%),
    conic-gradient(from -20deg, transparent 0 18%, var(--accent) 18% 28%, transparent 28% 100%);
  opacity: .42;
}
.station-plate dl {
  display: grid; gap: .8rem;
  font-variant-numeric: tabular-nums;
}
.station-plate div {
  display: flex; justify-content: space-between; gap: 1rem;
  border-top: 1px solid var(--card-brd);
  padding-top: .7rem;
}
.station-plate dt {
  color: var(--ink-faint);
  font-size: .62rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
}
.station-plate dd { color: var(--ink); font-weight: 500; }
.scrollcue {
  position: absolute; left: 50%; bottom: clamp(1.2rem, 4vh, 2.6rem);
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  min-height: 44px; min-width: 44px; justify-content: flex-end;
  text-decoration: none; color: var(--ink-soft);
  font-size: .62rem; font-weight: 500; letter-spacing: .3em;
  transition: color .35s var(--ease), transform .35s var(--ease);
}
.scrollcue svg { animation: cue 2.4s var(--ease) infinite; }
.scrollcue:hover, .scrollcue:focus-visible { color: var(--accent); transform: translateX(-50%) translateY(-2px); }
@keyframes cue { 0%,100% { transform: translateY(0); opacity: .9; } 55% { transform: translateY(7px); opacity: .45; } }

/* instrument grid */
.igrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 1rem;
}
.inst h3, .slabel {
  font-size: .66rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: .9rem;
}
.inst {
  min-height: 15.5rem;
  display: flex; flex-direction: column;
}
.inst .note { margin-top: auto; }
.inst .big::before,
.stat .big::before {
  content: ""; display: inline-block;
  width: .34em; height: .34em; margin-right: .22em;
  border: 1px solid currentColor; border-radius: 50%;
  opacity: .42; transform: translateY(-.08em);
}
.big {
  font-size: clamp(2.1rem, 3.4vw, 2.7rem); font-weight: 200;
  line-height: 1; font-variant-numeric: tabular-nums;
  margin-bottom: .7rem; letter-spacing: 0;
}
.big small {
  font-size: .8rem; font-weight: 400; letter-spacing: .08em;
  color: var(--ink-faint); margin-left: .45rem;
}
.spark { width: 100%; max-width: 170px; height: 40px; display: block; margin-bottom: .8rem; opacity: .95; }
.note { font-size: .8rem; color: var(--ink-soft); line-height: 1.55; }
.note [data-trend] { color: var(--accent); font-weight: 500; }

/* storm */
.narrow-right .phead { margin-left: auto; text-align: right; }
.narrow-right .phead .lead { margin-left: auto; }
.statrow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 1rem; margin-bottom: 1rem;
}
.flash-num span { color: var(--accent); text-shadow: 0 0 26px currentColor; transition: text-shadow .3s; }

.convlog ul { list-style: none; }
.convlog li {
  display: grid; grid-template-columns: 4.2rem 1fr; gap: 1rem;
  padding: .8rem 0; border-top: 1px solid var(--card-brd);
  font-size: .92rem; color: var(--ink-soft);
}
.convlog li:first-child { border-top: 0; }
.convlog time {
  font-variant-numeric: tabular-nums; font-weight: 500;
  color: var(--accent); font-size: .85rem; letter-spacing: .06em;
}

/* dusk */
.duskrow {
  display: grid; grid-template-columns: 1.6fr 1fr; gap: 1rem;
  align-items: start;
}
.duskside { display: grid; gap: 1rem; }
.archive table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.archive th {
  text-align: left; font-size: .62rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-faint); padding: 0 .6rem .6rem 0;
}
.archive td {
  padding: .62rem .6rem .62rem 0;
  border-top: 1px solid var(--card-brd);
  color: var(--ink-soft); vertical-align: top;
}
.archive td:first-child { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink); }
.archive td:nth-child(2) { font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 500; }

/* ——— waypoints: small italic lines floating in the open sky between sections ——— */
.waypoint {
  min-height: 34vh;
  display: flex; align-items: center;
  padding: 2rem clamp(1.25rem, 5vw, 4rem);
  text-align: left;
}
.waypoint p {
  font-family: 'Newsreader', serif;
  font-style: italic; font-weight: 300;
  font-size: clamp(1.02rem, 2vw, 1.3rem);
  color: var(--ink-soft);
  max-width: 34rem;
  padding: 1.1rem 0 1.1rem 1.15rem;
  border-left: 1px solid var(--card-brd);
  text-shadow: 0 2px 18px rgba(0,0,0,.35);
  transition: color .8s var(--ease);
}
.waypoint-gather { justify-content: flex-end; }
.waypoint-clear { justify-content: center; text-align: center; }
.waypoint-clear p { border-left: 0; border-top: 1px solid var(--card-brd); border-bottom: 1px solid var(--card-brd); padding: 1.1rem 0; }
.waypoint-stars { justify-content: flex-start; }
body[data-phase="1"] .waypoint p { text-shadow: 0 2px 18px rgba(255,255,255,.45); }

/* ——— footer ——— */
.site-foot {
  position: relative; z-index: 5;
  padding: clamp(2.4rem, 6vh, 4rem) clamp(1.25rem, 5vw, 4rem) clamp(2.2rem, 5vh, 3rem);
  border-top: 1px solid var(--card-brd);
  background: linear-gradient(180deg, rgba(4,7,14,.35), rgba(4,7,14,.6));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.frow {
  display: flex; flex-wrap: wrap; gap: 1.4rem 2.5rem;
  align-items: baseline; justify-content: space-between;
  margin-bottom: 1.6rem;
}
.fbrand { font-weight: 500; letter-spacing: .34em; font-size: .9rem; }
.fbrand small {
  display: block; margin-top: .5rem;
  font-family: 'Newsreader', serif; font-style: italic; font-weight: 300;
  font-size: .92rem; letter-spacing: .01em; text-transform: none;
  color: var(--ink-soft);
}
.flinks { display: flex; flex-wrap: wrap; gap: .4rem 1.8rem; }
.flinks a {
  font-size: .78rem; font-weight: 500; letter-spacing: .1em;
  text-decoration: none; color: var(--ink-soft);
  border-bottom: 1px solid var(--card-brd);
  padding: .55rem 0; min-height: 44px; display: inline-flex; align-items: center;
  transition: color .3s, border-color .3s;
}
.flinks a:hover, .flinks a:focus-visible { color: var(--accent); border-color: var(--accent); }
.fnote { font-size: .76rem; color: var(--ink-faint); letter-spacing: .04em; }

/* ——— status bar ——— */
.statusbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; align-items: center; gap: clamp(.9rem, 3vw, 2.2rem);
  padding: .55rem clamp(1rem, 3.5vw, 2.4rem) calc(.55rem + env(safe-area-inset-bottom));
  background: var(--card);
  border-top: 1px solid var(--card-brd);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
  transition: background .8s var(--ease), border-color .8s var(--ease);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
}
.statusbar p { display: flex; align-items: baseline; gap: .4rem; font-size: .8rem; font-weight: 400; white-space: nowrap; }
.statusbar small { font-size: .58rem; font-weight: 600; letter-spacing: .16em; color: var(--ink-faint); }
.statusbar em { font-style: normal; font-size: .62rem; color: var(--ink-faint); }
.statusbar b { font-weight: 500; color: var(--accent); }
.segment { margin-right: auto; }
.segment i {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); align-self: center;
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 2.6s ease-in-out infinite;
}
.segment span { font-size: .66rem; font-weight: 600; letter-spacing: .22em; color: var(--ink-soft); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* ——— load & scroll choreography ——— */
.boot { opacity: 0; transform: translateY(18px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
body.loaded .boot { opacity: 1; transform: none; }
body.loaded .b1 { transition-delay: .15s; }
body.loaded .b2 { transition-delay: .3s; }
body.loaded .b3 { transition-delay: .55s; }
body.loaded .b4 { transition-delay: .7s; }
body.loaded .b5 { transition-delay: .85s; }
body.loaded .b6 { transition-delay: 1s; }
body.loaded .b7 { transition-delay: 1.15s; }
h1 b { opacity: 0; transform: translateY(.35em); transition: opacity .9s var(--ease), transform .9s var(--ease); }
body.loaded h1 b { opacity: 1; transform: none; }
body.loaded h1 b:nth-child(1) { transition-delay: .34s; }
body.loaded h1 b:nth-child(2) { transition-delay: .42s; }
body.loaded h1 b:nth-child(3) { transition-delay: .5s; }
body.loaded h1 b:nth-child(4) { transition-delay: .58s; }
body.loaded h1 b:nth-child(5) { transition-delay: .66s; }
body.loaded h1 b:nth-child(6) { transition-delay: .74s; }
body.loaded h1 b:nth-child(7) { transition-delay: .82s; }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.igrid .reveal:nth-child(2), .statrow .reveal:nth-child(2) { transition-delay: .12s; }
.igrid .reveal:nth-child(3), .statrow .reveal:nth-child(3) { transition-delay: .24s; }
.igrid .reveal:nth-child(4) { transition-delay: .1s; }
.igrid .reveal:nth-child(5) { transition-delay: .22s; }
.igrid .reveal:nth-child(6) { transition-delay: .34s; }

/* ——— no-WebGL: never switch to the bright-noon scrim/shadows over the static dark gradient
       (equal specificity to the phase-1 overrides above — these win by order) ——— */
body.no-webgl .topbar { background: linear-gradient(180deg, rgba(7,10,18,.5), rgba(7,10,18,.26) 60%, rgba(7,10,18,0)); }
body.no-webgl .brand, body.no-webgl .clock { text-shadow: 0 1px 14px rgba(0,0,0,.25); }
body.no-webgl h1, body.no-webgl h2 { text-shadow: 0 3px 30px rgba(0,0,0,.28); }
body.no-webgl .poem { text-shadow: 0 2px 22px rgba(0,0,0,.3); }
body.no-webgl .waypoint p { text-shadow: 0 2px 18px rgba(0,0,0,.35); }
body.no-webgl .kicker { text-shadow: 0 1px 10px rgba(0,0,0,.25); }

/* ——— responsive ——— */
@media (max-width: 1023px) {
  .duskrow { grid-template-columns: 1fr; }
  .duskside { grid-template-columns: repeat(auto-fit, minmax(min(220px,100%),1fr)); }
  .station-plate {
    position: relative; right: auto; top: auto;
    width: min(100%, 34rem);
    margin: 0 0 1rem;
  }
}
@media (min-width: 900px) {
  #dusk .wrap { transform: translateY(-22vh); }
}
@media (max-width: 720px) {
  .topbar { gap: .35rem; }
  .timeline { position: fixed; left: 50%; transform: translateX(-50%); }
  .timeline button span { display: none; }
  .timeline button { min-width: 44px; }
  .clock small { display: none; }
  .clock { min-width: 5.9rem; font-size: .78rem; }
  .brand span { display: none; }
  .narrow-right .phead { text-align: left; margin-left: 0; }
  .ghost { font-size: clamp(4.5rem, 24vw, 8rem); top: 1.4rem; }
  .bk { display: none; }
  .statusbar { gap: .8rem; justify-content: space-between; }
  .segment span { display: none; }
  body { padding-bottom: 46px; }
  .field-grid, .reticle-b, .ridge-readout { display: none; }
  .reticle-a { right: -24vw; top: 26vh; opacity: .13; }
  .sky-lens { width: clamp(110px, 34vw, 138px); opacity: .28; left: 84vw; top: 62vh; }
  body.loaded .sky-lens { opacity: .36; }
  .lens-phase { display: none; }
  .hero-wrap { min-height: auto; }
  .hero .poem { margin-bottom: 1.2rem; }
  .station-plate { display: none; }
  .chips { margin-bottom: 1rem; }
  .logline { padding: 1.1rem 1.25rem; }
  .panel:not(.hero) { padding-top: 6.6rem; }
}
@media (max-width: 460px) {
  .statusbar .hide-s { display: none; }
  .statusbar p { font-size: .74rem; }
  .statusbar small { letter-spacing: .12em; }
  .panel { padding-inline: 1.05rem; }
  .chips { gap: .45rem; }
  .chip { padding-inline: .68rem; }
  .convlog li { grid-template-columns: 3.6rem 1fr; gap: .75rem; }
  .archive table { font-size: .82rem; }
  .archive th, .archive td { padding-right: .38rem; }
}

/* ——— reduced motion ——— */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .boot, .reveal, h1 b { opacity: 1 !important; transform: none !important; transition: none !important; }
  .scrollcue svg, .segment i { animation: none; }
  .card, .card:hover { transform: none; }
  .sky-lens { transition: none; opacity: .28; }
  .sky-overlay::before { opacity: .08; }
}
