/* ============================================================
   THE RELATIVE DECLINE PROJECT — worldwar3.army
   Design system. Aesthetic: a decommissioned war room.
   Ink ground, bone type, oxidised orange for decline,
   cold cyan for rise. Hairlines. Engraved contour grid.
   Dark is default; [data-theme="light"] is a considered
   daylight mode for long-form reading.
   ============================================================ */

:root {
  /* ground */
  --ink:        #08090b;
  --ink-2:      #0d0f13;
  --panel:      #12151b;
  --panel-2:    #181c24;
  --panel-3:    #20252f;
  --hover:      rgba(255,255,255,0.035);

  /* type */
  --bone:       #ece7dd;
  --bone-2:     #a8a396;
  --bone-dim:   #77736a;
  --bone-faint: #4e4c47;

  /* rules */
  --rule:       rgba(236,231,221,0.11);
  --rule-2:     rgba(236,231,221,0.22);
  --rule-3:     rgba(236,231,221,0.05);

  /* semantics — used sparingly and only with meaning */
  --fall:       #d4632c;   /* decline */
  --fall-hot:   #e0793f;
  --fall-soft:  rgba(212,99,44,0.13);

  --rise:       #4aa8b8;   /* rise */
  --rise-hot:   #5cc0d2;
  --rise-soft:  rgba(74,168,184,0.13);

  --hold:       #9a9486;   /* flat / neutral */
  --hold-soft:  rgba(154,148,134,0.10);

  --alarm:      #c8442f;   /* flashpoints only */
  --alarm-soft: rgba(200,68,47,0.12);

  --grid:       rgba(180,200,225,0.040);
  --grid-2:     rgba(180,200,225,0.022);

  /* type stacks */
  /* Century Gothic where installed; Jost and Questrial are the closest
     geometric web substitutes, so the page holds its shape everywhere. */
  --display: 'Century Gothic', 'Jost', 'Questrial', 'URW Gothic', 'Avant Garde', sans-serif;
  --body:    'Century Gothic', 'Jost', 'Questrial', 'URW Gothic', 'Avant Garde', sans-serif;
  --mono:    'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

  /* metrics */
  --gutter: clamp(16px, 4.2vw, 68px);
  --maxw: 1280px;
  --readw: 720px;
  --r: 3px;
  --r-lg: 6px;
}

[data-theme="light"] {
  --ink:        #eae6dc;
  --ink-2:      #e2ddd1;
  --panel:      #f7f4ec;
  --panel-2:    #eeeae0;
  --panel-3:    #e3ded2;
  --hover:      rgba(20,22,28,0.035);

  --bone:       #16181d;
  --bone-2:     #454850;
  --bone-dim:   #6c6f78;
  --bone-faint: #979aa2;

  --rule:       rgba(22,24,29,0.14);
  --rule-2:     rgba(22,24,29,0.26);
  --rule-3:     rgba(22,24,29,0.07);

  --fall:       #a8481b;
  --fall-hot:   #8f3d16;
  --fall-soft:  rgba(168,72,27,0.10);

  --rise:       #1f6f7e;
  --rise-hot:   #185c69;
  --rise-soft:  rgba(31,111,126,0.10);

  --hold:       #6b675d;
  --hold-soft:  rgba(107,103,93,0.09);

  --alarm:      #9d2d1c;
  --alarm-soft: rgba(157,45,28,0.10);

  --grid:       rgba(40,60,90,0.055);
  --grid-2:     rgba(40,60,90,0.028);
}

/* ---------- reset ---------- */
* { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--body);
  font-size: 1.0rem;
  line-height: 1.72;
  letter-spacing: 0.002em;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* engraved contour grid — the situation-map texture */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px),
    linear-gradient(to right, var(--grid-2) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-2) 1px, transparent 1px);
  background-size: 160px 160px, 160px 160px, 32px 32px, 32px 32px;
}
body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse 120% 80% at 50% 0%, transparent 35%, rgba(0,0,0,0.42) 100%);
}
[data-theme="light"] body::after {
  background: radial-gradient(ellipse 120% 80% at 50% 0%, transparent 40%, rgba(120,110,88,0.12) 100%);
}

main, header, footer, nav { position: relative; z-index: 1; }

/* ---------- typography ---------- */
h1, h2, h3, h4, .disp {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.004em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 6.6vw, 5.1rem); font-weight: 700; letter-spacing: -0.022em; line-height: 1.04; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.5rem); letter-spacing: -0.014em; }
h3 { font-size: clamp(1.1rem, 1.8vw, 1.35rem); letter-spacing: 0.005em; font-weight: 600; }

