/* ============================================================
   KERN / type specimen as interface
   Palette: black #0B0B0C / white #F4F4F2 / fire #FF3B00. Nothing else.
   Type: Roboto Flex (13 axes) + Space Mono.
   Depth strategy: no shadows anywhere. Hairlines, inversion, scale.
   ============================================================ */

:root {
  --black: #0B0B0C;
  --white: #F4F4F2;
  --fire: #FF3B00;

  /* hairlines + dims, mixed from brand tones only (never a default gray) */
  --rule-b: rgba(244, 244, 242, 0.17);
  --rule-b-soft: rgba(244, 244, 242, 0.09);
  --dim-b: rgba(244, 244, 242, 0.56);
  --rule-w: rgba(11, 11, 12, 0.15);
  --rule-w-soft: rgba(11, 11, 12, 0.07);
  --dim-w: rgba(11, 11, 12, 0.62);

  /* per-field aliases, remapped by .field-* */
  --ink: var(--white);
  --field: var(--black);
  --rule: var(--rule-b);
  --rule-soft: var(--rule-b-soft);
  --dim: var(--dim-b);

  --ease-spec: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-flip: cubic-bezier(0.85, 0, 0.15, 1);
  --ease-ink: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-rail: cubic-bezier(0.65, 0, 0.35, 1);

  --pad: clamp(20px, 3.4vw, 48px);
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 32px;
  --s5: 48px;
  --s6: 64px;
  --s7: 96px;
  --s8: 128px;

  --nav-h: 66px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--fire) transparent;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--black);
  color: var(--white);
  font-family: 'Roboto Flex', 'Roboto', system-ui, sans-serif;
  font-variation-settings: 'wght' 380, 'wdth' 100, 'opsz' 17, 'GRAD' 0;
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

::selection { background: var(--fire); color: var(--black); }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--fire); }

/* ---------- fields ---------- */
.field-black {
  background: var(--black); color: var(--white);
  --ink: var(--white); --field: var(--black);
  --rule: var(--rule-b); --rule-soft: var(--rule-b-soft); --dim: var(--dim-b);
}
.field-white {
  background: var(--white); color: var(--black);
  --ink: var(--black); --field: var(--white);
  --rule: var(--rule-w); --rule-soft: var(--rule-w-soft); --dim: var(--dim-w);
}

/* ---------- type primitives ---------- */
/* .mono-xs is used standalone all over, so it needs the family itself.
   Deliberately NOT uppercase: it labels axis tags, and OpenType axis tags
   are case-sensitive ('wght' lowercase, 'GRAD' uppercase). Rendering
   'WGHT' would be wrong in front of an audience that reads type. */
.mono, .mono-xs {
  font-family: 'Space Mono', ui-monospace, monospace;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}
.mono { font-size: 0.6875rem; letter-spacing: 0.14em; text-transform: uppercase; }
.mono-xs { font-size: 0.625rem; letter-spacing: 0.13em; }
.up { text-transform: uppercase; }
.exact { text-transform: none; }

.h2 {
  font-size: clamp(2.1rem, 4.6vw, 4rem);
  line-height: 0.98;
  font-variation-settings: 'wght' 640, 'wdth' 82, 'opsz' 60, 'GRAD' 0;
  letter-spacing: -0.028em;
  text-wrap: balance;
}
.h3 {
  font-size: clamp(1.2rem, 1.6vw, 1.5rem);
  line-height: 1.15;
  font-variation-settings: 'wght' 660, 'wdth' 90, 'opsz' 24, 'GRAD' 0;
  letter-spacing: -0.018em;
}
.lead {
  font-size: clamp(1.05rem, 1.32vw, 1.28rem);
  line-height: 1.45;
  font-variation-settings: 'wght' 340, 'wdth' 104, 'opsz' 22, 'GRAD' 0;
  letter-spacing: -0.006em;
  color: var(--dim);
  text-wrap: pretty;
  max-width: 46ch;
}
p { text-wrap: pretty; }
.fire { color: var(--fire); }

/* Variable-font gotcha: font-variation-settings on a parent silently wins
   over font-weight on a child, so <strong> renders identically to body
   text unless we re-declare the axis. Every emphasis needs its own tuple. */
strong { font-variation-settings: 'wght' 700, 'wdth' 100, 'opsz' 16, 'GRAD' 0; font-weight: 400; }
.axis-def dd strong, .card p strong { color: var(--ink); }
code {
  font-family: 'Space Mono', ui-monospace, monospace;
  text-transform: none; font-size: 0.84em; letter-spacing: 0.01em;
  color: var(--ink);
}

/* ---------- layout ---------- */
/* width:100% is load-bearing. .display-sect is a column flex container, and
   auto margins on a flex item's cross axis beat align-self:stretch, so every
   .wrap in there collapsed to shrink-to-fit and the headline fit computed
   against a 120px measure. */
.wrap { width: 100%; max-width: 1560px; margin-inline: auto; padding-inline: var(--pad); }
.sect { padding-block: clamp(84px, 10.5vw, 148px); position: relative; }
/* editorial two-column head: headline left, lead right, bottoms aligned.
   Single-column left-aligned heads left ~60% of the measure dead. */
.sect-head {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: var(--s3) var(--s6);
  align-items: end;
  margin-bottom: var(--s7);
}
.sect-head .idx { grid-column: 1 / -1; margin-bottom: var(--s1); }
.sect-head .h2 { margin-top: 0; }
.sect-head .lead { margin-top: 0; max-width: 52ch; padding-bottom: 0.4em; }
@media (max-width: 860px) {
  .sect-head { grid-template-columns: 1fr; gap: var(--s3); }
  .sect-head .lead { padding-bottom: 0; }
}

