/* ValueGraph — a restrained, printed atlas of value trade-offs.
   Palette and value-group colors are taken from the paper (config/valuegraph_visuals.tex,
   analysis palette); type follows the Fell Types and Garamond. */

@font-face { font-family: 'iA Writer Mono S'; src: url(../assets/fonts/iAWriterMonoS-Regular.ttf) format('truetype'); font-weight: 400; font-display: swap; }

:root {
  --page: #FFFFFF;
  --paper: #F6F7F6;
  --paper-hi: #FFFFFF;
  --paper-lo: #EEF0EF;
  --paper-deep: #E1E5E2;
  --ink: #202A26;
  --ink-2: #3E4843;
  --muted: #69716C;
  --rule: rgba(32, 42, 38, .16);
  --rule-2: rgba(32, 42, 38, .34);

  --lav: #8264B5;
  --lav-2: #AA8DCE;
  --lav-fill: #DDD0EE;
  --lav-pale: #F0EAF8;
  --forest: #326B52;
  --green: #5B9274;
  --forest-pale: #E6F0E8;
  --yellow: #F2CE58;
  --yellow-pale: #FFF2BE;
  --ochre: #98782B;
  --wine: #A96985;
  --peach: #EBAA82;
  --olive: #B7C87C;
  --sage: #92B69F;
  --edge: #5E5577;

  --gO: #65A578;
  --gE: #D6A447;
  --gC: #D5757B;
  --gT: #4C91BD;

  --f-display: 'IM Fell English', 'EB Garamond', Georgia, serif;
  --f-mark: 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
  --f-sc: 'IM Fell English SC', 'EB Garamond', Georgia, serif;
  --f-body: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --f-mono: 'iA Writer Mono S', ui-monospace, 'SF Mono', Menlo, monospace;

  --ease: cubic-bezier(.2, .7, .1, 1);
  --gutter: clamp(16px, 4vw, 48px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 19px;
  line-height: 1.62;
  font-feature-settings: "kern", "liga", "onum";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-color: var(--rule-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--lav); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--lav); outline-offset: 2px; border-radius: 2px; }
b, strong { font-weight: 600; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.num, .mono { font-family: var(--f-mono); font-size: .82em; letter-spacing: -.01em; font-feature-settings: "tnum"; white-space: nowrap; }
.fine { font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.kicker { font-family: var(--f-sc); letter-spacing: .09em; font-size: 15px; color: var(--lav); margin: 0 0 .5em; }
.cite { font-family: var(--f-sc); font-size: 13px; letter-spacing: .08em; color: var(--muted); margin: .9em 0 0; }
.lf-label { font-family: var(--f-sc); letter-spacing: .08em; font-size: 14px; color: var(--muted); margin: 0 0 .55em; }
.math { font-style: italic; }
.hat { position: relative; display: inline-block; font-style: italic; }
.hat::before { content: "^"; position: absolute; left: .02em; top: -.42em; font-size: .72em; font-style: normal; }

/* paper grain */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 60; opacity: .32;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .13 0 0 0 0 .16 0 0 0 0 .15 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------- wordmark */
.wordmark { font-family: var(--f-mark); font-style: italic; font-weight: 600; margin: 0; letter-spacing: -.005em; line-height: 1; text-decoration: none; }
.wordmark .v { color: var(--lav); }
.wordmark .g { color: var(--forest); }
.wordmark.small { font-size: 27px; }
.wordmark.mid { font-size: 46px; margin-bottom: .3em; }
.wordmark.huge { font-weight: 600; font-size: clamp(70px, 11.6vw, 160px); letter-spacing: -.022em; line-height: .9; margin: .1em 0 .18em -.035em; }

/* ---------------------------------------------------------------- top bar */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: 58px;
  display: flex; align-items: center; gap: 28px; padding: 0 var(--gutter);
  background: rgba(255, 255, 255, .86); backdrop-filter: blur(10px) saturate(1.1); -webkit-backdrop-filter: blur(10px) saturate(1.1);
  border-bottom: 1px solid var(--rule);
  transition: transform .5s var(--ease);
}
.topbar.hide { transform: translateY(-100%); }
.chapters { display: flex; gap: 2px; margin-left: auto; }
.chapters a {
  font-family: var(--f-sc); font-size: 15px; letter-spacing: .05em; text-decoration: none; color: var(--ink-2);
  padding: 6px 10px; border-radius: 999px; transition: background .3s, color .3s; white-space: nowrap;
}
.chapters a i { font-family: var(--f-display); font-style: italic; color: var(--muted); margin-right: 5px; font-size: 14px; }
.chapters a:hover { background: var(--paper-lo); }
.chapters a.on { background: var(--ink); color: var(--paper-hi); }
.chapters a.on i { color: var(--lav-fill); }
.menu-btn { display: none; margin-left: auto; font-family: var(--f-sc); letter-spacing: .06em; background: none; border: 1px solid var(--rule-2); border-radius: 999px; padding: 4px 14px; cursor: pointer; }
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--lav), var(--forest)); }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; gap: .4em; cursor: pointer;
  font-family: var(--f-sc); font-size: 16px; letter-spacing: .05em; line-height: 1;
  padding: .72em 1.3em; border: 1px solid var(--ink); border-radius: 999px;
  background: transparent; color: var(--ink); text-decoration: none;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .3s, color .3s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--lav-fill); }
.btn.solid { background: var(--ink); color: var(--paper-hi); }
.btn.solid:hover { box-shadow: 3px 3px 0 var(--lav); }
.btn.ghost { border-color: transparent; }
.btn.ghost:hover { box-shadow: none; border-color: var(--rule-2); }
.btn.small { font-size: 14px; padding: .6em 1.05em; }
.icon-btn { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--rule-2); background: var(--paper-hi); cursor: pointer; font-size: 17px; line-height: 1; display: inline-grid; place-items: center; transition: background .3s; }
.icon-btn:hover { background: var(--paper-lo); }
.link-btn { background: none; border: 0; padding: 0; cursor: pointer; font-family: var(--f-sc); letter-spacing: .06em; font-size: 14px; color: var(--lav); text-decoration: underline; text-underline-offset: 3px; }

.seg { display: inline-flex; border: 1px solid var(--rule-2); border-radius: 999px; padding: 2px; background: var(--paper-hi); flex-wrap: wrap; }
.seg button {
  border: 0; background: transparent; cursor: pointer; border-radius: 999px; padding: 5px 13px;
  font-family: var(--f-sc); letter-spacing: .04em; font-size: 14.5px; color: var(--ink-2); transition: background .3s, color .3s;
}
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper-hi); }
select {
  appearance: none; -webkit-appearance: none; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23202A26'/%3E%3C/svg%3E") no-repeat right 2px center;
  padding: 3px 18px 3px 2px; font-family: var(--f-body); font-size: 16.5px; cursor: pointer; max-width: 100%;
}
label { font-family: var(--f-sc); letter-spacing: .05em; font-size: 14.5px; color: var(--muted); display: inline-flex; align-items: baseline; gap: 8px; }
label select { color: var(--ink); letter-spacing: 0; }

