/* ============================================================
   RELAY — one canvas (28 Sep 2026 restyle)
   One dark surface from the first line to the footer; nothing is
   cut into bands. The product is the only lit thing on it (the
   instrument panels); documents and forms sit on a paper sheet.

   Token names are kept from the 18 Sep design so the component
   rules did not have to change: on the canvas `--paper` IS the
   dark canvas and `--ink` the light text; inside `.sheet` the same
   names flip to paper values. `--jade` / `--amber` mean state
   (sent / held), never decoration.
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root {
  /* The canvas */
  --paper:        #0A0D0F;
  --paper-lift:   #12171A;
  --paper-sink:   #0E1214;
  --ink:          #ECEFED;
  --ink-mute:     #A3ACA8;
  --ink-faint:    #6C7672;
  --rule:         rgba(236, 239, 237, 0.12);
  --rule-soft:    rgba(236, 239, 237, 0.06);

  /* Instrument panels (the product) */
  --panel:        #12171A;
  --panel-lift:   #171D21;
  --panel-high:   #1F262B;
  --panel-text:   #ECEFED;
  --panel-mute:   #9AA49F;
  --panel-faint:  #66706C;
  --panel-rule:   rgba(236, 239, 237, 0.10);
  --panel-rule-2: rgba(236, 239, 237, 0.05);

  /* Signal — state only */
  --jade:         #2FE0A6;
  --jade-lit:     #2FE0A6;
  --amber:        #F0B44A;
  --amber-lit:    #F0B44A;
  /* Light — the colour of the canvas's light sources (never text, never state) */
  --light-jade:   rgba(47, 224, 166, 0.30);
  --light-teal:   rgba(34, 200, 216, 0.22);
  --light-amber:  rgba(240, 180, 74, 0.16);

  /* Type */
  --display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --body:    'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono:    'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Rhythm */
  --shell:     1240px;
  --gutter:    40px;
  --section-y: clamp(88px, 11vw, 168px);

  /* Motion */
  --ease:      cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --fast:      180ms;
  --mid:       340ms;
}

/* A document or form surface: the same glass as the instrument panels,
   so the long-text pages and the forms sit on the canvas like everything
   else (28 Sep 2026: the paper sheet was dropped — Arnold). */
.sheet {
  background: rgba(18, 23, 26, 0.72);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--rule);
  border-radius: 6px;
  box-shadow: 0 50px 90px -50px rgba(0, 0, 0, 0.75);
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--paper); color-scheme: dark; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  font-feature-settings: 'ss01' 1;
  position: relative;
  z-index: 0;
}

/* ---------- 2a. The light ----------
   Three soft light sources behind everything, fixed to the viewport and
   moved by the scroll position (CSS scroll-driven animation), so the colour
   travels down the page with the reader instead of sitting in one band.
   Browsers without scroll timelines keep them still. A film of grain on
   top stops the gradients banding and keeps the surface from looking flat. */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.aurora i {
  position: absolute;
  display: block;
  border-radius: 50%;
  will-change: transform;
}
.aurora__a {
  width: max(64vw, 560px); height: max(64vw, 560px);
  left: -18vw; top: -34vw;
  background: radial-gradient(circle at 50% 50%, var(--light-jade), rgba(47, 224, 166, 0) 64%);
}
.aurora__b {
  width: max(50vw, 460px); height: max(50vw, 460px);
  right: -18vw; top: 14vh;
  background: radial-gradient(circle at 50% 50%, var(--light-teal), rgba(34, 200, 216, 0) 64%);
}
.aurora__c {
  width: max(48vw, 420px); height: max(48vw, 420px);
  left: 18vw; bottom: -30vw;
  background: radial-gradient(circle at 50% 50%, var(--light-amber), rgba(240, 180, 74, 0) 64%);
}
/* animation-range in the test too: a browser that ships timelines behind a
   flag without ranges (Firefox, Sep 2026) then keeps the lights still. */
@supports ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
  .aurora__a { animation: auroraA linear both; animation-timeline: scroll(root); }
  .aurora__b { animation: auroraB linear both; animation-timeline: scroll(root); }
  .aurora__c { animation: auroraC linear both; animation-timeline: scroll(root); }
  @keyframes auroraA {
    0%   { transform: translate3d(0, 0, 0); }
    45%  { transform: translate3d(30vw, 38vh, 0); }
    100% { transform: translate3d(4vw, 92vh, 0); }
  }
  @keyframes auroraB {
    0%   { transform: translate3d(0, 0, 0); }
    50%  { transform: translate3d(-34vw, -8vh, 0); }
    100% { transform: translate3d(-64vw, 34vh, 0); }
  }
  @keyframes auroraC {
    0%   { transform: translate3d(0, 12vh, 0); }
    55%  { transform: translate3d(22vw, -44vh, 0); }
    100% { transform: translate3d(-14vw, -84vh, 0); }
  }
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
}
.sheet, .panel, .lane, .who__card, .wall__item { position: relative; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; }