.idx {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--dim);
}
.idx::after {
  content: ''; width: 40px; height: 1px; background: var(--rule);
}

/* ---------- seam: registration marks, print-style, at each field flip ---------- */
.seam {
  position: absolute; top: 22px; left: 0; right: 0;
  display: flex; justify-content: space-between;
  padding-inline: var(--pad);
  pointer-events: none; z-index: 2;
}
.regmark { width: 16px; height: 16px; color: var(--rule); flex: none; }
.seam .regmark:first-child { color: var(--fire); opacity: 0.55; }

section[id], header[id] { scroll-margin-top: var(--nav-h); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  height: var(--nav-h);
  display: flex; align-items: center; gap: var(--s5);
  padding-inline: var(--pad);
  border-bottom: 1px solid transparent;
  transition: background 420ms var(--ease-spec), border-color 420ms var(--ease-spec);
}
.nav.is-stuck {
  background: color-mix(in srgb, var(--black) 88%, transparent);
  backdrop-filter: blur(14px) saturate(120%);
  border-bottom-color: var(--rule-b);
}
.logo {
  font-size: 1.22rem; line-height: 1;
  font-variation-settings: 'wght' 850, 'wdth' 76, 'opsz' 20, 'GRAD' 0;
  letter-spacing: 0.005em;
  color: var(--white); text-decoration: none;
  display: inline-flex; align-items: flex-start;
  transition: font-variation-settings 500ms var(--ease-ink), letter-spacing 500ms var(--ease-ink);
}
.logo sup {
  font-family: 'Space Mono', monospace;
  font-size: 0.44rem; letter-spacing: 0.1em;
  margin-left: 4px; margin-top: 1px;
  color: var(--dim-b);
  transition: color 400ms var(--ease-spec);
}
.logo:hover, .logo:focus-visible {
  letter-spacing: -0.05em;
  font-variation-settings: 'wght' 1000, 'wdth' 70, 'opsz' 20, 'GRAD' 0;
}
.logo:hover sup, .logo:focus-visible sup { color: var(--fire); }

.nav-links { margin-left: auto; display: flex; gap: var(--s4); align-items: center; }
.nav-link {
  color: var(--dim-b); text-decoration: none; position: relative;
  padding: 6px 0;
  transition: color 320ms var(--ease-spec);
}
.nav-link::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: var(--fire);
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 380ms var(--ease-ink);
}
.nav-link:hover, .nav-link:focus-visible, .nav-link.is-on { color: var(--white); }
.nav-link:hover::after, .nav-link:focus-visible::after, .nav-link.is-on::after { transform: scaleX(1); }

/* ---------- hero entrance choreography ----------
   The specimen letters wipe in on their own timeline; everything around
   them lifts in behind, staggered, so the first second reads as composed
   rather than as one block appearing. */
.hero-in { opacity: 0; transform: translateY(12px); }
@media (prefers-reduced-motion: no-preference) {
  .hero-in {
    transition: opacity 720ms var(--ease-spec), transform 720ms var(--ease-spec);
    transition-delay: var(--hd, 0ms);
  }
}
.is-loaded .hero-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .hero-in { opacity: 1; transform: none; } }

/* ---------- buttons ---------- */
.btn {
  --btn-ink: var(--black); --btn-field: var(--white);
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 22px;
  background: var(--btn-field); color: var(--btn-ink);
  border: 1px solid var(--btn-field);
  text-decoration: none; cursor: pointer;
  font-family: 'Space Mono', monospace;
  font-size: 0.6875rem; letter-spacing: 0.14em; text-transform: uppercase;
  transition: color 340ms var(--ease-spec), border-color 340ms var(--ease-spec);
}
.btn > span { position: relative; z-index: 1; }
.btn::before {
  content: ''; position: absolute; inset: 0; background: var(--fire);
  transform: scaleY(0); transform-origin: 50% 100%;
  transition: transform 420ms var(--ease-ink);
}
.btn:hover::before, .btn:focus-visible::before { transform: scaleY(1); }
.btn:hover, .btn:focus-visible { color: var(--white); border-color: var(--fire); }
.btn-ghost {
  --btn-field: transparent; --btn-ink: currentColor;
  border-color: var(--rule);
}
.btn-ghost:hover, .btn-ghost:focus-visible { color: var(--white); border-color: var(--fire); }
.btn:focus-visible { outline: 2px solid var(--fire); outline-offset: 3px; }
.nav .btn { min-height: 38px; padding: 0 16px; }

/* ============================================================
   01 / DISPLAY / the money shot
   ============================================================ */
.display-sect {
  min-height: 100svh;
  padding-top: calc(var(--nav-h) + clamp(18px, 2.4vw, 34px));
  padding-bottom: clamp(24px, 3vw, 40px);
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.crop-frame { position: absolute; inset: var(--nav-h) var(--pad) 20px; pointer-events: none; color: var(--rule-b); }
.crop { position: absolute; width: 18px; height: 18px; color: var(--rule-b); }
.crop-tl { top: 0; left: -6px; }
.crop-tr { top: 0; right: -6px; transform: scaleX(-1); }
.crop-bl { bottom: 0; left: -6px; transform: scaleY(-1); }
.crop-br { bottom: 0; right: -6px; transform: scale(-1); }

.display-rail {
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3);
  padding-bottom: 14px; border-bottom: 1px solid var(--rule-b);
  color: var(--dim-b);
}
.display-rail .live { display: inline-flex; align-items: center; gap: 7px; color: var(--fire); }
.live-dot { width: 5px; height: 5px; background: var(--fire); flex: none; }
@media (prefers-reduced-motion: no-preference) {
  .live-dot { animation: blip 2.4s var(--ease-rail) infinite; }
}
@keyframes blip { 0%, 100% { opacity: 1; } 50% { opacity: 0.18; } }