/* ---------------------------------------------------------------- hero */
.hero {
  min-height: 100vh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; gap: clamp(24px, 4vw, 72px);
  padding: 96px var(--gutter) 48px; max-width: 1480px; margin: 0 auto;
}
.eyebrow { font-family: var(--f-sc); letter-spacing: .12em; font-size: 14.5px; color: var(--muted); margin: 0; }
.hero-sub { font-family: var(--f-display); font-size: clamp(22px, 2.2vw, 31px); line-height: 1.22; margin: .2em 0 .8em; max-width: 21em; color: var(--ink); }
.hero-lede { font-size: 20.5px; line-height: 1.6; max-width: 31em; color: var(--ink-2); margin: 0 0 1.6em; }
.hero-stats { display: grid; grid-template-columns: repeat(5, auto); justify-content: start; gap: 6px 30px; margin: 0 0 2em; padding: 1.1em 0; border-top: 1px solid var(--rule-2); border-bottom: 1px solid var(--rule); }
.hero-stats div { display: flex; flex-direction: column-reverse; }
.hero-stats dt { font-family: var(--f-sc); letter-spacing: .06em; font-size: 13.5px; color: var(--muted); }
.hero-stats dd { margin: 0; font-family: var(--f-display); font-size: clamp(28px, 2.7vw, 40px); line-height: 1.05; font-feature-settings: "lnum"; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-figure { margin: 0; position: relative; }
.astrolabe { position: relative; width: 100%; max-width: 680px; margin: 0 auto; aspect-ratio: 1; }
.astrolabe svg { width: 100%; height: 100%; overflow: visible; }
.hero-figure figcaption { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; max-width: 600px; margin: 6px auto 0; align-items: center; }
.hero-model { font-family: var(--f-display); font-style: italic; font-size: 26px; line-height: 1.1; grid-column: 1; }
.hero-note { grid-column: 1 / -1; grid-row: 2; font-size: 14.5px; color: var(--muted); line-height: 1.45; }
.hero-controls { grid-column: 2; grid-row: 1; display: inline-flex; gap: 6px; }

.legend-band { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 30px; padding: 16px var(--gutter); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font-family: var(--f-sc); letter-spacing: .06em; font-size: 15px; color: var(--ink-2); }
.legend-band i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 8px; vertical-align: -1px; box-shadow: 1.5px 1.5px 0 var(--paper-deep); }

/* ---------------------------------------------------------------- chapter */
.chapter { max-width: 1200px; margin: 0 auto; padding: clamp(80px, 13vh, 150px) var(--gutter) clamp(40px, 8vh, 90px); }
.chapter.wide { max-width: 1440px; }
.chap-head { text-align: center; max-width: 820px; margin: 0 auto clamp(40px, 7vh, 80px); }
.emblem { width: 76px; height: 76px; display: block; margin: 0 auto 14px; filter: drop-shadow(3px 3px 0 var(--paper-deep)); overflow: visible; }
.emblem.small { width: 58px; height: 58px; margin: 0; flex: none; }
.chap-num { font-family: var(--f-sc); letter-spacing: .2em; font-size: 15px; color: var(--muted); margin: 0 0 .3em; }
.chap-head h2 { font-family: var(--f-display); font-weight: 400; font-size: clamp(40px, 5.4vw, 68px); line-height: 1.04; margin: 0 0 .32em; letter-spacing: -.005em; }
.dek { font-style: italic; font-size: clamp(19px, 1.7vw, 23px); color: var(--ink-2); line-height: 1.5; margin: 0 auto; max-width: 36em; }
h3 { font-family: var(--f-display); font-weight: 400; font-size: clamp(25px, 2.3vw, 32px); line-height: 1.15; margin: 0 0 .5em; }
h3.sub { font-size: clamp(26px, 2.4vw, 34px); }
.dropcap::first-letter { font-family: var(--f-display); float: left; font-size: 4.4em; line-height: .78; padding: .07em .1em 0 0; color: var(--lav); }

.ornament { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 0 var(--gutter); }
.ornament::before, .ornament::after { content: ""; height: 1px; width: min(240px, 28vw); background: var(--rule-2); }
.ornament span { width: 9px; height: 9px; transform: rotate(45deg); background: var(--ink); box-shadow: 0 0 0 4px var(--page), 0 0 0 5px var(--rule-2); }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1.1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- scrollytelling */
.scrolly { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 64px); position: relative; }
.scrolly .stage { position: sticky; top: 76px; height: calc(100vh - 100px); display: flex; align-items: center; justify-content: center; }
.scrolly .stage > svg { width: 100%; height: 100%; max-height: 640px; overflow: visible; }
.steps { position: relative; z-index: 2; padding: 20vh 0 14vh; }
.step { min-height: 78vh; display: flex; align-items: center; }
.step-card {
  background: var(--paper-hi); border: 1px solid var(--rule); border-radius: 3px; padding: 26px 30px;
  box-shadow: 6px 6px 0 var(--paper-lo); max-width: 440px;
  opacity: .28; transform: translateY(14px); transition: opacity .7s var(--ease), transform .8s var(--ease);
}
.step.is-active .step-card { opacity: 1; transform: none; }
.step-card p { margin: 0 0 .6em; }
.step-card p:last-child { margin-bottom: 0; }
.step-card.rq { border-color: var(--lav); box-shadow: 6px 6px 0 var(--lav-fill); }
.rq-text { font-family: var(--f-display); font-size: 25px; line-height: 1.32; }
.vtag { white-space: nowrap; border-bottom: 2px solid var(--c); padding-bottom: 0; }