:focus-visible {
  outline: 2px solid var(--jade);
  outline-offset: 3px;
  border-radius: 2px;
}

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

/* ---------- 3. Layout primitives ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.band { padding-block: var(--section-y); position: relative; }
.band--tight { padding-block: clamp(56px, 7vw, 96px); }

/* ---------- 4. Type scale ---------- */
.display {
  font-family: var(--display);
  font-variation-settings: 'wdth' 112, 'wght' 700;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.98;
  text-wrap: balance;
}

.d1 { font-size: clamp(2.5rem, 4.6vw, 4rem); }
.d2 { font-size: clamp(1.9rem, 3.3vw, 2.8rem); }
.d3 { font-size: clamp(1.5rem, 2.4vw, 2rem); letter-spacing: -0.02em; }

/* A page kicker: one short line above a page title, sentence case. */
.eyebrow {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-mute);
  letter-spacing: 0.01em;
}

.lede {
  font-size: clamp(1.05rem, 1.3vw, 1.25rem);
  line-height: 1.6;
  color: var(--ink-mute);
  max-width: 46ch;
  text-wrap: pretty;
}

/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--body);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  padding: 14px 22px;
  border-radius: 3px;
  position: relative;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease),
              border-color var(--fast) var(--ease), transform var(--fast) var(--ease),
              box-shadow var(--fast) var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--jade);
  color: #04140E;
}
.btn--primary:hover { background: #5BEBBC; transform: translateY(-1px); box-shadow: 0 14px 30px -14px rgba(47, 224, 166, 0.6); }

.btn--ghost {
  border: 1px solid var(--rule);
  color: var(--ink);
}
.btn--ghost:hover { border-color: var(--ink-mute); background: color-mix(in srgb, var(--ink) 5%, transparent); }

/* ---------- 6. Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color var(--mid) var(--ease);
}
.nav.is-stuck { border-bottom-color: var(--rule-soft); }
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.wordmark {
  font-family: var(--display);
  font-variation-settings: 'wdth' 118, 'wght' 700;
  font-size: 18px;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 11px;
}
.nav__right { display: flex; align-items: center; gap: 28px; }
.nav__link {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-mute);
  transition: color var(--fast) var(--ease);
}
.nav__link:hover { color: var(--ink); }
.nav .btn { padding: 10px 16px; font-size: 13.5px; }

/* ---------- 7. Instrument panel (the product surface) ---------- */
.panel {
  background: rgba(18, 23, 26, 0.84);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  color: var(--panel-text);
  border: 1px solid var(--panel-rule);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 40px 80px -44px rgba(0, 0, 0, 0.85);
}

.panel__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--panel-rule);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent);
}
.panel__id {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--panel-mute);
  display: flex;
  align-items: center;
  gap: 9px;
}
.panel__slash { opacity: 0.4; }
.panel__body { padding: 20px; }

.panel--grid .panel__body {
  background-image:
    linear-gradient(var(--panel-rule-2) 1px, transparent 1px),
    linear-gradient(90deg, var(--panel-rule-2) 1px, transparent 1px);
  background-size: 44px 44px;
  background-position: -1px -1px;
}

/* ---------- 8. Status indicator ---------- */
.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.status__led {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
  position: relative;
}
.status--live { color: var(--jade); }
.status--live .status__led::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid currentColor;
  animation: ping 2.4s var(--ease-out) infinite;
}
.status--hold { color: var(--amber); }
.status--idle { color: var(--panel-faint); }

@keyframes ping {
  0%   { transform: scale(0.7); opacity: 0.9; }
  70%  { transform: scale(1.9); opacity: 0; }
  100% { transform: scale(1.9); opacity: 0; }
}

