/* ================================================================
   YANANTIN — website stylesheet
   Ported from design_system/ (tokens verbatim, components adapted
   from marp/yanantin.css to the 16px screen scale).
   Dark only. Two faces: IBM Plex Sans + IBM Plex Mono, self-hosted.
   ================================================================ */

/* ----------------------------------------------------------------
   §A  Fonts — self-hosted woff2 (OFL 1.1, see /assets/fonts/OFL.txt).
   Replaces the design system's Google Fonts @import: nothing on this
   site loads from a third-party origin.
   ---------------------------------------------------------------- */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url('/assets/fonts/IBMPlexSans-ExtraLight.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/assets/fonts/IBMPlexSans-Light.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/IBMPlexSans-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/IBMPlexSans-Medium.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/IBMPlexSans-SemiBold.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/IBMPlexMono-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/IBMPlexMono-Medium.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/IBMPlexMono-SemiBold.woff2') format('woff2');
}

/* ----------------------------------------------------------------
   §B  Tokens — verbatim from design_system/tokens/ (dark defaults).
   ---------------------------------------------------------------- */
:root {
  /* ---- base: ink ramp (canvas -> lines). --ink-900 is the canvas. ---- */
  --ink-900: #0A0D11;
  --ink-850: #0D1116;
  --ink-800: #12161C;
  --ink-750: #171C23;
  --ink-700: #232A34;
  --ink-600: #3A424E;

  /* ---- base: slate ramp (text on dark) ---- */
  --slate-500: #5A6270;
  --slate-400: #8C95A3;
  --slate-300: #98A1AF;
  --slate-200: #C3C9D2;
  --paper-50:  #F2F4F7;
  --paper-0:   #FFFFFF;
  --paper-100: #EDF0F3;
  --paper-150: #E1E6EB;
  --paper-200: #DDE2E8;

  /* ---- base: amber, the single flat accent ---- */
  --amber-300: #FFD277;
  --amber-400: #FCBF4A;
  --amber-500: #FBB01F;
  --amber-600: #E09400;
  --amber-ink: #8A5A05;
  --amber-a08: rgba(251, 176, 31, 0.08);
  --amber-a12: rgba(251, 176, 31, 0.12);
  --amber-a20: rgba(251, 176, 31, 0.20);
  --amber-a35: rgba(251, 176, 31, 0.35);

  /* ---- base: the logo spectrum. One rule per view, hero moments only. ---- */
  --spec-1: #FBB01F;
  --spec-2: #F17638;
  --spec-3: #E6575D;
  --spec-4: #D04087;
  --spec-5: #B43BA9;
  --spec-6: #913FC8;
  --spec-7: #6F4EE1;
  --spec-8: #1E88F8;
  --spectrum: linear-gradient(90deg, #FBB01F 0%, #F17638 14%, #E6575D 28%, #D04087 43%, #B43BA9 57%, #913FC8 71%, #6F4EE1 85%, #1E88F8 100%);
  --spectrum-v: linear-gradient(180deg, #FBB01F 0%, #F17638 14%, #E6575D 28%, #D04087 43%, #B43BA9 57%, #913FC8 71%, #6F4EE1 85%, #1E88F8 100%);

  /* ---- base: semantic hues ---- */
  --green-500: #3FB27F;
  --green-600: #2C8C61;
  --alert-500: #E6575D;
  --alert-600: #C93F45;
  --warn-500:  #F17638;

  /* ---- semantic aliases — components use THESE ---- */
  --canvas:          var(--ink-900);
  --surface:         var(--ink-800);
  --surface-sunken:  var(--ink-850);
  --surface-raised:  var(--ink-750);
  --surface-accent:  var(--amber-a08);

  --line:            var(--ink-700);
  --line-faint:      var(--ink-750);
  --line-strong:     var(--ink-600);
  --line-accent:     var(--amber-a35);

  --text:            var(--paper-50);
  --text-hi:         var(--paper-200);
  --text-body:       var(--slate-300);
  --text-muted:      var(--slate-400);
  --text-faint:      var(--slate-500);
  --text-accent:     var(--amber-500);
  --text-on-accent:  var(--ink-900);
  --text-inverse:    var(--ink-900);

  --accent:          var(--amber-500);
  --accent-bright:   var(--amber-300);
  --accent-hover:    var(--amber-400);
  --accent-press:    var(--amber-600);

  --focus-ring:      var(--amber-500);

  --status-good:     var(--green-500);
  --status-warn:     var(--warn-500);
  --status-alert:    var(--alert-500);

  --code-bg:         var(--ink-750);
  --code-text:       var(--amber-300);

  /* ---- typography ---- */
  --font-sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;

  /* screen / document scale (16px base) */
  --size-3xs: 11px;
  --size-2xs: 12px;
  --size-xs:  13px;
  --size-sm:  15px;
  --size-md:  17px;
  --size-lg:  20px;
  --size-xl:  24px;
  --size-2xl: 30px;
  --size-3xl: 38px;
  --size-4xl: 48px;

  --leading-tight: 1.1;
  --leading-snug: 1.25;
  --leading-normal: 1.45;
  --leading-relaxed: 1.6;

  /* Headings tighten, mono furniture opens up. */
  --track-tight: -0.025em;
  --track-snug: -0.01em;
  --track-normal: 0;
  --track-data: 0.04em;
  --track-label: 0.16em;
  --track-eyebrow: 0.20em;

  /* ---- spacing: 4px base grid ---- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --space-9: 56px;
  --space-10: 72px;
  --space-11: 96px;

  --radius-none: 0;
  --radius-xs: 2px;
  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-lg: 8px;

  --border-hairline: 1px;
  --border-thick: 2px;
  --rule-hero: 3px;
  --tick-major: 9px;
  --tick-minor: 5px;

  /* ---- elevation: hairline + half-step surface + 1px top highlight ---- */
  --elev-0: none;
  --elev-1: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  --elev-2: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 1px 2px rgba(0, 0, 0, 0.4);
  --elev-overlay: 0 24px 64px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --glow-accent: 0 0 0 1px var(--amber-a35);

  /* ---- motion: instruments settle, they don't bounce ---- */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --dur-slow: 400ms;
  --transition-control: color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
@media (prefers-reduced-motion: reduce) {
  :root { --dur-fast: 0ms; --dur-base: 0ms; --dur-slow: 0ms; }
}

/* ----------------------------------------------------------------
   §C  Base
   ---------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  color-scheme: dark;
  scroll-padding-top: 72px;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text-body);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: var(--leading-relaxed);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

::selection { background: var(--amber-a20); }

:focus-visible {
  outline: 1px solid var(--focus-ring);
  outline-offset: 2px;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--amber-a35);
  transition: var(--transition-control);
}
a:hover { color: var(--accent-bright); border-bottom-color: var(--accent); }

h1, h2, h3 {
  margin: 0 0 var(--space-4);
  font-weight: 600;
  color: var(--text);
}
h2 {
  font-size: var(--size-2xl);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
h3 {
  font-size: var(--size-lg);
  line-height: 1.28;
  letter-spacing: var(--track-snug);
}
/* h4-h6 drop to mono: at this size they are labels, not headings */
h4, h5, h6 {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: var(--size-sm);
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--text-muted);
}

p { margin: 0 0 var(--space-4); max-width: 600px; }

strong { font-weight: 600; color: var(--text); }

ul, ol {
  margin: 0 0 var(--space-4);
  padding-left: 1.1em;
}
li { margin: 8px 0; }
ul li::marker { color: var(--accent); font-size: 0.8em; }
ol li::marker {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.78em;
  font-weight: 500;
}

hr {
  margin: var(--space-6) 0;
  border: none;
  height: 1px;
  background: var(--line);
}

address { font-style: normal; }

code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: var(--radius-sm);
  padding: 0.12em 0.4em;
}

/* lead-in paragraph: larger, Light, looser */
.lead {
  max-width: 760px;
  font-size: 23px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--text-body);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  padding: 10px 16px;
  background: var(--canvas);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--text);
}
.skip-link:focus-visible {
  left: var(--space-5);
  top: var(--space-5);
}

