/* Portfolio, frame 04: one fixed stage. The tape stays behind everything; scenes swap over it.
 * Built on Consola tokens.css + bundle.css. Components enter with a left-to-right wipe, the way tape
 * runs past a head, and leave the same way, while the field sends a wave across its tracks. */

*, *::before, *::after { box-sizing: border-box; }
:root {
  --page-max: 1360px;
  --gutter: clamp(20px, 4.4vw, 64px);
  --bar-h: 68px;
  --hud-h: 60px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in: cubic-bezier(.7, 0, .84, 0);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --t-hero: clamp(40px, 4.2vw, 68px);
  --t-scene: clamp(30px, 3.2vw, 50px);
}
html { background: var(--surface-000); color-scheme: dark; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--surface-000); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
::selection { background: var(--amber); color: var(--on-amber); }
:focus-visible { outline: var(--focus-ring) solid var(--focus); outline-offset: 3px; }
[tabindex="-1"]:focus:not(:focus-visible) { outline: none; }
a { color: var(--teal-text); text-decoration: none; }
a:hover { color: var(--teal); }
svg, canvas { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; top: 12px; left: 12px; z-index: 100; transform: translateY(-200%); background: var(--amber); color: var(--on-amber); font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 10px 14px; border-radius: var(--radius-ctl); }
.skip:focus { transform: none; color: var(--on-amber); }

/* ---------- the stage ---------- */
html.stage-on, html.stage-on body { height: 100%; overflow: hidden; overscroll-behavior: none; }
.bg-field { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.bg-grain { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 30% 40%, transparent 42%, color-mix(in srgb, #000 46%, transparent) 100%),
    repeating-linear-gradient(0deg, transparent 0 3px, color-mix(in srgb, var(--ink) 4%, transparent) 3px 4px); }
.stage { position: relative; z-index: 1; }
.stage-on .stage { position: fixed; inset: 0; }
.scene { position: relative; min-height: 100vh; }
.stage-on .scene { position: absolute; inset: 0; min-height: 0; visibility: hidden; pointer-events: none; }
.stage-on .scene.is-active, .stage-on .scene.is-leaving { visibility: visible; }
.stage-on .scene.is-active { pointer-events: auto; }
.scene__inner { position: relative; max-width: var(--page-max); margin: 0 auto; padding: calc(var(--bar-h) + 24px) var(--gutter) calc(var(--hud-h) + 24px); display: flex; flex-direction: column; justify-content: safe center; gap: 24px; }
.stage-on .scene__inner { position: absolute; top: var(--bar-h); bottom: var(--hud-h); left: 0; right: 0; padding: 24px var(--gutter); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.stage-on .scene__inner::-webkit-scrollbar { display: none; }

/* more below: the bottom edge fades until you reach the end of a scene taller than the screen */
.stage-on .scene.has-more .scene__inner { -webkit-mask-image: linear-gradient(#000 calc(100% - 56px), transparent); mask-image: linear-gradient(#000 calc(100% - 56px), transparent); }

/* components: in with a wipe from the left, out with a wipe to the right */
.stage { --dy: 26; }
.stage[data-dir="up"] { --dy: -26; }
.stage-on [data-anim] { opacity: 0; }
.stage-on .scene.is-active [data-anim] { animation: enter .95s var(--ease-out) both; animation-delay: calc(var(--d, 0) * 65ms + 160ms); }
.stage-on .scene.is-leaving [data-anim] { animation: leave .5s var(--ease-in) both; animation-delay: calc(var(--d, 0) * 12ms); }
@keyframes enter {
  0% { opacity: 0; transform: translate3d(0, calc(var(--dy) * 1px), 0); clip-path: inset(0 100% 0 0); }
  35% { opacity: 1; }
  100% { opacity: 1; transform: none; clip-path: inset(-20px -40px -20px 0); }
}
@keyframes leave {
  0% { opacity: 1; transform: none; clip-path: inset(-20px -40px -20px 0); }
  100% { opacity: 0; transform: translate3d(0, calc(var(--dy) * -.8px), 0); clip-path: inset(0 0 0 100%); }
}

/* ---------- bar ---------- */
.bar { position: fixed; top: 0; left: 0; right: 0; z-index: 40; height: var(--bar-h); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; padding: env(safe-area-inset-top) var(--gutter) 0; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); white-space: nowrap; justify-self: start; }
.wordmark:hover { color: var(--ink); }
.wordmark__lamp { width: 10px; height: 10px; background: var(--amber); box-shadow: var(--glow-amber); border-radius: var(--radius-lamp); }
.wordmark__name { font-family: var(--font-display); font-weight: 600; font-size: 15px; line-height: 1; letter-spacing: .16em; text-transform: uppercase; }
.wordmark__role { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); padding-left: 10px; border-left: 1px solid var(--hairline-strong); }
.bar__nav { display: flex; align-items: center; gap: 28px; }
.bar__nav a, .lang button, .menu-btn { font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.bar__nav a { position: relative; color: var(--ink-muted); padding: 8px 0; transition: color .25s linear; }
.bar__nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: var(--amber); transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease-out); }
.bar__nav a:hover { color: var(--ink); }
.bar__nav a:hover::after, .bar__nav a.is-current::after { transform: scaleX(1); transform-origin: left; }
.bar__nav a.is-current { color: var(--ink); }
.bar__nav .bar__cta { color: var(--amber-text); }
.bar__right { justify-self: end; display: flex; align-items: center; gap: 12px; }
.lang { display: inline-flex; border: 1px solid var(--hairline); border-radius: var(--radius-ctl); background: var(--surface-100); box-shadow: var(--bevel); overflow: hidden; }
.lang button { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-muted); background: transparent; border: 0; padding: 6px 10px; cursor: pointer; min-height: 32px; transition: color .2s linear; }
.lang button + button { border-left: 1px solid var(--hairline); }
.lang button .cs-lamp { width: 6px; height: 6px; transition: background .2s linear, box-shadow .2s linear; }
.lang button:hover, .lang button[aria-pressed="true"] { color: var(--ink); }
.lang button[aria-pressed="true"] .cs-lamp { background: var(--amber); box-shadow: var(--glow-amber); }
.menu-btn { display: none; align-items: center; gap: 10px; color: var(--ink); background: var(--surface-100); border: 1px solid var(--hairline); border-radius: var(--radius-ctl); box-shadow: var(--bevel); padding: 6px 12px; min-height: 34px; cursor: pointer; }
.menu-btn__bars { width: 14px; height: 9px; background: linear-gradient(currentColor, currentColor) 0 0 / 100% 1px no-repeat, linear-gradient(currentColor, currentColor) 0 100% / 60% 1px no-repeat; }

/* ---------- hud ---------- */
.hud { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: var(--hud-h); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 0 var(--gutter) env(safe-area-inset-bottom); }
html:not(.stage-on):not(.scroll-on) .hud, html:not(.stage-on):not(.scroll-on) .rail { display: none; }
.hud__progress { position: absolute; left: var(--gutter); right: var(--gutter); top: 0; height: 1px; background: var(--amber); box-shadow: var(--glow-amber); transform: scaleX(0); transform-origin: left; transition: transform .9s var(--ease-out); }
.hud::before { content: ""; position: absolute; left: var(--gutter); right: var(--gutter); top: 0; height: 1px; background: var(--hairline); }
.hud__where { display: flex; align-items: baseline; gap: 8px; min-width: 0; font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); }
.hud__count { font-size: 13px; color: var(--ink); letter-spacing: .06em; }
.hud__of { font-size: 11px; letter-spacing: .06em; }
.hud__hint { justify-self: center; font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-muted); transition: opacity .6s linear; animation: breathe 2.6s var(--ease-io) infinite; }
.hud__hint.is-gone { opacity: 0; animation: none; }
@keyframes breathe { 50% { opacity: .45; } }