.display-stage {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  padding-block: clamp(20px, 3.2vw, 48px);
}

/* the specimen itself */
.display {
  --gap: 12px;
  font-variation-settings: 'wght' 380, 'wdth' 100, 'opsz' 144, 'GRAD' 0;
  font-size: clamp(3rem, 12vw, 9rem); /* no-JS fallback only */
  line-height: 0.86;
  letter-spacing: -0.02em;
  font-weight: 400;
}
.display.is-built { font-size: inherit; letter-spacing: normal; line-height: 1; }
.display.is-built .spec-row + .spec-row { margin-top: var(--gap); }

.spec-row { display: flex; align-items: baseline; gap: var(--s3); }
.line {
  position: relative; display: block; flex: none;
  line-height: 1; white-space: nowrap;
}
.ltr {
  position: absolute; top: -0.135em; left: 0;
  line-height: 1; display: inline-block;
  will-change: font-variation-settings, transform;
  font-variation-settings: 'wght' 380, 'wdth' 100, 'opsz' 144, 'GRAD' 0;
}
/* Entrance: each glyph wipes up off its own baseline, like it's being
   pulled off a press. It has to be clip-path, not transform: the rAF
   loop owns `transform` on every letter, so a transform-based entrance
   would be overwritten on the very next frame. */
.display:not(.is-revealed) .ltr { opacity: 0; clip-path: inset(100% -30% -30% -30%); }
.ltr {
  transition: opacity 560ms var(--ease-spec), clip-path 780ms var(--ease-spec);
  transition-delay: var(--d, 0ms);
}
.display.is-revealed .ltr { opacity: 1; clip-path: inset(-30% -30% -30% -30%); }

/* The one drop of fire in the hero. Sized like a real text cursor, not a
   slab: at 0.075em it rendered 21px wide at display size and swamped the
   frame. It also has to clear the spec gutter, so the offset is tight. */
.caret {
  position: absolute; top: 0.01em; left: 0;
  width: 0.032em; height: 0.7em;
  background: var(--fire);
  will-change: transform, opacity;
}
.display:not(.is-revealed) .caret { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .display.is-revealed .caret { animation: caret-pulse 1.9s var(--ease-rail) infinite; }
}
@keyframes caret-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.32; } }

.spec-note {
  font-family: 'Space Mono', monospace;
  font-size: 0.625rem; letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  color: var(--dim-b); white-space: nowrap;
  transition: color 500ms var(--ease-spec);
  flex: none;
}
.spec-note.is-hot { color: var(--fire); }

/* hero bottom rail */
.display-foot {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s6); align-items: end;
  padding-top: clamp(18px, 2.4vw, 30px);
  border-top: 1px solid var(--rule-b);
}
.display-copy { font-size: clamp(1rem, 1.22vw, 1.2rem); line-height: 1.45; max-width: 44ch; color: var(--dim-b);
  font-variation-settings: 'wght' 350, 'wdth' 104, 'opsz' 20, 'GRAD' 0; }
.display-copy strong { color: var(--white); font-variation-settings: 'wght' 620, 'wdth' 100, 'opsz' 20, 'GRAD' 0; }
.display-cta { display: flex; gap: 10px; margin-top: var(--s3); flex-wrap: wrap; }

/* live axis readout */
.axis-readout { display: grid; grid-template-columns: repeat(2, auto); gap: 6px var(--s4); }
.axis-row { display: grid; grid-template-columns: 34px 74px 44px; align-items: center; gap: 9px; }
.axis-row .an { color: var(--dim-b); }
.axis-row .av { color: var(--fire); text-align: right; }
.axis-bar { position: relative; height: 3px; background: var(--rule-b-soft); overflow: hidden; }
.axis-bar i { position: absolute; inset: 0; background: var(--white); transform-origin: 0 50%; transform: scaleX(0); }

/* ============================================================
   IN USE / proof strip
   ============================================================ */
.inuse { border-top: 1px solid var(--rule-b); padding-block: clamp(40px, 5vw, 68px); }
.inuse-head { display: flex; align-items: baseline; gap: var(--s3); color: var(--dim-b); margin-bottom: var(--s5); }
.inuse-head::after { content: ''; flex: 1; height: 1px; background: var(--rule-b); }
.inuse-grid {
  display: flex; flex-wrap: wrap; gap: var(--s5) clamp(24px, 3.4vw, 56px);
  align-items: flex-end;
}
.mark { display: flex; flex-direction: column; gap: 9px; cursor: default; }
.mark-name {
  font-size: clamp(1rem, 1.42vw, 1.32rem); line-height: 1; white-space: nowrap;
  color: var(--dim-b);
  transition: font-variation-settings 560ms var(--ease-ink), color 400ms var(--ease-spec);
}
.mark-spec { color: rgba(244, 244, 242, 0.3); transition: color 400ms var(--ease-spec); }
.mark:hover .mark-name { color: var(--white); font-variation-settings: 'wght' 1000, 'wdth' 60, 'opsz' 20, 'GRAD' 150 !important; }
.mark:hover .mark-spec { color: var(--fire); }

