/* STAM website, V3. Tokens are the app's, verbatim (BRAND-AND-ASSETS.md). Static CSS, no build step. */

/* Fonts: local, variable; unicode ranges as in the app's @font-face blocks. */
@font-face { font-family: "Mona Sans"; src: url(../assets/fonts/MonaSans-latin.woff2) format("woff2"); font-weight: 200 900; font-stretch: 75% 125%; font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Mona Sans"; src: url(../assets/fonts/MonaSans-latin-ext.woff2) format("woff2"); font-weight: 200 900; font-stretch: 75% 125%; font-display: swap;
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Hubot Sans"; src: url(../assets/fonts/HubotSans-latin.woff2) format("woff2"); font-weight: 200 900; font-stretch: 75% 125%; font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Hubot Sans"; src: url(../assets/fonts/HubotSans-latin-ext.woff2) format("woff2"); font-weight: 200 900; font-stretch: 75% 125%; font-display: swap;
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; src: url(../assets/fonts/JetBrainsMono-latin.woff2) format("woff2"); font-weight: 100 800; font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "JetBrains Mono"; src: url(../assets/fonts/JetBrainsMono-latin-ext.woff2) format("woff2"); font-weight: 100 800; font-display: swap;
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }


/* ------------------------------------------------------------------ tokens: dark (default) */
:root {
  color-scheme: dark;
  --canvas: #10120C; --surface: #151810; --raised: #1A1E14; --raised-2: #22271A; --raised-3: #2B3121; --sunken: #0C0E09;
  --line-1: rgba(241,255,218,.075); --line-2: rgba(241,255,218,.13); --line-3: rgba(241,255,218,.22);
  --ink: #EDF4E0; --ink-2: #B3BCA3; --ink-3: #97A189; --heading: #F1FFDA;
  --lime: #B5F34D; --lime-hover: #C4F76A; --on-lime: #10120C; --lime-text: #C2F468;
  --lime-soft: rgba(181,243,77,.10); --lime-line: rgba(181,243,77,.42);
  --olive: #34451A; --olive-2: #2A3815;
  --focus: #B5F34D;
  --aura: rgba(181,243,77,.20);
  --warn: #fbb315; --warn-ink: #FBC14A; --warn-soft: rgba(251,179,21,.10);
  --wordmark: #F1FFDA;
  --glow: rgba(52,69,26,.55);
  --spill: rgba(181,243,77,.16);      /* the Companion's light falling on the window */
  --header-bg: rgba(16,18,12,.8);
  --shot-shadow: 0 50px 140px -60px rgba(0,0,0,.95);
  --soon-bg: rgba(241,255,218,.04);

  --f-display: "Hubot Sans", "Mona Sans", system-ui, sans-serif;
  --f-text: "Mona Sans", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(.2,.7,.2,1);
  --r-panel: 14px; --r-control: 9px; --r-tile: 5px; --r-media: 20px;
  --wrap: 1280px;
  --gutter: clamp(20px, 5vw, 64px);
  --section: clamp(112px, 13vw, 208px);
  --header-h: 72px;
}

/* ------------------------------------------------------------------ tokens: light. Same brand colours; its own light:
   a pale morning wash instead of the night-time olive glow, and olive shadows instead of black */
[data-theme="light"] {
  color-scheme: light;
  --canvas: #EEF1E8; --surface: #F7F9F3; --raised: #FFFFFF; --raised-2: #F0F3EA; --raised-3: #E5E9DD; --sunken: #E3E7DA;
  --line-1: rgba(16,18,12,.08); --line-2: rgba(16,18,12,.14); --line-3: rgba(16,18,12,.26);
  --ink: #12150E; --ink-2: #454D3B; --ink-3: #5D6652; --heading: #12150E;
  --lime: #B5F34D; --lime-hover: #A6E83A; --on-lime: #10120C; --lime-text: #45650B;
  --lime-soft: rgba(120,175,20,.12); --lime-line: rgba(80,125,10,.55);
  --olive: #DDE8C7; --olive-2: #DDE8C7;
  --focus: #4E7A0C;
  --aura: rgba(150,210,40,.26);
  --warn-ink: #7a5200; --warn-soft: rgba(251,179,21,.14);
  --wordmark: #10120C;
  --glow: rgba(181,243,77,.24);
  --spill: rgba(181,243,77,.20);
  --header-bg: rgba(238,241,232,.84);
  --shot-shadow: 0 50px 120px -60px rgba(40,60,10,.42);
  --soon-bg: rgba(255,255,255,.6);
}