/* ---------- rail ---------- */
/* The rail is only as wide as its ticks: the labels float beside it, so it never covers content (or its buttons). */
.rail { position: fixed; right: 18px; top: 50%; z-index: 30; transform: translateY(-50%); display: flex; flex-direction: column; align-items: flex-end; gap: 1px; padding: 12px 0 12px 14px; }
.rail::before { content: ""; position: absolute; inset: -24px -18px -24px -220px; pointer-events: none; z-index: -1; background: radial-gradient(closest-side, color-mix(in srgb, var(--surface-000) 92%, transparent), transparent); opacity: 0; transition: opacity .3s linear; pointer-events: none; }
.rail:hover::before, .rail:focus-within::before { opacity: 1; }
.rail__item { position: relative; display: flex; align-items: center; justify-content: flex-end; width: 30px; height: 22px; color: var(--ink-muted); }
.rail__item--sub { height: 16px; }
.rail__tick { width: 14px; height: 1px; background: var(--hairline-strong); transition: width .5s var(--ease-out), background .25s linear, box-shadow .25s linear; }
.rail__item--sub .rail__tick { width: 8px; }
.rail__item.is-done .rail__tick { background: color-mix(in srgb, var(--amber) 55%, var(--hairline-strong)); }
.rail__label { position: absolute; right: calc(100% + 12px); top: 50%; margin-top: -8px; line-height: 16px; pointer-events: none; font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; opacity: 0; translate: 8px 0; transition: opacity .25s linear, translate .45s var(--ease-out); }
.rail:hover .rail__label, .rail:focus-within .rail__label { opacity: 1; translate: 0 0; }
.rail__item:hover { color: var(--ink); }
.rail__item.is-current { color: var(--amber-text); }
.rail__item.is-current .rail__tick { width: 30px; background: var(--amber); box-shadow: var(--glow-amber); }

/* ---------- shared scene type ---------- */
.scene__eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--amber-text); }
.scene__eyebrow .cs-lamp { width: 6px; height: 6px; }
.scene__title { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: var(--t-scene); line-height: 1.04; letter-spacing: -.01em; text-wrap: balance; }
.scene__lede { margin: 0; font-size: clamp(16px, 1.25vw, 19px); line-height: 1.6; color: var(--ink-muted); max-width: 34em; }

/* ---------- intro ---------- */
.stage-on .scene--intro .scene__inner { justify-content: flex-start; padding-top: clamp(16px, 5vh, 64px); }
.statement { display: flex; flex-direction: column; gap: 20px; max-width: 860px; }
.statement__eyebrow { margin: 0; display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); }
.statement__eyebrow .cs-lamp { width: 6px; height: 6px; }
.statement__title { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(72px, 9.5vw, 156px); line-height: .9; letter-spacing: -.025em; }
.statement__role { margin: 0; display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 500; font-size: clamp(20px, 2vw, 30px); line-height: 1.2; color: var(--amber-text); }
.statement__role .cs-lamp { width: 8px; height: 8px; }
.statement__line { margin: 0; font-size: clamp(17px, 1.35vw, 20px); line-height: 1.55; max-width: 34em; color: color-mix(in srgb, var(--ink) 82%, var(--ink-muted)); }
.statement__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.statement__actions .cs-btn { padding: 12px 20px; min-height: 44px; }
.cs-btn--ghost { background: color-mix(in srgb, var(--surface-000) 60%, transparent); }
.cs-btn--ghost:hover { border-color: var(--ink-muted); color: var(--ink); }
.cs-btn--primary:hover { filter: brightness(1.06); color: var(--on-amber); }

.areas { pointer-events: none; }
/* desktop: the five areas sit in one even row at the foot of the intro, each a transparent card */
@media (min-width: 900px) {
  .stage-on .scene--intro .scene__inner > .areas { margin-top: auto; }
  .areas { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(10px, 1.4vw, 20px); padding-top: 24px; }
}
.area { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px 16px 18px; border-top: 1px solid var(--hairline-strong); color: var(--ink); pointer-events: auto; min-width: 0; }
.area:hover { color: var(--ink); }
.area__num { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); transition: color .25s linear; }
.area__num .cs-lamp { width: 6px; height: 6px; transition: background .2s linear, box-shadow .2s linear; }
.area__title { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; width: 100%; font-family: var(--font-display); font-weight: 600; font-size: clamp(18px, 1.45vw, 23px); line-height: 1.15; text-wrap: balance; transition: color .25s linear, text-shadow .25s linear; }
.icon-arrow { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: square; }
.area__title .icon-arrow { margin-top: 3px; opacity: 0; translate: -8px 0; transition: opacity .3s linear, translate .5s var(--ease-out); }
.area.is-hover .area__num, .area:focus-visible .area__num { color: var(--amber-text); }
.area.is-hover .area__num .cs-lamp, .area:focus-visible .area__num .cs-lamp { background: var(--amber); box-shadow: var(--glow-amber); }
.area.is-hover .area__title, .area:focus-visible .area__title { color: var(--chart-amber-1); text-shadow: 0 0 18px color-mix(in srgb, var(--amber) 45%, transparent); }
.area.is-hover .area__title .icon-arrow, .area:focus-visible .area__title .icon-arrow { opacity: 1; translate: 0 0; }