/* ---------- 9. Hero ---------- */
.hero { position: relative; padding-block: clamp(56px, 8vw, 112px) clamp(48px, 6vw, 88px); }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: clamp(40px, 5vw, 80px);
  align-items: center;
}
.hero__copy { position: relative; z-index: 2; }
.hero__stage { position: relative; }
/* The panel is the lit object of the page: its own pool of light behind it. */
.hero__stage::before {
  content: '';
  position: absolute;
  inset: -14% -12%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(47, 224, 166, 0.22), rgba(47, 224, 166, 0));
  pointer-events: none;
}
.hero .d1 { margin-bottom: 26px; }
.hero .lede { max-width: 42ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero__meta {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 13.5px;
  color: var(--ink-faint);
}
.hero__meta span { display: flex; align-items: center; gap: 12px; }
.hero__meta span + span::before {
  content: '';
  width: 1px; height: 12px;
  background: var(--rule);
}

/* ---------- 10. Transit panel (hero product moment) ---------- */
.transit__stages {
  display: flex;
  border-bottom: 1px solid var(--panel-rule);
}
.transit__stage {
  flex: 1;
  padding: 10px 6px;
  text-align: center;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--panel-faint);
  border-right: 1px solid var(--panel-rule-2);
  position: relative;
  transition: color var(--mid) var(--ease), background var(--mid) var(--ease);
}
.transit__stage:last-child { border-right: none; }
.transit__stage::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: var(--jade);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 420ms var(--ease-out);
}
.transit__stage.is-done { color: var(--panel-mute); }
.transit__stage.is-done::after { transform: scaleX(1); }
.transit__stage.is-active { color: var(--jade); background: rgba(47, 224, 166, 0.05); }
.transit__stage.is-active::after { transform: scaleX(1); }

.transit__mail { padding: 18px 20px; border-bottom: 1px solid var(--panel-rule); }
.transit__from {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--panel-mute);
  margin-bottom: 9px;
}
.transit__subject {
  font-size: 15.5px;
  line-height: 1.4;
  color: var(--panel-text);
  font-weight: 500;
}

.transit__read { padding: 16px 20px 18px; border-bottom: 1px solid var(--panel-rule); }
.transit__label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--panel-faint);
  margin-bottom: 12px;
}
.transit__checks { display: flex; flex-direction: column; gap: 9px; }
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--panel-mute);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out), color 300ms var(--ease);
}
.check.is-on { opacity: 1; transform: none; color: var(--panel-text); }
.check__mark {
  width: 14px; height: 14px;
  flex: 0 0 auto;
  border: 1px solid var(--panel-faint);
  border-radius: 2px;
  display: grid;
  place-items: center;
  font-size: 9px;
  color: transparent;
  transition: all 260ms var(--ease-out);
}
.check.is-on .check__mark {
  border-color: var(--jade);
  background: rgba(47, 224, 166, 0.14);
  color: var(--jade);
}
.check__val { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--panel-faint); }

.meter { margin-top: 15px; }
.meter__top {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--panel-faint); margin-bottom: 7px;
}
.meter__val { color: var(--jade); font-variant-numeric: tabular-nums; }
.meter__track { height: 2px; background: var(--panel-high); overflow: hidden; }
.meter__bar {
  height: 100%;
  width: 0%;
  background: var(--jade);
  transition: width 900ms var(--ease-out);
}

.transit__reply { padding: 16px 20px 20px; }
.transit__text {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--panel-mute);
  min-height: 4.2em;
}
.transit__pending { color: var(--panel-faint); font-style: italic; }
.transit__caret {
  display: inline-block;
  width: 6px; height: 14px;
  background: var(--jade);
  vertical-align: -2px;
  margin-left: 2px;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.transit__verdict {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid var(--panel-rule);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 380ms var(--ease-out), transform 380ms var(--ease-out);
}
.transit__verdict.is-on { opacity: 1; transform: none; }
.transit__stamp {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 7px 12px;
  border-radius: 2px;
}
.transit__stamp--sent { color: var(--jade); border: 1px solid rgba(47, 224, 166, 0.4); background: rgba(47, 224, 166, 0.09); }
.transit__stamp--held { color: var(--amber); border: 1px solid rgba(240, 180, 74, 0.4); background: rgba(240, 180, 74, 0.09); }
.transit__elapsed { font-family: var(--mono); font-size: 10.5px; color: var(--panel-faint); font-variant-numeric: tabular-nums; }

/* ---------- 11. The load — wall of repetition ---------- */
.wall {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule-soft);
  border: 1px solid var(--rule-soft);
  border-radius: 5px;
  overflow: hidden;
  margin-top: 48px;
}
.wall__item {
  background: rgba(18, 23, 26, 0.62);
  padding: 16px 18px;
  min-height: 96px;
  opacity: var(--fade, 1);
}
.wall__from {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.wall__msg { font-size: 13.5px; line-height: 1.45; color: var(--ink-mute); }

/* ---------- 12. The path — one message, told while you scroll ----------
   The five stages are text on the left; the instrument on the right stays
   pinned and changes state as each stage reaches the middle of the screen:
   the same message, read, understood, checked, answered, resolved. */
.story {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.story__steps { display: flex; flex-direction: column; }
.story__step {
  padding: clamp(40px, 14vh, 150px) 0;
  border-top: 1px solid var(--rule-soft);
  opacity: 0.38;
  transition: opacity 500ms var(--ease);
}
.story__step:first-child { border-top: none; padding-top: clamp(8px, 2vh, 24px); }
.story__step.is-current { opacity: 1; }
.story__k {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-faint);
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.story__k i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--panel-high); flex: 0 0 auto;
  transition: background var(--mid) var(--ease), box-shadow var(--mid) var(--ease);
}
.story__step.is-current .story__k i { background: var(--jade); box-shadow: 0 0 0 3px rgba(47, 224, 166, 0.16); }
.story__t {
  font-family: var(--display);
  font-variation-settings: 'wdth' 108, 'wght' 700;
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 12px;
}
.story__d { font-size: 15.5px; line-height: 1.62; color: var(--ink-mute); max-width: 40ch; }