p { margin: 0 0 1.15em; }
.lede { font-size: clamp(1.05rem, 1.7vw, 1.24rem); line-height: 1.62; color: var(--bone-2); }
strong { color: var(--bone); font-weight: 600; }
em { font-style: italic; }

a { color: inherit; text-decoration: none; }
.prose a, a.lnk {
  color: var(--bone);
  border-bottom: 1px solid var(--rule-2);
  transition: border-color .18s, color .18s;
}
.prose a:hover, a.lnk:hover { border-color: var(--fall); color: var(--fall-hot); }

/* the site's voice: all figures are monospace */
.num, .fig, td.num, .stat-v, .kpi-v {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bone-dim);
  margin: 0 0 0.9rem;
  display: block;
}
.eyebrow.fall { color: var(--fall); }
.eyebrow.rise { color: var(--rise); }

.dateline {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bone-faint);
}

/* ---------- layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.read { max-width: var(--readw); }
.section { padding: clamp(56px, 8vw, 116px) 0; }
.section + .section { border-top: 1px solid var(--rule-3); }

.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }

/* ---------- masthead ---------- */
.mast {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--ink) 86%, transparent);
  backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid var(--rule);
}
.mast-in {
  max-width: var(--maxw); margin: 0 auto;
  padding: 0 var(--gutter);
  height: 62px;
  display: flex; align-items: center; gap: 1.4rem;
}
.brand { display: flex; align-items: baseline; gap: 0.6rem; flex-shrink: 0; }
.brand-mark {
  font-family: var(--display);
  font-weight: 600; font-size: 1.02rem;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--bone);
}
.brand-tld {
  font-family: var(--mono); font-size: 0.6rem;
  letter-spacing: 0.14em;
  color: var(--fall);
  border: 1px solid var(--fall-soft);
  background: var(--fall-soft);
  padding: 2px 5px; border-radius: 2px;
  white-space: nowrap;
}
.mast-nav { display: flex; gap: 0.8rem; margin-left: auto; align-items: center; overflow-x: auto; scrollbar-width: none; }
.mast-nav::-webkit-scrollbar { display: none; }
.mast-nav a {
  font-family: var(--mono); font-size: 0.665rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--bone-dim); white-space: nowrap;
  padding: 4px 0; border-bottom: 1px solid transparent;
  transition: color .16s, border-color .16s;
}
.mast-nav a:hover { color: var(--bone); border-bottom-color: var(--fall); }
.mast-nav a.on { color: var(--bone); border-bottom-color: var(--fall); }

.themeb {
  background: none; border: 1px solid var(--rule);
  color: var(--bone-dim); cursor: pointer;
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.1em;
  padding: 5px 9px; border-radius: 2px; flex-shrink: 0;
  transition: border-color .16s, color .16s;
}
.themeb:hover { border-color: var(--rule-2); color: var(--bone); }

/* ---------- hero ---------- */
.hero { padding: clamp(60px, 11vw, 150px) 0 clamp(40px, 6vw, 74px); position: relative; }
.hero h1 { margin-bottom: 0.4em; }
.hero h1 .fall-w { color: var(--fall); }
.hero-sub { max-width: 780px; }

.hero-strip {
  display: grid; gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  background: var(--rule-3);
  border: 1px solid var(--rule);
  margin-top: clamp(32px, 5vw, 56px);
}
.hstat { background: var(--ink); padding: 1.15rem 1.15rem 1.25rem; }
.hstat-l {
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--bone-faint); display: block; margin-bottom: 0.55rem;
}
.hstat-v {
  font-family: var(--mono); font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  font-weight: 500; letter-spacing: -0.02em; display: block; line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.hstat-v.fall { color: var(--fall); }
.hstat-v.rise { color: var(--rise); }
.hstat-n { font-size: 0.78rem; color: var(--bone-dim); display: block; margin-top: 0.45rem; line-height: 1.4; font-family: var(--body); }

/* ---------- scatter ---------- */
.chart-shell {
  border: 1px solid var(--rule);
  background: linear-gradient(180deg, var(--panel) 0%, var(--ink-2) 100%);
  padding: clamp(14px, 2.4vw, 26px);
  border-radius: var(--r-lg);
}
.chart-head { display: flex; flex-wrap: wrap; gap: 0.8rem 1.4rem; align-items: baseline; margin-bottom: 1.1rem; }
.chart-title { font-family: var(--display); font-size: 1.05rem; letter-spacing: 0.06em; text-transform: uppercase; }
.chart-note { font-size: 0.82rem; color: var(--bone-dim); margin-left: auto; font-family: var(--body); }
svg.chart { width: 100%; height: auto; display: block; overflow: visible; }

.q-label { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.16em; fill: var(--bone-faint); text-transform: uppercase; }
.ax-label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.15em; fill: var(--bone-dim); text-transform: uppercase; }
.ax-tick { font-family: var(--mono); font-size: 9px; fill: var(--bone-faint); }
.dot-label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.05em; fill: var(--bone-2); }
.gridline { stroke: var(--rule-3); stroke-width: 1; }
.axline { stroke: var(--rule); stroke-width: 1; }