/* ---------- area scenes ---------- */
.ascene { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 72px); align-items: center; }
.stage-on .ascene { display: grid; align-content: safe center; }
.ascene__head { display: flex; flex-direction: column; gap: 14px; }
.ascene__num { font-family: var(--font-mono); font-weight: 700; font-size: clamp(88px, 9vw, 150px); line-height: .85; letter-spacing: -.06em; color: transparent; -webkit-text-stroke: 1px var(--hairline-strong); margin-bottom: 6px; }
.ascene__title { font-size: clamp(28px, 2.6vw, 42px); }
.ascene__cases { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 14px; }
.carousel-dots { display: none; }
.case { position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 20px 20px 18px; border: 1px solid var(--hairline); border-radius: var(--radius-card); background: color-mix(in srgb, var(--surface-000) 55%, transparent); transition: border-color .25s linear; }
html:not(.has-cursor) .case:hover { border-color: color-mix(in srgb, var(--amber) 55%, var(--hairline)); }
.case__top { display: flex; align-items: center; gap: 12px; }
.case__idx { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--ink-muted); }
.case__idx::before { content: ""; width: 6px; height: 6px; border-radius: var(--radius-lamp); background: var(--amber); box-shadow: var(--glow-amber); }
.case__top .cs-badge { padding: 2px 8px; margin-left: auto; }
.case__title { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(16px, 1.2vw, 19px); line-height: 1.3; text-wrap: balance; }
.case__detail { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink-muted); }
@media (max-height: 820px) and (min-width: 900px) {
  .case__detail { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .case { padding: 16px 16px 14px; gap: 8px; }
  .ascene__cases { gap: 12px; }
  .ascene__num { font-size: clamp(72px, 7vw, 112px); }
}

/* ---------- method ---------- */
.scene--method .scene__inner { gap: clamp(32px, 6vh, 72px); }
.scene__head { display: flex; flex-direction: column; gap: 14px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 clamp(20px, 2.6vw, 40px); }
.step { position: relative; display: flex; flex-direction: column; gap: 14px; padding-top: 28px; border-top: 1px solid var(--hairline-strong); }
.step::before { content: ""; position: absolute; left: 0; top: -1px; height: 2px; width: 100%; background: var(--amber); box-shadow: var(--glow-amber); transform: scaleX(0); transform-origin: left; }
.stage-on .scene--method.is-active .step::before { animation: fill 1s var(--ease-out) both; animation-delay: calc(var(--d, 0) * 65ms + 420ms); }
@keyframes fill { to { transform: scaleX(1); } }
.step__num { font-family: var(--font-mono); font-size: 13px; font-weight: 700; letter-spacing: .08em; color: var(--amber-text); }
.step__title { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(21px, 1.7vw, 26px); line-height: 1.15; }
.step__body { margin: 0; font-size: 15px; line-height: 1.65; color: var(--ink-muted); }
.step__tag { margin-top: auto; padding-top: 8px; display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); }
.step__tag::before { content: ""; width: 6px; height: 6px; background: var(--amber); box-shadow: var(--glow-amber); border-radius: var(--radius-lamp); }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(40px, 6vw, 112px); align-items: center; }
.stage-on .about { display: grid; align-content: safe center; }
.about__text { display: flex; flex-direction: column; gap: 14px; }
.about__text p { margin: 0; font-size: clamp(15px, 1.1vw, 17px); line-height: 1.7; color: var(--ink-muted); max-width: 36em; }
.about__text .about__lead { font-family: var(--font-display); font-weight: 500; font-size: clamp(20px, 1.8vw, 27px); line-height: 1.32; color: var(--ink); margin-top: 6px; }
.facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--hairline-strong); border-left: 1px solid var(--hairline); background: color-mix(in srgb, var(--surface-000) 70%, transparent); }
.fact { padding: 22px 20px 24px; border-right: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); display: flex; flex-direction: column-reverse; gap: 10px; }
.fact dt { font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); }
.fact dd { margin: 0; font-family: var(--font-mono); font-weight: 700; font-size: clamp(40px, 4.2vw, 64px); line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--ink); }
.fact:first-child dd { color: var(--amber-text); }
.fact__sep { color: var(--hairline-strong); padding: 0 .08em; }

/* ---------- lab ---------- */
.lab { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 72px); align-items: center; }
.stage-on .lab { display: grid; align-content: safe center; }
.lab__intro { display: flex; flex-direction: column; gap: 16px; }
.readout { margin-top: 8px; border: 1px solid var(--hairline-strong); border-radius: var(--radius-card); background: var(--surface-200); box-shadow: var(--bevel-inset); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; max-width: 420px; }
.readout__label { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--teal-text); display: inline-flex; gap: 8px; align-items: center; }
.readout__label::before { content: ""; width: 6px; height: 6px; background: var(--teal); box-shadow: var(--glow-teal); border-radius: var(--radius-lamp); animation: cs-pulse var(--duration-pulse) steps(2) infinite; }
.readout__row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.readout__cell { display: flex; flex-direction: column; gap: 2px; }
.readout__cell b { font-family: var(--font-mono); font-size: 26px; line-height: 1.1; color: var(--amber-text); font-variant-numeric: tabular-nums; }
.readout__cell span { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); }
.lab__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lab__card { background: color-mix(in srgb, var(--surface-100) 92%, transparent); border: 1px solid var(--hairline); border-radius: var(--radius-panel); box-shadow: var(--bevel); padding: 22px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.lab__card:first-child { grid-column: 1 / -1; }
.lab__card p { margin: 0; color: var(--ink-muted); font-size: 14px; line-height: 1.6; }
.lab__eyebrow { font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--amber-text); }
.lab__eyebrow::before { content: "// "; color: var(--ink-muted); }
.lab__title { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(19px, 1.5vw, 23px); line-height: 1.2; }
.specimen { display: flex; flex-direction: column; }
.specimen__row { display: flex; align-items: center; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--hairline); }
.specimen__row:last-child { border-bottom: 0; }
.specimen__sample { width: 56px; flex: none; font-size: 34px; line-height: 1; color: var(--ink); }
.specimen__sample--display { font-family: var(--font-display); font-weight: 600; }
.specimen__sample--body { font-family: var(--font-body); font-weight: 500; }
.specimen__sample--mono { font-family: var(--font-mono); font-weight: 700; color: var(--amber-text); }
.specimen__meta { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--ink-muted); }
.specimen__meta b { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--ink); }
.swatches { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.swatch { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--hairline); }
.swatch:last-child { border-bottom: 0; }
.swatch__chip { width: 24px; height: 24px; border-radius: var(--radius-ctl); background: var(--sw); border: 1px solid var(--hairline-strong); box-shadow: var(--bevel); }
.swatch b { font-family: var(--font-display); font-weight: 600; font-size: 14px; }
.swatch code { font-family: var(--font-mono); font-size: 11px; color: var(--ink-muted); letter-spacing: .04em; }

