/* ==========================================================================
   Oryx-VII marketing site — "Night Mission" identity
   Mission control for search: cold blue-black canvas, one ice-cyan signal,
   silver particle constellations, mono telemetry, huge confident type.
   EVERY color and font family lives in :root below. Nothing is hardcoded
   outside this block; swapping identity is a token edit.
   ========================================================================== */

:root {
  /* Canvas + surfaces */
  --bg:            #0B0D11;
  --surface:       #11141B;
  --surface-2:     #161A23;
  --pool:          #121722;                       /* raised heart of ambient light pools */
  --hairline:      rgba(233, 237, 244, 0.10);
  --hairline-lit:  rgba(233, 237, 244, 0.18);
  --hairline-hi:   rgba(233, 237, 244, 0.07);     /* inset top edge catching light */
  --lattice-dot:   rgba(233, 237, 244, 0.028);

  /* Ink */
  --ink:           #E9EDF4;
  --muted:         #8A93A3;

  /* Signal — the ONE accent */
  --signal:        #7DD6E8;
  --signal-hi:     #DFF6FC;
  --signal-dim:    #4F8D9C;
  --good:          #5ADFA0;
  --bad:           #F0647A;

  /* Signal derivatives (glow physics) */
  --glow-06:       rgba(125, 214, 232, 0.06);
  --glow-10:       rgba(125, 214, 232, 0.10);
  --glow-16:       rgba(125, 214, 232, 0.16);
  --glow-30:       rgba(125, 214, 232, 0.30);
  --glow-signal-shadow: 0 0 18px var(--glow-30);

  /* The approval pane: a cool light artifact on the dark console */
  --paper:         #EEF2F7;
  --paper-ink:     #14171D;
  --paper-muted:   #5C6472;
  --paper-border:  #C9D2DE;
  --paper-elev:
    0 18px 48px rgba(0, 0, 0, 0.55),
    0 2px 10px rgba(0, 0, 0, 0.4),
    0 0 44px var(--glow-06);

  /* Warm paper: the ONE warm element (the approval pane in the theater) */
  --paper-warm:        #FFFEF8;
  --paper-warm-border: #E7E1CE;

  /* Buttons: machined ice */
  --btn-grad: linear-gradient(180deg, #A9E5F1 0%, #7DD6E8 46%, #59BFD4 100%);
  --btn-ink:  #08151A;

  /* Luminous display-text gradient (white falling to signal) */
  --lum-hi:  #F4FBFE;
  --lum-mid: #E9EDF4;
  --lum-lo:  #9BDCEA;

  /* Shadows / elevation */
  --elev-card:
    inset 0 1px 0 var(--hairline-hi),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3),
    0 1px 2px rgba(0, 0, 0, 0.3),
    0 12px 32px rgba(0, 0, 0, 0.35);
  --elev-card-hover:
    inset 0 1px 0 var(--hairline-lit),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3),
    0 2px 4px rgba(0, 0, 0, 0.3),
    0 16px 40px rgba(0, 0, 0, 0.42);
  --scroll-thumb:       #232936;
  --scroll-thumb-hover: #2E3646;
  --sel-bg:  #24505C;
  --sel-ink: #EFFBFE;

  /* Typography — three voices */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-ui:      "Instrument Sans", system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, monospace;

  /* Rhythm + motion */
  --measure: 1140px;
  --pad-x: clamp(20px, 4.5vw, 48px);
  --section-pad: clamp(96px, 16vh, 220px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: dark;
}

/* ==========================================================================
   Base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  overflow-x: clip;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-color: var(--bg);
  background-image:
    radial-gradient(var(--lattice-dot) 1px, transparent 1.2px),
    radial-gradient(1100px 620px at 30% -14%, var(--glow-06) 0%, transparent 62%),
    radial-gradient(1400px 900px at 38% -16%, var(--pool) 0%, var(--bg) 62%);
  background-size: 28px 28px, auto, auto;
  background-attachment: fixed;
  /* clip, not hidden: hidden would make body a scroll container and
     silently break the theater's position: sticky pin */
  overflow-x: clip;
}

/* Whisper of grain so the dark field never bands */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

* { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border: 3px solid transparent;
  background-clip: padding-box;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background-color: var(--scroll-thumb-hover); background-clip: padding-box; }

::selection { background: var(--sel-bg); color: var(--sel-ink); }

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--glow-16);
  border-radius: 4px;
}