.dot { cursor: pointer; transition: r .2s, opacity .2s; }
.dot:hover { opacity: 1 !important; }
.tail { stroke-linecap: round; opacity: 0.45; }

.legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin-top: 1rem; }
.lg { display: flex; align-items: center; gap: 0.45rem; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bone-dim); }
.lg i { width: 9px; height: 9px; border-radius: 50%; display: block; }

/* ---------- lifecycle strip ---------- */
.life { border: 1px solid var(--rule); border-radius: var(--r-lg); overflow: hidden; }
.life-track { display: grid; grid-template-columns: repeat(6, 1fr); background: var(--rule-3); gap: 1px; }
.life-stage { background: var(--panel); padding: 1rem 0.85rem 1.1rem; min-height: 150px; }
.life-stage h4 {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--bone-faint); margin-bottom: 0.7rem; font-weight: 400;
}
.life-stage.hot { background: linear-gradient(180deg, var(--fall-soft) 0%, var(--panel) 70%); }
.life-nat {
  font-family: var(--display); font-size: 0.86rem; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 3px 0; display: block; color: var(--bone);
  border-bottom: 1px solid var(--rule-3);
}
.life-nat:last-child { border-bottom: 0; }
.life-nat small { font-family: var(--mono); font-size: 0.62rem; color: var(--bone-faint); letter-spacing: 0.04em; margin-left: 0.3rem; }

/* ---------- cards ---------- */
.cards { display: grid; gap: 1px; background: var(--rule-3); border: 1px solid var(--rule); }
.cards.c2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.cards.c3 { grid-template-columns: repeat(auto-fit, minmax(265px, 1fr)); }
.cards.c4 { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }

.card {
  background: var(--ink); padding: 1.5rem 1.4rem 1.7rem;
  display: flex; flex-direction: column; gap: 0.6rem;
  transition: background .2s;
  position: relative;
}
a.card:hover { background: var(--panel); }
a.card::after {
  content: '→'; position: absolute; right: 1.3rem; bottom: 1.3rem;
  font-family: var(--mono); color: var(--bone-faint); font-size: 0.85rem;
  transition: transform .2s, color .2s;
}
a.card:hover::after { transform: translateX(4px); color: var(--fall); }
.card h3 { margin-bottom: 0.1rem; }
.card p { font-size: 0.93rem; color: var(--bone-2); margin: 0; line-height: 1.56; }
.card .vbadge { margin-top: auto; padding-top: 0.9rem; }

.vbadge {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em;
  text-transform: uppercase; display: inline-flex; align-items: center; gap: 0.4rem;
}
.vbadge b { font-size: 0.86rem; font-weight: 500; letter-spacing: -0.01em; }
.vbadge.fall { color: var(--fall); }
.vbadge.rise { color: var(--rise); }
.vbadge.hold { color: var(--hold); }

/* velocity meter */
.vm { height: 3px; width: 64px; background: var(--rule); position: relative; border-radius: 2px; overflow: hidden; }
.vm i { position: absolute; top: 0; bottom: 0; display: block; border-radius: 2px; }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--r); }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 560px; }
thead th {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--bone-dim); font-weight: 400;
  text-align: left; padding: 0.75rem 0.9rem; background: var(--panel);
  border-bottom: 1px solid var(--rule); white-space: nowrap;
}
tbody td { padding: 0.72rem 0.9rem; border-bottom: 1px solid var(--rule-3); vertical-align: top; color: var(--bone-2); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--hover); }
tbody td:first-child { color: var(--bone); }
td.num { color: var(--bone); white-space: nowrap; }

.conf {
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 2px 6px; border-radius: 2px;
  border: 1px solid var(--rule); color: var(--bone-dim); white-space: nowrap;
}
.conf.hi  { color: var(--rise); border-color: var(--rise-soft); background: var(--rise-soft); }
.conf.med { color: var(--hold); border-color: var(--hold-soft); background: var(--hold-soft); }
.conf.lo  { color: var(--fall); border-color: var(--fall-soft); background: var(--fall-soft); }

