/* ==========================================================================
   Allodial Games: First mobile game
   Built to the Allodial design system (revision 1, 17 September 2026).
   Ivory for reading, charcoal for the reveal, ember for one seam at a time.
   ========================================================================== */

/* --- 1 · Fonts ----------------------------------------------------------- */

@font-face { font-family: 'Poppins';    src: url('assets/fonts/poppins-400.woff2')    format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Poppins';    src: url('assets/fonts/poppins-500.woff2')    format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Poppins';    src: url('assets/fonts/poppins-600.woff2')    format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url('assets/fonts/montserrat-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url('assets/fonts/montserrat-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }

/* --- 2 · Tokens (design system §2, pasted whole) -------------------------- */

:root,
[data-theme='light'] {
  /* Reading grounds */
  --bg: #F3EFE7;            /* Ivory — the reading ground */
  --bg2: #EDE7DB;           /* recessed panel: inputs, quote grounds */
  --card: #FBF8F2;          /* raised panel: figure cards, "our" table column */

  /* Ink */
  --ink: #0B0B0B;           /* headlines, row headers, figures — 17.16:1 on Ivory */
  --ink2: #242424;          /* body copy — 13.54:1 */
  --mute: #4A463F;          /* labels, eyebrows, captions — 8.18:1 */

  /* Hairlines: structural, never informational */
  --rule: #DCD5C8;
  --rule2: #C9C1B2;

  /* Copper 700 carries text; brand Copper is graphics only */
  --accent: #8F5330;        /* links, footnote refs, screen numbers — 5.31:1 */
  --accent-hover: #0B0B0B;  /* links darken to Ink; no new hue */
  --accent-t: #F0E4D8;
  --copper: #A6643B;        /* 4.06:1 — slider fills, contour strokes, note borders */

  --seam: #FF6A1A;          /* Ember. 2px seams and bar fills. 2.50:1 on Ivory: never text */

  /* Buttons */
  --btn: #0B0B0B;
  --btn-hover: #242424;
  --btn-ink: #F3EFE7;

  /* The band is dark in both themes */
  --band: #0B0B0B;
  --band2: #171614;         /* surface inside the band */
  --band-rule: #2A2724;
  --band-ink: #F3EFE7;      /* 17.16:1 on the band */
  --band-ink2: #D9D3C8;     /* body on the band — 13.22:1 */
  --band-mute: #B4ACA1;     /* Nickel: slot labels, captions — 8.77:1 */
  --band-accent: #FF6A1A;   /* eyebrows and numbers on dark — 6.87:1, passes as text */
  --band-btn: #F3EFE7;
  --band-btn-hover: #FFFFFF;
  --band-btn-ink: #0B0B0B;
  --band-grid: rgba(243, 239, 231, 0.055);  /* the fin texture */

  /* Status and tiers, warm */
  --g: #1F5C33;  --g-t: #E3EDE4;
  --a: #6E4E12;  --a-t: #F0E7D5;
  --r: #A32015;  --r-t: #F5E2DE;
  --t1: #8A3A0C; --t1-t: #F2E3D8;
  --t2: #6E4E12; --t2-t: #F0E7D5;
  --t3: #235A78; --t3-t: #E2EAEE;

  /* Diagram paths */
  --wire: #6F6A62;  /* connectors — 4.68:1, graphics */
  --heat: #A6643B;  /* heat path. NOT Ember: Ember is 2.50:1 on Ivory and fails */
  --heat-t: #F0E4D8;
  --cold: #1F5C7D;
  --cold-t: #E2EAEE;

  --radius: 0;      /* square, not "slightly rounded" */
  --shadow: none;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --sans: 'Poppins', system-ui, sans-serif;
  --display: 'Montserrat', var(--sans);

  --measure: 66ch;
  --page: 1248px;
}

[data-theme='dark'] {
  --bg: #121110; --bg2: #1B1917; --card: #1F1D1A;
  --ink: #F3EFE7; --ink2: #D9D3C8; --mute: #B4ACA1;
  --rule: #2D2A26; --rule2: #3D3833;
  --accent: #FF8A4C; --accent-hover: #FFB27A; --accent-t: #33211A; --copper: #A6643B;
  --seam: #FF6A1A;
  --btn: #F3EFE7; --btn-hover: #FFFFFF; --btn-ink: #0B0B0B;
  --band: #080807; --band2: #121110; --band-rule: #262320;
  --band-ink: #F3EFE7; --band-ink2: #D9D3C8; --band-mute: #B4ACA1; --band-accent: #FF6A1A;
  --band-btn: #F3EFE7; --band-btn-hover: #FFFFFF; --band-btn-ink: #0B0B0B;
  --band-grid: rgba(243, 239, 231, 0.055);
  --g: #63C285; --g-t: #16291C;
  --a: #E0B44A; --a-t: #2C2412;
  --r: #FF8F85; --r-t: #2F1715;
  --t1: #FF9A6E; --t1-t: #31201A;
  --t2: #E0B44A; --t2-t: #2C2412;
  --t3: #8FC4E0; --t3-t: #17262F;
  --wire: #9A938A; --heat: #FF8A4C; --heat-t: #2B1E16; --cold: #7CC4DD; --cold-t: #17262F;
}

/* Repeat the whole dark block inside:
   @media (prefers-color-scheme: dark) { :root:not([data-theme='light']) { … } } */

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #121110; --bg2: #1B1917; --card: #1F1D1A;
    --ink: #F3EFE7; --ink2: #D9D3C8; --mute: #B4ACA1;
    --rule: #2D2A26; --rule2: #3D3833;
    --accent: #FF8A4C; --accent-hover: #FFB27A; --accent-t: #33211A; --copper: #A6643B;
    --seam: #FF6A1A;
    --btn: #F3EFE7; --btn-hover: #FFFFFF; --btn-ink: #0B0B0B;
    --band: #080807; --band2: #121110; --band-rule: #262320;
    --band-ink: #F3EFE7; --band-ink2: #D9D3C8; --band-mute: #B4ACA1; --band-accent: #FF6A1A;
    --band-btn: #F3EFE7; --band-btn-hover: #FFFFFF; --band-btn-ink: #0B0B0B;
    --band-grid: rgba(243, 239, 231, 0.055);
    --g: #63C285; --g-t: #16291C;
    --a: #E0B44A; --a-t: #2C2412;
    --r: #FF8F85; --r-t: #2F1715;
    --t1: #FF9A6E; --t1-t: #31201A;
    --t2: #E0B44A; --t2-t: #2C2412;
    --t3: #8FC4E0; --t3-t: #17262F;
    --wire: #9A938A; --heat: #FF8A4C; --heat-t: #2B1E16; --cold: #7CC4DD; --cold-t: #17262F;
  }
}