.tnum { font-variant-numeric: tabular-nums; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.measure {
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}
.measure-narrow { max-width: 840px; }

/* Luminous display text: white falling to signal */
.text-lum {
  background: linear-gradient(180deg, var(--lum-hi) 0%, var(--lum-mid) 52%, var(--lum-lo) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.glow-number { filter: drop-shadow(0 0 16px var(--glow-30)); }

/* ==========================================================================
   Links + buttons
   ========================================================================== */

a { color: var(--signal); }

.link-quiet {
  color: var(--ink);
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  background-image: linear-gradient(var(--signal), var(--signal));
  background-size: 0% 1px;
  background-position: 0 calc(100% - 1px);
  background-repeat: no-repeat;
  padding-bottom: 3px;
  transition: background-size 260ms var(--ease-out), color 150ms ease;
}
.link-quiet:hover { background-size: 100% 1px; color: var(--signal-hi); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-size: 14.5px;
  font-weight: 600;
  min-height: 46px;
  padding: 0 26px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transform: translate(var(--mag-x, 0px), var(--mag-y, 0px));
  transition: filter 150ms ease, box-shadow 150ms ease, transform 140ms var(--ease-out);
}
.btn-sm { min-height: 38px; padding: 0 18px; font-size: 13.5px; border-radius: 10px; }

.btn-primary {
  background: var(--btn-grad);
  color: var(--btn-ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15),
    0 1px 2px rgba(0, 0, 0, 0.35);
}
.btn-primary:hover {
  filter: brightness(1.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15),
    0 1px 2px rgba(0, 0, 0, 0.35),
    var(--glow-signal-shadow);
}
.btn:active { transform: translate(var(--mag-x, 0px), calc(var(--mag-y, 0px) + 1px)); }

/* Quiet button on the paper pane (static mock) */
.btn-paper-quiet {
  background: transparent;
  color: var(--paper-ink);
  border: 1px solid var(--paper-border);
  box-shadow: none;
}

/* ==========================================================================
   Nav — minimal fixed bar; hairline + blur backdrop arrives on scroll
   ========================================================================== */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: border-color 300ms ease, background-color 300ms ease, backdrop-filter 300ms ease;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--hairline);
}
.nav-inner {
  max-width: 1240px;
  margin-inline: auto;
  padding: 14px var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
}
.brand-word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.01em;
}
.brand-mark { width: 30px; height: 30px; display: block; }
.brand-mark-lg { width: 44px; height: 44px; }
.oryx-strokes path {
  stroke: var(--signal);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.oryx-eyes path {
  stroke: var(--signal-hi);
  stroke-width: 5.5;
  stroke-linecap: round;
}

/* ==========================================================================
   Hero — the engine as a body of light, headline inside its chamber
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 120px var(--pad-x) 80px;
}

.hero-heart {
  position: absolute;
  inset: 0;
  margin: auto;
  width: min(66vh, 78vw);
  height: min(66vh, 78vw);
  background: radial-gradient(50% 50% at 50% 50%, var(--glow-10), transparent 68%);
  pointer-events: none;
}

.orb-wrap {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  will-change: transform;
}
.orb-wrap canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* belt and braces with pointer-events: none above — a finger landing on
     the orb must always scroll the page on touch devices */
  touch-action: pan-y;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 920px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 26px;
}
.kicker::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 1px;
  background: var(--signal);
  vertical-align: middle;
  margin-right: 14px;
  opacity: 0.8;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(37px, 7.2vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0;
}

.hero-strap {
  max-width: 580px;
  font-size: clamp(15px, 1.35vw, 17px);
  line-height: 1.7;
  color: var(--muted);
  margin: 28px 0 0;
}

.cta-row {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 40px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-foot {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 1;
}
.scroll-word {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}
.scroll-line {
  width: 1px;
  height: 44px;
  background: linear-gradient(180deg, var(--signal), transparent);
  animation: scroll-pulse 2.6s ease-in-out infinite;
}
@keyframes scroll-pulse {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 1; }
}

/* Page-load choreography for the hero (marketing gets the full brief) */
.js .hero-inner > *,
.js .hero-foot {
  animation: rise 800ms var(--ease-out) both;
}
.js .hero-inner > :nth-child(1) { animation-delay: 80ms; }
.js .hero-inner > :nth-child(2) { animation-delay: 180ms; }
.js .hero-inner > :nth-child(3) { animation-delay: 300ms; }
.js .hero-inner > :nth-child(4) { animation-delay: 420ms; }
.js .hero-foot { animation-delay: 900ms; }
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.js .hero-foot { animation-name: rise-foot; }
@keyframes rise-foot {
  from { opacity: 0; transform: translate(-50%, 14px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ==========================================================================
   Sections — 12-20vh air, one head pattern
   ========================================================================== */

.section { padding-block: var(--section-pad); }
.section-tight { padding-block: clamp(80px, 12vh, 160px); }

.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 400;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  margin: 0 0 22px;
}
.section-head::before {
  content: "";
  width: 16px;
  height: 1px;
  background: var(--signal);
  opacity: 0.8;
  flex-shrink: 0;
}
.section-head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--hairline), transparent);
  min-width: 24px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(34px, 4.6vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin: 0;
  max-width: 20ch;
}
.section-title em {
  font-style: normal;
  color: var(--signal);
}

.section-lead {
  max-width: 560px;
  font-size: clamp(15px, 1.3vw, 16.5px);
  line-height: 1.7;
  color: var(--muted);
  margin: 24px 0 0;
}

/* ==========================================================================
   The Loop — horizontal instrument strip
   ========================================================================== */

.loop-strip {
  list-style: none;
  margin: clamp(56px, 8vh, 96px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--hairline);
}
.loop-step {
  position: relative;
  padding: 36px 28px 8px 0;
}
.loop-step + .loop-step { padding-left: 28px; border-left: 1px solid var(--hairline); }
.loop-step::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 40px;
  height: 1px;
  background: var(--signal);
  opacity: 0.85;
}
.loop-step + .loop-step::before { left: 28px; }