/* visible placeholder marker on the legal pages — must not survive to launch */
mark.ph {
  background: var(--amber-a12);
  border: 1px dashed var(--amber-a35);
  border-radius: var(--radius-xs);
  color: var(--text);
  padding: 0 4px;
}

/* ----------------------------------------------------------------
   §D  Page scaffold
   ---------------------------------------------------------------- */
.wrap {
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: clamp(20px, 6vw, 84px);
}

/* Top bar: sticky, quiet. The deck's top edge — a 1px line whose first
   56px is amber (an index tick, not a banner) — rides its upper edge. */
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--canvas);
  border-bottom: 1px solid var(--line);
}
.topbar::before {
  content: "";
  display: block;
  height: 1px;
  background: linear-gradient(90deg, var(--accent) 0 56px, var(--line) 56px);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding-block: 10px;
}
.topbar a { border-bottom: none; }
.topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
}
.topbar nav a {
  font-family: var(--font-mono);
  font-size: var(--size-2xs);
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--text-muted);
}
.topbar nav a:hover { color: var(--text); }

/* ---- main areas: About / Product / Demos / Contact ----
   Transitions are carried by a strong hairline and alternating bands
   (canvas <-> sunken — the deck's divider-slide construction). */
.area + .area { border-top: 1px solid var(--line-strong); }
.area.sunken { background: var(--surface-sunken); }
.area.has-divider { border-top: none; }

