/* ===========================================================================
   Origin360 — origin.css  ·  direction: INSTRUMENT
   Self-contained. Fonts self-hosted from assets/fonts (run fetch-fonts.sh).
   =========================================================================== */

@font-face {
  font-family: "Archivo"; src: url("fonts/archivo.woff2") format("woff2-variations"),
                               url("fonts/archivo.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Public Sans"; src: url("fonts/public-sans.woff2") format("woff2-variations"),
                                   url("fonts/public-sans.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono"; src: url("fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono"; src: url("fonts/plex-mono-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}

/* --- Tokens: dark is primary ------------------------------------------- */

:root {
  --void:    #0A1420;
  --ground:  #0F1C2E;
  --surface: #17263A;
  --surface-2: #1F3149;
  --rule:    #24374F;
  --ink:     #E8EEF5;
  --ink-deep:#FFFFFF;
  --sage:    #8DA0B8;
  --sage-soft: #6E8199;

  --brand-red: #F2615C;
  --red-deep:  #E4231F;
  --brass:     #F2615C;
  --brass-ink: #0A1420;
  --brass-soft:#2B1E20;

  --signal: #24C07E;
  --good:   #24C07E;
  --warn:   #E0993F;
  --crit:   #FF7A6E;

  --ff-display: "Archivo", "Archivo Black", "Helvetica Neue", Arial, sans-serif;
  --ff-text: "Public Sans", ui-sans-serif, "Helvetica Neue", Arial, sans-serif;
  --ff-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;

  --t-hero: clamp(2.6rem, 1.1rem + 5.4vw, 5.75rem);
  --t-h1:   clamp(2.1rem, 1.3rem + 3.2vw, 3.6rem);
  --t-h2:   clamp(1.55rem, 1.15rem + 1.6vw, 2.4rem);
  --t-h3:   clamp(1.1rem, 1rem + 0.55vw, 1.4rem);
  --t-body: 1.0625rem;
  --t-small:0.9375rem;
  --t-micro:0.75rem;

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --stack:  clamp(4rem, 9vw, 8.5rem);
  --maxw:   1440px;
  --focus:  var(--brand-red);
  color-scheme: dark;
}

[data-theme="light"] {
  --void:    #FFFFFF;
  --ground:  #F3F4F5;
  --surface: #FFFFFF;
  --surface-2: #E7E9EC;
  --rule:    #DBDEE2;
  --ink:     #16222E;
  --ink-deep:#0A1420;
  --sage:    #5C6672;
  --sage-soft: #77818E;

  --brand-red: #E4231F;
  --red-deep:  #C11B17;
  --brass:     #E4231F;
  --brass-ink: #FFFFFF;
  --brass-soft:#FCE9E8;

  --signal: #12844F;
  --good:   #12844F;
  --warn:   #B45309;
  --crit:   #A31D18;
  --focus:  var(--brand-red);
  color-scheme: light;
}

/* Display face: expanded + tight, the instrument-panel setting */
h1, h2, h3, h4, .logo, .stat-v {
  font-family: var(--ff-display);
  font-stretch: 118%;
  font-weight: 700;
  letter-spacing: -0.028em;
}
h1, .hero h1 { font-stretch: 112%; font-weight: 800; }
/* --- Reset & base ------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--ff-text);
  font-size: var(--t-body);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.06; }
h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); letter-spacing: -0.015em; line-height: 1.2; }
p  { margin: 0 0 1.1em; max-width: 65ch; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.1em; max-width: 65ch; }
li { margin-bottom: 0.35em; }
strong { font-weight: 700; }
a { color: inherit; }

/* Every figure on this site is mono and tabular. */
.num, td.num, .stat-v, .amt {
  font-family: var(--ff-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
  letter-spacing: -0.01em;
}

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 1px;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--ground); padding: .75rem 1.25rem;
  font-family: var(--ff-mono); font-size: var(--t-micro);
}
.skip:focus { left: 0; }

.vh {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* --- Grid --------------------------------------------------------------- */

.wrap {
  width: 100%; max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 2vw, 2rem);
}

/* content sits in cols 3–9; rail label in cols 1–2 */
.rail { grid-column: 1 / span 2; }
.body-col { grid-column: 3 / span 7; }
.wide-col { grid-column: 3 / span 10; }
.full-col { grid-column: 1 / -1; }

@media (max-width: 900px) {
  .rail, .body-col, .wide-col, .full-col { grid-column: 1 / -1; }
  .rail { margin-bottom: 1rem; }
}

.eyebrow {
  font-family: var(--ff-mono);
  font-size: var(--t-micro);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--sage);
  margin: 0 0 1.25rem;
  display: block;
}
.rail .eyebrow { position: sticky; top: 6.5rem; }
@media (max-width: 900px) { .rail .eyebrow { position: static; } }

section { padding-block: var(--stack); }
.ruled { border-top: 1px solid var(--rule); }

.lede { font-size: clamp(1.125rem, 1rem + 0.55vw, 1.4rem); line-height: 1.45; color: var(--ink); max-width: 34ch; }
.sub  { color: var(--sage); }
.small { font-size: var(--t-small); }
.micro { font-family: var(--ff-mono); font-size: var(--t-micro); letter-spacing: .09em; text-transform: uppercase; color: var(--sage); }

/* --- Header ------------------------------------------------------------- */

.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.head-in {
  display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.5rem);
  min-height: 4.25rem;
}
.logo {
  display: inline-flex; align-items: center; gap: .55rem;
  text-decoration: none; font-family: var(--ff-display);
  font-size: 1.2rem; letter-spacing: -0.035em; color: var(--ink);
  margin-right: auto;
}
.logo svg { display: block; }

.nav { display: flex; gap: clamp(.85rem, 1.8vw, 1.75rem); align-items: center; }
.nav a {
  text-decoration: none; color: var(--ink); font-size: var(--t-small);
  padding: .35rem 0; border-bottom: 1px solid transparent;
}
.nav a:hover { border-bottom-color: var(--brass); }
.nav a[aria-current="page"] { border-bottom-color: var(--ink); }

.head-tools { display: flex; align-items: center; gap: .6rem; }

.theme-btn, .menu-btn {
  background: none; border: 1px solid var(--rule); color: var(--ink);
  width: 2.25rem; height: 2.25rem; display: grid; place-items: center;
  cursor: pointer; padding: 0;
}
.theme-btn:hover, .menu-btn:hover { border-color: var(--ink); }
.menu-btn { display: none; }

@media (max-width: 1020px) {
  .menu-btn { display: grid; }
  .nav {
    position: fixed; inset: 4.25rem 0 auto 0;
    background: var(--ground); border-bottom: 1px solid var(--rule);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: .5rem var(--gutter) 1.5rem;
    display: none;
  }
  .nav[data-open="true"] { display: flex; }
  .nav a { padding: .85rem 0; border-bottom: 1px solid var(--rule); }
}

/* --- Buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--ff-text); font-size: var(--t-small); font-weight: 600;
  padding: .8rem 1.35rem; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; border-radius: 0;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.btn-primary { background: var(--brass); color: var(--brass-ink); }
.btn-primary:hover { background: var(--ink); color: var(--ground); }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--ground); }
.btn-sm { padding: .55rem 1rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

.arrow-link {
  font-family: var(--ff-mono); font-size: var(--t-micro); letter-spacing: .1em;
  text-transform: uppercase; text-decoration: none; color: var(--ink);
  border-bottom: 1px solid var(--brass); padding-bottom: 2px;
  display: inline-block; margin-top: .5rem;
}
.arrow-link:hover { color: var(--brass); }

/* --- Hero --------------------------------------------------------------- */

.hero { padding-block: clamp(3.5rem, 7vw, 7rem) var(--stack); }
.hero h1 {
  font-size: var(--t-hero);
  letter-spacing: -0.045em;
  max-width: 15ch;
}
.hero .lede { margin-top: 1.75rem; max-width: 46ch; font-size: clamp(1.05rem, .95rem + .5vw, 1.3rem); color: var(--sage); }

/* --- Posting tape (signature) ------------------------------------------- */

.tape {
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: clamp(1.1rem, 2.5vw, 1.75rem);
  overflow-x: auto;
}
.tape-head {
  display: flex; justify-content: space-between; gap: 1rem;
  padding-bottom: .8rem; margin-bottom: .8rem;
  border-bottom: 1px solid var(--rule);
  font-family: var(--ff-mono); font-size: var(--t-micro);
  letter-spacing: .09em; text-transform: uppercase; color: var(--sage);
}
.tape table { width: 100%; border-collapse: collapse; min-width: 30rem; }
.tape th {
  text-align: left; font-family: var(--ff-mono); font-weight: 400;
  font-size: var(--t-micro); letter-spacing: .09em; text-transform: uppercase;
  color: var(--sage); padding: 0 0 .6rem; font-variant-numeric: tabular-nums;
}
.tape th:last-child, .tape td:last-child { text-align: right; }
.tape th:nth-child(3), .tape td:nth-child(3) { text-align: right; }
.tape td { padding: .5rem 0; font-size: var(--t-small); border-top: 1px solid var(--rule); }
.tape .acct { font-family: var(--ff-mono); color: var(--sage); padding-right: 1rem; }
.tape tfoot td { border-top: 2px solid var(--ink); font-weight: 700; padding-top: .7rem; }

.tape-row { opacity: 0; transform: translateY(6px); }
.tape[data-played="true"] .tape-row { opacity: 1; transform: none; transition: opacity .38s ease, transform .38s ease; }
.tape[data-played="true"] .tape-row:nth-child(1) { transition-delay: .10s; }
.tape[data-played="true"] .tape-row:nth-child(2) { transition-delay: .32s; }
.tape[data-played="true"] .tape-row:nth-child(3) { transition-delay: .54s; }
.tape[data-played="true"] .tape-row:nth-child(4) { transition-delay: .76s; }
.tape tfoot { opacity: 0; }
.tape[data-played="true"] tfoot { opacity: 1; transition: opacity .4s ease 1.05s; }

@media (prefers-reduced-motion: reduce) {
  .tape-row, .tape tfoot { opacity: 1 !important; transform: none !important; transition: none !important; }
}

.bal { color: var(--good); }

/* --- Stats -------------------------------------------------------------- */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.stat { background: var(--ground); padding: 1.4rem 1.2rem; }
.stat-v { display: block; font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem); font-weight: 600; letter-spacing: -0.03em; }
.stat-l { display: block; font-size: var(--t-micro); color: var(--sage); margin-top: .35rem; letter-spacing: .06em; text-transform: uppercase; font-family: var(--ff-mono); }

/* --- Cards -------------------------------------------------------------- */

.cards { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 980px) { .cards-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .cards-3, .cards-2 { grid-template-columns: 1fr; } }

.card { background: var(--ground); padding: clamp(1.4rem, 2.6vw, 2.1rem); }
.card h3 { margin-bottom: .7rem; }
.card p { font-size: var(--t-small); color: var(--sage); margin-bottom: 0; }
.card .micro { display: block; margin-bottom: 1.1rem; }

/* --- Module index ------------------------------------------------------- */

.mod { border-top: 1px solid var(--rule); padding-block: 2.2rem; display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: clamp(1rem,2vw,2rem); }
.mod:last-child { border-bottom: 1px solid var(--rule); }
.mod h3 { grid-column: 1 / span 3; }
.mod .mod-body { grid-column: 4 / span 9; }
@media (max-width: 900px) { .mod h3 { grid-column: 1/-1; margin-bottom: .9rem; } .mod .mod-body { grid-column: 1/-1; } }

.screens { display: flex; flex-wrap: wrap; gap: .4rem .5rem; padding: 0; margin: 0; list-style: none; max-width: none; }
.screens li {
  font-family: var(--ff-mono); font-size: var(--t-micro);
  border: 1px solid var(--rule); padding: .3rem .55rem; color: var(--sage);
  margin: 0;
}
.mod-note { font-size: var(--t-small); color: var(--sage); margin: 0 0 1rem; max-width: 62ch; }

/* --- Tables ------------------------------------------------------------- */

.scroller { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--rule); }
table.data { width: 100%; border-collapse: collapse; min-width: 34rem; background: var(--surface); }
table.data th, table.data td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--rule); font-size: var(--t-small); }
table.data th { font-family: var(--ff-mono); font-size: var(--t-micro); letter-spacing: .09em; text-transform: uppercase; color: var(--sage); font-weight: 400; }
table.data td.num, table.data th.num { text-align: right; }
table.data tr:last-child td { border-bottom: none; }