:root { --mark-on-light: url(assets/allodial-a-on-light.svg); --mark-on-dark: url(assets/allodial-a-on-dark.svg); --mark: var(--mark-on-light); }
[data-theme='dark'] { --mark: var(--mark-on-dark); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) { --mark: var(--mark-on-dark); } }

/* Fin fills for bars (§5 calculator): Graphite for size, ember for growth. */
:root {
  --fin-graphite: repeating-linear-gradient(90deg, var(--ink2) 0 2px, transparent 2px 5px);
  --fin-ember: repeating-linear-gradient(90deg, var(--seam) 0 2px, transparent 2px 5px);
}

/* --- 3 · Space and page -------------------------------------------------- */

:root {
  --gutter: clamp(20px, 6.667vw, 96px);
  --pad-x: max(var(--gutter), calc((100% - var(--page)) / 2));
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink2);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--display); font-weight: 500; color: var(--ink); margin: 0; text-wrap: pretty; }
p { margin: 0 0 20px; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--rule2); transition: color 140ms var(--ease), border-color 140ms var(--ease); }
a:hover { color: var(--accent-hover); border-bottom-color: currentColor; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--seam); outline-offset: 2px; }

strong, b { font-family: var(--display); font-weight: 500; color: var(--ink); }
h1 strong, h2 strong, h3 strong { font-weight: 600; }

.num { font-family: var(--display); font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.nowrap { white-space: nowrap; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--btn); color: var(--btn-ink); padding: 10px 16px; border: 0;
}
.skip:focus { top: 8px; color: var(--btn-ink); }

/* --- 4 · Header ---------------------------------------------------------- */

.site-head {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}

.head-bar {
  height: 55px;
  padding-left: var(--pad-x); padding-right: var(--pad-x);
  display: flex; align-items: center; gap: 24px;
}

.brand { display: flex; align-items: center; gap: 10px; border: 0; flex: none; }
.brand:hover { color: inherit; }
.brand-mark { width: 30px; height: 28px; background: var(--mark) center / contain no-repeat; flex: none; }
.brand-text { display: flex; align-items: center; gap: 12px; }
.brand-name {
  font-family: var(--display); font-weight: 600; font-size: 15px; line-height: 1;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink);
}
.brand-product {
  font-family: var(--display); font-weight: 500; font-size: 15px; line-height: 1;
  letter-spacing: 0.01em; color: var(--mute);
  padding-left: 12px; border-left: 1px solid var(--rule2);
}

.head-nav { flex: 1 1 auto; min-width: 0; }
.head-nav ul {
  display: flex; align-items: center; gap: 22px;
  margin: 0; padding: 0; list-style: none;
  overflow-x: auto; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent 100%);
          mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent 100%);
}
.head-nav ul::-webkit-scrollbar { display: none; }
.head-nav li:last-child { padding-right: 40px; }
.head-nav a {
  display: block; white-space: nowrap; border: 0;
  font-size: 14px; line-height: 53px; color: var(--mute);
  border-bottom: 2px solid transparent;
}
.head-nav a:hover { color: var(--ink); }
.head-nav a.is-active { color: var(--ink); font-weight: 500; border-bottom-color: var(--seam); }

.head-right { display: flex; align-items: center; gap: 12px; flex: none; margin-left: auto; }

.progress { height: 2px; background: var(--rule); margin-bottom: -1px; position: relative; }
.progress-fill { display: block; height: 2px; width: 0; background: var(--seam); }

/* --- 5 · Buttons --------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 52px; padding: 0 26px; border-radius: var(--radius);
  font-family: var(--sans); font-weight: 500; font-size: 15px; line-height: 1;
  background: transparent; color: var(--ink); cursor: pointer;
  border: 1px solid var(--rule2);
  transition: background-color 140ms var(--ease), color 140ms var(--ease), border-color 140ms var(--ease), box-shadow 140ms var(--ease);
}
.btn:hover { color: var(--ink); border-color: var(--ink); }
.btn-primary {
  background: var(--btn); color: var(--btn-ink); border-color: var(--btn);
  box-shadow: inset 0 -2px 0 var(--seam);
}
.btn-primary:hover { background: var(--btn-hover); border-color: var(--btn-hover); color: var(--btn-ink); box-shadow: inset 0 -3px 0 var(--seam); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn-band { background: var(--band-btn); color: var(--band-btn-ink); border-color: var(--band-btn); box-shadow: inset 0 -2px 0 var(--seam); }
.btn-band:hover { background: var(--band-btn-hover); border-color: var(--band-btn-hover); color: var(--band-btn-ink); box-shadow: inset 0 -3px 0 var(--seam); }

/* The theme switch only exists once script has run. */
.theme-btn { display: none; min-width: 64px; font-family: var(--sans); }
.has-js .theme-btn { display: inline-flex; }
.head-cta .cta-short { display: none; }

/* --- 6 · Hero (band, no photograph: fins and the ember graze) ----------- */