/* wider canvases keep the proportions, with more room */
@media (min-width: 1600px) { :root { --wrap: 1400px; } }
@media (min-width: 2200px) { :root { --wrap: 1520px; } }

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--canvas); color: var(--ink);
  font: 400 1rem/1.6 var(--f-text); font-optical-sizing: auto;
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
main { flex: 1; }
img, svg, video, picture { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; color: var(--heading); text-wrap: balance; }
p, ul, ol, dl, dd, figure { margin: 0; }
p { text-wrap: pretty; }
ul[class], ol[class] { list-style: none; padding: 0; }
code, pre { font-family: var(--f-mono); font-variant-ligatures: none; }
code { font-size: .875em; overflow-wrap: anywhere; }
abbr[title] { text-decoration: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--lime); color: var(--on-lime); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.i { width: 20px; height: 20px; flex: none; }
.skip { position: absolute; left: 16px; top: -80px; z-index: 100; padding: 10px 16px; border-radius: var(--r-control);
  background: var(--lime); color: var(--on-lime); font-weight: 600; text-decoration: none; }
.skip:focus { top: 16px; }
.nowrap { white-space: nowrap; }
.scroll-mark { position: absolute; top: 0; left: 0; width: 1px; height: 8px; pointer-events: none; }
[hidden] { display: none !important; }

.lead { font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); line-height: 1.55; color: var(--ink-2); max-width: 34em; }
.text-link { display: inline-flex; align-items: center; gap: 8px; color: var(--lime-text); font: 600 .9375rem/1.4 var(--f-text);
  text-decoration: underline; text-decoration-color: var(--lime-line); text-underline-offset: 4px; }
.text-link:hover { text-decoration-color: currentColor; }
.text-link .i { width: 16px; height: 16px; }
html:not(.js) [data-open-demo] { display: none; } /* it needs the script */
button.text-link { background: none; border: 0; padding: 4px 0; cursor: pointer; }
.state-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); flex: none; }
.state-dot.is-released { background: #0aac23; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; max-width: 100%; padding: 0 22px;
  border-radius: var(--r-control); border: 1px solid transparent;
  font: 600 1rem/1 var(--f-text); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 110ms var(--ease), border-color 110ms var(--ease), color 110ms var(--ease), transform 110ms var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn .i { width: 18px; height: 18px; }
.btn-primary { background: var(--lime); color: var(--on-lime); }
.btn-primary:hover { background: var(--lime-hover); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line-3); }
.btn-quiet:hover { border-color: var(--ink-3); background: var(--line-1); }
.btn-small { min-height: 44px; padding: 0 16px; font-size: .9375rem; }
.btn-large { min-height: 56px; padding: 0 28px; font-size: 1.0625rem; }

.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-control);
  color: var(--ink-2); background: transparent; border: 0; cursor: pointer; text-decoration: none;
  transition: color 110ms var(--ease), background-color 110ms var(--ease);
}
.icon-btn:hover { color: var(--heading); background: var(--line-1); }

/* The unreleased download: a status, not a control. Pill-shaped (every real button is squared), no lime fill, no
   hover, no pointer, and not focusable. The released state replaces it with a real button (js/site.js). */
.soon {
  display: inline-flex; align-items: center; gap: 14px; min-height: 52px; padding: 6px 6px 6px 22px;
  border-radius: 999px; border: 1px solid var(--line-2); background: var(--soon-bg); color: var(--ink-2);
  font: 600 1rem/1 var(--f-text); cursor: default;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.soon-label { display: inline-flex; align-items: center; gap: 10px; }
.soon-label .i { width: 18px; height: 18px; color: var(--ink-3); }
.soon-tag { padding: 9px 14px; border-radius: 999px; border: 1px solid var(--lime-line); background: var(--lime-soft);
  color: var(--lime-text); font-size: .875rem; white-space: nowrap; }
.soon-large { min-height: 60px; padding-left: 26px; font-size: 1.0625rem; }

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color 200ms var(--ease), border-color 200ms var(--ease);
}
.site-header.is-scrolled, .site-header.is-open { background: var(--header-bg); border-bottom-color: var(--line-2);
  -webkit-backdrop-filter: saturate(140%) blur(14px); backdrop-filter: saturate(140%) blur(14px); }
.header-row { display: flex; align-items: center; gap: 32px; height: var(--header-h); }
.lockup { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--wordmark); flex: none; border-radius: 6px; }
.lockup-mascot { width: 32px; height: 32px; }
.lockup-divider { width: 1px; height: 22px; background: var(--line-3); }
.lockup .wordmark { height: 17px; width: auto; }
.primary-nav { display: flex; gap: 2px; margin-left: auto; }
.primary-nav a {
  padding: 10px 14px; border-radius: var(--r-control); color: var(--ink-2); text-decoration: none;
  font-size: .9375rem; font-weight: 500; transition: color 110ms var(--ease), background-color 110ms var(--ease);
}
.primary-nav a:hover { color: var(--heading); background: var(--line-1); }
.header-actions { display: flex; align-items: center; gap: 2px; }
.support-icon:hover { color: var(--lime-text); }
.theme-toggle .i-sun { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }
[data-theme="dark"] .theme-toggle .i-moon { display: none; }
.menu-toggle { display: none; }
.menu-toggle .i-close { display: none; }
.menu-toggle[aria-expanded="true"] .i-close { display: block; }
.menu-toggle[aria-expanded="true"] .i-menu { display: none; }
.mobile-menu { border-top: 1px solid var(--line-2); padding: 4px var(--gutter) 22px; max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
.mobile-menu a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line-1); color: var(--heading);
  text-decoration: none; font: 600 1.125rem/1.3 var(--f-display); font-stretch: 108%; }
