/* ==========================================================================
   Quad-State · project site
   A blueprint for a measurement paper: ultramarine for the big moments, cream
   paper for reading, ink for the numbers. The data palette IS the brand
   palette — yellow is comprehension failure, the thing a binary metric
   cannot see. Every section is sized to fit one screen on laptops and up.
   ========================================================================== */

:root {
  /* surfaces */
  --blue:      #2B2BD1;   /* ultramarine */
  --blue-deep: #1F1FA8;
  --navy:      #15155E;
  --cream:     #F1EEE3;
  --cream-2:   #E8E4D6;
  --paper:     #FBFAF6;
  --ink:       #131313;
  --ink-2:     #45443F;
  --ink-3:     #77756C;
  --chalk:     #F4F2EA;

  /* quad-state palette (also the brand) */
  --hc:   #F0532B;   /* harmful compliance  */
  --sr:   #2B2BD1;   /* safe response       */
  --cf:   #FFD23F;   /* comprehension fail. */
  --ir:   #A9A79E;   /* indeterminate       */
  --nh:   #CCC7B6;   /* "not harmful" — what a binary metric reports */
  --hc-ink: #B8321A; /* red for text on cream */

  /* comprehension failure also carries a hatch, so it survives grayscale */
  --hatch: repeating-linear-gradient(135deg, rgba(19,19,19,.11) 0 1.5px, transparent 1.5px 6px);

  /* lines */
  --line:      rgba(19, 19, 19, .14);
  --line-blue: rgba(43, 43, 209, .24);
  --line-w:    rgba(255, 255, 255, .24);

  /* type */
  --sans:  "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --pixel: "Tiny5", "JetBrains Mono", monospace;

  /* layout */
  --maxw:   1320px;
  --gutter: clamp(16px, 4vw, 48px);
  --navh:   68px;

  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 0; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
/* hints that only make sense with a finger, or only with a mouse */
.touch-only { display: none; }
@media (hover: none) { .touch-only { display: inline; } }
.mono { font-family: var(--mono); }
.muted { opacity: .55; }
.muted-2 { opacity: .75; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--cf); color: var(--ink); padding: 8px 12px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--cf); outline-offset: 3px; }
.s-cream :focus-visible { outline-color: var(--blue); }

/* ── surfaces ─────────────────────────────────────────────────────────── */
.sec { position: relative; padding: 104px 0 80px; }
.s-blue {
  background-color: var(--blue);
  background-image:
    linear-gradient(rgba(255,255,255,.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.075) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: -1px -1px;
  color: #fff;
}
.s-cream { background: var(--cream); color: var(--ink); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); width: 100%; }

/* one section, one screen — on laptops and up */
@media (min-width: 1000px) and (min-height: 620px) {
  .sec.fit {
    min-height: 100vh; min-height: 100svh;
    display: flex; flex-direction: column; justify-content: center;
    padding: calc(var(--navh) + 3vh) 0 4vh;
  }
  html { scroll-snap-type: y mandatory; }
  .sec.fit { scroll-snap-align: start; scroll-snap-stop: always; }
  .sec.fit:not(.hero) { justify-content: flex-start; }
  .sec.fit:not(.hero) > .wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; }

  .foot { scroll-snap-align: end; }

  /* the results chart takes exactly the height that is left on screen */
  .results.sec.fit { height: 100vh; height: 100svh; }
  .results > .wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .results .results-body { flex: 1; min-height: 0; }
  .results .chart-card { display: flex; flex-direction: column; min-height: 0; }
  .results .rview { flex: 1; }
  .results .qchart { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .results #mirror { height: 100%; }
  .results .plot { flex: 1; height: auto; min-height: 150px; }
}
@media (min-width: 1000px) and (min-height: 620px) and (max-height: 760px) {
  .sec.fit { padding: calc(var(--navh) + 1.6vh) 0 2.2vh; }
}
/* blue sections end in the pixel edge: keep the content clear of it */
@media (min-width: 1000px) and (min-height: 620px) {
  .sec.fit.edge { padding-bottom: calc(4vh + 24px); }
}


/* the blue dissolves into the paper below it, a square at a time */
.edge::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 24px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='24'%3E%3Cg fill='%23F1EEE3'%3E%3Crect y='16' width='96' height='8'/%3E%3Crect x='0' y='8' width='8' height='8'/%3E%3Crect x='24' y='8' width='16' height='8'/%3E%3Crect x='56' y='8' width='8' height='8'/%3E%3Crect x='80' y='8' width='16' height='8'/%3E%3Crect x='8' y='0' width='8' height='8'/%3E%3Crect x='48' y='0' width='8' height='8'/%3E%3Crect x='72' y='0' width='8' height='8'/%3E%3C/g%3E%3C/svg%3E") repeat-x bottom left / 96px 24px;
}

/* ── type ─────────────────────────────────────────────────────────────── */
.display {
  margin: 0;
  max-width: 7.2em;
  font-weight: 800;
  font-size: clamp(40px, min(5.6vw, 8vh), 96px);
  line-height: .9;
  letter-spacing: -.048em;
}
.dot { color: var(--cf); }
.subtitle { margin: clamp(8px, 1.4vh, 16px) 0 0; max-width: 26em; font-size: clamp(16px, min(1.55vw, 2.6vh), 24px); font-weight: 500; line-height: 1.25; letter-spacing: -.01em; color: rgba(255,255,255,.88); }
.y { color: var(--cf); }

.title {
  margin: 0;
  font-weight: 800;
  font-size: clamp(28px, min(3.2vw, 6.2vh), 48px);
  line-height: 1.05;
  letter-spacing: -.035em;
}
.title span { display: inline; }
.title .dot, .title .y { display: inline; }
.two-tone .l1 { color: var(--navy); }
.two-tone .l2 { color: var(--blue); }

.lede { font-size: clamp(16px, min(1.35vw, 2.4vh), 19px); line-height: 1.55; color: var(--ink-2); margin: 0 0 12px; max-width: 48ch; }
.lede b { color: var(--ink); }
.lede.soft { color: var(--ink-3); }
.lede.on-dark { color: rgba(244,242,234,.78); }

.crumb {
  display: flex; align-items: center; gap: 14px;
  margin: 0 0 clamp(14px, 2.6vh, 40px);
  font: 500 13px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-3);
}
.crumb em { font-style: normal; opacity: .55; }
.crumb i { display: block; width: 40px; height: 1px; background: currentColor; opacity: .6; }
.crumb i.grow { flex: 1; opacity: .3; }
.crumb.on-blue, .crumb.on-dark { color: rgba(255,255,255,.72); }

.sec-head { margin-bottom: clamp(16px, 3vh, 44px); }
.sec-aside { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 40px; margin-top: clamp(10px, 2vh, 22px); }
.sec-aside .lede { flex: 1 1 520px; max-width: 76ch; margin: 0; }
.sec-aside .lede .soft { color: var(--ink-3); }
.sec-aside .toolbar { margin: 0; }
#limits .limits-grid { margin-top: clamp(14px, 3vh, 34px); }
.note { margin: 14px 0 0; font-size: 13.5px; line-height: 1.45; letter-spacing: .01em; color: var(--ink-2); }

/* where a number comes from: hover or focus to see the table */
.src { position: relative; cursor: help; text-decoration: underline dotted; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.src:hover::after, .src:focus-visible::after {
  content: "From the paper · " attr(data-src);
  position: absolute; left: 50%; bottom: calc(100% + 8px); translate: -50% 0; z-index: 30;
  padding: 6px 8px; white-space: nowrap; pointer-events: none;
  background: var(--ink); color: var(--chalk);
  font: 500 11px/1 var(--mono); letter-spacing: .03em; text-transform: none;
}
.s-blue .src:hover::after, .s-blue .src:focus-visible::after { background: var(--cream); color: var(--ink); }

/* chips & buttons */
.chip { display: inline-block; padding: 7px 10px; font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.chip-yellow { background: var(--cf); color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: clamp(13px, 2vh, 18px) 24px;
  font: 600 17px/1 var(--sans);
  text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: translate .16s var(--ease), box-shadow .16s var(--ease), background .16s;
}
.btn:hover { translate: -3px -3px; }
.btn-yellow { background: var(--cf); color: var(--ink); }
.btn-yellow:hover { box-shadow: 3px 3px 0 var(--ink); }
.btn-ghost { border-color: rgba(255,255,255,.55); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.08); box-shadow: 3px 3px 0 var(--cf); }
.btn-ink { background: var(--ink); color: var(--cream); font: 600 13px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; }
.btn-ink:hover { box-shadow: 3px 3px 0 var(--blue); }

.tool-btn {
  appearance: none; cursor: pointer; background: transparent;
  padding: 10px 14px; border: 1px solid var(--ink);
  font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  transition: background .15s, color .15s;
}
.tool-btn:hover { background: var(--ink); color: var(--cream); }
.tool-btn.on-dark { border-color: rgba(255,255,255,.6); color: var(--chalk); }
.tool-btn.on-dark:hover { background: var(--chalk); color: var(--ink); }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: clamp(12px, 2.2vh, 22px); }
.seg { display: inline-flex; border: 1px solid var(--ink); }
.seg-btn {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  padding: 10px 14px;
  font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase;
}
.seg-btn + .seg-btn { border-left: 1px solid var(--ink); }
.seg-btn.is-on { background: var(--ink); color: var(--cream); }