/* ---------------------------------------------------------------- vocabulary */
.two-col { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.col-text p { margin: 0 0 1em; }
.margin-note { font-family: var(--f-sc); font-size: 13.5px; letter-spacing: .07em; color: var(--muted); border-left: 2px solid var(--lav); padding-left: 10px; }
.group-key { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 1.4em; }
.group-key button {
  text-align: left; cursor: pointer; background: var(--paper-hi); border: 1px solid var(--rule); border-left: 5px solid var(--c);
  padding: 9px 12px; font-family: var(--f-display); font-size: 18px; line-height: 1.15; border-radius: 2px; transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.group-key button small { display: block; font-family: var(--f-sc); font-size: 12.5px; letter-spacing: .06em; color: var(--muted); margin-top: 3px; }
.group-key button:hover, .group-key button.on { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--paper-deep); }
.col-figure { position: relative; }
#wheelSvg { width: 100%; height: auto; overflow: visible; }
.wheel-readout { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 40%; text-align: center; pointer-events: none; }
.wr-name { font-family: var(--f-display); font-size: clamp(18px, 2.1vw, 27px); line-height: 1.1; margin: 0 0 .35em; }
.wr-def { font-size: clamp(13px, 1.25vw, 16.5px); line-height: 1.42; color: var(--ink-2); margin: 0; font-style: italic; }
.wr-group { font-family: var(--f-sc); letter-spacing: .08em; font-size: 12.5px; margin: 0 0 .3em; }

.domains-block { margin-top: clamp(60px, 10vh, 110px); }
.block-intro { max-width: 760px; margin: 0 auto 32px; text-align: center; }
.domain-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.dtile {
  background: var(--paper-hi); border: 1px solid var(--rule); border-radius: 3px; padding: 18px 18px 16px; position: relative;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease); display: flex; flex-direction: column;
}
.dtile:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--dc-pale, var(--paper-lo)); }
.dtile svg { width: 46px; height: 46px; margin-bottom: 10px; filter: drop-shadow(2px 2px 0 var(--paper-deep)); }
.dtile h4 { font-family: var(--f-display); font-weight: 400; font-size: 20px; line-height: 1.15; margin: 0 0 .45em; color: var(--dc-ink); }
.dtile p { font-size: 14.5px; line-height: 1.45; color: var(--ink-2); margin: 0 0 14px; flex: 1; }
.dtile .dcount { display: flex; align-items: center; gap: 10px; font-family: var(--f-mono); font-size: 13px; color: var(--muted); }
.dtile .dbar { flex: 1; height: 5px; background: var(--paper-lo); border-radius: 3px; overflow: hidden; }
.dtile .dbar b { display: block; height: 100%; width: 0; background: var(--dc); transition: width 1.4s var(--ease); }
.dtile.in .dbar b { width: var(--w); }