.mobile-menu a.menu-support { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font: 500 1rem/1.3 var(--f-text); }
.menu-support .i { width: 15px; height: 15px; }
.mobile-menu-status { display: flex; align-items: center; gap: 10px; padding-top: 18px; color: var(--ink-3); font-size: .875rem; }

/* ------------------------------------------------------------------ 1. hero */
.hero {
  position: relative; isolation: isolate; overflow: clip;
  margin-top: calc(-1 * var(--header-h));
  padding-top: calc(var(--header-h) + clamp(32px, 4.6vw, 104px));
}
.hero::before { /* night: a deep olive glow under the app, lime only where the Companion stands */
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(42% 34% at 76% 52%, var(--spill), transparent 70%),
    radial-gradient(70% 55% at 55% 78%, var(--glow), transparent 72%);
}
[data-theme="light"] .hero::before { /* morning: a pale wash from above, and the same lime pool */
  background:
    radial-gradient(42% 34% at 76% 52%, var(--spill), transparent 70%),
    linear-gradient(#F7FAF0, transparent 46%);
}
.hero h1 {
  font: 700 clamp(3rem, 1.3rem + 5.4vw, 7.5rem)/.94 var(--f-display); font-stretch: 112%;
  letter-spacing: -.032em;
}
.hero h1 .line { display: block; }
.hero-lead { margin-top: clamp(22px, 2.4vw, 34px); max-width: 29em; color: var(--ink-2);
  font-size: clamp(1.125rem, 1rem + .45vw, 1.4375rem); line-height: 1.5; }
.hero-get { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: clamp(28px, 3vw, 44px); }
.hero-meta { color: var(--ink-3); font-size: .9375rem; }

/* The stage is the real app window. Its own small Companion is centred at 89% across, its lower slab ending about
   16.6% of the window's width below the top. The large Companion is centred over it (robot = 7.4-92.4% x of its
   canvas) with its slab tip a little lower (ends 93% y of its canvas), so the small one is always fully behind it.
   Container units keep the alignment at every size. Isolated: the window and both Companions fade in as one picture. */
.hero-stage {
  position: relative; container-type: inline-size; isolation: isolate;
  margin-top: clamp(40px, 4vw, 88px);
  --bw: min(33cqw, 500px);
}
@media (min-resolution: 1.5dppx) { .hero-stage { --bw: min(33cqw, 420px); } } /* 768 px layers stay sharp on 2x */
.hero-window {
  position: relative; z-index: 1; aspect-ratio: 1360 / 860;
  border-radius: clamp(10px, 1.1vw, 18px); border: 1px solid var(--line-2);
  box-shadow: var(--shot-shadow), 0 0 0 1px var(--line-1);
  background: var(--raised) top center / cover no-repeat;
  background-image: url(../assets/media/shots/02-plan-800.webp);
  background-image: image-set(url(../assets/media/shots/02-plan-800.avif) type("image/avif"), url(../assets/media/shots/02-plan-800.webp) type("image/webp"));
}
[data-theme="light"] .hero-window {
  background-image: url(../assets/media/shots/02-plan-light-800.webp);
  background-image: image-set(url(../assets/media/shots/02-plan-light-800.avif) type("image/avif"), url(../assets/media/shots/02-plan-light-800.webp) type("image/webp"));
}
@media (min-width: 900px), (min-width: 480px) and (min-resolution: 1.5dppx) {
  .hero-window {
    background-image: url(../assets/media/shots/02-plan-1360.webp);
    background-image: image-set(url(../assets/media/shots/02-plan-1360.avif) type("image/avif"), url(../assets/media/shots/02-plan-1360.webp) type("image/webp"));
  }
  [data-theme="light"] .hero-window {
    background-image: url(../assets/media/shots/02-plan-light-1360.webp);
    background-image: image-set(url(../assets/media/shots/02-plan-light-1360.avif) type("image/avif"), url(../assets/media/shots/02-plan-light-1360.webp) type("image/webp"));
  }
}
.hero-stage::after { /* the window rests on its own light */
  content: ""; position: absolute; z-index: 0; left: 8%; right: 8%; bottom: -5%; height: 14%; border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow), transparent); filter: blur(20px);
}
.hero-light { /* the slabs' glow, falling across the top of the window */
  position: absolute; z-index: 2; pointer-events: none;
  left: 59.5cqw; top: -14cqw; width: 58cqw; height: 46cqw;
  background: radial-gradient(closest-side, var(--spill), transparent);
  mix-blend-mode: screen;
}
[data-theme="light"] .hero-light { mix-blend-mode: normal; opacity: .7; }
.hero-stage .companion-hero {
  position: absolute; z-index: 3; width: var(--bw);
  left: calc(88.5cqw - .499 * var(--bw));
  top: calc(17.9cqw - .93 * var(--bw));
}