/* crosshair registration marks — JS injects four <i class="xh"> into .xm */
.xm { position: relative; }
.xh { position: absolute; width: 15px; height: 15px; pointer-events: none; color: inherit; opacity: .7; }
.xh::before, .xh::after { content: ""; position: absolute; background: currentColor; }
.xh::before { left: 7px; top: 0; width: 1px; height: 15px; }
.xh::after  { top: 7px; left: 0; height: 1px; width: 15px; }
.xh.tl { top: -8px; left: -8px; } .xh.tr { top: -8px; right: -8px; }
.xh.bl { bottom: -8px; left: -8px; } .xh.br { bottom: -8px; right: -8px; }

/* swatches */
.sw { display: inline-block; width: 10px; height: 10px; margin-right: 8px; vertical-align: 0; }
.sw-hc { background: var(--hc); } .sw-sr { background: var(--sr); }
.sw-cf { background: var(--cf) var(--hatch); } .sw-ir { background: var(--ir); }
.sw-nh { background: var(--nh); }
.s-blue .sw-sr { background: #fff; }

/* ── nav: below 1100px a navy title strip (brand, the section you are in, index);
   from 1100px the desktop bar with the section links (further down) ── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--navh);
  display: flex; align-items: center; gap: 22px;
  padding: 0 var(--gutter);
  color: #fff; background: rgba(21,21,94,.94); backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,.16);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.brand-mark { display: grid; grid-template-columns: 11px 11px; gap: 2px; }
.brand-mark i { width: 11px; height: 11px; display: block; }
.brand-mark i:nth-child(1) { background: var(--hc); }
.brand-mark i:nth-child(2) { background: var(--sr); outline: 1px solid rgba(255,255,255,.7); outline-offset: -1px; }
.brand-mark i:nth-child(3) { background: var(--cf); }
.brand-mark i:nth-child(4) { background: var(--ir); }
.brand-name { font-weight: 800; font-size: 19px; letter-spacing: -.03em; white-space: nowrap; }

/* the section you are in, like the title field of a drawing */
.nav-here { flex: 1; min-width: 0; margin: 0; padding-left: 22px; border-left: 1px solid rgba(255,255,255,.22); }
.nav-here a { display: inline-flex; align-items: baseline; gap: 12px; max-width: 100%; text-decoration: none; }
.nh-n { flex: none; font-size: 12px; letter-spacing: .06em; color: var(--cf); }
.nh-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.nav-here a:hover .nh-t { text-decoration: underline; text-underline-offset: .3em; }
.nav-here a.swap-in { animation: swapin .35s var(--ease) both; }

.nav-cta {
  flex: none; display: inline-flex; gap: 10px; align-items: center;
  padding: 10px 16px; border: 1px solid currentColor;
  font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  transition: background .15s, color .15s;
}
.nav-cta:hover { background: var(--cf); color: var(--ink); border-color: var(--cf); }
.nav-index {
  appearance: none; cursor: pointer; flex: none;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 0 14px; height: 36px; border: 1px solid var(--cf); background: var(--cf); color: var(--ink);
  font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  transition: background .15s, color .15s;
}
.nav-index:hover { background: transparent; color: var(--cf); }
.ni-icon { display: grid; gap: 3px; width: 14px; }
.ni-icon i { display: block; height: 2px; background: currentColor; transition: translate .2s var(--ease), rotate .2s var(--ease), opacity .2s; }
.nav-index[aria-expanded="true"] .ni-icon i:nth-child(1) { translate: 0 5px; rotate: 45deg; }
.nav-index[aria-expanded="true"] .ni-icon i:nth-child(2) { opacity: 0; }
.nav-index[aria-expanded="true"] .ni-icon i:nth-child(3) { translate: 0 -5px; rotate: -45deg; }

/* scroll progress, coloured in the overall shares of the four states */
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; pointer-events: none; }
.progress i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, #fff 0 67.24%, var(--cf) 67.24% 87.8%, var(--hc) 87.8% 99.53%, var(--ir) 99.53%) 0 0 / 100vw 100%;
}

/* desktop (1100px and up): the link row; the bar takes the colour of the section under it */
.navbox { display: none; border: 1px solid currentColor; }
.navbox a {
  padding: 9px 12px; white-space: nowrap;
  font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase;
  text-decoration: none;
  border-right: 1px solid currentColor;
  transition: background .15s, color .15s;
}
.navbox a:last-child { border-right: 0; }
.navbox a:hover { background: rgba(127,127,127,.14); }
.navbox a.is-on { background: var(--blue); color: #fff; }
.navbox a.is-on::before { content: "<"; } .navbox a.is-on::after { content: ">"; }
.nav[data-surface="blue"] .navbox a.is-on { background: var(--cf); color: var(--ink); }
@media (min-width: 1100px) {
  /* the desktop bar exactly as designed: clear over the hero, ultramarine once scrolled over blue, cream over cream */
  .nav { justify-content: space-between; gap: 24px; color: inherit; background: none; backdrop-filter: none; border-bottom-color: transparent; transition: background .25s, color .25s, border-color .25s; }
  .navbox { display: flex; }
  .nav-here, .nav-index { display: none; }
  .nav[data-surface="blue"] { color: #fff; }
  .nav.is-scrolled[data-surface="blue"] { background: rgba(43,43,209,.92); border-bottom-color: rgba(255,255,255,.2); backdrop-filter: blur(8px); }
  .nav[data-surface="cream"] { color: var(--ink); background: rgba(241,238,227,.92); border-bottom-color: var(--line); backdrop-filter: blur(8px); }
  .nav[data-surface="cream"] .progress i { background-image: linear-gradient(90deg, var(--sr) 0 67.24%, var(--cf) 67.24% 87.8%, var(--hc) 87.8% 99.53%, var(--ir) 99.53%); }
}

/* the index sheet: a drawing index over the page, under the bar */
html.index-open { overflow: hidden; }
.index {
  position: fixed; inset: var(--navh) 0 0 0; z-index: 49; overflow-y: auto; overscroll-behavior: contain;
  color: #fff; background-color: var(--navy);
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 56px 56px;
  animation: index-in .28s var(--ease) both;
}
@keyframes index-in { from { opacity: 0; } }
.index-in { padding-block: clamp(20px, 4vh, 44px) 32px; }
.index-h { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.3); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.7); }
.index-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; }
@media (min-width: 900px) { .index-list { grid-template-columns: 1fr 1fr; column-gap: 40px; } }
.index-list li { border-bottom: 1px solid rgba(255,255,255,.14); animation: swapin .4s var(--ease) both; animation-delay: calc(var(--i) * 25ms); }
.index-list a { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 14px; padding: clamp(10px, 1.8vh, 16px) 4px; text-decoration: none; transition: background .15s, padding .2s var(--ease); }
.index-list a:hover, .index-list a:focus-visible { background: rgba(255,255,255,.07); padding-left: 12px; outline: none; }
.il-n { font: 500 13px/1 var(--mono); color: var(--cf); }
.il-t { min-width: 0; }
.il-t b { display: block; font: 600 12.5px/1.3 var(--mono); letter-spacing: .07em; text-transform: uppercase; }
.il-t small { display: block; margin-top: 4px; font-size: clamp(15px, 2.2vh, 18px); font-weight: 700; letter-spacing: -.015em; line-height: 1.25; color: rgba(255,255,255,.85); }
.il-here { display: none; padding: 4px 7px; background: var(--cf); color: var(--ink); font: 600 10px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.index-list li.is-here .il-here { display: inline-block; }
.index-list li.is-here .il-t small { color: #fff; }
.index-links { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 22px 0 0; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.index-links a { text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.45); }
.index-links a:hover { color: var(--cf); border-color: var(--cf); }

/* ── 00 hero ──────────────────────────────────────────────────────────── */
.hero-grid { display: grid; gap: 40px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 1100px) { .hero-grid { grid-template-columns: 1.1fr .9fr; gap: 48px; } }

.kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 clamp(16px, 3vh, 34px); }
.kicker-meta { font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; opacity: .75; }

.morph-block { margin: clamp(16px, 3.2vh, 40px) 0 0; }
.morph-lead { margin: 0 0 4px; font-size: clamp(16px, 2.3vh, 19px); opacity: .85; }
.morph-line {
  margin: 0; min-height: 1.2em;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px;
  font-size: clamp(26px, min(3.2vw, 4.8vh), 44px); line-height: 1.15;
}
.br { font-family: var(--mono); font-weight: 400; opacity: .6; }
.morph { font-family: var(--pixel); color: var(--cf); letter-spacing: .02em; word-break: break-all; }
.morph .alt { text-decoration: underline dotted rgba(255,210,63,.75); text-underline-offset: .18em; text-decoration-thickness: .06em; }
.morph .zw {
  display: inline-block; width: .16em; height: .8em; margin: 0 .06em;
  background: repeating-linear-gradient(var(--cf) 0 2px, transparent 2px 4px);
  vertical-align: -.05em; opacity: .9;
}
.morph-tag {
  align-self: center; margin-left: 10px;
  padding: 6px 9px; border: 1px solid rgba(255,255,255,.45);
  font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
}

/* the character inspector: every code point of the word above */
.cells {
  list-style: none; margin: clamp(8px, 1.6vh, 16px) 0 0; padding: 0;
  display: flex; flex-wrap: nowrap; gap: 3px;
  max-width: 640px;
}
.cells li {
  flex: 0 1 38px; min-width: 0; padding: 5px 0 4px;
  border: 1px solid rgba(255,255,255,.32);
  text-align: center; line-height: 1;
  animation: cell-in .35s var(--ease) both;
  animation-delay: calc(var(--i) * 28ms);
}
.cells .g { display: block; font-family: var(--pixel); font-size: 18px; height: 21px; }
.cells .cp { display: block; margin-top: 4px; font: 500 8.5px/1 var(--mono); letter-spacing: .02em; opacity: .75; }
.cells .alt { background: var(--cream); color: var(--blue); border-color: var(--cream); }
.cells .alt .cp { opacity: 1; }
.cells .zw { border-style: dashed; border-color: var(--cf); }
.cells .sp .g { opacity: .4; }
@keyframes cell-in { from { opacity: 0; translate: 0 6px; } }
@media (max-width: 640px) {
  .cells { flex-wrap: wrap; min-height: 110px; align-content: flex-start; }
  .cells li { flex-basis: 34px; }
}
.insp-note { margin: 10px 0 0; font-size: 12.5px; letter-spacing: .02em; opacity: .85; min-height: 1.5em; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(16px, 3vh, 32px); }
.hero-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: clamp(14px, 2.6vh, 28px) 0 0; padding-top: clamp(10px, 1.8vh, 16px); border-top: 1px solid var(--line-w); }
.author-name { font-weight: 700; font-size: 17px; text-decoration: none; }
a.author-name:hover { color: var(--cf); }
.hero-meta .links { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.hero-meta .links a { text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.4); }
.hero-meta .links a:hover { color: var(--cf); border-color: var(--cf); }