/* ============================================================
   02 / AXES / ampersand parade
   ============================================================ */
/* Equal fixed columns, glyph centred in each. The width axis can then
   run 38..151 on scroll without ever reflowing the row. */
.amp-parade {
  display: grid; grid-template-columns: repeat(7, 1fr); align-items: flex-end;
  margin-top: var(--s7);
  padding-bottom: var(--s4);
  border-bottom: 1px solid var(--rule-w);
}
.amp-cell { display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: 0; }
.amp {
  font-size: clamp(2.4rem, 8.2vw, 7.2rem); line-height: 0.72;
  will-change: font-variation-settings;
  transition: color 420ms var(--ease-spec);
  cursor: default;
}
.amp-cell .mono-xs {
  color: var(--dim-w); transition: color 420ms var(--ease-spec);
  white-space: nowrap; text-align: center; line-height: 1.6;
  font-variant-numeric: tabular-nums;
}
.amp-cell:hover .amp { color: var(--fire); }
.amp-cell:hover .mono-xs { color: var(--fire); }
.axis-legend {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--s5) var(--s4); margin-top: var(--s6);
}
.axis-def { border-top: 1px solid var(--rule-w); padding-top: var(--s2); }
.axis-def dt { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.axis-def .at { font-family: 'Space Mono', monospace; font-size: 0.9rem; letter-spacing: 0.04em; }
.axis-def .ar { color: var(--dim-w); }
.axis-def dd { font-size: 0.95rem; line-height: 1.5; color: var(--dim-w);
  font-variation-settings: 'wght' 360, 'wdth' 100, 'opsz' 15, 'GRAD' 0; }

/* ---------- waterfall plate ---------- */
.waterfall { margin-top: var(--s7); border-bottom: 1px solid var(--rule-w); }
.wf-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3);
  color: var(--dim-w); padding-bottom: var(--s2); flex-wrap: wrap;
}
.wf-row {
  display: flex; align-items: baseline; gap: clamp(14px, 2.2vw, 34px);
  border-top: 1px solid var(--rule-w);
  padding-block: clamp(14px, 1.7vw, 24px);
}
.wf-note { color: var(--dim-w); flex: none; width: 46px; text-align: right; transition: color 380ms var(--ease-spec); }
.wf-row:hover .wf-note { color: var(--fire); }
.wf-line {
  /* opsz set from the real rendered size in JS: at 96px the letterforms
     tighten, at 13px they open up. That's what the axis is for. */
  font-variation-settings: 'wght' 370, 'wdth' 100, 'opsz' var(--o, 40), 'GRAD' 0;
  letter-spacing: -0.018em; min-width: 0;
  transition: font-variation-settings 500ms var(--ease-ink);
}
.wf-row:hover .wf-line { font-variation-settings: 'wght' 620, 'wdth' 100, 'opsz' var(--o, 40), 'GRAD' 60; }
@media (max-width: 620px) { .wf-note { width: 38px; } }

/* ============================================================
   03 / VOICE / the register slider
   ============================================================ */
.voice-panel { border: 1px solid var(--rule-w); }
.voice-bar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  padding: 14px var(--s4); border-bottom: 1px solid var(--rule-w);
  color: var(--dim-w); flex-wrap: wrap;
}
/* sized for the FORMAL register's three lines and no more. At 340px the
   short registers floated in a mostly empty box. */
.voice-stage {
  padding: clamp(28px, 4vw, 52px) var(--s4);
  display: grid; align-items: center;
  min-height: clamp(120px, 14vw, 190px);
}
.sample {
  font-size: clamp(1.5rem, 3.4vw, 3rem);
  line-height: 1.14; letter-spacing: -0.02em;
  will-change: font-variation-settings;
  transition: font-variation-settings 620ms var(--ease-ink);
  text-wrap: pretty;
}
.sample .w { display: inline-block; will-change: transform, opacity; }
.voice-ctl { border-top: 1px solid var(--rule-w); padding: var(--s4); display: grid; gap: var(--s3); }
.voice-ctl-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); }
.reg-ticks { display: flex; justify-content: space-between; }
.reg-ticks span {
  color: var(--dim-w); cursor: pointer; transition: color 300ms var(--ease-spec);
  background: none; border: 0; font: inherit; padding: 4px 0;
}
.reg-ticks span.is-on { color: var(--fire); }
.reg-ticks span:hover { color: var(--ink); }

/* range inputs / specimen ruler */
input[type=range] {
  -webkit-appearance: none; appearance: none;
  width: 100%; background: transparent; cursor: ew-resize; height: 24px; margin: 0;
}
input[type=range]::-webkit-slider-runnable-track { height: 1px; background: var(--rule); border: 0; }
input[type=range]::-moz-range-track { height: 1px; background: var(--rule); border: 0; }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 13px; height: 13px; margin-top: -6px;
  background: var(--fire); border: 0; border-radius: 0;
  transition: transform 260ms var(--ease-ink);
}
input[type=range]::-moz-range-thumb {
  width: 13px; height: 13px; background: var(--fire); border: 0; border-radius: 0;
  transition: transform 260ms var(--ease-ink);
}
input[type=range]:hover::-webkit-slider-thumb, input[type=range]:active::-webkit-slider-thumb { transform: scale(1.35); }
input[type=range]:hover::-moz-range-thumb { transform: scale(1.35); }
input[type=range]:focus { outline: none; }
input[type=range]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--fire); outline-offset: 3px; }
input[type=range]:focus-visible::-moz-range-thumb { outline: 2px solid var(--fire); outline-offset: 3px; }