/* --- Diagram ------------------------------------------------------------ */

.diagram-wrap { overflow-x: auto; border: 1px solid var(--rule); background: var(--surface); padding: clamp(1rem, 3vw, 2.5rem); }
.diagram-wrap svg { display: block; min-width: 46rem; width: 100%; height: auto; }
figcaption { font-size: var(--t-small); color: var(--sage); margin-top: 1rem; max-width: 62ch; }

.d-node { fill: var(--surface-2); stroke: var(--rule); }
.d-label { fill: var(--ink); font-family: var(--ff-mono); font-size: 12px; }
.d-line { stroke: var(--sage-soft); stroke-width: 1; fill: none; }
.d-core { fill: var(--ink); }
.d-core-label { fill: var(--ground); font-family: var(--ff-display); font-size: 19px; letter-spacing: -0.02em; }
.d-core-sub { fill: var(--sage-soft); font-family: var(--ff-mono); font-size: 11px; }
.d-accent { stroke: var(--brass); stroke-width: 1.5; }

/* --- Callout / offer ---------------------------------------------------- */

.offer { background: var(--ink); color: var(--ground); }
.offer h2, .offer h3 { color: var(--ground); }
.offer .sub, .offer .eyebrow, .offer .micro { color: var(--sage-soft); }
.offer .btn-ghost { border-color: var(--ground); color: var(--ground); }
.offer .btn-ghost:hover { background: var(--ground); color: var(--ink); }
[data-theme="dark"] .offer { background: var(--surface); }
[data-theme="dark"] .offer h2, [data-theme="dark"] .offer h3 { color: var(--ink); }
[data-theme="dark"] .offer .btn-ghost { border-color: var(--ink); color: var(--ink); }