/* ---------------------------------------------------------------- construction bench */
.build .stage { align-items: center; }
.bench {
  width: 100%; max-width: 680px; height: min(640px, calc(100vh - 120px)); background: var(--paper-hi); border: 1px solid var(--rule-2);
  border-radius: 4px; box-shadow: 8px 8px 0 var(--paper-lo); display: flex; flex-direction: column; overflow: hidden;
}
.bench-head { display: flex; gap: 18px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--rule); background: var(--paper); }
#benchRing { width: 112px; height: 112px; flex: none; overflow: visible; }
.bench-meta { min-width: 0; }
.bm-label { font-family: var(--f-sc); letter-spacing: .08em; font-size: 13.5px; color: var(--muted); margin: 0 0 4px; }
.bm-label span { color: var(--ink); }
.bm-values { margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 16px; }
.bm-values span { white-space: nowrap; }
.bm-values span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); margin-right: 6px; vertical-align: 0; }
.bm-domains { display: flex; gap: 4px; flex-wrap: wrap; }
.bm-domains span { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; border: 1px solid var(--rule); opacity: .32; transition: opacity .6s, transform .6s var(--ease), border-color .6s; background: var(--paper-hi); }
.bm-domains span svg { width: 16px; height: 16px; }
.bm-domains span.on { opacity: 1; transform: scale(1.12); border-color: var(--ink); }
.bench-body { position: relative; flex: 1; min-height: 0; }
.pane { position: absolute; inset: 0; padding: 22px 24px; overflow: hidden; opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .7s var(--ease); pointer-events: none; }
.pane.on { opacity: 1; transform: none; pointer-events: auto; }
.pane-label { font-family: var(--f-sc); letter-spacing: .08em; font-size: 13.5px; color: var(--muted); margin: 0 0 .7em; }
.pane-note { font-size: 14.5px; color: var(--muted); line-height: 1.45; margin: 1em 0 0; }
.pane-big { display: flex; align-items: baseline; gap: 18px; margin: 14px 0 22px; }
.triple-field { width: 100%; height: auto; display: block; }
.triple-field.small { margin-top: 10px; }
.field-key { display: flex; flex-wrap: wrap; gap: 4px 16px; font-family: var(--f-sc); letter-spacing: .04em; font-size: 12.5px; color: var(--muted); margin: 8px 0 0; }
.field-key i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: 0; }
.field-key i.hollow { border: 1.4px solid var(--wine); background: var(--paper-hi); }
.num-xl { font-family: var(--f-display); font-size: 96px; line-height: .9; font-feature-settings: "lnum"; color: var(--lav); }
.pane-cap { font-size: 18px; line-height: 1.35; color: var(--ink-2); }
.triad-demo { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-family: var(--f-sc); letter-spacing: .05em; font-size: 15px; color: var(--ink-2); }
.tri-dot { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--c); color: #fff; font-size: 15px; box-shadow: 2px 2px 0 var(--paper-deep); }
.tri-order { padding: 4px 12px; border: 1px solid var(--rule-2); border-radius: 999px; background: var(--paper); }
.tri-arrow { color: var(--muted); }
.domain-pick { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.domain-pick li { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--rule); border-left: 5px solid var(--dc); background: var(--paper); border-radius: 2px; transform: translateX(16px); opacity: 0; transition: transform .7s var(--ease), opacity .7s var(--ease); }
.pane.on .domain-pick li { transform: none; opacity: 1; }
.pane.on .domain-pick li:nth-child(2) { transition-delay: .12s; }
.pane.on .domain-pick li:nth-child(3) { transition-delay: .24s; }
.domain-pick svg { width: 34px; height: 34px; flex: none; }
.domain-pick .dp-name { font-family: var(--f-display); font-size: 19px; line-height: 1.15; }
.domain-pick .dp-first { font-size: 14px; color: var(--muted); line-height: 1.35; display: block; font-style: italic; }
.scenario-excerpt { font-size: 16.5px; line-height: 1.58; max-height: calc(100% - 64px); overflow: hidden; -webkit-mask-image: linear-gradient(#000 78%, transparent); mask-image: linear-gradient(#000 78%, transparent); }
.hl { padding: 0 1px; transition: background .8s, box-shadow .8s; }
.hl.actor { box-shadow: inset 0 -.38em 0 var(--lav-fill); }
.hl.goal { box-shadow: inset 0 -.38em 0 var(--yellow-pale); }
.hl.constraint { box-shadow: inset 0 -.38em 0 #F3D8DA; }
.annot-key { position: absolute; left: 24px; bottom: 16px; display: flex; gap: 14px; font-family: var(--f-sc); letter-spacing: .05em; font-size: 13.5px; }
.ak::before { content: ""; display: inline-block; width: 14px; height: 7px; margin-right: 6px; border-radius: 2px; }
.ak.actor::before { background: var(--lav-fill); }
.ak.goal::before { background: var(--yellow-pale); }
.ak.constraint::before { background: #F3D8DA; }
.build-actions { display: grid; gap: 10px; }
.bact { display: grid; grid-template-columns: 34px 1fr; gap: 0 12px; padding: 11px 14px; background: var(--paper); border: 1px solid var(--rule); border-radius: 2px; opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.pane.on .bact { opacity: 1; transform: none; }
.pane.on .bact:nth-child(2) { transition-delay: .14s; }
.pane.on .bact:nth-child(3) { transition-delay: .28s; }
.bact .let { grid-row: span 2; width: 30px; height: 30px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; font-family: var(--f-sc); font-size: 16px; box-shadow: 2px 2px 0 var(--paper-deep); }
.bact .vname { font-family: var(--f-sc); letter-spacing: .05em; font-size: 14.5px; color: var(--c-ink, var(--c)); line-height: 1.2; }
.bact .atext { font-size: 15px; line-height: 1.42; color: var(--ink-2); }
.judges { display: flex; gap: 20px; justify-content: center; margin: 4px 0 18px; }
.stamp {
  --sc: var(--forest);
  display: flex; flex-direction: column; align-items: center; padding: 8px 18px 7px; border: 2px solid var(--sc); outline: 1px solid var(--sc); outline-offset: 3px;
  border-radius: 6px; color: var(--sc); transform: rotate(var(--r)) scale(1.7); opacity: 0; transition: transform .45s cubic-bezier(.3, 1.6, .5, 1), opacity .3s; mix-blend-mode: multiply;
}
.pane.on .stamp { transform: rotate(var(--r)) scale(1); opacity: .9; }
.pane.on .stamp:nth-child(2) { transition-delay: .35s; }
.stamp-top { font-family: var(--f-sc); letter-spacing: .14em; font-size: 12px; }
.stamp-name { font-family: var(--f-display); font-size: 21px; line-height: 1.1; }
.stamp-ok { font-family: var(--f-sc); letter-spacing: .2em; font-size: 13px; border-top: 1px solid var(--sc); margin-top: 3px; padding-top: 2px; }
.rubric { display: grid; grid-template-columns: 1fr 1fr 1.05fr; gap: 16px; }
.rubric ul { margin: 0; padding: 0; list-style: none; font-size: 14.5px; line-height: 1.5; }
.rubric li::before { content: "\2713"; color: var(--forest); margin-right: 7px; font-size: 12px; }
#tensionSvg { width: 100%; height: auto; overflow: visible; }
.funnel { display: grid; gap: 6px; margin-bottom: 18px; }
.p5-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 22px; }
.f-row { display: grid; grid-template-columns: 74px 1fr; gap: 2px 14px; align-items: center; }
.f-num { font-family: var(--f-display); font-size: 24px; line-height: 1; font-feature-settings: "lnum"; }
.f-bar { height: 14px; background: var(--paper-lo); border-radius: 2px; position: relative; overflow: hidden; }
.f-bar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 0; background: var(--ink-2); transition: width 1.2s var(--ease); }
.f-bar.accent::after { background: var(--lav); }
.pane.on .f-bar::after { width: var(--w); }
.f-cap { grid-column: 2; font-size: 14px; color: var(--muted); line-height: 1.3; }
.rounds { display: grid; gap: 6px; font-size: 14.5px; }
.rounds div { display: grid; grid-template-columns: 58px 1fr 84px; gap: 10px; align-items: center; }
.rounds span { font-family: var(--f-sc); letter-spacing: .05em; color: var(--muted); }
.rounds b { height: 8px; background: var(--forest); width: 0; border-radius: 2px; transition: width 1.2s var(--ease); }
.pane.on .rounds b { width: var(--w); }
.rounds em { font-style: normal; font-family: var(--f-mono); font-size: 12.5px; color: var(--ink-2); }
.hv { display: grid; gap: 10px; }
.hv > div { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 58px; gap: 14px; align-items: center; font-size: 15.5px; }
.hv-sep { border-top: 1px dashed var(--rule-2); padding-top: 10px; }
.hv-bar { height: 10px; background: var(--paper-lo); border-radius: 2px; overflow: hidden; }
.hv-bar b { display: block; height: 100%; width: 0; background: var(--ochre); transition: width 1.3s var(--ease); }
.hv-bar b.alt { background: var(--lav); }
.pane.on .hv-bar b { width: var(--w); }
.hv-v { font-family: var(--f-mono); font-size: 13.5px; text-align: right; }
.kappa { display: flex; align-items: baseline; gap: 14px; margin: 18px 0 0; font-size: 16px; line-height: 1.4; color: var(--ink-2); }
.kappa .num-xl { font-size: 58px; color: var(--forest); }

/* ---------------------------------------------------------------- plates */
.plate { margin: clamp(56px, 9vh, 100px) auto 0; max-width: 1080px; }
.plate-frame { background: #fff; padding: clamp(10px, 2vw, 24px); border: 1px solid var(--rule-2); box-shadow: 9px 9px 0 var(--paper-lo); position: relative; }
.plate-frame::before { content: ""; position: absolute; inset: 5px; border: 1px solid var(--rule); pointer-events: none; }
.plate figcaption { font-size: 15.5px; line-height: 1.5; color: var(--ink-2); margin: 18px auto 0; max-width: 820px; }
.plate-no { font-family: var(--f-sc); letter-spacing: .12em; font-size: 14px; color: var(--lav); margin-right: .6em; }

/* ---------------------------------------------------------------- library */
.lib { display: grid; grid-template-columns: 270px 320px minmax(0, 1fr); gap: 0; border: 1px solid var(--rule-2); background: var(--paper-hi); border-radius: 4px; box-shadow: 9px 9px 0 var(--paper-lo); height: min(880px, calc(100vh - 110px)); min-height: 620px; overflow: hidden; }
.lib > * { min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--paper-deep) transparent; }
.lib-filters { padding: 18px 18px 22px; border-right: 1px solid var(--rule); background: var(--paper); }
.lf-block { margin-bottom: 20px; }
#libRing { width: 100%; height: auto; overflow: visible; display: block; }
.lf-sel { font-size: 15px; margin: 4px 0 0; min-height: 1.5em; line-height: 1.35; }
.lf-sel button { background: none; border: 0; color: var(--lav); cursor: pointer; font-family: var(--f-sc); letter-spacing: .05em; font-size: 13.5px; padding: 0; margin-left: 4px; }
.lf-domains { display: flex; flex-wrap: wrap; gap: 6px; }
.lf-domains button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--rule); background: var(--paper-hi); cursor: pointer; display: grid; place-items: center; transition: transform .3s var(--ease), border-color .3s, box-shadow .3s, opacity .3s; padding: 0; }
.lf-domains button svg { width: 26px; height: 26px; }
.lf-domains button[aria-pressed="true"] { border-color: var(--ink); box-shadow: 2px 2px 0 var(--dc); transform: translate(-1px, -1px); }
.lf-domains.any-on button[aria-pressed="false"] { opacity: .45; }
#libSearch { width: 100%; border: 0; border-bottom: 1px solid var(--ink); background: transparent; padding: 6px 2px; font-size: 16.5px; }
#libSearch:focus { outline: none; border-bottom-color: var(--lav); }
.lf-block .seg { margin-bottom: 12px; display: flex; width: 100%; flex-wrap: nowrap; }
.lf-block .seg button { padding: 4px 6px; font-size: 12.5px; flex: 1; white-space: nowrap; }
.lib-list { border-right: 1px solid var(--rule); padding: 0 0 18px; }
.lib-count { position: sticky; top: 0; z-index: 2; margin: 0; padding: 14px 18px 10px; background: rgba(255, 255, 255, .95); backdrop-filter: blur(6px); border-bottom: 1px solid var(--rule); font-family: var(--f-sc); letter-spacing: .06em; font-size: 14px; color: var(--muted); }
.lib-items { list-style: none; margin: 0; padding: 0; }
.lib-items li { border-bottom: 1px solid var(--rule); }
.lib-items button { display: grid; grid-template-columns: 6px 1fr; gap: 0 12px; width: 100%; text-align: left; border: 0; background: none; padding: 12px 16px 12px 0; cursor: pointer; transition: background .25s; }
.lib-items button:hover { background: var(--paper); }
.lib-items button[aria-current="true"] { background: var(--lav-pale); }
.lib-items .band { grid-row: span 2; background: var(--dc); border-radius: 0 2px 2px 0; }
.li-top { display: flex; align-items: center; gap: 6px; font-family: var(--f-sc); letter-spacing: .04em; font-size: 12.5px; color: var(--muted); }
.li-top .dots { display: inline-flex; gap: 3px; margin-right: 2px; }
.li-top .dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.li-top .spread { margin-left: auto; font-family: var(--f-mono); font-size: 11.5px; }
.li-text { font-size: 15px; line-height: 1.38; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 3px; }
#libMore { margin: 14px auto 0; display: block; }
#libMore[hidden] { display: none; }

.folio { padding: 0 0 40px; position: relative; }
.folio-loading { padding: 60px 32px; color: var(--muted); font-style: italic; }
.fo-head { position: sticky; top: 0; z-index: 3; background: rgba(255, 255, 255, .95); backdrop-filter: blur(6px); border-top: 6px solid var(--dc); border-bottom: 1px solid var(--rule); padding: 14px 28px 12px; display: flex; gap: 14px; align-items: center; }
.fo-head svg { width: 40px; height: 40px; flex: none; }
.fo-dom { font-family: var(--f-display); font-size: 22px; line-height: 1.1; margin: 0; }
.fo-sub { font-family: var(--f-sc); letter-spacing: .06em; font-size: 13px; color: var(--muted); margin: 2px 0 0; }
.fo-tabs { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.fo-tabs .lf-label { margin: 0 4px 0 0; font-size: 12.5px; }
.fo-tabs button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--rule); background: var(--paper-hi); cursor: pointer; display: grid; place-items: center; padding: 0; transition: border-color .3s, box-shadow .3s; }
.fo-tabs button svg { width: 24px; height: 24px; }
.fo-tabs button[aria-current="true"] { border-color: var(--ink); box-shadow: 2px 2px 0 var(--dc); }
.fo-body { padding: 22px 28px 0; }
.fo-sec { margin: 0 0 26px; }
.fo-scenario { font-size: 17.5px; line-height: 1.64; margin: 0; }
.fo-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.fo-actions { display: grid; gap: 10px; }
.fo-act { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 2px 12px; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 2px; background: var(--paper); }
.fo-act .let { grid-row: span 2; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-sc); font-size: 16px; color: var(--ink); background: var(--paper-hi); border: 1px solid var(--rule-2); transition: background .6s, color .6s, border-color .6s; }
.fo-act .vline { font-family: var(--f-sc); letter-spacing: .05em; font-size: 14px; line-height: 1.2; color: var(--c); max-height: 0; opacity: 0; overflow: hidden; transition: max-height .6s var(--ease), opacity .6s; }
.fo-act .atext { font-size: 15.5px; line-height: 1.48; color: var(--ink-2); }
.folio.revealed .fo-act .let { background: var(--c); color: #fff; border-color: var(--c); }
.folio.revealed .fo-act .vline { max-height: 2.4em; opacity: 1; margin-bottom: 2px; }
.fo-split { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 22px; align-items: start; }
.fo-tri svg { width: 100%; height: auto; overflow: visible; }
.resp-bars { display: grid; gap: 9px; margin-bottom: 14px; }
.rb { display: grid; grid-template-columns: 22px minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: center; font-size: 14px; }
.rb .rb-l { font-family: var(--f-sc); font-size: 15px; text-align: center; }
.rb .rb-bar { height: 12px; display: flex; gap: 2px; }
.rb .rb-bar i { flex: 1; border-radius: 1px; background: var(--paper-lo); }
.rb .rb-bar.most i.on { background: var(--forest); }
.rb .rb-bar.least i.on { background: var(--wine); }
.rb-head { font-family: var(--f-sc); letter-spacing: .06em; font-size: 12.5px; color: var(--muted); }
.orders { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0 0; padding: 0; list-style: none; font-size: 15px; }
.orders li { white-space: nowrap; }
.orders b { font-family: var(--f-mono); font-weight: 400; font-size: 12px; color: var(--muted); margin-left: 4px; }
.model-cells { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px; margin-top: 12px; }
.mc { display: flex; justify-content: space-between; gap: 8px; padding: 5px 9px; border: 1px solid var(--rule); border-radius: 2px; font-size: 13.5px; background: var(--paper); transition: background .25s; }
.mc .mo { font-family: var(--f-mono); font-size: 12px; letter-spacing: .02em; white-space: nowrap; }
.mc.hl-o { background: var(--lav-pale); border-color: var(--lav-2); }
.mc.missing { opacity: .45; }
.feeds { display: grid; gap: 8px; }
.feed { display: grid; grid-template-columns: minmax(0, 1fr) 140px auto; gap: 12px; align-items: center; font-size: 15px; padding: 8px 0; border-bottom: 1px dashed var(--rule); }
.feed .fbar { height: 10px; border-radius: 2px; overflow: hidden; display: flex; background: var(--paper-lo); }
.feed .fbar b { display: block; height: 100%; }
.feed .fnum { font-family: var(--f-mono); font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.feed button { white-space: nowrap; }
.fo-meta { font-size: 14px; color: var(--muted); line-height: 1.5; border-top: 1px solid var(--rule); padding-top: 12px; }

/* ---------------------------------------------------------------- measurement */
.your-turn { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 0; border: 1px solid var(--rule-2); border-radius: 4px; background: var(--paper-hi); box-shadow: 9px 9px 0 var(--paper-lo); overflow: hidden; }
.yt-prompt { background: var(--paper); border-right: 1px solid var(--rule); padding: 24px; }
.prompt { font-family: var(--f-mono); font-size: 12.5px; line-height: 1.6; white-space: pre-wrap; margin: 0 0 12px; color: var(--ink-2); background: var(--paper-hi); border: 1px solid var(--rule); border-left: 3px solid var(--lav); padding: 14px 16px; border-radius: 2px; }
.yt-task { padding: 26px 30px 30px; }
.yt-scenario { font-size: 17px; line-height: 1.6; max-height: 9.6em; overflow: hidden; position: relative; transition: max-height .8s var(--ease); -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.yt-scenario.open { max-height: 80em; -webkit-mask-image: none; mask-image: none; }
.yt-actions { display: grid; gap: 10px; margin-top: 18px; }
.yt-act { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 2px; background: var(--paper); transition: border-color .3s, background .3s, box-shadow .3s; }
.yt-act.most { border-color: var(--forest); box-shadow: inset 4px 0 0 var(--forest); }
.yt-act.least { border-color: var(--wine); box-shadow: inset 4px 0 0 var(--wine); }
.yt-act .let { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-sc); background: var(--paper-hi); border: 1px solid var(--rule-2); transition: background .6s, color .6s; }
.yt-act .vline { font-family: var(--f-sc); letter-spacing: .05em; font-size: 14px; color: var(--c); display: none; }
.your-turn.done .yt-act .let { background: var(--c); color: #fff; border-color: var(--c); }
.your-turn.done .yt-act .vline { display: block; }
.yt-act p { margin: 0; font-size: 15.5px; line-height: 1.47; color: var(--ink-2); }
.yt-pick { display: flex; flex-direction: column; gap: 5px; }
.yt-pick button { border: 1px solid var(--rule-2); background: var(--paper-hi); border-radius: 999px; padding: 3px 12px; cursor: pointer; font-family: var(--f-sc); letter-spacing: .05em; font-size: 13.5px; transition: background .25s, color .25s; }
.yt-pick button.m[aria-pressed="true"] { background: var(--forest); color: #fff; border-color: var(--forest); }
.yt-pick button.l[aria-pressed="true"] { background: var(--wine); color: #fff; border-color: var(--wine); }
.yt-pick button:disabled { opacity: .45; cursor: default; }
.yt-hint { font-size: 15px; color: var(--muted); margin: 14px 0 0; }
.yt-result { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--rule-2); display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; animation: rise .9s var(--ease); }
.yt-result[hidden] { display: none; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.yt-result svg { width: 100%; height: auto; overflow: visible; }
.yt-result p { margin: 0 0 .7em; font-size: 16.5px; }
.measure-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: clamp(50px, 8vh, 90px); }
.m-card { min-width: 0; background: var(--paper-hi); border: 1px solid var(--rule); border-radius: 3px; padding: 26px 28px; }
.m-card p { margin: 0 0 .7em; }
.formula { font-family: var(--f-body); font-style: italic; font-size: 22px; text-align: center; padding: 14px 10px; margin: 6px 0 16px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: linear-gradient(var(--lav-pale), var(--lav-pale)) no-repeat; background-size: 100% 100%; line-height: 1.5; overflow-x: auto; white-space: nowrap; }
.formula.small { font-size: 18px; }
.formula sub, .formula sup { font-size: .62em; }
.seesaw-block { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 36px; align-items: center; margin-top: clamp(50px, 8vh, 90px); }
.seesaw-copy p { margin: 0 0 1em; }
.slider { display: grid; gap: 8px; width: 100%; margin: 6px 0 14px; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 3px; background: var(--ink); border-radius: 2px; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--yellow); border: 1.6px solid var(--ink); box-shadow: 2px 2px 0 var(--paper-deep); cursor: grab; }
input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--yellow); border: 1.6px solid var(--ink); cursor: grab; }
.seesaw-read { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 2px 28px; margin: 0; }
.seesaw-read div { display: flex; flex-direction: column-reverse; }
.seesaw-read dt { font-family: var(--f-sc); letter-spacing: .06em; font-size: 13px; color: var(--muted); }
.seesaw-read dd { margin: 0; font-family: var(--f-mono); font-size: 20px; }
#seesawSvg { width: 100%; height: auto; overflow: visible; }
.robust { margin-top: clamp(56px, 9vh, 100px); background: var(--paper-hi); border: 1px solid var(--rule-2); border-radius: 4px; box-shadow: 9px 9px 0 var(--paper-lo); padding: 28px 30px; }
.robust-head { display: flex; gap: 22px; align-items: flex-start; max-width: 900px; }
.robust-head p { margin: 0 0 .7em; }
.robust-controls { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; margin: 18px 0 8px; padding-top: 18px; border-top: 1px solid var(--rule); }
#robustSvg { width: 100%; height: auto; overflow: visible; }
.robust-verdict { font-size: 17.5px; margin: 6px 0 0; }
.robust-verdict b.ok { color: var(--forest); }
.robust-verdict b.no { color: var(--wine); }

/* ---------------------------------------------------------------- atlas */
.atlas-controls { display: grid; gap: 14px; margin-bottom: 18px; }
.model-picker { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; }
.mp-group { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 3px 0; }
.mp-group > span { font-family: var(--f-sc); letter-spacing: .07em; font-size: 12.5px; color: var(--muted); margin-right: 3px; }
.mp-group button { border: 1px solid var(--rule); background: var(--paper-hi); border-radius: 999px; padding: 3px 11px; font-size: 14.5px; cursor: pointer; transition: background .25s, color .25s, border-color .25s; white-space: nowrap; }
.mp-group button:hover { border-color: var(--ink); }
.mp-group button.on { background: var(--ink); color: var(--paper-hi); border-color: var(--ink); }
.mp-group button.on-b { background: var(--lav); color: #fff; border-color: var(--lav); }
.atlas-opts { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 26px; }
.toggle input { accent-color: var(--lav); }
.atlas { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 26px; align-items: start; }
.atlas-graphs { display: grid; grid-template-columns: 1fr; gap: 10px; }
.atlas.comparing .atlas-graphs { grid-template-columns: 1fr 1fr; }
.compare-only { display: none; }
.atlas.comparing .compare-only { display: block; }
.atlas-fig { margin: 0; background: var(--paper-hi); border: 1px solid var(--rule); border-radius: 4px; padding: 8px 8px 4px; }
.atlas-fig svg { width: 100%; height: auto; max-height: calc(100vh - 300px); min-height: 320px; overflow: visible; display: block; margin: 0 auto; }
.atlas-title { text-align: center; font-family: var(--f-display); font-style: italic; font-size: 24px; padding-top: 6px; }
.atlas-title small { display: block; font-family: var(--f-sc); font-style: normal; letter-spacing: .06em; font-size: 13px; color: var(--muted); }
.inspector { position: sticky; top: 80px; background: var(--paper-hi); border: 1px solid var(--rule-2); border-radius: 4px; box-shadow: 7px 7px 0 var(--paper-lo); padding: 20px 22px; max-height: calc(100vh - 100px); overflow-y: auto; }
.inspector h4 { font-family: var(--f-display); font-weight: 400; font-size: 23px; line-height: 1.15; margin: 0 0 .4em; }
.inspector p { font-size: 15.5px; margin: 0 0 .7em; line-height: 1.5; }
.ins-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.ins-stats div { background: var(--paper); border: 1px solid var(--rule); padding: 8px 10px; border-radius: 2px; }
.ins-stats dt { font-family: var(--f-sc); letter-spacing: .05em; font-size: 12px; color: var(--muted); }
.ins-stats dd { margin: 0; font-family: var(--f-mono); font-size: 17px; }
.ins-sub { font-family: var(--f-sc); letter-spacing: .07em; font-size: 13px; color: var(--muted); margin: 16px 0 6px; }
.ins-list { list-style: none; padding: 0; margin: 0; font-size: 14.5px; }
.ins-list li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px dashed var(--rule); cursor: pointer; }
.ins-list li:hover { color: var(--lav); }
.ins-list .mono { color: var(--muted); }
.inspector svg { width: 100%; height: auto; overflow: visible; }
.atlas-key { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 26px; margin: 16px 0 0; font-family: var(--f-sc); letter-spacing: .05em; font-size: 13.5px; color: var(--muted); }
.atlas-key svg { width: 40px; height: 14px; vertical-align: -2px; margin-right: 6px; }
.validity { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: center; margin-top: clamp(64px, 10vh, 120px); }
.validity-copy p { margin: 0 0 1em; }
.heat-wrap svg { width: 100%; height: auto; overflow: visible; }
.heat-read { text-align: center; font-size: 16px; min-height: 1.6em; margin: 6px 0 0; }
.protocols { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: 48px; align-items: center; margin-top: clamp(56px, 9vh, 100px); }
.protocols p { margin: 0 0 1em; }
table.rho { border-collapse: collapse; width: 100%; font-size: 16px; border-top: 1.6px solid var(--ink); border-bottom: 1.6px solid var(--ink); }
table.rho caption { caption-side: top; text-align: left; font-family: var(--f-sc); letter-spacing: .06em; font-size: 13.5px; color: var(--muted); padding-bottom: 8px; }
table.rho th { font-weight: 400; font-family: var(--f-sc); letter-spacing: .04em; font-size: 15px; padding: 8px 6px; border-bottom: .8px solid var(--ink); text-align: center; vertical-align: bottom; line-height: 1.1; }
table.rho th small { display: block; font-family: var(--f-body); font-size: 12.5px; letter-spacing: 0; color: var(--muted); font-style: italic; margin-top: 3px; }
table.rho th:first-child, table.rho td:first-child { text-align: left; }
table.rho td { padding: 7px 6px; text-align: center; font-family: var(--f-mono); font-size: 14px; }
table.rho td:first-child { font-family: var(--f-body); font-size: 16px; }
table.rho td.max { font-weight: 700; background: var(--forest-pale); }

/* ---------------------------------------------------------------- findings */
.finding { padding-top: clamp(40px, 7vh, 80px); }
.finding + .finding { margin-top: clamp(50px, 8vh, 100px); border-top: 1px solid var(--rule); }
.finding-head { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 20px; max-width: 980px; margin: 0 auto 30px; }
.finding-head p { margin: 0; color: var(--ink-2); }
.f-index { font-family: var(--f-display); font-style: italic; font-size: 104px; line-height: .8; color: var(--lav); text-shadow: 3px 3px 0 var(--paper-deep); }
.f1, .f2, .f3 { background: var(--paper-hi); border: 1px solid var(--rule-2); border-radius: 4px; box-shadow: 9px 9px 0 var(--paper-lo); padding: 24px 26px; }
.f1-controls, .f3-controls { display: flex; flex-wrap: wrap; gap: 12px 30px; margin-bottom: 10px; }
.f1-body { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 28px; align-items: start; }
#bumpSvg { width: 100%; height: auto; overflow: visible; }
.f1-gaps ol { list-style: none; padding: 0; margin: 0 0 12px; counter-reset: g; }
.gap-row { padding: 10px 0 12px; border-bottom: 1px dashed var(--rule); cursor: pointer; }
.gap-row:hover .gap-name { color: var(--lav); }
.gap-name { font-size: 16px; line-height: 1.3; margin-bottom: 6px; }
.gap-name em { font-style: normal; color: var(--muted); }
.gap-row svg { width: 100%; height: 30px; overflow: visible; display: block; }
#f1Rho { font-family: var(--f-mono); color: var(--ink); margin-left: 6px; letter-spacing: 0; }
#boundarySvg { width: 100%; height: auto; overflow: visible; }
.f2-read { min-height: 3.2em; text-align: center; font-size: 16.5px; max-width: 760px; margin: 6px auto 0; }
.f3 { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 4fr); gap: 36px; }
#domainSvg, #shiftSvg { width: 100%; height: auto; overflow: visible; }
.f3-copy { font-size: 15.5px; line-height: 1.5; color: var(--ink-2); margin: 0 0 8px; }