/* ------------------------------------------------------------------ the Companion (layer stack from the app) */
.companion { position: relative; aspect-ratio: 1; }
.companion-aura {
  position: absolute; inset: 18% 14% 10%; border-radius: 50%;
  background: radial-gradient(closest-side, var(--aura), transparent); filter: blur(18px);
}
.companion-body, .c-head { position: absolute; inset: 0; }
.companion-body img, .c-head img { position: absolute; inset: 0; width: 100%; height: 100%; }
.c-head { transform-origin: 52.2% 59.7%; } /* headPivot [400.9, 458.4] on the 768 canvas */
.c-top { transform-origin: 52.2% 63.9%; }
.eyes { opacity: 0; }
[data-eyes="open"] .eyes-open, [data-eyes="closed"] .eyes-closed, [data-eyes="happy"] .eyes-happy,
[data-eyes="down"] .eyes-down, [data-eyes="look-left"] .eyes-look-left, [data-eyes="look-right"] .eyes-look-right { opacity: 1; }

/* ------------------------------------------------------------------ sections */
.section { position: relative; padding-top: var(--section); }
.section-head { display: grid; gap: 20px; max-width: 760px; }
.section-head h2, .doc h1 {
  font: 680 clamp(2.25rem, 1.3rem + 2.9vw, 4rem)/1.0 var(--f-display); font-stretch: 112%; letter-spacing: -.026em;
}

/* ------------------------------------------------------------------ 2. experience: the sample run */
.stage {
  position: relative; margin-top: clamp(44px, 5vw, 72px);
  border-radius: var(--r-media); border: 1px solid var(--line-2);
  background: radial-gradient(60% 80% at 50% 0%, var(--lime-soft), transparent 70%), var(--surface);
  box-shadow: 0 50px 140px -70px var(--glow);
}
/* six real steps: a sequence, so numbered; the rule under each fills as the run reaches it */
.stage .steps { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0 16px; padding: 0 clamp(24px, 3.4vw, 48px); border-bottom: 1px solid var(--line-1); }
.step { position: relative; display: flex; align-items: baseline; gap: 8px; padding: 20px 0 18px; color: var(--ink-3); font-size: .9375rem; font-weight: 600; transition: color 200ms var(--ease); }
.step::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--lime);
  transform: scaleX(0); transform-origin: left; transition: transform 380ms var(--ease); }
.step.is-done::after, .step.is-active::after { transform: scaleX(1); }
.step.is-active, .step.is-done { color: var(--ink); }
.step-n { font-size: .8125rem; color: var(--ink-3); }
.step.is-active .step-n { color: var(--lime-text); }