.note {
  border-left: 3px solid var(--brass);
  padding: .1rem 0 .1rem 1.1rem;
  font-size: var(--t-small);
  color: var(--sage);
  max-width: 60ch;
}

/* --- Q&A chips ---------------------------------------------------------- */

.qa { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.q { background: var(--ground); padding: 1.3rem 1.4rem; }
.q .who { font-family: var(--ff-mono); font-size: var(--t-micro); color: var(--brass); letter-spacing: .1em; text-transform: uppercase; display: block; margin-bottom: .6rem; }
.q p { margin: 0; font-size: var(--t-small); }

/* --- Form --------------------------------------------------------------- */

.form { max-width: 34rem; }
.field { margin-bottom: 1.3rem; }
.field label { display: block; font-family: var(--ff-mono); font-size: var(--t-micro); letter-spacing: .09em; text-transform: uppercase; color: var(--sage); margin-bottom: .45rem; }
.field input, .field select {
  width: 100%; padding: .75rem .85rem; font: inherit; font-size: var(--t-small);
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--rule); border-radius: 0;
}
.field input:hover, .field select:hover { border-color: var(--sage); }
.field[data-invalid="true"] input, .field[data-invalid="true"] select { border-color: var(--crit); }
.err { display: none; color: var(--crit); font-size: var(--t-micro); margin-top: .4rem; font-family: var(--ff-mono); }
.field[data-invalid="true"] .err { display: block; }
.form-status { margin-top: 1.25rem; font-size: var(--t-small); }
.form-status[data-state="error"] { color: var(--crit); }
.form-done { border: 1px solid var(--rule); border-top: 3px solid var(--good); padding: 1.75rem; }
.form-done h3 { margin-bottom: .6rem; }