.story__stage { position: sticky; top: clamp(84px, 12vh, 112px); }
.story__stage::before {
  content: '';
  position: absolute;
  inset: -12% -10%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(34, 200, 216, 0.16), rgba(34, 200, 216, 0));
  pointer-events: none;
}
.stage .transit__stages { border-bottom: 1px solid var(--panel-rule); }
.stage__mail { padding: 18px 20px 16px; border-bottom: 1px solid var(--panel-rule); }
.stage__excerpt {
  margin-top: 10px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--panel-mute);
}
.stage__excerpt mark {
  background: transparent;
  color: inherit;
  border-radius: 2px;
  padding: 0 2px;
  transition: background var(--mid) var(--ease), color var(--mid) var(--ease);
}
.stage .stage__excerpt mark { background: rgba(47, 224, 166, 0.16); color: var(--panel-text); }

.stage__layer {
  padding: 14px 20px;
  border-bottom: 1px solid var(--panel-rule);
  opacity: 0.16;
  transition: opacity 520ms var(--ease-out);
}
.stage__layer:last-child { border-bottom: none; }
.stage.is-1 .stage__layer--1, .stage.is-2 .stage__layer--1, .stage.is-3 .stage__layer--1, .stage.is-4 .stage__layer--1,
.stage.is-2 .stage__layer--2, .stage.is-3 .stage__layer--2, .stage.is-4 .stage__layer--2,
.stage.is-3 .stage__layer--3, .stage.is-4 .stage__layer--3,
.stage.is-4 .stage__layer--4 { opacity: 1; }

.stage__row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 13px; color: var(--panel-text);
}
.stage__tag {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--jade); border: 1px solid rgba(47, 224, 166, 0.35); background: rgba(47, 224, 166, 0.08);
  padding: 5px 9px; border-radius: 2px;
}
.stage__checks { display: flex; flex-direction: column; gap: 8px; }
.stage__draft {
  font-size: 13.5px; line-height: 1.6; color: var(--panel-text);
  padding: 12px 14px; border: 1px solid var(--panel-rule); border-radius: 3px; background: rgba(255, 255, 255, 0.03);
}
.stage__foot { font-size: 12px; color: var(--panel-faint); margin-top: 8px; }

/* ---------- 13. The fork — automation with control ---------- */
.fork {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 52px;
}
.lane {
  border: 1px solid var(--rule);
  border-radius: 5px;
  overflow: hidden;
  background: rgba(18, 23, 26, 0.78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.lane--auto { border-color: rgba(47, 224, 166, 0.30); }
.lane--held { border-color: rgba(240, 180, 74, 0.28); }
.lane__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--rule);
  background: var(--paper-sink);
}
.lane--auto .lane__bar { background: rgba(47, 224, 166, 0.07); border-bottom-color: rgba(47, 224, 166, 0.22); }
.lane--held .lane__bar { background: rgba(240, 180, 74, 0.06); border-bottom-color: rgba(240, 180, 74, 0.2); }
.lane__share {
  font-size: 13px;
  color: var(--ink-faint);
}
.lane__body { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.lane__row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--rule-soft);
  border-radius: 3px;
  font-size: 14px;
  color: var(--ink-mute);
}
.lane__row b { color: var(--ink); font-weight: 600; }
.lane__tag {
  margin-left: auto;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em;
  text-transform: uppercase; white-space: nowrap;
}
.lane__tag--sent { color: var(--jade); }
.lane__tag--held { color: var(--amber); }