.hero {
  position: relative; isolation: isolate;
  background: var(--band); color: var(--band-ink2);
  padding: 0 var(--pad-x);
  min-height: clamp(560px, calc(100svh - 56px), 760px);
  display: flex; align-items: center;
}
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(120% 90% at 88% 30%, rgba(255,106,26,.16), transparent 58%),
    repeating-linear-gradient(90deg, var(--band-grid) 0 1px, transparent 1px 11px) top / 100% 280px no-repeat;
}
.hero::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, rgba(255,106,26,0), #FF6A1A 38%, #FFB27A 62%, rgba(255,106,26,0));
}
.hero-inner { padding: 104px 0 110px; width: 100%; }

.hero-eyebrow {
  font-family: var(--sans); font-weight: 500; font-size: 12px; line-height: 1;
  letter-spacing: 0.20em; text-transform: uppercase; color: var(--band-accent);
  margin: 0 0 24px;
}
.hero-h {
  font-size: clamp(34px, 4.6vw, 72px); line-height: 1.03; letter-spacing: -0.02em;
  color: var(--band-ink); max-width: 17ch; margin: 0 0 28px;
}
.hero-sub { font-size: 18px; line-height: 1.68; color: var(--band-ink2); max-width: 58ch; margin: 0 0 36px; }
.hero-sub strong { color: var(--band-ink); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; }
.hero-actions .btn { color: var(--band-ink); border-color: rgba(243,239,231,.5); }
.hero-actions .btn:hover { border-color: var(--band-ink); }
.hero-actions .btn-band,
.hero-actions .btn-band:hover { color: var(--band-btn-ink); border-color: transparent; }

/* --- 7 · Screens (the ivory reading ground) ------------------------------ */

.screen {
  padding: 104px var(--pad-x) 110px;
  background: var(--bg);
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr);
  column-gap: 48px;
  align-items: start;
}
/* Two ivory sections in a row: a 1px rule at content width and nothing else. */
.screen + .screen { padding-top: 0; }
.screen + .screen .screen-rail,
.screen + .screen .screen-main { padding-top: 104px; border-top: 1px solid var(--rule); }

.screen-rail { position: sticky; top: 80px; align-self: start; }
.screen-num {
  display: block; font-family: var(--display); font-weight: 500; font-size: 13px;
  font-variant-numeric: tabular-nums; letter-spacing: 0.1em; color: var(--accent); margin-bottom: 12px;
}
.screen-q { font-family: var(--display); font-weight: 500; font-size: 19px; line-height: 1.34; color: var(--ink); margin: 0 0 20px; max-width: 24ch; }
.rail-mark { display: block; width: 40px; height: 2px; background: var(--seam); }

.screen-main { min-width: 0; }
.screen-h {
  font-size: clamp(30px, 3.06vw, 44px); line-height: 1.12; letter-spacing: -0.015em;
  max-width: 30ch; margin: 0 0 28px;
}
.screen-main > p { color: var(--ink2); }

.block-h { font-size: 26px; line-height: 1.28; margin: 64px 0 20px; }
.block-h:first-child { margin-top: 0; }

.caption { font-size: 15px; line-height: 1.6; color: var(--mute); max-width: 72ch; }
.eyebrow {
  font-family: var(--sans); font-weight: 500; font-size: 12px; line-height: 1;
  letter-spacing: 0.20em; text-transform: uppercase; color: var(--mute); margin: 0 0 16px;
}
.avoid { margin-top: 32px; }

/* --- 8 · The band (the one reveal) --------------------------------------- */

.band {
  position: relative; isolation: isolate;
  background: var(--band); color: var(--band-ink2);
}
.band::before,
.band::after {
  content: ''; position: absolute; left: 0; right: 0; height: 2px; z-index: 1;
  background: linear-gradient(90deg, rgba(255,106,26,0), #FF6A1A 38%, #FFB27A 62%, rgba(255,106,26,0));
  transform-origin: left center;
}
.band::before { top: 0; }
.band::after { bottom: 0; }
.band-fins {
  position: absolute; inset: 0 0 auto 0; height: 280px; z-index: -1;
  background: repeating-linear-gradient(90deg, var(--band-grid) 0 1px, transparent 1px 11px);
}
.band h2, .band h3, .band h4, .band strong { color: var(--band-ink); }
.band p { color: var(--band-ink2); }
.band .eyebrow { color: var(--band-accent); }
.band .caption { color: var(--band-mute); }
.band a { color: var(--band-accent); border-bottom-color: var(--band-rule); }
.band a:hover { color: var(--band-btn-hover); }
.band .screen-num { color: var(--band-accent); }
.band .screen-q { color: var(--band-ink); }
.band-h {
  font-size: clamp(34px, 4.6vw, 66px); line-height: 1.05; letter-spacing: -0.02em;
  max-width: 22ch; margin: 0 0 28px;
}
/* The band follows an ivory section and precedes one: no ivory rule needed. */
.screen.band { background: var(--band); }
.screen.band + .screen { padding-top: 104px; }
.screen.band + .screen .screen-rail,
.screen.band + .screen .screen-main { padding-top: 0; border-top: 0; }
.screen + .screen.band { padding-top: 104px; }
.screen + .screen.band .screen-rail,
.screen + .screen.band .screen-main { padding-top: 0; border-top: 0; }

/* Ranked panels */
.ranks {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px;
  background: var(--band-rule); border: 1px solid var(--band-rule); margin-top: 40px;
}
.band-panel {
  position: relative; background: var(--band2);
  padding: 32px 28px 36px; display: flex; flex-direction: column;
}
.band-panel::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(90% 80% at 80% 10%, rgba(255,106,26,.13), transparent 60%),
    repeating-linear-gradient(90deg, var(--band-grid) 0 1px, transparent 1px 11px) top / 100% 140px no-repeat;
}
.band-panel::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, rgba(255,106,26,0), rgba(255,106,26,.7) 45%, rgba(255,106,26,0));
}
.band-panel > * { position: relative; }
.rank-n {
  font-family: var(--display); font-weight: 500; font-size: 58px; line-height: 1;
  font-variant-numeric: tabular-nums; letter-spacing: -0.02em; color: var(--band-accent); margin: 0 0 20px;
}
.rank-h { font-size: 21px; line-height: 1.32; margin: 0 0 24px; min-height: 2.64em; }
.rank-dl { margin: 0; }
.rank-dl dt {
  font-family: var(--sans); font-weight: 500; font-size: 11px; line-height: 1;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--band-mute);
  padding-top: 16px; border-top: 1px solid var(--band-rule); margin-top: 16px;
}
.rank-dl dt:first-child { margin-top: 0; }
.rank-dl dd { margin: 10px 0 0; font-size: 15px; line-height: 1.6; color: var(--band-ink2); }
.rank-dl dd strong { color: var(--band-ink); }
.rank-quiet {
  margin: 32px 0 0; padding-top: 20px; border-top: 1px solid var(--band-rule);
  font-size: 16px; line-height: 1.6; max-width: 80ch;
}
.rank-quiet .label {
  font-family: var(--sans); font-weight: 500; font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--band-mute); margin-right: 12px;
}

