/* ralphvanspanje.com, the board. Tokens first (DESIGN-SPEC section 2, verbatim), then components.
   One working board: paper, dot grid, white frames with numbered tabs, stickies that carry counts.
   ink = Ralph, --ai = Ralph's AI, --signal = the visitor. No em dashes anywhere in this file. */

:root {
  /* board surfaces */
  --board: #F6F3EC;          /* page background, the paper */
  --grid-dot: #C9C3B4;       /* dot grid, 1.1px dots on a 24px pitch */
  --surface: #FFFFFF;        /* frame surface, opaque */
  --surface-2: #FBFAF6;      /* nested sub-frame surface */
  --surface-3: #EFEBE1;      /* chips, AI bubbles, column backgrounds */
  --line: #DBD5C8;           /* hairline */
  --line-2: #C4BDAC;         /* frame border, handles */

  /* text */
  --ink: #141311;            /* headlines, body, Ralph's cursor, primary button */
  --ink-2: #45413A;          /* lead paragraphs, labels */
  --muted: #6F6A5F;          /* mono labels, captions; 4.8:1 on the board */

  /* semantic accents: ink = Ralph, --ai = Ralph's AI, --signal = the visitor */
  --signal: #E4572E;         /* the visitor: "you" tag, focus ring, live dot; large text only */
  --signal-ink: #B8401F;     /* signal as small text or inline links, 5.0:1 on the board */
  --signal-soft: rgba(228, 87, 46, .12);
  --ai: #1E8A5B;             /* Ralph's AI: cursor, selections, the green "1", pass cells */
  --ai-deep: #17744C;        /* green fill behind small white text (avatar), 5.8:1 */
  --ai-soft: rgba(30, 138, 91, .14);
  --fail: #D64B3C;           /* failed eval cell, "skill problem" (eval contexts only) */
  --amber: #D9A21B;          /* "platform problem" (eval contexts only) */
  --pass-ink: #166B46;       /* PASS chip text on --mint, 4.9:1 */
  --fail-ink: #A8321F;       /* FAIL chip text on --rose, 4.7:1 */

  /* stickies (data colours, never UI) */
  --sand: #F3E2A4;
  --mint: #CDE6D3;
  --rose: #F4D1C9;
  --sky: #CFDDF5;
  --lilac: #E1D8F2;
  --sticky-tag: rgba(20, 19, 17, .72);

  /* night (sub-frame 1.2 and the seven Miro video stages) */
  --night: #15161A;
  --night-2: #1E2026;        /* cards */
  --night-3: #282B33;        /* empty cells */
  --night-line: #30333C;
  --night-ink: #ECE8DE;      /* 14.9:1 on --night */
  --night-muted: #9A958A;    /* 6.1:1 on --night */
  --pass-night: #8FD8B2;     /* PASS text on --night-2, 9.8:1 */
  --fail-night: #F0917F;     /* FAIL text on --night-2, 7.0:1 */

  /* frame tints (one data attribute per frame, see 3.3) */
  --tint-board: #FFFFFF;
  --tint-ink: #141311;       /* Frame 02: text in --night-ink and --night-muted */
  --tint-sage: #D6DCCB;      /* Frame 03: text in --ink and --on-tint-muted */
  --tint-ochre: #E9CF86;     /* Frame 04: text in --ink and --on-tint-muted */
  --tint-signal: #C94A22;    /* Frame 06: small text #FFFFFF (4.7:1), display text --board */
  --on-tint-muted: #45413A;  /* captions on sage and ochre, 6.6:1 or better */
  --on-signal: #FFFFFF;
  --on-signal-display: #F6F3EC;

  /* materials for the personal video stages (compositions only) */
  --cork: #4B3626;
  --cork-2: #5A4330;
  --string: #C8322B;
  --paper-card: #F7F1E3;
  --term: #1B1915;
  --term-line: #2A2620;
  --parchment-ink: #E9DFC8;
  --market: #F0EFEA;
  --draft: #ECEAE3;

  /* type */
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --fs-h1: clamp(44px, 6vw, 84px);        /* Fraunces 500, lh .98, ls -.025em, text-wrap balance */
  --fs-h2: clamp(34px, 3.6vw, 52px);      /* Fraunces 500, lh 1.02, ls -.022em */
  --fs-h3: clamp(26px, 2.7vw, 38px);      /* Fraunces 500, lh 1.08, ls -.018em */
  --fs-counter: clamp(56px, 7vw, 116px);  /* the pinned 7 and 1, Fraunces 500, lh .9, ls -.04em, tabular */
  --fs-stat: clamp(44px, 4.2vw, 64px);    /* stats-row numerals, Fraunces 500, lh 1, ls -.03em, tabular */
  --fs-sticky-num: 56px;                  /* hero sticky numeral (44px on 156px strip cards) */
  --fs-quote: 22px;                       /* quote stickies, Fraunces 400 italic, lh 1.15 */
  --fs-lead: 18px;                        /* Instrument Sans 400, lh 1.55, --ink-2, max 560px */
  --fs-body: 17px;                        /* Instrument Sans 400, lh 1.6, --ink-2, max 62ch */
  --fs-ui: 14px;                          /* Instrument Sans 500, buttons 15px */
  --fs-sticky: 13px;                      /* sticky meaning line, Instrument Sans 500, lh 1.3 */
  --fs-mono: 11.5px;                      /* DM Mono 500, uppercase, ls .08em */
  --fs-micro: 10.5px;                     /* DM Mono 500, uppercase, ls .1em: sticky labels, tiny tags */
  --fs-mono-body: 12.5px;                 /* DM Mono 400, lh 1.5: footers, terminal */

  /* spacing */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px;
  --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px; --s-11: 192px;
  --pad: clamp(20px, 5vw, 72px);          /* page gutter */
  --frame-pad: clamp(28px, 4vw, 64px);
  --sub-pad: clamp(22px, 3vw, 44px);
  --frame-gap: 140px;                     /* 90px under 900px */
  --chrome-h: 56px;
  --grid-size: 24px;                      /* 14px inside mini boards, 20px on video stages */

  /* radii */
  --r-frame: 6px; --r-card: 10px; --r-mini: 8px; --r-sticky: 2px; --r-image: 4px;
  --r-tag: 6px; --r-pill: 999px;

  /* borders */
  --bw-frame: 1.5px; --bw-sub: 1px; --bw-sel: 1.5px; --handle: 9px;

  /* shadows (frames have none: they are flat surfaces on the board) */
  --shadow-sticky: 0 1px 2px rgba(20, 19, 17, .08), 0 10px 24px -14px rgba(20, 19, 17, .35);
  --shadow-sticky-hover: 0 2px 4px rgba(20, 19, 17, .08), 0 18px 36px -16px rgba(20, 19, 17, .45);
  --shadow-rail: 0 2px 6px rgba(20, 19, 17, .06), 0 24px 48px -24px rgba(20, 19, 17, .35);
  --shadow-panel-night: 0 1px 2px rgba(0, 0, 0, .25), 0 30px 60px -36px rgba(0, 0, 0, .6);

  /* z-index layers */
  --z-grid: 0; --z-board: 1; --z-tab: 2; --z-lift: 3; --z-you: 7;
  --z-rail: 56; --z-chrome: 60; --z-fly: 80; --z-skip: 100;

  /* motion (CSS side; JS uses the GSAP names listed below) */
  --ease-place: cubic-bezier(.16, 1, .3, 1);        /* expo.out */
  --ease-settle: cubic-bezier(.34, 1.56, .64, 1);   /* back.out(1.4) */
  --ease-hover: cubic-bezier(.2, .8, .2, 1);
  --ease-inout: cubic-bezier(.65, 0, .35, 1);       /* power2.inOut */
  --d-place: 1000ms; --d-group: 950ms; --d-settle: 700ms; --d-hop: 450ms; --d-draw: 450ms;
  --d-line: 1150ms; --d-count: 900ms; --d-hover: 300ms; --d-tab: 700ms;
  --stagger: 80ms; --stagger-line: 90ms;
}