.sect { padding-block: var(--space-10); }
.sect.hero { padding-block: var(--space-9) var(--space-10); }

/* mobile-pager footer stand-in (legal links inside the Contact panel) */
.area-footer { display: none; }

/* section furniture: hairline with the 56px amber index tick, then a
   mono part marker sitting on the line's register */
.part {
  margin: 0 0 var(--space-8);
  max-width: none;
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--text-muted);
}
.part::before {
  content: "";
  display: block;
  height: 1px;
  margin-bottom: 18px;
  background: linear-gradient(90deg, var(--accent) 0 56px, var(--line) 56px);
}

/* the licensed full-width spectrum bar — used once, before Contact */
.section-divider {
  height: 3px;
  background: var(--spectrum);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: var(--space-7);
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4) var(--space-7);
}
.site-footer a {
  color: var(--text-muted);
  border-bottom: 1px solid transparent;
}
.site-footer a:hover { color: var(--text); border-bottom-color: var(--line-strong); }
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
}
.site-footer p { margin: 0; max-width: none; }
.site-footer .fineprint {
  margin: var(--space-5) 0 0;
  max-width: none;
  font-size: var(--size-2xs);
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

/* ----------------------------------------------------------------
   §E  Components (ported from marp/yanantin.css)
   ---------------------------------------------------------------- */

/* kicker — mono eyebrow above a headline */
.kicker {
  display: block;
  margin: 0 0 var(--space-3);
  max-width: none;
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  font-weight: 500;
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--accent);
}
.kicker.faint { color: var(--text-faint); }

/* lockup — mark + wordmark. Inline lockups set "Yanantin" in mixed case;
   only the hero wordmark is YA<i>·</i>NAN<i>·</i>TIN. */
.lockup {
  display: flex;
  align-items: center;
  gap: 18px;
}
/* the mark is 1024x672 — keep the ratio, never letterbox it into a square */
.lockup img {
  width: 200px;
  height: 131px;
  flex: 0 0 auto;
}
.lockup > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lockup b {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
}
/* syllable dots in the YA·NAN·TIN wordmark — subordinate to the letters, so
   they read as a pronunciation guide, not as punctuation */