/* ---------- 14. Rules (control page) ---------- */
.rules { margin-top: 0; }
.rule-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.rule-row:last-child { border-bottom: none; }
.rule-row__text { font-size: 14.5px; color: var(--ink-mute); flex: 1; }
.rule-row__text b { color: var(--ink); font-weight: 600; }
.switch {
  width: 40px; height: 22px;
  border-radius: 999px;
  background: var(--paper-sink);
  border: 1px solid var(--rule);
  position: relative;
  flex: 0 0 auto;
  transition: background var(--mid) var(--ease), border-color var(--mid) var(--ease);
}
.switch::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--ink-faint);
  transition: transform var(--mid) var(--ease-out), background var(--mid) var(--ease);
}
.switch.is-on { background: rgba(14, 158, 113, 0.16); border-color: rgba(14, 158, 113, 0.42); }
.switch.is-on::after { transform: translateX(18px); background: var(--jade); }
.rule-row__val {
  font-size: 13px;
  color: var(--ink-faint); min-width: 74px; text-align: right;
}

/* A settings card on the canvas: a sheet with a bar. */
.rules-card { padding: 0; overflow: hidden; }
.rules-card .panel__bar { background: var(--paper-sink); border-bottom: 1px solid var(--rule); }
.rules-card .panel__id { font-family: var(--body); font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--ink-mute); }
.rules-card .panel__body { padding: 8px 22px; }

/* ---------- 15. Split layouts ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}
.split__copy .lede { max-width: 40ch; }
.split__copy .d2 { margin-bottom: 20px; }

/* ---------- 16. Final CTA ---------- */
.close { text-align: center; position: relative; padding-block: clamp(120px, 14vw, 200px); }
.close .d2 { max-width: 18ch; margin: 0 auto 20px; }
.close .lede { margin-inline: auto; text-align: center; }
.close__cta { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* The one live number on the site. Hidden until the API answers. */
.live {
  margin-top: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}
.live[hidden] { display: none; }
.live b { color: var(--ink); font-weight: 600; }
.live__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--jade);
  box-shadow: 0 0 0 4px rgba(47, 224, 166, 0.15);
  flex: 0 0 auto;
}

/* ---------- 17. Footer ---------- */
.foot {
  border-top: 1px solid var(--rule-soft);
  padding-block: 40px 56px;
}
.foot__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.foot__links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot__links a, .foot__note {
  font-size: 13.5px;
  color: var(--ink-mute);
  transition: color var(--fast) var(--ease);
}
.foot__note { color: var(--ink-faint); }
.foot__links a:hover { color: var(--ink); }

/* ---------- 18. Reveal system ----------
   Content is visible by default. It is only hidden once the
   inline head script proves JS is running, so a script error,
   an unsupported browser, or a missed observer can never leave
   the page blank. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 900ms var(--ease-out) calc(var(--i, 0) * 80ms),
    transform 900ms var(--ease-out) calc(var(--i, 0) * 80ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* line-by-line headline reveal */
.lines { display: block; }
.lines > span {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
  margin-bottom: -0.06em;
}
.lines > span > i {
  display: block;
  font-style: normal;
  transition: transform 900ms var(--ease-out) calc(var(--i, 0) * 95ms);
}
.js .lines > span > i { transform: translateY(105%); }
.js .is-in .lines > span > i,
.js .lines.is-in > span > i { transform: none; }
.js .lines[data-reveal] { opacity: 1; transform: none; }

/* Authored line breaks are the design; never let them re-wrap */
@media (min-width: 900px) {
  .lines > span > i { white-space: nowrap; }
}

/* ---------- 19. Section heads ----------
   Headline and lede share the width instead of leaving the
   right half of every section empty. */
.band__head { margin-bottom: clamp(36px, 4.5vw, 56px); }
.band__head-row {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.82fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: end;
}
.band__head-row .lede { padding-bottom: 5px; max-width: 44ch; }
.eyebrow + .display { margin-top: 14px; }
.display + .lede { margin-top: 20px; }
.band__head-row .display + .lede { margin-top: 0; }