.hero-fig { margin: 0; display: flex; justify-content: center; }
#blueprint { width: 100%; height: auto; overflow: visible; }
@media (min-width: 1000px) and (min-height: 620px) {
  #blueprint { max-height: calc(100svh - var(--navh) - 9vh - 24px); width: auto; max-width: 100%; }
}
#blueprint text { font-family: var(--sans); }
#blueprint .t-mono { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; }
#blueprint .flow { stroke-dasharray: 3 9; animation: flow 1.6s linear infinite; }
#blueprint .bar-fill { transform-box: fill-box; transform-origin: left; animation: fill 2.2s var(--ease) .4s both; }
#blueprint .outbox { transition: stroke .4s, fill .4s; }
#blueprint .outbox.hot { stroke: var(--cf); fill: rgba(255,210,63,.12); }
@keyframes flow { to { stroke-dashoffset: -24; } }
@keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* shorter laptop screens: tighten the hero so it still fits one screen */
@media (min-width: 1000px) and (max-height: 860px) {
  .hero .insp-note { display: none; }
  .hero .cells li { padding: 3px 0 3px; }
  .hero .cells .g { font-size: 16px; height: 18px; }
  .hero .hero-actions { margin-top: 2vh; }
  .hero .hero-meta { margin-top: 1.8vh; }
  .hero .kicker { margin-bottom: 1.6vh; }
  .hero .morph-block { margin-top: 2.2vh; }
}

/* ── 01 spec table & flow ─────────────────────────────────────────────── */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.spec {
  width: 100%; min-width: 860px;
  border-collapse: collapse;
  border: 1px solid var(--line-blue);
  background: var(--paper);
}
.spec th {
  padding: clamp(8px, 1.3vh, 20px) 20px; text-align: left; vertical-align: bottom;
  font: 500 12px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--blue); background: rgba(43,43,209,.045);
  border-left: 1px solid var(--line-blue);
}
.spec th:first-child, .spec td:first-child { border-left: 0; }
.spec td {
  padding: clamp(8px, 1.5vh, 24px) 20px;
  border-top: 1px solid var(--line-blue);
  border-left: 1px solid var(--line-blue);
  vertical-align: middle;
}
.spec .ref { font: 500 14px/1 var(--mono); color: var(--blue); white-space: nowrap; vertical-align: middle; background: transparent; border-top: 1px solid var(--line-blue); }
.spec .fam { font-size: clamp(17px, 2.4vh, 20px); font-weight: 500; letter-spacing: -.01em; }
.spec .fam small { display: block; margin-top: 3px; font: 400 12px/1.3 var(--mono); color: var(--ink-3); letter-spacing: .02em; }
.spec .num { font-size: clamp(24px, min(2.4vw, 4.2vh), 36px); font-weight: 500; letter-spacing: -.03em; line-height: 1; white-space: nowrap; }
.spec .num.hc { color: var(--hc-ink); }
.spec .num.sr { color: var(--blue); }
.spec .num.cf mark { background: linear-gradient(transparent 58%, var(--cf) 58%); color: var(--ink); padding: 0 .08em; }
.spec .num.ir { color: var(--ink-3); }
.spec .col-split { width: 24%; }
.splitbar { display: flex; height: 16px; width: 100%; min-width: 150px; background: var(--cream-2); }
.splitbar span { height: 100%; transition: flex-basis .6s var(--ease); }
.splitbar .h { background: var(--hc); } .splitbar .s { background: var(--sr); }
.splitbar .c { background: var(--cf) var(--hatch); } .splitbar .i { background: var(--ir); }