.rule-track { position: relative; }
.rule-ticks { position: absolute; inset: 11px 6px auto 6px; display: flex; justify-content: space-between; pointer-events: none; }
.rule-ticks i { width: 1px; height: 6px; background: var(--rule); display: block; }

/* ============================================================
   04 / WORK / feature cards
   ============================================================ */
.work-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1px; background: var(--rule-w); border: 1px solid var(--rule-w); }
.card { background: var(--white); padding: clamp(24px, 2.6vw, 40px); display: flex; flex-direction: column; gap: var(--s2); position: relative; overflow: hidden; }
.card::after {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--fire);
  transform: scaleX(0); transform-origin: 0 50%; transition: transform 520ms var(--ease-ink);
}
.card:hover::after { transform: scaleX(1); }
.card .cn { color: var(--dim-w); }
.card p { font-size: 0.98rem; line-height: 1.5; color: var(--dim-w);
  font-variation-settings: 'wght' 360, 'wdth' 100, 'opsz' 16, 'GRAD' 0; }
/* margin-top:auto floors every demo to its card, and the min-height makes the
   four rules land on one line across the row instead of four heights */
.card-demo {
  margin-top: auto; padding-top: var(--s3);
  border-top: 1px solid var(--rule-w);
  min-height: 118px;
  display: flex; flex-direction: column; justify-content: center;
}

/* margin-note demo (card 1) */
.note-demo { font-size: 0.95rem; line-height: 1.6; position: relative; }
.note-demo .flag { color: var(--fire); cursor: help; position: relative;
  box-shadow: inset 0 -1px 0 var(--fire); }
.note-pop {
  position: absolute; left: 0; right: 0; top: calc(100% + 10px);
  border: 1px solid var(--fire); background: var(--white); padding: 10px 12px;
  color: var(--ink);
  opacity: 0; transform: translateY(-4px); pointer-events: none;
  transition: opacity 320ms var(--ease-spec), transform 320ms var(--ease-spec);
}
.note-demo:hover .note-pop, .note-demo:focus-within .note-pop { opacity: 1; transform: translateY(0); }

/* banned-list demo (card 2) */
.rules-demo { display: flex; flex-wrap: wrap; gap: 6px; }
.rules-demo li { list-style: none; }
.chip {
  display: inline-block; padding: 4px 8px; border: 1px solid var(--rule-w);
  font-family: 'Space Mono', monospace; font-size: 0.625rem; letter-spacing: 0.08em;
  color: var(--dim-w); position: relative;
  transition: color 380ms var(--ease-spec), border-color 380ms var(--ease-spec);
}
.chip::after {
  content: ''; position: absolute; left: 6px; right: 6px; top: 50%; height: 1px; background: var(--fire);
  transform: scaleX(0); transform-origin: 0 50%; transition: transform 420ms var(--ease-flip);
}
.is-revealed .chip.struck::after { transform: scaleX(1); transition-delay: var(--cd, 0ms); }
.is-revealed .chip.struck { color: rgba(11, 11, 12, 0.3); border-color: var(--rule-w-soft); }

/* counter demo (card 3) */
.count-demo { display: flex; align-items: baseline; gap: 10px; }
.count-num { font-size: 2.6rem; line-height: 1; font-variation-settings: 'wght' 780, 'wdth' 78, 'opsz' 40, 'GRAD' 0;
  font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }

/* ============================================================
   05 / PLAYGROUND
   ============================================================ */
.play-panel { border: 1px solid var(--rule-b); display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
.play-main { border-right: 1px solid var(--rule-b); display: flex; flex-direction: column; }
.play-bar { display: flex; justify-content: space-between; align-items: center; gap: var(--s2);
  padding: 12px var(--s3); border-bottom: 1px solid var(--rule-b); color: var(--dim-b); }
/* flex:1 + overflow:auto lets the pane fill its column. The JS auto-grow it
   replaced pinned the height to 240px and left ~260px of dead black below. */
#play-text {
  width: 100%; flex: 1; min-height: 260px; resize: none;
  background: transparent; border: 0; outline: none; color: var(--white);
  font-family: 'Roboto Flex', sans-serif;
  padding: clamp(20px, 2.6vw, 36px);
  caret-color: var(--fire);
  line-height: 1.16; letter-spacing: -0.015em;
  overflow: auto;
  will-change: font-variation-settings;
}
#play-text::placeholder { color: rgba(244, 244, 242, 0.28); }
#play-text:focus-visible { outline: 1px solid var(--fire); outline-offset: -1px; }
.play-side { display: flex; flex-direction: column; }
.play-ctls { padding: var(--s3); display: grid; gap: var(--s4); border-bottom: 1px solid var(--rule-b); }
.ctl-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.ctl-head .cv { color: var(--fire); }
.ctl-head .cn { color: var(--dim-b); }
.play-css { padding: var(--s3); flex: 1; display: flex; flex-direction: column; gap: var(--s2); }
.play-css pre {
  font-family: 'Space Mono', monospace; font-size: 0.6875rem; line-height: 1.75;
  color: var(--dim-b); white-space: pre; overflow-x: auto;
  font-variant-numeric: tabular-nums;
}
.play-css pre b { color: var(--fire); font-weight: 400; }
.copy-btn {
  align-self: flex-start; margin-top: auto; background: transparent; border: 1px solid var(--rule-b);
  color: var(--dim-b); cursor: pointer; padding: 8px 12px; min-height: 34px;
  font-family: 'Space Mono', monospace; font-size: 0.625rem; letter-spacing: 0.14em; text-transform: uppercase;
  transition: color 300ms var(--ease-spec), border-color 300ms var(--ease-spec);
}
.copy-btn:hover, .copy-btn:focus-visible { color: var(--fire); border-color: var(--fire); }
.copy-btn:focus-visible { outline: 2px solid var(--fire); outline-offset: 2px; }