/* --- Footer ------------------------------------------------------------- */

.site-foot { border-top: 1px solid var(--rule); padding-block: var(--stack) 3rem; margin-top: var(--stack); }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 2.5rem clamp(1rem,2vw,2rem); }
.foot-col h4 { font-family: var(--ff-mono); font-size: var(--t-micro); letter-spacing: .11em; text-transform: uppercase; color: var(--sage); font-weight: 400; margin-bottom: .9rem; }
.foot-col ul { list-style: none; padding: 0; margin: 0; }
.foot-col li { margin-bottom: .4rem; }
.foot-col a { font-size: var(--t-small); color: var(--ink); text-decoration: none; }
.foot-col a:hover { color: var(--brass); }
.foot-index { font-size: var(--t-micro); font-family: var(--ff-mono); color: var(--sage); line-height: 1.9; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--rule); max-width: none; }
.foot-index a { color: var(--sage); text-decoration: none; }
.foot-index a:hover { color: var(--brass); }
.foot-legal { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: baseline; font-size: var(--t-micro); color: var(--sage); font-family: var(--ff-mono); }
.foot-legal a { color: var(--sage); }

/* --- Reveal ------------------------------------------------------------- */

.rv { opacity: 0; transform: translateY(10px); }
.rv[data-shown="true"] { opacity: 1; transform: none; transition: opacity .5s ease, transform .5s ease; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1 !important; transform: none !important; transition: none !important; } }