/* --- 9 · Tables ---------------------------------------------------------- */

.table-wrap { margin: 32px 0 0; }
table { width: 100%; border-collapse: collapse; border: 0; }
thead th {
  font-family: var(--sans); font-weight: 500; font-size: 11px; line-height: 1.4;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--mute);
  text-align: left; vertical-align: bottom;
  padding: 0 24px 12px 0; border-bottom: 1px solid var(--ink);
}
thead th:last-child { padding-right: 0; }
tbody th {
  font-family: var(--display); font-weight: 500; font-size: 16px; line-height: 1.35;
  color: var(--ink); text-align: left; vertical-align: top;
  padding: 20px 24px 20px 0; border-bottom: 1px solid var(--rule);
}
tbody td {
  font-size: 16px; line-height: 1.55; color: var(--ink2); vertical-align: top;
  padding: 20px 24px 20px 0; border-bottom: 1px solid var(--rule);
}
tbody td:last-child, tbody th:last-child { padding-right: 0; }

.row-sub {
  display: block; margin-top: 6px;
  font-family: var(--sans); font-weight: 400; font-size: 14px; line-height: 1.5; color: var(--mute);
}
.t-num { font-family: var(--display); font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; color: var(--ink); white-space: nowrap; }

/* Group sub-head rows: quiet labels that band the rows */
tr.group th {
  font-family: var(--sans); font-weight: 500; font-size: 11px; line-height: 1;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--mute);
  padding: 36px 0 12px; border-bottom: 1px solid var(--rule2);
}
tbody:first-of-type tr.group th { padding-top: 20px; }

/* The column that is ours (§5): card ground, accent heading over 2px ember,
   2px ember closing its last row. Padding is symmetric inside the tint. */
.field-table th.ours, .field-table td.ours { background: var(--card); padding-left: 20px; padding-right: 20px; }
.field-table thead th.ours { color: var(--accent); border-bottom: 2px solid var(--seam); }
.field-table td.ours { font-weight: 500; color: var(--ink); }
.field-table tbody:last-child tr:last-child td.ours { border-bottom: 2px solid var(--seam); }
.field-table tr.group td.ours { padding: 0; border-bottom: 1px solid var(--rule2); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* The field table needs the full content width: its rail sits on one line
   above the heading at every width (the §5 collapsed rail). */
.screen.screen-wide { grid-template-columns: minmax(0, 1fr); }
.screen-wide .screen-rail {
  position: static; display: block;
  padding-bottom: 14px; margin-bottom: 32px; border-bottom: 1px solid var(--seam);
}
.screen + .screen.screen-wide .screen-main { border-top: 0; padding-top: 0; }
.screen-wide .screen-num { display: inline; margin: 0 6px 0 0; }
.screen-wide .screen-q { display: inline; }
.screen-wide .screen-q { margin: 0; max-width: none; }
.screen-wide .screen-q::before { content: '· '; color: var(--mute); }
.screen-wide .rail-mark { display: none; }
.screen-wide .screen-h { max-width: 34ch; }
@media screen and (max-width: 1180px) and (min-width: 901px) {
  .field-table th, .field-table td { padding-right: 16px; font-size: 15px; }
  .field-table .t-num { white-space: normal; }
}

/* The CPI row that is ours */
/* A row that is ours: card ground only. Every row header in these tables is
   inset 12px, so the tinted row's label lines up with the rows around it. */
tr.is-ours th, tr.is-ours td { background: var(--card); }
.has-ours-row tbody th, .has-ours-row thead th:first-child { padding-left: 12px; }

.table-note { margin: 16px 0 0; }

/* --- 10 · Figure cards --------------------------------------------------- */

.figures {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px;
  background: var(--rule); margin: 32px 0 0;
}
.figure-card {
  background: var(--card); border-top: 2px solid var(--seam);
  padding: 28px 24px 24px; display: flex; flex-direction: column; min-height: 200px;
}
.figure-card .fig {
  font-family: var(--display); font-weight: 500; font-size: 32px; line-height: 1.12;
  font-variant-numeric: tabular-nums; letter-spacing: -0.01em; color: var(--ink); margin: 0 0 12px;
}
.figure-card .detail { font-size: 15px; line-height: 1.6; color: var(--ink2); margin: 0; max-width: none; }
.figure-card .datestamp {
  font-family: var(--sans); font-weight: 500; font-size: 11px; line-height: 1.4;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--wire); margin: auto 0 0; padding-top: 20px;
}

/* --- 11 · Numbered lists ------------------------------------------------- */

.numbered { list-style: none; margin: 32px 0 0; padding: 0; counter-reset: n; }
.numbered > li {
  display: grid; grid-template-columns: 56px minmax(0, 1fr);
  padding: 20px 0; border-bottom: 1px solid var(--rule); counter-increment: n;
}
.numbered > li:first-child { border-top: 1px solid var(--rule); }
.numbered > li::before {
  content: counter(n, decimal-leading-zero);
  font-family: var(--display); font-weight: 500; font-size: 16px; line-height: 1.68;
  font-variant-numeric: tabular-nums; letter-spacing: 0.04em; color: var(--accent);
}
.numbered > li::before { grid-column: 1; grid-row: 1 / span 4; }
.numbered > li > * { grid-column: 2; margin: 0; max-width: var(--measure); }
.numbered > li > * + * { margin-top: 8px; }
.numbered .li-h { font-family: var(--display); font-weight: 500; font-size: 19px; line-height: 1.4; color: var(--ink); }