/* responsive type scale (spec 2.1) */
@media (max-width: 1239px) { :root { --fs-h1: clamp(40px, 5.2vw, 64px); } }
@media (max-width: 599px) {
  :root { --fs-h1: clamp(38px, 11vw, 46px); --fs-h2: clamp(30px, 8.6vw, 40px); --fs-h3: clamp(24px, 7vw, 30px);
          --fs-lead: 16px; --fs-body: 16px; --fs-sticky: 12.5px; }
}
@media (max-width: 899px) { :root { --frame-gap: 90px; } }

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
html, body { margin: 0; overflow-x: clip; }
body {
  background: var(--board); color: var(--ink);
  font-family: var(--body); font-size: var(--fs-body); line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img, svg, video { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
p, h1, h2, h3, h4, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
em { font-style: italic; font-weight: 400; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
::selection { background: var(--ink); color: var(--board); }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

.skip { position: fixed; left: 16px; top: -100px; z-index: var(--z-skip); padding: 10px 14px; background: var(--ink); color: var(--board);
  border-radius: var(--r-tag); font-size: var(--fs-ui); font-weight: 500; }
.skip:focus { top: 12px; }

/* ------------------------------------------------------------------ type */
.mono { font-family: var(--mono); font-size: var(--fs-mono); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; line-height: 1.3; }
.micro { font-family: var(--mono); font-size: var(--fs-micro); font-weight: 500; letter-spacing: .1em; text-transform: uppercase; line-height: 1.3; }
.mono-body { font-family: var(--mono); font-size: var(--fs-mono-body); font-weight: 400; line-height: 1.5; letter-spacing: 0; text-transform: none; }
.h1 { font-family: var(--display); font-weight: 500; font-size: var(--fs-h1); line-height: .98; letter-spacing: -.025em; text-wrap: balance; }
.h2 { font-family: var(--display); font-weight: 500; font-size: var(--fs-h2); line-height: 1.02; letter-spacing: -.022em; text-wrap: balance; }
.h3 { font-family: var(--display); font-weight: 500; font-size: var(--fs-h3); line-height: 1.08; letter-spacing: -.018em; text-wrap: balance; }
.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--ink-2); max-width: 560px; }
.copy p { font-size: var(--fs-body); line-height: 1.6; color: var(--ink-2); max-width: 62ch; }
.copy p + p { margin-top: 1em; }
.line { display: block; overflow: hidden; padding-bottom: .14em; margin-bottom: -.14em; }
.line__in { display: block; }
.arr { font-family: var(--body); font-weight: 400; font-size: .5em; color: var(--signal-ink); vertical-align: .22em; margin: 0 .12em; letter-spacing: 0; }
.tabular { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ chrome */
.chrome {
  position: fixed; top: 0; left: 0; right: 0; height: var(--chrome-h); z-index: var(--z-chrome);
  display: flex; align-items: center; gap: 14px; padding: 0 16px 0 20px;
  background: rgba(246, 243, 236, .86); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.chrome__glyph { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 6px; }
.chrome__glyph svg { width: 20px; height: 20px; }
.chrome__name { font-weight: 600; font-size: 14px; letter-spacing: -.005em; white-space: nowrap; }
.chrome__crumb { color: var(--muted); white-space: nowrap; text-transform: none; letter-spacing: .04em; }
.chrome__crumb b { font-weight: 500; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.chrome__links { display: flex; gap: 22px; margin-left: auto; }
.chrome__links a { position: relative; padding: 6px 0; font-size: var(--fs-ui); font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.chrome__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: var(--ink);
  transform: scaleX(0); transform-origin: left; transition: transform 250ms var(--ease-hover); }
.chrome__links a:hover, .chrome__links a.is-on { color: var(--ink); }
.chrome__links a:hover::after, .chrome__links a.is-on::after { transform: scaleX(1); }
.chrome__right { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.chrome__links + .chrome__right { margin-left: 0; }
.avatars { display: flex; align-items: center; }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: 10px; font-weight: 500;
  font-style: normal; letter-spacing: 0; border: 2px solid var(--board); margin-left: -8px; background: var(--surface-3); color: var(--ink); }
.avatar:first-child { margin-left: 0; }
.avatar--r { background: var(--ink); color: var(--board); }
.avatar--ai { background: var(--ai-deep); color: #fff; }
.avatar--you { background: var(--surface); border: 1.5px dashed var(--signal); }
.avatar--you svg { width: 10px; height: 12px; }
.avatar--you svg path { fill: var(--signal); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 44px; padding: 0 18px; border-radius: var(--r-pill);
  border: 1.5px solid var(--ink); background: var(--ink); color: var(--board); font-weight: 500; font-size: 15px; white-space: nowrap; cursor: pointer;
  transition: transform 200ms var(--ease-hover), background 200ms, color 200ms; }
.btn:hover { transform: translateY(-1px); }
.btn--ink:hover { background: #2A2723; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--surface); }
.btn--sm, .chrome .btn { height: 36px; padding: 0 14px; font-size: 14px; }
.btn svg { width: 14px; height: 14px; }

/* ------------------------------------------------------------------ board */
.board {
  position: relative; z-index: var(--z-board);
  background-image: radial-gradient(circle, var(--grid-dot) 1.1px, transparent 1.4px);
  background-size: var(--grid-size) var(--grid-size);
}

/* ------------------------------------------------------------------ hero */
.hero {
  position: relative; min-height: max(720px, min(100svh, 980px));
  padding: calc(var(--chrome-h) + clamp(40px, 7vh, 72px)) var(--pad) clamp(96px, 15vh, 160px);
  display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(0, .9fr); gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
.hero__copy { position: relative; max-width: 820px; }
.hero__eyebrow { color: var(--ink-2); margin-bottom: 26px; }
.hero__lead { margin-top: 28px; }
.hero__cta { display: flex; align-items: center; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.hero__ask { display: none; }
.hero__strip { display: none; }
.strip-card--image img { object-fit: cover; object-position: 50% 18%; }
.hero__hint { position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; color: var(--muted); white-space: nowrap; }
.you-tag { position: relative; z-index: var(--z-you); display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px 0 6px; border-radius: 6px 6px 6px 2px;
  background: var(--signal-ink); color: #fff; font-family: var(--body); font-size: 12px; font-weight: 600; letter-spacing: .01em; text-transform: none; }
.you-tag svg { width: 11px; height: 13px; }
.you-tag svg path { fill: #fff; }

.hero__clusterwrap { position: relative; width: 100%; }
.hero__cluster { position: absolute; left: 0; top: 0; width: 520px; height: 580px; transform-origin: 0 0; transform: scale(var(--s, 1)); }
.item { position: absolute; }
.item__drag { position: relative; width: 100%; height: 100%; }
.item--image .item__drag { width: 100%; height: 100%; }
.item--image img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; border-radius: var(--r-image); filter: saturate(.96); }
.item__cap { position: absolute; left: 0; top: -24px; color: var(--muted); white-space: nowrap; text-transform: none; letter-spacing: .04em; }
.sel { position: absolute; inset: -3px; border: var(--bw-sel) solid var(--ink); border-radius: 5px; pointer-events: none; }
.sel i { position: absolute; width: var(--handle); height: var(--handle); background: #fff; border: var(--bw-sel) solid var(--ink); border-radius: 1px; }
.sel i:nth-child(1) { left: -5px; top: -5px; } .sel i:nth-child(2) { right: -5px; top: -5px; }
.sel i:nth-child(3) { left: -5px; bottom: -5px; } .sel i:nth-child(4) { right: -5px; bottom: -5px; }
.sel--ai { border-color: var(--ai); inset: -4px; border-radius: 3px; }
.sel--ai i { border-color: var(--ai); }
.item[data-drag] { touch-action: none; -webkit-user-select: none; user-select: none; }
.item img, .photo img, .pin__thumb { -webkit-user-drag: none; -webkit-user-select: none; user-select: none; }
.item[data-drag] .item__drag { cursor: grab; }
.item.is-dragging { z-index: var(--z-lift); }
.item.is-dragging .item__drag { cursor: grabbing; }
.item.is-dragging .sticky, .item.is-dragging img { box-shadow: var(--shadow-sticky-hover); }

.connectors { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.connectors path { fill: none; stroke: var(--ink-2); stroke-width: 1.5; stroke-linecap: round; }
.connectors .arrow { fill: var(--ink-2); }

.cursor { position: absolute; z-index: 5; pointer-events: none; display: flex; align-items: flex-start; }
.cursor svg { width: 18px; height: 22px; flex: none; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .18)); }
.cursor .name { margin: 14px 0 0 -4px; padding: 3px 8px 4px; border-radius: 6px 6px 6px 2px; font-size: 12px; font-weight: 600; color: #fff; white-space: nowrap; letter-spacing: .01em; }
.cursor--ai svg path { fill: var(--ai); } .cursor--ai .name { background: var(--ai-deep); }
.cursor--ralph svg path { fill: var(--ink); } .cursor--ralph .name { background: var(--ink); color: var(--board); }

/* ------------------------------------------------------------------ stickies, facts, quotes */
.sticky {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 18px 18px 16px; min-height: 180px;
  border-radius: var(--r-sticky); box-shadow: var(--shadow-sticky); background: var(--sand); color: var(--ink);
  transform: rotate(var(--rot, 0deg));
  transition: transform var(--d-hover) var(--ease-hover), box-shadow var(--d-hover) var(--ease-hover);
}
.sticky:hover, .fact:hover { transform: translateY(-3px) rotate(0deg); box-shadow: var(--shadow-sticky-hover); }
.is-placing { transition: none !important; }
.sticky--sand { background: var(--sand); } .sticky--mint { background: var(--mint); } .sticky--rose { background: var(--rose); }
.sticky--sky { background: var(--sky); } .sticky--lilac { background: var(--lilac); }
.sticky__tag { color: var(--sticky-tag); }
.sticky__num { font-family: var(--display); font-weight: 500; font-size: var(--fs-sticky-num); line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--ink); margin-top: auto; }
.sticky__text { font-size: var(--fs-sticky); font-weight: 500; line-height: 1.3; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sticky--stat .sticky__text { margin-top: 0; }
#cluster .sticky__text { -webkit-line-clamp: 4; }
.sticky--text .sticky__text { font-size: 14.5px; -webkit-line-clamp: 5; margin-top: auto; }
.sticky--small { min-height: 140px; }
.sticky--quote { gap: 12px; }
.sticky__quote { font-family: var(--display); font-style: italic; font-weight: 400; font-size: var(--fs-quote); line-height: 1.15; letter-spacing: -.01em; color: var(--ink); margin-top: auto; }
.sticky__note { font-size: 13px; line-height: 1.4; color: rgba(20, 19, 17, .8); }
.sticky--cursor .cursor { right: -8px; bottom: -22px; top: auto; left: auto; }
.r-3 { --rot: -3deg; } .r-2 { --rot: -2deg; } .r-1 { --rot: -1deg; } .r0 { --rot: 0deg; } .r1 { --rot: 1deg; } .r2 { --rot: 2deg; } .r3 { --rot: 3deg; }

.fact { min-height: 200px; }
.fact .sticky__text { -webkit-line-clamp: 4; }
.fact__value { font-family: var(--display); font-weight: 500; font-size: 40px; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin-top: auto; }
.fact__value + .sticky__text { margin-top: 0; }

/* ------------------------------------------------------------------ ticker */
.ticker { position: relative; height: 46px; margin: 0 0 96px; display: flex; align-items: center; overflow: hidden;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--board); touch-action: pan-y; }
.ticker__track { display: flex; align-items: center; width: max-content; white-space: nowrap; will-change: transform; }
.ticker__track li { display: inline-flex; align-items: center; gap: 22px; padding: 0 11px 0 11px; color: var(--ink-2); }
.ticker__track li::after { content: ""; width: 6px; height: 6px; background: var(--ink); transform: rotate(45deg); flex: none; }

/* ------------------------------------------------------------------ no-JS summary (inside <noscript>) */
.nojs { margin: 0 var(--pad) var(--frame-gap); padding: var(--frame-pad); max-width: 72ch; background: var(--surface); border: var(--bw-frame) solid var(--line-2); border-radius: var(--r-frame); display: grid; gap: 14px; color: var(--ink-2); }
.nojs a { color: var(--signal-ink); text-decoration: underline; text-underline-offset: 2px; }

/* ------------------------------------------------------------------ frames */
.frame {
  position: relative; margin: 0 var(--pad) var(--frame-gap); padding: var(--frame-pad);
  background: var(--tint-board); border: var(--bw-frame) solid var(--line-2); border-radius: var(--r-frame); color: var(--ink);
  --t-text: var(--ink); --t-muted: var(--muted); --t-line: var(--line); --t-sub: var(--surface-2); --t-sub2: var(--surface-3);
}
.frame[data-tint="ink"] { background: var(--tint-ink); border-color: var(--night-line); color: var(--night-ink);
  --t-text: var(--night-ink); --t-muted: var(--night-muted); --t-line: var(--night-line); --t-sub: var(--night-2); --t-sub2: var(--night-3); }
.frame[data-tint="sage"] { background: var(--tint-sage); border-color: #B9C2AC; --t-muted: var(--on-tint-muted); --t-line: #BFC7B3; --t-sub: #FFFFFF; }
.frame[data-tint="ochre"] { background: var(--tint-ochre); border-color: #CDB46A; --t-muted: var(--on-tint-muted); --t-line: #D5BE78; --t-sub: #FFFFFF; }
.frame[data-tint="signal"] { background: var(--tint-signal); border-color: #A83C1A; color: var(--on-signal);
  --t-text: var(--on-signal); --t-muted: rgba(255, 255, 255, .78); --t-line: rgba(255, 255, 255, .28); --t-sub: #FFFFFF; }
.frame .h2, .frame .h3 { color: var(--t-text); }
.frame[data-tint="signal"] .h2 { color: var(--on-signal-display); }
.frame .lead, .frame .copy p { color: var(--t-text); }
.frame[data-tint="board"] .lead, .frame[data-tint="board"] .copy p { color: var(--ink-2); }
.frame[data-tint="sage"] .lead, .frame[data-tint="ochre"] .lead { color: var(--on-tint-muted); }
.frame[data-tint="ink"] .lead { color: var(--night-muted); }
.frame, .subframe { scroll-margin-top: 72px; }
.frame__body { position: relative; }
.frame--lazy .frame__body { content-visibility: auto; contain-intrinsic-size: auto var(--ci, 1200px); padding: 12px; margin: -12px; }
#receipts { --ci: 960px; } #f03 { --ci: 2550px; } #f04 { --ci: 730px; } #f05 { --ci: 290px; } #f06 { --ci: 675px; }
@media (max-width: 899px) { #receipts { --ci: 1340px; } #f03 { --ci: 2300px; } #f04 { --ci: 1520px; } #f05 { --ci: 360px; } #f06 { --ci: 1170px; } }

.frame__tab { position: absolute; left: calc(-1 * var(--bw-frame)); top: -34px; z-index: var(--z-tab); display: inline-flex; align-items: center; gap: 10px; height: 26px;
  color: var(--ink-2); white-space: nowrap; max-width: calc(100% + 2 * var(--bw-frame)); }
.frame__tab .mono { overflow: hidden; text-overflow: ellipsis; }
.chip { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 7px; border-radius: 4px; background: var(--ink); color: var(--board);
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .04em; line-height: 1; flex: none; }
.chip--ai { background: var(--ai-deep); color: #fff; }
.subframe > .frame__tab { top: -32px; left: calc(-1 * var(--bw-sub)); }
.subframe > .frame__tab .chip { background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); }
.status { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 4px; font-family: var(--mono); font-size: var(--fs-micro); font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; flex: none; }
.status--live { background: var(--mint); color: var(--pass-ink); }
.status--neutral { border: 1px solid var(--line-2); color: var(--muted); }
.badge { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 7px; border-radius: 4px; background: var(--signal-soft); color: var(--signal-ink);
  font-family: var(--mono); font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums; }

.fhead { margin-bottom: clamp(40px, 6vw, 88px); }
.fhead .lead { margin-top: 22px; max-width: 640px; }
.fhead--chapters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 31%); gap: 0 clamp(32px, 5vw, 80px); align-items: start; }
.fhead__left { align-self: start; min-width: 0; }
.chapters { align-self: end; position: sticky; top: 96px; min-width: 0; }
.chapters__head { color: var(--muted); margin-bottom: 6px; }
.chapters ol { border-top: 1px solid var(--line); }
.chapter { display: block; }
.chapter a { display: grid; grid-template-columns: 26px minmax(0, 1fr); grid-template-areas: "n label" "n chip"; gap: 7px 12px; align-items: start; padding: 13px 0 14px; border-bottom: 1px solid var(--line);
  font-size: 14.5px; font-weight: 500; line-height: 1.3; color: var(--muted); transition: color 300ms var(--ease-hover); }
.chapter i { grid-area: n; padding-top: 2px; }
.chapter__label { grid-area: label; }
.chapter .status { grid-area: chip; justify-self: start; }
.chapter i { font-family: var(--mono); font-size: var(--fs-mono); font-style: normal; color: var(--signal-ink); letter-spacing: .04em; }
.chapter a:hover, .chapter.is-on a { color: var(--ink); }
.chapter .status { height: 20px; font-size: 10px; }

/* ------------------------------------------------------------------ sub-frames and slot grids */
.subframe { position: relative; margin-top: 88px; padding: var(--sub-pad); background: var(--surface-2); border: var(--bw-sub) solid var(--line); border-radius: var(--r-frame);
  display: grid; gap: clamp(28px, 4vw, 56px) clamp(24px, 3vw, 44px); }
.subframe .h3 { max-width: 20ch; }
.subframe .lead { margin-top: 16px; }
.slot { min-width: 0; }
.subframe--flagship { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: "num num num" "scene scene scene" "h3 copy copy" "stage stage stage" "facts facts facts"; }
.subframe--night { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); grid-template-areas: "num num" "head head" "panel report" "stage stage"; }
.subframe--split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); grid-template-areas: "num num" "copy stage"; align-items: start; }
.subframe--handover { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); grid-template-areas: "copy stage" "hand hand"; align-items: start; }
.subframe--medium { grid-template-columns: minmax(0, 1fr); grid-template-areas: "stage" "h3" "copy"; gap: 18px; margin-top: 0; align-content: start; }
.slot--num { grid-area: num; } .slot--scene { grid-area: scene; } .slot--h3 { grid-area: h3; } .slot--copy { grid-area: copy; } .slot--stage { grid-area: stage; }
.slot--facts { grid-area: facts; } .slot--head { grid-area: head; } .slot--panel { grid-area: panel; } .slot--report { grid-area: report; } .slot--fixes { grid-area: fixes; }
.slot--foot { grid-area: foot; } .slot--stickies { grid-area: stickies; } .slot--hand { grid-area: hand; } .slot--sticky { grid-area: sticky; }
.slot--facts { display: grid; grid-template-columns: repeat(4, minmax(0, 250px)); gap: 22px; align-items: start; padding-top: 8px; }
.slot--facts .fact, .slot--facts .sticky { min-height: 160px; }
.slot--copy > .sticky { margin-top: 28px; max-width: 320px; min-height: 0; }
.slot--copy > .sticky--quote { max-width: 280px; min-height: 130px; }
.slot--stickies { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.slot--report { display: flex; flex-direction: column; gap: 26px; align-items: flex-start; }
.slot--report .sticky { width: 240px; margin-left: 8px; }
.slot--sticky { display: flex; align-items: flex-start; }
.slot--sticky .sticky { width: 100%; max-width: 260px; }
.subframe--medium .slot--sticky .sticky { max-width: none; min-height: 150px; }
.subframe--medium .slot--copy p { max-width: none; }
.subframe--medium .h3 { max-width: none; font-size: clamp(24px, 2.1vw, 30px); }
.slot--copy .copy { margin-top: 16px; }
.slot--copy .h3 + .copy { margin-top: 18px; }
.slot--h3 .h3 { max-width: 14ch; }
.slot--head .lead { max-width: 640px; }
.subframe--split .slot--copy .lead { max-width: 500px; }
.slot--foot .mono-footer { padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); }
.mono-footer { font-family: var(--mono); font-size: var(--fs-mono-body); font-weight: 400; line-height: 1.5; color: var(--muted); }
.subframe--night .slot--foot .mono-footer { border-color: var(--night-line); color: var(--night-muted); }

/* night sub-frame */
.subframe--night { background: var(--night); border-color: var(--night-line); color: var(--night-ink); }
.subframe--night .h3, .subframe--night .num__value, .subframe--night .num__meaning { color: var(--night-ink); }
.frame[data-tint="board"] .subframe--night .lead, .subframe--night .lead,
.frame[data-tint="board"] .subframe--night .copy p, .subframe--night .copy p { color: var(--night-muted); }
.subframe--night .num__label { color: var(--night-muted); }
.subframe--night .numrow { border-color: var(--night-line); }
.subframe--night .twobar b { background: var(--night-ink); }

/* numeral row */
.numrow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto auto auto; gap: 0 clamp(16px, 2.5vw, 36px); padding-bottom: clamp(20px, 2.5vw, 32px); border-bottom: 1px solid var(--line); }
.numrow[data-cells="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.num { display: grid; grid-template-rows: subgrid; grid-row: span 3; gap: 10px; min-width: 0; align-content: start; }
.num__label { color: var(--muted); }
.num__row { display: flex; align-items: flex-end; gap: 18px; }
.num__value { font-family: var(--display); font-weight: 500; font-size: var(--fs-stat); line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.num__value b { font-weight: 500; display: inline-block; text-align: right; }
.num__meaning { font-size: 13px; font-weight: 500; line-height: 1.3; color: var(--ink); max-width: 32ch; }
.twobar { display: flex; gap: 6px; align-items: flex-end; height: 44px; padding-bottom: 4px; }
.twobar b { display: block; width: 12px; height: 100%; background: var(--ink); border-radius: 2px; transform-origin: bottom; }
.twobar b.s { height: 10%; background: var(--sand); }

/* ------------------------------------------------------------------ the pinned scene (the one pin) */
.scene { position: relative; }
.scene__card { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-card); padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.scene__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); }
.scene__chip { display: inline-flex; align-items: center; gap: 8px; height: 24px; padding: 0 10px; border-radius: var(--r-pill); border: 1px solid var(--line-2); color: var(--ink-2); white-space: nowrap; }
.scene__chip::before { content: ""; width: 0; height: 0; border-style: solid; border-width: 4px 0 4px 6px; border-color: transparent transparent transparent var(--ink); }
.scene__title { color: var(--ink); max-width: none; }
.swap { display: inline-grid; position: relative; overflow: hidden; vertical-align: bottom; padding: .09em 0 .07em; margin: -.09em 0 -.07em; }
.swap__a, .swap__b { grid-area: 1 / 1; display: block; white-space: nowrap; justify-self: start; padding-right: .04em; }
.swap__b { transform: translateY(100%); }
.scene__stage { position: relative; display: grid; grid-template-columns: minmax(0, 36fr) minmax(0, 64fr); height: clamp(380px, calc(100svh - 236px), 560px); border: 1px solid var(--line); border-radius: var(--r-mini); overflow: hidden; }
.lane { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 44px 14px 16px; border-right: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.lane__label { position: absolute; left: 14px; top: 14px; color: var(--muted); }
.turn { position: relative; font-size: 13px; line-height: 1.35; padding: 7px 10px; border-radius: 10px; max-width: 88%; will-change: transform, opacity; }
.turn--user { align-self: flex-end; background: var(--ink); color: var(--board); border-bottom-right-radius: 3px; }
.turn--assistant { align-self: flex-start; background: var(--surface-3); color: var(--ink); border-bottom-left-radius: 3px; }
.turn--new { position: absolute; left: 14px; opacity: 0; transform: translateY(8px); max-width: 82%; }
.sboard { position: relative; background: var(--board); overflow: hidden; }
.sboard__dots { position: absolute; inset: 0; background-image: radial-gradient(circle, var(--grid-dot) 1px, transparent 1.4px); background-size: 14px 14px; opacity: .3; }
.sboard__label { position: absolute; left: 16px; top: 14px; color: var(--muted); z-index: 2; }
.counter { position: absolute; right: 18px; top: 10px; z-index: 2; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.counter b { font-family: var(--display); font-weight: 500; font-size: var(--fs-counter); line-height: .9; letter-spacing: -.04em; font-variant-numeric: tabular-nums; color: var(--ink); min-width: 1ch; display: inline-block; }
.counter.is-one b, .counter.is-one::before { color: var(--ai); }
.counter::before { font-family: var(--display); font-weight: 500; font-size: var(--fs-counter); line-height: .9; letter-spacing: -.04em; color: var(--ai); }
.counter small { color: var(--muted); max-width: 190px; text-align: right; }
.scene .hint { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); z-index: 2; color: var(--muted); text-align: center; max-width: 80%; line-height: 1.6; }
.board__frame { position: absolute; left: 5%; right: 24%; bottom: 10%; top: 38%; z-index: 1; background: rgba(255, 255, 255, .72); border: 1px solid var(--line-2); border-radius: 2px; padding: 14px 16px 16px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; clip-path: inset(-24px 100% -8px -2px); opacity: 0; }
.board__frame-title { position: absolute; left: 0; top: -20px; color: var(--ink-2); text-transform: none; letter-spacing: .02em; }
.board__col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.board__col-label { font-size: 11px; font-weight: 600; color: var(--ink-2); opacity: 0; }
.board__stickies { display: flex; flex-wrap: wrap; gap: 8px; }
.scene .sticky { width: 62px; height: 62px; min-height: 0; padding: 6px; border-radius: 2px; font-size: 9.5px; line-height: 1.2; font-weight: 500; color: var(--ink); gap: 0; box-shadow: 0 1px 2px rgba(20, 19, 17, .14); transform: none; opacity: 0; }
.scene .sticky .sel--ai { opacity: 0; }
.artifact-outline { position: absolute; inset: -8px; border: 1.5px solid var(--ai); border-radius: 4px; pointer-events: none; opacity: 0; }
.artifact-meta { position: absolute; left: 0; bottom: -24px; color: var(--ai); opacity: 0; white-space: nowrap; }
.scene .cursor--ai { left: 0; top: 0; opacity: 0; z-index: 3; }
.scene .subtitle { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 3; font-size: 12.5px; line-height: 1.4; color: var(--ink); background: rgba(255, 255, 255, .9);
  border: 1px solid var(--line); padding: 6px 10px; border-radius: 4px; white-space: nowrap; opacity: 0; }
.scene .counter .caption-b { display: none; }
.scene.is-done .counter .caption-a { display: none; }
.scene.is-done .counter .caption-b { display: inline; }

/* ------------------------------------------------------------------ eval panel, report, mini cards */
.eval { position: relative; min-height: 360px; background: var(--surface); border-radius: var(--r-card); padding: 16px 18px 14px; box-shadow: var(--shadow-panel-night); color: var(--ink); display: flex; flex-direction: column; }
.eval__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.eval__title { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.eval__title .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ai); }
.eval__count { color: var(--muted); font-variant-numeric: tabular-nums; text-transform: none; }
.eval__count b { color: var(--ink); font-weight: 500; display: inline-block; min-width: 3ch; text-align: right; }
.eval__prog { height: 3px; background: var(--line); border-radius: 3px; margin: 12px 0 10px; overflow: hidden; }
.eval__prog i { display: block; height: 100%; width: 100%; background: var(--ink); border-radius: 3px; transform-origin: left; }
.eval__window { position: relative; flex: 1; min-height: 212px; max-height: 320px; overflow: auto; }
.eval--replay .eval__window { overflow: hidden; height: 212px; max-height: none; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 12%); mask-image: linear-gradient(to bottom, transparent 0, #000 12%); }
.eval__list { display: flex; flex-direction: column; }
.eval--replay .eval__list { position: absolute; left: 0; right: 0; bottom: 0; justify-content: flex-end; }
.eval__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); min-height: 53px; }
.eval__row:last-child { border-bottom-color: transparent; }
.eval__row.is-hidden { display: none; }
.eval__cell { min-width: 0; }
.eval__task { font-size: 13.5px; font-weight: 500; line-height: 1.25; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eval__judge { font-size: 12px; line-height: 1.3; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.verdict { font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .08em; padding: 5px 7px; border-radius: 4px; }
.verdict--pass { background: var(--mint); color: var(--pass-ink); }
.verdict--fail { background: var(--rose); color: var(--fail-ink); }
.eval__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); }
.eval__foot .mono-body { font-size: 11.5px; }
.eval__right { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.eval__replay { font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); border: 1px solid var(--line-2); border-radius: 4px; padding: 5px 8px; background: var(--board); }
.eval__replay:hover { border-color: var(--ink); }

.report { background: var(--night-2); border: 1px solid var(--night-line); border-radius: var(--r-card); padding: 18px; color: var(--night-ink); width: 100%; }
.report__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--night-line); color: var(--night-ink); }
.report__row { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--night-line); font-size: 13.5px; }
.report__row:last-of-type { border-bottom: 0; }
.report__key { display: flex; align-items: center; gap: 8px; }
.report__key i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.report__bar { height: 8px; border-radius: 4px; background: var(--night-3); overflow: hidden; }
.report__bar b { display: block; height: 100%; border-radius: 4px; transform-origin: left; }
.tone--ai { background: var(--ai); } .tone--fail { background: var(--fail); } .tone--amber { background: var(--amber); }
.report__note { margin-top: 12px; color: var(--night-muted); }

.fixes { display: flex; flex-direction: column; gap: 14px; }
.fixes__title { color: var(--night-muted); }
.minicards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.minicard { background: var(--night-2); border: 1px solid var(--night-line); border-radius: var(--r-mini); padding: 16px 18px; font-size: 14px; line-height: 1.5; color: var(--night-ink); }

/* ------------------------------------------------------------------ stages (lazy video) */
.stage { position: relative; display: flex; flex-direction: column; gap: 10px; }
.stage__box { position: relative; aspect-ratio: 16 / 10; border-radius: var(--r-card); overflow: hidden; background: var(--night); border: 1px solid var(--night-line); color: var(--night-ink); }
.stage__box::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle, var(--night-line) 1px, transparent 1.5px); background-size: 20px 20px; }
.stage--light .stage__box { background: var(--surface-2); border-color: var(--line-2); color: var(--ink); }
.stage--light .stage__box::before { background-image: radial-gradient(circle, var(--surface-3) 1.1px, transparent 1.6px); }
.stage__box.has-poster { background-size: cover; background-position: center; }
.stage__box.has-poster::before { display: none; }
.stage.is-yielded .stage__video { visibility: hidden; }
.stage__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: transparent; }
.stage--pending .stage__video { display: none; }
.stage__play { position: absolute; right: 10px; bottom: 10px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(20, 19, 17, .55); color: #fff; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: opacity var(--d-hover) var(--ease-hover), background var(--d-hover) var(--ease-hover); z-index: 2; }
.stage__play::before { content: ""; position: absolute; inset: -7px; border-radius: 50%; }
.stage__play:hover { background: rgba(20, 19, 17, .82); }
.stage__play svg { width: 12px; height: 12px; margin-left: 2px; }
.stage__play .ico-pause { display: none; margin-left: 0; }
.stage.is-playing .stage__play { opacity: .5; }
.stage.is-playing .stage__play .ico-play { display: none; }
.stage.is-playing .stage__play .ico-pause { display: block; }
.stage--pending .stage__play { display: none; }
@media (hover: hover) and (pointer: fine) {
  .stage.is-playing .stage__play, .stage.is-yielded .stage__play { opacity: 0; }
  .stage.is-playing:hover .stage__play, .stage.is-yielded:hover .stage__play, .stage.is-playing .stage__play:focus-visible, .stage.is-yielded .stage__play:focus-visible { opacity: 1; }
}
.stage__label { display: block; padding: 0 2px; color: var(--t-muted, var(--muted)); text-transform: none; letter-spacing: .03em; font-size: 11.5px; line-height: 1.4; }
.subframe--night .stage__label { color: var(--night-muted); }
.stage__label .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); margin: 0 8px 1px 0; vertical-align: middle; }
.stage.is-playing .stage__label .dot { background: var(--ai); }
.stage.is-playing .stage__state::after { content: " · playing"; }
.stage--pending .stage__label .dot { background: var(--signal); }