.lockup b i,
.wordmark i {
  font-style: normal;
  font-weight: 400;
  color: var(--text-muted);
}
.lockup span {
  font-family: var(--font-mono);
  font-size: var(--size-2xs);
  font-weight: 400;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--text-faint);
}
.lockup.sm img { width: 98px; height: 64px; }
.lockup.sm b { font-size: 17px; }
.lockup.xs { gap: 12px; }
.lockup.xs img { width: 55px; height: 36px; }
.lockup.xs b { font-size: var(--size-sm); }
.lockup.xs span { font-size: var(--size-3xs); letter-spacing: 0.12em; }

/* hero — ports the deck cover: YA·NAN·TIN wordmark left, the mark whole
   and uncontained at top-right (its knocked-out lens is the focal point,
   so nothing crops), ExtraLight statement anchored low, spectrum rule,
   lead, ticks. Wordmark and mark share one centre line. */
.sect.hero .wrap {
  display: flex;
  flex-direction: column;
  min-height: max(540px, calc(100dvh - 260px));
}
.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-7);
}
/* caps with positive tracking — the syllable dots need air around them */
.wordmark {
  margin: 0;
  max-width: none;
  font-size: clamp(36px, 4.6vw, 62px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: var(--text);
}
.hero-badge {
  width: clamp(150px, 28vw, 380px);
  height: auto;
  flex: 0 0 auto;
}
.sect.hero h1 {
  margin: var(--space-9) 0 0;
  margin-top: auto;
  padding-top: var(--space-9);
  max-width: 940px;
  font-size: clamp(36px, 5.5vw, 64px);
  font-weight: 200;
  line-height: var(--leading-tight);
  letter-spacing: -0.015em;
  color: var(--text-hi);
  text-wrap: balance;
}
/* the one spectrum rule of the hero view */
.sect.hero h1::after {
  content: "";
  display: block;
  width: 340px;
  max-width: 100%;
  height: 3px;
  margin: 38px 0 26px;
  background: var(--spectrum);
}
.sect.hero .lead { margin-bottom: var(--space-8); }
.sect.hero .ticks { margin-top: auto; }

/* columns — equal tracks; minmax(0,1fr) is load-bearing */
.columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: var(--space-8);
  margin: 6px 0 var(--space-4);
}
.columns-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 30px;
  margin: 6px 0 var(--space-4);
}

/* card — hairline panel, 1px top highlight, no shadow */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  box-shadow: var(--elev-1);
}
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card h3 { margin-bottom: var(--space-2); }
.card p, .card li { font-size: var(--size-sm); line-height: 1.5; }
.card.accent {
  border-color: var(--line-accent);
  background: var(--surface-accent);
}
.card.accent h3 { color: var(--accent); }

.card-grid-2x2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: var(--space-5) 26px;
  margin: 10px 0 0;
}
.card-grid-2x2 > * { min-width: 0; }

/* callout — one per view, two sentences max */
.callout {
  margin: 10px 0 var(--space-4);
  padding: var(--space-4) 22px;
  max-width: none;
  border: 1px solid var(--amber-a20);
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  background: var(--amber-a08);
  font-size: var(--size-md);
  color: var(--text);
}
.callout > :last-child { margin-bottom: 0; }
.callout p { color: var(--text); max-width: none; }
.callout strong { color: var(--accent); }

/* spec — instrument spec table: label left, value right, hairline rows */
.spec {
  display: flex;
  flex-direction: column;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.02em;
  margin: var(--space-2) 0 var(--space-4);
}
.spec > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-5);
  padding: 10px 0;
  border-bottom: 1px solid var(--line-faint);
}
.spec > div:first-child { border-top: 1px solid var(--line-strong); }
.spec > div:last-child { border-bottom: 1px solid var(--line-strong); }
.spec > div > :first-child { color: var(--text-muted); }
.spec > div > :last-child { color: var(--text); margin: 0; text-align: right; }
.spec .hi { color: var(--accent); }