/* --- 12 · Chart: money versus growth ------------------------------------- */

.chart { margin: 40px 0 0; }
.chart table { table-layout: fixed; }
.chart thead th { padding-bottom: 12px; }
.chart thead th:first-child { width: 22%; }
.chart tbody th, .chart tbody td { padding: 14px 24px 14px 0; vertical-align: middle; }
.chart tbody td:last-child { padding-right: 0; }
.chart tbody th { font-size: 15px; }
.chart .label {
  display: block; font-family: var(--display); font-weight: 500; font-size: 15px; line-height: 1.3;
  font-variant-numeric: tabular-nums; letter-spacing: -0.01em; color: var(--ink); margin-bottom: 6px;
  white-space: nowrap;
}
.chart .track { position: relative; display: block; height: 14px; }
.chart .bar { position: absolute; top: 0; bottom: 0; display: block; }
.chart .bar-rev { left: 0; background-image: var(--fin-graphite); }
.chart .bar-rev-hi { background-image: var(--fin-graphite); opacity: .45; }
.chart .bar-grow { background-image: var(--fin-ember); }
/* A 2px Graphite cap at each growth bar's end carries its length at >= 3:1,
   because ember on Ivory is 2.50:1 and may not carry meaning alone (§9). */
.chart .bar-grow.up { border-right: 2px solid var(--ink2); }
.chart .bar-grow.down { border-left: 2px solid var(--ink2); }
.chart .zero { position: absolute; top: -6px; bottom: -6px; width: 1px; background: var(--ink); }
.chart .zero-dot { position: absolute; top: 3px; width: 8px; height: 8px; margin-left: -4px; border: 2px solid var(--ink2); background: var(--bg); }
/* Block's bar is broken: 10x+ would run off the scale. */
.chart .break { position: absolute; top: -3px; bottom: -3px; width: 6px; background: var(--bg); transform: skewX(-18deg); }
.chart tr.is-growth th { color: var(--ink); }
.chart-note { margin-top: 20px; }

/* --- 13 · Calculator (§5 two-panel) -------------------------------------- */

.calc {
  display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 1px;
  background: var(--rule); border: 1px solid var(--rule); margin: 40px 0 0;
}
.calc-in { background: var(--bg2); padding: 28px 28px 32px; }
.calc-out { background: var(--card); padding: 32px 32px 36px; position: relative; isolation: isolate; }
.calc-out::before {
  content: ''; position: absolute; right: 0; top: 0; width: 340px; max-width: 100%; height: 200px; z-index: -1; pointer-events: none;
  background-image: repeating-linear-gradient(90deg, rgba(166, 100, 59, 0.16) 0 1px, transparent 1px 11px);
  -webkit-mask-image: radial-gradient(120% 100% at 100% 0, #000, transparent 70%);
          mask-image: radial-gradient(120% 100% at 100% 0, #000, transparent 70%);
}
.calc-echo { display: none; }

.field { margin: 0 0 22px; }
.field:last-child { margin-bottom: 0; }
.field-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.field label {
  font-family: var(--sans); font-weight: 500; font-size: 11px; line-height: 1.4;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--mute);
}
.field .help { display: block; font-size: 13px; line-height: 1.45; color: var(--mute); margin: 0 0 10px; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) 104px; gap: 12px; align-items: center; }
.field input[type='number'] {
  width: 100%; height: 48px; padding: 0 12px; border-radius: 0;
  /* --wire, not the spec's --rule2: a control boundary needs 3:1 (§9), and --rule2 is 1.45:1. */
  background: var(--card); border: 1px solid var(--wire); color: var(--ink);
  font-family: var(--display); font-weight: 500; font-size: 17px;
  font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
}
.field input[type='range'] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 22px; margin: 0;
  background: transparent; cursor: pointer;
}
.field input[type='range']::-webkit-slider-runnable-track {
  height: 4px; background: linear-gradient(90deg, var(--copper) 0 var(--fill, 50%), var(--rule2) var(--fill, 50%) 100%);
}
.field input[type='range']::-moz-range-track { height: 4px; background: var(--rule2); }
.field input[type='range']::-moz-range-progress { height: 4px; background: var(--copper); }
.field input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 18px; height: 18px; margin-top: -7px;
  background: var(--ink); border: 0; border-radius: 0; box-shadow: 0 0 0 2px var(--card);
}
.field input[type='range']::-moz-range-thumb {
  width: 18px; height: 18px; background: var(--ink); border: 0; border-radius: 0; box-shadow: 0 0 0 2px var(--card);
}
.field-group { border: 0; margin: 28px 0 0; padding: 24px 0 0; border-top: 1px solid var(--rule2); min-width: 0; }
.field-group legend { padding: 0; float: left; width: 100%; margin-bottom: 18px; }
.field-group legend + * { clear: both; }

.calc-label {
  font-family: var(--sans); font-weight: 500; font-size: 11px; line-height: 1;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--mute); margin: 0 0 14px;
}
.calc-fig {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(34px, calc(8.9vw - 70px), 58px); line-height: 1.02;
  font-variant-numeric: tabular-nums; letter-spacing: -0.02em; color: var(--ink); margin: 0 0 18px;
}
.calc-seam { display: block; width: 120px; height: 2px; background: var(--seam); margin: 0 0 20px; }
.calc-sentence { font-size: 16px; line-height: 1.6; color: var(--ink2); margin: 0 0 12px; }
.calc-assume { font-size: 14px; line-height: 1.55; color: var(--mute); margin: 0 0 24px; max-width: 70ch; }