/* preset chips */
.presets { display: flex; flex-wrap: wrap; gap: 6px; }
.preset {
  background: transparent; border: 1px solid var(--rule-b); color: var(--dim-b); cursor: pointer;
  padding: 6px 9px; font-family: 'Space Mono', monospace; font-size: 0.5625rem; letter-spacing: 0.1em;
  text-transform: uppercase; transition: color 280ms var(--ease-spec), border-color 280ms var(--ease-spec);
}
.preset:hover, .preset:focus-visible { color: var(--fire); border-color: var(--fire); }

/* ============================================================
   06 / THE DESK / product showcase
   ============================================================ */
.desk {
  border: 1px solid var(--rule-b);
  display: grid; grid-template-columns: minmax(0, 1fr) 260px;
}
.desk-doc { border-right: 1px solid var(--rule-b); }
.desk-bar { display: flex; align-items: center; gap: var(--s2); padding: 11px var(--s3);
  border-bottom: 1px solid var(--rule-b); color: var(--dim-b); }
.desk-bar .dot { width: 5px; height: 5px; background: var(--rule-b); flex: none; }
.desk-body { padding: clamp(22px, 2.6vw, 40px); font-size: clamp(1rem, 1.28vw, 1.22rem); line-height: 1.66;
  font-variation-settings: 'wght' 370, 'wdth' 102, 'opsz' 20, 'GRAD' 0; }
.desk-body p + p { margin-top: 1em; }
/* The strike is a background gradient, not an absolutely positioned ::after.
   An ::after only covers a wrapped inline's bounding box, so a cut spanning
   two lines collapsed into a single stray dash. box-decoration-break:clone
   gives every line fragment its own rule, and background-size animates,
   so it still draws left to right. */
.cut {
  color: var(--dim-b);
  background-image: linear-gradient(var(--fire), var(--fire));
  background-repeat: no-repeat;
  background-position: 0 56%;
  background-size: 0% 1.5px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-size 420ms var(--ease-flip), color 500ms var(--ease-spec);
}
.desk.is-live .cut {
  background-size: 100% 1.5px;
  color: rgba(244, 244, 242, 0.3);
  transition-delay: var(--cd, 0ms);
}
.add {
  color: var(--white); font-variation-settings: 'wght' 640, 'wdth' 100, 'opsz' 20, 'GRAD' 0;
  box-shadow: inset 0 -2px 0 var(--fire);
  opacity: 0; transition: opacity 420ms var(--ease-spec);
}
.desk.is-live .add { opacity: 1; transition-delay: var(--cd, 0ms); }
.desk-side { display: flex; flex-direction: column; }
.desk-stat { padding: var(--s3); border-bottom: 1px solid var(--rule-b); }
.desk-stat .sv { font-size: 1.9rem; line-height: 1.1; font-variation-settings: 'wght' 760, 'wdth' 80, 'opsz' 30, 'GRAD' 0;
  font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.desk-stat .sn { color: var(--dim-b); margin-top: 6px; display: block; }
.desk-notes { padding: var(--s3); display: grid; gap: var(--s3); flex: 1; }
.desk-note { border-left: 1px solid var(--fire); padding-left: 12px;
  opacity: 0; transform: translateX(-6px);
  transition: opacity 520ms var(--ease-spec), transform 520ms var(--ease-spec); }
.desk.is-live .desk-note { opacity: 1; transform: translateX(0); transition-delay: var(--nd, 0ms); }
.desk-note .dn-t { color: var(--fire); display: block; margin-bottom: 5px; }
.desk-note p { font-size: 0.86rem; line-height: 1.45; color: var(--dim-b);
  font-variation-settings: 'wght' 360, 'wdth' 100, 'opsz' 14, 'GRAD' 0; }

/* ============================================================
   07 / LICENCE / pricing
   ============================================================ */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule-w); border: 1px solid var(--rule-w); }
.tier { background: var(--white); padding: clamp(24px, 2.6vw, 40px); display: flex; flex-direction: column; gap: var(--s3);
  position: relative; transition: background 420ms var(--ease-spec); }
.tier-name { font-size: clamp(1.6rem, 2.6vw, 2.4rem); line-height: 1; letter-spacing: -0.02em;
  transition: font-variation-settings 520ms var(--ease-ink); }