/* ---------- contact ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(28px, 4vw, 72px); align-items: center; }
.stage-on .contact { display: grid; align-content: safe center; }
.contact__copy { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.contact__title { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(40px, 5.6vw, 92px); line-height: .98; letter-spacing: -.015em; text-wrap: balance; }
.contact__body { margin: 0; font-size: clamp(17px, 1.35vw, 20px); line-height: 1.55; color: var(--ink-muted); max-width: 30em; }
.contact__email { font-family: var(--font-mono); font-size: clamp(15px, 1.3vw, 18px); color: var(--ink); border-bottom: 1px solid var(--hairline-strong); padding-bottom: 2px; }
.contact__email:hover { color: var(--amber-text); border-color: var(--amber); }
.contact__foot { margin: 12px 0 0; font-family: var(--font-mono); font-size: 11px; line-height: 18px; color: var(--ink-muted); }
.talk { display: flex; flex-direction: column; min-height: 0; height: min(560px, 100%); }
.stage-on .contact .talk { height: min(560px, calc(100svh - var(--bar-h) - var(--hud-h) - 48px)); }
.talk .cs-terminal__bar .talk__langs { margin-left: auto; }
.talk__log { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px; display: flex; flex-direction: column; gap: 14px; scrollbar-width: thin; scrollbar-color: var(--hairline-strong) transparent; }
.talk__line { margin: 0; white-space: pre-wrap; color: var(--ink); display: flex; gap: 10px; }
.talk__line--you { color: var(--ink-muted); }
.talk__mark { color: var(--amber-text); flex: none; }
.talk__line--you .talk__mark { color: var(--teal-text); }
.talk__line--typing .talk__dots { width: 26px; height: 20px; background: radial-gradient(circle, var(--ink-muted) 2px, transparent 2.5px) 0 50% / 9px 9px repeat-x; animation: dots 1s steps(3) infinite; }
@keyframes dots { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.talk__quick { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.talk__chip { display: inline-flex; align-items: center; font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 10px 14px; border-radius: var(--radius-ctl); background: var(--surface-100); border: 1px solid var(--hairline-strong); color: var(--ink); box-shadow: var(--bevel); cursor: pointer; min-height: 40px; text-align: left; transition: border-color .2s linear, color .2s linear, translate .3s var(--ease-out); }
.talk__chip:hover { border-color: var(--teal); color: var(--teal-text); translate: 3px 0; }
.talk__note { margin: 0; color: var(--ink-muted); font-size: 11px; line-height: 16px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.talk__form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--hairline); align-items: center; }
.talk__form input { flex: 1 1 auto; min-width: 0; font-family: var(--font-mono); font-size: 16px; line-height: 20px; color: var(--ink); background: var(--surface-000); border: 1px solid var(--hairline-strong); border-radius: var(--radius-ctl); padding: 10px 12px; min-height: 44px; }
.talk__form input:focus { border-color: var(--amber); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 22%, transparent); }
.talk__form input::placeholder { color: var(--ink-muted); }
.talk__form .cs-btn { min-height: 44px; }

/* ---------- phone menu ---------- */
.menu { position: fixed; inset: 0; z-index: 35; background: color-mix(in srgb, var(--surface-000) 94%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); padding: calc(var(--bar-h) + 12px) var(--gutter) calc(var(--hud-h) + 12px); overflow-y: auto; }
.menu[hidden] { display: none; }
.menu__list { display: flex; flex-direction: column; animation: enter .6s var(--ease-out) both; --dy: 16; }
.menu__item { display: flex; align-items: baseline; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--hairline); color: var(--ink); font-family: var(--font-display); font-weight: 600; font-size: 22px; line-height: 1.2; }
.menu__item--sub { font-size: 17px; padding-left: 26px; color: var(--ink-muted); }
.menu__num { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--ink-muted); }
.menu__item.is-current, .menu__item.is-current .menu__num { color: var(--amber-text); }

/* ---------- easter egg ---------- */
.egg { position: absolute; right: var(--gutter); bottom: calc(var(--hud-h) + 12px); z-index: 2; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
html:not(.stage-on):not(.scroll-on) .egg { display: none; }
.egg__lamp { display: grid; place-items: center; width: 44px; height: 44px; background: none; border: 0; padding: 0; cursor: pointer; border-radius: var(--radius-ctl); }
.egg__lamp .cs-lamp { width: 6px; height: 6px; animation: cs-pulse var(--duration-pulse) steps(2) infinite; }
.egg__lamp[aria-expanded="true"] .cs-lamp { animation: none; width: 8px; height: 8px; }
.egg__tip[hidden] { display: none; }
.egg__tip { order: -1; width: min(320px, calc(100vw - 2 * var(--gutter))); background: var(--surface-100); border: 1px solid var(--hairline-strong); border-radius: var(--radius-card); box-shadow: var(--bevel), 0 18px 40px #0006; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.egg__eyebrow { font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--amber-text); }
.egg__eyebrow::before { content: "// "; color: var(--ink-muted); }
.egg__text { margin: 0; font-size: 13px; line-height: 19px; color: var(--ink); }
.egg__hint { font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); border-top: 1px solid var(--hairline); padding-top: 8px; }
.egg__hint b { color: var(--ink); }

/* ---------- reticle cursor ---------- */
.cursor { position: fixed; inset: 0 auto auto 0; z-index: 9999; pointer-events: none; opacity: 0; transition: opacity .25s linear; }
.cursor.is-visible { opacity: 1; }
.cursor__dot, .cursor__ring { position: fixed; top: 0; left: 0; will-change: transform; }
.cursor__dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--amber); box-shadow: var(--glow-amber); border-radius: var(--radius-lamp); transition: opacity .2s linear; }
.cursor__ring { width: 34px; height: 34px; }
.cursor__ring::after { content: ""; position: absolute; inset: 0; border: 1px solid color-mix(in srgb, var(--amber) 38%, transparent); border-radius: 2px; box-shadow: 0 0 22px color-mix(in srgb, var(--amber) 14%, transparent), inset 0 0 22px color-mix(in srgb, var(--amber) 6%, transparent); opacity: 0; transition: opacity .3s linear; }
.cursor.is-frame .cursor__ring::before { --c: var(--amber); --arm: 14px; }
.cursor.is-frame .cursor__ring::after { opacity: 1; }
.cursor__ring::before { content: ""; position: absolute; inset: 0; transition: inset .35s var(--ease-out);
  --c: color-mix(in srgb, var(--ink) 70%, transparent);
  background:
    linear-gradient(var(--c), var(--c)) 0 0 / var(--arm, 8px) 1px no-repeat, linear-gradient(var(--c), var(--c)) 0 0 / 1px var(--arm, 8px) no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 0 / var(--arm, 8px) 1px no-repeat, linear-gradient(var(--c), var(--c)) 100% 0 / 1px var(--arm, 8px) no-repeat,
    linear-gradient(var(--c), var(--c)) 0 100% / var(--arm, 8px) 1px no-repeat, linear-gradient(var(--c), var(--c)) 0 100% / 1px var(--arm, 8px) no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 100% / var(--arm, 8px) 1px no-repeat, linear-gradient(var(--c), var(--c)) 100% 100% / 1px var(--arm, 8px) no-repeat; }
.cursor.is-hot .cursor__ring::before { inset: -9px; --c: var(--amber); }
.cursor.is-hot .cursor__dot { opacity: 0; }
.cursor.is-down .cursor__ring::before { inset: 5px; }
.cursor.is-text { opacity: 0; }
html.has-cursor, html.has-cursor body, html.has-cursor a, html.has-cursor button, html.has-cursor .area { cursor: none; }
html.has-cursor input, html.has-cursor textarea { cursor: text; }

/* ---------- scroll mode: one page that scrolls, sections in normal flow (2026-11-08) ---------- */
html.scroll-on { --hud-h: 0px; scroll-behavior: smooth; scroll-padding-top: var(--bar-h); }
.scroll-on .scene { min-height: 0; }
.scroll-on .scene__inner { padding: clamp(72px, 12vh, 136px) var(--gutter); }
.scroll-on .scene--intro { display: flex; min-height: 100svh; }
.scroll-on .scene--intro .scene__inner { width: 100%; min-height: 100svh; justify-content: flex-start; padding-top: calc(var(--bar-h) + 24px); padding-bottom: 32px; }
.scroll-on .scene--intro .statement { margin-top: auto; }
.scroll-on .scene--intro .scene__inner > .areas { margin-top: auto; }
.scroll-on .scene--area + .scene--area .scene__inner { padding-top: clamp(24px, 6vh, 72px); }
.scroll-on .bar { background: linear-gradient(color-mix(in srgb, var(--surface-000) 94%, transparent), color-mix(in srgb, var(--surface-000) 72%, transparent)); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--hairline); }
.scroll-on .hud { top: var(--bar-h); bottom: auto; height: 1px; padding: 0; pointer-events: none; }
.scroll-on .hud::before, .scroll-on .hud__hint { display: none; }
.scroll-on .contact .talk { height: min(560px, 78svh); }
.scroll-on [data-anim] { opacity: 0; }
.scroll-on .scene.is-in [data-anim] { animation: enter .95s var(--ease-out) both; animation-delay: calc(min(var(--d, 0), 8) * 65ms + 60ms); }
.scroll-on .scene--method.is-in .step::before { animation: fill 1s var(--ease-out) both; animation-delay: calc(var(--d, 0) * 65ms + 320ms); }
@media (min-width: 1280px) { .scroll-on .scene__inner { padding-right: max(var(--gutter), 96px); } }
@media (max-width: 899px) {
  .scroll-on .scene__inner { padding: 56px var(--gutter); }
  .scroll-on .scene--intro .scene__inner { padding-top: calc(var(--bar-h) + 20px); padding-bottom: 28px; }
  .scroll-on .scene--area + .scene--area .scene__inner { padding-top: 16px; }
  .scroll-on .contact .talk { height: 420px; flex: none; }
}
@media (prefers-reduced-motion: reduce) {
  html.scroll-on { scroll-behavior: auto; }
  .scroll-on [data-anim], .scroll-on .scene.is-in [data-anim] { animation: none; opacity: 1; }
  .scroll-on .scene--method .step::before { animation: none; transform: scaleX(1); }
}