.metrics { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.metrics li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 15px; color: var(--ink2);
}
.metrics .v { font-family: var(--display); font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; color: var(--ink); text-align: right; }

.finbars { margin: 24px 0 0; }
.finbar-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) 72px; gap: 12px; align-items: center; margin: 0 0 10px; font-size: 14px; color: var(--ink2); }
.finbar-row .v { font-family: var(--display); font-weight: 500; font-variant-numeric: tabular-nums; color: var(--ink); text-align: right; }
.finbar { display: block; height: 6px; background: var(--bg2); position: relative; }
.finbar > span { position: absolute; left: 0; top: 0; bottom: 0; transition: width 140ms var(--ease); }
.finbar .f-cpi { background-image: var(--fin-graphite); }
.finbar .f-ltv { background-image: var(--fin-ember); border-right: 2px solid var(--ink2); }
.finbar .f-cpi { border-right: 2px solid var(--ink2); }

/* CPI presets: a selected state is one of ember's few jobs (§0). */
.presets { margin: 0 0 24px; padding-bottom: 22px; border-bottom: 1px solid var(--rule2); display: none; }
.has-js .presets { display: block; }
.preset-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.preset {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  min-height: 56px; padding: 8px 10px; border-radius: 0; cursor: pointer; text-align: left;
  background: var(--card); color: var(--ink2); border: 1px solid var(--wire);
  font-family: var(--sans); font-weight: 500; font-size: 12px; line-height: 1.25;
  transition: border-color 140ms var(--ease), box-shadow 140ms var(--ease);
}
.preset .num { font-size: 16px; color: var(--ink); }
.preset:hover { border-color: var(--ink); }
.preset[aria-pressed='true'] { border-color: var(--ink); box-shadow: inset 0 -2px 0 var(--seam); color: var(--ink); }
.preset:focus-visible, .row-more:focus-visible { outline: 2px solid var(--seam); outline-offset: 2px; }
.presets .help { display: block; margin: 0; font-size: 13px; line-height: 1.45; color: var(--mute); }

/* Row detail toggle: only on stacked tables, only once script has run */
.row-more { display: none; }

/* Source keys: a small superscript link in --accent to the sources list. */
sup.cite {
  font-family: var(--sans); font-weight: 500; font-size: 0.68em; line-height: 0;
  vertical-align: super; letter-spacing: 0.02em; margin-left: 2px; white-space: nowrap;
}
sup.cite a { color: var(--accent); border: 0; }
sup.cite a:hover { color: var(--accent-hover); text-decoration: underline; }
.hero sup.cite a, .band sup.cite a { color: var(--band-accent); }
.hero sup.cite a:hover, .band sup.cite a:hover { color: var(--band-btn-hover); }
.preset-row-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.presets + .presets { margin-top: -4px; }
.honest { margin-top: 28px; }

/* In the Source column the key sits alone, so it is set at caption size, not as a superscript. */
.src-cell sup.cite { font-size: 13px; vertical-align: baseline; line-height: inherit; margin-left: 0; }
.src-cell .src-long + sup.cite { margin-left: 4px; }

/* Collapsible table toggle: only on narrow screens, only once script has run */
.collapse-btn { display: none; }

/* --- 14 · Sources and footer --------------------------------------------- */