.stage-grid { display: grid; grid-template-columns: minmax(0, 1fr) 220px minmax(0, 1.08fr); gap: clamp(16px, 2.4vw, 40px); padding: clamp(24px, 3.4vw, 48px); align-items: start; }
.stage-col h3 { font: 600 .9375rem/1.3 var(--f-text); color: var(--ink-2); margin-bottom: 16px; }
.outcomes, .destinations { display: grid; gap: 8px; }
.outcome {
  position: relative; display: grid; grid-template-columns: 36px 44px 1fr; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-1); background: var(--raised);
  transition: opacity 300ms var(--ease), transform 300ms var(--ease);
}
.o-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-control); background: var(--raised-3); color: var(--ink-2); }
.o-icon .i { width: 18px; height: 18px; }
.o-count { font: 650 1.75rem/1 var(--f-display); font-stretch: 104%; color: var(--heading); }
.o-text { display: grid; gap: 2px; font-size: .9375rem; line-height: 1.3; }
.o-text strong { font-weight: 600; color: var(--ink); }
.o-text span { color: var(--ink-3); font-size: .8125rem; }
.outcome.is-ready { border-color: var(--lime-line); }
.outcome.is-ready .o-icon { background: var(--lime-soft); color: var(--lime-text); }
.outcome.is-review .o-icon { background: var(--warn-soft); color: var(--warn-ink); }
.outcome.is-approved::after { /* the approval ring, shown during step 3 */
  content: ""; position: absolute; inset: -4px; border-radius: 15px; border: 2px solid var(--lime); opacity: 0;
  animation: approve 900ms var(--ease) forwards;
}
@keyframes approve { 0% { opacity: 0; transform: scale(.98); } 30% { opacity: 1; transform: scale(1); } 100% { opacity: 0; } }
.middle { display: grid; justify-items: center; text-align: center; gap: 14px; padding-top: 18px; }
.companion-sort { width: 168px; }
.stage-status { min-height: 4.2em; color: var(--ink); font-size: .9375rem; line-height: 1.4; max-width: 15em; }
.destination {
  position: relative; display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-1); background: var(--raised); color: var(--ink-3);
}
.destination::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--lime-soft); opacity: 0; transition: opacity 400ms var(--ease); }
.destination.is-hit::before { opacity: 1; }
.destination > * { position: relative; }
.destination .i { width: 18px; height: 18px; color: var(--lime-text); }
.d-text { display: grid; gap: 3px; min-width: 0; }
.d-text strong { font-weight: 600; color: var(--ink); font-size: .9375rem; line-height: 1.3; }
.d-text code { color: var(--ink-3); font-size: .75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; }
.tag { margin-left: 6px; padding: 2px 7px; border-radius: 999px; background: var(--lime-soft); color: var(--lime-text); font-size: .6875rem; font-weight: 600; vertical-align: 1px; }
.d-count { font-size: .875rem; font-weight: 600; color: var(--ink); white-space: nowrap; }
.destination.is-empty .d-count { color: var(--ink-3); font-weight: 400; }
.destination.is-empty .i { color: var(--ink-3); }
.tokens { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.token { position: absolute; left: 0; top: 0; will-change: transform; }
.token-y { display: grid; place-items: center; width: 26px; height: 30px; border-radius: 6px; background: var(--lime); color: var(--on-lime); box-shadow: 0 0 22px var(--aura); }
.token-y .i { width: 15px; height: 15px; }
.stage.is-running .outcome { opacity: .28; transform: translateY(6px); }
.stage.is-running .outcome.is-shown { opacity: 1; transform: none; }
.stage.is-looking .companion-aura { animation: aura-pulse 1.1s var(--ease) infinite alternate; }
@keyframes aura-pulse { from { opacity: .55; } to { opacity: 1; } }

.stage-caption { border-top: 1px solid var(--line-1); padding: 18px clamp(24px, 3.4vw, 48px) 20px; display: grid; gap: 8px; }
.stage-caption > p { color: var(--ink-3); font-size: .875rem; max-width: 80ch; }
.stage-more { display: flex; flex-wrap: wrap; align-items: start; gap: 4px 32px; }
.disclosure summary { cursor: pointer; color: var(--ink-2); font-size: .9375rem; font-weight: 600; width: fit-content; padding: 4px 0; border-radius: 4px; }
.disclosure summary:hover { color: var(--heading); }
.disclosure pre { margin: 10px 0 4px; padding: 18px 20px; border-radius: var(--r-panel); background: var(--sunken); border: 1px solid var(--line-1);
  color: var(--ink-2); font-size: .8125rem; line-height: 1.55; overflow-x: auto; }
.disclosure[open] { flex-basis: 100%; }

/* the real demo video, in a native modal dialog */
.demo-dialog {
  width: min(1180px, 100% - 32px); max-width: none; max-height: calc(100dvh - 32px); padding: clamp(14px, 1.8vw, 22px);
  border: 1px solid var(--line-2); border-radius: var(--r-media); background: var(--surface); color: var(--ink);
  box-shadow: 0 60px 160px -40px rgba(0,0,0,.8);
}
.demo-dialog::backdrop { background: rgba(8,10,6,.74); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: -4px -6px 12px 4px; }
.dialog-head h2 { font: 650 1.1875rem/1.25 var(--f-display); font-stretch: 106%; }
.demo-dialog video { width: 100%; height: auto; aspect-ratio: 1360 / 860; border-radius: 12px; background: var(--sunken); }
.dialog-note { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: baseline; margin: 14px 4px 2px; color: var(--ink-3); font-size: .875rem; }

/* ------------------------------------------------------------------ 3. product */
.product::before { /* a quiet pool of light behind the screens, instead of a boxed band */
  content: ""; position: absolute; inset: 30% 0 auto; height: 70%; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 50% at 50% 45%, var(--glow), transparent 70%);
}
.tabs { margin-top: clamp(40px, 4.4vw, 64px); }
.tablist { display: inline-flex; max-width: 100%; gap: 4px; padding: 5px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface);
  overflow-x: auto; scrollbar-width: none; }
.tablist::-webkit-scrollbar { display: none; }
.tablist [role="tab"] {
  flex: none; min-height: 42px; padding: 0 20px; border-radius: 999px; border: 0; background: transparent;
  color: var(--ink-2); font: 600 .9375rem/1 var(--f-text); cursor: pointer; white-space: nowrap;
  transition: color 150ms var(--ease), background-color 150ms var(--ease), box-shadow 150ms var(--ease);
}
.tablist [role="tab"]:hover { color: var(--heading); }
.tablist [role="tab"][aria-selected="true"] { background: var(--raised-3); color: var(--heading); box-shadow: inset 0 0 0 1px var(--line-2); }
[data-theme="light"] .tablist [role="tab"][aria-selected="true"] { background: var(--raised); box-shadow: 0 1px 3px rgba(40,60,10,.18), inset 0 0 0 1px var(--line-2); }
.tablist [role="tab"]:focus-visible { outline-offset: -2px; }
.panel { margin-top: 28px; }
.panel:not([hidden]) { animation: panel-in 260ms var(--ease); }
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); } }
.shot img { width: 100%; border-radius: var(--r-media); border: 1px solid var(--line-2); box-shadow: var(--shot-shadow), 0 0 0 1px var(--line-1); background: var(--raised); }
.only-light { display: none; }
[data-theme="light"] .only-light { display: block; }
[data-theme="light"] .only-dark { display: none; }
.panel-text { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 40px; margin-top: 22px; color: var(--ink-2); font-size: 1rem; line-height: 1.5; }
.panel-text > span:first-child { max-width: 62ch; }
.panel-real { color: var(--ink-3); font-size: .875rem; }