/* ---------------------------------------------------------------- alignment */
.two-up { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.two-up p { margin: 0; }
.steer { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: 40px; align-items: center; margin-top: clamp(50px, 8vh, 90px); background: var(--paper-hi); border: 1px solid var(--rule-2); border-radius: 4px; box-shadow: 9px 9px 0 var(--paper-lo); padding: 28px 30px; }
.steer-copy p { margin: 0 0 1em; }
#steerSvg { width: 100%; height: auto; overflow: visible; }
.closing { margin: clamp(70px, 12vh, 140px) auto 0; max-width: 900px; text-align: center; position: relative; padding: 0 20px; }
.closing p { font-family: var(--f-display); font-style: italic; font-size: clamp(28px, 3.4vw, 44px); line-height: 1.22; margin: 0 0 .5em; }
.closing p::before { content: "\201C"; display: block; font-size: 2.6em; line-height: .6; color: var(--lav); font-style: normal; margin-bottom: .1em; }
.closing footer { font-family: var(--f-sc); letter-spacing: .12em; font-size: 14px; color: var(--muted); }

/* ---------------------------------------------------------------- colophon */
.colophon { margin-top: clamp(80px, 14vh, 160px); background: var(--paper); border-top: 1px solid var(--rule-2); padding: 56px var(--gutter) 70px; }
.colo-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 40px; }
.colo-grid p { margin: 0 0 1em; font-size: 16px; }
.bib { font-family: var(--f-mono); font-size: 12px; line-height: 1.6; background: var(--paper-hi); border: 1px solid var(--rule); padding: 14px 16px; margin: 0; overflow-x: auto; white-space: pre; }