.spec tfoot td { background: var(--blue); color: #fff; border-top: 0; border-left-color: rgba(255,255,255,.22); padding: clamp(10px, 1.7vh, 28px) 20px; }
.spec tfoot .sigma { font: 400 30px/1 var(--sans); }
.spec tfoot .sum-label { font-size: 19px; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
.spec tfoot .sum-label small { display: block; margin-top: 5px; font: 400 12px/1.35 var(--mono); opacity: .8; letter-spacing: .02em; }
.spec tfoot .num { font-size: clamp(32px, min(3.4vw, 6vh), 52px); font-weight: 700; color: #fff; }
.spec tfoot .num.hl { background: var(--cf); color: var(--ink); }
.spec tfoot .splitbar { background: rgba(255,255,255,.2); }

.flows { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .flows { grid-template-columns: repeat(3, 1fr); } }
.flow-card { background: var(--paper); border: 1px solid var(--line-blue); padding: 16px 18px 12px; }
.flow-card h3 { margin: 0 0 6px; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.flow-card h3 span { font: 500 13px/1 var(--mono); color: var(--blue); margin-right: 8px; }
.flow-card h3 small { float: right; margin-top: 4px; font: 400 11px/1 var(--mono); letter-spacing: .02em; color: var(--hc-ink); }
.flow-card svg { width: 100%; height: auto; max-height: calc(100svh - 470px); min-height: 200px; }
.flow-card svg text { font-family: var(--mono); font-size: 11px; fill: var(--ink-2); }
.flow-card svg text.big { font-family: var(--sans); font-size: 20px; font-weight: 700; fill: var(--ink); }
.flow-card .ribbons { animation: ribbons 1.1s var(--ease) both; }
@keyframes ribbons { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* a view that has just been switched in */
.swap-in { animation: swapin .42s var(--ease) both; }
@keyframes swapin { from { opacity: 0; translate: 0 10px; } }

/* ── 01 motivation ───────────────────────────────────────────────────── */
.about-grid { display: grid; gap: 28px 56px; grid-template-columns: 1fr; align-items: center; margin-top: clamp(14px, 3vh, 34px); }
@media (min-width: 1000px) { .about-grid { grid-template-columns: .9fr 1.1fr; } }
.about-left .lede { margin: 0 0 clamp(8px, 1.6vh, 14px); max-width: 58ch; font-size: clamp(15px, min(1.3vw, 2.3vh), 18.5px); text-align: justify; hyphens: auto; }
/* the study at a glance: setup counts only, no results */
.glance { margin: clamp(12px, 2.4vh, 26px) 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 18px; border-top: 2px solid var(--ink); }
.glance div { padding: clamp(8px, 1.5vh, 14px) 0; border-bottom: 1px solid var(--line); }
.glance dt { font-size: clamp(26px, min(2.6vw, 4.8vh), 40px); font-weight: 800; letter-spacing: -.035em; line-height: 1; color: var(--blue); }
.glance dd { margin: 5px 0 0; font: 500 11px/1.3 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }

.sources-h { margin: 0 0 10px; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.sources { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(8px, 1.4vh, 12px); }
.sources > li { background: var(--paper); border: 1px solid var(--line); border-left: 5px solid var(--blue); padding: clamp(10px, 1.7vh, 16px) 20px; }
.as-n { margin: 0; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.sources h3 { margin: 4px 0; font-size: clamp(17px, 2.5vh, 21px); font-weight: 800; letter-spacing: -.025em; line-height: 1.1; }
.sources li > p:not(.as-n):not(.fam-tags) { margin: 0; font-size: clamp(13px, 1.85vh, 15px); line-height: 1.45; color: var(--ink-2); }
.fam-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.fam-tags span { padding: 4px 7px; border: 1px solid var(--line-blue); background: rgba(43,43,209,.06); color: var(--blue); font-size: 11px; letter-spacing: .03em; }
.sources-col .note { margin-top: 10px; font-size: 12px; color: var(--ink-3); }
.cf-mark { background: linear-gradient(transparent 58%, var(--cf) 58%); color: var(--ink); }

/* ── 10 get the dataset ───────────────────────────────────────────────── */
.get-grid { display: grid; gap: clamp(12px, 2vh, 18px); margin-top: clamp(14px, 3vh, 34px); }
.get-files { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: 12px; color: rgba(255,255,255,.8); }
.get-files b { color: #fff; font-weight: 600; }
.get-files i { font-style: normal; padding: 0 4px; margin-left: 1px; border: 1px solid rgba(255,255,255,.35); }
.get-terms { display: grid; gap: 14px 18px; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .get-terms { grid-template-columns: 1fr 1fr; } }
.get .ds-src > li { padding: clamp(12px, 2.4vh, 24px) 20px; }
.get .ds-src h3 { font-size: clamp(17px, 2.6vh, 21px); }
.get .ds-src li > p:not(.src-k):not(.src-links) { font-size: 14px; line-height: 1.45; }
.get .ds-rup { padding: clamp(12px, 2.2vh, 20px) 20px; }
.get .ds-rup p { font-size: 14px; }

/* where it lives: one tile per source */
.ds-src { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; background: rgba(16,16,110,.38); border: 1px solid var(--line-w); min-width: 0; }
@media (min-width: 1000px) { .ds-src { grid-template-columns: 1.15fr 1fr 1fr; } }
.ds-src > li { display: flex; flex-direction: column; gap: 4px; padding: clamp(10px, 1.8vh, 16px) 16px; border-bottom: 1px solid var(--line-w); min-width: 0; }
@media (min-width: 1000px) { .ds-src > li { border-bottom: 0; border-right: 1px solid var(--line-w); } }
.ds-src > li:last-child { border: 0; }
.ds-src .is-gate { background: rgba(255,210,63,.08); box-shadow: inset 0 3px 0 var(--cf); }
.src-k { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.78); }
.src-k em { font-style: normal; margin-left: auto; padding: 3px 6px; background: var(--cf); color: var(--ink); font-size: 10px; letter-spacing: .06em; }
.ds-n { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.6); border-radius: 50%; font-size: 10.5px; letter-spacing: 0; color: #fff; }
.is-gate .ds-n { background: var(--cf); border-color: var(--cf); color: var(--ink); }
.ds-src h3 { margin: 4px 0 0; font-size: clamp(15px, 2.2vh, 17px); font-weight: 800; letter-spacing: -.015em; line-height: 1.15; }
.ds-src li > p:not(.src-k):not(.src-links) { margin: 0; font-size: 13px; line-height: 1.4; color: rgba(255,255,255,.8); }
.src-links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: auto 0 0; padding-top: 4px; font-size: 11.5px; letter-spacing: .02em; }
.src-links a { text-decoration: none; white-space: nowrap; border-bottom: 1px solid rgba(255,255,255,.45); }
.src-links a:hover { color: var(--cf); border-color: var(--cf); }

.ds-rup { display: flex; flex-direction: column; justify-content: center; background: var(--paper); color: var(--ink); border-left: 6px solid var(--cf); padding: clamp(10px, 1.8vh, 16px) 18px; }
.ds-rup h3 { margin: 0 0 6px; font-size: 11.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.ds-rup p { margin: 0; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.ds-rup p b { color: var(--ink); }
.ds-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px !important; }
.ds-badges a { padding: 4px 6px; border: 1px solid var(--ink); font-size: 10px; letter-spacing: .02em; white-space: nowrap; color: var(--ink); text-decoration: none; }
.ds-badges a:hover { background: var(--ink); color: var(--cream); }

/* ── 03 seven surface forms ───────────────────────────────────────────── */
.own-input input {
  width: min(480px, 70vw); padding: 10px 12px;
  border: 1px solid var(--ink); background: var(--paper);
  font: 400 14px/1.2 var(--mono); color: var(--ink);
}
.own-input input:focus { outline: 2px solid var(--blue); outline-offset: 1px; }

/* 300 seeds as ticks, 50 per risk category, then × 7 families */
.seedstrip {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px 24px;
  margin: 0 0 clamp(12px, 2.2vh, 22px); padding: clamp(8px, 1.4vh, 12px) 16px;
  background: var(--paper); border: 1px solid var(--line);
}
.ss-end { margin: 0; display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.ss-end b { font: 800 clamp(24px, min(2.2vw, 4vh), 32px)/1 var(--sans); letter-spacing: -.03em; color: var(--blue); }
.ss-end > span { font-size: 12px; letter-spacing: .05em; text-transform: uppercase; line-height: 1.25; }
.ss-end small { display: block; font-size: 10.5px; text-transform: none; letter-spacing: .01em; color: var(--ink-3); }
.ss-cats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.ss-cats li { min-width: 0; overflow-wrap: anywhere; font-size: 10.5px; line-height: 1.25; letter-spacing: .01em; color: var(--ink-2); }
.ss-cats i {
  display: block; height: 15px; margin-bottom: 5px;
  background:
    repeating-linear-gradient(90deg, var(--blue) 0 2px, transparent 2px 4%) top / 100% 6px no-repeat,
    repeating-linear-gradient(90deg, var(--blue) 0 2px, transparent 2px 4%) bottom / 100% 6px no-repeat;
}
@media (max-width: 999px) {
  .seedstrip { grid-template-columns: minmax(0, 1fr); }
  .ss-end { white-space: normal; }
  .ss-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) { .ss-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) and (max-height: 760px) { .ss-end small { display: none; } }

.stepper { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: clamp(12px, 2vh, 20px); }
.stepper button {
  appearance: none; border: 0; background: transparent; cursor: pointer; text-align: left;
  padding: 0 0 4px; color: var(--ink-3);
}
.stepper .bar { display: block; height: 4px; background: rgba(19,19,19,.12); margin-bottom: 10px; overflow: hidden; }
.stepper .bar i { display: block; height: 100%; width: 0; background: var(--blue); }
.stepper .is-done .bar i { width: 100%; }
.stepper .is-on { color: var(--ink); }
.stepper .is-on .bar i { width: 100%; }
.stepper.auto .is-on .bar i { width: 0; animation: stepfill var(--dur, 4.5s) linear forwards; }
@keyframes stepfill { to { width: 100%; } }
.stepper .s-ref { display: block; font: 500 12px/1 var(--mono); letter-spacing: .04em; }
.stepper .s-name { display: block; margin-top: 4px; font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
@media (max-width: 720px) { .stepper .s-name { display: none; } }

.form-panel { display: grid; grid-template-columns: 1fr; border: 1px solid var(--line); background: var(--paper); }
@media (min-width: 1000px) { .form-panel { grid-template-columns: .8fr 1.7fr; } }
.form-meta { padding: clamp(16px, 2.8vh, 28px); border-bottom: 1px solid var(--line); }
@media (min-width: 1000px) { .form-meta { border-bottom: 0; border-right: 1px solid var(--line); } }
.fm-ref { margin: 0; font-size: 13px; color: var(--blue); }
.fm-name { margin: 4px 0 12px; font-size: clamp(24px, 3.6vh, 32px); font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.fm-pattern { margin: 0 0 12px; padding: 10px 12px; background: var(--cream-2); font-size: 12.5px; line-height: 1.5; overflow-wrap: anywhere; }
.fm-desc { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.form-out { padding: clamp(16px, 2.8vh, 28px); display: flex; flex-direction: column; gap: clamp(10px, 2vh, 18px); min-width: 0; }
.fo-text { margin: 0; min-height: 4.6em; font-size: clamp(16px, min(1.55vw, 2.9vh), 22px); line-height: 1.55; overflow-wrap: anywhere; }
.fo-text .alt { background: rgba(43,43,209,.12); color: var(--blue); box-shadow: inset 0 -2px 0 var(--blue); }
.fo-text .zwm { display: inline-block; width: .45ch; height: 1.05em; margin: 0 1px; vertical-align: -.15em; border: 1px dashed var(--blue); background: rgba(43,43,209,.06); }
.fo-text .b64 { text-decoration: underline dotted var(--ink-3); text-underline-offset: .2em; }
.fo-stats { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; }
.fo-stats div { min-width: 90px; }
.fo-stats dt { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.fo-stats dd { margin: 4px 0 0; font: 700 22px/1 var(--sans); letter-spacing: -.02em; }
.fo-stats dd.blue { color: var(--blue); }
.fo-foot { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.fo-note { margin: 0; font-size: 12px; color: var(--ink-3); }

/* ── 04 anatomy ───────────────────────────────────────────────────────── */
.anat-grid { display: grid; gap: 32px 56px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 1000px) { .anat-grid { grid-template-columns: 1fr 1fr; } }
#stack { width: 100%; height: auto; }
#stack text { font-family: var(--mono); }
#stack .plate { cursor: pointer; transition: translate .35s var(--ease); }
#stack .plate .top { transition: fill .3s, stroke .3s; }
#stack .plate.is-on .top { fill: rgba(255,210,63,.18); stroke: var(--cf); }

/* diagram + labels on the left, the card on the right at exactly the diagram's height */
.anatomy { --ag: clamp(28px, 3.2vw, 52px); }
.anat-grid { display: flex; flex-direction: column; gap: 24px; margin-top: clamp(14px, 3vh, 34px); }
.anat-stack { display: flex; gap: var(--ag); align-items: stretch; }
@media (min-width: 1000px) {
  .anat-grid { flex-direction: row; justify-content: center; align-items: stretch; gap: var(--ag); }
  .anat-right { width: clamp(290px, 24vw, 380px); flex: none; position: relative; }
  /* the card takes the diagram's height and never pushes it: switching layers moves nothing */
  .anat-right .layer-card { position: absolute; inset: 0; min-height: 0; }
}
#stack { height: clamp(240px, calc(100svh - 360px), 440px); width: auto; max-width: 100%; flex: none; }
@media (max-width: 999px) { #stack { height: auto; width: 55vw; } }
/* phones and tablets: the plates sit above a plain list instead of beside it */
@media (max-width: 999px) {
  .anat-stack { flex-direction: column; align-items: center; gap: 16px; }
  #stack { width: min(300px, 80vw); }
  .anatomy .layers { width: 100%; display: grid; gap: 10px; }
  .anatomy .layers li { position: static; translate: none; }
  .anatomy .layers li::before { display: none; }
  .anatomy .layers .t small { white-space: normal; }
}
.layers { position: relative; list-style: none; margin: 0; padding: 0; width: 330px; flex: none; }
.layers li { position: absolute; left: 0; right: 0; top: var(--y); translate: 0 -50%; }
.layers li::before { content: ""; position: absolute; left: calc(var(--ag) * -1 + 6px); top: 50%; width: calc(var(--ag) - 12px); border-top: 1px dashed rgba(255,255,255,.45); }
.layers li.is-on::before { border-top-color: var(--cf); }
.layer-card { position: relative; overflow: hidden; min-height: 260px; display: flex; flex-direction: column; justify-content: center; padding: clamp(14px, 2.2vh, 22px) clamp(18px, 2vw, 28px); background: rgba(16,16,110,.38); border: 1px solid var(--line-w); }
.lc-in { animation: cardin .38s var(--ease) both; font-size: 14.5px; line-height: 1.5; }
@keyframes cardin { from { opacity: 0; translate: 10px 0; } }
.lc-k { margin: 0 0 4px; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--cf); }
.lc-in h3 { margin: 0 0 12px; font-size: clamp(18px, 2.8vh, 22px); font-weight: 800; letter-spacing: -.02em; }
.lc-in p { margin: 0 0 8px; }
.lc-in .big { font: 800 clamp(24px, 3.8vh, 34px)/1 var(--sans); letter-spacing: -.03em; color: var(--cf); margin-right: 8px; }
.layers button {
  appearance: none; border: 0; background: transparent; cursor: pointer; width: 100%; text-align: left; color: #fff;
  display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: center;
  padding: 2px 0;
}
.layers .n { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.6); border-radius: 50%; font: 500 12px/1 var(--mono); transition: background .3s ease, border-color .3s ease, color .3s ease; }
.layers .t { font-weight: 700; font-size: clamp(16px, 2.4vh, 19px); letter-spacing: -.01em; transition: color .3s ease; }
.layers .t small { display: block; white-space: nowrap; font: 400 12px/1.3 var(--mono); opacity: .7; letter-spacing: .02em; margin-top: 2px; }
.layers .is-on .n { background: var(--cf); border-color: var(--cf); color: var(--ink); }
.layers .is-on .t { color: var(--cf); }
.mx { border-collapse: collapse; font: 500 12px/1 var(--mono); margin-top: 6px; }
.mx th, .mx td { padding: 6px 9px; border: 1px solid rgba(255,255,255,.22); text-align: center; }
.mx th { font-weight: 500; opacity: .75; }
.mx td.d { background: var(--cf); color: var(--ink); font-weight: 700; }
.mx td.z { opacity: .35; }
.mx-cap { font: 400 11.5px/1.4 var(--mono); opacity: .7; margin-top: 8px; }

/* ── 05 four states ───────────────────────────────────────────────────── */
.rubric-grid { display: grid; gap: 28px 48px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 1000px) { .rubric-grid { grid-template-columns: .85fr 1.15fr; } }
.tree { margin-top: 0; background: var(--paper); border: 1px solid var(--line); padding: clamp(14px, 2.4vh, 22px); }
.tree-h { margin: 0 0 10px; font: 500 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); display: flex; justify-content: space-between; }
.tree-tip { text-transform: none; letter-spacing: .02em; opacity: .8; }
/* the decision path: three steps down a rail; each answer is one row with where it leads */
.flow { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: clamp(10px, 2vh, 18px); }
.fq { padding: 2px 0 2px 14px; border-left: 3px solid var(--line); transition: opacity .25s, border-color .25s; }
.fq-q { margin: 0 0 6px; font-weight: 600; font-size: clamp(14px, 2vh, 16px); line-height: 1.3; }
.fq-q small { font: 500 11px/1 var(--mono); color: var(--ink-3); margin-right: 8px; }
.fq-hint { margin: -2px 0 8px; font-size: 11.5px; line-height: 1.35; color: var(--ink-3); }
.fq-opts { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.fq-opt { display: grid; grid-template-columns: minmax(0, auto) minmax(18px, 1fr) auto; align-items: center; gap: 10px; }
.fq-opt button {
  appearance: none; cursor: pointer; justify-self: start; min-width: 9.5em; text-align: left;
  padding: 6px 10px; border: 1px solid var(--ink); background: transparent;
  font: 500 11px/1 var(--mono); letter-spacing: .05em; text-transform: uppercase;
}
.fq-opt button:not(.is-picked):hover:not(:disabled) { background: var(--cream-2); }
.fq-opt button.is-picked { background: var(--ink); color: var(--cream); }
.fq-opt button:disabled:not(.is-picked) { opacity: .35; cursor: default; }
/* answered steps stay live: the other answers step back but can still be picked */
.fq.is-yes .fq-opt button:not(.is-picked):not(:disabled), .fq.is-no .fq-opt button:not(.is-picked):not(:disabled) { opacity: .5; }
.fq.is-yes .fq-opt button:not(.is-picked):hover, .fq.is-no .fq-opt button:not(.is-picked):hover { opacity: 1; }
.fq-opt button.is-picked:hover { box-shadow: 2px 2px 0 var(--blue); }
.fq-wire { display: block; height: 0; border-top: 1px dashed var(--ink-3); opacity: .55; transition: opacity .25s, border-color .25s; }
.fq-next { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.fq-state {
  --c: var(--ink); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; cursor: default;
  padding: 6px 10px; border: 1px solid var(--line); border-left: 5px solid var(--c); background: var(--cream);
  font-weight: 700; font-size: 13.5px; transition: background .25s, color .25s, opacity .25s, box-shadow .25s;
}
.fq-state.is-hit { background: var(--c); color: #fff; box-shadow: 3px 3px 0 var(--ink); }
.fq-state.is-hit[data-state="C"], .fq-state.is-hit[data-state="I"] { color: var(--ink); }
.fq-state small { font: 500 9.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
/* a walked route: the rail and the taken answer turn blue, the rest steps back */
.fq.is-yes, .fq.is-no { border-left-color: var(--blue); }
.fq.is-now { border-left-color: var(--ink); }
.fq.is-off { opacity: .32; }
.fq-opt.is-taken .fq-wire { border-top: 1.5px solid var(--blue); opacity: 1; }
.fq-opt.is-taken .fq-next { color: var(--blue); }
.tree.has-result .fq-state:not(.is-hit) { opacity: .4; }
@media (max-width: 640px) {
  .fq-opt { grid-template-columns: auto minmax(12px, 1fr) auto; gap: 6px; }
  .fq-opt button { min-width: 0; }
}
.tree-cap { opacity: .7; margin: 14px 0 0 !important; }

.qcards { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .qcards { grid-template-columns: 1fr 1fr; } }
.qcard {
  --c: var(--ink); position: relative;
  background: var(--paper); border: 1px solid var(--line); border-top: 5px solid var(--c);
  padding: clamp(12px, 2.2vh, 20px) 18px;
  transition: translate .25s var(--ease), box-shadow .25s var(--ease), opacity .25s;
}
.qcard[data-state="H"] { --c: var(--hc); } .qcard[data-state="S"] { --c: var(--sr); }
.qcard[data-state="C"] { --c: var(--cf); } .qcard[data-state="I"] { --c: var(--ir); }
.qcard h3 { margin: 6px 0 6px; font-size: clamp(19px, 2.9vh, 24px); font-weight: 800; letter-spacing: -.025em; line-height: 1.05; }
.qcard p { margin: 0; font-size: clamp(13.5px, 1.9vh, 15px); line-height: 1.45; color: var(--ink-2); }
.qc-code { margin: 0 !important; font-size: 11.5px !important; letter-spacing: .05em; color: var(--ink-3) !important; }
.qcards.has-hit .qcard { opacity: .45; }
.qcards.has-hit .qcard.is-hit { opacity: 1; translate: -4px -4px; box-shadow: 4px 4px 0 var(--ink); }

/* ── 06 results ───────────────────────────────────────────────────────── */
.results-body { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 1100px) { .results-body { grid-template-columns: 1fr 230px; } }
.statcol { margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 18px; align-content: start; }
@media (min-width: 1100px) { .statcol { grid-template-columns: 1fr; } }
.statcol > div { padding: clamp(8px, 1.6vh, 14px) 0; border-top: 2px solid var(--ink); }
.statcol dt { font-size: clamp(28px, min(2.6vw, 5vh), 40px); font-weight: 500; letter-spacing: -.035em; line-height: 1; }
.statcol dd { margin: 6px 0 0; color: var(--ink-3); font-size: 13.5px; line-height: 1.3; }
.statcol dt small { margin-right: 4px; font-size: .6em; color: var(--ink-3); vertical-align: .18em; }
.statcol .sc-cf dt b { background: linear-gradient(transparent 60%, var(--cf) 60%); }

.chart-card { border: 1px solid var(--line); background: var(--paper); padding: clamp(14px, 2.2vh, 26px) clamp(14px, 2vw, 26px); min-width: 0; overflow-x: clip; }
.chart-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; margin-bottom: clamp(10px, 2vh, 22px); }
.tabs { display: flex; flex-wrap: wrap; border: 1px solid var(--ink); }
.tabs button {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  padding: 8px 11px; font: 500 11.5px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase;
  border-right: 1px solid var(--ink);
}
.tabs button:last-child { border-right: 0; }
.tabs button:hover { background: var(--cream-2); }
.tabs button.is-on { background: var(--blue); color: #fff; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 11.5px; letter-spacing: .02em; color: var(--ink-2); align-items: center; }

.qchart { position: relative; --split: 48%; }
.hc-row, .xlabels { display: grid; grid-template-columns: repeat(7, 1fr); margin-left: 40px; }
.hc-row { margin-bottom: 8px; }
.hc-row span { text-align: center; font: 500 12.5px/1 var(--mono); color: var(--hc-ink); }
.hc-row span small { display: block; font-size: 9.5px; letter-spacing: .08em; opacity: .7; margin-bottom: 3px; }

.plot { position: relative; height: clamp(240px, 40vw, 460px); margin-left: 40px; }
.grid span {
  position: absolute; left: -40px; right: 0; bottom: var(--y);
  display: flex; align-items: center; height: 0;
  border-bottom: 1px dashed var(--line);
  font: 400 11px/1 var(--mono); color: var(--ink-3);
}
.layer { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(7, 1fr); }
.layer-quad { clip-path: inset(0 0 0 var(--split)); }
.col { position: relative; display: flex; justify-content: center; height: 100%; }
.bar { position: relative; height: 100%; width: min(66%, 100px); display: flex; flex-direction: column-reverse; }
.seg-v { position: relative; flex: 0 0 auto; transition: height .7s var(--ease); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.seg-v.s { background: var(--sr); color: #fff; }
.seg-v.c { background: var(--cf) var(--hatch); color: var(--ink); }
.seg-v.i { background: var(--ir); }
.seg-v.h { background: var(--hc); }
.seg-v.n { background: var(--nh) repeating-linear-gradient(135deg, transparent 0 7px, rgba(19,19,19,.06) 7px 8px); color: var(--ink-2); }
.seg-v em { font: 600 12.5px/1.1 var(--mono); font-style: normal; text-align: center; white-space: nowrap; }
.seg-v em small { display: block; font-size: 9px; font-weight: 500; letter-spacing: .08em; opacity: .8; margin-bottom: 3px; text-transform: uppercase; }
.col.is-hover .bar { outline: 2px solid var(--ink); outline-offset: 3px; }

.annot {
  position: absolute; z-index: 2; pointer-events: none;
  left: calc(100% * 5 / 7 - 1%); top: 30%;
  opacity: 0; transition: opacity .4s;
}
.annot.is-on { opacity: 1; }
.annot span { position: relative; display: block; padding: 7px 10px; background: var(--paper); border: 1px solid var(--ink); font: 600 11.5px/1.3 var(--mono); white-space: nowrap; box-shadow: 3px 3px 0 var(--cf); }
.annot span::before { content: ""; position: absolute; right: 100%; top: 50%; width: 3.2vw; max-width: 44px; height: 1px; background: var(--ink); }
.annot span::after { content: ""; position: absolute; right: calc(100% + min(3.2vw, 44px)); top: calc(50% - 3px); width: 7px; height: 7px; border-radius: 50%; background: var(--ink); }

.divider { position: absolute; top: -18px; bottom: -6px; left: var(--split); width: 0; z-index: 3; cursor: ew-resize; touch-action: none; }
.div-line { position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: var(--ink); }
.div-chip { position: absolute; top: 46%; left: 0; transform: translate(-50%, -50%); display: flex; align-items: center; white-space: nowrap; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.div-l, .div-r { padding: 7px 9px; background: var(--paper); border: 1px solid var(--ink); }
.div-h {
  width: 26px; height: 34px; background: var(--blue); border: 1px solid var(--ink);
  background-image: linear-gradient(90deg, transparent 11px, rgba(255,255,255,.85) 11px 12px, transparent 12px 14px, rgba(255,255,255,.85) 14px 15px, transparent 15px);
}
.divider:focus-visible .div-h { outline: 2px solid var(--cf); outline-offset: 2px; }
.divider.is-drag .div-h { background-color: var(--ink); }

.xlabels { margin-top: 10px; }
.xlabels span { text-align: center; font-weight: 700; font-size: 17px; letter-spacing: -.02em; }
.xlabels span small { display: block; font: 400 11px/1.25 var(--mono); color: var(--ink-3); letter-spacing: .03em; margin-top: 2px; }

.tip { position: absolute; z-index: 4; pointer-events: none; min-width: 220px; padding: 12px 14px; background: var(--ink); color: var(--chalk); font-size: 12px; line-height: 1.6; }
.tip b { display: block; font: 700 15px/1.2 var(--sans); margin-bottom: 6px; }
.tip .r { display: flex; justify-content: space-between; gap: 16px; }
.tip .r i { font-style: normal; display: inline-flex; align-items: center; gap: 7px; }
.tip .sw { margin: 0; }
.tip .sw-sr { background: #7070F2; }

.chart-cap { margin: clamp(10px, 1.8vh, 20px) 0 0; color: var(--ink-2); font-size: 14.5px; }
.chart-cap .mono { margin-left: 6px; font-size: 13px; color: var(--ink-2); }

@media (max-width: 720px) {
  .xlabels span small, .seg-v em { display: none; }
  .hc-row span { font-size: 9.5px; }
  .div-l, .div-r { display: none; }
  .legend .lg-bin, .annot { display: none; }
}

/* change from F0 (inside the results card) */
.rview { display: flex; flex-direction: column; min-height: 0; }
.mirror-fig { margin: 0; flex: 1; min-height: 0; display: flex; }
#mirror { width: 100%; height: auto; }
#mirror text { font-family: var(--mono); fill: var(--ink-2); font-size: 13px; }
#mirror .lbl { font-family: var(--sans); font-size: 17px; font-weight: 700; fill: var(--ink); }
#mirror .val { font-size: 14px; font-weight: 700; fill: var(--ink); }
#mirror .hd { font-size: 12px; letter-spacing: .08em; fill: var(--ink-3); }
#mirror .bar-h { fill: var(--hc); }
#mirror .bar-c { fill: url(#cfhatch); }
#mirror .ci { stroke: var(--ink); stroke-width: 1.5; }
#mirror .axis { stroke: rgba(19,19,19,.5); }
#mirror .gridl { stroke: rgba(19,19,19,.09); }
#mirror .grow-bar { transform-box: fill-box; animation: growx 1s var(--ease) both; }
#mirror .grow-bar.neg { transform-origin: right; }
#mirror .grow-bar.pos { transform-origin: left; }
@keyframes growx { from { transform: scaleX(0); } }

/* ── 08 models ────────────────────────────────────────────────────────── */
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; margin-top: 6px; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tg-box { width: 34px; height: 18px; border: 1.5px solid var(--ink); position: relative; transition: background .2s; }
.tg-box::after { content: ""; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; background: var(--ink); transition: translate .2s var(--ease), background .2s; }
.toggle input:checked + .tg-box { background: var(--blue); border-color: var(--blue); }
.toggle input:checked + .tg-box::after { translate: 16px 0; background: #fff; }
.toggle input:focus-visible + .tg-box { outline: 2px solid var(--blue); outline-offset: 2px; }

.prints { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
.prints:not(.six) .print.sep { display: none; }
@media (min-width: 900px) {
  .prints { gap: 0; grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(0, 0fr); transition: grid-template-columns .55s var(--ease); }
  .prints.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .prints { margin: 0 -6px; }
  .prints .print { margin: 0 6px; }
  .prints:not(.six) .print.sep { display: block; margin: 0; padding-inline: 0; border-width: 0; opacity: 0; visibility: hidden; overflow: hidden; }
  .print.sep { transition: opacity .35s ease .2s, margin .55s var(--ease), padding .55s var(--ease), border-width .55s var(--ease); }
}
.print { position: relative; background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--ink); padding: clamp(10px, 1.8vh, 16px) 14px; min-width: 0; }
.print.hot { border-top-color: var(--hc); }
.print.sep { border: 1.5px dashed var(--ink-3); border-top-width: 4px; background: transparent; }
.print h3 { margin: 0; font-size: clamp(16px, 2.4vh, 19px); font-weight: 800; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.print .p-sub { margin: 2px 0 10px; font: 400 11px/1.3 var(--mono); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.print .p-badge { position: absolute; top: -12px; right: 8px; z-index: 1; padding: 3px 6px; background: var(--hc); color: #fff; font: 600 10.5px/1 var(--mono); }
.p-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; height: clamp(90px, calc(100svh - 560px), 210px); }
.p-bars .pb { display: flex; flex-direction: column-reverse; height: 100%; }
.p-bars .pb i { display: block; width: 100%; transition: height .6s var(--ease); }
.p-bars .s { background: var(--sr); } .p-bars .c { background: var(--cf) var(--hatch); }
.p-bars .i { background: var(--ir); } .p-bars .h { background: var(--hc); }
.p-bars .e { background: repeating-linear-gradient(45deg, transparent 0 3px, rgba(19,19,19,.25) 3px 4px); }
.p-x { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin-top: 4px; font: 500 9.5px/1 var(--mono); color: var(--ink-3); text-align: center; }
.print dl { margin: 10px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border-top: 1px solid var(--line); padding-top: 8px; }
.print dt { font: 500 10px/1 var(--mono); color: var(--ink-3); letter-spacing: .05em; }
.print dd { margin: 3px 0 0; font: 700 15px/1 var(--sans); letter-spacing: -.02em; }
.print .p-note { margin: 8px 0 0; font: 400 11px/1.4 var(--mono); color: var(--ink-3); }

/* ── 09 behaviors ─────────────────────────────────────────────────────── */
.behaviors .title { margin-bottom: clamp(18px, 3.6vh, 40px); }
.beh-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .beh-grid { grid-template-columns: repeat(3, 1fr); } }
.beh { background: var(--paper); border: 1px solid var(--line); padding: clamp(14px, 2.4vh, 22px); display: flex; flex-direction: column; gap: clamp(8px, 1.6vh, 14px); min-width: 0; }
.beh header { display: flex; justify-content: space-between; align-items: flex-start; }
.beh-tag { font-size: 13px; color: var(--ink-2); }
.beh-no { font: 800 clamp(40px, 7vh, 64px)/.8 var(--sans); letter-spacing: -.05em; color: transparent; -webkit-text-stroke: 1.5px var(--ink-3); }
.beh-lede { margin: 0; font-size: clamp(14px, 2vh, 15.5px); line-height: 1.45; color: var(--ink-2); }
.beh-count { margin: 0; font-size: 13px; color: var(--ink-2); }
.beh-count b { color: var(--ink); font-size: 14px; }

.flip { appearance: none; border: 0; padding: 0; background: none; cursor: pointer; perspective: 900px; height: clamp(130px, 22vh, 200px); text-align: left; }
.flip-inner { position: relative; display: block; width: 100%; height: 100%; transition: transform .6s var(--ease); transform-style: preserve-3d; }
.flip.is-flipped .flip-inner { transform: rotateY(180deg); }
.flip-face { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 16px 18px; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip-face small { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.flip-face b { font-size: clamp(19px, 3vh, 25px); font-weight: 800; letter-spacing: -.025em; line-height: 1.1; }
.flip-face em { font-style: normal; font-size: 11px; opacity: .75; }
.flip .front { background: var(--ink); color: var(--chalk); }
.flip .back { background: var(--cf) var(--hatch); color: var(--ink); transform: rotateY(180deg); }

.collapse-viz { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 8px 16px; align-items: center; height: clamp(130px, 22vh, 200px); }
.collapse-viz .token { font: 600 clamp(14px, 2.4vh, 19px)/1 var(--mono); padding: 8px 10px; white-space: nowrap; background: var(--cream-2); align-self: end; justify-self: start; }
.collapse-viz .arrow { grid-column: 1; font-size: 11.5px; color: var(--ink-3); align-self: start; }
.collapse-viz .frame {
  grid-column: 2; grid-row: 1 / span 2; justify-self: end;
  height: 100%; aspect-ratio: 1; display: grid; place-items: end start; padding: 8px;
  border: 2px solid var(--ink);
  background: conic-gradient(var(--cream-2) 25%, var(--paper) 0 50%, var(--cream-2) 0 75%, var(--paper) 0) 0 0 / 14px 14px;
}
@media (max-width: 640px) { .collapse-viz { height: auto; } .collapse-viz .frame { height: auto; width: min(140px, 36vw); } }
.collapse-viz .frame span { font-size: 11px; background: var(--ink); color: var(--chalk); padding: 3px 6px; }

.drift { display: grid; grid-template-columns: repeat(30, 1fr); gap: 2px; height: clamp(130px, 22vh, 200px); align-content: center; }
.drift i { display: block; aspect-ratio: 1; background: rgba(19,19,19,.12); }
.drift i.on { background: var(--blue); }

/* ── 09 conclusion & limitations ──────────────────────────────────────── */
.limits-grid { display: grid; gap: 32px 64px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 1000px) { .limits-grid { grid-template-columns: 1fr 1fr; } }
.concl .lede { max-width: 52ch; margin: 0 0 clamp(12px, 2.4vh, 24px); }
.concl-lead { margin: 0; max-width: 22em; font-size: clamp(24px, min(2.4vw, 4.4vh), 36px); font-weight: 800; line-height: 1.15; letter-spacing: -.03em; color: var(--navy); }
.concl-next { margin: clamp(16px, 3vh, 32px) 0 0; padding-top: 12px; border-top: 1px solid var(--line); max-width: 60ch; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); }
.concl-next::before { content: "→ "; color: var(--blue); }
.lims-h { margin: 0 0 8px; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.lims { list-style: none; counter-reset: lim; margin: 0; padding: 0; }
.lims li { counter-increment: lim; border-top: 1px solid var(--line); }
.lims li:last-child { border-bottom: 1px solid var(--line); }
.lims summary {
  position: relative; list-style: none; cursor: pointer;
  padding: clamp(10px, 1.8vh, 15px) 36px clamp(10px, 1.8vh, 15px) 52px;
  font-weight: 700; font-size: clamp(15px, 2.2vh, 17px); letter-spacing: -.01em;
  transition: color .15s;
}
.lims summary::-webkit-details-marker { display: none; }
.lims summary::before { content: "L" counter(lim); position: absolute; left: 0; top: 50%; translate: 0 -50%; font: 500 12px/1 var(--mono); color: var(--blue); padding: 4px 6px; border: 1px solid var(--line-blue); }
.lims summary::after { content: "+"; position: absolute; right: 4px; top: 50%; translate: 0 -50%; font: 400 20px/1 var(--mono); color: var(--ink-3); transition: rotate .2s var(--ease); }
.lims details.is-open summary::after { rotate: 45deg; }
.lims details.is-open summary { color: var(--blue); }
.lims summary:hover { color: var(--blue); }
.lim-body { overflow: hidden; }
.lims details p { margin: 0; padding: 0 36px clamp(10px, 1.8vh, 15px) 52px; font-size: clamp(13.5px, 1.95vh, 15px); line-height: 1.5; color: var(--ink-2); }

/* ── 12 use & cite ────────────────────────────────────────────────────── */
.use .title { margin-bottom: clamp(14px, 2.6vh, 36px); }
.use-grid { display: grid; gap: 18px 24px; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .use-grid { grid-template-columns: 1fr 1fr; } }
.bib { position: relative; background: rgba(16, 16, 110, .38); border: 1px solid var(--line-w); padding: clamp(12px, 2vh, 20px) 22px; min-width: 0; }
.bib pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 400 12px/1.55 var(--mono); color: #fff; }
.bib-h { margin: 0 0 10px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.copy {
  position: absolute; top: 12px; right: 12px;
  padding: 7px 11px; background: var(--cf); color: var(--ink); border: 0; cursor: pointer;
  font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase;
}

/* ── footer · the name as a specimen ──────────────────────────────────── */
.foot { padding: 72px 0 36px; border-top: 1px solid var(--ink); }
.foot-cols { display: grid; gap: 32px; grid-template-columns: repeat(2, 1fr); padding-bottom: 72px; }
@media (min-width: 900px) { .foot-cols { grid-template-columns: repeat(4, 1fr); } }
.foot h3 { margin: 0 0 16px; font-weight: 500; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.foot-cols a { display: block; margin: 0 0 6px; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.foot-cols a:hover { color: var(--blue); }

.specimen {
  display: flex; justify-content: space-between; align-items: flex-end;
  padding-bottom: 34px; border-bottom: 2px solid var(--ink);
  font-family: var(--pixel); font-size: clamp(46px, 12.6vw, 172px); line-height: .9;
  user-select: none;
}
.specimen span { position: relative; }
.specimen .alt { color: var(--blue); }
.specimen .alt::before { content: ""; position: absolute; inset: .06em -.06em -.02em; border: 1px dashed var(--blue); }
.specimen .alt::after {
  content: attr(data-cp);
  position: absolute; left: 50%; top: calc(100% + 8px); translate: -50% 0;
  font: 500 10px/1 var(--mono); letter-spacing: .02em; white-space: nowrap; color: var(--blue);
}
@media (max-width: 640px) { .specimen .alt::after { display: none; } .specimen { padding-bottom: 14px; } }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 24px; padding-top: 28px; }
.foot-bottom p { margin: 0; font-size: 14px; color: var(--ink-2); }
.to-top { display: grid; place-items: center; width: 52px; height: 52px; background: var(--ink); color: var(--cream); transition: translate .16s var(--ease), box-shadow .16s var(--ease); }
.to-top:hover { translate: 0 -3px; box-shadow: 0 3px 0 var(--blue); }
.readas { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.readas > span { margin-right: 6px; color: var(--ink-3); letter-spacing: .04em; text-transform: uppercase; }
.readas button { appearance: none; cursor: pointer; padding: 6px 10px; border: 1px solid var(--ink); background: transparent; font: 500 12px/1 var(--mono); }
.readas button[aria-pressed="true"] { background: var(--ink); color: var(--cream); }

.as-badge {
  position: fixed; left: 16px; bottom: 16px; z-index: 60;
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: var(--ink); color: var(--chalk); font-size: 12px; box-shadow: 4px 4px 0 var(--cf);
}
.as-badge b { color: var(--cf); }
.as-badge button { appearance: none; border: 0; background: none; color: inherit; cursor: pointer; text-decoration: underline; font: inherit; }

/* ── phones and tablets: tighter sections ─────────────────────────────── */
@media (max-width: 999px) {
  /* anchors land below the fixed bar, so sections need no room for it themselves */
  html { scroll-padding-top: var(--navh); }
  .sec { padding: 36px 0 32px; }
  .sec.edge { padding-bottom: 56px; }
  .sec.hero { padding-top: calc(var(--navh) + 28px); }
}

/* ── motion preferences ───────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  /* keep the gentle fades and transitions; stop only the constantly moving decoration */
  #blueprint .flow { animation: none; }
}

/* one rhythm for every section: label at the top, heading under it, then the
   main block fills the rest of the screen and its parts share that height */
@media (min-width: 1000px) and (min-height: 620px) {
  .sec.fit:not(.hero) > .wrap > .fill { flex: 1 1 auto; min-height: 0; }
  .sec.fit:not(.hero) > .wrap > .form-panel.fill { min-height: auto; }   /* never smaller than its own text */
  .sec.fit:not(.hero) > .wrap > .center-block { margin-block: auto; }
  /* §06 and §09 keep the earlier spacing: the content sits as one centred block under the label */
  .sec.fit.centered > .wrap > .crumb + * { margin-top: auto; }
  .sec.fit.centered > .wrap > :last-child { margin-bottom: auto; }

  /* 01 motivation */
  .about-grid.fill { align-items: center; }

  /* 04 four states */
  .rubric-grid.fill { align-items: stretch; }
  .rubric-grid.fill .tree-col { display: flex; flex-direction: column; }
  .rubric-grid.fill .tree { flex: 1; display: flex; flex-direction: column; }
  .rubric-grid.fill .tree > .flow { flex: 1; justify-content: center; }
  .rubric-grid.fill .qcards { grid-auto-rows: 1fr; }
  .rubric-grid.fill .qcard { display: flex; flex-direction: column; justify-content: center; }

  /* 06 paired transitions */
  .view.fill { display: flex; flex-direction: column; }
  .view.fill .table-scroll { flex: 1; min-height: 0; }
  .view.fill .spec { height: 100%; }
  .view.fill .flows { flex: 1; min-height: 0; }
  .view.fill .flow-card { display: flex; flex-direction: column; min-height: 0; }
  .view.fill .flow-card svg { flex: 1; min-height: 0; max-height: none; }

  /* 07 models */
  .prints.fill { align-items: stretch; }
  .prints.fill .print { display: flex; flex-direction: column; }
  .prints.fill .p-bars { flex: 1; height: auto; min-height: 80px; }

  /* 08 behaviors */
  .beh-grid.fill { align-items: stretch; }
  .beh-grid.fill .flip, .beh-grid.fill .collapse-viz, .beh-grid.fill .drift { flex: 1; height: auto; min-height: 120px; }
  .beh-grid.fill .collapse-viz { align-content: center; }
  .beh-grid.fill .collapse-viz .frame { height: min(100%, 170px); align-self: center; }
}

/* small-laptop windows (about 1366×625): tighten the densest sections */
@media (min-width: 1000px) and (min-height: 620px) and (max-height: 700px) {
  .spec th { padding: 6px 16px; }
  .spec td { padding: 6px 16px; }
  .spec tfoot td { padding: 8px 16px; }
  .spec .fam small { display: none; }
  .spec .num { font-size: 22px; }
  .spec tfoot .num { font-size: 28px; }
  .form-meta, .form-out { padding: 12px 16px; }
  .fm-desc { font-size: 13px; line-height: 1.4; }
  .fm-name { font-size: 22px; margin: 2px 0 8px; }
  .fm-pattern { font-size: 11.5px; padding: 6px 8px; margin-bottom: 8px; }
  .fo-text { min-height: 3.6em; }
  .stepper { margin-bottom: 10px; }
  .hero .morph-block { margin-top: 1.4vh; }
  .hero .display { font-size: clamp(40px, min(5.6vw, 7.4vh), 96px); }
  .hero .cells li { padding: 2px 0; }
  .hero .hero-actions { margin-top: 1.6vh; }
  .results .lede { font-size: 14.5px; margin-bottom: 8px; }
  .hero .btn { padding: 12px 20px; }
  .lc-in { font-size: 13.5px; }
  .lc-in .big { font-size: 22px; }
  .lc-in h3 { margin-bottom: 8px; }
  .layer-card { padding: 10px 16px; }
  .fo-stats dd { font-size: 18px; }
  .fo-foot { padding-top: 6px; }
  .fo-text { line-height: 1.45; }
  .lc-in .mx-cap { display: none; }
  .lc-in h3 { font-size: 17px; }
  .lc-k { margin-bottom: 2px; }
  .mx th, .mx td { padding: 3px 7px; font-size: 11px; }
}
/* laptop screens up to 780px tall (1280×720, 1366×768): compact spacing for §01–§03 */
@media (min-width: 1000px) and (min-height: 620px) and (max-height: 780px) {
  .sources > li { padding: 8px 16px; }
  .sources h3 { font-size: 16.5px; }
  .sources-h, .sources-col .note { display: none; }
  .flow { gap: 8px; }
  .fq-state { padding: 4px 8px; font-size: 12.5px; }
  .fq-opt button { padding: 5px 9px; }
  .fq-opts { gap: 4px; }
  .tree-cap { display: none; }
  .about-left .lede { font-size: 14.5px; }
  .seedstrip { padding: 6px 14px; margin-bottom: 10px; }
  .ss-cats i { height: 12px; margin-bottom: 3px; }
  .glance div { padding: 6px 0; }
  .glance dt { font-size: 26px; }
  .rubric .lede, #rubric .sec-aside .lede, #forms .sec-aside .lede { font-size: 14.5px; }
  .fq-q { font-size: 14px; margin-bottom: 4px; }
  .fq-hint { margin-bottom: 5px; }
}