.assure {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 28px clamp(40px, 6vw, 112px);
  margin-top: clamp(88px, 10vw, 160px); padding-top: clamp(36px, 4vw, 56px); border-top: 1px solid var(--line-2);
}
.assure-title { font: 680 clamp(1.75rem, 1.2rem + 1.7vw, 2.75rem)/1.04 var(--f-display); font-stretch: 112%; letter-spacing: -.02em; }
.assure-title .line { display: block; }
.assure-links { grid-column: 1; display: flex; flex-wrap: wrap; gap: 8px 28px; align-self: start; }
.assure-list { grid-column: 2; grid-row: 1 / span 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 48px; }
.assure-list li { display: grid; grid-template-columns: 22px 1fr; gap: 14px; }
.assure-list .i { width: 22px; height: 22px; margin-top: 1px; color: var(--lime-text); }
.assure-list p { color: var(--ink-2); line-height: 1.55; }
.assure-list strong { color: var(--heading); font-weight: 650; }

/* ------------------------------------------------------------------ 4. download */
.get { padding-bottom: var(--section); isolation: isolate; }
.get::before { /* the closing light: one wide, low glow */
  content: ""; position: absolute; inset: 20% 0 0; z-index: -1; pointer-events: none;
  background: radial-gradient(46% 52% at 50% 40%, var(--glow), transparent 72%);
}
.get-inner { display: grid; justify-items: center; text-align: center; }
.get-icon { width: clamp(88px, 8vw, 120px); height: auto; border-radius: 24%; box-shadow: 0 24px 70px -20px var(--aura); }
.get h2 { margin-top: clamp(24px, 2.6vw, 36px); font: 700 clamp(2.5rem, 1.4rem + 3.6vw, 5rem)/.98 var(--f-display); font-stretch: 112%; letter-spacing: -.03em; }
.dl-state { display: inline-flex; align-items: center; gap: 10px; margin-top: 16px; color: var(--ink-2); font-weight: 600; font-size: .9375rem; }
.dl-body { display: grid; justify-items: center; gap: 20px; margin-top: clamp(32px, 3.4vw, 44px); }
.dl-note { color: var(--ink-3); font-size: .9375rem; max-width: 44ch; }
.reqs { display: flex; flex-wrap: wrap; justify-content: center; margin-top: clamp(56px, 6vw, 88px);
  border-top: 1px solid var(--line-1); border-bottom: 1px solid var(--line-1); }
.reqs div { padding: 18px clamp(18px, 2.2vw, 32px); text-align: left; border-left: 1px solid var(--line-1); }
.reqs div:first-child { border-left: 0; }
.reqs dt { color: var(--ink-3); font-size: .8125rem; }
.reqs dd { color: var(--ink); font-size: .9375rem; margin-top: 2px; }
.reqs div:last-child dd { max-width: 30ch; }
.reqs a { color: var(--lime-text); text-underline-offset: 3px; }
/* released state (filled from release.json only) */
.dl-meta { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; font-size: .875rem; text-align: left; max-width: 100%; }
.dl-meta dt { color: var(--ink-3); }
.dl-meta dd { color: var(--ink); min-width: 0; }
.dl-sha { display: flex; align-items: center; gap: 8px; }
.dl-sha code { font-size: .75rem; color: var(--ink-2); overflow-wrap: anywhere; }
.dl-copy { width: 36px; height: 36px; flex: none; }
.dl-warn { display: flex; gap: 10px; color: var(--ink-2); font-size: .875rem; text-align: left; max-width: 52ch; }
.dl-warn .i { width: 18px; height: 18px; color: var(--warn-ink); margin-top: 1px; }
.dl-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; }

