/* DemandMatch company site.
   Design: a terminal. Monospace throughout (Geist Mono), near-black with a green tint, one phosphor-green accent, amber only for warnings.
   Motion tells one story, scattered demand meeting stock: the ASCII stream in the hero, the command that runs, the sources that sort themselves, the step-driven pane.
   Shape rule: everything is near-square (4px), windows 6px. A faint scanline lies over the whole page. No third-party code or fonts. */
@font-face { font-family: "Geist Mono"; src: url("assets/fonts/GeistMono-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #090c0a; --bg-2: #0c110e; --surface: #0f1511; --surface-2: #131b16;
  --ink: #d6e4da; --ink-2: #8fa598; --ink-3: #56685d;
  --line: rgb(140 220 170 / .09); --line-2: rgb(140 220 170 / .18);
  --acc: #4be08a; --acc-hi: #7cf0ad; --acc-rgb: 75 224 138; --warn: #e8b45a;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --r: 6px; --r-sm: 4px; --width: 1240px; --pad: clamp(1rem, 4vw, 2.2rem);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --k: 1; /* how far the problem chips scatter; smaller on phones */
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; background: var(--bg); overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.65 var(--mono); -webkit-font-smoothing: antialiased; overflow-x: clip; }
/* the scanline: very faint, never in the way */
body::after { content: ""; position: fixed; inset: 0; z-index: 50; pointer-events: none; background: repeating-linear-gradient(0deg, rgb(0 0 0 / .12) 0 1px, transparent 1px 3px); mix-blend-mode: multiply; }
img { display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 500; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.wrap { max-width: var(--width); margin: 0 auto; padding: 0 var(--pad); }
.ph-light { line-height: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
::selection { background: var(--acc); color: var(--bg); }
#top-sentinel { position: absolute; top: 0; height: 40px; width: 1px; }
.c, .hash, .ps1, .prompt { color: var(--acc); }
.lvl { font-weight: 500; }
.lvl.ok { color: var(--acc); } .lvl.warn { color: var(--warn); } .lvl.info { color: var(--ink-3); } .lvl.wait { color: var(--acc-hi); }
.cur { display: inline-block; width: .6em; height: 1.1em; vertical-align: -.18em; margin-left: .1em; background: var(--acc); }
.motion .cur { animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------------------------------------------------------------- windows: the one container on this page */
.term { position: relative; border-radius: var(--r); background: rgb(15 21 17 / .88); border: 1px solid var(--line-2); box-shadow: 0 30px 80px -40px rgb(0 0 0 / .9), 0 0 0 1px rgb(0 0 0 / .4); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.term-bar { display: flex; align-items: center; gap: .8rem; height: 34px; padding: 0 .9rem; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--ink-3); }
.dots { display: flex; gap: 6px; } .dots i { width: 9px; height: 9px; border-radius: 50%; background: #233029; } .dots i:first-child { background: rgb(var(--acc-rgb) / .55); }
.term-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.term-size { margin-left: auto; opacity: .7; }
.term-body { padding: 1rem 1.1rem 1.2rem; font-size: 13.5px; line-height: 1.75; }

/* ---------------------------------------------------------------- header: a status bar */
.top { position: fixed; inset: 0 0 auto; z-index: 20; border-bottom: 1px solid transparent; transition: background-color 300ms, border-color 300ms; }
.top.scrolled, .legal-page .top { background: rgb(9 12 10 / .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--line); }
.top-in { display: flex; align-items: center; gap: 2.2rem; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; font-weight: 600; letter-spacing: -.02em; font-size: 15px; }
.brand .host { font-style: normal; font-weight: 400; color: var(--ink-3); margin-left: -.45rem; }
.brand-sm { font-size: 13.5px; gap: .5rem; }
.nav { display: flex; gap: 1.6rem; margin-right: auto; counter-reset: nav; }
.nav a { text-decoration: none; color: var(--ink-2); font-size: 13px; transition: color 200ms; counter-increment: nav; }
.nav a::before { content: "0" counter(nav) " "; color: var(--ink-3); transition: color 200ms; }
.nav a:hover { color: var(--ink); } .nav a:hover::before { color: var(--acc); }
.top-r { display: flex; align-items: center; gap: .9rem; margin-left: auto; }
.lang { display: flex; align-items: center; font-size: 12.5px; color: var(--ink-3); }
.lang button + button::before { content: "|"; margin-right: .5rem; color: var(--ink-3); }
.lang button { border: 0; background: none; font: inherit; padding: 4px 0 4px .5rem; color: var(--ink-3); cursor: pointer; transition: color 200ms; }
.lang button:first-child { padding-left: 0; }
.lang button[aria-pressed="true"] { color: var(--acc); }
.lang button:hover { color: var(--ink); }

/* ---------------------------------------------------------------- buttons: commands */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .6rem; height: 46px; padding: 0 20px; border-radius: var(--r-sm); border: 1px solid transparent; font: inherit; font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color 200ms, border-color 200ms, color 200ms, box-shadow 250ms, transform 500ms var(--ease); }
.btn:active { scale: .98; }
.btn .ph-light { font-size: 16px; transition: transform 300ms var(--ease); }
.btn:hover .ph-light { transform: translateX(4px); }
.btn-primary { background: var(--acc); color: #06110a; box-shadow: 0 0 0 1px rgb(var(--acc-rgb) / .4), 0 0 28px -6px rgb(var(--acc-rgb) / .55); }
.btn-primary .prompt { color: rgb(6 17 10 / .55); }
.btn-primary:hover { background: var(--acc-hi); box-shadow: 0 0 0 1px rgb(var(--acc-rgb) / .6), 0 0 40px -4px rgb(var(--acc-rgb) / .7); }
.btn-ghost { border-color: var(--line-2); color: var(--ink); background: rgb(var(--acc-rgb) / .03); }
.btn-ghost:hover { border-color: rgb(var(--acc-rgb) / .5); background: rgb(var(--acc-rgb) / .07); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 12.5px; }
.btn-lg { height: 50px; padding: 0 22px; font-size: 14.5px; }
.btn-xl { height: 58px; padding: 0 28px; font-size: 16px; }
.btn:focus-visible, .nav a:focus-visible, .lang button:focus-visible, .mail-line:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; isolation: isolate; background: radial-gradient(60% 55% at 72% 50%, rgb(var(--acc-rgb) / .07), transparent 70%); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 48px 48px; -webkit-mask-image: radial-gradient(70% 70% at 60% 45%, #000 20%, transparent 75%); mask-image: radial-gradient(70% 70% at 60% 45%, #000 20%, transparent 75%); opacity: .55; }
.field { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(2.5rem, 5vw, 5rem); align-items: center; width: 100%; padding-top: 7rem; padding-bottom: 6rem; }
.eyebrow { font-size: 12.5px; color: var(--ink-2); margin-bottom: 1.6rem; }
.kin { font-size: clamp(2.1rem, 3.9vw, 3.7rem); line-height: 1.08; letter-spacing: -.045em; max-width: 17ch; font-weight: 600; text-wrap: balance; }
.kin .acc { color: var(--acc); text-shadow: 0 0 24px rgb(var(--acc-rgb) / .45); }
.lead { margin-top: 1.8rem; font-size: clamp(.98rem, 1.15vw, 1.08rem); line-height: 1.7; color: var(--ink-2); max-width: 46ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2.4rem; }
.term-hero .term-body { min-height: 19.5em; }
.cmd { color: var(--ink); white-space: pre-wrap; overflow-wrap: break-word; }
.log li { display: grid; grid-template-columns: 4.4em 4.6em minmax(0, 1fr); gap: 0 .2em; color: var(--ink-2); }
.log .ts { color: var(--ink-3); }
.log li.done { margin-top: .6rem; color: var(--ink); }
.motion .log li { animation: line 260ms steps(3) both; }
@keyframes line { from { opacity: 0; } }
.legend { position: absolute; left: var(--pad); bottom: 1.6rem; display: flex; gap: 1.4rem; font-size: 11.5px; color: var(--ink-3); }
.legend > span { display: inline-flex; align-items: center; gap: .45rem; }
.legend b { font-weight: 600; font-size: 14px; } .gd { color: var(--ink); } .gs { color: var(--acc); } .gm { color: #fff; }

/* ---------------------------------------------------------------- shared section type */
.sec { padding: clamp(5.5rem, 11vw, 9rem) 0; position: relative; border-top: 1px solid var(--line); }
.h2 { font-size: clamp(1.75rem, 3.2vw, 2.8rem); line-height: 1.12; letter-spacing: -.04em; max-width: 24ch; text-wrap: balance; font-weight: 600; }
.sub { margin-top: 1.2rem; color: var(--ink-2); font-size: 1rem; line-height: 1.7; max-width: 58ch; }

/* ---------------------------------------------------------------- problem: scattered sources sort into one list */
.scatter { position: relative; border-top: 1px solid var(--line); background: radial-gradient(60% 60% at 80% 50%, rgb(var(--acc-rgb) / .05), transparent 70%), var(--bg); }
.stage { padding: clamp(5.5rem, 11vw, 8rem) 0; }
.stage-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); gap: clamp(3rem, 7vw, 6rem); align-items: center; }
.stage-copy { position: relative; z-index: 2; }
.probs { display: flex; flex-direction: column; gap: .9rem; margin-top: 2.2rem; }
.pb { display: grid; grid-template-columns: 4.6em minmax(0, 1fr); gap: .4rem; align-items: start; padding: .9rem 1rem; border-left: 2px solid rgb(232 180 90 / .5); background: rgb(232 180 90 / .035); }
.pb b { display: block; font-weight: 600; font-size: 1rem; }
.pb small { display: block; color: var(--ink-2); font-size: 13.5px; line-height: 1.6; margin-top: .25rem; }
.tray { position: relative; z-index: 1; }
.chips { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1rem; padding: 1.2rem 1.2rem .4rem; }
.chips li { padding: .45rem .6rem; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line-2); font-size: 13.5px; text-transform: lowercase; white-space: nowrap; }
.chips li::before { content: "› "; color: var(--acc); }
.tray-ok { padding: .6rem 1.2rem 1.1rem; font-size: 13px; color: var(--ink-2); }

/* ---------------------------------------------------------------- approach: the pane follows the step being read */
.story-h { max-width: 820px; }
.story-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(3rem, 7vw, 6rem); margin-top: clamp(2rem, 4vw, 3rem); }
.story-stick { position: sticky; top: 16vh; align-self: start; }
.steps { display: flex; flex-direction: column; }
.step { min-height: 62vh; display: flex; flex-direction: column; justify-content: center; padding: 2rem 0; opacity: .28; transition: opacity 500ms var(--ease); }
.step.on { opacity: 1; }
.step-cmd { font-size: 13px; color: var(--acc); }
.step h3 { font-size: clamp(1.8rem, 3.2vw, 2.7rem); letter-spacing: -.045em; line-height: 1.1; margin: 1rem 0 .9rem; font-weight: 600; }
.step p { color: var(--ink-2); font-size: 1.02rem; line-height: 1.7; max-width: 38ch; }

.panel-in { padding: 1.1rem 1.1rem 0; }
.panel-head { display: grid; grid-template-columns: 1fr 44px 1fr; padding: 0 .1rem .7rem; font-size: 11px; color: var(--ink-3); text-transform: lowercase; }
.panel-head span::before { content: "# "; }
.panel-head span:last-child { grid-column: 3; }
.panel-body { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr); }
.pl { position: relative; z-index: 1; display: flex; flex-direction: column; gap: .5rem; }
.pl-s { grid-column: 3; }
.pl li { position: relative; display: flex; align-items: center; gap: .55rem; padding: .55rem .65rem; border-radius: var(--r-sm); background: rgb(var(--acc-rgb) / .025); border: 1px solid var(--line); transition: opacity 500ms var(--ease), border-color 500ms var(--ease), transform 500ms var(--ease); }
.mi { flex: none; width: 1.1em; color: var(--ink-3); font-weight: 600; transition: color 400ms; }
.mt { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.mt b { font-size: 12.5px; font-weight: 500; }
.mt small { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag { position: absolute; right: .45rem; bottom: -.6rem; font-style: normal; font-size: 10.5px; padding: .05rem .4rem; border-radius: 3px; background: #0f2a1a; border: 1px solid rgb(var(--acc-rgb) / .45); color: var(--acc-hi); opacity: 0; transform: translateY(4px); transition: opacity 400ms var(--ease), transform 400ms var(--ease); white-space: nowrap; }
.pl-links { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.pl-links path { fill: none; stroke: var(--acc); stroke-width: 1.5; stroke-dasharray: 1; stroke-dashoffset: 1; filter: drop-shadow(0 0 4px rgb(var(--acc-rgb) / .7)); }
.panel-foot { display: flex; align-items: center; gap: .8rem; margin: 1.1rem -1.1rem 0; padding: .85rem 1.1rem; border-top: 1px solid var(--line); opacity: .22; transition: opacity 500ms var(--ease); font-size: 12.5px; }
.pf-t { display: flex; flex-direction: column; line-height: 1.35; margin-right: auto; } .pf-t b { font-weight: 500; } .pf-t small { font-size: 11.5px; color: var(--ink-3); }
.approve { position: relative; display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: var(--r-sm); background: var(--acc); color: #06110a; font-size: 12px; font-weight: 600; }
.approve::before { content: "[y] "; white-space: pre; opacity: .6; }
/* step 0, understand: each request is read and tagged; stock waits */
.panel[data-step="0"] .pl-d li .tag { opacity: 1; transform: none; transition-delay: calc(var(--i) * 140ms + 150ms); }
.panel[data-step="0"] .pl-d li { border-color: rgb(var(--acc-rgb) / .3); }
.panel[data-step="0"] .pl-s li { opacity: .3; transform: translateX(8px); }
.panel[data-step="0"] .pl-links path { opacity: 0; }
/* step 1, match: the links draw one after another */
.panel[data-step="1"] .pl li .mi, .panel[data-step="2"] .pl li .mi { color: var(--acc); }
.panel[data-step="1"] .pl-links path { animation: draw 900ms var(--ease) calc(var(--i) * 180ms + 100ms) forwards; }
/* step 2, act: the draft waits for a person */
.panel[data-step="2"] .pl-links path { stroke-dashoffset: 0; opacity: .45; }
.panel[data-step="2"] .panel-foot { opacity: 1; }
.panel[data-step="2"] .approve::after { content: ""; position: absolute; inset: -4px; border-radius: 6px; border: 1px solid var(--acc); animation: ring 1.8s var(--ease) infinite; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes ring { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(1.3); } }

.outcomes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--line); }
.outcomes li { display: flex; gap: .6rem; padding: 1.6rem 1.2rem 0 0; font-size: clamp(1rem, 1.35vw, 1.2rem); letter-spacing: -.02em; line-height: 1.35; }
.outcomes li + li { padding-left: 1.2rem; border-left: 1px solid var(--line); }
.plus { color: var(--acc); font-weight: 600; }

/* ---------------------------------------------------------------- principles: five files */
.bento { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 1rem; margin-top: clamp(2.4rem, 5vw, 3.4rem); }
.b { overflow: hidden; isolation: isolate; }
.b::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), rgb(var(--acc-rgb) / .1), transparent 45%); opacity: 0; transition: opacity 300ms; }
.b:hover::before { opacity: 1; }
.b-in { padding: 1.5rem 1.4rem 1.6rem; }
.b h3 { font-size: 1.08rem; letter-spacing: -.02em; margin-bottom: .55rem; font-weight: 600; }
.b h3::before { content: "## "; color: var(--ink-3); }
.b p { color: var(--ink-2); font-size: 13.5px; line-height: 1.65; }
.b-key { grid-row: span 2; display: flex; flex-direction: column; border-color: rgb(var(--acc-rgb) / .4); background: linear-gradient(180deg, rgb(var(--acc-rgb) / .08), rgb(15 21 17 / .9) 55%); box-shadow: 0 0 60px -20px rgb(var(--acc-rgb) / .35); }
.b-key .b-in { display: flex; flex-direction: column; justify-content: flex-end; flex: 1; gap: .2rem; padding-top: 2.4rem; }
.big-rule { display: block; margin-bottom: auto; padding-bottom: 3rem; font-size: clamp(1.1rem, 1.8vw, 1.5rem); color: var(--acc); text-shadow: 0 0 20px rgb(var(--acc-rgb) / .4); word-break: break-word; }
.b-key h3 { font-size: clamp(1.7rem, 2.7vw, 2.4rem); letter-spacing: -.045em; line-height: 1.1; margin-bottom: .8rem; }
.b-key h3::before { content: none; }
.b-key p { color: var(--ink); font-size: 1rem; max-width: 30ch; }

/* ---------------------------------------------------------------- sectors: one slow band */
.sectors { padding: clamp(5rem, 10vw, 7.5rem) 0; border-top: 1px solid var(--line); overflow: hidden; }
.marquee { margin-top: clamp(2.4rem, 5vw, 3.4rem); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.mq-track { display: flex; width: max-content; }
.mq-i { display: inline-flex; align-items: center; gap: 2.2rem; padding-right: 2.2rem; font-size: clamp(1.5rem, 3.4vw, 2.8rem); letter-spacing: -.045em; font-weight: 600; white-space: nowrap; }
.mq-i::after { content: "◆"; font-size: .45em; color: var(--acc); }

/* ---------------------------------------------------------------- team */
.team { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem 5rem; align-items: end; }
.who { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; padding: .15rem 0; }
.who b { font-weight: 600; color: var(--acc-hi); }
.who span { color: var(--ink-2); }
.who a { color: inherit; text-decoration: none; text-underline-offset: .2em; }
.who a span { color: inherit; opacity: .7; }
.who a:hover, .who a:focus-visible { text-decoration: underline; }
.whoami .cmd + .who { margin-top: .4rem; } .whoami .who + .cmd { margin-top: .6rem; }

/* ---------------------------------------------------------------- contact: the brightest moment on the page */
.contact { position: relative; overflow: hidden; isolation: isolate; padding: clamp(6.5rem, 13vw, 11rem) 0; border-top: 1px solid var(--line); background: radial-gradient(55% 70% at 20% 60%, rgb(var(--acc-rgb) / .12), transparent 70%); }
.contact-cmd { font-size: 13.5px; color: var(--ink-2); margin-bottom: 1.6rem; }
.huge { font-size: clamp(2.3rem, 5.4vw, 5rem); line-height: 1.05; letter-spacing: -.055em; max-width: 18ch; }
.contact-act { display: flex; align-items: center; flex-wrap: wrap; gap: 1.2rem 2rem; margin-top: 2.6rem; }
.mail-line { display: inline-flex; color: var(--ink-2); text-decoration: none; font-size: 14.5px; }
.mail-line:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

/* ---------------------------------------------------------------- footer */
.foot { border-top: 1px solid var(--line); padding: 1.6rem 0 2rem; font-size: 12.5px; color: var(--ink-3); }
.foot-in { display: flex; align-items: center; gap: 1rem 2rem; flex-wrap: wrap; }
.foot .brand { color: var(--ink); }
.foot-c { margin-right: auto; }
.foot nav { display: flex; gap: 1.4rem; } .foot a { text-decoration: none; } .foot nav a:hover { color: var(--ink); }

/* ---------------------------------------------------------------- motion (only when the visitor has not asked for less) */
.motion .rise { animation: rise 900ms var(--ease) both; animation-delay: calc(var(--d) * 80ms + 150ms); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.motion .rv { opacity: 0; transform: translateY(20px); transition: opacity 800ms var(--ease), transform 800ms var(--ease); }
.motion .rv.in { opacity: 1; transform: none; }
.motion .outcomes .rv:nth-child(2), .motion .bento .rv:nth-child(2) { transition-delay: 90ms; }
.motion .outcomes .rv:nth-child(3), .motion .bento .rv:nth-child(3) { transition-delay: 180ms; }
.motion .outcomes .rv:nth-child(4), .motion .bento .rv:nth-child(4) { transition-delay: 140ms; }
.motion .bento .rv:nth-child(5) { transition-delay: 230ms; }
.motion .mq-track { animation: marquee 52s linear infinite; }
.motion .marquee:hover .mq-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* the problem section without scroll-driven animations: the chips sort themselves once when the section arrives */
.motion:not(.sda) .scatter .chips li { transform: translate(calc(var(--sx) * var(--k)), var(--sy)) rotate(var(--r)); opacity: .5; transition: transform 1500ms var(--ease), opacity 1500ms var(--ease); }
.motion:not(.sda) .scatter .chips li:nth-child(odd) { transition-delay: 120ms; }
.motion:not(.sda) .scatter.in .chips li { transform: none; opacity: 1; }
.motion:not(.sda) .scatter .tray-ok { opacity: 0; transition: opacity 600ms 1300ms; }
.motion:not(.sda) .scatter.in .tray-ok { opacity: 1; }
/* with scroll-driven animations: the stage stays while scrolling, the chips sort and the warnings print in turn */
.sda .scatter { height: 260vh; view-timeline: --sc block; }
.sda .stage { position: sticky; top: 0; height: 100dvh; display: flex; align-items: center; padding: 60px 0 0; }
.sda .stage-in { width: 100%; }
.sda .chips li { animation: gather linear both; animation-timeline: --sc; animation-range: contain 0% contain 55%; }
.sda .tray-ok { animation: trayOn linear both; animation-timeline: --sc; animation-range: contain 50% contain 62%; }
.sda .pb { animation: pbIn linear both; animation-timeline: --sc; }
.sda .pb1 { animation-range: contain 8% contain 24%; } .sda .pb2 { animation-range: contain 26% contain 42%; } .sda .pb3 { animation-range: contain 44% contain 60%; }
@keyframes gather { from { transform: translate(calc(var(--sx) * var(--k)), var(--sy)) rotate(var(--r)); opacity: .45; } 70% { opacity: 1; } to { transform: none; opacity: 1; } }
@keyframes trayOn { from { opacity: 0; } }
@keyframes pbIn { from { opacity: 0; transform: translateY(20px); } }

/* ---------------------------------------------------------------- legal pages */
.legal { padding: clamp(7rem, 10vw, 9rem) 0 clamp(3rem, 6vw, 5rem); }
.legal .wrap { max-width: 780px; }
.legal h1 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); letter-spacing: -.04em; margin-bottom: 1.6rem; font-weight: 600; }
.legal h1::before { content: "# "; color: var(--acc); }
.legal h2 { font-size: 1.05rem; margin: 2rem 0 .5rem; font-weight: 600; }
.legal h2::before { content: "## "; color: var(--ink-3); }
.legal p, .legal li { color: var(--ink-2); font-size: 14px; }
.legal a { color: var(--acc-hi); }
.legal p + p { margin-top: .6rem; }
.todo { background: #3d3410; color: #f3dc8a; padding: 0 .3em; border-radius: 3px; }
.note { margin-bottom: 1.6rem; padding: .9rem 1.1rem; border-left: 2px solid var(--warn); background: rgb(232 180 90 / .07); color: #f3dc8a; font-size: 13.5px; }
.back { display: inline-flex; align-items: center; gap: .4rem; margin-bottom: 1.6rem; color: var(--ink-3); text-decoration: none; font-size: 13px; }
.back:hover { color: var(--acc); }

/* ---------------------------------------------------------------- smaller screens: every multi-column layout collapses to one column */
@media (max-width: 1000px) {
  :root { --k: .45; }
  .nav { display: none; }
  .hero-in, .stage-in, .story-grid, .team { grid-template-columns: 1fr; }
  .hero-in { padding-top: 6.5rem; padding-bottom: 5rem; }
  .legend { display: none; }
  .story-stick { position: sticky; top: 70px; z-index: 2; }
  .step { min-height: 0; padding: 2.4rem 0; }
  .outcomes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .outcomes li:nth-child(3) { padding-left: 0; border-left: 0; }
  .outcomes li:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 1.6rem; }
  .bento { grid-template-columns: 1fr 1fr; }
  .b-key { grid-row: auto; grid-column: span 2; }
  .big-rule { padding-bottom: 1.6rem; }
  /* the problem section scrolls normally on small screens; the chips sort as it passes */
  .sda .scatter { height: auto; }
  .sda .stage { position: static; height: auto; padding: clamp(5rem, 12vw, 7rem) 0; display: block; }
  .sda .chips li { animation-range: entry 30% cover 55%; }
  .sda .tray-ok { animation-range: cover 40% cover 55%; }
  .sda .pb { animation: none; }
}
@media (max-width: 680px) {
  body { font-size: 14px; }
  .top-in { gap: 1rem; }
  .brand .host { display: none; }
  .top-r .btn-sm { display: none; }
  .term-body { padding: .9rem .85rem 1rem; font-size: 12px; }
  .term-hero .term-body { min-height: 22em; }
  .log li { grid-template-columns: 4em minmax(0, 1fr); }
  .log .ts { display: none; }
  .cta-row .btn { height: 48px; padding: 0 18px; font-size: 14px; }
  .story-stick { position: static; }
  .step { opacity: 1; }
  .panel-in { padding: .9rem .8rem 0; }
  .panel-head, .panel-body { grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr); }
  .pl li { padding: .45rem; gap: .4rem; }
  .mt b { font-size: 11.5px; } .mt small { font-size: 10.5px; }
  .tag { display: none; }
  .panel-foot { margin: 1rem -.8rem 0; padding: .8rem; flex-wrap: wrap; }
  .outcomes, .bento { grid-template-columns: 1fr; }
  .outcomes li, .outcomes li + li { padding: 1.3rem 0 0; border-left: 0; }
  .outcomes li + li { border-top: 1px solid var(--line); margin-top: 1.3rem; }
  .b-key { grid-column: auto; }
  .chips { gap: .45rem .6rem; padding: 1rem .9rem .3rem; }
  .chips li { font-size: 12px; padding: .4rem .5rem; }
  .who { grid-template-columns: 1fr; gap: 0; padding: .3rem 0; }
  .btn-xl { height: 54px; padding: 0 22px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