.loop-num {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(44px, 4.6vw, 68px);
  color: var(--signal-dim);
  opacity: 0.55;
  line-height: 1;
  transition: opacity 200ms ease, color 200ms ease;
}
.loop-step:hover .loop-num { opacity: 1; color: var(--signal); }
.loop-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 2.1vw, 28px);
  letter-spacing: -0.02em;
  margin: 24px 0 0;
}
.loop-copy {
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
  margin: 12px 0 0;
  max-width: 32ch;
}

/* ==========================================================================
   Proof strip — huge tabular figures over hairlines
   ========================================================================== */

.proof-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: end;
  padding: clamp(40px, 6vh, 64px) 0;
  border-bottom: 1px solid var(--hairline);
}
.proof-row:first-of-type { border-top: 1px solid var(--hairline); margin-top: clamp(40px, 6vh, 72px); }

.proof-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(58px, 9vw, 132px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
}
.proof-a { color: var(--muted); }
.proof-arrow {
  color: var(--signal);
  font-size: 0.52em;
  margin: 0 0.18em;
  transform: translateY(-0.28em);
}
.proof-plus { color: var(--signal); }

.proof-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--signal-dim);
  margin: 0 0 12px;
}
.proof-copy {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
  max-width: 44ch;
}

/* ==========================================================================
   Integrations — typographic wordmark chips, muted until touched
   ========================================================================== */

.stack-grid {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: clamp(40px, 6vh, 64px) 0 0;
  padding: 0;
}
.stack-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 54px;
  padding: 0 28px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  white-space: nowrap;
  transition: transform 200ms var(--ease-out), color 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}
.stack-chip::after {
  content: "";
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 12px;
  height: 1px;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 300ms var(--ease-out);
}
.stack-chip:hover {
  transform: translateY(-3px);
  color: var(--ink);
  border-color: var(--hairline-lit);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}
.stack-chip:hover::after { transform: scaleX(1); }
.stack-note {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.7;
  margin: 26px 0 0;
}

/* ==========================================================================
   GEO — dark card trio
   ========================================================================== */

.geo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: clamp(48px, 7vh, 88px);
}
/* break the symmetry: the middle card settles lower on wide screens */
@media (min-width: 981px) {
  .geo-card:nth-child(2) { margin-top: 32px; }
}
.geo-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 30px 28px 34px;
  box-shadow: var(--elev-card);
  transition: box-shadow 150ms ease, border-color 150ms ease, transform 150ms ease;
}
.geo-card:hover {
  box-shadow: var(--elev-card-hover);
  border-color: var(--hairline-lit);
  transform: translateY(-2px);
}
.card-kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--signal);
  margin: 0;
}
.card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin: 16px 0 0;
}
.card-copy {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
  margin: 12px 0 0;
}

/* ==========================================================================
   Human gate — the approval desk, paper on the dark console
   ========================================================================== */

.gate-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.gate-note {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--signal);
  margin: 30px 0 0;
}

.gate-visual { position: relative; }

.paper-ghost {
  position: absolute;
  inset: 0;
  transform: rotate(3.2deg) translate(14px, -16px);
  background: color-mix(in srgb, var(--paper) 82%, var(--bg));
  border: 1px solid var(--paper-border);
  border-radius: 16px;
  opacity: 0.5;
  padding: 26px 30px;
  overflow: hidden;
}
.paper-ghost-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.4;
  color: var(--paper-muted);
  margin: 14px 0 0;
}

.paper-pane {
  position: relative;
  background: var(--paper);
  color: var(--paper-ink);
  border: 1px solid var(--paper-border);
  border-radius: 16px;
  padding: clamp(24px, 3vw, 36px) clamp(24px, 3.2vw, 40px) clamp(26px, 3vw, 36px);
  box-shadow: var(--paper-elev);
}
.paper-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper-muted);
  margin: 0;
}
.lamp {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 8px var(--glow-30);
  animation: lamp-pulse 1.8s ease-in-out infinite;
}
@keyframes lamp-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}
.paper-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(21px, 2.2vw, 27px);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 18px 0 0;
}
.paper-excerpt {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--paper-muted);
  margin: 14px 0 0;
}
.paper-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--paper-muted);
  margin: 20px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--paper-border);
}
.paper-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* ==========================================================================
   FAQ — hairline ledger of honest answers
   ========================================================================== */