@media (max-width: 900px) {
  .band__head-row { grid-template-columns: 1fr; gap: 16px; align-items: start; }
  .band__head-row .lede { padding-bottom: 0; max-width: 54ch; }
  /* The story stacks: the instrument pins under the nav and shows only the
     current stage (so it stays short), the stage texts scroll beneath it. */
  .story { grid-template-columns: 1fr; gap: 0; }
  .story__stage { order: -1; top: 74px; z-index: 5; margin-bottom: 28px; }
  .stage { min-height: 250px; }
  .story__step { padding: clamp(32px, 9vh, 72px) 0; }
  .stage__mail { padding: 14px 16px 12px; border-bottom: none; }
  .stage__excerpt { font-size: 12.5px; }
  .stage__layer { padding: 14px 16px; border-bottom: none; display: none; opacity: 1; }
  .stage:not(.is-0) .stage__mail { display: none; }
  .stage.is-1 .stage__layer--1, .stage.is-2 .stage__layer--2,
  .stage.is-3 .stage__layer--3, .stage.is-4 .stage__layer--4 { display: block; }
  .stage__draft { font-size: 12.5px; padding: 10px 12px; }
}

/* Skip link */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 18px;
  font-size: 13px;
}
.skip:focus { left: 12px; top: 12px; }

/* ---------- 20. Form page ---------- */
.form-page { padding-block: clamp(48px, 6vw, 92px) clamp(72px, 8vw, 120px); }
.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1fr);
  gap: clamp(40px, 5vw, 80px);
  align-items: start;
}
.form-copy { position: sticky; top: 108px; }
.form-copy .d2 { margin-bottom: 18px; }
.form-copy .lede { max-width: 38ch; }

.form-steps { margin-top: 34px; display: flex; flex-direction: column; gap: 14px; }
.form-steps li {
  display: flex; align-items: baseline; gap: 14px;
  font-size: 14.5px; color: var(--ink-mute);
  padding-top: 14px; border-top: 1px solid var(--rule-soft);
}
.form-steps__k {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em;
  color: var(--ink-faint); flex: 0 0 auto;
}
.form-assure {
  margin-top: 30px; padding-top: 20px;
  border-top: 1px solid var(--rule-soft);
  display: flex; flex-direction: column; gap: 9px;
  font-size: 13.5px; color: var(--ink-faint);
}

.form-card { padding: 0; overflow: hidden; }
.form-card .panel__bar { background: var(--paper-sink); border-bottom: 1px solid var(--rule); }
.form-card .panel__id { font-family: var(--body); font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--ink-mute); }
.form-card .panel__body { display: flex; flex-direction: column; gap: 18px; padding: 26px; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-mute);
}
.field input, .field textarea, .field select {
  width: 100%;
  background: var(--paper-lift);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 12px 14px;
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.field textarea { resize: vertical; min-height: 76px; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-faint); }
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--ink-faint); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--jade);
  background: var(--paper-sink);
  box-shadow: 0 0 0 3px rgba(47, 224, 166, 0.16);
}
.field select option { background: var(--paper-lift); color: var(--ink); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hint { font-size: 12px; line-height: 1.5; color: var(--ink-faint); }

.field-split {
  display: flex; align-items: baseline; gap: 12px;
  margin-top: 8px; padding-top: 18px;
  border-top: 1px solid var(--rule);
}
.field-split__k { font-size: 13px; font-weight: 600; color: var(--jade); flex: 0 0 auto; }
.field-split__t { font-size: 12.5px; color: var(--ink-faint); }

.form-submit { width: 100%; margin-top: 6px; }
.form-submit:disabled { opacity: 0.55; cursor: default; }

.form-note {
  display: none;
  padding: 12px 14px;
  border: 1px solid rgba(240, 180, 74, 0.4);
  background: rgba(240, 180, 74, 0.10);
  color: var(--amber);
  border-radius: 3px;
  font-size: 13px;
}
.form-note.is-on { display: block; }

.form-done { display: none; text-align: center; padding: 22px 8px 10px; }
.form-done.is-on { display: block; }
.form-done__t {
  font-family: var(--display); font-variation-settings: 'wdth' 108, 'wght' 700;
  font-size: 20px; letter-spacing: -0.02em; margin-top: 14px;
}
.form-done__b { font-size: 14px; color: var(--ink-mute); margin-top: 8px; }
.form-privacy { font-size: 12px; color: var(--ink-faint); text-align: center; }

@media (max-width: 900px) {
  .form-grid { grid-template-columns: 1fr; gap: 36px; }
  .form-copy { position: static; }
}
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
  .form-card .panel__body { padding: 18px; }
}

/* ---------- 21. How-it-works steps ---------- */
.hiw-head { padding-block: clamp(48px, 6vw, 84px) clamp(8px, 2vw, 24px); }