/* ---------- prose blocks ---------- */
.prose { max-width: var(--readw); }
.prose h2 { margin: 2.6rem 0 1rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 2rem 0 0.7rem; color: var(--bone); }
.prose ul, .prose ol { padding-left: 1.2rem; margin: 0 0 1.2rem; }
.prose li { margin-bottom: 0.5rem; color: var(--bone-2); }

.pull {
  border-left: 2px solid var(--fall);
  padding: 0.2rem 0 0.2rem 1.4rem;
  margin: 2rem 0;
  font-size: 1.16rem; line-height: 1.52; color: var(--bone);
  font-weight: 500;
}

.callout {
  border: 1px solid var(--rule); border-left: 2px solid var(--bone-faint);
  background: var(--panel); padding: 1.2rem 1.3rem; margin: 2rem 0; border-radius: var(--r);
}
.callout .eyebrow { margin-bottom: 0.6rem; }
.callout p:last-child { margin-bottom: 0; }
.callout.steel { border-left-color: var(--rise); }
.callout.falsify { border-left-color: var(--hold); }
.callout.warn { border-left-color: var(--alarm); }

/* KPI row inside chapters */
.kpis { display: grid; gap: 1px; background: var(--rule-3); border: 1px solid var(--rule); grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); margin: 2rem 0; }
.kpi { background: var(--ink); padding: 1.1rem 1.1rem 1.2rem; }
.kpi-l { font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--bone-faint); display: block; margin-bottom: 0.5rem; line-height: 1.4; }
.kpi-v { font-size: 1.5rem; font-weight: 500; letter-spacing: -0.02em; display: block; line-height: 1.1; }
.kpi-v.fall { color: var(--fall); } .kpi-v.rise { color: var(--rise); }
.kpi-n { font-size: 0.76rem; color: var(--bone-dim); display: block; margin-top: 0.4rem; line-height: 1.4; }

/* ---------- flashpoint board ---------- */
.board { display: grid; gap: 1px; background: var(--rule-3); border: 1px solid var(--rule); grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.fp { background: var(--ink); padding: 1.3rem 1.3rem 1.5rem; display: flex; flex-direction: column; gap: 0.7rem; }
.fp-top { display: flex; align-items: baseline; gap: 0.7rem; }
.fp h3 { font-size: 1.05rem; letter-spacing: 0.04em; }
.fp-band {
  margin-left: auto; font-family: var(--mono); font-size: 0.7rem;
  padding: 2px 7px; border-radius: 2px; white-space: nowrap;
  border: 1px solid currentColor;
}
.fp-band.r-hi { color: var(--alarm); background: var(--alarm-soft); }
.fp-band.r-md { color: var(--fall); background: var(--fall-soft); }
.fp-band.r-lo { color: var(--hold); background: var(--hold-soft); }
.fp p { font-size: 0.9rem; color: var(--bone-2); margin: 0; line-height: 1.55; }
.cond { display: flex; gap: 4px; }
.cond i {
  width: 22px; height: 4px; border-radius: 1px; display: block;
  background: var(--rule); position: relative;
}
.cond i.on { background: var(--alarm); }
.cond-key { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.08em; color: var(--bone-faint); text-transform: uppercase; }
.fp-trig { font-size: 0.82rem; color: var(--bone-dim); border-top: 1px solid var(--rule-3); padding-top: 0.7rem; margin-top: auto; }
.fp-trig b { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--bone-faint); display: block; margin-bottom: 0.3rem; font-weight: 400; }

/* ---------- engine bars ---------- */
.engines { display: flex; flex-direction: column; gap: 0.75rem; margin: 1.6rem 0; }
.eng { display: grid; grid-template-columns: 116px 1fr 46px; gap: 0.9rem; align-items: center; }
.eng-l { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--bone-dim); }
.eng-bar { height: 6px; background: var(--rule-3); border-radius: 3px; overflow: hidden; }
.eng-bar i { display: block; height: 100%; border-radius: 3px; transition: width 1s cubic-bezier(.2,.8,.2,1); }
.eng-v { font-family: var(--mono); font-size: 0.76rem; color: var(--bone-2); text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--rule); padding: clamp(40px,6vw,72px) 0 clamp(32px,4vw,52px); margin-top: clamp(40px,6vw,90px); }
.foot-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(190px,1fr)); }
.foot h4 { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--bone-faint); margin-bottom: 0.85rem; font-weight: 400; }
.foot a { display: block; font-size: 0.9rem; color: var(--bone-2); padding: 3px 0; transition: color .16s; }
.foot a:hover { color: var(--fall); }
.foot-btm { margin-top: 2.6rem; padding-top: 1.4rem; border-top: 1px solid var(--rule-3); display: flex; flex-wrap: wrap; gap: 0.8rem 1.6rem; align-items: baseline; }
.foot-btm p { font-size: 0.8rem; color: var(--bone-faint); margin: 0; }