/* --- Hero: instrument split --------------------------------------------- */

.hero-instrument {
  background: var(--void);
  border-bottom: 1px solid var(--rule);
  padding-block: clamp(3rem, 6vw, 6rem) clamp(3.5rem, 7vw, 7rem);
  position: relative;
  overflow: hidden;
}
/* faint radial bloom behind the dial, not a gradient hero */
.hero-instrument::after {
  content: ""; position: absolute; pointer-events: none;
  width: 60rem; height: 60rem; right: -18rem; top: -14rem;
  background: radial-gradient(circle, color-mix(in srgb, var(--brand-red) 9%, transparent) 0%, transparent 62%);
}
.hero-split {
  display: grid; grid-template-columns: repeat(12, minmax(0,1fr));
  column-gap: clamp(1rem, 2vw, 2rem); align-items: center;
  position: relative; z-index: 1;
}
.hero-copy { grid-column: 1 / span 6; }
.hero-dial { grid-column: 7 / span 6; }
@media (max-width: 1080px) {
  .hero-copy { grid-column: 1 / -1; }
  .hero-dial { grid-column: 1 / -1; margin-top: 3rem; }
}
.hero-instrument h1 {
  font-size: var(--t-hero); line-height: 1.02; letter-spacing: -0.04em;
  max-width: 13ch; color: var(--ink-deep);
}
.hero-instrument .lede {
  margin-top: 1.6rem; max-width: 44ch; color: var(--sage);
  font-size: clamp(1.02rem, .94rem + .45vw, 1.25rem); line-height: 1.5;
}

/* --- The dial ------------------------------------------------------------ */

.dial-wrap { width: 100%; }
.dial { display: block; width: 100%; height: auto; overflow: visible; }

.dial-seg {
  fill: var(--surface-2);
  stroke: none;
  opacity: 0;
  transform-origin: 260px 300px;
}
.tick { stroke: var(--rule); stroke-width: 1; }
.tick-major { stroke: var(--sage-soft); stroke-width: 1.5; }
.dial-track { fill: none; stroke: var(--rule); stroke-width: 1; }

.needle { transform-origin: 260px 300px; transform: rotate(-74deg); }
.needle path { fill: var(--brand-red); }
.hub { fill: var(--brand-red); }
.hub-ring { fill: none; stroke: var(--brand-red); stroke-opacity: .35; stroke-width: 2; }