.steps { margin-top: 8px; }
.step {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  padding: 34px 0;
  border-top: 1px solid var(--rule-soft);
  align-items: start;
}
.step:last-child { border-bottom: 1px solid var(--rule-soft); }
.step__k {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-faint);
  display: flex; align-items: center; gap: 10px;
  padding-top: 6px;
}
.step__k i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--jade); flex: 0 0 auto;
  box-shadow: 0 0 0 3px rgba(47, 224, 166, 0.14);
}
.step__t {
  font-family: var(--display);
  font-variation-settings: 'wdth' 108, 'wght' 700;
  font-size: clamp(1.15rem, 1.9vw, 1.5rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 10px;
}
.step__d { font-size: 15px; line-height: 1.65; color: var(--ink-mute); max-width: 62ch; }

@media (max-width: 760px) {
  .step { grid-template-columns: 1fr; gap: 14px; padding: 26px 0; }
}

/* ---------- 22. Long-form document on a sheet ---------- */
.doc { padding-block: clamp(40px, 5vw, 72px) clamp(72px, 8vw, 112px); }
.doc .shell { max-width: 900px; }
.doc .sheet { padding: clamp(28px, 5.5vw, 72px); }
.doc .d2 { margin-block: 14px 10px; }
.doc__meta {
  font-size: 13px;
  color: var(--ink-faint);
  padding-bottom: 24px; margin-bottom: 30px;
  border-bottom: 1px solid var(--rule);
}
.doc p { font-size: 15.5px; line-height: 1.7; color: var(--ink-mute); margin-bottom: 16px; }
.doc h2 {
  font-family: var(--display);
  font-variation-settings: 'wdth' 108, 'wght' 700;
  font-size: 1.2rem; letter-spacing: -0.02em; color: var(--ink);
  margin-top: 40px; margin-bottom: 12px;
}
.doc ul { margin: 0 0 16px; display: flex; flex-direction: column; gap: 9px; }
.doc li {
  font-size: 15px; line-height: 1.6; color: var(--ink-mute);
  padding-left: 20px; position: relative;
}
.doc li::before {
  content: ''; position: absolute; left: 2px; top: 10px;
  width: 6px; height: 1px; background: var(--jade);
}
.doc code { font-family: var(--mono); font-size: 12.5px; color: var(--ink); }
.doc__link { color: var(--jade); border-bottom: 1px solid rgba(14, 158, 113, 0.35); }
.doc__link:hover { border-bottom-color: var(--jade); }

.doc__tablewrap { overflow-x: auto; margin: 22px 0 8px; }
.doc__table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
}
.doc__table th,
.doc__table td {
  text-align: left;
  vertical-align: top;
  padding: 12px 14px;
  border: 1px solid var(--rule-soft);
}
.doc__table th {
  font-size: 12.5px;
  color: var(--ink-mute);
  font-weight: 600;
  background: var(--paper-sink);
  white-space: nowrap;
}
.doc__table td code {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
  word-break: break-all;
}
.doc__note {
  border-left: 2px solid var(--jade);
  padding: 4px 0 4px 16px;
  margin: 20px 0;
  color: var(--ink-mute);
}
/* .doc__meta is a page-level byline; inside tables it is just a sub-label. */
.doc__table .doc__meta {
  border: 0;
  padding: 0;
  margin: 2px 0 0;
  display: block;
  font-size: 11.5px;
}
.foryou li { margin-bottom: 12px; }