.faq-list {
  margin-top: clamp(40px, 6vh, 64px);
  border-top: 1px solid var(--hairline);
}
.faq-item { border-bottom: 1px solid var(--hairline); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 4px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(17px, 1.7vw, 20px);
  letter-spacing: -0.01em;
  transition: color 150ms ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 400;
  color: var(--signal);
  flex-shrink: 0;
  transition: transform 300ms var(--ease-out);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { color: var(--signal-hi); }
.faq-item p {
  margin: 0;
  padding: 0 4px 26px;
  max-width: 62ch;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.75;
}

/* ==========================================================================
   Access — the closing band
   ========================================================================== */

.access {
  position: relative;
  overflow: hidden;
}
.access::before {
  content: "";
  position: absolute;
  inset: auto 0 -40%;
  height: 90%;
  background: radial-gradient(60% 100% at 50% 100%, var(--glow-10), transparent 70%);
  pointer-events: none;
}
.access-inner {
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.access-inner .section-head { align-self: stretch; justify-content: center; }
.access-inner .section-head::before,
.access-inner .section-head::after { flex: 1; background: linear-gradient(90deg, transparent, var(--hairline)); }
.access-inner .section-head::after { background: linear-gradient(90deg, var(--hairline), transparent); }
.access-inner .section-lead { margin-inline: auto; }

.access-form {
  display: flex;
  gap: 12px;
  margin-top: 40px;
  width: 100%;
  max-width: 620px;
}
.access-form input {
  flex: 1;
  min-width: 0;
  font-family: var(--font-ui);
  font-size: 14.5px;
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 12px 16px;
  min-height: 46px;
  transition: border-color 150ms ease;
}
.access-form input::placeholder { color: var(--muted); }
.access-form input:focus {
  outline: none;
  border-color: var(--signal);
  box-shadow: 0 0 0 4px var(--glow-16);
}
.access-status {
  min-height: 24px;
  margin: 18px 0 0;
  font-size: 14px;
  color: var(--muted);
}
.access-status a { color: var(--signal); }
.access-status.is-good { color: var(--good); }
.access-status.is-bad { color: var(--bad); }

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  border-top: 1px solid var(--hairline);
  padding: 56px 0 40px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 16px; }
.footer-word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  margin: 0;
}
.footer-strap {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 6px 0 0;
}
.footer-meta {
  display: flex;
  align-items: center;
  gap: 28px;
}
.footer-uae {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.footer-legal {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
}
.footer-legal p {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0;
  opacity: 0.75;
}

/* ==========================================================================
   Scroll reveals — once, translateY + opacity, the one entrance curve
   ========================================================================== */

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 700ms var(--ease-out) var(--d, 0ms),
    transform 900ms var(--ease-out) var(--d, 0ms);
}
.js .reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 980px) {
  .loop-strip { grid-template-columns: 1fr 1fr; }
  .loop-step { border-left: none !important; padding-left: 0 !important; border-top: 1px solid var(--hairline); margin-top: -1px; }
  .loop-step::before { left: 0 !important; }
  .loop-strip { border-top: none; }
  .geo-grid { grid-template-columns: 1fr; max-width: 560px; }
  .gate-grid { grid-template-columns: 1fr; gap: 64px; }
  .gate-visual { max-width: 560px; }
}

@media (max-width: 640px) {
  /* Phones: the display line must wrap naturally, never clip. */
  .hero-title { font-size: clamp(30px, 10.5vw, 42px); }
  .hero-title br { display: none; }
  .section-title { font-size: clamp(26px, 8.5vw, 36px); }
  .section-title br { display: none; }
  .nav-inner { padding-left: 16px; padding-right: 16px; }
  .nav .btn { padding: 9px 14px; font-size: 13px; }
  .loop-strip { grid-template-columns: 1fr; }
  .proof-row { grid-template-columns: 1fr; align-items: start; gap: 18px; }
  .access-form { flex-direction: column; }
  .access-form .btn { width: 100%; }
  .cta-row { gap: 20px; }
  .hero { padding-top: 104px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .paper-ghost { transform: rotate(2.4deg) translate(8px, -10px); }
}

/* ==========================================================================
   Reduced motion — everything collapses
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* The loop, with proof: each move beside its actual screen. */
.loop-rows { list-style: none; margin: 64px 0 0; padding: 0; display: flex; flex-direction: column; gap: 96px; }
.loop-row { display: flex; align-items: center; gap: 56px; }
.loop-row-flip { flex-direction: row-reverse; }
.loop-text { flex: 0 0 300px; }
.loop-shot { flex: 1; min-width: 0; margin: 0; border: 1px solid var(--hairline); border-radius: 14px; overflow: hidden; background: color-mix(in srgb, var(--ink) 3%, var(--bg)); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), inset 0 1px 0 var(--hairline); }
.loop-shot img { display: block; width: 100%; height: auto; }
.shot-chrome { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--hairline); }
.shot-chrome i { width: 8px; height: 8px; border-radius: 50%; background: color-mix(in srgb, var(--muted) 40%, transparent); }

/* Static keyword-research card (fallback rows): mono ledger, no heavy asset */
.kwcard { padding: 26px 30px 28px; }
.kwcard-head {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--signal-dim);
  margin: 0 0 14px;
}
.kwcard-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 2px;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}
.kwcard-row:first-of-type { border-top: 1px solid var(--hairline); }
.kwcard-row b { font-weight: 400; color: var(--ink); }
.kwcard-row.is-pick b { color: var(--signal); }
.kwcard-row.is-pick span { color: var(--signal-dim); }
.kwcard-foot {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--signal);
  margin: 16px 0 0;
}
@media (max-width: 900px) {
  .loop-row, .loop-row-flip { flex-direction: column; align-items: stretch; gap: 20px; }
  .loop-text { flex: none; }
  .loop-rows { gap: 64px; }
}