.sources { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.sources li { display: grid; grid-template-columns: 48px minmax(0, 1fr); padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 16px; line-height: 1.55; scroll-margin-top: 80px; }
.src-key { font-family: var(--display); font-weight: 500; font-variant-numeric: tabular-nums; color: var(--accent); }
.sources li:target { background: var(--card); }
.sources-report { margin-top: 28px; }

.site-foot {
  padding: 40px var(--pad-x) 56px;
  border-top: 1px solid var(--rule);
  background: var(--bg);
  font-size: 15px; color: var(--mute);
}
.site-foot p { max-width: 80ch; }

/* --- 15 · Motion --------------------------------------------------------- */

.js-anim .reveal { opacity: 0; transform: translateY(12px); }
.js-anim .reveal.is-in { opacity: 1; transform: none; transition: opacity 520ms var(--ease), transform 520ms var(--ease); }
.js-anim .reveal.is-in.d1 { transition-delay: 60ms; }
.js-anim .band::before, .js-anim .band::after { transform: scaleX(.6); transition: transform 520ms var(--ease); }
.js-anim .band.is-in::before, .js-anim .band.is-in::after { transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js-anim .reveal { opacity: 1; transform: none; }
  .js-anim .reveal.is-in { transition: none; }
  .js-anim .band::before, .js-anim .band::after { transform: none; transition: none; }
  .btn, a, .finbar > span { transition-property: color, background-color, border-color; }
  * { animation: none !important; }
}

/* --- 16 · Breakpoints ---------------------------------------------------- */

@media screen and (max-width: 1180px) {
  .screen { grid-template-columns: 248px minmax(0, 1fr); column-gap: 40px; }
  .calc { grid-template-columns: 340px minmax(0, 1fr); }
}

@media screen and (max-width: 1040px) {
  .ranks { grid-template-columns: minmax(0, 1fr); }
  .rank-h { min-height: 0; }
}

@media screen and (max-width: 900px) {
  .screen { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .screen-rail {
    position: static; display: block;
    padding-bottom: 14px; margin-bottom: 24px; border-bottom: 1px solid var(--seam);
  }
  .screen + .screen .screen-main { border-top: 0; padding-top: 0; }
  .screen-num { display: inline; margin: 0 6px 0 0; }
  .screen-q { display: inline; }
  .screen-q { margin: 0; font-size: 17px; max-width: none; }
  .screen-q::before { content: '· '; color: var(--mute); }
  .band .screen-q::before { color: var(--band-mute); }
  .rail-mark { display: none; }

  .figures { grid-template-columns: minmax(0, 1fr); }
  .figure-card { min-height: 0; }

  /* Tables stack (§5) */
  .table-wrap table, .table-wrap thead, .table-wrap tbody, .table-wrap tr, .table-wrap th, .table-wrap td { display: block; }
  .table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .table-wrap tbody tr { border-top: 1px solid var(--ink); padding: 8px 0 20px; }
  .table-wrap tbody tr + tr { margin-top: 24px; }
  .table-wrap tbody th { border: 0; padding: 12px 0 8px; font-size: 19px; }
  .table-wrap tbody td { border: 0; border-bottom: 1px solid var(--rule); padding: 12px 0; }
  .table-wrap tbody td:last-child { border-bottom: 0; }
  .table-wrap tbody td::before {
    content: attr(data-label); display: block;
    font-family: var(--sans); font-weight: 500; font-size: 11px; line-height: 1;
    letter-spacing: 0.18em; text-transform: uppercase; color: var(--mute); margin-bottom: 8px;
  }
  /* "Ours" keeps its card ground and gains a 2px ember left border */
  .field-table td.ours, .field-table tbody:last-child tr:last-child td.ours { border-bottom: 0; border-left: 2px solid var(--seam); padding: 12px 16px; }
  .table-wrap tr.group { border-top: 0; padding: 0; margin-top: 48px; }
  .table-wrap tbody:first-of-type tr.group { margin-top: 0; }
  .table-wrap tbody + tbody { margin-top: 48px; }
  .table-wrap tbody + tbody tr.group { margin-top: 0; }
  .table-wrap tr.group th { padding: 0 0 10px; font-size: 11px; border-bottom: 2px solid var(--ink); }
  .table-wrap tr.group td.ours { display: none; }
  .field-table tr.is-compact:not(.is-open) td:not(.ours) { display: none; }
  .field-table tr.is-compact .row-more {
    display: flex; align-items: center; margin-top: 12px; height: 32px; padding: 0 12px;
    font-family: var(--sans); font-weight: 500; font-size: 12px; color: var(--ink);
    background: transparent; border: 1px solid var(--wire); border-radius: 0; cursor: pointer;
  }
  .field-table tr.is-compact .row-more:hover { border-color: var(--ink); }
  .table-wrap tr.group + tr { margin-top: 0; border-top: 0; }
  .table-wrap tr.is-ours { background: var(--card); padding-left: 16px; padding-right: 16px; }
  .table-wrap tr.is-ours th, .table-wrap tr.is-ours td { background: transparent; }
  .has-ours-row tbody th { padding-left: 0; }

  .has-js .collapse-btn {
    display: inline-flex; align-items: center; height: 40px; padding: 0 16px; margin: 0 0 4px;
    font-family: var(--sans); font-weight: 500; font-size: 13px; color: var(--ink);
    background: transparent; border: 1px solid var(--wire); border-radius: 0; cursor: pointer;
  }
  .has-js .collapse-btn:hover { border-color: var(--ink); }
  .collapse-btn:focus-visible { outline: 2px solid var(--seam); outline-offset: 2px; }
  .has-js .collapsible:not(.is-open) table { display: none; }
  .collapsible.is-open .collapse-btn { margin-bottom: 16px; }

  /* The retention table has short cells, so it stays a table instead of stacking. */
  .table-wrap .ret-table { display: table; }
  .table-wrap .ret-table thead { display: table-header-group; position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
  .table-wrap .ret-table tbody { display: table-row-group; }
  .table-wrap .ret-table tr, .table-wrap .ret-table tr.is-ours { display: table-row; border: 0; padding: 0; margin: 0; }
  .table-wrap .ret-table th, .table-wrap .ret-table td { display: table-cell; font-size: 15px; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--rule); }
  .table-wrap .ret-table thead th { padding-bottom: 10px; border-bottom: 1px solid var(--ink); }
  .table-wrap .ret-table tbody th, .table-wrap .ret-table thead th:first-child { padding-left: 6px; }
  .table-wrap .ret-table td::before { content: none; }

  /* Calculator: result first, inputs below with the headline echoed */
  .calc { grid-template-columns: minmax(0, 1fr); }
  .calc-out { order: -1; }
  .calc-echo { display: block; margin: 0 0 24px; padding-bottom: 16px; border-bottom: 1px solid var(--rule2); }
  .calc-echo .calc-label { margin-bottom: 8px; }
  .calc-echo .v { font-family: var(--display); font-weight: 500; font-size: 24px; line-height: 1.2; font-variant-numeric: tabular-nums; color: var(--ink); }
  .field input[type='range']::-webkit-slider-thumb { width: 22px; height: 22px; margin-top: -9px; }
  .field input[type='range']::-moz-range-thumb { width: 22px; height: 22px; }
}

@media screen and (max-width: 640px) {
  body { font-size: 16px; line-height: 1.62; }
  .head-nav, .brand-product { display: none; }
  .head-right { gap: 8px; }
  .head-cta .cta-long { display: none; }
  .head-cta .cta-short { display: inline; }
  .theme-btn { min-width: 0; }
  .brand-mark { width: 26px; height: 24px; }
  .screen, .screen.band { padding-top: 48px; padding-bottom: 56px; }
  .screen + .screen { padding-top: 0; }
  .screen + .screen .screen-rail, .screen + .screen .screen-main { padding-top: 48px; }
  .screen.band + .screen, .screen + .screen.band { padding-top: 48px; }
  .screen.band + .screen .screen-rail, .screen.band + .screen .screen-main,
  .screen + .screen.band .screen-rail, .screen + .screen.band .screen-main { padding-top: 0; }
  .hero { min-height: 0; }
  .hero-inner { padding: 56px 0 64px; }
  .hero-actions .btn { width: 100%; }
  .band-panel, .calc-in, .calc-out { padding: 22px 20px 26px; }
  .numbered > li { grid-template-columns: 40px minmax(0, 1fr); }
  .rank-n { font-size: 44px; }

  /* Chart: the label column sits above its two bars */
  .chart table, .chart tbody { display: block; }
  .chart thead { display: none; }
  .chart tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 16px; border-bottom: 1px solid var(--rule); padding: 14px 0; }
  .chart tbody th { grid-column: 1 / -1; padding: 0 0 8px; border: 0; }
  .chart tbody td { display: block; padding: 0; border: 0; }
  .chart tbody td::before {
    content: attr(data-label); display: block;
    font-family: var(--sans); font-weight: 500; font-size: 10px; line-height: 1.3;
    letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); margin-bottom: 4px;
  }
  .chart .label { font-size: 14px; white-space: normal; }

  .table-wrap .ret-table th, .table-wrap .ret-table td { font-size: 13px; padding: 10px 5px 10px 0; }
  .table-wrap .ret-table tbody th, .table-wrap .ret-table thead th:first-child { padding-left: 4px; }
  .ret-table .t-num { white-space: normal; }
  .table-wrap .ret-table td:last-child, .table-wrap .ret-table th:last-child { padding-right: 0; }
  .table-wrap .ret-table thead th { font-size: 10px; letter-spacing: 0.1em; }
  .ret-table .src-long { display: none; }
  .field-row { grid-template-columns: minmax(0, 1fr) 92px; }
  .finbar-row { grid-template-columns: 84px minmax(0, 1fr) 60px; gap: 8px; }
}

