/* Clarity Atlas — The Observatory. Night chart until the Daylight beat. */

:root {
  --charcoal: #0f1115;
  --paper: #f7f7f5;
  --gold: #c8a15a;
  --gold-deep: #8a6e33;
  --slate: #9aa0a8;
  --slate-dim: #6b6f76;
  --navy: #273340;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, 'Segoe UI', Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
/* No CSS smooth scroll: anchor jumps (header Download) must be instant;
   the scenic smooth rides are driven by JS scrollIntoView only. */

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}
.pill:focus-visible, .btn.solid:focus-visible {
  outline-color: var(--paper);
}

@media (prefers-reduced-motion: reduce) {
  .cue-line { animation: none; }
  body, .sky, .top { transition: none !important; }
}

body {
  font-family: var(--sans);
  background: var(--charcoal);
  color: var(--paper);
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }

/* The sky is CSS: the canvas is transparent above it. */
.sky {
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(120% 90% at 78% 12%, rgba(138, 110, 51, 0.16), transparent 55%),
    radial-gradient(140% 110% at 30% 90%, #1a2129 0%, transparent 60%),
    linear-gradient(180deg, #232d38 0%, #12151a 45%, #0f1115 100%);
  transition: opacity 1.1s ease;
}
body.dawn .sky { opacity: 0; }
body { transition: background 1.1s ease, color 1.1s ease; }
body.dawn { background: var(--paper); color: var(--charcoal); }

#scene {
  position: fixed; inset: 0; z-index: -1;
  width: 100vw; height: 100vh; display: block;
}

/* ---------------- header ---------------- */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(18px, 4vw, 44px);
  pointer-events: none;
}
/* Tall gradient: near-solid behind the wordmark, dissolving well below the
   bar — scrolling text is almost gone by halfway up to the logo. */