/* ------------------------------------------------------------------ supporting pages */
.doc { padding: clamp(48px, 7vw, 104px) 0 var(--section); }
.doc-body { max-width: 70ch; }
.doc .lead { margin-top: 20px; }
.doc h2 { font: 650 clamp(1.375rem, 1.15rem + .7vw, 1.75rem)/1.2 var(--f-display); font-stretch: 108%; margin: clamp(44px, 5vw, 64px) 0 14px; }
.doc h3 { font: 650 1.0625rem/1.3 var(--f-text); margin: 28px 0 8px; }
.doc p, .doc li { color: var(--ink-2); }
.doc p + p { margin-top: 12px; }
.doc ul:not([class]), .doc ol:not([class]) { padding-left: 1.25em; margin: 12px 0; display: grid; gap: 6px; }
.doc a:not(.btn) { color: var(--lime-text); text-underline-offset: 3px; }
.doc strong { color: var(--ink); }
.doc pre { margin: 14px 0; padding: 16px 18px; border-radius: var(--r-panel); background: var(--sunken); border: 1px solid var(--line-1); color: var(--ink); font-size: .875rem; overflow-x: auto; }
.doc .note { margin-top: 18px; padding: 16px 18px; border-radius: var(--r-panel); border: 1px solid var(--line-2); background: var(--surface); }
.doc-updated { margin-top: 48px; color: var(--ink-3); font-size: .875rem; }
.licence-list { display: grid; margin-top: 28px; }
.licence-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 24px; padding: 18px 0; border-bottom: 1px solid var(--line-1); }
.licence-list li:first-child { border-top: 1px solid var(--line-1); }
.licence-list strong { color: var(--heading); font-weight: 650; }
.licence-list span { color: var(--ink-3); font-size: .9375rem; grid-column: 1; }
.licence-list a { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
/* the safety page: how a file moves, as two lanes */
.lanes { display: grid; gap: 14px; margin-top: 18px; }
.lanes + p { margin-top: 16px; }
.lane { padding: 20px 22px 22px; border-radius: var(--r-panel); border: 1px solid var(--line-2); background: var(--surface); }
.lane-name { display: flex; align-items: center; gap: 10px; font-weight: 650; color: var(--heading) !important; margin-bottom: 16px; }
.lane-name .i { width: 18px; height: 18px; color: var(--lime-text); }
.lane-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lane-steps li { position: relative; padding: 18px 16px 0 0; font-size: .9375rem; line-height: 1.45; }
.lane-steps li::before { content: ""; position: absolute; top: 4px; left: 0; right: 0; height: 1px; background: var(--line-3); }
.lane-steps li::after { content: ""; position: absolute; top: 0; left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--canvas); border: 2px solid var(--lime-text); }
.lane-steps li:last-child::before { right: auto; width: 0; }
.notfound { display: grid; justify-items: start; gap: 22px; padding: clamp(64px, 10vw, 140px) 0 var(--section); }
.notfound img { width: 160px; }
.notfound h1 { font: 680 clamp(2.25rem, 1.3rem + 2.9vw, 4rem)/1.0 var(--f-display); font-stretch: 112%; letter-spacing: -.026em; }

/* ------------------------------------------------------------------ footer */
.site-footer { padding: 40px 0 44px; border-top: 1px solid var(--line-1); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px 48px; }
.footer-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; color: var(--wordmark); }
.footer-brand .wordmark { height: 16px; width: auto; }
.footer-brand p { color: var(--ink-3); font-size: .8125rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 2px 22px; font-size: .875rem; }
.footer-links a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); text-decoration: none; padding: 8px 0; }
.footer-links a:hover { color: var(--heading); text-decoration: underline; text-underline-offset: 3px; }
.footer-links .i { width: 14px; height: 14px; }
/* Support (Ko-fi) stays secondary: the same quiet ink as the other footer links */