/* first load: the chrome slides in after the fonts */
.js .bar, .js .hud, .js .rail { opacity: 0; }
.js.is-ready .bar, .js.is-ready .hud, .js.is-ready .rail { opacity: 1; transition: opacity 1s linear .2s; }

/* ---------- laptops ---------- */
@media (max-width: 1279px) { .rail { display: none; } }
@media (min-width: 1280px) { .stage-on .scene__inner { padding-right: max(var(--gutter), 96px); } }
@media (max-width: 1180px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 32px; }
  .bar__nav { gap: 20px; }
}

/* ---------- phones ---------- */
@media (max-width: 899px) {
  :root { --gutter: 20px; --bar-h: 60px; --hud-h: 58px; }
  body { font-size: 15px; }
  .bar { grid-template-columns: 1fr auto; }
  .bar__nav { display: none; }
  .wordmark__role { display: none; }
  .menu-btn { display: inline-flex; }
  .hud__hint { display: none; }
  .hud { grid-template-columns: 1fr auto; }
  .bg-field { opacity: .55; }

  .stage-on .scene__inner { padding: 16px var(--gutter) 28px; justify-content: flex-start !important; }
  .stage-on .scene__inner > * { flex-shrink: 0; }
  /* sections start near the top instead of floating mid-screen; the intro stays centred */
  .stage-on .scene__inner > :first-child { margin-top: clamp(4px, 3vh, 28px); }
  .stage-on .scene--intro .scene__inner > :first-child { margin-top: auto; }
  .stage-on .scene__inner > :last-child { margin-bottom: auto; }
  .stage-on .scene--intro .scene__inner > .areas { margin-bottom: auto; }

  .stage-on .scene--intro .scene__inner { padding-top: 12px; padding-bottom: 20px; gap: 18px; justify-content: safe center; }
  /* the bottom strip holds only the progress line on phones, so it takes almost no room */
  :root { --hud-h: 18px; }
  .statement { gap: 16px; }
  .statement__title { font-size: clamp(56px, 17vw, 84px); }
  .statement__role { font-size: 19px; }
  .statement__line { font-size: 16px; }
  .statement__actions .cs-btn { flex: 1 1 0; justify-content: center; }
  .stage-on .areas, .areas { position: static; display: flex; flex-direction: column; border-top: 1px solid var(--hairline-strong); margin-top: 8px; }
  .area { border-top: 0; display: grid; grid-template-columns: 32px 1fr; grid-template-areas: "num title"; column-gap: 8px; padding: 10px 2px; border-bottom: 1px solid var(--hairline); background: color-mix(in srgb, var(--surface-000) 60%, transparent); }
  .area__num { grid-area: num; padding-top: 3px; }
  .area__num .cs-lamp { display: none; }
  .area__title { grid-area: title; justify-content: space-between; font-size: 18px; }
  .area__title .icon-arrow { opacity: 1; translate: none; color: var(--ink-muted); }
  .area.is-hover .area__title { text-shadow: none; }
  .egg { bottom: calc(var(--hud-h) + 4px); right: 8px; }

  /* stretch, not centre: centred children shrink to their content and the swipe cards slide off the left edge */
  .ascene, .stage-on .ascene { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 18px; }
  .ascene__head { gap: 10px; }
  .ascene__num { font-size: 64px; margin-bottom: 0; }
  .ascene__title { font-size: clamp(24px, 7vw, 32px); }
  .ascene .scene__lede { font-size: 15px; }
  /* sideways carousels: capability cards, method steps, lab cards */
  [data-carousel] { display: flex !important; flex-wrap: nowrap; gap: 12px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); overscroll-behavior-x: contain; margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter) 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  [data-carousel]::-webkit-scrollbar { display: none; }
  [data-carousel] > * { flex: 0 0 86%; scroll-snap-align: start; scroll-snap-stop: always; }
  .ascene__cases { border-top: 0; }
  .case { gap: 8px; padding: 18px; background: color-mix(in srgb, var(--surface-100) 94%, transparent); box-shadow: var(--bevel); }
  .case__top { display: none; }
  .case__detail { font-size: 15px; display: block; -webkit-line-clamp: unset; }
  .carousel-dots { display: flex; align-items: center; gap: 6px; margin-top: -8px; }
  .carousel-dots__dot { width: 16px; height: 2px; padding: 8px 0; box-sizing: content-box; background: var(--hairline-strong); background-clip: content-box; border: 0; transition: width .4s var(--ease-out), background-color .3s linear; }
  .carousel-dots__dot.is-on { width: 28px; background-color: var(--amber); }
  .carousel-dots__hint { margin-left: auto; font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); transition: opacity .4s linear; animation: nudge 2.4s var(--ease-io) infinite; }
  .carousel-dots__hint::after { content: " →"; }
  .carousel-dots.is-end .carousel-dots__hint { opacity: 0; }
  @keyframes nudge { 0%, 60%, 100% { translate: 0 0; } 30% { translate: -6px 0; } }
  .steps[data-carousel] > .step { padding: 18px; border: 1px solid var(--hairline); border-radius: var(--radius-card); background: color-mix(in srgb, var(--surface-100) 94%, transparent); box-shadow: var(--bevel); }
  .lab__cards[data-carousel] > .lab__card { flex-basis: 86%; }

  .step { padding-top: 16px; gap: 8px; }
  .step__tag { display: none; }
  .step__body { font-size: 14px; }
  .about, .stage-on .about, .lab, .stage-on .lab, .contact, .stage-on .contact { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 24px; }
  .stage-on .about, .stage-on .lab, .stage-on .contact { justify-content: safe center; }
  .about__text .about__lead { font-size: 20px; }
  .fact { padding: 14px 14px 16px; }
  .fact dd { font-size: 34px; }
  .contact__title { font-size: clamp(34px, 10vw, 50px); }
  .stage-on .contact .talk { height: 420px; flex: none; }
}