.top::before {
  content: ''; position: absolute; z-index: -1;
  left: 0; right: 0; top: 0; height: 210%;
  background: linear-gradient(180deg,
    rgba(15, 17, 21, 1) 0%,
    rgba(15, 17, 21, 0.97) 38%,
    rgba(15, 17, 21, 0.78) 62%,
    rgba(15, 17, 21, 0) 100%);
  transition: opacity 1.1s ease;
}
.top::after {
  content: ''; position: absolute; z-index: -1;
  left: 0; right: 0; top: 0; height: 210%;
  background: linear-gradient(180deg,
    rgba(247, 247, 245, 1) 0%,
    rgba(247, 247, 245, 0.97) 38%,
    rgba(247, 247, 245, 0.8) 62%,
    rgba(247, 247, 245, 0) 100%);
  opacity: 0;
  transition: opacity 1.1s ease;
}
body.dawn .top::before { opacity: 0; }
body.dawn .top::after { opacity: 1; }
.top a { pointer-events: auto; }
.brand {
  display: flex; align-items: center; gap: 12px;
  color: inherit; text-decoration: none;
  font-family: var(--serif); letter-spacing: 0.18em; font-size: 15px;
}
.top nav { display: flex; gap: 18px; align-items: center; }
.top a.quiet { color: var(--slate); text-decoration: none; font-size: 14px; }
.top a.quiet:hover { color: var(--gold); }
body.dawn .top a.quiet { color: var(--slate-dim); }
.pill {
  background: var(--gold); color: var(--charcoal); text-decoration: none;
  padding: 9px 20px; border-radius: 999px; font-weight: 600; font-size: 14px;
}
.pill:hover { background: #d8b26b; }

/* ---------------- beats ---------------- */
.beat {
  position: relative; z-index: 1;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: 0 clamp(18px, 5vw, 64px);
}
.beat.hero { min-height: 118vh; align-items: flex-start; padding-top: 21vh; }
.beat.dive { min-height: 118vh; }
.beat.star { min-height: 96vh; }
/* The block sits low so the pull-back fills the sky above it instead of
   leaving dead space below — the beat stays long enough for the camera to
   finish its retreat. */
.beat.cta { min-height: 122vh; align-items: flex-end; padding-bottom: 9vh; }

/* hero */
.hero-copy { max-width: 900px; position: relative; z-index: 1; }
/* Soft dark pool behind the copy so it stays readable no matter where
   the instrument lands at a given aspect ratio */
.hero-copy::before {
  content: ''; position: absolute; z-index: -1;
  inset: -9% -14% -12% -16%;
  background: radial-gradient(ellipse 62% 58% at 42% 46%,
    rgba(15, 17, 21, 0.8), rgba(15, 17, 21, 0.42) 58%, transparent 78%);
  pointer-events: none;
}
.hero .over {
  color: var(--slate); font-size: clamp(15px, 2vw, 19px);
  letter-spacing: 0.04em; margin-bottom: 10px;
}
.hero h1 {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(2.3rem, 10.5vw, 8.5rem);
  letter-spacing: 0.06em; line-height: 1.05;
  text-shadow: 0 0 60px rgba(200, 161, 90, 0.25);
}
.hero .tag {
  font-family: var(--serif); font-style: italic;
  color: var(--gold); font-size: clamp(1.05rem, 2.6vw, 1.6rem);
  margin-top: 14px;
}
.hero .what {
  color: var(--slate); font-size: clamp(0.98rem, 2.1vw, 1.2rem);
  max-width: 46ch; margin-top: 20px;
  text-shadow: 0 2px 18px rgba(15, 17, 21, 0.8);
}
.cue {
  margin-top: 7vh; color: var(--slate); font-size: 13px; letter-spacing: 0.14em;
  text-transform: uppercase; display: flex; align-items: center; gap: 14px;
}
.cue-line {
  display: inline-block; width: 1px; height: 54px;
  background: linear-gradient(var(--gold), transparent);
  animation: cue 2.4s ease-in-out infinite;
  transform-origin: top;
}
@keyframes cue { 0%, 100% { transform: scaleY(0.35); opacity: 0.4; } 50% { transform: scaleY(1); opacity: 1; } }

.static-hero { display: none; }

/* dive */
.dive-copy { max-width: 1000px; margin: 0 auto; text-align: center; }
.dive-copy .small {
  color: var(--slate); font-size: clamp(0.95rem, 2vw, 1.15rem);
  letter-spacing: 0.05em; margin-bottom: 22px;
}
.dive-copy .big {
  font-family: var(--serif);
  font-size: clamp(2rem, 6vw, 4.4rem); line-height: 1.18;
}

/* ---------------- stations (star close-ups) ----------------
   The camera parks the star at screen center. The copy flares outward
   from that center when the station goes live; the screenshot floats
   frameless to one side. */
.beat.star { justify-content: center; }
.station {
  position: relative;
  width: 100%; max-width: 1320px;
  min-height: 86vh;
}
.st-no {
  font-size: 12.5px; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--gold);
}
.station h2 {
  font-family: var(--serif); font-size: clamp(1.7rem, 3.2vw, 2.7rem);
  line-height: 1.12;
  text-shadow: 0 2px 24px rgba(15, 17, 21, 0.9);
}
.st-copy {
  color: var(--slate); font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  text-shadow: 0 2px 18px rgba(15, 17, 21, 0.85);
}
body.dawn .st-copy { color: #4a4e55; text-shadow: none; }
body.dawn .station h2 { text-shadow: none; }
body.dawn .st-no { color: #7c6229; }

.st-shot {
  border-radius: 10px;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.55));
}
body.dawn .st-shot { filter: drop-shadow(0 24px 48px rgba(39, 51, 64, 0.3)); }

/* Hidden only when the scene can actually reveal them (html.js is set by
   an inline script and withdrawn if the scene never boots) — otherwise the
   stations would render as blank screens. */
.js .st-text, .js .st-shot {
  opacity: 0;
  transition: transform 0.7s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.55s ease;
}
.beat.star.live .st-text { opacity: 1; }
.beat.star.live .st-shot { opacity: 1; transition-delay: 0.12s; }

/* Desktop: three zones — text | the star's clear sky | screenshot.
   The camera parks the active star at screen center, inside the middle
   column, so nothing ever renders over it or under the text. */