/* ==========================================================================
   The Loop theater — six full-viewport cinematic beats scrubbed by scroll.
   Apple product-page grammar: the whole screen is the scene, one thought at
   a time, enormous display type, the pseudo-interface as large center-stage
   props. main.js writes only transform / opacity / clip-path (plus counting
   numbers) as a pure function of scroll progress, so scrubbing back rewinds.
   Runs at every width, phones included; .loop-rows above stay as the
   fallback for reduced-motion and no-JS only.
   ========================================================================== */

.theater { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .js .theater { display: block; }
  .js #loop .loop-rows { display: none; }
}
/* ?chapter=n debug: freeze one beat's end state, pinned fullscreen */
.theater-debug .theater { display: block !important; }
.theater-debug #loop .loop-rows { display: none !important; }
.theater-debug .theater-pin { position: fixed !important; inset: 0; z-index: 150; background: var(--bg); }

.theater { height: 600vh; }
.theater-pin {
  position: sticky;
  top: 0;
  /* dvh, not vh: the iOS URL bar collapse resizes the visual viewport, and a
     100vh pin would leave the dots clipped below the fold while the bar shows */
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* --- a beat: one full-screen scene ---------------------------------------- */

.beat {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 9vh 5vw 10vh;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  user-select: none;
  will-change: transform, opacity;
}
.beat-head {
  text-align: center;
  transform-origin: 50% 0;
}
.beat-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--signal-dim);
  margin: 0 0 22px;
}
.beat-kicker::before, .beat-kicker::after {
  content: "";
  display: inline-block;
  width: 18px;
  height: 1px;
  background: var(--hairline-lit);
  vertical-align: middle;
}
.beat-kicker::before { margin-right: 16px; }
.beat-kicker::after { margin-left: 16px; }
.beat-line {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 6.4vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin: 0;
  max-width: 16ch;
}
.beat-line em { font-style: normal; color: var(--signal); }
.beat-body {
  flex: 1;
  min-height: 0;
  width: min(1120px, 92vw);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 3vh;
}

/* typing primitive: text pre-rendered, revealed with clip-path */
.typewrap { position: relative; display: inline-block; }
.typer { display: inline-block; clip-path: inset(-20% 100% -20% 0); }
[dir="rtl"] .typer { clip-path: inset(-20% 0 -20% 100%); }
.caret {
  position: absolute;
  left: 0; top: 6%; bottom: 6%;
  width: 2px;
  background: var(--signal);
  opacity: 0;
}
[dir="rtl"] .caret { left: auto; right: 0; }

/* --- beat 01: scan --------------------------------------------------------- */

.scan-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: clamp(48px, 7vw, 110px);
  align-items: center;
  width: 100%;
}
.scan-url {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--ink);
  margin: 0 0 8px;
}
.scan-proto { color: var(--muted); opacity: 0.6; }
.ledger { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hairline); }
.ledger-row {
  display: grid;
  grid-template-columns: 132px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px 2px;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 13px;
  opacity: 0;
  visibility: hidden;
}
.ledger-path { color: var(--ink); }
.ledger-issue { font-size: 11px; letter-spacing: 0.05em; color: var(--bad); opacity: 0; }
.ledger-issue.is-ok { color: color-mix(in srgb, var(--muted) 55%, transparent); }
.ledger-chip {
  justify-self: end;
  min-width: 46px;
  text-align: center;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 12px;
}
.ledger-chip.is-bad {
  color: var(--bad);
  border-color: color-mix(in srgb, var(--bad) 40%, transparent);
  background: color-mix(in srgb, var(--bad) 12%, transparent);
}
.scan-status {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--signal);
  margin: 18px 0 0;
  opacity: 0;
  visibility: hidden;
}
.scan-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}
.dial-wrap {
  position: relative;
  width: clamp(190px, 30vh, 290px);
  aspect-ratio: 1;
  transition: filter 300ms ease;
}
.dial-wrap.is-glow { filter: drop-shadow(0 0 26px color-mix(in srgb, var(--good) 40%, transparent)); }
.dial { width: 100%; height: 100%; display: block; }
.dial-track { fill: none; stroke: var(--hairline-lit); stroke-width: 2.5; }
.dial-arc {
  fill: none;
  stroke: var(--good);
  stroke-width: 3.5;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: center;
  transform-box: fill-box;
}
.dial-letter {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(60px, 10vh, 96px);
  color: var(--good);
  opacity: 0;
  visibility: hidden;
}
.dial-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

/* --- beat 02: keyword research ---------------------------------------------- */