/* short phones: the hero still fits one screen */
@media (max-width: 899px) and (max-height: 700px) {
  .statement { gap: 12px; }
  .statement__title { font-size: clamp(48px, 14vw, 64px); }
  .stage-on .scene--intro .scene__inner { gap: 14px; }
  .area { padding-top: 8px; padding-bottom: 8px; }
}
@media (max-width: 899px) and (max-height: 600px) { .statement__line { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .stage-on .scene.is-active [data-anim], .stage-on .scene--area.is-active .case.is-current { animation: none; opacity: 1; }
  .stage-on .scene.is-leaving { visibility: hidden; }
  .stage-on .scene--method.is-active .step::before { animation: none; transform: scaleX(1); }
  .hud__progress, .rail__tick { transition: none; }
  .cs-lamp--pulse, .egg__lamp .cs-lamp, .hud__hint, .readout__label::before, .carousel-dots__hint { animation: none; }
}

/* =====================================================================================================
 * Frame 05 (2026-11-10): demos in each area, the Writing scene, the failure note, chat states.
 * ===================================================================================================== */
[hidden] { display: none !important; }

/* ---------- area scenes: cards or demo ---------- */
.ascene__right { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ascene__try { align-self: flex-start; margin-top: 10px; gap: 10px; padding: 10px 14px; min-height: 42px; text-align: left; border-color: var(--hairline-strong); background: color-mix(in srgb, var(--surface-000) 60%, transparent); }
.ascene__try .cs-lamp { width: 6px; height: 6px; animation: cs-pulse var(--duration-pulse) steps(2) infinite; }
.ascene__try .icon-arrow { width: 16px; height: 16px; transition: translate .4s var(--ease-out); }
.ascene__try:hover { border-color: var(--amber); color: var(--amber-text); }
.ascene__try:hover .icon-arrow { translate: 4px 0; }
.ascene__try[aria-expanded="true"] { border-color: var(--amber); color: var(--amber-text); }
.ascene__try[aria-expanded="true"] .icon-arrow { rotate: 180deg; }
.ascene__tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--hairline); }
.ascene__tab { position: relative; display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 8px 0 10px; cursor: pointer; font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); transition: color .2s linear; }
.ascene__tab .cs-lamp { width: 6px; height: 6px; }
.ascene__tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--amber); box-shadow: var(--glow-amber); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease-out); }
.ascene__tab:hover, .ascene__tab[aria-selected="true"] { color: var(--ink); }
.ascene__tab[aria-selected="true"]::after { transform: scaleX(1); }

/* switching between cards and demo: a short wipe, not the scene's long entrance */
.stage-on .scene.is-active.is-toggled .case[data-anim], .stage-on .scene.is-active.is-toggled .demo[data-anim] { animation-duration: .55s; animation-delay: calc(var(--n, 0) * 40ms); }

/* ---------- demo frame ---------- */
.demo { display: flex; flex-direction: column; min-height: 404px; border: 1px solid var(--hairline-strong); border-radius: var(--radius-panel); background: color-mix(in srgb, var(--surface-200) 94%, transparent); box-shadow: var(--bevel-inset); overflow: hidden; }
.demo__bar { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--hairline); font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.demo__bar .cs-lamp { width: 6px; height: 6px; }
.demo__tag { margin-left: auto; color: var(--ink-muted); font-size: 10px; letter-spacing: .12em; }
.demo__body { flex: 1 1 auto; display: flex; flex-direction: column; gap: 14px; padding: 16px; min-height: 0; }
.demo__body--split { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.demo__label { display: block; font-family: var(--font-mono); font-size: 10px; line-height: 14px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); }
.demo .cs-btn { min-height: 38px; padding: 8px 14px; }
.demo__seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--hairline-strong); border-radius: var(--radius-ctl); overflow: hidden; background: var(--surface-000); }
.demo__segbtn { font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 700; letter-spacing: .06em; color: var(--ink-muted); background: transparent; border: 0; border-right: 1px solid var(--hairline); padding: 8px 12px; min-height: 36px; cursor: pointer; text-align: left; transition: color .2s linear, background-color .2s linear; }
.demo__segbtn:last-child { border-right: 0; }
.demo__segbtn:hover { color: var(--ink); }
.demo__segbtn[aria-pressed="true"] { color: var(--amber-text); background: var(--surface-100); box-shadow: inset 0 -2px 0 var(--amber); }

/* 01 · approval queue */
.dq { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.dq__count { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--ink-muted); }
.dq__msg { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-left: 2px solid var(--hairline-strong); background: color-mix(in srgb, var(--surface-000) 70%, transparent); }
.dq__msg--out { border-left-color: var(--amber); background: var(--surface-100); }
.dq__msg p { margin: 0; font-size: 14px; line-height: 1.5; }
.dq__acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.dq__acts--why { flex-direction: column; align-items: flex-start; }
.dq__acts--why .cs-btn { text-align: left; text-transform: none; letter-spacing: 0; font-family: var(--font-body); font-size: 14px; font-weight: 500; }
.dq__note { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 13px; line-height: 1.45; color: var(--ink-muted); }
.dq__note--ok { color: var(--teal-text); }
.dq__note .cs-lamp, .dq__end .cs-lamp, .dq__rules .cs-lamp, .dq__autoval .cs-lamp { width: 6px; height: 6px; flex: none; }
.dq__end { margin: 0; display: flex; align-items: baseline; gap: 10px; font-size: 15px; line-height: 1.55; }
.dq__end + .cs-btn { align-self: flex-start; }
.dq__side { display: flex; flex-direction: column; gap: 10px; padding-left: 18px; border-left: 1px solid var(--hairline); min-width: 0; }
.dq__empty { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink-muted); }
.dq__rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.dq__rules li { display: flex; align-items: baseline; gap: 8px; font-size: 13px; line-height: 1.45; }
.dq__auto { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--hairline); display: flex; flex-direction: column; gap: 6px; }
.dq__autoval { display: flex; align-items: baseline; gap: 8px; font-size: 13px; line-height: 1.4; color: var(--ink-muted); }
.dq__autoval.is-on { color: var(--teal-text); }

/* 02 · test run */
.ev__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.ev__main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; flex: 1 1 auto; }
.ev__left { display: flex; flex-direction: column; gap: 16px; }
.ev__grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
.ev__cell { aspect-ratio: 1; display: grid; place-items: center; border: 1px solid var(--hairline); border-radius: var(--radius-lamp); font-family: var(--font-mono); font-size: 13px; line-height: 1; color: var(--ink-muted); }
.ev__cell.is-pass { border-color: var(--teal); color: var(--teal-text); background: color-mix(in srgb, var(--teal) 12%, transparent); }
.ev__cell.is-fail { border-color: var(--signal); color: var(--on-signal); background: var(--signal); font-weight: 700; }
.ev__stats { display: flex; gap: 28px; }
.ev__fails { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ev__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ev__list li { display: flex; align-items: baseline; gap: 8px; font-size: 13px; line-height: 1.45; }
.ev__list .cs-lamp { width: 6px; height: 6px; flex: none; }
.ev__hint { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink-muted); }
.ev__hint--strong { color: var(--ink); padding-top: 10px; border-top: 1px solid var(--hairline); }