.tier-price { display: flex; align-items: baseline; gap: 4px; }
.tier-price .pv { font-size: clamp(2.2rem, 3.4vw, 3.2rem); line-height: 1;
  font-variation-settings: 'wght' 300, 'wdth' 112, 'opsz' 48, 'GRAD' 0;
  letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.tier-price .pu { color: var(--dim-w); }
.tier ul { list-style: none; display: grid; gap: 9px; margin-top: auto; padding-top: var(--s2); }
.tier li { display: flex; gap: 9px; align-items: flex-start; font-size: 0.9rem; line-height: 1.4; color: var(--dim-w);
  font-variation-settings: 'wght' 360, 'wdth' 100, 'opsz' 15, 'GRAD' 0; }
.tier li svg { width: 9px; height: 9px; flex: none; margin-top: 6px; color: var(--fire); }
.tier .btn { margin-top: var(--s2); width: 100%; }
/* the tier name is set at its own instance; hovering drives it to the
   condensed black end, so the card answers you in type */
.tier:hover .tier-name { font-variation-settings: 'wght' 900, 'wdth' 66, 'opsz' 40, 'GRAD' 120 !important; }
.tier-hot { background: var(--black); color: var(--white);
  --ink: var(--white); --rule: var(--rule-b); --dim: var(--dim-b); }
.tier-hot .tier-price .pu, .tier-hot li { color: var(--dim-b); }
.tier-hot .btn { --btn-field: var(--fire); --btn-ink: var(--white); border-color: var(--fire); }
.tier-hot .btn::before { background: var(--white); }
.tier-hot .btn:hover, .tier-hot .btn:focus-visible { color: var(--black); border-color: var(--white); }
.tier-tag { position: absolute; top: 0; right: 0; background: var(--fire); color: var(--white); padding: 5px 9px; }

/* ============================================================
   08 / CTA
   ============================================================ */
.cta-sect { position: relative; overflow: hidden; padding-block: clamp(96px, 13vw, 180px); }
.amp-mark {
  position: absolute; right: -6vw; top: 50%; transform: translateY(-50%);
  font-size: clamp(26rem, 46vw, 52rem); line-height: 0.7;
  color: transparent; -webkit-text-stroke: 1.5px rgba(244, 244, 242, 0.16);
  font-variation-settings: 'wght' 100, 'wdth' 151, 'opsz' 144, 'GRAD' 0;
  pointer-events: none; user-select: none; z-index: 0;
}
.cta-sect .wrap { position: relative; z-index: 1; }
.cta-foot { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; margin-top: var(--s5); }

/* ============================================================
   FOOTER
   ============================================================ */
.foot { border-top: 1px solid var(--rule-b); padding-block: var(--s7) var(--s5); }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: var(--s5) var(--s4); }
.foot-brand .logo { font-size: 1.6rem; }
.foot-brand p { color: var(--dim-b); font-size: 0.92rem; margin-top: var(--s2); max-width: 30ch;
  font-variation-settings: 'wght' 350, 'wdth' 100, 'opsz' 15, 'GRAD' 0; }
.foot-col h4 { color: var(--dim-b); margin-bottom: var(--s2); font-weight: 400; }
.foot-col ul { list-style: none; display: grid; gap: 9px; }
.foot-col a { color: rgba(244, 244, 242, 0.78); text-decoration: none; font-size: 0.92rem;
  font-variation-settings: 'wght' 350, 'wdth' 100, 'opsz' 15, 'GRAD' 0;
  transition: color 280ms var(--ease-spec), font-variation-settings 400ms var(--ease-ink); }
.foot-col a:hover, .foot-col a:focus-visible { color: var(--fire); font-variation-settings: 'wght' 620, 'wdth' 100, 'opsz' 15, 'GRAD' 0; }
.foot-rule { height: 1px; background: var(--rule-b); margin-block: var(--s5) var(--s3); }
.foot-fine { display: flex; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; color: var(--dim-b); }
.foot-fine a { color: var(--dim-b); text-decoration: none; border-bottom: 1px solid var(--rule-b); padding-bottom: 2px;
  transition: color 280ms var(--ease-spec), border-color 280ms var(--ease-spec); }
.foot-fine a:hover, .foot-fine a:focus-visible { color: var(--fire); border-color: var(--fire); }
.colophon { display: flex; align-items: center; gap: 8px; }

/* ============================================================
   REVEALS
   ============================================================ */
.rv { opacity: 0; transform: translateY(18px); }
@media (prefers-reduced-motion: no-preference) {
  .rv { transition: opacity 760ms var(--ease-spec), transform 760ms var(--ease-spec); transition-delay: var(--rd, 0ms); }
}
.rv.is-revealed { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important; scroll-behavior: auto !important;
  }
}

/* ============================================================
   /guide / same furniture, content-first
   ============================================================ */
.g-main { padding-top: var(--nav-h); }
.g-hero { padding-block: clamp(56px, 8vw, 104px) clamp(40px, 5vw, 64px); border-bottom: 1px solid var(--rule-b); }
.g-title {
  font-size: clamp(2.8rem, 8.2vw, 7.4rem); line-height: 0.86;
  font-variation-settings: 'wght' 760, 'wdth' 74, 'opsz' 144, 'GRAD' 0;
  letter-spacing: -0.035em; margin: var(--s3) 0 var(--s4);
}
.g-hero .lead { max-width: 58ch; }
.g-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--s3); margin-top: var(--s6); }
.g-meta div { border-top: 1px solid var(--rule-b); padding-top: 10px; }
.g-meta dt { color: rgba(244, 244, 242, 0.4); margin-bottom: 5px; }
.g-meta dd { color: var(--white); font-family: 'Roboto Flex', sans-serif;
  font-variation-settings: 'wght' 400, 'wdth' 100, 'opsz' 14, 'GRAD' 0;
  font-size: 0.82rem; letter-spacing: 0; text-transform: none; }

.g-sect { padding-block: clamp(64px, 8vw, 104px); }
.g-head { margin-bottom: var(--s5); max-width: 62ch; }
.g-head .h2 { margin-top: var(--s2); }
.g-head .lead { margin-top: var(--s3); }
.g-body { max-width: 74ch; display: grid; gap: var(--s3); }
.g-body p { color: var(--dim-b); font-size: 1.02rem; line-height: 1.62;
  font-variation-settings: 'wght' 350, 'wdth' 102, 'opsz' 17, 'GRAD' 0; }