@media (min-width: 721px) {
  .station {
    display: grid;
    grid-template-columns: 1fr clamp(180px, 24vw, 340px) 1fr;
    align-items: center;
  }
  .st-text {
    grid-row: 1; grid-column: 1;
    justify-self: center; text-align: right;
    max-width: 38ch;
  }
  .side-l .st-text { grid-column: 3; text-align: left; }
  .station h2 { margin: 10px 0 12px; }
  .st-shot, video.st-shot {
    grid-row: 1; grid-column: 3;
    justify-self: center; align-self: center;
    max-height: 62vh; max-width: 100%; width: auto;
  }
  .side-l .st-shot { grid-column: 1; }
  /* Wide desktop-app shots get their own full-width row under the text —
     squeezed into a side column they were too small to read. The camera
     aims these stations' stars at the upper third to clear the image. */
  .station.has-wide {
    grid-template-rows: minmax(38vh, auto) auto;
    row-gap: 3vh;
  }
  .has-wide .st-text { grid-row: 1; align-self: end; }
  .st-shot.wide {
    grid-row: 2; grid-column: 1 / -1;
    justify-self: center; align-self: start;
    max-width: min(78vw, 940px); max-height: 56vh; width: auto;
  }
  .beat.star:not(.live) .st-shot.wide,
  .beat.star:not(.live) .side-l .st-shot.wide { transform: translateY(2.5rem) scale(0.96); }
  /* Flare outward from the star's center column */
  .beat.star:not(.live) .st-text { transform: translateX(3rem) scale(0.94); }
  .beat.star:not(.live) .side-l .st-text { transform: translateX(-3rem) scale(0.94); }
  .beat.star:not(.live) .st-shot { transform: translateX(-3rem) scale(0.94); }
  .beat.star:not(.live) .side-l .st-shot { transform: translateX(3rem) scale(0.94); }
}

/* Big screens: the wide shot sits BESIDE the text — image left, copy
   right, the station's star aimed above the copy. */
@media (min-width: 1440px) {
  .station.has-wide {
    max-width: 1600px;
    grid-template-columns: minmax(0, 1.3fr) clamp(48px, 4vw, 90px) minmax(0, 1fr);
    grid-template-rows: none; row-gap: 0;
  }
  .has-wide .st-text {
    grid-row: 1; grid-column: 3;
    align-self: center; justify-self: start; text-align: left;
  }
  .st-shot.wide, .has-wide .st-shot.wide {
    grid-row: 1; grid-column: 1;
    justify-self: end; align-self: center;
    max-width: 100%; max-height: 74vh;
  }
  .beat.star:not(.live) .st-shot.wide { transform: translateX(3rem) scale(0.96); }
  .beat.star:not(.live) .has-wide .st-text { transform: translateX(-3rem) scale(0.94); }
}