.keys-stage { width: min(760px, 90vw); }
.keys-head {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--signal-dim);
  margin: 0 0 16px;
  opacity: 0;
  visibility: hidden;
}
.keys-list {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--hairline);
}
.keys-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 20px;
  align-items: center;
  padding: 14px 14px;
  border: 1px solid transparent;
  border-bottom-color: var(--hairline);
  border-radius: 12px;
  font-family: var(--font-mono);
  opacity: 0;
  visibility: hidden;
  transition: background-color 300ms ease, border-color 300ms ease, box-shadow 300ms ease;
  will-change: transform, opacity;
}
.keys-term { font-size: 15px; color: var(--ink); }
.keys-vol { font-size: 12px; color: var(--muted); }
.keys-vol b { font-weight: 400; color: var(--ink); font-size: 14px; }
.keys-kd {
  justify-self: end;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 11px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--surface-2);
  color: var(--muted);
  opacity: 0;
}
.keys-kd[data-kd="easy"] {
  color: var(--good);
  border-color: color-mix(in srgb, var(--good) 35%, transparent);
  background: color-mix(in srgb, var(--good) 9%, transparent);
}
.keys-kd[data-kd="hard"] {
  color: var(--bad);
  border-color: color-mix(in srgb, var(--bad) 35%, transparent);
  background: color-mix(in srgb, var(--bad) 9%, transparent);
}
.keys-row.is-win {
  z-index: 2;
  background: var(--surface);
  border-color: color-mix(in srgb, var(--signal) 45%, transparent);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.5), 0 0 26px var(--glow-16), inset 0 1px 0 var(--hairline-hi);
}
.keys-row.is-win .keys-term { color: var(--signal-hi); }
.keys-row.is-win .keys-vol, .keys-row.is-win .keys-vol b { color: var(--signal); }
.keys-verdict {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--signal);
  margin: 18px 0 0;
  opacity: 0;
  visibility: hidden;
}

/* --- beat 03: write --------------------------------------------------------- */

.write-stage { width: min(860px, 90vw); }
.topic-chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--signal);
  border: 1px solid var(--hairline-lit);
  background: var(--surface);
  border-radius: 999px;
  padding: 7px 16px;
  margin: 0 0 26px;
  opacity: 0;
  visibility: hidden;
}
.draft-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 2.5vw, 36px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
  margin: 0 0 18px;
  white-space: nowrap;
  overflow: hidden;
}
.draft-line { position: relative; height: 24px; margin: 11px 0; }
.draft-line span {
  display: block;
  max-width: var(--lw, 100%);
  font-size: 15.5px;
  line-height: 24px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  opacity: 0;
}
.draft-line .bar {
  position: absolute;
  inset: 3px auto 3px 0;
  width: var(--lw, 100%);
  border-radius: 5px;
  background: linear-gradient(90deg, var(--glow-06), var(--glow-16), var(--glow-06));
  background-size: 220% 100%;
  animation: bar-shimmer 1.3s linear infinite;
  transform: scaleX(0);
  transform-origin: left;
  opacity: 0;
}
[dir="rtl"] .draft-line .bar { inset: 3px 0 3px auto; transform-origin: right; }
@keyframes bar-shimmer {
  from { background-position: 120% 0; }
  to   { background-position: -120% 0; }
}
.draft-ar {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  opacity: 0;
  visibility: hidden;
}
.draft-flag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--signal);
  margin: 0 0 12px;
  text-align: right;
}

/* --- beat 04: approve — warm paper, the ONE warm element -------------------- */

.approve-stage { position: relative; width: min(640px, 90vw); }
.mpaper {
  position: relative;
  background: var(--paper-warm);
  color: var(--paper-ink);
  border: 1px solid var(--paper-warm-border);
  border-radius: 16px;
  padding: 24px 30px 26px;
  box-shadow: var(--paper-elev);
  opacity: 0;
  visibility: hidden;
}
.mpaper-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper-muted);
  margin: 0;
}
.mlamp {
  flex: none;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 8px var(--glow-30);
  transition: background-color 250ms ease, box-shadow 250ms ease;
}
.mlamp.is-good {
  background: var(--good);
  box-shadow: 0 0 10px color-mix(in srgb, var(--good) 55%, transparent);
}
.mstate { position: relative; display: block; flex: 1; height: 14px; }
.mstate span {
  position: absolute;
  left: 0; top: 0;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
}
.mstate .is-hot { color: var(--signal-dim); }
.mpaper-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 2.2vw, 30px);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 14px 0 0;
}
.mpaper-x { position: relative; min-height: 66px; margin-top: 10px; }
.mpaper-excerpt {
  position: absolute;
  inset: 0;
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--paper-muted);
  opacity: 0;
  visibility: hidden;
}
.mpaper-comment {
  margin-top: 12px;
  padding: 8px 12px 9px;
  border: 1px solid var(--paper-warm-border);
  border-radius: 8px;
  opacity: 0;
  visibility: hidden;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
.mpaper-comment.is-live {
  border-color: var(--signal);
  box-shadow: 0 0 0 3px var(--glow-10);
}
.mpaper-comment-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--paper-muted);
  margin-bottom: 3px;
}
.mpaper-comment .typewrap {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--paper-ink);
}
.mpaper-actions { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.mbtn {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 9px;
  transition: transform 120ms ease, filter 120ms ease;
}
.mbtn.is-press { transform: scale(0.93); filter: brightness(0.88); }
.mbtn-approve {
  background: var(--btn-grad);
  color: var(--btn-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.mbtn-quiet { border: 1px solid var(--paper-warm-border); color: var(--paper-ink); }
.mbtn-reject { color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent); }
.mpaper-stamp {
  position: absolute;
  top: 18px; right: 22px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--good);
  border: 1px solid color-mix(in srgb, var(--good) 45%, transparent);
  background: color-mix(in srgb, var(--good) 10%, transparent);
  border-radius: 999px;
  padding: 4px 11px;
  opacity: 0;
  visibility: hidden;
}
.mpaper-shimmer {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: linear-gradient(100deg, transparent 32%, rgba(255, 255, 255, 0.75) 50%, transparent 68%);
  background-size: 240% 100%;
  animation: bar-shimmer 1.1s linear infinite;
  opacity: 0;
  visibility: hidden;
}
.gcursor {
  position: absolute;
  left: 0; top: 0;
  z-index: 5;
  opacity: 0;
  visibility: hidden;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
}
.gcursor path { fill: var(--ink); stroke: var(--bg); stroke-width: 1.4; }

/* --- beat 05: publish -------------------------------------------------------- */

.publish-stage {
  width: min(960px, 88vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: flex-start;
}
.term-line {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--ink);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
}
.term-prompt { color: var(--signal); }
.term-track {
  width: min(540px, 56vw);
  height: 2px;
  border-radius: 999px;
  background: var(--surface-2);
  margin: 18px 0 16px;
  overflow: hidden;
}
.term-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--signal-dim), var(--signal));
  box-shadow: 0 0 10px var(--glow-30);
  transform: scaleX(0);
  transform-origin: left;
}
.term-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: clamp(20px, 3vw, 40px);
}
.term-steps li {
  position: relative;
  padding-left: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  opacity: 0.35;
  transition: opacity 250ms ease, color 250ms ease;
}
.term-steps li::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 6px; height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  border: 1px solid var(--hairline-lit);
  transition: background-color 250ms ease, border-color 250ms ease, box-shadow 250ms ease;
}
.term-steps li.is-on { opacity: 1; color: var(--ink); }
.term-steps li.is-on::before {
  background: var(--good);
  border-color: var(--good);
  box-shadow: 0 0 8px color-mix(in srgb, var(--good) 55%, transparent);
}
.term-hash { color: var(--signal-dim); margin-left: 9px; }

