/* Reading layout */
:root {
  color-scheme: light;
  --paper: var(--site-bg);
  --ink: var(--site-ink);
  --muted: var(--site-muted);
  --line: var(--site-rule);
  --purple: var(--site-accent);
  --teal: var(--site-teal);
  --tint: var(--site-wash);
  --sans: var(--site-sans);
  --serif: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.67 var(--sans); }
a { color: var(--purple); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration: underline; }
:is(a, button, select, summary, [tabindex]):focus-visible { outline: 3px solid var(--site-accent); outline-offset: 3px; }
button, select, summary { cursor: pointer; }
button, select { font: 500 13px/1.4 var(--sans); }
[hidden] { display: none !important; }
.skip { position: absolute; left: 12px; top: -100px; z-index: 3; background: white; padding: 8px; }
.skip:focus { top: 8px; }
.reading-grid { display: grid; grid-template-columns: minmax(188px, 232px) minmax(0, 816px) minmax(0, 1fr); gap: clamp(28px,4vw,64px); max-width: 1600px; margin: auto; padding: 42px clamp(20px,2vw,36px) 80px; align-items: start; }
.contents { position: sticky; top: 24px; }
.contents nav { border-left: 1px solid #d8d1d7; }
.contents a { display: flex; gap: 11px; align-items: baseline; padding: 5px 0 5px 16px; font: 500 13px/1.4 var(--sans); color: var(--muted); text-decoration: none; border-left: 2px solid transparent; margin-left: -1px; }
.contents a small { font-size: 11px; color: #79727c; font-variant-numeric: tabular-nums; }
.contents a.contents-title { color: var(--ink); font-weight: 700; padding-bottom: 11px; }
.contents a[aria-current="location"], .contents a:hover { color: var(--purple); border-color: var(--purple); }
.prose { min-width: 0; }
.prose h1, .prose h2, .prose h3, .prose h4, .prose p, figure { margin: 0; }
.prose p+p, .prose figure+p, .prose .table-scroll+p { margin-top: 14px; }
.kicker, .fig-number { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--purple); }
.kicker span { padding: 0 5px; color: #a39aa7; }
.prose h1 { font: 500 clamp(40px,4.3vw,60px)/1.1 var(--serif); letter-spacing: -.055em; margin: 11px 0 0; color: #100e11; }
.prose .byline { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin: 14px 0 25px; font-size: 13px; color: var(--muted); }
.byline a { color: inherit; font-weight: 650; }
.abstract { font-size: clamp(18px,1.55vw,21px); line-height: 1.48; letter-spacing: -.02em; }
.stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; margin: 24px 0 0; }
.stats>div { padding: 13px 14px 14px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.stats b, .study-flow b, .policy-outcomes strong { display: block; font: 500 30px/1.15 var(--serif); letter-spacing: -.045em; color: #282130; }
.stats span, .study-flow span, .policy-outcomes span { display: block; font-size: 12px; line-height: 1.4; color: var(--muted); margin-top: 3px; }
.prose section { margin-top: 38px; padding-top: 26px; border-top: 1px solid var(--line); }
.prose h2 { font-size: clamp(22px,2.15vw,28px); line-height: 1.22; font-weight: 640; letter-spacing: -.038em; margin-bottom: 15px; text-wrap: balance; }
.secnum { font-size: .7em; line-height: 1; color: var(--purple); margin-right: 6px; font-variant-numeric: tabular-nums; }
.prose h3 { font-size: 19px; line-height: 1.3; font-weight: 625; letter-spacing: -.022em; margin: 23px 0 8px; }
.lenses { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; margin: 17px 0; }
.lenses>div { border-top: 2px solid #ad94c4; padding-top: 10px; }
.lenses>div+div { border-color: #7ea9a1; }
.lenses h3 { margin: 0 0 6px; font-size: 17px; }
.lenses p { font-size: 15px; line-height: 1.55; }
.lenses a, .source-line, .sources { font-size: 13px; }
.lenses a { display: inline-block; margin-top: 7px; }
.decision-reader { margin: 20px 0; padding: 16px 20px; background: white; border: 1px solid var(--line); border-radius: 10px; }
.decision-reader h3 { margin: 0 0 12px; font-size: 17px; }
.decision-inputs { display: grid; grid-template-columns: 1.1fr 1fr; gap: 12px; }
.decision-inputs label, .decision-output a { font-size: 13px; }
.decision-inputs label { display: grid; gap: 4px; color: var(--muted); }
.decision-output { border-left: 2px solid #b5a1ca; padding-left: 13px; margin-top: 15px; font-size: 14px; }
.decision-output strong { font-size: 16px; }
.decision-output p { margin: 4px 0; }
@media(max-width:540px) { .decision-inputs { grid-template-columns: 1fr; } }
.source-line { color: var(--muted); }
.source-line a+a { margin-left: 10px; }
.sources { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 14px 0 0; list-style: none; }
/* Report figures and controls */
.plate, .experiment, .trajectory, .policy { background: white; border: 1px solid var(--line); border-radius: 12px; padding: clamp(15px,2.1vw,24px); margin: 22px 0; min-width: 0; }
.prose figure h3 { margin: 0; font-size: 19px; }
.prose .fig-number { margin: 0 0 5px; }
.figure-deck, .figure-header>span, .plot-heading p, .control-label, .comparison-plot p { color: var(--muted); font-size: 13px; }
.figure-header { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; align-items: baseline; }
figcaption { font-size: 13px; line-height: 1.55; color: var(--muted); border-top: 1px solid #e8e4e6; margin-top: 13px; padding-top: 11px; }
.legend { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; font-size: 12px; font-weight: 600; margin: 10px 0; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot, .square { display: inline-block; width: 9px; height: 9px; background: var(--purple); border-radius: 50%; }
.square { background: var(--teal); border-radius: 1px; }
.report-title h1 { font-size: clamp(37px,4.1vw,52px); text-wrap: balance; }
.prose .example-key { font-size: 14px; line-height: 1.55; color: var(--muted); margin-top: 10px; }
.example-key strong { color: var(--ink); }
.fact-matrix { margin-block: 18px 12px; font-variant-numeric: tabular-nums; }
.fact-line {
  display: grid;
  grid-template-columns: 88px 47px minmax(0,1fr) 62px 38px 60px;
  gap: 10px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid #ece7ee;
  font-size: 13px;
  text-align: right;
}
.fact-header { padding: 0 0 7px; color: var(--muted); font-size: 11px; font-weight: 550; }
.fact-header>span:first-child, .fact-condition { text-align: left; }
.fact-condition { line-height: 1.6; font-size: 12px; color: var(--muted); }
.fact-condition::first-line { font-size: 14px; font-weight: 650; color: var(--ink); }
.fact-cells, .table-labels { display: grid; grid-template-columns: repeat(8,minmax(0,1fr)); gap: 3px; }
.table-labels span { text-align: center; grid-column: span 2; border-bottom: 2px solid #e6e1eb; padding-bottom: 4px; margin-inline: 3px; }
.fact-cell, .method-rows, .fact-means, .fact-hits { display: grid; gap: 3px; grid-template-rows: 27px 27px; align-items: center; }
.method-rows { font-size: 12px; font-weight: 600; }
.method-rows span:first-child, .fact-gap.negative { color: var(--purple); }
.method-rows span:last-child, .fact-gap.positive { color: var(--teal); }
.fact-cell { padding: 0; color: white; font-size: 12px; background: transparent; border: 0; border-radius: 4px; font-variant-numeric: tabular-nums; }
.fact-cell:nth-child(2n+1):not(:first-child) { margin-left: 4px; }
.fact-cell:nth-child(2n):not(:last-child) { margin-right: 4px; }
.fact-cell:hover, .fact-cell.selected { outline: 2px solid #382c42; outline-offset: 1px; }
.fact-cell span { line-height: 27px; border-radius: 4px; }
.r16.high { background: #7045a6; }
.fullft.high { background: #11766e; }
.r16.mid { color: #45266f; background: #d8c6f1; }
.fullft.mid { color: #12514a; background: #b5e3db; }
.fact-cell .low { color: #73450b; background: #f9e2ab; }
.fact-cell .miss { background: #f8d0c6; color: #812d20; font-weight: 650; }
.fact-gap { font-weight: 700; color: var(--muted); }
.fact-hits { font-size: 12px; color: var(--muted); }
.matrix-key { display: flex; flex-wrap: wrap; gap: 5px 14px; font-size: 11px; color: var(--muted); align-items: center; }
.matrix-key span:not(:first-child) { display: inline-flex; gap: 5px; align-items: center; }
.matrix-key span:not(:first-child)::before { content: ""; display: inline-block; width: 14px; height: 10px; border-radius: 2px; background: var(--swatch); }
.matrix-key .hi { --swatch: linear-gradient(90deg,#7045a6 50%,#11766e 50%); }
.matrix-key .med { --swatch: linear-gradient(90deg,#d8c6f1 50%,#b5e3db 50%); }
.matrix-key .lo { --swatch: #f9e2ab; }
.matrix-key .fail { --swatch: #f8d0c6; }
.trajectory svg, .atlas-scroll svg { display: block; width: 100%; height: auto; }
figure svg text { font: 11px var(--sans); fill: #67636b; }
.gridline { stroke: #d7d0dc; stroke-width: .9; stroke-dasharray: 3 4; }
.atlas-controls { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 7px; margin: 13px 0; }
.atlas-controls .switches { margin: 0; }
.atlas-controls .switches button { font-size: 12px; }
.stack-hint { font-weight: 400; color: var(--muted); }
.row-rule { stroke: #e8e4e9; }
.lora-mark { fill: #7246ac; stroke: white; stroke-width: 1; }
.full-mark { fill: #157f76; stroke: white; stroke-width: 1; }
.winner { fill: none; stroke: #ac6119; stroke-width: 1.5; }
.hitbox { fill: transparent; }
.run-g { cursor: pointer; }
.run-g:is(.selected,:hover) :is(.lora-mark,.full-mark) { stroke: #271d32; stroke-width: 1.8; }
.range { fill: #faf9f9; }
.range-90 { fill: #f5f1f9; }
.range-99 { fill: #ecf6f4; }
.range-label, .tick, .tie-count { text-anchor: middle; }
.range-label, .condition-label { font-weight: 620; fill: #403a48; }
.break-line { stroke: #b2a9bf; stroke-dasharray: 2 2; }
.tie-count { font-size: 10px; font-weight: 700; fill: white; }
@media(max-width:975px) {
  .fact-line { grid-template-columns: 80px 44px minmax(0,1fr) 51px 30px 46px; gap: 6px; }
}
@media(max-width:880px) and (min-width:791px), (max-width:650px) {
  .fact-line { grid-template-columns: 48px minmax(0,1fr) 49px 30px; gap: 4px; font-size: 12px; }
  .fact-condition { grid-column: 1/4; grid-row: 1; color: var(--ink); font-weight: 600; }
  .fact-condition br { display: none; }
  .fact-condition span::before { content: " · "; }
  .fact-gap { grid-column: 4; grid-row: 1; justify-self: end; white-space: nowrap; font-size: 12px; }
  .fact-gap::after { content: " pp"; }
  .fact-header>span:first-child, .fact-header>span:last-child { display: none; }
  .fact-header { font-size: 10px; }
  .fact-cells, .table-labels { gap: 2px; }
  .fact-cell:nth-child(n) { margin: 0; font-size: 10px; }
  .fact-cell:nth-child(odd):not(:first-child) { margin-left: 2px; }
  .fact-cell span { border-radius: 2px; }
  .fact-means { font-size: 11px; }
  .table-labels span { font-size: 10px; margin-inline: 0; }
}
@media(max-width:400px) {
  .fact-line { grid-template-columns: 39px minmax(0,1fr) 41px 26px; gap: 3px; }
  .method-rows, .fact-hits { font-size: 10px; }
  .fact-cell:nth-child(n) { font-size: 9px; }
  .fact-header { font-size: 9px; }
  .table-labels span { font-size: 9px; }
}
@media(max-width:355px) {
  .fact-cell span { font-size: 0; }
  .table-labels span { font-size: 8px; }
}

.inspect { display: grid; grid-template-columns: max-content minmax(0,1fr); gap: 6px 12px; align-items: center; margin-top: 13px; }
.inspect label, .trajectory label, .control-label { font-size: 13px; font-weight: 600; }
.inspect output { grid-column: 1/-1; color: #4f405d; font-size: 13px; min-height: 1.5em; }
select { min-width: 0; max-width: 100%; padding: 6px 9px; background: #fff; border: 1px solid #cfc8d3; border-radius: 5px; color: var(--ink); }
.switches { display: flex; flex-wrap: wrap; gap: 5px; margin: 12px 0; }
.switches button, .flip { background: #fff; border: 1px solid #d4ced6; border-radius: 6px; padding: 5px 10px; color: #504c54; }
.switches button[aria-pressed="true"] { background: var(--tint); color: #50347c; border-color: #b7a2cd; font-weight: 650; }
.switches button:hover, .flip:hover { border-color: #94819f; }
.atlas-scroll, .table-scroll { overflow-x: auto; }
.atlas-scroll>div { min-width: 640px; }
.atlas-scroll .row-name { font-size: 12px; fill: #3d3940; }
.study-flow { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin: 12px 0 16px; }
.study-flow>div { border-top: 2px solid #c9b7d9; padding: 10px 2px; }
.study-flow strong { display: block; font-size: 14px; margin: 5px 0; }
.flow { display: grid; grid-template-columns: 1fr 22px 1.1fr 22px .7fr; align-items: center; margin: 14px 0; }
.flow-node { border: 1px solid #d5cfda; border-radius: 7px; background: #faf8fb; padding: 10px; display: grid; align-content: center; min-height: 86px; }
.flow-node small, .flow-node samp { font: 12px/1.45 var(--sans); color: var(--muted); }
.flow-node output, .flow-node strong { font-weight: 650; }
.flow-node.answer { background: #eeF6f3; border-color: #b9d4cc; }
.connector { height: 1px; background: #a59ba9; }
.technical { border-block: 1px solid var(--line); padding: 9px 0; margin-top: 14px; }
.technical summary { font-size: 14px; font-weight: 600; color: var(--purple); }
.technical[open] summary { margin-bottom: 12px; }
.technical p { font-size: 15px; }
.control-label { display: block; margin-top: 12px; }
.bar-line { display: grid; grid-template-columns: 66px minmax(0,1fr) 84px; gap: 8px; align-items: center; font-size: 13px; margin: 7px 0; }
.bar-line strong { text-align: right; }
.bar-track { height: 10px; border-radius: 3px; background: #f0edf2; overflow: hidden; }
.bar-track i { display: block; height: 100%; width: 38.63%; background: var(--purple); transition: width .2s ease; }
.full .bar-track i { width: 100%; background: var(--teal); }
.axis { margin: 0 92px 0 74px; display: flex; justify-content: space-between; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.table-scroll { border: 1px solid var(--line); border-radius: 8px; background: white; margin: 18px 0; }
table { border-collapse: collapse; width: 100%; font: 13px/1.48 var(--sans); font-variant-numeric: tabular-nums; }
caption { text-align: left; padding: 12px; color: var(--muted); font-size: 12px; }
th, td { padding: 8px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid #ebe7eb; }
th:first-child, .decisions th, .decisions td { text-align: left; }
th { font-weight: 600; }
thead { background: #f3f0f4; }
tbody tr:last-child>* { border-bottom: 0; }
.decisions td, .decisions th { white-space: normal; vertical-align: top; }
.decisions th:first-child { width: 22%; }
.decisions td { width: 39%; }
.trajectory svg { max-width: 560px; margin: 12px auto; }
.fit-path { fill: none; stroke: #9e91ac; stroke-width: 1.5; opacity: .64; }
.fit-point { fill: #b7abbf; stroke: white; }
.fit-line.selected .fit-path { stroke: var(--purple); opacity: 1; stroke-width: 3; }
.fit-line.selected .fit-point { fill: var(--purple); }
.trajectory figcaption { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 12px; }
.trajectory #fit-reading { color: var(--purple); margin: 0; }
.policy ol { padding-left: 20px; font-size: 15px; }
.policy-outcomes { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; border-top: 1px solid var(--line); padding-top: 13px; }
@media(max-width:1100px) { .reading-grid { grid-template-columns: 170px minmax(0,816px); gap: 30px; } }
@media(max-width:790px) {
  .reading-grid { display: block; max-width: 840px; padding-top: 16px; }
  .contents { position: static; margin-bottom: 20px; }
  .contents nav { display: flex; overflow-x: auto; gap: 14px; border: 0; padding: 2px 0 6px; scrollbar-width: thin; }
  .contents a, .contents a.contents-title { flex: none; border: 0; padding: 3px 0; margin: 0; }
  .contents a small { display: none; }
}
@media(max-width:540px) {
  body { font-size: 15px; }
  .reading-grid { padding-inline: 15px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 7px; }
  .stats>div { padding: 9px 11px; }
  .stats b { font-size: 25px; }
  .lenses { grid-template-columns: 1fr; }
  .study-flow { grid-template-columns: 1fr; gap: 3px; }
  .study-flow>div { display: grid; grid-template-columns: 48px 1fr; gap: 2px 8px; padding-block: 6px; }
  .study-flow b { grid-row: span 2; }
  .study-flow span { grid-column: 2; }
  .study-flow strong, .study-flow span { margin: 0; }
  .inspect { grid-template-columns: 1fr; }
  .decisions table { min-width: 600px; }
  .flow { grid-template-columns: 1fr 9px 1.2fr 9px .7fr; }
  .flow-node { padding: 6px; min-height: 90px; }
  .flow-node strong { font-size: 14px; }
  .policy-outcomes strong { font-size: 24px; }
}
@media(prefers-reduced-motion:reduce) { .bar-track i { transition: none; } }