/* ---------------- CTA ---------------- */
.cta-copy {
  width: 100%; max-width: 760px; margin: 0 auto; text-align: center;
  position: relative; z-index: 1;
}
/* Same readability pool as the hero, centered behind the CTA block */
.cta-copy::before {
  content: ''; position: absolute; z-index: -1;
  inset: -12% -18%;
  background: radial-gradient(ellipse 58% 55% at 50% 42%,
    rgba(15, 17, 21, 0.8), rgba(15, 17, 21, 0.42) 58%, transparent 78%);
  pointer-events: none;
}
.cta-over {
  font-family: var(--serif); font-style: italic; color: var(--gold);
  font-size: clamp(1rem, 2.4vw, 1.35rem); margin-bottom: 8px;
}
.cta-copy h2 {
  font-family: var(--serif); font-size: clamp(2.4rem, 7vw, 4.6rem);
  margin-bottom: 22px;
}
.badges { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 26px; }
.badges span {
  font-size: 13.5px; color: var(--paper);
  border: 1px solid var(--gold-deep); border-radius: 999px;
  padding: 5px 14px;
}
body.dawn .badges span, body.static .badges span { color: inherit; }
.buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn {
  text-decoration: none; font-weight: 600; font-size: 16px;
  padding: 15px 30px; border-radius: 12px;
}
.btn.solid { background: var(--gold); color: var(--charcoal); }
.btn.solid:hover { background: #d8b26b; }
.btn.line { color: var(--gold); border: 1px solid var(--gold-deep); }
.btn.line:hover { border-color: var(--gold); background: rgba(200, 161, 90, 0.08); }
.cta .fine { color: var(--slate); margin-top: 18px; font-size: 14px; }
.cta footer { margin-top: 8vh; display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; }
.cta footer a { color: var(--slate); text-decoration: none; font-size: 14px; }
.cta footer a:hover { color: var(--gold); }

/* ---------------- chart links (end of scroll) ---------------- */
.chart-links {
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
  margin-top: 7vh;
}
.chart-links a {
  display: flex; flex-direction: column; gap: 3px;
  min-width: 210px; padding: 15px 22px;
  border: 1px solid rgba(200, 161, 90, 0.32); border-radius: 12px;
  text-decoration: none; color: inherit;
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}
.chart-links a:hover {
  border-color: var(--gold); background: rgba(200, 161, 90, 0.07);
  transform: translateY(-2px);
}
.chart-links span { font-family: var(--serif); font-size: 1.12rem; }
.chart-links em {
  font-style: normal; font-size: 12.5px; color: var(--slate);
  letter-spacing: 0.04em;
}
body.dawn .chart-links em { color: var(--slate-dim); }

/* ---------------- panels ----------------
   Default (no JS, static mode): ordinary stacked sections, fully
   readable. The scene adds body.enhanced, which turns them into side
   panels that slide in while the constellation pivots away. */
.panel {
  position: relative; z-index: 1;
  padding: 12vh clamp(18px, 5vw, 64px);
  max-width: 900px; margin: 0 auto;
}
.panel-close { display: none; }
.panel-kicker {
  font-size: 12.5px; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 10px;
}
.panel h2 {
  font-family: var(--serif); font-size: clamp(1.9rem, 4vw, 2.9rem);
  line-height: 1.12; margin-bottom: 28px;
}
.panel .steps { list-style: none; counter-reset: step; }
.panel .steps li {
  counter-increment: step; position: relative;
  padding-left: 52px; margin-bottom: 26px;
}
.panel .steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 1px;
  font-family: var(--serif); font-size: 15px; color: var(--gold);
  letter-spacing: 0.1em;
}
.panel .steps h3 {
  font-family: var(--serif); font-size: 1.22rem; margin-bottom: 5px; font-weight: 600;
}
.panel .steps p, .panel .faq p { color: var(--slate); font-size: 15.5px; }
body.dawn .panel .steps p, body.dawn .panel .faq p { color: #4a4e55; }

.panel .faq details {
  border-top: 1px solid rgba(200, 161, 90, 0.2);
  padding: 15px 0;
}
.panel .faq details:last-of-type { border-bottom: 1px solid rgba(200, 161, 90, 0.2); }
.panel .faq summary {
  cursor: pointer; font-family: var(--serif); font-size: 1.08rem;
  list-style: none; display: flex; justify-content: space-between; gap: 16px;
}
.panel .faq summary::-webkit-details-marker { display: none; }
.panel .faq summary::after {
  content: '+'; color: var(--gold); font-size: 1.3rem; line-height: 1;
  transition: transform 0.25s ease;
}
.panel .faq details[open] summary::after { transform: rotate(45deg); }
.panel .faq details p { margin-top: 11px; max-width: 62ch; }
.panel-clip { margin-top: 30px; text-align: center; }
.panel-clip video {
  width: 100%; max-width: 300px; max-height: 52vh; border-radius: 12px;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.5);
}
body.dawn .panel-clip video, body.static .panel-clip video {
  box-shadow: 0 16px 34px rgba(39, 51, 64, 0.24);
}
.panel-clip figcaption {
  margin-top: 10px; font-size: 13px; color: var(--slate); letter-spacing: 0.02em;
}
body.dawn .panel-clip figcaption { color: var(--slate-dim); }
.panel-cta { margin-top: 34px; }

/* --- enhanced: side panels + pivoting constellation --- */
body.enhanced .panel {
  position: fixed; inset: 0; z-index: 60;
  max-width: none; margin: 0; padding: 0;
  pointer-events: none; visibility: hidden;
  /* Hold visibility until the slide-out finishes, or the room jump-cuts */
  transition: visibility 0s linear 0.72s;
}
body.enhanced .panel.open { pointer-events: auto; visibility: visible; transition: visibility 0s; }
body.enhanced .panel::before {
  content: ''; position: absolute; inset: 0;
  background: rgba(10, 12, 15, 0.45);
  opacity: 0; transition: opacity 0.5s ease;
}
body.enhanced .panel.open::before { opacity: 1; }
body.dawn.enhanced .panel::before { background: rgba(247, 247, 245, 0.5); }