.pubwin {
  width: 100%;
  height: min(52vh, 520px);
  margin-top: 4vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--hairline-lit);
  border-radius: 14px;
  box-shadow: 0 44px 120px rgba(0, 0, 0, 0.65), inset 0 1px 0 var(--hairline);
  overflow: hidden;
  transform: translateY(64vh);
  opacity: 0;
  visibility: hidden;
  will-change: transform, opacity;
}
.pub-bar {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  padding: 11px 14px;
  border-bottom: 1px solid var(--hairline);
  background: color-mix(in srgb, var(--surface) 60%, var(--bg));
}
.pub-dots { display: flex; gap: 6px; }
.pub-dots i {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--muted) 40%, transparent);
}
.pub-url {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 7px;
  padding: 4px 18px;
  white-space: nowrap;
}
.pubwin-view { flex: 1; min-height: 0; }
.pubwin-view img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* --- beat 06: measure ---------------------------------------------------------- */

.measure-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: min(860px, 90vw);
}
.mnum {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(96px, 12vw, 176px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin: 0;
  transition: color 300ms ease, text-shadow 300ms ease;
}
.mnum.is-good {
  color: var(--good);
  text-shadow: 0 0 44px color-mix(in srgb, var(--good) 35%, transparent);
}
.measure-stage .dial-label { margin-top: 14px; }
.mdelta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--good);
  margin: 10px 0 0;
  opacity: 0;
  visibility: hidden;
}
.mcite {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  padding: 11px 18px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--elev-card);
  opacity: 0;
  visibility: hidden;
  text-align: left;
}
.mcite-lamp {
  flex: none;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--hairline-lit);
  transition: background-color 250ms ease, box-shadow 250ms ease;
}
.mcite-lamp.is-on {
  background: var(--good);
  border-color: var(--good);
  box-shadow: 0 0 14px color-mix(in srgb, var(--good) 55%, transparent);
}
.mcite-text {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1.55;
}
.mcite-text span {
  display: block;
  font-size: 9px;
  text-transform: none;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.mspark { width: min(720px, 74vw); margin-top: 3.5vh; }
.mspark svg { display: block; width: 100%; height: 64px; }
.mspark-line { fill: none; stroke: var(--signal); stroke-width: 1.6; }
.mspark-area { fill: var(--glow-10); opacity: 0; }
.mspark-axis {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin: 8px 0 0;
}
.mfinal {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--signal);
  margin: 3.5vh 0 0;
  opacity: 0;
  visibility: hidden;
}

/* --- progress dots ---------------------------------------------------------- */

.beat-dots {
  position: absolute;
  bottom: 4.5vh;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 13px;
}
.beat-dots i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--hairline-lit);
  cursor: pointer;
  transition: background-color 250ms ease, box-shadow 250ms ease, border-color 250ms ease;
}
.beat-dots i.is-on {
  background: var(--signal);
  border-color: var(--signal);
  box-shadow: 0 0 10px var(--glow-30);
}

/* --- phones: the same film, recomposed for a ~390px stage -------------------
   Display type at ~9vw balances to two lines; every prop goes (near) full
   width; each beat's full scene clears 390x740 with the dots visible. */