/* stat — big emphasized numbers. Amber is the number's job. Max three. */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-7);
  margin: var(--space-6) 0;
}
.stat {
  padding-top: var(--space-4);
  border-top: 1px solid var(--line-strong);
}
.stat-num {
  font-size: clamp(44px, 6vw, 72px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.stat-num small {
  font-size: 0.4em;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.stat-label {
  margin-top: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--size-2xs);
  font-weight: 400;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--text-muted);
}
.stat-note {
  margin-top: var(--space-2);
  font-size: var(--size-sm);
  font-weight: 300;
  line-height: 1.4;
  color: var(--text-muted);
}

/* badge — small mono label. Sharp, not a pill. */
.badge {
  display: inline-block;
  vertical-align: middle;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  background: var(--amber-a12);
  border: 1px solid var(--amber-a35);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: var(--size-2xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.45;
}
.badge.quiet {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text-faint);
}

/* pipeline diagram — hairline boxes, amber process nodes, dashed grouping */
.pipeline {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin: var(--space-3) 0 var(--space-4);
}
.prow {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
}
.pbox,
.pell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 1 auto;
  min-width: 0;
  padding: 8px 14px;
  text-align: center;
  font-size: 14px;
  line-height: 1.25;
  white-space: nowrap;
}
.pbox {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font-weight: 400;
  color: var(--text);
  box-shadow: var(--elev-1);
}
.pell {
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  font-weight: 500;
  color: var(--text-inverse);
}
.parrow {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  color: var(--text-faint);
}
.pgroup {
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  gap: 8px;
  padding: 10px 12px;
  border: 1px dashed var(--amber-a35);
  border-radius: var(--radius-lg);
  background: var(--amber-a08);
  font-family: var(--font-mono);
  font-size: var(--size-3xs);
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--accent);
}
.pgroup .pbox,
.pgroup .pell {
  font-family: var(--font-sans);
  text-transform: none;
  letter-spacing: normal;
}
.pgroup .parrow { color: var(--amber-a35); }
.prow-hi {
  background: var(--amber-a08);
  border: 1px solid var(--amber-a20);
  border-radius: var(--radius-lg);
  padding: 10px 12px;
}

/* spectrum rule / ruler ticks / optical axis */
.spectrum-rule {
  height: 3px;
  width: 340px;
  max-width: 100%;
  margin: 26px 0;
  background: var(--spectrum);
}
.spectrum-rule.full { width: 100%; }

.ticks {
  height: 9px;
  width: 288px;
  max-width: 100%;
  margin: var(--space-4) 0;
  background-image:
    repeating-linear-gradient(90deg, var(--line-strong) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 12px);
  background-size: 100% 9px, 100% 5px;
  background-position: left bottom, left bottom;
  background-repeat: repeat-x;
}

.axis {
  height: 1px;
  width: 100%;
  margin: var(--space-5) 0;
  background: linear-gradient(90deg, transparent 0, var(--line) 6%, var(--line) 94%, transparent 100%);
}

/* plate — corner-tick frame; the brand's one ornament, only around real content */
.plate {
  position: relative;
  border: 1px solid var(--line);
  padding: 18px;
  margin: 10px 0 var(--space-4);
}
.plate::before,
.plate::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 0 solid var(--accent);
}
.plate::before {
  left: -1px;
  top: -1px;
  border-left-width: 2px;
  border-top-width: 2px;
}
.plate::after {
  right: -1px;
  bottom: -1px;
  border-right-width: 2px;
  border-bottom-width: 2px;
}
.plate > video { margin: 0; }

figure { margin: 0; }
.fig-narrow { max-width: 560px; }
.demo + .demo { margin-top: var(--space-8); }
.demo h3 { margin-bottom: var(--space-3); }
.demo-note {
  margin-top: var(--space-2);
  font-size: var(--size-sm);
  color: var(--text-muted);
}
.fig-caption {
  margin: var(--space-3) 0 0;
  max-width: none;
  font-family: var(--font-mono);
  font-size: var(--size-2xs);
  font-weight: 400;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--text-muted);
}