/* ---------------------------------------------------------------- svg text */
.svg-label { font-family: var(--f-body); fill: var(--ink); }
.ml { white-space: nowrap; }
.mi { display: inline-block; width: 1.05em; height: 1.05em; vertical-align: -.17em; margin-right: .32em; flex: none; overflow: visible; }
.stamp .mi { width: .95em; height: .95em; vertical-align: -.1em; margin-right: .28em; }
.sel-ic { width: 18px; height: 18px; vertical-align: -3px; margin: 0 -2px 0 2px; align-self: center; }
.f1-legend { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 15px; margin: 0 0 6px; }
.f1-legend > span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); margin-right: 6px; vertical-align: 1px; }
.svg-sc { font-family: var(--f-sc); letter-spacing: .06em; fill: var(--muted); }
.svg-mono { font-family: var(--f-mono); fill: var(--ink); }
.svg-display { font-family: var(--f-display); fill: var(--ink); }
.vnode { cursor: pointer; }
.vnode circle.dot { transition: r .8s var(--ease), stroke-width .3s; }
.vlabel { font-family: var(--f-body); font-size: 15px; fill: var(--ink); transition: opacity .4s; pointer-events: none; }
.edge { transition: opacity .5s; }
.dim .edge:not(.hot) { opacity: .06 !important; }
.dim .vnode:not(.hot) { opacity: .35; }
.dim .vlabel:not(.hot) { opacity: .35; }