/* 03 · ask the data */
.dd__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dd__chips .demo__segbtn { border: 1px solid var(--hairline-strong); border-radius: var(--radius-ctl); background: var(--surface-000); }
.dd__chips .demo__segbtn[aria-pressed="true"] { border-color: var(--amber); background: var(--surface-100); box-shadow: none; }
.dd__out { display: flex; flex-direction: column; gap: 14px; flex: 1 1 auto; }
.dd__answer { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 18px; line-height: 1.3; }
.dd__chart { position: relative; }
.dd__slot { position: relative; min-width: 0; outline-offset: 2px; }
.dd__slot::after { content: attr(data-tip); position: absolute; left: 50%; top: -6px; translate: -50% -100%; white-space: nowrap; padding: 4px 8px; background: var(--surface-100); border: 1px solid var(--hairline-strong); border-radius: var(--radius-ctl); box-shadow: var(--bevel), 0 8px 20px #0006; font-family: var(--font-mono); font-size: 11px; line-height: 16px; color: var(--ink); opacity: 0; pointer-events: none; z-index: 3; transition: opacity .15s linear; }
.dd__slot:hover::after, .dd__slot:focus-visible::after { opacity: 1; }
.dd__bar { background: var(--chart-amber-3); transition: height .7s var(--ease-out), width .7s var(--ease-out), background-color .15s linear; }
.dd__slot:hover .dd__bar, .dd__slot:focus-visible .dd__bar { background: var(--chart-amber-2); }
.dd__val { position: absolute; font-family: var(--font-mono); font-size: 12px; line-height: 14px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.dd__lab { font-family: var(--font-mono); font-size: 11px; line-height: 16px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* columns: thin bars on one baseline, rounded at the data end only */
.dd__chart--cols { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; }
.dd__chart--cols .dd__slot { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dd__chart--cols .dd__track { position: relative; width: 100%; height: 124px; display: flex; align-items: flex-end; justify-content: center; border-bottom: 1px solid var(--hairline-strong); margin-top: 18px; }
.dd__chart--cols .dd__bar { width: min(24px, 70%); height: calc(var(--v) * 100%); border-radius: 4px 4px 0 0; }
.dd__chart--cols .dd__val { left: 50%; translate: -50% 0; bottom: calc(var(--v) * 100% + 4px); }
/* horizontal bars: same rules turned on their side */
.dd__chart--bars { display: flex; flex-direction: column; gap: 10px; }
.dd__chart--bars .dd__slot { display: grid; grid-template-columns: minmax(0, 9.5em) minmax(0, 1fr); align-items: center; gap: 12px; }
.dd__chart--bars .dd__lab { order: -1; font-family: var(--font-body); font-size: 13px; color: var(--ink); }
.dd__chart--bars .dd__track { position: relative; height: 18px; border-left: 1px solid var(--hairline-strong); margin-right: 3em; }
.dd__chart--bars .dd__bar { height: 100%; width: calc(var(--v) * 100%); border-radius: 0 4px 4px 0; }
.dd__chart--bars .dd__val { top: 2px; left: calc(var(--v) * 100% + 8px); }
.dd__stat { padding: 8px 0; }
.dd__how { margin: auto 0 0; padding-top: 12px; border-top: 1px solid var(--hairline); font-size: 13px; line-height: 1.5; color: var(--ink-muted); display: flex; flex-direction: column; gap: 4px; }

/* 04 · roles */
.ap__ctl { display: flex; flex-wrap: wrap; gap: 12px 22px; }
.ap__group { display: flex; flex-direction: column; gap: 6px; }
.ap__screen { flex: 1 1 auto; display: flex; flex-direction: column; gap: 10px; padding: 14px; background: var(--surface-100); border: 1px solid var(--hairline); border-radius: var(--radius-card); box-shadow: var(--bevel); }
.ap__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.ap__name { font-family: var(--font-display); font-weight: 600; font-size: 16px; line-height: 1.3; }
.ap__rev { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.ap__rev b { font-family: var(--font-mono); font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; }
.ap__orders { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hairline); }
.ap__orders li { display: grid; grid-template-columns: 4.2em minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--hairline); font-size: 14px; }
.ap__id { font-family: var(--font-mono); font-size: 12px; color: var(--ink-muted); }
.ap__amt { font-family: var(--font-mono); font-size: 13px; font-variant-numeric: tabular-nums; }
.ap__amt--hidden { font-size: 11px; color: var(--ink-muted); }
.ap__orders .cs-badge { padding: 2px 8px; }
.ap__locked { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 5px 10px; border: 1px dashed var(--hairline-strong); border-radius: var(--radius-ctl); font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.ap__rev .ap__locked { align-self: flex-end; }
.ap__foot { margin-top: auto; display: flex; flex-direction: column; gap: 4px; font-size: 13px; line-height: 1.45; color: var(--ink-muted); }
.ap__wall { color: var(--teal-text); }

/* 05 · overnight run */
.nt__left { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; min-width: 0; }
.nt__left .cs-timeline { width: 100%; }
.nt__left .cs-timeline__body { min-height: 19px; }
.nt__right { display: flex; flex-direction: column; gap: 10px; padding-left: 18px; border-left: 1px solid var(--hairline); min-width: 0; }
.nt__idle { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink-muted); }
.nt__report { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.nt__report li { display: flex; flex-direction: column; gap: 2px; }
.nt__report b { font-family: var(--font-display); font-weight: 600; font-size: 14px; line-height: 1.3; }
.nt__report span { font-size: 13px; line-height: 1.4; color: var(--ink-muted); }
.nt__foot { margin: auto 0 0; padding-top: 10px; border-top: 1px solid var(--hairline); font-size: 13px; line-height: 1.5; color: var(--teal-text); }

/* ---------- method: the failure note ---------- */
.failure { max-width: 62em; padding: 2px 0 2px 18px; border-left: 2px solid var(--signal); display: flex; flex-direction: column; gap: 6px; }
.failure__eyebrow { font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--signal-text); }
.failure__title { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(18px, 1.5vw, 22px); line-height: 1.25; }
.failure__body { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-muted); }

/* ---------- writing ---------- */
.scene--writing .scene__inner { gap: clamp(28px, 5vh, 56px); }
.reads { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.read { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 24px 22px 20px; border: 1px solid var(--hairline); border-radius: var(--radius-card); background: color-mix(in srgb, var(--surface-000) 55%, transparent); color: var(--ink); transition: border-color .25s linear; }
.read:hover { color: var(--ink); }
html:not(.has-cursor) .read:hover { border-color: color-mix(in srgb, var(--amber) 55%, var(--hairline)); }
.read--lead { background: color-mix(in srgb, var(--surface-100) 88%, transparent); border-color: var(--hairline-strong); box-shadow: var(--bevel); }
.read__eyebrow { font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--amber-text); }
.read__eyebrow::before { content: "// "; color: var(--ink-muted); }
.read__title { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(19px, 1.6vw, 25px); line-height: 1.2; text-wrap: balance; }
.read--lead .read__title { font-size: clamp(22px, 2.1vw, 32px); }
.read__body { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-muted); }
.read__go { margin-top: auto; padding-top: 10px; display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.read__go .icon-arrow { width: 16px; height: 16px; transition: translate .45s var(--ease-out); }
.read:hover .read__go { color: var(--amber-text); }
.read:hover .read__go .icon-arrow { translate: 5px 0; }

/* ---------- chat states ---------- */
.contact__foot a { color: inherit; border-bottom: 1px solid var(--hairline-strong); }
.contact__foot a:hover { color: var(--amber-text); border-color: var(--amber); }
.talk__mail { align-self: flex-start; min-height: 44px; padding: 12px 18px; }
.talk__line--error { color: var(--signal-text); }
.talk__line--error .talk__mark { color: var(--signal-text); }
.talk__line a { color: var(--ink); border-bottom: 1px solid var(--hairline-strong); }
.talk__draft { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--hairline-strong); border-left: 2px solid var(--amber); border-radius: var(--radius-card); background: var(--surface-100); box-shadow: var(--bevel); font-family: var(--font-body); }
.talk__draftlabel { font-family: var(--font-mono); font-size: 10px; line-height: 14px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--amber-text); }
.talk__draftsubject { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 15px; line-height: 1.3; }
.talk__draftbody { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.5; color: color-mix(in srgb, var(--ink) 86%, var(--ink-muted)); max-height: 9.5em; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--hairline-strong) transparent; }
.talk__draftacts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 2px; }
.talk__draftacts .cs-btn { min-height: 40px; padding: 10px 14px; }
.talk__draftalt { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); border-bottom: 1px solid var(--hairline-strong); padding: 6px 0; }
.talk__draftalt:hover { color: var(--amber-text); border-color: var(--amber); }
.talk__draftnote { margin: 0; font-family: var(--font-mono); font-size: 11px; line-height: 16px; color: var(--ink-muted); }
.talk__evals { font-size: 11px; line-height: 16px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--teal-text); }
.talk__evals:hover { color: var(--teal); }