.attribution {
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.muted { color: var(--text-muted); }
.accent { color: var(--accent); }
.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }

/* button — mono, uppercase, sharp. Exactly one primary per view. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: var(--font-mono);
  font-size: var(--size-xs);
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition-control);
}
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-on-accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--text-on-accent);
}
.btn-primary:active {
  background: var(--accent-press);
  border-color: var(--accent-press);
}
.btn-secondary {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--text);
}
.btn-secondary:hover { border-color: var(--slate-400); color: var(--text); }

/* ----------------------------------------------------------------
   §F  Legal / prose pages
   ---------------------------------------------------------------- */
.prose {
  max-width: 720px;
  padding-block: var(--space-9);
}
.prose h1 {
  font-size: var(--size-3xl);
  line-height: 1.14;
  letter-spacing: var(--track-tight);
}
.prose h1::after {
  content: "";
  display: block;
  height: 1px;
  margin-top: 18px;
  background: var(--line);
}
.prose h2 {
  margin-top: var(--space-8);
  font-size: var(--size-xl);
}
.prose p, .prose li { max-width: none; }
.prose .lang-note {
  font-size: var(--size-sm);
  color: var(--text-muted);
}

/* ----------------------------------------------------------------
   §G  Responsive
   ---------------------------------------------------------------- */
@media (max-width: 900px) {
  .sect { padding-block: var(--space-9); }
  .columns,
  .columns-3,
  .card-grid-2x2 { grid-template-columns: minmax(0, 1fr); }
  .stat-row {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-6);
  }
}

@media (max-width: 720px) {
  .prow {
    flex-direction: column;
    align-items: stretch;
  }
  .pbox, .pell {
    white-space: normal;
    justify-content: flex-start;
    text-align: left;
  }
  .pgroup {
    flex-direction: column;
    align-items: stretch;
    white-space: normal;
  }
  .parrow {
    transform: rotate(90deg);
    align-self: center;
  }

  /* ---- horizontal pager: swipe between areas, scroll within them.
     Only on the home page (body.home / main.pager). ---- */
  body.home {
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  body.home .topbar { position: static; flex: 0 0 auto; }
  main.pager {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
  }
  main.pager > .area {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    border-top: none;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
  body.home .site-footer { display: none; }
  body.home .area-footer {
    display: block;
    border-top: 1px solid var(--line);
    padding-block: var(--space-7);
    font-family: var(--font-mono);
    font-size: var(--size-xs);
    letter-spacing: 0.06em;
    color: var(--text-muted);
  }
  .area-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-5);
  }
  .area-footer a {
    color: var(--text-muted);
    border-bottom: 1px solid transparent;
  }
  .area-footer a:hover { color: var(--text); }
  .area-footer .fineprint {
    margin: var(--space-5) 0 0;
    max-width: none;
    font-size: var(--size-2xs);
    letter-spacing: 0.04em;
    color: var(--text-muted);
  }
}

@media (max-width: 600px) {
  h2 { font-size: var(--size-xl); }
  .lead { font-size: 19px; }
  /* mark 55 + gap 12 + "Yanantin" 15px/600 fits 320 px beside the nav;
     only the mono descriptor goes */
  .lockup.xs span { display: none; }
  .topbar nav { gap: var(--space-4); }
  .hero-top { gap: var(--space-5); }
  .wordmark { font-size: clamp(26px, 8vw, 62px); }
  .hero-badge { width: clamp(96px, 26vw, 380px); }
  .sect.sect.hero .wrap { min-height: 0; }
  .sect.sect.hero h1 { padding-top: var(--space-8); }
  .sect.sect.hero .ticks { margin-top: var(--space-6); }
}