/* ------------------------------------------------------------------ handover connector */
.handover { position: relative; padding: 8px 0 4px; }
.handover svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.handover svg path { fill: none; stroke: var(--ink-2); stroke-width: 1.5; stroke-linecap: round; }
.handover__pins { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.handover__pin { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.handover__pin i { width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--ink); display: block; position: relative; z-index: 1; }
.handover__pin:last-child i { background: var(--ai); border-color: var(--ai); }
.handover__pin span { font-size: 14px; font-weight: 500; color: var(--ink); padding: 6px 12px; border-radius: var(--r-tag); background: var(--surface); border: 1px solid var(--line); }
.handover__pin b { font-family: var(--mono); font-size: var(--fs-micro); font-weight: 500; letter-spacing: .08em; color: var(--muted); }

/* ------------------------------------------------------------------ row of three medium frames */
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2.5vw, 32px); margin-top: 88px; }

/* ------------------------------------------------------------------ receipts */
.frame--receipts .fhead { margin-bottom: clamp(32px, 4vw, 56px); }
.reactions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: clamp(28px, 4vw, 48px); }
.react { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.react__head { display: flex; align-items: center; gap: 10px; }
.react__what { font-size: 15px; font-weight: 500; line-height: 1.4; color: var(--ink); }
.react__foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 10px 0 8px; border-radius: var(--r-pill); background: var(--surface-3); border: 1px solid var(--line); }
.pill__emoji { display: inline-flex; font-size: 14px; letter-spacing: -2px; line-height: 1; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.pill__count { font-family: var(--mono); font-size: var(--fs-micro); font-weight: 500; letter-spacing: .04em; color: var(--ink); text-transform: none; }
.react__who { font-size: 13px; color: var(--muted); }

.rcard { position: relative; width: 360px; flex: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px 16px; display: flex; flex-direction: column; gap: 9px; color: var(--ink); }
.rcard__head { display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; }
.rcard__av { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--ink-2); flex: none; }
.role { display: inline-flex; align-items: center; min-height: 20px; padding: 2px 7px; border-radius: 4px; background: var(--surface-3); color: var(--ink-2); font-family: var(--mono); font-size: var(--fs-micro); font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; white-space: normal; line-height: 1.3; max-width: 100%; }
.rcard__date { margin-left: auto; color: var(--muted); font-family: var(--mono); font-size: var(--fs-micro); letter-spacing: .04em; white-space: nowrap; flex: none; }
.rcard__ctx { font-size: 13px; line-height: 1.4; color: var(--muted); font-style: italic; }
.rcard__quote { font-size: 15px; line-height: 1.45; color: var(--ink); }
.rcard__then { font-size: 14px; line-height: 1.4; color: var(--ink-2); }
.rcard__reply { margin-left: 24px; padding-left: 10px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.rcard__reply .rcard__quote { font-size: 14px; }
.marquee { position: relative; overflow: hidden; margin: 0 calc(-1 * var(--frame-pad)); padding: 6px 0 10px; display: flex; flex-direction: column; gap: 14px; }
.marquee__track { display: flex; gap: 14px; width: max-content; will-change: transform; padding-left: 14px; }
.marquee__row { display: flex; gap: 14px; }
.marquee__row > * { align-self: start; }
.stack { display: none; }
.marquee__foot { margin-top: 22px; color: var(--muted); }
.stack__more.chipq { display: none; margin-top: 14px; align-self: flex-start; }

/* ------------------------------------------------------------------ how I work (ink) */
.how { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.how__left { position: sticky; top: 96px; }
.how__left .lead { margin-top: 22px; max-width: 420px; }
.principles { border-top: 1px solid var(--night-line); }
.principle { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 18px; padding: 24px 0 26px; border-bottom: 1px solid var(--night-line); color: var(--night-muted); transition: color 350ms var(--ease-hover); }
.principle__n { padding-top: 10px; color: var(--night-muted); transition: color 350ms var(--ease-hover); }
.principle h3 { color: inherit; transition: color 350ms var(--ease-hover); max-width: 22ch; }
.principle__line { margin-top: 10px; font-size: 17px; line-height: 1.5; color: inherit; max-width: 48ch; transition: color 350ms var(--ease-hover); }
.principle.is-on, .principle.is-on .principle__n, .principle.is-on h3 { color: var(--night-ink); }
.principle.is-on .principle__line { color: var(--night-muted); }

/* ------------------------------------------------------------------ builds (sage) */
.builds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: "rc rc rc" "sb ad hm" "gd mk mk" "cards cards cards"; gap: clamp(28px, 3.4vw, 48px) clamp(18px, 2.5vw, 28px); margin-top: 8px; }
.builds__more { display: contents; }
.slot--rc { grid-area: rc; } .slot--sb { grid-area: sb; } .slot--ad { grid-area: ad; } .slot--hm { grid-area: hm; } .slot--gd { grid-area: gd; } .slot--mk { grid-area: mk; } .slot--nd { grid-area: nd; } .slot--cards { grid-area: cards; }
.build { position: relative; display: flex; flex-direction: column; gap: 14px; padding-top: 30px; height: 100%; }
.build__tab { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 8px; height: 22px; color: var(--on-tint-muted); font-family: var(--mono); font-size: var(--fs-mono); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.build__tab::before { content: ""; width: 8px; height: 8px; border: 1.5px solid var(--ink); border-radius: 2px; flex: none; }
.build__foot { display: block; }
.build__foot--photo { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 22px; align-items: start; }
.build__copy { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px 18px; }
.build__foot--photo .build__copy { flex-direction: column; }
.build__text { font-size: 15px; line-height: 1.5; color: var(--ink); max-width: 58ch; }
.build--wide .build__text { font-size: 16px; }
.chiplink { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: var(--r-pill); border: 1px solid var(--ink); color: var(--ink); font-size: 13px; font-weight: 500; white-space: nowrap; align-self: start; transition: background 200ms, color 200ms; }
a.chiplink:hover { background: var(--ink); color: var(--board); }
span.chiplink { border-style: dashed; border-color: var(--on-tint-muted); color: var(--on-tint-muted); }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.card { position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 180px; padding: 18px 18px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); color: var(--ink); }
.card--dashed { background: transparent; border: 1.5px dashed var(--ink-2); }
.card--dashed .card__tag { color: var(--on-tint-muted); }
.card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card__tag { color: var(--muted); flex: none; text-align: right; max-width: 46%; white-space: normal; line-height: 1.4; padding-top: 4px; }
.card h3 { font-size: 20px; line-height: 1.2; letter-spacing: -.012em; max-width: none; }
.card p { font-size: 14.5px; line-height: 1.5; color: var(--ink-2); flex: 1; }
.card .chiplink { margin-top: auto; }
.photo { position: relative; margin: 0; }
.photo img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-image); background: var(--surface-3); }
.photo figcaption { margin-top: 7px; color: var(--on-tint-muted); text-transform: none; letter-spacing: .04em; font-size: 10.5px; }
.photo--side { width: 132px; flex: none; }
.photo--side img { aspect-ratio: 3 / 4; height: auto; }
.card--photo { padding-top: 0; overflow: hidden; }
.photo--card { margin: 0 -18px 4px; }
.photo--card img { aspect-ratio: 16 / 9; height: auto; border-radius: 0; }
.photo--card figcaption { position: absolute; left: 12px; bottom: 10px; margin: 0; padding: 3px 7px; border-radius: 4px; background: rgba(20, 19, 17, .62); color: #fff; }

/* Research Canvas: pinned on desktop, the film scrubs with the scroll and the steps follow it */
.story { position: relative; padding-top: 30px; }
.story__grid { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: clamp(24px, 3.5vw, 56px); align-items: center; }
.story__copy { min-width: 0; }
.story__copy .h3 { max-width: 13ch; }
.story__lead { margin-top: 14px; font-size: 16px; line-height: 1.5; color: var(--on-tint-muted); max-width: 44ch; }
.story__steps { margin-top: 22px; border-top: 1px solid rgba(20, 19, 17, .2); }
.story__step { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 0 8px; padding: 12px 0 13px; border-bottom: 1px solid rgba(20, 19, 17, .2); color: rgba(20, 19, 17, .48); transition: color 300ms var(--ease-hover); }
.story__n { padding-top: 3px; color: inherit; }
.story__title { display: block; font-size: 16px; font-weight: 600; line-height: 1.3; color: inherit; }
.story__text { font-size: 14.5px; line-height: 1.45; color: var(--ink-2); max-height: 0; opacity: 0; overflow: hidden; transition: max-height 450ms var(--ease-hover), opacity 300ms var(--ease-hover), margin 300ms var(--ease-hover); }
.story__step.is-done { color: rgba(20, 19, 17, .7); }
.story__step.is-on { color: var(--ink); }
.story__step.is-on .story__text { max-height: 96px; opacity: 1; margin-top: 4px; }
.story__bar { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; overflow: hidden; }
.story__bar b { display: block; height: 100%; background: var(--ink); transform: scaleX(0); transform-origin: left; }
.story__copy .chiplink { margin-top: 18px; }
.story__film { min-width: 0; }
.story__scrub { display: flex; flex-direction: column; gap: 10px; }
.story__box { position: relative; aspect-ratio: 16 / 10; border-radius: var(--r-card); overflow: hidden; background: var(--cork) center / cover no-repeat; border: 1px solid rgba(20, 19, 17, .28); }
.story__box iframe { position: absolute; left: 0; top: 0; width: 1600px; height: 1000px; border: 0; transform-origin: 0 0; pointer-events: none; opacity: 0; transition: opacity 300ms var(--ease-hover); }
.story__box.is-live iframe { opacity: 1; }
.story__hint { color: var(--on-tint-muted); }
.story:not(.is-scrub) .story__scrub { display: none; }
.story.is-scrub .story__stage { display: none; }
.story:not(.is-scrub) .story__bar { display: none; }
.story:not(.is-scrub) .story__step { color: var(--ink); }
.story:not(.is-scrub) .story__text { max-height: none; opacity: 1; margin-top: 4px; }

/* ------------------------------------------------------------------ timeline (ochre) */
.timeline { position: relative; margin-top: 32px; }
.tl-line { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.tl-line path { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.tl-line .tl-path--curve { stroke: var(--signal-ink); }
.tl-line marker path { fill: var(--signal-ink); }
.pins { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: auto 28px auto; gap: 0 10px; }
.pin { display: grid; grid-template-rows: subgrid; grid-row: 1 / span 3; min-width: 0; }
.pin__dot { grid-row: 2; align-self: center; justify-self: center; width: 14px; height: 14px; border-radius: 50%; background: var(--tint-ochre); border: 1.5px solid var(--ink); position: relative; }
.pin__dot::after { content: ""; position: absolute; left: 50%; width: 1.5px; background: var(--ink); transform: translateX(-50%); }
.pin--above .pin__dot::after { bottom: 100%; height: 16px; }
.pin--below .pin__dot::after { top: 100%; height: 16px; }
.pin__card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; color: var(--ink); min-width: 0; }
.pin--above .pin__card { grid-row: 1; align-self: end; margin-bottom: 16px; }
.pin--below .pin__card { grid-row: 3; align-self: start; margin-top: 16px; }
.pin__card { width: 180%; margin-left: -40%; }
.pin:first-child .pin__card { width: 150%; margin-left: 0; }
.pin:last-child .pin__card { width: 150%; margin-left: -50%; }
.pin__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.pin__titles { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pin__thumb { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; flex: none; }
.pin--ink .pin__card { background: var(--ink); border-color: var(--ink); color: var(--board); }
.pin.pin--ink .h3 { color: var(--board); }
.pin.pin--ink .pin__when { color: rgba(246, 243, 236, .72); }
.pin.pin--ink p { color: rgba(246, 243, 236, .86); }
.pin--ink .pin__dot { background: var(--ink); }
.pin__when { color: var(--muted); }
.pin h3 { font-size: 18px; line-height: 1.2; letter-spacing: -.012em; max-width: none; }
.pin p { font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.pin__link { display: inline-flex; align-items: center; gap: 6px; color: var(--signal-ink); font-size: 13.5px; font-weight: 500; margin-top: 4px; }
.pin__link::after { content: "↩"; }
.pin__link:hover { text-decoration: underline; }
/* the company card that opens Before Miro */
.founder { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(18px, 2.5vw, 32px); align-items: stretch; margin-bottom: clamp(30px, 3.6vw, 48px); }
.founder__card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 22px 26px 20px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.founder__when { color: var(--muted); }
.founder__title { font-size: clamp(24px, 2.3vw, 32px); max-width: none; }
.founder__text { font-size: 15.5px; line-height: 1.55; color: var(--ink-2); max-width: 62ch; }
.founder__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.founder__stat { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.founder__num { font-family: var(--display); font-weight: 500; font-size: clamp(30px, 2.8vw, 40px); line-height: 1; letter-spacing: -.03em; color: var(--ink); white-space: nowrap; }
.founder__stat span { font-size: 12.5px; font-weight: 500; line-height: 1.3; color: var(--ink-2); }
.founder__lessons { display: flex; flex-direction: column; justify-content: space-between; gap: 12px; min-width: 0; }
.founder__lesson { min-height: 0; padding: 13px 15px 14px; gap: 7px; }
.founder__lesson .sticky__text { -webkit-line-clamp: 3; font-size: 13.5px; line-height: 1.35; }
#f04[data-tint="ochre"] .fhead { margin-bottom: clamp(26px, 3vw, 40px); }

/* ------------------------------------------------------------------ now */
.now { display: grid; grid-template-columns: repeat(3, minmax(0, 300px)); gap: 22px; align-items: start; margin-top: 12px; }
.now .sticky { min-height: 150px; }

/* ------------------------------------------------------------------ say hi (signal) */
.sayhi { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(28px, 4vw, 64px); align-items: start; margin-top: 12px; }
.dock { position: relative; min-height: 320px; }
.dock .rail { position: static; width: 100%; max-width: 440px; z-index: 1; transform: none; }
.dock .rail--copy .rail__head { cursor: default; }
.dock .rail--copy[hidden] { display: none; }
.contacts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.contact { min-height: 150px; gap: 8px; }
.contact__value { font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--ink); margin-top: auto; overflow-wrap: break-word; }
a.contact__value:hover { text-decoration: underline; }
.contact .sticky__text { -webkit-line-clamp: 2; margin-top: 0; }

/* ------------------------------------------------------------------ footer */
.foot { position: relative; z-index: var(--z-board); padding: 48px var(--pad) 44px; display: flex; flex-direction: column; gap: 8px; color: var(--muted); font-family: var(--mono); font-size: var(--fs-mono-body); line-height: 1.5; }
.foot a { color: var(--ink-2); border-bottom: 1px solid var(--line-2); }
.foot a:hover { border-color: var(--ink); color: var(--ink); }

/* ------------------------------------------------------------------ the rail (Ralph's AI) */
.rail { position: fixed; right: 20px; bottom: 20px; z-index: var(--z-rail); width: 344px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow-rail); overflow: hidden;
  transition: width .4s var(--ease-hover); }
.rail__head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.rail__head .avatar { margin: 0; width: 26px; height: 26px; border-width: 0; flex: none; }
.rail__name { font-size: 14px; font-weight: 600; white-space: nowrap; }
.rail__status { margin-left: auto; color: var(--muted); font-family: var(--mono); font-size: var(--fs-micro); letter-spacing: .04em; white-space: nowrap; }
.rail__status i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ai); margin-right: 6px; vertical-align: 1px; }
.rail__body { padding: 12px 14px 10px; transition: opacity .25s; }
.rail__msg { background: var(--surface-3); border-radius: 10px 10px 10px 3px; padding: 9px 12px; font-size: 14px; line-height: 1.4; color: var(--ink); }
.rail__msg span { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.rail--open .rail__msg span, .dock .rail__msg span { display: block; -webkit-line-clamp: unset; }
.rail__chips { display: none; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.rail--open .rail__chips, .dock .rail__chips { display: flex; }
.chipq { height: 28px; padding: 0 10px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface); font-size: 13px; color: var(--ink-2); white-space: nowrap; transition: background .2s, border-color .2s; display: inline-flex; align-items: center; }
.chipq:hover { background: var(--surface-3); border-color: var(--ink-2); }
.rail__form { display: flex; gap: 8px; padding: 0 14px 14px; }
.rail__form input { flex: 1; min-width: 0; height: 40px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--board); padding: 0 14px; font-size: 14px; color: var(--ink); }
.rail__form input::placeholder { color: var(--muted); }
.rail__form .btn { height: 40px; padding: 0 16px; font-size: 14px; }
.rail--min { width: 188px; }
.rail--min .rail__body, .rail--min .rail__form, .rail--min .rail__status { display: none; }
.rail--min .rail__head { border-bottom: 0; }
.rail.is-flipping { transition: none; }
.rail--away { visibility: hidden; opacity: 0; pointer-events: none; }
.dock .rail.rail--min { width: 100%; }
.dock .rail.rail--min .rail__body, .dock .rail.rail--min .rail__form, .dock .rail.rail--min .rail__status { display: block; }
.dock .rail.rail--min .rail__form { display: flex; }
.dock .rail__chips { display: flex; }
.fly { position: fixed; left: 0; top: 0; z-index: var(--z-fly); width: 160px; padding: 12px; border-radius: var(--r-sticky); background: var(--sand); box-shadow: var(--shadow-sticky); font-size: 13px; font-weight: 500; line-height: 1.3; color: var(--ink); pointer-events: none; }
.mpill { display: none; position: fixed; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: var(--z-rail); height: 44px; align-items: center; gap: 8px; padding: 0 16px 0 8px; border-radius: var(--r-pill);
  background: var(--ink); color: var(--board); font-size: 14px; font-weight: 500; box-shadow: var(--shadow-rail); transform: translateY(12px); opacity: 0; visibility: hidden; transition: opacity .3s, transform .3s var(--ease-hover), visibility 0s linear .3s; }
.mpill.is-shown:not(.is-hidden) { visibility: visible; transition-delay: 0s; }
.mpill .avatar { margin: 0; border: 0; width: 28px; height: 28px; }
.mpill.is-hidden { opacity: 0 !important; pointer-events: none !important; transform: translateY(12px) !important; }

/* ------------------------------------------------------------------ chat page frame hooks */
.board--chat { min-height: 100svh; padding-top: calc(var(--chrome-h) + 72px); }

/* ------------------------------------------------------------------ tablet and mobile */
@media (max-width: 1099px) {
  .chrome__links { display: none; }
}
@media (max-width: 899px) {
  .chrome { padding: 0 12px 0 14px; gap: 10px; }
  .chrome__crumb, .avatars { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: start; padding-top: calc(var(--chrome-h) + 28px); padding-bottom: 88px; min-height: 0; }
  .hero__eyebrow { font-size: 10.5px; margin-bottom: 18px; }
  .hero__lead { margin-top: 18px; }
  .hero__cta { margin-top: 22px; }
  .hero__hint { bottom: 26px; }
  .hero__clusterwrap { display: flex; justify-content: center; }
  .ticker { margin-bottom: 70px; }
  .frame { padding: 24px 18px 28px; }
  .frame__tab { top: -32px; }
  .chip { min-width: 24px; height: 20px; font-size: 10px; }
  .fhead { margin-bottom: 36px; }
  .fhead--chapters { grid-template-columns: minmax(0, 1fr); }
  .chapters { position: static; margin-top: 22px; }
  .chapters ol { display: flex; gap: 8px; overflow-x: auto; border-top: 0; margin: 0 -18px; padding: 2px 18px 8px; scrollbar-width: none; }
  .chapters ol::-webkit-scrollbar { display: none; }
  .chapters ol > li { flex: none; scroll-snap-align: start; }
  .chapter a { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "n label"; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r-pill); white-space: nowrap; font-size: 13px; align-items: center; }
  .chapter i { padding-top: 0; }
  .chapter .status { display: none; }
  .chapter.is-on a { background: var(--ink); color: var(--board); border-color: var(--ink); }
  .chapter.is-on i { color: var(--board); }
  .subframe { margin-top: 56px; padding: 20px 14px 24px; gap: 24px; }
  .subframe--flagship, .subframe--night, .subframe--split, .subframe--handover { grid-template-columns: minmax(0, 1fr); }
  .subframe--flagship { grid-template-areas: "num" "scene" "h3" "copy" "stage" "facts"; }
  .subframe--night { grid-template-areas: "num" "head" "panel" "report" "stage"; }
  .subframe--split { grid-template-areas: "num" "copy" "stage"; }
  .subframe--handover { grid-template-areas: "copy" "stage" "hand"; }
  .slot--copy > .sticky { margin-top: 20px; max-width: none; }
  .slot--report { flex-direction: row; gap: 12px; align-items: stretch; }
  .slot--report .sticky { flex: 1 1 0; min-width: 0; min-height: 0; }
  .slot--report .sticky__note { display: none; }
  .slot--h3 .h3, .subframe .h3 { max-width: none; }
  .numrow { gap: 12px; }
  .num__value { font-size: 34px; }
  .num__row { gap: 12px; }
  .num__meaning { font-size: 12px; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
  .twobar { height: 30px; }
  .slot--facts, .slot--stickies { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .slot--facts > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .fact, .sticky { min-height: 150px; padding: 14px; }
  .slot--facts .fact, .slot--facts .sticky { min-height: 120px; }
  .fact__value { font-size: 32px; }
  .r-3, .r-2 { --rot: -1deg; } .r3, .r2 { --rot: 1deg; }
  .slot--report .sticky { width: auto; margin-left: 0; }
  .slot--sticky .sticky { max-width: none; }
  .minicards { grid-template-columns: minmax(0, 1fr); }
  .scene__card { padding: 12px 12px 14px; }
  .scene__head { min-height: 48px; align-items: flex-start; gap: 16px; }
  .scene__head .scene__chip { display: none; }
  .scene__stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) 340px; height: 620px; }
  .scene .cursor .name { display: none; }
  .lane { border-right: 0; border-bottom: 1px solid var(--line); padding: 40px 12px 12px; gap: 5px; }
  .turn { font-size: 11.5px; padding: 6px 8px; }
  .turn--new { left: 12px; }
  .scene__head .counter { position: static; margin-left: auto; flex: none; }
  .counter b, .counter::before { font-size: 44px; }
  .counter small { display: none; }
  .num--unit { grid-column: 1 / -1; }
  .num--unit .num__value { white-space: normal; }
  .board__frame { left: 4%; right: 4%; top: 18%; bottom: 23%; gap: 8px; padding: 10px 10px 12px; }
  .board__frame-title { top: -18px; }
  .scene .sticky { width: 42px; height: 42px; font-size: 7.6px; padding: 4px; }
  .scene .subtitle { white-space: normal; width: calc(100% - 24px); left: 12px; transform: none; font-size: 11.5px; bottom: 10px; }
  .scene .artifact-meta { display: none; }
  .eval__foot { flex-direction: column; align-items: flex-start; gap: 8px; }
  .eval__right { white-space: normal; flex-wrap: wrap; }
  .contacts { grid-template-columns: minmax(0, 1fr); }
  .contact { min-height: 120px; }
  .handover__pins { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .handover__pin { gap: 8px; }
  .handover__pin span { font-size: 13px; padding: 5px 10px; }
  .handover svg { display: none; }
  .row3 { display: flex; gap: 14px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-left: var(--pad); margin: 56px -18px 0; padding: 36px 18px 10px; scrollbar-width: none; }
  .row3::-webkit-scrollbar { display: none; }
  .subframe--medium { flex: 0 0 86vw; scroll-snap-align: start; }
  .reactions { display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-left: 18px; margin: 0 -18px 24px; padding: 2px 18px 10px; scrollbar-width: none; }
  .reactions::-webkit-scrollbar { display: none; }
  .reactions > .react { flex: 0 0 78vw; max-width: 320px; scroll-snap-align: start; }
  .marquee { display: none; }
  .stack { display: flex; flex-direction: column; gap: 12px; }
  .stack .rcard { width: 100%; }
  .stack__more.chipq { display: inline-flex; }
  .how { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .how__left { position: static; }
  .principle { grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding: 18px 0 20px; }
  .principle__line { font-size: 15px; margin-top: 6px; }
  .builds { display: flex; flex-direction: column; gap: 40px; }
  .builds__more { display: flex; gap: 14px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-left: 18px; margin: 0 -18px; padding: 4px 18px 12px; scrollbar-width: none; }
  .builds__more::-webkit-scrollbar { display: none; }
  .builds__more > .slot { flex: 0 0 80vw; max-width: 340px; scroll-snap-align: start; }
  .builds__more .build__text { font-size: 14px; }
  .build__copy { flex-direction: column; gap: 10px; }
  .build__foot--photo { grid-template-columns: minmax(0, 1fr) 104px; gap: 14px; }
  .photo--side { width: 104px; }
  .story__grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .story__copy { display: contents; }
  .story__copy .h3 { order: 1; max-width: none; }
  .story__lead { order: 2; margin-top: 0; font-size: 15px; }
  .story__film { order: 3; }
  .story__steps { order: 4; margin-top: 4px; }
  .story__copy .chiplink { order: 5; margin-top: 0; justify-self: start; }
  .story__step { padding: 10px 0 11px; }
  .story__title { font-size: 15px; }
  .story__text { font-size: 14px; }
  .founder { grid-template-columns: minmax(0, 1fr); gap: 14px; margin-bottom: 28px; }
  .founder__card { padding: 18px 16px 16px; }
  .founder__text { font-size: 15px; }
  .founder__stats { gap: 8px; }
  .founder__num { font-size: 26px; }
  .founder__stat span { font-size: 11.5px; }
  .founder__lessons { flex-direction: row; justify-content: flex-start; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-left: 18px; margin: 0 -18px; padding: 4px 18px 12px; scrollbar-width: none; }
  .founder__lessons::-webkit-scrollbar { display: none; }
  .founder__lesson { flex: 0 0 72vw; max-width: 300px; scroll-snap-align: start; min-height: 0; }
  .cards { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 18px; margin: 0 -18px; padding: 4px 18px 10px; scrollbar-width: none; }
  .cards::-webkit-scrollbar { display: none; }
  .card { flex: 0 0 80vw; scroll-snap-align: start; }
  .timeline { padding-left: 0; }
  .pins { display: flex; flex-direction: column; gap: 12px; padding-left: 40px; }
  .pin { display: block; position: relative; }
  .pin__dot { position: absolute; left: -27px; top: 18px; }
  .pin__dot::after { display: none; }
  .pin--above .pin__card, .pin--below .pin__card, .pin:first-child .pin__card, .pin:last-child .pin__card { margin: 0; width: auto; }
  .pin__card { padding: 12px 14px 13px; gap: 6px; }
  .now { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .now .sticky { min-height: 0; }
  .sayhi { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .dock .rail { max-width: none; }
  .contacts { gap: 12px; }
  .rail { display: none; }
  .dock .rail { display: block; }
  .mpill { display: inline-flex; pointer-events: none; }
  .mpill.is-shown { opacity: 1; transform: none; pointer-events: auto; }
  .fly { display: none; }
}
@media (min-width: 600px) and (max-width: 899px) {
  .hero__clusterwrap { margin: 0 auto; }
}
@media (max-width: 599px) {
  .hero { padding-bottom: 76px; gap: 24px; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { width: 100%; }
  .hero__cta .btn--ghost { display: none; }
  .hero__ask { display: flex; gap: 8px; margin-top: 14px; }
  .hero__ask input { flex: 1; min-width: 0; height: 44px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface); padding: 0 14px; font-size: 14px; }
  .hero__ask input::placeholder { color: var(--muted); }
  .hero__ask .btn { height: 44px; }
  .hero__clusterwrap { display: none; }
  .hero__strip { display: flex; min-height: 188px; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-left: var(--pad); margin: 0 calc(-1 * var(--pad)); padding: 14px var(--pad) 18px; scrollbar-width: none; }
  .hero__strip::-webkit-scrollbar { display: none; }
  .strip-card { flex: 0 0 156px; width: 156px; height: 156px; scroll-snap-align: start; min-height: 0; padding: 12px 13px; transform: none; gap: 6px; }
  .strip-card .sticky__num { font-size: 44px; }
  .strip-card .sticky__text { font-size: 12px; line-height: 1.3; -webkit-line-clamp: 3; }
  .strip-card .sticky__tag { font-size: 10px; }
  .strip-card--image { background: #fff; padding: 6px 6px 8px; box-shadow: var(--shadow-sticky); border-radius: 2px; display: flex; flex-direction: column; }
  .strip-card--image img { width: 100%; height: 107px; border-radius: 2px; }
  .strip-card--image figcaption { margin-top: 6px; color: var(--muted); font-size: 9px; text-transform: none; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hero__hint .you-tag { display: none; }
  .frame__tab .mono { font-size: 10.5px; }
  /* stats rows as stacked rows: numeral left, label and meaning right, no clamp */
  .numrow, .numrow[data-cells="2"] { display: flex; flex-direction: column; gap: 14px; }
  .num { grid-template-columns: minmax(64px, auto) minmax(0, 1fr); grid-template-rows: auto auto; gap: 2px 14px; align-items: start; }
  .num__label { grid-column: 2; grid-row: 1; }
  .num__row { grid-column: 1; grid-row: 1 / span 2; align-self: start; padding-top: 2px; }
  .num__meaning { grid-column: 2; grid-row: 2; display: block; -webkit-line-clamp: unset; overflow: visible; max-width: none; font-size: 12.5px; }
  .num--unit { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; }
  .num--unit .num__label { grid-column: 1; grid-row: 1; }
  .num--unit .num__row { grid-column: 1; grid-row: 2; }
  .num--unit .num__meaning { grid-column: 1; grid-row: 3; }
  .scene .mono { font-size: var(--fs-micro); }
  .sboard__label, .board__frame-title { background: var(--board); padding: 2px 6px; margin-left: -6px; border-radius: 3px; }
}
@media (pointer: coarse) {
  .chiplink, .chipq, .eval__replay, .stack__more, .chapter a { min-height: 44px; }
  .chrome__glyph { width: 44px; height: 44px; }
}
@media (min-width: 600px) { .hero__strip { display: none; } }
@media (min-width: 900px) and (max-width: 1180px) {
  .hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
}

/* ------------------------------------------------------------------ reduced motion (spec 6.13, verbatim) */
@media (prefers-reduced-motion: reduce) {
  .line__in, .place, .place-group > *, .frame__tab, .hero__copy, .hero__cluster, .rail, .ticker { opacity: 1 !important; transform: none !important; }
  .connectors path { stroke-dasharray: none !important; stroke-dashoffset: 0 !important; }
  .scene .hint, .swap__a, .scene .cursor--ai { display: none !important; }
  .swap__b { transform: none !important; }
  .scene .turn:not(.turn--first):not(.turn--new) { display: none !important; }
  .scene .turn--new, .scene .board__frame, .scene .sticky, .scene .sel--ai, .scene .subtitle { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .scene .counter::before { content: "1"; } .scene .counter b { display: none; }
  .eval__row { opacity: 1 !important; transform: none !important; }
  .ticker__track, .marquee__track, .marquee__row { animation: none !important; transform: none !important; }
  .stage__play { display: grid !important; }
  video[autoplay] { display: none; } .stage__poster { display: block !important; }
  * { transition-duration: 0ms !important; }
}
/* the same end states when board.js runs without motion (GSAP missing, or the ?rm=1 test hook) */
@media (prefers-reduced-motion: reduce) {
  .hero__cluster { transform: scale(var(--s, 1)) !important; }
  .scene .turn--new { position: static !important; }
  .scene .board__col-label, .scene .artifact-outline, .scene .artifact-meta { opacity: 1 !important; }
  .scene .sboard__dots { opacity: 1 !important; }
  .scene .counter .caption-a { display: none; } .scene .counter .caption-b { display: inline; }
  .stage--pending .stage__play { display: none !important; }
  .handover svg path { stroke-dasharray: none !important; stroke-dashoffset: 0 !important; }
  .tl-line path { stroke-dasharray: none !important; stroke-dashoffset: 0 !important; }
}
html.no-motion .line__in, html.no-motion .place, html.no-motion .place-group > *, html.no-motion .frame__tab, html.no-motion .hero__copy, html.no-motion .rail, html.no-motion .ticker { opacity: 1 !important; transform: none !important; }
html.no-motion .hero__cluster { transform: scale(var(--s, 1)) !important; }
html.no-motion .connectors path, html.no-motion .handover svg path, html.no-motion .tl-line path { stroke-dasharray: none !important; stroke-dashoffset: 0 !important; }
html.no-motion .scene .hint, html.no-motion .swap__a, html.no-motion .scene .cursor--ai { display: none !important; }
html.no-motion .swap__b { transform: none !important; }
html.no-motion .scene .turn:not(.turn--first):not(.turn--new) { display: none !important; }
html.no-motion .scene .turn--new { position: static !important; }
html.no-motion .scene .turn--new, html.no-motion .scene .board__frame, html.no-motion .scene .sticky, html.no-motion .scene .sel--ai, html.no-motion .scene .subtitle,
html.no-motion .scene .board__col-label, html.no-motion .scene .artifact-outline, html.no-motion .scene .artifact-meta, html.no-motion .scene .sboard__dots { opacity: 1 !important; transform: none !important; clip-path: none !important; }
html.no-motion .scene .counter::before { content: "1"; } html.no-motion .scene .counter b { display: none; }
html.no-motion .scene .counter .caption-a { display: none; } html.no-motion .scene .counter .caption-b { display: inline; }
html.no-motion .eval__row { opacity: 1 !important; transform: none !important; }
html.no-motion .ticker__track, html.no-motion .marquee__track, html.no-motion .marquee__row { transform: none !important; }
html.no-motion .stage__play { display: grid !important; }
html.no-motion .stage--pending .stage__play { display: none !important; }
html.no-motion * { transition-duration: 0ms !important; }