body.enhanced .panel-inner {
  position: absolute; top: 0; bottom: 0;
  width: min(620px, 50vw);
  overflow-y: auto; overscroll-behavior: contain;
  padding: 13vh clamp(26px, 3.4vw, 54px) 8vh;
  background: linear-gradient(rgba(13, 16, 20, 0.96), rgba(13, 16, 20, 0.99));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: transform 0.72s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.45s ease;
  opacity: 0;
}
body.dawn.enhanced .panel-inner {
  background: linear-gradient(rgba(247, 247, 245, 0.97), rgba(247, 247, 245, 0.99));
}
/* How it works enters from the right; Questions from the left. These are
   ID-scoped, so the open state must be too or it loses the cascade. */
body.enhanced #how .panel-inner {
  right: 0; border-left: 1px solid rgba(200, 161, 90, 0.28);
  transform: translateX(102%);
}
body.enhanced #faq .panel-inner {
  left: 0; border-right: 1px solid rgba(200, 161, 90, 0.28);
  transform: translateX(-102%);
}
body.enhanced #how.open .panel-inner,
body.enhanced #faq.open .panel-inner { opacity: 1; transform: translateX(0); }
/* Outside the scroller entirely: pinned to the room's top corner, so it
   never collides with the copy and never scrolls out of reach. */
body.enhanced .panel-close {
  display: block; position: absolute; top: 18px; z-index: 3;
  background: rgba(13, 16, 20, 0.92); border: 1px solid rgba(200, 161, 90, 0.35);
  color: inherit; width: 40px; height: 40px; border-radius: 50%;
  font-size: 21px; line-height: 1; cursor: pointer;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: border-color 0.25s ease, background 0.25s ease, opacity 0.4s ease;
  opacity: 0;
}
body.enhanced .panel.open .panel-close { opacity: 1; transition-delay: 0.25s; }
body.dawn.enhanced .panel-close { background: rgba(247, 247, 245, 0.92); }
body.enhanced .panel-close:hover { border-color: var(--gold); background: rgba(200, 161, 90, 0.16); }
/* The room's own outer corner: #how sits on the right, #faq on the left */
body.enhanced #how .panel-close { right: 18px; }
body.enhanced #faq .panel-close { left: 18px; }
/* The dot navigator and support pill would sit on top of an open room —
   visibility (not just opacity) so they leave the tab order too */
body.panel-locked .hud, body.panel-locked #ca-support {
  opacity: 0; pointer-events: none; visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}
/* The header is behind the room; dim it so it doesn't read as clickable */
body.panel-locked .top { opacity: 0.32; pointer-events: none; transition: opacity 0.35s ease; }

/* Dawn: gold accents need a darker tone on paper */
body.dawn .panel-kicker,
body.dawn .panel .steps li::before,
body.dawn .panel .faq summary::after { color: #7c6229; }
body.dawn .panel .faq details,
body.dawn .panel .faq details:last-of-type { border-color: rgba(122, 98, 41, 0.28); }

/* If the scene bails to static, the rooms must become plain sections again
   even if a class lingers */
body.static .panel {
  position: relative; inset: auto; z-index: 1;
  visibility: visible; pointer-events: auto;
  max-width: 900px; margin: 0 auto; padding: 12vh clamp(18px, 5vw, 64px);
}
body.static .panel::before { display: none; }
body.static .panel-inner {
  position: static; width: auto; padding: 0; background: none;
  opacity: 1; transform: none; backdrop-filter: none; border: none;
}
body.static .panel-close { display: none; }

/* ---------------- star labels ---------------- */
.star-labels { position: fixed; inset: 0; z-index: 5; pointer-events: none; }
.star-label {
  position: absolute; top: 0; left: 0;
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--slate); opacity: 0;
  transition: opacity 0.4s ease, color 0.3s ease;
  text-shadow: 0 2px 12px rgba(15, 17, 21, 0.8);
  will-change: transform;
}
.star-label.hot { color: var(--gold); }

/* ---------------- HUD stepper ---------------- */
.hud {
  position: fixed; right: clamp(6px, 2vw, 24px); top: 50%;
  transform: translateY(-50%); z-index: 30;
  display: flex; flex-direction: column; gap: 2px; align-items: center;
}
/* Each dot is a 26px hit target drawing a 10px visual dot. */
.hud button {
  width: 26px; height: 26px; border-radius: 50%;
  border: none; background: transparent;
  cursor: pointer; padding: 0; position: relative;
}
.hud button::after {
  content: ''; position: absolute; inset: 8px;
  border-radius: 50%; border: 1px solid var(--gold-deep);
  transition: background 0.3s, transform 0.3s, border-color 0.3s;
}
.hud button:hover::after { border-color: var(--gold); transform: scale(1.35); }
.hud button.on::after { background: var(--gold); border-color: var(--gold); transform: scale(1.35); }
.hud-ring { display: none; }