/* --- 17 · Print (§8) ----------------------------------------------------- */

@media print {
  :root, [data-theme='dark'], :root:not([data-theme='light']) {
    --bg: #FFFFFF; --bg2: #FFFFFF; --card: #FFFFFF;
    --ink: #000000; --ink2: #111111; --mute: #333333;
    --rule: #BBBBBB; --rule2: #888888; --accent: #000000; --wire: #333333;
    --band: #FFFFFF; --band2: #FFFFFF; --band-ink: #000000; --band-ink2: #111111;
    --band-mute: #333333; --band-accent: #000000; --band-rule: #BBBBBB;
  }
  body { background: #fff; color: #111; font-size: 11.5pt; line-height: 1.5; }
  .site-head, .head-nav, .progress, .btn, .hero-actions, .rail-mark, .band-fins, .skip,
  .calc-in, .calc-echo, .theme-btn { display: none !important; }
  .hero, .band { color: #111; background: #fff; border-top: 1pt solid #000; border-bottom: 1pt solid #000; }
  .hero::before, .hero::after, .band::before, .band::after, .band-panel::before, .band-panel::after,
  .calc-out::before { display: none !important; }
  .hero, .screen { padding: 24pt 0; min-height: 0; }
  .screen + .screen .screen-rail, .screen + .screen .screen-main { padding-top: 24pt; }
  .screen { display: block; }
  .screen-rail { position: static; margin-bottom: 12pt; }
  .hero-inner { padding: 0; }
  .hero-h { font-size: 32pt; max-width: none; } h2 { font-size: 20pt; }
  .eyebrow, .hero-eyebrow, .datestamp, thead th, .calc-label, tr.group th, .rank-dl dt { font-size: 8pt; }
  .sources, .sources li, .caption { font-size: 9pt; }
  .figure-card, tbody tr, .numbered > li, .band-panel, .calc, .calc-out, .chart tr, .metrics li { break-inside: avoid; }
  .figure-card { border-top: 1pt solid #000; }
  .ranks { background: #BBBBBB; border-color: #BBBBBB; }
  .calc { display: block; border: 1pt solid #BBBBBB; }
  .reveal { opacity: 1 !important; transform: none !important; }
  a { color: #000; border: 0; }
  .field-table th.ours, .field-table td.ours { border-left: 1pt solid #000; border-right: 1pt solid #000; }
  .field-table thead th.ours { border-bottom: 1pt solid #000; }
  .field-table tbody:last-child tr:last-child td.ours { border-bottom: 1pt solid #000; }
  tr.is-ours th, tr.is-ours td { border-top: 1pt solid #000; border-bottom: 1pt solid #000; }
  .chart .bar-grow, .finbar .f-ltv { background-image: repeating-linear-gradient(90deg, #555 0 2px, transparent 2px 5px); }
  .chart .bar, .finbar > span, .chart .zero, .chart .zero-dot, .chart .break { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .chart .break { background: #fff; }
  .screen-wide .screen-rail, .screen-rail { border-bottom: 1pt solid #000; padding-bottom: 6pt; display: block; }
  .screen-num, .screen-q { display: inline; } .screen-num { margin-right: 6pt; }
  .screen-q::before { content: '· '; }
  #field { break-before: page; }
  h2, h3, .screen-rail, .screen-h, .band-h, .block-h { break-after: avoid; }
  .table-wrap, .figures, .chart, .numbered, .ranks, .calc { break-before: avoid; }
  .ranks { break-inside: avoid; }
  .band-panel { padding: 12pt; } .rank-n { font-size: 24pt; margin-bottom: 8pt; } .rank-h { font-size: 12pt; min-height: 0; margin-bottom: 8pt; }
  .rank-dl dd { font-size: 9.5pt; line-height: 1.45; margin-top: 4pt; } .rank-dl dt { padding-top: 6pt; margin-top: 6pt; }
  thead { break-after: avoid; } .row-more, .presets, .collapse-btn { display: none !important; }
  .screen-num { margin: 0; } .screen-q { margin: 0; max-width: none; }
  .figures, .ranks { background: none; border: 0; gap: 8pt; }
  .figure-card, .band-panel { border: 1pt solid #BBBBBB; border-top: 1pt solid #000; min-height: 0; }
  .ranks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .field-table th, .field-table td { font-size: 8.5pt; padding: 6pt 8pt 6pt 0; }
  .field-table th.ours, .field-table td.ours { padding-left: 6pt; padding-right: 6pt; }
  .field-table .t-num { white-space: normal; }
  tbody th, tbody td { padding-top: 8pt; padding-bottom: 8pt; }
  .screen-h, .band-h { font-size: 20pt; max-width: none; }
  .numbered > li { padding: 8pt 0; }
}