/* Icons beside model names keep their text size inside any figure container. */
svg.mi.mi { width: 1.05em !important; height: 1.05em !important; max-height: none !important; min-height: 0 !important; display: inline-block !important; margin: 0 .32em 0 0 !important; filter: none !important; }
svg.mi.sel-ic { width: 18px !important; height: 18px !important; margin: 0 -2px 0 2px !important; }
.stamp svg.mi.mi { width: .95em !important; height: .95em !important; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1240px) {
  .chapters a { padding: 6px 7px; font-size: 14px; }
  .chapters a i { display: none; }
  .lib { grid-template-columns: 240px 280px minmax(0, 1fr); }
  .atlas { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 1080px) {
  .chapters { display: none; position: absolute; top: 58px; right: var(--gutter); flex-direction: column; background: var(--paper-hi); border: 1px solid var(--rule-2); border-radius: 6px; padding: 8px; box-shadow: 6px 6px 0 var(--paper-lo); }
  .chapters a i { display: inline; }
  .topbar.open .chapters { display: flex; }
  .menu-btn { display: inline-block; }
  .hero { grid-template-columns: 1fr; padding-top: 88px; min-height: auto; }
  .hero-figure { max-width: 560px; margin: 0 auto; width: 100%; }
  .lib { grid-template-columns: minmax(0, 1fr); height: auto; min-height: 0; }
  .lib > * { overflow: visible; }
  .lib-filters { border-right: 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 220px 1fr; gap: 0 24px; }
  .lib-filters .lf-block:first-child { grid-row: span 3; }
  .lib-list { border-right: 0; max-height: 46vh; overflow-y: auto; border-bottom: 1px solid var(--rule); }
  .atlas { grid-template-columns: minmax(0, 1fr); }
  .inspector { position: static; max-height: none; }
  .validity, .protocols, .f3, .steer, .seesaw-block, .two-col { grid-template-columns: minmax(0, 1fr); }
  .f1-body { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  body { font-size: 18px; }
  .scrolly { grid-template-columns: minmax(0, 1fr); }
  .scrolly .stage { top: 58px; height: 54vh; z-index: 0; }
  .build .stage { height: 64vh; }
  .bench { height: 100%; }
  .steps { margin-top: -10vh; padding: 0 0 20vh; }
  .step { min-height: 100vh; align-items: flex-end; padding-bottom: 4vh; }
  .step-card { max-width: none; width: 100%; opacity: 1; box-shadow: 5px 5px 0 var(--paper-lo); }
  .step:not(.is-active) .step-card { opacity: .9; }
  .domain-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .your-turn { grid-template-columns: minmax(0, 1fr); }
  .yt-prompt { border-right: 0; border-bottom: 1px solid var(--rule); }
  .yt-result { grid-template-columns: minmax(0, 1fr); }
  .yt-result svg { max-width: 260px; }
  .measure-grid, .two-up { grid-template-columns: minmax(0, 1fr); }
  .rubric { grid-template-columns: 1fr 1fr; }
  .tension-mini { display: none; }
  .fo-split { grid-template-columns: minmax(0, 1fr); }
  .fo-split .fo-tri { max-width: 220px; }
  .colo-grid { grid-template-columns: minmax(0, 1fr); }
  .atlas.comparing .atlas-graphs { grid-template-columns: minmax(0, 1fr); }
  label { flex-wrap: wrap; max-width: 100%; }
  label select { min-width: 0; width: 100%; }
}
@media (max-width: 640px) {
  body { font-size: 17.5px; }
  .hero-stats { grid-template-columns: repeat(3, auto); gap: 10px 24px; }
  .hero-lede { font-size: 18.5px; }
  .domain-grid { grid-template-columns: minmax(0, 1fr); }
  .lib-filters { grid-template-columns: minmax(0, 1fr); }
  .lib-filters .lf-block:first-child { grid-row: auto; }
  #libRing { max-width: 260px; margin: 0 auto; }
  .fo-head { padding: 12px 16px; flex-wrap: wrap; }
  .fo-tabs { margin-left: 0; }
  .fo-body { padding: 18px 16px 0; }
  .feed { grid-template-columns: 1fr; gap: 4px; }
  .finding-head { grid-template-columns: 1fr; }
  .f-index { font-size: 72px; }
  .f1, .f2, .f3, .robust, .steer { padding: 18px 16px; }
  .robust-head { flex-direction: column; }
  .bench-head { padding: 10px 12px; gap: 10px; }
  #benchRing { width: 76px; height: 76px; }
  .pane { padding: 14px 14px; }
  .num-xl { font-size: 68px; }
  .rubric { grid-template-columns: 1fr; gap: 6px; }
  .rubric > div:nth-child(2) { display: none; }
  .judges { margin-bottom: 10px; }
  .rounds div { grid-template-columns: 56px 1fr 80px; }
  .p5-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .p5-grid > div:last-child { display: none; }
  .hv > div { grid-template-columns: 1fr 70px 52px; font-size: 14px; }
  .seesaw-read { grid-template-columns: repeat(2, auto); }
  .ins-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .yt-task { padding: 18px 16px 22px; }
  .yt-act { grid-template-columns: 30px minmax(0, 1fr); }
  .yt-pick { grid-column: 1 / -1; flex-direction: row; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