/* ============================================================ mobile */
@media (max-width: 720px) {
  /* Stations stack vertically on phones: text above center, star mid,
     screenshot floating below — never cropped. The st-text wrapper
     dissolves so its children position exactly as before. */
  .station {
    min-height: 92vh;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center;
  }
  .st-text { display: contents; }
  .js .st-no, .js .station h2, .js .st-copy {
    opacity: 0;
    transition: transform 0.7s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.55s ease;
  }
  .beat.star.live .st-no, .beat.star.live h2, .beat.star.live .st-copy { opacity: 1; }
  .st-no { transform: translateY(-7rem); }
  .station h2 { transform: translateY(-5rem); font-size: 1.45rem; max-width: 16ch; }
  .st-copy { transform: translateY(-3.2rem); font-size: 14px; max-width: 90%; }
  .beat.star:not(.live) .st-no { transform: translateY(-3rem) scale(0.85); }
  .beat.star:not(.live) h2 { transform: translateY(-1.8rem) scale(0.85); }
  .beat.star:not(.live) .st-copy { transform: translateY(-1.5rem) scale(0.85); }
  .st-shot, .st-shot.wide {
    position: absolute; top: auto; bottom: 0;
    left: 50%; right: auto;
    max-width: 78vw; max-height: 34vh; width: auto;
    transform: translateX(-50%);
    /* filter: drop-shadow is a heavy GPU cost on phones — box-shadow is
       near-free and the composited page must not starve the WebGL canvas */
    filter: none;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.5);
  }
  body.dawn .st-shot { filter: none; box-shadow: 0 14px 30px rgba(39, 51, 64, 0.28); }
  .beat.star:not(.live) .st-shot,
  .beat.star:not(.live) .st-shot.wide { transform: translateX(-50%) translateY(10%) scale(0.9); }
  .hud {
    top: auto; bottom: 10px; right: 50%;
    transform: translateX(50%);
    flex-direction: row; gap: 6px;
    padding: 5px 10px; border-radius: 999px;
    background: rgba(15, 17, 21, 0.55); backdrop-filter: blur(6px);
  }
  body.dawn .hud { background: rgba(247, 247, 245, 0.7); }
  .hud button { width: 34px; height: 34px; }
  .hud button::after { inset: 11px; }
  /* Panels take the whole screen on phones — a side panel has nowhere to go */
  body.enhanced .panel-inner {
    width: 100%; padding: 12vh 20px 12vh;
  }
  body.enhanced #how .panel-close, body.enhanced #faq .panel-close {
    top: 14px; right: 14px; left: auto;
  }
  body.enhanced #how .panel-inner, body.enhanced #faq .panel-inner { border: none; }
  .chart-links a { min-width: 0; width: 100%; }
  .nav-panel { display: none; }
  .top a.quiet { display: none; }
  .cta footer { padding-bottom: 84px; }
}

/* ============================================================ static mode
   No WebGL / reduced motion / weak GPU: the page runs as an elegant
   long-form document. Same copy, same screenshots, same links. */