/* ---------- short screens (laptops) ---------- */
@media (max-height: 820px) and (min-width: 900px) {
  .demo { min-height: 348px; }
  .demo__body { padding: 14px; gap: 12px; }
  .dd__chart--cols .dd__track { height: 92px; }
  .ev__grid { gap: 3px; }
  .ascene__try { margin-top: 4px; }
  .read { padding: 20px 18px 16px; gap: 10px; }
}

/* ---------- phones ---------- */
@media (max-width: 899px) {
  .ascene__right { gap: 10px; }
  .ascene__try { display: none; }   /* the tabs sit right under the heading on a phone */
  .demo { min-height: 0; }
  .demo__tag { display: none; }
  .demo__body--split, .ev__main { display: flex; flex-direction: column; gap: 14px; }
  .dq__side, .nt__right { padding-left: 0; border-left: 0; padding-top: 12px; border-top: 1px solid var(--hairline); }
  .dq__auto { margin-top: 0; }
  .ev__grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .dd__chart--bars .dd__slot { grid-template-columns: minmax(0, 7.5em) minmax(0, 1fr); }
  .reads { display: flex; }
  .reads[data-carousel] > .read { flex-basis: 86%; background: color-mix(in srgb, var(--surface-100) 94%, transparent); box-shadow: var(--bevel); }
  .failure__body { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .ascene__try .cs-lamp { animation: none; } .dd__bar { transition: none; } }

/* narrow phones (under 375px): the menu button keeps its icon and drops its word, so the bar fits inside its margins */
@media (max-width: 374px) {
  .bar { gap: 10px; }
  .menu-btn { padding: 6px 10px; }
  .menu-btn span[data-i18n] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* =====================================================================================================
 * Frame 06 (2026-11-14): About is one column of text; Lab is one card with its live readings.
 * ===================================================================================================== */
.about, .stage-on .about { display: flex; flex-direction: column; justify-content: safe center; align-items: flex-start; }
.about__text { max-width: 46rem; gap: 16px; }
.about__text .about__lead { font-size: clamp(22px, 2.1vw, 31px); line-height: 1.28; }
.about__text p { font-size: clamp(16px, 1.25vw, 19px); }
.about__cta { margin-top: 8px !important; }
.about__cta a { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: clamp(20px, 1.8vw, 26px); line-height: 1.2; color: var(--amber-text); border-bottom: 1px solid color-mix(in srgb, var(--amber) 55%, transparent); padding-bottom: 4px; }
.about__cta a:hover { color: var(--chart-amber-2); border-color: var(--amber); }
.about__cta .icon-arrow { width: 20px; height: 20px; transition: translate .45s var(--ease-out); }
.about__cta a:hover .icon-arrow { translate: 5px 0; }

.lab__card--solo { gap: 14px; padding: clamp(20px, 2vw, 28px); }
.lab__card--solo p { font-size: 15px; line-height: 1.65; }
.lab__card--solo .readout { max-width: none; margin-top: 6px; }
.lab__card--solo .readout__cell b { font-size: clamp(26px, 2.4vw, 34px); }
/* the invitation to move the mouse only makes sense where there is one */
@media (hover: none), (pointer: coarse) { .only-pointer { display: none; } }
@media (max-width: 899px) {
  .about__text .about__lead { font-size: 21px; }
  .lab__card--solo p { font-size: 14px; }
  /* phones: the lines are lighter under text now, so they can be a little more present */
  .bg-field { opacity: .62; }
}

/* the note under the chat is a few full sentences now: sentence case reads better than capitals */
.talk__note { text-transform: none; letter-spacing: .01em; font-weight: 400; line-height: 17px; }

/* Frame 07 (2026-11-15): Writing holds two cards, the case study and the design system. */
.reads--two { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); max-width: 62rem; }

/* Frame 08: the Lab readings are the wind the background follows; the data's source is credited. */
.lab__credit { margin: 0; font-family: var(--font-mono); font-size: 11px !important; line-height: 16px !important; color: var(--ink-muted); }
.lab__credit a { color: inherit; border-bottom: 1px solid var(--hairline-strong); }
.lab__credit a:hover { color: var(--amber-text); border-color: var(--amber); }
.readout__cell b { white-space: nowrap; }
.readout__label::before { flex: none; }

/* Frame 08b: the hero says who Fernando is in a second, quieter line. */
.statement__about { margin: -6px 0 0; font-size: clamp(15px, 1.15vw, 17px); line-height: 1.55; max-width: 36em; color: var(--ink-muted); }
@media (max-width: 899px) { .statement__about { font-size: 15px; margin-top: -4px; } }
@media (max-width: 899px) and (max-height: 720px) { .statement__about { display: none; } }
@media (min-width: 900px) and (max-height: 660px) { .statement__about { display: none; } }
/* short laptop screens: the hero keeps both lines by giving up some size and air, so it still fits one screen */
@media (min-width: 900px) and (max-height: 760px) {
  .stage-on .scene--intro .scene__inner { padding-top: 12px; }
  .statement { gap: 13px; }
  .statement__title { font-size: clamp(56px, min(7.2vw, 12.5vh), 100px); }   /* sized by height too, so a wide but short window still fits */
  .statement__about { margin-top: -2px; }
  .statement__actions { margin-top: 4px; }
}
/* Lab links to the design system page; the Contact footer keeps only Privacy. */
.lab__more { margin: 2px 0 0; }
.lab__more a { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); border-bottom: 1px solid var(--hairline-strong); padding-bottom: 4px; }
.lab__more a:hover { color: var(--amber-text); border-color: var(--amber); }
.lab__more .icon-arrow { width: 16px; height: 16px; transition: translate .45s var(--ease-out); }
.lab__more a:hover .icon-arrow { translate: 5px 0; }