/* ---------- 23. Try it ---------- */
.tryit-grid { margin-top: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
@media (max-width: 900px) { .tryit-grid { grid-template-columns: 1fr; } }
.tryit label { display: block; font-size: 13px; font-weight: 500; color: var(--ink-mute); margin-top: 18px; }
.tryit label:first-of-type { margin-top: 0; }
.tryit input, .tryit textarea {
  width: 100%; margin-top: 8px; padding: 12px 14px;
  border: 1px solid var(--rule); border-radius: 3px;
  background: var(--paper-lift); font: inherit; font-size: 15px; color: var(--ink);
  transition: border-color var(--fast) var(--ease);
}
.tryit input::placeholder, .tryit textarea::placeholder { color: var(--ink-faint); }
.tryit input:focus, .tryit textarea:focus { outline: none; border-color: var(--jade); }
.tryit textarea { min-height: 150px; resize: vertical; }
.tryit .btn { margin-top: 18px; }
.tryit .btn[disabled] { opacity: 0.55; cursor: wait; }
.tryit .status { margin-top: 12px; font-family: var(--body); font-size: 14px; letter-spacing: 0; text-transform: none; color: var(--ink-mute); min-height: 1.4em; white-space: normal; display: block; }
.tryit .status.err { color: var(--amber); font-weight: 600; }
.tryit .fine { font-size: 12.5px; color: var(--ink-faint); margin-top: 10px; }
.tryit-result .empty { padding: 26px 24px; border: 1px dashed var(--rule); border-radius: 5px; color: var(--ink-faint); font-size: 14px; line-height: 1.6; }
.verdict { display: inline-block; padding: 8px 14px; border-radius: 3px; font-weight: 700; font-size: 14px; line-height: 1.4; }
.verdict.send { background: rgba(47, 224, 166, 0.14); color: var(--jade); }
.verdict.hold { background: rgba(240, 180, 74, 0.16); color: var(--amber); }
.mail { margin-top: 14px; background: var(--paper-lift); border: 1px solid var(--rule); border-radius: 5px; padding: 22px 24px; white-space: pre-wrap; font-size: 15px; line-height: 1.6; color: var(--ink); overflow-wrap: anywhere; }
.mail .hdr { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--rule-soft); white-space: normal; }
.checks { margin-top: 14px; font-size: 13.5px; color: var(--ink-mute); }
.checks ul { margin: 6px 0 0; padding-left: 18px; list-style: none; }
.checks li { margin-bottom: 6px; }
.facts { margin-top: 12px; font-size: 13px; color: var(--ink-faint); line-height: 1.55; }
.after { margin-top: 16px; font-size: 14px; color: var(--ink-mute); }

/* ---------- 24. Who it is for ---------- */
.who { margin-top: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 820px) { .who { grid-template-columns: 1fr; } }
.who__card { padding: 24px 26px; border: 1px solid var(--rule); border-radius: 5px; background: rgba(18, 23, 26, 0.72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: var(--ink); font-size: 15.5px; line-height: 1.6; }
.who__card b { display: block; font-size: 13px; font-weight: 600; color: var(--jade); margin-bottom: 10px; }
.who__not { margin-top: 26px; padding: 18px 22px; border-left: 2px solid var(--amber); color: var(--ink-mute); font-size: 15px; line-height: 1.6; max-width: 70ch; }
.who__not strong { color: var(--ink); }
.who__not .doc__link { color: var(--jade); }

/* ---------- 25. Responsive ---------- */
@media (max-width: 1080px) {
  .hero__grid { grid-template-columns: 1fr; gap: 46px; }
  .hero .d1 { max-width: 16ch; }
  .wall { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split__copy .lede { max-width: 52ch; }
}

@media (max-width: 720px) {
  :root {
    --gutter: 20px;
    --section-y: clamp(72px, 14vw, 96px);
  }
  body { font-size: 15px; }

  .nav__inner { height: 62px; }
  .nav__right { gap: 14px; }
  .nav__link { display: none; }

  .hero { padding-block: 40px 56px; }
  .hero .d1 { max-width: none; }
  /* Small enough that the authored three lines still hold at 360px. */
  .d1 { font-size: clamp(2rem, 9vw, 2.5rem); }
  .d2 { font-size: clamp(1.7rem, 7.2vw, 2rem); }

  .hero__cta .btn { flex: 1 1 auto; }
  .hero__cta .btn--ghost { flex: 0 1 auto; }

  .hero__meta { flex-direction: column; gap: 8px; }
  .hero__meta span + span::before { display: none; }

  .panel__bar { padding: 11px 14px; gap: 10px; }
  .panel__id { font-size: 9.5px; letter-spacing: 0.1em; white-space: nowrap; }
  .status { font-size: 9.5px; letter-spacing: 0.1em; }

  .nav .btn { padding: 9px 13px; font-size: 13px; }
  .wordmark { font-size: 16px; }

  .fork { grid-template-columns: 1fr; gap: 16px; }
  .wall { grid-template-columns: 1fr 1fr; }
  .panel__body { padding: 16px; }
  .transit__stage { font-size: 8px; letter-spacing: 0.06em; padding: 9px 3px; }
  .foot__inner { flex-direction: column; align-items: flex-start; gap: 18px; }
  .close { padding-block: clamp(88px, 18vw, 120px); }
}

@media (max-width: 420px) {
  .wall { grid-template-columns: 1fr; }
  .wall__from { font-size: 9px; gap: 6px; }
}

/* ---------- 26. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .lines > span > i { transform: none; }
  .status--live .status__led::after { display: none; }
  .transit__caret { display: none; }
  .aurora i { animation: none !important; }
  .story__step { opacity: 1; }
  .stage__layer { opacity: 1; }
  .stage__excerpt mark { background: rgba(47, 224, 166, 0.16); color: var(--panel-text); }
}