.g-body strong, .g-list strong { color: var(--white); font-variation-settings: 'wght' 660, 'wdth' 100, 'opsz' 17, 'GRAD' 0; }
.g-body em { font-style: normal; font-variation-settings: 'wght' 350, 'wdth' 102, 'opsz' 17, 'GRAD' 0; font-synthesis: none;
  color: var(--white); box-shadow: inset 0 -1px 0 var(--rule-b); }
.g-list { list-style: none; display: grid; gap: var(--s2); margin-top: var(--s1); }
.g-list li { color: var(--dim-b); font-size: 1.02rem; line-height: 1.62; padding-left: var(--s3);
  border-left: 1px solid var(--rule-b);
  font-variation-settings: 'wght' 350, 'wdth' 102, 'opsz' 17, 'GRAD' 0; }

.g-cards { display: grid; gap: 1px; background: var(--rule-b); border: 1px solid var(--rule-b); }
.g-card { background: var(--black); padding: clamp(24px, 3vw, 44px); display: grid; gap: var(--s2); }
.g-card .cn { color: var(--fire); }
.g-card .h3 { max-width: 32ch; }
.g-card p { color: var(--dim-b); font-size: 0.98rem; line-height: 1.6; max-width: 76ch;
  font-variation-settings: 'wght' 350, 'wdth' 102, 'opsz' 16, 'GRAD' 0; }
.g-card p strong { color: var(--white); font-variation-settings: 'wght' 660, 'wdth' 100, 'opsz' 16, 'GRAD' 0; }
.g-card p em { font-style: normal; color: var(--white); }

pre {
  margin-top: var(--s1);
  background: rgba(244, 244, 242, 0.035);
  border: 1px solid var(--rule-b);
  border-left: 2px solid var(--fire);
  padding: var(--s3);
  overflow-x: auto;
  font-variant-numeric: tabular-nums;
}
pre code {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 0.72rem; line-height: 1.85; color: rgba(244, 244, 242, 0.82);
  white-space: pre; text-transform: none; letter-spacing: 0;
}
pre::-webkit-scrollbar { height: 6px; }
pre::-webkit-scrollbar-thumb { background: var(--rule-b); }

.g-prompt { border: 1px solid var(--rule-b); }
.g-prompt-bar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s2);
  padding: 10px 10px 10px var(--s3); border-bottom: 1px solid var(--rule-b); color: var(--dim-b);
}
.g-prompt pre { margin: 0; border: 0; border-left: 0; background: transparent; padding: var(--s3); max-height: 620px; overflow: auto; }
.g-prompt pre code { color: rgba(244, 244, 242, 0.86); font-size: 0.7rem; line-height: 1.9; }

.g-log { list-style: none; display: grid; gap: var(--s5); counter-reset: log; }
.g-log li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: var(--s4);
  border-top: 1px solid var(--rule-b); padding-top: var(--s3); }
.g-log .lg-n { color: var(--fire); }
.g-log div { display: grid; gap: var(--s2); max-width: 74ch; }
.g-log p { color: var(--dim-b); font-size: 0.98rem; line-height: 1.62;
  font-variation-settings: 'wght' 350, 'wdth' 102, 'opsz' 16, 'GRAD' 0; }
.g-log p strong { color: var(--white); font-variation-settings: 'wght' 660, 'wdth' 100, 'opsz' 16, 'GRAD' 0; }
/* Inline code in prose only. Scoped to p/li because a bare `.g-card code`
   (0,1,1) outranks `pre code` (0,0,2) and turned entire code blocks fire. */
.g-log p code, .g-body p code, .g-card p code, .g-list li code, .g-hero p code {
  color: var(--fire); font-size: 0.82em; text-transform: none; letter-spacing: 0;
}
@media (max-width: 760px) {
  .g-log li { grid-template-columns: 1fr; gap: var(--s2); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .play-panel { grid-template-columns: 1fr; }
  .play-main { border-right: 0; border-bottom: 1px solid var(--rule-b); }
  .desk { grid-template-columns: 1fr; }
  .desk-doc { border-right: 0; border-bottom: 1px solid var(--rule-b); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .tiers { grid-template-columns: 1fr; }
  .display-foot { grid-template-columns: 1fr; gap: var(--s4); }
  .axis-readout { grid-template-columns: repeat(2, auto); justify-content: start; }
  /* the links carried margin-left:auto; without them the CTA needs it */
  .nav-links { display: none; }
  .nav > .btn { margin-left: auto !important; }
}
@media (max-width: 759px) {
  /* no room for a spec gutter at this measure; the notation goes away
     rather than stealing width from the display */
  .spec-note { display: none; }
  .spec-row { gap: 0; }
}
@media (max-width: 620px) {
  :root { --nav-h: 58px; }
  /* the full colophon wraps to three cramped lines at this measure */
  .rail-mid { display: none; }
  .display-rail { justify-content: space-between; }
  .foot-grid { grid-template-columns: 1fr; gap: var(--s4); }
  .amp-parade { flex-wrap: wrap; justify-content: flex-start; gap: var(--s3); }
  .axis-readout { grid-template-columns: 1fr; }
  .axis-row { grid-template-columns: 34px 1fr 44px; }
  .voice-stage { min-height: 220px; }
}