body.static #scene, body.static .star-labels, body.static .sky { display: none; }
body.static { background: linear-gradient(180deg, #232d38 0%, #12151a 60%, #0f1115 100%); }
body.static .beat { min-height: 0; padding-top: 10vh; padding-bottom: 10vh; }
body.static .beat.hero { padding-top: 18vh; min-height: 0; }
body.static .static-hero {
  display: block; width: min(320px, 60vw); margin: 6vh auto 0;
  filter: drop-shadow(0 0 44px rgba(200, 161, 90, 0.35));
}
body.static .hero { display: block; text-align: center; }
body.static .cue { display: none; }
body.static .hero-copy { margin: 0 auto; }
/* ---------------- support chat widget (dark chart theme) ---------------- */
#ca-s-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  border: 1px solid var(--gold-deep); border-radius: 24px; padding: 11px 19px;
  background: rgba(15, 17, 21, 0.82); color: var(--gold);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-size: 14.5px; font-weight: 600; cursor: pointer;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.65);
  transition: border-color 0.25s ease, background 0.25s ease;
}
#ca-s-fab:hover { border-color: var(--gold); background: rgba(28, 32, 39, 0.9); }
body.dawn #ca-s-fab, body.static #ca-s-fab {
  background: rgba(247, 247, 245, 0.92); color: #7c6229;
}
#ca-s-panel[hidden] { display: none; }
#ca-s-panel {
  position: fixed; right: 22px; bottom: 82px; z-index: 90;
  width: min(370px, calc(100vw - 44px)); height: min(480px, 68vh);
  display: flex; flex-direction: column;
  background: #14171c; border: 1px solid rgba(200, 161, 90, 0.3);
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 30px 70px -24px rgba(0, 0, 0, 0.8);
}
#ca-s-head {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(200, 161, 90, 0.12); color: var(--paper);
  font-family: var(--serif); letter-spacing: 0.05em; padding: 12px 16px;
  border-bottom: 1px solid rgba(200, 161, 90, 0.22);
}
#ca-s-head button { background: none; border: none; color: var(--paper); font-size: 20px; cursor: pointer; }
#ca-s-log { flex: 1; overflow-y: auto; padding: 14px; background: #14171c; }
.ca-s-msg {
  max-width: 86%; margin-bottom: 10px; padding: 9px 12px;
  border-radius: 12px; font-size: 14px; line-height: 1.45; white-space: pre-wrap;
}
.ca-s-user { margin-left: auto; background: var(--gold); color: var(--charcoal); border-bottom-right-radius: 4px; }
.ca-s-assistant { background: #1d222a; color: #e8e6e1; border: 1px solid #262c35; border-bottom-left-radius: 4px; }
#ca-s-form {
  display: flex; gap: 8px; padding: 10px;
  border-top: 1px solid #262c35; background: #171b21;
}
#ca-s-form input {
  flex: 1; border: 1px solid #2b323c; border-radius: 10px; background: #0f1218;
  color: var(--paper); padding: 9px 12px; font-size: 14px; outline: none;
}
#ca-s-form input:focus { border-color: var(--gold); }
#ca-s-form button {
  background: var(--gold); color: var(--charcoal); border: none;
  border-radius: 10px; padding: 9px 16px; font-weight: 600; cursor: pointer;
}
#ca-s-foot { font-size: 11px; color: var(--slate); padding: 7px 12px 10px; background: #171b21; }
#ca-s-foot a { color: var(--gold); }
/* Phones: the dot navigator owns the bottom strip, so lift the pill above it */
@media (max-width: 720px) {
  #ca-s-fab { bottom: 62px; right: 14px; padding: 9px 15px; font-size: 13.5px; }
  #ca-s-panel { bottom: 116px; right: 14px; height: min(440px, 60vh); }
}

/* Static mode: stations read as a plain document — no flare choreography */
body.static .station {
  min-height: 0; display: block; text-align: center;
}
body.static .st-text { display: block; max-width: 60ch; margin: 0 auto; text-align: center; }
body.static .st-text, body.static .st-shot,
body.static .station .st-no, body.static .station h2, body.static .station .st-copy {
  opacity: 1; transform: none; transition: none;
}
body.static .st-shot {
  position: static; margin: 22px auto 0;
  max-width: min(88vw, 520px); max-height: none; width: auto;
}
body.static .hud { display: none; }
body.static .beat.storage { background: var(--paper); color: var(--charcoal); }
body.static .beat.cta { min-height: 0; }

/* ================= document pages (compare, etc.) =================
   Same sky and header as the main site, but a calm reading column —
   no WebGL, so these stay fast and work everywhere. */