.ro-label { fill: var(--sage-soft); font-family: var(--ff-mono); font-size: 11px; letter-spacing: .16em; }
.ro-value {
  fill: var(--ink-deep); font-family: var(--ff-mono); font-weight: 500;
  font-size: 42px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
  opacity: 0;
}
.ro-state {
  fill: var(--signal); font-family: var(--ff-mono); font-size: 12px; letter-spacing: .22em;
  opacity: 0;
}
.ro-end { fill: var(--sage-soft); font-family: var(--ff-mono); font-size: 11px; letter-spacing: .12em; }

/* Orchestrated arrival: segments light in sequence, needle settles, readout resolves. */
.dial[data-played="true"] .dial-seg {
  animation: seg-in .42s cubic-bezier(.22,.61,.36,1) forwards;
  animation-delay: calc(var(--i) * 65ms);
}
.dial[data-played="true"] .needle {
  animation: needle-settle 1.5s cubic-bezier(.34,.8,.28,1) .55s forwards;
}
.dial[data-played="true"] .ro-value { animation: fade-up .5s ease 1.75s forwards; }
.dial[data-played="true"] .ro-state { animation: fade-up .5s ease 2s forwards; }

@keyframes seg-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes needle-settle {
  0%   { transform: rotate(-74deg); }
  62%  { transform: rotate(6deg); }
  82%  { transform: rotate(-2.5deg); }
  100% { transform: rotate(0deg); }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: none; }
}

/* Static, legible, and still correct with motion off. */
@media (prefers-reduced-motion: reduce) {
  .dial-seg, .ro-value, .ro-state { opacity: 1 !important; animation: none !important; }
  .needle { transform: rotate(0deg) !important; animation: none !important; }
}
.dial:not([data-played="true"]) .dial-seg { opacity: 0; }

/* Legend under the dial: names the twelve segments in text, for everyone. */
.dial-legend {
  display: flex; flex-wrap: wrap; gap: .35rem .5rem; margin-top: 1.5rem;
  padding: 0; list-style: none; max-width: none;
}
.dial-legend li {
  font-family: var(--ff-mono); font-size: var(--t-micro); color: var(--sage-soft);
  border: 1px solid var(--rule); padding: .25rem .5rem; margin: 0;
}
.dial-caption {
  font-size: var(--t-small); color: var(--sage); margin-top: 1.25rem; max-width: 52ch;
}
.dial-caption b { color: var(--ink); font-weight: 600; }

.logo-word { font-family: var(--ff-display); font-stretch: 118%; letter-spacing: -0.035em; }
.logo-word i { font-style: normal; color: var(--brand-red); }
.btn-primary { background: var(--brand-red); color: var(--brass-ink); }
.btn-primary:hover { background: var(--ink-deep); color: var(--ground); }
.tagline { font-family: var(--ff-mono); font-size: var(--t-micro); letter-spacing: .2em; text-transform: uppercase; color: var(--sage-soft); }
.tagline b { font-weight: 400; color: var(--brand-red); }
.bal { color: var(--signal); }

/* ═══════════════════════════════════════════════════════════════════════════
   Missing component styles.

   Two whole graphics shipped with markup and no CSS: the balance gauge on the
   home page and the licensing stack, tier bars, comparison matrix and timeline
   on pricing. Unstyled SVG falls back to a solid black fill, which is why the
   stack diagram rendered as three black bars with its own labels invisible
   inside them.

   Everything below is driven by the existing tokens, so both themes follow.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Balance gauge (index) ────────────────────────────────────────────────── */
.g-tick      { stroke: var(--rule); stroke-width: 1.5; stroke-linecap: round; }
.g-arc       { fill: none; stroke-width: 13; stroke-linecap: round; }
.g-arc-pale  { stroke: var(--rule); }
.g-arc-red   { stroke: var(--brass); }
.g-track     { fill: none; stroke: var(--rule); stroke-width: 1; opacity: .55; }
.g-end       { fill: var(--sage); font-family: var(--ff-mono); font-size: 15px;
               letter-spacing: .12em; }
.g-needle-p  { fill: var(--ink); }
.g-hub-ring  { fill: var(--ground); stroke: var(--rule); stroke-width: 1.5; }
.g-hub       { fill: var(--ink); }