/* ------------------------------------------------------------------ motion: one load sequence, then quiet idle (transform/opacity only) */
@media (prefers-reduced-motion: no-preference) {
  .js .hero h1 .line, .js .hero-lead, .js .hero-get { animation: copy-in 800ms var(--ease) both; }
  .js .hero h1 .line:nth-child(2) { animation-delay: 90ms; }
  .js .hero-lead { animation-delay: 220ms; }
  .js .hero-get { animation-delay: 320ms; }
  .js .hero-stage { animation: window-in 1100ms var(--ease) 260ms both; }
  .js .hero-light { animation: fade-in 1400ms var(--ease) 700ms both; }
  .js .companion-hero { animation: arrive 1500ms var(--ease) 260ms both; }
  .demo-dialog[open] { animation: dialog-in 240ms var(--ease); }

  /* idle float: the whole stack bobs, the top slab drifts a little against it */
  .companion.is-idle .companion-body { animation: float 5.6s ease-in-out infinite; }
  /* the hero Companion settles downward from its resting place, never up: it must keep covering the app's own */
  .hero-stage .companion-hero.is-idle .companion-body { animation-name: float-settle; }
  .companion.is-idle .c-top { animation: slab 5.6s ease-in-out infinite; }
  .companion.is-idle .c-head { animation: head-float 5.6s ease-in-out infinite; }
  .companion.is-idle .companion-aura { animation: aura 5.6s ease-in-out infinite; }
  .companion.is-paused, .companion.is-paused * { animation-play-state: paused !important; }
  .companion.is-welcome .c-head { animation: welcome 1400ms var(--ease) 1300ms both; }
  .companion.is-nodding .c-head { animation: nod 900ms var(--ease) both; }
}
@keyframes fade-in { from { opacity: 0; } }
@keyframes copy-in { from { opacity: 0; transform: translateY(14px); } }
@keyframes window-in { from { opacity: 0; transform: translateY(36px) scale(.985); } }
@keyframes arrive { from { transform: translateY(4%); } }   /* rises into place from slightly lower; no fade of its own */
@keyframes dialog-in { from { opacity: 0; transform: translateY(10px) scale(.99); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2%); } }
@keyframes float-settle { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(1.2%); } }
@keyframes slab { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(.45%); } }
@keyframes head-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-.5%); } }
@keyframes aura { 0%, 100% { opacity: .85; transform: scale(1); } 50% { opacity: 1; transform: scale(1.04); } }
@keyframes welcome { 0% { transform: rotate(0); } 35% { transform: rotate(-4deg); } 70% { transform: rotate(-4deg); } 100% { transform: rotate(0); } }
@keyframes nod { 0%, 50%, 100% { transform: translateY(0) rotate(0); } 25%, 75% { transform: translateY(2.5%) rotate(1deg); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 1ms !important; animation: none !important; }
}

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1240px) {
  .stage-grid { grid-template-columns: minmax(0, 1fr) 180px minmax(0, 1fr); }
  .companion-sort { width: 140px; }
}
@media (max-width: 1080px) {
  .primary-nav { display: none; }
  .header-actions { margin-left: auto; }
  .menu-toggle { display: inline-grid; }
  .support-icon { display: none; }   /* below the desktop nav, Support lives in the menu */
  .stage .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stage-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .middle { grid-column: 1 / -1; grid-row: 2; grid-template-columns: auto 1fr auto; text-align: left; align-items: center; padding-top: 0; }
  .companion-sort { width: 96px; }
  .stage-status { min-height: 0; max-width: none; }
  .dest { grid-row: 3; grid-column: 1 / -1; }
  .plan { grid-column: 1 / -1; }
  .assure { grid-template-columns: minmax(0, 1fr); }
  .assure-list { grid-column: 1; grid-row: auto; }
  .assure-links { grid-row: 3; }
}
@media (max-width: 760px) {
  :root { --header-h: 64px; }
  .header-row { gap: 12px; }
  .hero { padding-top: calc(var(--header-h) + 28px); }
  .hero h1 { letter-spacing: -.03em; }
  /* phones: the window is shown larger than the screen, its right side (plan and Companion) in view */
  .hero-stage { width: 168%; margin-left: -71%; margin-top: 120px; } /* the ear stays clear of the screen edge */
  .hero-window { border-radius: 12px; }
  .soon { padding-left: 18px; gap: 10px; }
  .stage .steps { padding: 0 16px; gap: 0 12px; }
  .step { padding: 14px 0 12px; font-size: .875rem; }
  .stage { margin-inline: calc(-1 * var(--gutter) + 8px); border-radius: 16px; }
  .stage-grid { padding: 20px 16px; gap: 20px; }
  .middle { grid-template-columns: auto 1fr; }
  .middle [data-replay] { grid-column: 1 / -1; justify-self: start; }
  .companion-sort { width: 84px; }
  .outcomes, .destinations { gap: 6px; }
  .stage-col h3 { margin-bottom: 10px; }
  .outcome { grid-template-columns: 28px 30px 1fr; padding: 8px 10px; gap: 10px; border-radius: 10px; }
  .o-icon { width: 28px; height: 28px; }
  .o-icon .i { width: 16px; height: 16px; }
  .o-count { font-size: 1.3125rem; }
  .o-text { font-size: .875rem; }
  .o-text span { font-size: .75rem; }
  .destination { padding: 8px 10px; gap: 10px; border-radius: 10px; }
  .d-text strong { font-size: .875rem; }
  .d-text code { font-size: .6875rem; }
  .d-count { font-size: .8125rem; }
  .stage-status { font-size: .875rem; }
  .stage-caption { padding: 16px; }
  .tablist { display: flex; }
  .tablist [role="tab"] { padding: 0 16px; }
  .shot { margin-inline: calc(-1 * var(--gutter) + 8px); }
  .shot img { border-radius: 12px; }
  .assure-list { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .reqs { display: grid; width: 100%; justify-content: stretch; }
  .reqs div { border-left: 0; border-top: 1px solid var(--line-1); padding: 14px 0; text-align: center; }
  .reqs div:first-child { border-top: 0; }
  .reqs div:last-child dd { max-width: none; }
  .lane-steps { grid-template-columns: 1fr; }
  .lane-steps li { padding: 0 0 14px 24px; }
  .lane-steps li::before { top: 6px; bottom: -6px; left: 4px; right: auto; width: 1px; height: auto; }
  .lane-steps li::after { top: 2px; }
  .licence-list li { grid-template-columns: 1fr; }
  .licence-list a { grid-column: 1; grid-row: auto; }
  .footer-row { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 440px) {
  .soon { gap: 8px; padding-left: 16px; font-size: .9375rem; }
  .soon-label { white-space: nowrap; gap: 8px; }
  .soon-label .i { width: 16px; height: 16px; }
  .soon-tag { padding: 8px 11px; font-size: .8125rem; }
  .soon-large { min-height: 52px; }
}
@media (max-width: 380px) {
  .btn { white-space: normal; text-align: center; line-height: 1.25; padding-block: 10px; }
  .soon { flex-wrap: wrap; border-radius: 20px; padding: 10px 10px 10px 16px; }
  .stage .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (forced-colors: active) {
  .btn-primary { border-color: ButtonText; }
  .soon, .soon-tag { border-color: GrayText; color: GrayText; }
  .token-y { forced-color-adjust: none; }
  .state-dot { forced-color-adjust: none; }
}