body.doc-page {
  background: var(--charcoal); color: var(--paper);
}
body.doc-page .sky {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(120% 90% at 78% 12%, rgba(138, 110, 51, 0.16), transparent 55%),
    radial-gradient(140% 110% at 30% 90%, #1a2129 0%, transparent 60%),
    linear-gradient(180deg, #232d38 0%, #12151a 45%, #0f1115 100%);
}
/* Static star dust — cheap, no canvas */
body.doc-page .sky::after {
  content: ''; position: absolute; inset: 0; opacity: 0.5;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 22%, rgba(255,250,235,0.9), transparent 60%),
    radial-gradient(1.2px 1.2px at 68% 14%, rgba(255,250,235,0.7), transparent 60%),
    radial-gradient(1.6px 1.6px at 82% 46%, rgba(226,186,120,0.8), transparent 60%),
    radial-gradient(1.1px 1.1px at 26% 61%, rgba(255,250,235,0.65), transparent 60%),
    radial-gradient(1.5px 1.5px at 45% 33%, rgba(255,250,235,0.55), transparent 60%),
    radial-gradient(1.2px 1.2px at 91% 77%, rgba(255,250,235,0.6), transparent 60%),
    radial-gradient(1.3px 1.3px at 8% 84%, rgba(226,186,120,0.55), transparent 60%),
    radial-gradient(1.1px 1.1px at 57% 89%, rgba(255,250,235,0.5), transparent 60%);
}
.doc-wrap {
  position: relative; z-index: 1;
  max-width: 880px; margin: 0 auto;
  padding: 15vh clamp(20px, 5vw, 48px) 12vh;
}
.doc-wrap h1 {
  font-family: var(--serif); font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.1; margin-bottom: 12px;
}
.doc-wrap .meta { color: var(--slate); font-size: 14.5px; margin-bottom: 40px; }
.doc-wrap h2 {
  font-family: var(--serif); font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin: 44px 0 14px;
}
.doc-wrap p { color: #c9cdd3; margin-bottom: 14px; }
.doc-wrap strong { color: var(--paper); }
.doc-summary {
  border: 1px solid rgba(200, 161, 90, 0.28); border-radius: 14px;
  background: rgba(255, 255, 255, 0.028);
  padding: 26px 28px; margin-bottom: 10px;
}
.doc-summary h3 {
  font-family: var(--serif); font-size: 1.15rem; color: var(--gold);
  margin-bottom: 12px;
}
.doc-summary ul { list-style: none; }
.doc-summary li {
  position: relative; padding-left: 22px; margin-bottom: 11px;
  color: #c9cdd3; font-size: 15.5px;
}
.doc-summary li::before {
  content: '✦'; position: absolute; left: 0; color: var(--gold-deep); font-size: 12px; top: 3px;
}
.doc-table { width: 100%; overflow-x: auto; margin: 8px 0 10px; }
.doc-table table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
.doc-table th, .doc-table td {
  text-align: left; padding: 12px 14px;
  border-bottom: 1px solid rgba(200, 161, 90, 0.16);
  vertical-align: top;
}
.doc-table th {
  font-family: var(--serif); font-weight: 600; color: var(--gold);
  border-bottom-color: rgba(200, 161, 90, 0.4);
}
.doc-table td:first-child { color: var(--slate); }
.doc-table tr:hover td { background: rgba(200, 161, 90, 0.05); }
.doc-cta { margin-top: 40px; display: flex; gap: 14px; flex-wrap: wrap; }
.doc-foot {
  margin-top: 8vh; padding-top: 22px;
  border-top: 1px solid rgba(200, 161, 90, 0.18);
  display: flex; gap: 22px; flex-wrap: wrap; align-items: center;
}
.doc-foot a { color: var(--slate); text-decoration: none; font-size: 14px; }
.doc-foot a:hover { color: var(--gold); }
.doc-legal { color: #6b7078; font-size: 12.5px; margin-top: 16px; line-height: 1.6; }
/* Sits above the headline so all three comparisons are visible at once —
   someone hunting the Evernote page shouldn't have to scroll an Obsidian
   page to the bottom to discover it exists. */
.doc-others {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 22px;
}
.doc-others-label {
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--slate);
}
.doc-others-set { display: flex; gap: 8px; flex-wrap: wrap; }
.doc-others a, .doc-others .current {
  border: 1px solid rgba(200, 161, 90, 0.3); border-radius: 999px;
  padding: 7px 16px; font-size: 13.5px; color: var(--paper);
  text-decoration: none; transition: border-color 0.25s, background 0.25s;
}
.doc-others a:hover { border-color: var(--gold); background: rgba(200, 161, 90, 0.1); }
.doc-others .current {
  background: var(--gold); border-color: var(--gold);
  color: var(--charcoal); font-weight: 600;
}
@media (max-width: 720px) {
  .doc-wrap { padding-top: 13vh; }
  .top .nav-panel { display: none; }
}