/* ---------- chapter header ---------- */
.chead { padding: clamp(44px,7vw,92px) 0 clamp(26px,4vw,44px); }
.chead h1 { font-size: clamp(2.2rem, 5.6vw, 4.2rem); margin-bottom: 0.35em; }
.chead .lede { max-width: 760px; }
.chead-meta { display: flex; flex-wrap: wrap; gap: 0.7rem 1.6rem; align-items: center; margin-top: 1.8rem; padding-top: 1.2rem; border-top: 1px solid var(--rule); }

/* ---------- reveal ---------- */
.rv { opacity: 0; transform: translateY(14px); }
.rv.in { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
@media (prefers-reduced-motion: reduce) {
  .rv, .rv.in { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .eng-bar i { transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .life-track { grid-template-columns: repeat(2, 1fr); }
  .eng { grid-template-columns: 92px 1fr 42px; gap: 0.6rem; }
}
@media (max-width: 620px) {
  body { font-size: 1.02rem; }
  .mast-in { height: 56px; gap: 0.8rem; }
  .brand-tld { display: none; }
  .life-track { grid-template-columns: 1fr; }
  .life-stage { min-height: 0; }
  .chart-note { margin-left: 0; flex-basis: 100%; }

  /* The scatter carries 10px labels. Scaling a 1000-unit viewBox into a phone
     makes them unreadable, so scroll it at a legible width instead. */
  [data-scatter] { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  [data-scatter] svg.chart { min-width: 680px; }
  [data-scatter]::after {
    content: 'Swipe the chart sideways \2192';
    display: block; margin-top: 0.6rem;
    font-family: var(--mono); font-size: 0.62rem;
    letter-spacing: 0.1em; text-transform: uppercase; color: var(--bone-faint);
  }
}

/* print */
@media print {
  body::before, body::after, .mast, .foot { display: none; }
  body { background: #fff; color: #000; }
}

/* ---------- endurance ladder ---------- */
.ladder { border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; }
.lad {
  display: grid;
  grid-template-columns: 34px minmax(112px, 1.1fr) 3fr 52px minmax(96px, auto);
  gap: 0.9rem; align-items: center;
  padding: 0.72rem 1rem;
  border-bottom: 1px solid var(--rule-3);
  transition: background .16s;
}
.lad:last-child { border-bottom: 0; }
.lad:hover { background: var(--hover); }
.lad-r { font-size: 0.72rem; color: var(--bone-faint); }
.lad-n { font-family: var(--display); font-weight: 600; font-size: 0.97rem; letter-spacing: -0.005em; }
.lad-bar { height: 7px; background: var(--rule-3); border-radius: 4px; overflow: hidden; }
.lad-bar i { display: block; height: 100%; border-radius: 4px; transition: width .9s cubic-bezier(.2,.8,.2,1); }
.lad-e { font-size: 0.8rem; color: var(--bone-2); text-align: right; }
.lad-s {
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--bone-faint); text-align: right; white-space: nowrap;
}
@media (max-width: 720px) {
  .lad { grid-template-columns: 28px 1fr 46px; gap: 0.6rem; }
  .lad-bar, .lad-s { display: none; }
}
@media (prefers-reduced-motion: reduce) { .lad-bar i { transition: none; } }

/* pairwise "X outlasts Y" callouts */
.versus { display: grid; gap: 1px; background: var(--rule-3); border: 1px solid var(--rule); grid-template-columns: repeat(auto-fit, minmax(270px,1fr)); margin: 2rem 0; }
.vs { background: var(--ink); padding: 1.2rem 1.25rem 1.35rem; }
.vs-h { display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.vs-a { font-family: var(--display); font-weight: 700; font-size: 1.02rem; color: var(--rise); }
.vs-x { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--bone-faint); }
.vs-b { font-family: var(--display); font-weight: 700; font-size: 1.02rem; color: var(--fall); }
.vs p { margin: 0; font-size: 0.9rem; color: var(--bone-2); line-height: 1.55; }