@media (max-width: 899px) {
  /* top padding clears the fixed nav (~64px), which stays over the pin */
  .beat { padding: max(72px, 8vh) 5vw calc(6.5vh + env(safe-area-inset-bottom)); }
  .beat-kicker { font-size: 9.5px; letter-spacing: 0.26em; margin-bottom: 12px; }
  .beat-kicker::before, .beat-kicker::after { width: 12px; }
  .beat-kicker::before { margin-right: 10px; }
  .beat-kicker::after { margin-left: 10px; }
  .beat-line {
    font-size: clamp(24px, 9.2vw, 38px);
    line-height: 1.06;
    max-width: none;
    text-wrap: balance;
  }
  .beat-body { margin-top: 2vh; width: 100%; }

  /* 01 scan: single column; ledger full width, the dial beneath it */
  .scan-stage { grid-template-columns: 1fr; gap: 16px; }
  .scan-url { font-size: 13px; margin-bottom: 6px; }
  .ledger-row { grid-template-columns: minmax(96px, max-content) 1fr auto; gap: 10px; padding: 8px 2px; font-size: 11.5px; }
  .ledger-issue { font-size: 9.5px; letter-spacing: 0.03em; }
  .ledger-chip { min-width: 38px; padding: 1px 8px; font-size: 11px; }
  .scan-status { margin-top: 10px; font-size: 9.5px; letter-spacing: 0.14em; }
  .scan-right { gap: 12px; }
  .dial-wrap { width: clamp(132px, 30vh, 230px); }
  .dial-letter { font-size: clamp(44px, 9vh, 76px); }
  .dial-label { font-size: 9.5px; }

  /* 02 keywords: two-deck rows, the query on its own line */
  .keys-stage { width: 100%; }
  .keys-head { font-size: 9px; letter-spacing: 0.14em; margin-bottom: 12px; }
  .keys-row { grid-template-columns: 1fr auto; gap: 3px 12px; padding: 10px 8px; }
  .keys-term { grid-column: 1 / -1; font-size: 13px; }
  .keys-vol { font-size: 10.5px; }
  .keys-vol b { font-size: 12.5px; }
  .keys-kd { font-size: 9px; padding: 2px 9px; }
  .keys-verdict { font-size: 9px; letter-spacing: 0.12em; margin-top: 14px; }

  /* 03 write: draft type sized so the full titles still fit one line */
  .write-stage { width: 100%; }
  .topic-chip { font-size: 8.5px; letter-spacing: 0.12em; padding: 6px 12px; margin-bottom: 16px; }
  .draft-title { font-size: 15px; }
  .draft-line { height: 20px; margin: 8px 0; }
  .draft-line span { font-size: 12px; line-height: 20px; }
  .draft-ar { margin-top: 20px; padding-top: 16px; }

  /* 04 approve: the paper pane near full width */
  .approve-stage { width: 100%; }
  .mpaper { padding: 18px 18px 20px; border-radius: 14px; }
  .mpaper-title { font-size: 19px; }
  .mpaper-x { min-height: 92px; }
  .mpaper-excerpt { font-size: 12.5px; }
  .mpaper-comment .typewrap { font-size: 11px; }
  .mpaper-actions { flex-wrap: wrap; gap: 8px; margin-top: 14px; }
  .mbtn { font-size: 12px; padding: 7px 14px; }
  .mpaper-stamp { top: 12px; right: 14px; font-size: 9px; }

  /* 05 publish: browser mock full width; the URL pill flows, never overlaps */
  .publish-stage { width: 100%; }
  .term-line { font-size: 12.5px; }
  .term-track { width: 100%; margin: 14px 0 12px; }
  .term-steps { flex-wrap: wrap; justify-content: center; gap: 8px 18px; }
  .term-steps li { font-size: 10px; }
  .pubwin { height: min(42vh, 420px); margin-top: 2.5vh; }
  .pub-url {
    position: static;
    transform: none;
    margin-left: 10px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 9px;
    padding: 3px 9px;
  }

  /* 06 measure: the numerals stay huge but inside the frame */
  .mnum { font-size: clamp(76px, 26vw, 120px); }
  .measure-stage .dial-label { margin-top: 10px; }
  .mdelta { font-size: 10px; }
  .mcite { gap: 10px; padding: 10px 14px; margin-top: 16px; }
  .mcite-text { font-size: 9.5px; }
  .mspark { width: 100%; margin-top: 2.5vh; }
  .mspark svg { height: 52px; }
  .mfinal { font-size: 9.5px; letter-spacing: 0.18em; margin-top: 2.5vh; }

  /* progress dots: smaller, lifted clear of the home indicator */
  .beat-dots { bottom: calc(12px + env(safe-area-inset-bottom)); gap: 10px; }
  .beat-dots i { width: 5px; height: 5px; }
}

/* short viewports: keep the scene inside the frame */
@media (min-width: 900px) and (max-height: 760px) {
  .beat { padding-top: 7vh; }
  .beat-line { font-size: clamp(36px, 5.6vw, 76px); }
  .draft-line { height: 21px; margin: 9px 0; }
  .draft-line span { font-size: 14px; line-height: 21px; }
  .mnum { font-size: clamp(80px, 10vw, 140px); }
}