/* The number the whole graphic exists to show; centred beneath the dial. */
.readout     { display: grid; justify-items: center; gap: 2px; margin-top: -1.6rem; }
.ro-k        { font-family: var(--ff-mono); font-size: .68rem; letter-spacing: .14em;
               text-transform: uppercase; color: var(--sage); }
.ro-v        { font-family: var(--ff-display); font-size: clamp(2rem, 5vw, 3rem);
               font-weight: 700; letter-spacing: -.02em; color: var(--ink);
               font-variant-numeric: tabular-nums; line-height: 1.05; }
.ro-s        { font-size: .82rem; color: var(--sage); }

/* ── Licensing stack (pricing) ────────────────────────────────────────────── */
/* Wide diagram scrolls inside its own box rather than pushing the page sideways. */
.stack-dia   { width: 100%; height: auto; display: block; overflow: visible; }
.ly          { fill: var(--brass); stroke: var(--brass); stroke-width: 1; rx: 3; }
.ly-add      { fill-opacity: .10; stroke-opacity: .35; }
.ly-ind      { fill-opacity: .18; stroke-opacity: .45; }
.ly-core     { fill-opacity: .28; stroke-opacity: .60; }
/* Label colours are independent of the fill, which is what went wrong before:
   black text on a black rect is invisible however wide the rect is. */
.ly-t        { fill: var(--ink); font-family: var(--ff-display); font-size: 16px; font-weight: 700; }
.ly-s        { fill: var(--sage); font-family: var(--ff-text); font-size: 12px; }
.ly-tag      { fill: var(--sage-soft); font-family: var(--ff-mono); font-size: 10px;
               letter-spacing: .14em; }

/* ── Tier bars (pricing) ──────────────────────────────────────────────────── */
.tiers       { display: grid; gap: .85rem; }
.tier        { display: grid; grid-template-columns: 6.5rem 1fr auto; align-items: center;
               gap: 1rem; }
.tier-n      { font-family: var(--ff-mono); font-size: .72rem; letter-spacing: .1em;
               text-transform: uppercase; color: var(--sage); }
.tier-bar    { display: block; height: 10px; border-radius: 999px;
               background: var(--surface-2); overflow: hidden; }
.tier-bar > span { display: block; height: 100%; width: var(--w, 0%);
                   background: var(--brass); border-radius: inherit;
                   transition: width .7s cubic-bezier(.2,.7,.2,1); }
.tier-v      { font-size: .88rem; color: var(--ink); font-variant-numeric: tabular-nums;
               white-space: nowrap; }

/* ── Standard-versus-licensed matrix (pricing) ────────────────────────────── */
.matrix td.yes { color: var(--good, #1F7A4D); font-weight: 650; }
.matrix td.no  { color: var(--sage-soft); }

/* ── Parallel-run timeline (pricing) ──────────────────────────────────────── */
.tl          { display: grid; gap: 1.6rem; margin-top: 1.4rem; }
.tl-step     { padding-left: 1.4rem; border-left: 2px solid var(--rule); }
.tl-step h3  { margin: .25rem 0 .4rem; font-size: 1.05rem; }
.tl-step p   { margin: 0; color: var(--sage); }
.tl-when     { font-family: var(--ff-mono); font-size: .7rem; letter-spacing: .12em;
               text-transform: uppercase; color: var(--brass); }
.tl-rule     { height: 1px; background: var(--rule); margin: 1.6rem 0 0; position: relative; }
.tl-rule i   { position: absolute; left: 0; top: -3px; width: 7px; height: 7px;
               border-radius: 50%; background: var(--brass); }

@media (min-width: 720px) {
  .tl { grid-template-columns: repeat(3, 1fr); gap: 1.8rem; }
}
@media (max-width: 560px) {
  .tier { grid-template-columns: 1fr; gap: .3rem; }
  .tier-bar { order: 3; }
}

/* The needle group is positioned by its path geometry; the class exists as a
   transform origin for any later animation, and needs no paint of its own. */
.g-needle    { transform-origin: 300px 320px; }
