/* DifFRACT project page.
   One column: prose, figures, charts and tables all have the width of .wrap, on a white sheet over a plain gray page.
   Colors of the data: blue = image stream, orange = text stream, green = an edge that excites, red = one that inhibits
   and a sign that stayed red in the color-prior labels, yellow = where a feature fires. A deep blue is the page's own
   accent: what can be pressed, and the outcome a hypothesis predicts. Feature names are set in italic serif. */

:root {
  --paper: #fff;
  --ink: #171a21;
  --ink-2: #3d4450;
  --muted: #677080;
  --faint: #9aa3b0;
  --rule: #e3e6ec;
  --wash: #f4f5f9;
  --wash-2: #eaecf3;
  /* the colors of blind labels, one per role (exhibit.js, ROLE) */
  --lab-pred: var(--accent);
  --lab-pred2: #869ce6;
  --lab-pred3: #c1cdf5;
  --lab-orig: #969eab;
  --lab-other: #c6ccd5;
  --lab-other2: #dde1e7;
  --lab-lost: repeating-linear-gradient(135deg, #aeb6c2 0 2px, #e6e9ee 2px 5px);
  --lab-unclear: #eff1f4;
  --img: #2d6cdf;
  --img-ink: #1b4da8;
  --img-wash: #eaf2fe;
  --txt: #de7a1c;
  --txt-ink: #a4520a;
  --txt-wash: #fdf2e4;
  --pos: #1c8a55;
  --neg: #d2362e;
  --heat: #ffc400;
  --accent: #3559d1;
  --accent-ink: #2443a6;
  --accent-wash: #edf1fd;
  --accent-rule: #c6d2f5;
  --canvas: #e9ecf2;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --wrap: 880px;
  --pad: 64px;
  --gutter: 20px;
  --radius: 12px;
  --shadow-1: 0 1px 2px rgba(23, 26, 33, 0.05), 0 6px 18px -8px rgba(23, 26, 33, 0.14);
  --shadow-2: 0 2px 4px rgba(23, 26, 33, 0.06), 0 16px 36px -12px rgba(23, 26, 33, 0.26);
  --streams: linear-gradient(90deg, var(--txt) 0 50%, var(--img) 50% 100%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
/* motion only where it answers an action: a switched graph fades in, a popover or a dialog fades and rises in, a group
   of a diagram changes state softly. Nothing moves on its own as the page scrolls. */
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes settle-in { from { opacity: 0.2; } to { opacity: 1; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 400 17px/1.6 var(--sans); text-rendering: optimizeLegibility; }
@media (min-width: 1000px) { body { font-size: 19px; } }
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
a { color: var(--accent-ink); text-decoration-color: var(--accent-rule); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
button { font: inherit; color: inherit; }
q { quotes: "“" "”"; }
code, .mono { font-family: var(--mono); font-size: 0.9em; }
sup { line-height: 0; font-size: 0.72em; }
sup a { text-decoration: none; }

/* ------------------------------------------------------------------ the sheet and its one column */
.sheet { position: relative; z-index: 1; max-width: calc(var(--wrap) + 2 * var(--pad)); margin: 0 auto; background: var(--paper); box-shadow: 0 0 0 1px rgba(23, 26, 33, 0.05), 0 0 70px -10px rgba(23, 26, 33, 0.28); }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.prose p { margin: 0 0 1em; }
.prose ul { margin: 0 0 1em; padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }
.lede { font-size: 1.08em; line-height: 1.55; color: var(--ink-2); }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; line-height: 1.55; }

h1, h2, h3, h4 { font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.3rem); letter-spacing: -0.02em; margin-bottom: 0.6em; }
h2::before { content: ""; display: block; width: 64px; height: 6px; border-radius: 3px; background: var(--streams); margin-bottom: 18px; }
h3 { font-size: 1.45rem; margin: 0 0 0.55em; }
h4 { font-size: 1rem; }
section { padding: 76px 0 72px; }
section + section { border-top: 1px solid var(--rule); }
section.band { background: var(--wash); }

/* the case studies: numbered, each opening with its finding */
#cases { counter-reset: case; }
.case { padding-top: 60px; counter-increment: case; }
.case + .case { border-top: 1px solid var(--rule); margin-top: 60px; }
.case h3 { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; }
.case h3::before { content: counter(case); display: grid; place-items: center; width: 1.5em; height: 1.5em; border-radius: 50%; background: var(--accent); color: #fff; font: 600 0.66em/1 var(--sans); margin-top: 0.12em; font-variant-numeric: tabular-nums; }
/* the one place that says how the case-study figures work */
.howto { margin: 20px 0 6px; padding: 14px 18px; background: var(--wash); border: 1px solid var(--rule); border-radius: 12px; font-size: 0.95rem; line-height: 1.55; color: var(--ink-2); }
.howto b { color: var(--accent-ink); font-weight: 600; }
.takeaway { margin: 0 0 1.1em; padding: 12px 16px; border-left: 4px solid var(--accent); border-radius: 0 10px 10px 0; background: var(--accent-wash); font-size: 0.96em; line-height: 1.5; color: var(--ink); }
.takeaway strong { font-weight: 600; color: var(--accent-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* feature names: italic serif, with the color of their stream as a small mark */
.featname, i.f { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 1.08em; letter-spacing: 0; }
button.feat {
  font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 1.08em; line-height: 1.2;
  border: 0; border-radius: 6px; padding: 1px 7px 2px 18px; cursor: pointer; position: relative; background: var(--wash);
}
button.feat::before { content: ""; position: absolute; left: 7px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--faint); }
button.feat.img { background: var(--img-wash); }
button.feat.img::before { background: var(--img); }
button.feat.txt { background: var(--txt-wash); }
button.feat.txt::before { background: var(--txt); }
button.feat:hover { box-shadow: inset 0 0 0 1px currentColor; }
.prompt, q.prompt { font-family: var(--mono); font-size: 0.84em; background: var(--wash); border-radius: 5px; padding: 2px 6px; quotes: none; white-space: nowrap; }
@media (max-width: 640px) { .prompt, q.prompt { white-space: normal; } }

/* ------------------------------------------------------------------ top bar */
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, 0.94); backdrop-filter: saturate(1.4) blur(8px); }
.topbar::after { content: ""; display: block; height: 3px; background: var(--streams); }
.topbar .wrap { display: flex; align-items: center; gap: 26px; height: 52px; }
.wordmark { font-weight: 600; letter-spacing: -0.01em; text-decoration: none; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; }
.logo { display: block; width: 30px; height: 20px; flex: none; }
.topnav { display: flex; gap: 20px; font-size: 0.9rem; margin-right: auto; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.topnav a { text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; color: var(--muted); }
.topnav a:hover, .topnav a[aria-current="true"] { color: var(--accent-ink); border-bottom-color: var(--accent); }
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--accent);
  background: var(--accent); color: #fff; font-size: 0.9rem; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap;
  box-shadow: 0 1px 2px rgba(29, 50, 115, 0.25); transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
}
.btn:hover { background: var(--accent-ink); border-color: var(--accent-ink); transform: translateY(-1px); box-shadow: 0 6px 14px -6px rgba(29, 50, 115, 0.6); }
.btn.ghost { background: #fff; color: var(--accent-ink); border-color: var(--accent-rule); box-shadow: var(--shadow-1); }
.btn.ghost:hover { border-color: var(--accent); background: var(--accent-wash); }
.btn.small { height: 30px; padding: 0 11px; font-size: 0.84rem; border-radius: 8px; }
.linkish { border: 0; background: none; padding: 0; text-decoration: underline; cursor: pointer; color: var(--accent-ink); }
@media (max-width: 860px) {
  .topbar .wrap { gap: 16px; }
  .topnav { flex: 1; min-width: 0; gap: 16px; font-size: 0.86rem; -webkit-mask-image: linear-gradient(to right, #000 86%, transparent); mask-image: linear-gradient(to right, #000 86%, transparent); padding-right: 18px; }
  .topnav::-webkit-scrollbar { display: none; }
}

/* ------------------------------------------------------------------ hero */
/* the head of the page on white, the opening figure on the wash below it: the edge follows the content, whatever wraps */
.hero { padding: 52px 0 0; background: #fff; border-bottom: 1px solid var(--rule); }
.hero-band { background: var(--wash); border-top: 1px solid var(--rule); padding: 36px 0 60px; }
.hero-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 20rem); gap: 36px; align-items: end; padding-bottom: 36px; }
.hero h1 { font-size: clamp(3.2rem, 9vw, 5.4rem); letter-spacing: -0.045em; line-height: 0.95; display: flex; align-items: center; gap: 0.2em; flex-wrap: wrap; }
.hero h1 .logo { width: 1.2em; height: 0.8em; }
.hero .full-title { font-size: 1.2rem; font-weight: 500; margin: 18px 0 12px; line-height: 1.3; }
.hero .thesis { font-family: var(--serif); font-size: 1.36rem; line-height: 1.36; margin: 0; }
.authors { list-style: none; padding: 0; margin: 0 0 4px; display: flex; flex-wrap: wrap; gap: 2px 16px; font-weight: 500; font-size: 0.98rem; }
.affils { margin: 0 0 10px; color: var(--muted); font-size: 0.82rem; display: flex; flex-wrap: wrap; gap: 2px 12px; }
.venue { display: inline-block; margin: 0 0 14px; padding: 3px 10px; border-radius: 999px; background: var(--accent-wash); color: var(--accent-ink); font-size: 0.82rem; font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions .btn { padding: 0 14px; }
@media (max-width: 760px) { .hero-top { grid-template-columns: 1fr; gap: 22px; padding-bottom: 28px; } .hero { padding-top: 34px; } .hero-band { padding: 24px 0 40px; } }

.wallfig { margin: 0; padding: 22px 22px 18px; background: #fff; border: 1px solid var(--rule); border-radius: 16px; box-shadow: var(--shadow-2); }
.wallfig .q { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.015em; margin: 0 0 6px; line-height: 1.2; }
.wallfig .sub { margin: 0 0 12px; color: var(--ink-2); font-size: 0.98rem; line-height: 1.5; }
.circuit-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 18px; font-size: 0.95rem; }
.circuit-line .arrow { font-family: var(--mono); font-size: 0.84rem; font-weight: 500; }
.circuit-line .arrow.pos { color: var(--pos); }
.circuit-line .arrow.neg { color: var(--neg); }
.walls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.wall-panel { padding: 12px; border-radius: 12px; background: var(--wash); border: 1px solid var(--rule); }
/* a panel's name on one line: the type gives way a little before the name would be cut */
.wall-panel { container-type: inline-size; }
.wall-name { margin: 0; font-size: clamp(0.74rem, 5.6cqi, 0.86rem); font-weight: 500; line-height: 1.3; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wall-num { margin: 2px 0 10px; font-size: 0.9rem; color: var(--muted); }
.wall-num b { font: 600 2rem/1 var(--sans); letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: tabular-nums; margin-right: 2px; }
.wall { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; }
.wall .tile { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 4px; background: #fff; }
.wall .tile img { width: 100%; height: 100%; object-fit: cover; }
.wall .tile.fade img { opacity: 0.38; }
.wallfig figcaption { margin-top: 14px; font-size: 0.84rem; color: var(--muted); line-height: 1.5; max-width: none; }
@media (max-width: 760px) { .walls { grid-template-columns: 1fr; } .wall { grid-template-columns: repeat(10, 1fr); }  .wallfig { padding: 16px 14px 14px; } }

/* ------------------------------------------------------------------ index of the case studies */
.index { list-style: none; margin: 30px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; counter-reset: idx; }
.index li { counter-increment: idx; }
.index a { position: relative; display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 14px; align-items: start; padding: 12px 14px 13px 12px; text-decoration: none; height: 100%; color: var(--ink);
  background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow-1); transition: transform 0.14s, box-shadow 0.14s, border-color 0.14s; }
.index a:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--accent-rule); }
.index a::before { content: counter(idx); position: absolute; left: 6px; top: 6px; z-index: 1; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font: 600 0.72rem/1 var(--sans); box-shadow: 0 0 0 2px #fff; }
.index img { width: 72px; height: 72px; border-radius: 8px; object-fit: cover; background: var(--wash); display: block; }
.index b { display: block; font-size: 0.98rem; font-weight: 600; line-height: 1.3; margin: 0 0 4px; }
.index .what { display: block; font-size: 0.86rem; line-height: 1.45; color: var(--ink-2); }
.index .what strong { font-weight: 600; color: var(--accent-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 700px) { .index { grid-template-columns: 1fr; } .index a { grid-template-columns: 56px minmax(0, 1fr); } .index img { width: 56px; height: 56px; } }

/* ------------------------------------------------------------------ figures in general */
figure { margin: 28px 0; }
figcaption, .caption { font-size: 0.86rem; line-height: 1.5; color: var(--muted); }
figcaption b, .caption b { color: var(--ink); font-weight: 600; }
.state { margin: 0; padding: 28px; color: var(--muted); font-size: 0.92rem; }
.state-error { color: var(--neg); }
.fig { margin: 28px 0; }
.plate { padding: 14px; background: var(--wash); border: 1px solid var(--rule); border-radius: 16px; }
.card { background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow-1); padding: 16px 18px; min-width: 0; }
.card + .card { margin-top: 12px; }
.kicker { margin: 0 0 10px; font-size: 0.82rem; font-weight: 600; color: var(--accent-ink); display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.kicker span { font-weight: 400; color: var(--muted); }
.kicker q { font-family: var(--mono); font-size: 0.94em; quotes: none; color: var(--ink-2); font-weight: 400; }
.card h4 { font-size: 0.98rem; margin: 0 0 10px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs button { border: 1px solid var(--rule); background: #fff; border-radius: 999px; padding: 5px 12px; font-size: 0.84rem; cursor: pointer; color: var(--ink-2); }
.tabs button:hover { border-color: var(--accent); color: var(--accent-ink); }
.tabs button[aria-selected="true"], .tabs button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.tabs.small button { font-size: 0.8rem; padding: 3px 10px; }
.note { margin: 10px 0 0; font-size: 0.8rem; line-height: 1.5; color: var(--muted); }
.protocol { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--rule); font-size: 0.78rem; line-height: 1.5; color: var(--muted); }

/* ------------------------------------------------------------------ the case-study figure: the graph, then the test */
.exhibit { margin: 28px 0 22px; }
/* the diagram and the image in one row, top-aligned, the image as tall as the diagram (--pic, exhibit.js); under each
   its line (the state of the graph, the prompt); the facts across */
.ex-graph-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "dia pic" "state toks" "facts facts"; column-gap: 24px; align-items: start; }
.ex-graph-body.no-state { grid-template-areas: "dia pic" "facts toks"; }
.ex-graph-body > .ex-dia { grid-area: dia; min-width: 0; }
.ex-graph-body > .ex-pic { grid-area: pic; }
.ex-graph-body > .ex-state { grid-area: state; margin: 10px 0 0; }
.ex-graph-body > .where-prompt { grid-area: toks; width: 0; min-width: 100%; margin: 10px 0 0; }
.ex-graph-body > .facts { grid-area: facts; margin: 10px 0 0; }
.ex-pic .heatimg { width: var(--pic, 260px); border-radius: 10px; box-shadow: var(--shadow-1); }
.kicker .kick-act { margin-left: auto; }
.ex-graph-body.swap { animation: settle-in 0.22s ease-out; }
.ex-tabs { margin: 4px 0 20px; }
.where-prompt { margin: 10px 0 4px; font: 400 0.82rem/1.9 var(--mono); }
.where-cap { margin: 0 0 10px; font-size: 0.78rem; line-height: 1.45; color: var(--muted); }
.facts { margin: 8px 0 0; font-size: 0.82rem; line-height: 1.45; color: var(--ink-2); }
@media (max-width: 760px) {
  .ex-graph-body, .ex-graph-body.no-state { grid-template-columns: 110px minmax(0, 1fr); grid-template-areas: "dia dia" "state state" "pic toks" "facts facts"; column-gap: 12px; }
  .ex-pic .heatimg { width: 110px; }
  .ex-graph-body > .where-prompt { margin-top: 10px; }
  .card { padding: 14px 12px; }
  .plate { padding: 8px; }
}

.diagram { display: block; width: 100%; height: auto; }
.lane-txt { fill: var(--txt-wash); }
.lane-img { fill: var(--img-wash); }
.lane-label { font: 500 11px var(--sans); }
.lane-label.txt { fill: var(--txt-ink); }
.lane-label.img { fill: var(--img-ink); }
.edge { fill: none; stroke-linecap: round; transition: opacity 0.2s; }
.edge.pos { stroke: var(--pos); }
.edge.neg { stroke: var(--neg); }
.edge.cut { opacity: 0.2; stroke-dasharray: 2 5; }
.edge-head { transition: opacity 0.2s; }
.edge-head.pos { fill: var(--pos); }
.edge-head.neg { fill: var(--neg); }
.edge-head.cut { opacity: 0.2; }
.edge-w { font: 500 11px var(--mono); paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; }
.edge-w.pos { fill: var(--pos); }
.edge-w.neg { fill: var(--neg); }
.box { cursor: pointer; outline: none; }
.box-face { fill: #fff; stroke-width: 1.4; filter: drop-shadow(0 1px 1.5px rgba(23, 26, 33, 0.16)); transition: fill 0.2s, stroke 0.2s, stroke-width 0.15s; }
.box-label { transition: fill 0.2s; }
.box-shadow { fill: #fff; stroke-width: 1; opacity: 0.9; }
.box.txt .box-face, .box.txt .box-shadow { stroke: var(--txt); }
.box.img .box-face, .box.img .box-shadow { stroke: var(--img); }
.box.target .box-face { stroke: var(--ink); stroke-width: 2.2; }
.box.ghost .box-face { stroke-dasharray: 4 3; fill: rgba(255, 255, 255, 0.55); filter: none; }
.box.ghost .box-label { opacity: 0.7; }
.box:hover .box-face, .box:focus-visible .box-face { stroke-width: 2.6; }
.box-label { font: italic 500 15.5px var(--serif); fill: var(--ink); }
.box.target .box-label { font-weight: 600; }
.box-sub { font: 400 10.5px var(--sans); fill: var(--muted); }
.box-tag { font: 500 10px var(--sans); fill: var(--muted); }
.box-mark { font: 600 10px var(--sans); fill: var(--neg); }
.box.up .box-mark { fill: var(--pos); }
.box.off .box-face { fill: #f1f2f4; stroke: var(--faint); stroke-dasharray: 3 3; filter: none; }
.box.off .box-label { fill: var(--muted); }
.box.up .box-face { stroke-width: 3; fill: color-mix(in srgb, var(--pos) 10%, #fff); }

.tok { padding: 2px 4px; border-radius: 4px; background: rgba(222, 122, 28, calc(var(--a, 0) * 0.55)); }
.heatimg { position: relative; display: block; border-radius: 6px; overflow: hidden; background: var(--wash); aspect-ratio: 1; }
.heatimg img { width: 100%; height: 100%; object-fit: cover; }
.heatimg canvas { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity 0.16s; }
.heatimg.reveal { cursor: zoom-in; }
.heatimg.reveal:hover canvas { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .heatimg canvas { transition: none; } }

/* the test: every condition is a row, its seeds on the left, the blind labels of all its generations on the right */
.ttable { --thumb: 96px; display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: 22px; }
.ttable.seeds3 { --thumb: 112px; }
.ttable.plain { --thumb: auto; grid-template-columns: minmax(0, 1fr) minmax(0, max-content); }
/* a table without numbers on the right: its seeds share the whole width */
.ttable.plain .t-seeds { display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); }
.ttable.plain .thumb { width: auto; min-width: 0; }
.thead, .trow { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; }
/* rows keep their padding (the tint under the pointer has room) but give it back as a negative margin, so their text
   starts on the same line as the kicker, the notes and the protocol of the card */
.thead { align-items: end; padding: 0 10px 6px; margin-inline: -10px; font-size: 0.74rem; color: var(--faint); }
.thead .t-measure { font-size: 0.82rem; font-weight: 600; color: var(--ink); }
.thead.titled { align-items: start; }
.t-title { width: 0; min-width: 100%; }   /* takes the width of the seeds, never sets it */
.t-title .kicker, .t-title .tgroup { margin: 0; }
.t-title .tgroup { color: var(--ink-2); }
.t-title.full { grid-column: 1 / -1; margin-bottom: 8px; }
.thead .t-measure small { display: block; font-size: 0.74rem; font-weight: 400; color: var(--faint); }
.seedlabs { display: flex; gap: 5px; }
.seedlabs span { width: var(--thumb); white-space: nowrap; overflow: hidden; }
.seedlabs span.lead-h { margin-right: 10px; }
.tgroup { grid-column: 1 / -1; margin: 14px 0 6px; font-size: 0.82rem; font-weight: 600; }
.tgroup q { font-family: var(--mono); font-weight: 400; font-size: 0.94em; quotes: none; }
.trow { padding: 10px 10px 12px; margin-inline: -10px; border-top: 1px solid var(--rule); border-radius: 0; row-gap: 7px; transition: background 0.15s, box-shadow 0.15s; }
/* no row is marked on its own. A row under a graph is tinted while the pointer is on it: the diagram is then in its state */
.trow.linked { cursor: pointer; }
.trow.linked:hover { background: var(--accent-wash); }
.trow.linked.pinned { background: var(--accent-wash); box-shadow: inset 4px 0 0 var(--accent); }
.trow.linked:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 6px; }
.ex-state { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-height: 26px; font-size: 0.84rem; color: var(--muted); }
.ex-state b { color: var(--ink); font-weight: 600; }
.ex-unseen { color: var(--muted); }
.ex-state.on { color: var(--accent-ink); }
.ex-unpin { border: 1px solid var(--accent-rule); background: #fff; color: var(--accent-ink); border-radius: 999px; width: 22px; height: 22px; padding: 0 0 2px; line-height: 1; font-size: 1rem; cursor: pointer; }
.ex-unpin:hover { background: var(--accent-wash); border-color: var(--accent); }
.t-name { grid-column: 1 / -1; margin: 0; font-size: 0.9rem; font-weight: 500; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.t-alpha { font: 400 0.76rem var(--mono); color: var(--muted); padding: 1px 7px; border-radius: 999px; background: #fff; border: 1px solid var(--rule); white-space: nowrap; }
.t-seeds { display: flex; gap: 5px; align-items: flex-start; }
.thumb { position: relative; width: var(--thumb); flex: none; margin: 0; }
.thumb img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: var(--wash); display: block; }
/* a row of up to three images names the label of each by a bar of its color; a longer row fades the images that do not show the counted outcome */
.thumb.bar::after { content: ""; display: block; height: 4px; margin-top: 3px; border-radius: 2px; background: var(--c, transparent); }
.thumb.fade { background: #fff; border-radius: 6px; }
.thumb.fade img { opacity: 0.38; }
.thumb .badge { position: absolute; right: 4px; top: 4px; min-width: 20px; padding: 1px 5px; border-radius: 999px; background: rgba(23, 26, 33, 0.78); color: #fff; font: 600 0.72rem/1.5 var(--sans); text-align: center; font-variant-numeric: tabular-nums; }
.thumb.lead { margin-right: 10px; }
.thumb.lead img { box-shadow: 0 0 0 2px var(--accent-rule); }
.thumb.hole { height: var(--thumb); border: 1px dashed var(--rule); border-radius: 6px; }
.t-out { min-width: 0; align-self: center; }
.t-num { margin: 0 0 6px; font-size: 0.86rem; line-height: 1.3; color: var(--ink-2); }
.t-num strong { font-size: 1.34rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--ink); margin-right: 4px; }
.t-num .pc { color: var(--muted); font-variant-numeric: tabular-nums; }
.t-base { margin: 0; font-size: 0.78rem; color: var(--faint); }
.dist { display: flex; height: 12px; border-radius: 6px; overflow: hidden; gap: 1px; background: #fff; }
.dist .seg { min-width: 2px; }
.dist-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 1px 12px; padding: 0; margin: 6px 0 0; font-size: 0.74rem; line-height: 1.5; color: var(--ink-2); }
.dist-legend .sw { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 4px; }
.dist-legend b { font-weight: 600; font-variant-numeric: tabular-nums; }
.t-note { margin: 6px 0 0; font-size: 0.76rem; line-height: 1.45; color: var(--muted); }
.meanbar { position: relative; height: 14px; border-radius: 7px; background: var(--wash-2); }
.meanbar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 7px; background: var(--lab-pred); }
.trow:first-of-type .meanbar i, .meanbar.base i { background: var(--lab-orig); }
.meanbar .goal { position: absolute; top: -4px; bottom: -4px; width: 0; border-left: 2px dashed var(--ink); }
.goal-lab { margin: 4px 0 0; font-size: 0.72rem; color: var(--muted); }
@media (max-width: 760px) {
  .ttable { grid-template-columns: minmax(0, 1fr); }
  .thead:not(.titled) { display: none; }
  .thead > .seedlabs, .thead > .t-measure { display: none; }
  .t-seeds { gap: 4px; }
  .thumb { width: auto; flex: 1 1 0; min-width: 0; }
  .thumb.lead { margin-right: 4px; }
  .thumb.hole { height: auto; aspect-ratio: 1; }
}

/* the color prior: the conditions in rows, the three prompts in columns */
.tmatrix { --thumb: 84px; display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); column-gap: 18px; }
.tmatrix .thead, .tmatrix .trow { grid-template-columns: subgrid; }
.tmatrix { container: mx / inline-size; }
.tmatrix .thead { align-items: start; }
.tmatrix .thead > div { min-width: 0; }
/* the prompts over the columns on one line, in one size that fits the longest: a column is (the matrix - the gaps) / n
   wide less the row's 10px padding, a monospace character 0.6em. Where that would go below 0.6rem, they wrap instead */
.tmatrix .thead q { display: block; font: 400 clamp(0.6rem, calc(((100cqi - (var(--n, 3) - 1) * 18px) / var(--n, 3) - 10px) / (var(--chars, 40) * 0.61)), 0.74rem) var(--mono); quotes: none; color: var(--ink-2); white-space: nowrap; }
@container mx (width < 730px) { .tmatrix .thead q { white-space: normal; } }
.mcell { min-width: 0; }
.mcell .t-seeds { margin-bottom: 6px; }
.mcell .thumb { width: auto; flex: 1 1 0; min-width: 0; }
.mcell .t-num { margin-bottom: 4px; }
.mcell .t-num strong { font-size: 1.1rem; }
.mcell .m-prompt { display: none; margin: 0 0 4px; font: 400 0.74rem var(--mono); color: var(--muted); }
@media (max-width: 760px) { .tmatrix { grid-template-columns: 1fr; row-gap: 0; } .tmatrix .trow { row-gap: 12px; } .mcell .m-prompt { display: block; } }

/* a larger look at a thumbnail under the pointer */
.peek { position: fixed; z-index: 70; width: 300px; padding: 6px; background: #fff; border: 1px solid var(--rule); border-radius: 10px; box-shadow: var(--shadow-2); pointer-events: none; }
.peek img { width: 100%; border-radius: 6px; aspect-ratio: 1; object-fit: cover; background: var(--wash); }
.peek p { margin: 6px 2px 2px; font-size: 0.78rem; line-height: 1.4; color: var(--ink-2); }

/* ------------------------------------------------------------------ the feature card */
.featcard {
  position: fixed; z-index: 60; background: #fff; border: 1px solid var(--accent-rule); border-radius: 12px; box-shadow: var(--shadow-2);
  padding: 14px 14px 12px; max-height: min(78vh, 560px); overflow: auto; font-size: 0.88rem; line-height: 1.45;
}
.featcard:not([hidden]) { animation: pop-in 0.14s ease-out; }
.featcard.sheet { left: 8px !important; right: 8px; bottom: 8px; top: auto !important; width: auto !important; max-height: 70vh; }
.fc-close { position: absolute; right: 6px; top: 4px; border: 0; background: none; font-size: 1.3rem; line-height: 1; padding: 4px 8px; cursor: pointer; color: var(--muted); }
.featcard:not(.pinned) .fc-close { display: none; }
.btn.xclose { flex: none; width: 30px; padding: 0 0 2px; justify-content: center; font-size: 1.25rem; line-height: 1; }
.fc-group { margin: 0 24px 8px 0; color: var(--muted); font-size: 0.82rem; }
.fc-group strong { color: var(--ink); font: italic 500 1.05rem var(--serif); }
.fc-tabs { display: flex; gap: 4px; overflow-x: auto; margin: 0 0 10px; padding-bottom: 2px; }
.fc-tabs button { flex: none; border: 1px solid var(--rule); background: #fff; border-radius: 6px; padding: 2px 7px; font: 400 0.74rem var(--mono); cursor: pointer; }
.fc-tabs button[aria-selected="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.fc-head h4 { font-size: 1.2rem; margin: 0; }
.fc-head h4.fc-anon { font: 500 0.95rem var(--mono); }
.fc-meta { margin: 2px 0 10px; color: var(--muted); font-size: 0.8rem; }
.fc-sub { margin: 0 0 6px; font-weight: 600; font-size: 0.8rem; }
.fc-note { margin: 8px 0 0; color: var(--muted); font-size: 0.78rem; }
.ex-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ex { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: baseline; padding: 5px 8px; background: var(--wash); border-radius: 6px; }
.ex-text { margin: 0; font: 400 0.8rem/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.tokhit { background: rgba(222, 122, 28, calc(0.12 + var(--a) * 0.62)); border-radius: 3px; }
.tok-end { font-size: 0.86em; padding: 0 4px; border: 1px dashed var(--faint); border-radius: 3px; color: var(--ink-2); }
.tok-end[hidden] { display: none; }
.ex-v { font: 400 0.74rem var(--mono); color: var(--muted); }
/* five square thumbnails beside a square image, as tall as it: (width - 5px column gap - 4 x 4px row gaps) / 6 */
.ex-img { display: grid; grid-template-columns: minmax(0, 1fr) calc((100% - 21px) / 6); column-gap: 5px; align-items: start; }
.ex-img > .heatimg { width: 100%; min-width: 0; }
.ex-thumbs { display: grid; grid-auto-rows: auto; gap: 4px; align-content: start; min-width: 0; }
.ex-thumb, .ex-thumbs .heatimg { width: 100%; min-width: 0; }
.ex-thumbs .heatimg { border-radius: 4px; }
.ex-thumb { border: 0; padding: 0; background: none; cursor: pointer; border-radius: 6px; }
.ex-thumb.on { box-shadow: 0 0 0 2px var(--accent); }
.ex-thumb:not(.on):hover, .acard .thumbs button[aria-pressed="false"]:hover { box-shadow: 0 0 0 2px var(--accent-rule); }
.ex-cap { margin: 8px 0 0; font-size: 0.8rem; min-height: 2.4em; color: var(--ink-2); }

/* ------------------------------------------------------------------ method */
.steps3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 28px 0 14px; counter-reset: step; }
.steps3 > div { padding: 16px 16px 12px; background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow-1); border-top: 4px solid var(--accent); }
.steps3 h3 { font-size: 1.02rem; margin-bottom: 0.5em; line-height: 1.25; }
.steps3 h3::before { counter-increment: step; content: counter(step); display: inline-grid; place-items: center; width: 1.5em; height: 1.5em; margin-right: 8px; border-radius: 50%; background: var(--accent-wash); color: var(--accent-ink); font-size: 0.86em; }
.steps3 p { margin: 0 0 0.7em; font-size: 0.9rem; line-height: 1.5; color: var(--ink-2); }
@media (max-width: 760px) { .steps3 { grid-template-columns: 1fr; } }
details.more { border: 1px solid var(--rule); border-radius: var(--radius); margin: 20px 0; background: #fff; box-shadow: var(--shadow-1); }
details.more > summary { cursor: pointer; padding: 12px 16px; font-weight: 500; font-size: 0.98rem; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-radius: var(--radius); }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-wash); color: var(--accent-ink); font: 500 1.05rem/1 var(--mono); }
details.more[open] > summary::after { content: "−"; }
details.more > summary:hover { background: var(--accent-wash); }
/* fold-out sections: the material of the paper's appendix, opened on demand */
.folds { margin: 22px 0 26px; scroll-margin-top: 70px; }
.folds details.more { margin: 0; scroll-margin-top: 64px; }
.folds details.more + details.more { margin-top: 10px; }
details.more > summary > span { min-width: 0; }
details.more > summary small { display: block; font-weight: 400; font-size: 0.82rem; color: var(--muted); margin-top: 1px; }
details.more[open] > summary { border-bottom: 1px solid var(--rule); border-radius: var(--radius) var(--radius) 0 0; }
.fold { padding: 14px 16px 22px; font-size: 0.95rem; }
.fold > h4 { font-size: 1.02rem; margin: 26px 0 8px; }
.fold > h4:first-child { margin-top: 4px; }
.fold > ul, .fold > ol { padding-left: 1.2em; }
.fold li { margin: 0 0 0.5em; }
.fold > p { overflow-x: auto; overflow-y: hidden; }   /* a long inline formula scrolls inside its paragraph, not the page */
.fold .paperfig { margin: 16px 0 6px; }
.fold .paperfig img { display: block; width: 100%; }
.fold .caption { margin: 0 0 18px; }
.fold .tablewrap { margin: 14px 0 16px; }
.fold code { font: 400 0.88em var(--mono); background: var(--wash); border-radius: 4px; padding: 1px 5px; }
/* aligned formulas: browsers ignore the columnalign attribute, so the cells are aligned here (right, left, right, ...) */
.eq mtable mtd:nth-child(odd) { text-align: right; }
.eq mtable mtd:nth-child(even) { text-align: left; }
.paperfig-wrap { margin: 20px 0 8px; }
.paperfig-wrap .paperfig img { display: block; width: 100%; }

math { font-size: 1.04em; }
.eq { overflow-x: auto; padding: 6px 0; margin: 8px 0 14px; }
.paperfig { background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow-1); }
.paperfig img { margin: 0 auto; max-width: 100%; height: auto; }

/* how a graph is built: the paper's figure, one panel through its four steps (buildfig.js) */
.buildfig { margin: 14px 0 10px; }
.bf-body { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.bf-stage { background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow-1); padding: 8px; }
.bf-svg { display: block; width: 100%; height: auto; }
.bf-svg .lane-label { font: 600 12px var(--sans); }
.bf-guide { stroke: #c9ced6; stroke-width: 1; stroke-dasharray: 3 4; }
.bf-layer { font: italic 500 15px var(--serif); fill: var(--muted); }
.bf-name { font: italic 500 14.5px var(--serif); paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; }
.bf-target { font-size: 17px; fill: var(--ink); }
.bf-steps { list-style: none; margin: 0; padding: 0; counter-reset: bf; display: grid; gap: 6px; }
.bf-steps li { counter-increment: bf; }
.bf-steps button { display: block; position: relative; width: 100%; text-align: left; background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: 10px 12px 10px 40px;
  font-size: 0.84rem; line-height: 1.45; color: var(--muted); cursor: pointer; transition: color 0.3s, border-color 0.3s, background 0.3s, box-shadow 0.3s; }
.bf-steps button::before { content: counter(bf, upper-latin); position: absolute; left: 10px; top: 10px; display: grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; background: var(--wash-2); color: var(--muted); font-weight: 600; font-size: 0.76rem; transition: background 0.3s, color 0.3s; }
.bf-steps button b { font-weight: 600; color: var(--ink-2); }
.bf-steps li.done button { color: var(--ink-2); }
.bf-steps li.done button::before { background: var(--accent-wash); color: var(--accent-ink); }
.bf-steps button[aria-pressed="true"] { color: var(--ink); border-color: var(--accent); background: var(--accent-wash); box-shadow: var(--shadow-1); }
.bf-steps button[aria-pressed="true"]::before { background: var(--accent); color: #fff; }
.bf-steps button[aria-pressed="true"] b { color: var(--ink); }
.bf-steps button:hover { color: var(--ink); border-color: var(--accent-rule); }
.bf-replay { margin: 10px 0 0; }
/* the key of the drawing, under it: two columns (the features; the error and the dropped edge), the marks in a column
   of one width so that the labels of a column start at one line; one column on a phone */
.legend.bf-legend { display: grid; grid-template-rows: auto auto; grid-auto-flow: column; justify-content: start; gap: 6px 30px; margin-top: 12px; padding: 0 4px; }
.bf-legend li { display: flex; align-items: center; gap: 8px; }
.bf-legend svg { flex: none; width: 34px; height: 14px; }
@media (max-width: 640px) { .legend.bf-legend { grid-template-rows: none; grid-auto-flow: row; } }
@media (max-width: 760px) { .bf-body { grid-template-columns: 1fr; gap: 12px; } }

/* ------------------------------------------------------------------ the two phases of denoising */
.clip video { display: block; width: min(100%, 600px); height: auto; aspect-ratio: 660 / 648; background: #fff; border-radius: 8px; margin: 0 auto; }
.clip figcaption { margin-top: 12px; }
.tsteps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.tstep { margin: 0; min-width: 0; }
.tstep img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 8px; box-shadow: var(--shadow-1); }
.tstep .when { margin: 8px 0 6px; font-size: 0.84rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.tstep .when span { font-weight: 400; color: var(--muted); }
.sharebar { display: flex; height: 22px; border-radius: 6px; overflow: hidden; gap: 1px; margin: 0 0 3px; font: 500 0.72rem var(--sans); color: #fff; background: #fff; }
.sharebar span { display: flex; align-items: center; padding: 0 6px; white-space: nowrap; overflow: hidden; min-width: 0; font-variant-numeric: tabular-nums; }
.sharebar .t { background: var(--txt); }
.sharebar .i { background: var(--img); justify-content: flex-end; }
.sharebar.mean { height: 14px; font-size: 0; opacity: 0.55; }
.sharecap { margin: 0 0 6px; font-size: 0.72rem; line-height: 1.4; color: var(--muted); }
.layers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.layers h5 { margin: 0 0 4px; font-size: 0.82rem; font-weight: 600; text-align: center; }
.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font: 400 11px var(--sans); fill: var(--muted); }
.chart .axis { stroke: var(--rule); }
.chart .tick { stroke: var(--rule); }
.chart .lab-strong { fill: var(--ink); font-weight: 500; }
.twocharts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.twocharts h5 { margin: 0 0 6px; font-size: 0.84rem; font-weight: 600; }
@media (max-width: 760px) { .tsteps, .layers { grid-template-columns: repeat(2, minmax(0, 1fr)); } .twocharts { grid-template-columns: 1fr; } .chart text { font-size: 13px; } }

/* ------------------------------------------------------------------ bars and legends */
.stack { display: flex; height: 22px; border-radius: 5px; overflow: hidden; gap: 1px; font: 500 0.72rem var(--sans); color: #fff; background: #fff; }
.stack span { display: flex; align-items: center; justify-content: center; min-width: 0; overflow: hidden; font-variant-numeric: tabular-nums; }
.stack .ok { background: var(--lab-pred); }
.stack .red { background: var(--neg); color: #fff; }
.stack .lost { background: var(--lab-lost); color: var(--ink); }
.stack .other { background: var(--lab-unclear); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.78rem; color: var(--muted); margin: 10px 0 0; padding: 0; list-style: none; }
.legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.legend .sw-line { display: inline-block; width: 26px; height: 10px; margin-right: 6px; vertical-align: -1px; overflow: visible; }

/* the matched budget: six ways to choose the companions */
.bud { display: grid; grid-template-columns: minmax(0, 12.5rem) minmax(0, 1fr) max-content; column-gap: 16px; row-gap: 0; align-items: center; }
.bud-row, .bud-head { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; align-items: center; padding: 6px 8px; margin-inline: -8px; border-radius: 8px; font-size: 0.86rem; }
.bud-head { align-items: end; padding-bottom: 4px; font-size: 0.74rem; color: var(--faint); }
.bud-head q { font-family: var(--mono); quotes: none; color: var(--ink-2); }
.bud-row.ours { background: var(--accent-wash); }
.bud-row.ours .bar-name { font-weight: 600; }
.bud-thumbs { display: flex; gap: 12px; }
.bud-thumbs > span { display: flex; gap: 3px; }
.bud-thumbs .thumb { width: 46px; }
.bud-headthumbs { display: flex; gap: 12px; }
.bud-headthumbs span { width: 144px; line-height: 1.3; }
@media (max-width: 760px) {
  .bud { grid-template-columns: 1fr; }
  .bud-head { display: none; }
  .bud-row { row-gap: 5px; padding: 8px 6px; margin-inline: -6px; }
  .bud-thumbs .thumb { width: auto; flex: 1 1 0; }
  .bud-thumbs > span { flex: 1; }
}
.bb { display: grid; gap: 4px; }
.bb-row { display: grid; grid-template-columns: minmax(0, 12.5rem) repeat(3, minmax(0, 1fr)); gap: 18px; align-items: center; font-size: 0.86rem; padding: 6px 8px; margin-inline: -8px; border-radius: 8px; }
.bb-row.ours { background: var(--accent-wash); }
.bb-row.ours .bar-name { font-weight: 600; }
.bb-head { align-items: end; padding-bottom: 6px; }
.bb-model b { display: block; font-weight: 600; }
.bb-model small { color: var(--muted); font-size: 0.74rem; }
.bb-cell { display: grid; grid-template-columns: 2.5em minmax(0, 1fr) 2.5em; gap: 6px; align-items: center; }
.bb-name { display: none; color: var(--muted); font-size: 0.8rem; }
.bb-num { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; color: var(--accent-ink); font-size: 0.84rem; }
.bb-num.lost { font-weight: 400; color: var(--muted); text-align: left; }
.bb .stack { height: 18px; }
@media (max-width: 760px) {
  .bb-head { display: none; }
  .bb-row { grid-template-columns: 1fr; gap: 5px; padding: 8px 6px; margin-inline: -6px; }
  .bb-cell { grid-template-columns: 7.6em 2.5em minmax(0, 1fr) 2.5em; }
  .bb-name { display: block; }
}

/* ------------------------------------------------------------------ tables */
table.data { border-collapse: collapse; width: 100%; font-size: 0.84rem; font-variant-numeric: tabular-nums; }
table.data th, table.data td { text-align: left; padding: 7px 12px 7px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.data thead th { font-weight: 600; border-bottom: 2px solid var(--accent-rule); white-space: nowrap; color: var(--accent-ink); }
table.data td.num, table.data th.num { text-align: right; padding-right: 20px; }
table.data tr.grp td { border-bottom-color: transparent; }
table.data th small { display: block; font-weight: 400; color: var(--muted); font-size: 0.92em; white-space: normal; }
table.blind td:first-child a { font-weight: 600; text-decoration: none; }
table.blind td:first-child a:hover { text-decoration: underline; }
table.blind td:nth-child(2) { white-space: nowrap; color: var(--muted); }
table.blind td:nth-child(3) { color: var(--ink); font-weight: 600; }
table.blind td:nth-child(4), table.blind td:nth-child(5) { color: var(--ink-2); }
#ev-blind .tablewrap { margin: 0; }
.tablewrap { overflow-x: auto; margin: 16px 0 8px; }

/* ------------------------------------------------------------------ how far to trust a graph */
.ev { margin: 44px 0 0; scroll-margin-top: 70px; }
.ev > h3 { margin-bottom: 0.45em; }
.ev > p { margin: 0 0 1em; }
.ev .plate { margin-top: 18px; }
.ev-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ev-two .card + .card { margin-top: 0; }
@media (max-width: 760px) { .ev-two { grid-template-columns: 1fr; } }
.pairs { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; margin: 0 0 4px; }
.pairs img { border-radius: 4px; aspect-ratio: 1; object-fit: cover; width: 100%; }
.pairs-lab { font-size: 0.78rem; font-weight: 600; margin: 0 0 5px; }
.pairs + .pairs-lab { margin-top: 12px; }
@media (max-width: 640px) { .pairs { grid-template-columns: repeat(5, 1fr); } }
.saegrid { display: grid; grid-template-columns: auto repeat(3, 1fr); gap: 6px 12px; align-items: center; }
.saegrid img { width: 100%; height: auto; }
.sg-col { text-align: center; font-size: 0.82rem; font-weight: 600; padding-left: 8%; }
.sg-row { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 0.82rem; font-weight: 600; text-align: center; }
.sg-row.img { color: var(--img-ink); }
.sg-row.txt { color: var(--txt-ink); }
.sg-lab { display: none; }
@media (max-width: 640px) {
  .saegrid { grid-template-columns: repeat(2, 1fr); gap: 10px 12px; }
  .saegrid > span { display: none; }
  .sg-lab { display: block; font-size: 0.78rem; color: var(--muted); text-align: center; }
}
/* a value on a common scale: label, bar, number */
.meters { display: grid; grid-template-columns: minmax(0, max-content) minmax(60px, 1fr) max-content; gap: 9px 12px; align-items: center; font-size: 0.84rem; margin: 0; }
.meters .m-lab { color: var(--ink-2); line-height: 1.35; max-width: 20rem; }
.meters .m-lab small { display: block; color: var(--faint); font-size: 0.74rem; }
.meters .m-bar { height: 14px; border-radius: 7px; background: var(--wash-2); overflow: hidden; }
.meters .m-bar i { display: block; height: 100%; width: calc(var(--v) * 100%); border-radius: 7px; background: var(--accent); }
.meters .m-bar.dim i { background: var(--faint); }
.meters .m-val { font-weight: 600; font-variant-numeric: tabular-nums; }
.meters.agree { padding-top: 6px; }
.meters.agree .m-lab { max-width: 17rem; }
/* what a pruned graph accounts for: one stacked bar per kind of target */
.shares { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 14px; align-items: center; font-size: 0.84rem; }
.shares .s-lab small { display: block; color: var(--faint); font-size: 0.74rem; }
.sharestack { display: flex; height: 26px; gap: 1px; border-radius: 6px; overflow: hidden; font: 500 0.72rem var(--sans); font-variant-numeric: tabular-nums; background: #fff; }
.sharestack span { display: flex; align-items: center; justify-content: center; min-width: 0; overflow: hidden; flex: var(--v) 0 0; }
.s-feat { background: var(--accent); color: #fff; }
.s-err { background: #8d96a5; color: #fff; }
.s-in { background: #fff; color: var(--ink); border: 1.5px solid var(--ink-2); }
.s-thr { background: repeating-linear-gradient(135deg, #dfe3ea, #dfe3ea 4px, #fff 4px, #fff 8px); color: var(--ink); border: 1px solid #d3d8e0; }
.s-prn { background: repeating-linear-gradient(45deg, #eceff4, #eceff4 2px, #fff 2px, #fff 6px); color: var(--ink); border: 1px solid #d3d8e0; }
.legend .sw.s-in { border-width: 1.5px; }
/* a mean on its range, against a reference */
/* three backbones side by side */
.bcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.bcards .card + .card { margin-top: 0; }
.bcards h4 { font-size: 1.02rem; margin: 0 0 8px; }
.bcards .meters { grid-template-columns: minmax(0, 1fr) max-content; gap: 3px 8px; font-size: 0.78rem; }
.bcards .meters .m-lab { grid-column: 1 / -1; margin-top: 6px; }
@media (max-width: 760px) { .bcards { grid-template-columns: 1fr; } }
.bcards .spec svg { display: block; width: 100%; height: auto; }
.bcards .spec p { margin: 7px 0 14px; font-size: 0.84rem; line-height: 1.45; color: var(--ink); }
.bcards .spec p:last-child { margin-bottom: 0; }
.arch .i { fill: var(--img); }
.arch .t { fill: var(--txt); }
.arch .o, .arch .s { fill: #d9dee7; }
.steps rect { fill: var(--lab-orig); }
@media (min-width: 761px) {
  .bcards { grid-template-rows: auto auto auto; }
  .bcards > .card { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 14px; align-content: start; }
  .bcards > .card > * { margin: 0; }
}
.bcards > .note { grid-column: 1 / -1; margin: 2px 4px 0; }
.bcards .meters { border-top: 1px solid var(--rule); padding-top: 4px; }
/* the blind evaluation: the condition the graph predicts against its control */
.limits { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.limits li { margin: 0; padding: 14px 16px; background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow-1); font-size: 0.88rem; line-height: 1.5; color: var(--ink-2); }
.limits li b { display: block; color: var(--ink); margin-bottom: 3px; }
.limits li:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (max-width: 760px) { .limits { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ atlas */
.atlas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; margin: 16px 0; }
#atlas > .tabs { margin: 18px 0 4px; }
.acard { border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px; min-width: 0; background: #fff; box-shadow: var(--shadow-1); }
.acard h4 { font-size: 1.12rem; margin: 0 0 2px; }
.acard h4.anon { font: 500 0.86rem var(--mono); color: var(--muted); }
.acard .desc { margin: 0 0 8px; font-size: 0.82rem; color: var(--muted); min-height: 1.3em; }
.acard .big { margin-bottom: 4px; }
.acard .thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.acard .thumbs button { border: 0; padding: 0; background: none; cursor: pointer; border-radius: 4px; }
.acard .thumbs button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--accent); }
.acard .cap { font-size: 0.76rem; color: var(--ink-2); margin: 6px 0 0; min-height: 2.5em; }
.acard .ex-list { gap: 3px; }
.acard .ex { padding: 4px 6px; }
.acard .ex-text { font-size: 0.74rem; }
.prof { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; align-items: end; height: 26px; margin-top: 8px; }
.prof i { background: var(--accent-rule); border-radius: 2px 2px 0 0; min-height: 1px; }
.prof-cap { display: flex; justify-content: space-between; font-size: 0.68rem; color: var(--faint); margin: 2px 0 0; }
.atlas-more { display: flex; justify-content: center; margin: 8px 0 0; }

/* ------------------------------------------------------------------ explorer launcher */
/* tiles of one width, four, three or two to a row; a last row that is not full is centred */
.launch { --cols: 4; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 20px 0 8px; }
.launch > button { flex: 0 0 calc((100% - (var(--cols) - 1) * 12px) / var(--cols)); min-width: 0; }
@media (max-width: 900px) { .launch { --cols: 3; } }
@media (max-width: 640px) { .launch { --cols: 2; gap: 8px; } .launch > button { flex-basis: calc((100% - 8px) / 2); } }
.launch button { display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; border: 1px solid var(--rule); border-radius: var(--radius); background: #fff; padding: 0; overflow: hidden; cursor: pointer; text-align: left; font: inherit; color: inherit; box-shadow: var(--shadow-1); transition: transform 0.14s, border-color 0.14s, box-shadow 0.14s; }
.launch button:hover, .launch button:focus-visible { border-color: var(--accent); box-shadow: var(--shadow-2); transform: translateY(-2px); }
.launch img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.launch span { display: block; padding: 8px 10px 10px; font-size: 0.8rem; line-height: 1.35; }
.launch span b { display: block; font: 600 0.86rem/1.3 var(--sans); margin-bottom: 3px; }
.launch span q { color: var(--muted); quotes: none; }

/* ------------------------------------------------------------------ end matter */
pre.bib { background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow-1); padding: 16px 84px 16px 16px; overflow-x: auto; font: 400 0.8rem/1.6 var(--mono); position: relative; margin: 12px 0; }
pre.bib button { position: absolute; top: 10px; right: 10px; }
ol.refs { padding-left: 1.4em; font-size: 0.86rem; color: var(--ink-2); }
ol.refs li { margin-bottom: 0.5em; }

/* ------------------------------------------------------------------ the graph explorer */
html.ex-open { overflow: hidden; }
dialog.explorer { width: min(2000px, 100vw - 40px); height: min(1300px, 100vh - 40px); max-width: none; max-height: none; padding: 0; border: 0; border-radius: 14px; background: #fff; color: var(--ink); overflow: hidden; box-shadow: 0 30px 90px rgba(10, 14, 20, 0.4); }
dialog.explorer[open] { display: flex; flex-direction: column; }
dialog.explorer[open], dialog.fsheet[open] { animation: pop-in 0.18s ease-out; }
dialog.explorer[open]::backdrop, dialog.fsheet[open]::backdrop { animation: fade-in 0.18s ease-out; }
dialog.explorer::backdrop { background: rgba(23, 26, 33, 0.5); }
.xhead { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--rule); flex: none; flex-wrap: wrap; background: var(--wash); }
.xhead strong { font-size: 0.95rem; white-space: nowrap; }
.gm { position: relative; flex: 1 1 300px; min-width: 0; }
.gm-btn { display: flex; align-items: center; gap: 12px; width: 100%; height: 34px; padding: 0 32px 0 12px; border: 1px solid var(--rule); border-radius: 8px; background: #fff; font: inherit; color: var(--ink); text-align: left; cursor: pointer; position: relative; white-space: nowrap; }
.gm-btn::after { content: ""; position: absolute; right: 13px; top: 50%; width: 7px; height: 7px; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: translateY(-70%) rotate(45deg); }
.gm-btn[aria-expanded="true"]::after { transform: translateY(-20%) rotate(225deg); }
.gm-btn:hover { border-color: var(--accent-rule); }
.gm-prompt { font: 400 0.8rem var(--mono); quotes: none; color: var(--ink-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.gm-btn .gm-prompt { flex: 0 1 auto; }
.gm-feat { font-size: 0.95rem; flex: none; }
.gm-where { font-size: 0.76rem; color: var(--muted); flex: none; }
.gm-list:not([hidden]) { animation: pop-in 0.12s ease-out; }
.gm-list { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; min-width: 100%; max-height: min(70vh, 680px); overflow: auto; padding: 6px; background: #fff; border: 1px solid var(--rule); border-radius: 10px; box-shadow: 0 18px 44px rgba(10, 14, 20, 0.18); }
.gm-head { position: sticky; top: -6px; z-index: 1; margin: 0 -6px; padding: 10px 20px 6px; background: #fff; font-size: 0.9rem; font-weight: 600; color: var(--ink); }
.gm-list > div + div { margin-top: 6px; border-top: 1px solid var(--rule); }
.gm-opt { display: grid; grid-template-columns: minmax(0, 1fr) 10.5rem 11.5rem; gap: 14px; align-items: baseline; padding: 7px 14px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.gm-opt:hover, .gm-opt:focus { background: var(--accent-wash); outline: none; }
.gm-opt[aria-selected="true"] { box-shadow: inset 3px 0 0 var(--accent); }
.gm-opt .gm-feat { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) {
  .gm-btn .gm-where { display: none; }
  .gm-opt { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; }
  .gm-opt .gm-prompt { grid-column: 1 / -1; }
}
.xhead input[type="search"] { flex: 0 1 190px; min-width: 120px; height: 32px; border: 1px solid var(--rule); border-radius: 8px; padding: 0 10px; font: inherit; font-size: 0.86rem; }
.xstep { font-size: 0.82rem; color: var(--muted); white-space: nowrap; }
.xbody { flex: 1; min-height: 0; display: grid; grid-template-columns: clamp(230px, 15vw, 320px) minmax(0, 1fr) clamp(300px, 19vw, 420px); }
.xstage { padding: 14px; border-right: 1px solid var(--rule); overflow: auto; }
.xstage .heatimg { width: 100%; }
.xstage .where-prompt { margin: 12px 0 6px; }
.xstage h5, .xlist h5 { font-size: 0.78rem; font-weight: 600; margin: 16px 0 6px; }
.xgroups { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.xgroups h5 { flex: 1 0 100%; }
.xgroups button.feat { background: var(--wash); font-size: 0.95rem; padding-left: 8px; }
.xgroups button.feat::before { display: none; }
.xgroups small { font: 400 0.7rem var(--mono); color: var(--muted); }
.xctl { display: grid; gap: 14px; margin-top: 20px; font-size: 0.8rem; color: var(--ink-2); }
.xslider { display: grid; gap: 6px; }
.xslider > span { display: flex; justify-content: space-between; align-items: baseline; }
.xslider output { font: 500 0.76rem var(--mono); color: var(--accent-ink); }
/* the sliders and the checkbox in the page's accent, drawn the same in every browser */
.xctl input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 18px; margin: 0; background: transparent; cursor: pointer; }
.xctl input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--accent) var(--p, 50%), var(--rule) var(--p, 50%)); }
.xctl input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--accent) var(--p, 50%), var(--rule) var(--p, 50%)); }
.xctl input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); box-shadow: 0 1px 3px rgba(10, 14, 20, 0.2); transition: transform 0.12s; }
.xctl input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); box-shadow: 0 1px 3px rgba(10, 14, 20, 0.2); }
.xctl input[type="range"]:hover::-webkit-slider-thumb, .xctl input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.12); }
.xctl input[type="range"]:focus-visible { outline: none; }
.xctl input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--accent-rule); }
.xctl input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px var(--accent-rule); }
.xctl label.check { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.xctl input[type="checkbox"] { -webkit-appearance: none; appearance: none; flex: none; width: 16px; height: 16px; margin: 0; border: 1.5px solid var(--accent-rule); border-radius: 4px; background: #fff center / 11px no-repeat; cursor: pointer; transition: background-color 0.12s, border-color 0.12s; }
.xctl input[type="checkbox"]:hover { border-color: var(--accent); }
.xctl input[type="checkbox"]:checked { background-color: var(--accent); border-color: var(--accent); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.xctl input[type="checkbox"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.xcanvas { overflow: auto; padding: 8px; min-width: 0; }
.xgraph { display: block; }
.xrow, .xtok { font: 400 10.5px var(--sans); fill: var(--muted); }
.xtok { font-family: var(--mono); font-size: 10px; }
.xe { fill: none; }
.xe.pos { stroke: var(--pos); }
.xe.neg { stroke: var(--neg); }
.xedges.dim .xe:not(.mine) { opacity: 0.06; }
.xn { cursor: pointer; outline: none; }
.xn.far { opacity: 0.28; }
.xdot { stroke: #fff; stroke-width: 1; }
.xn.txt .xdot { fill: var(--txt); }
.xn.img .xdot { fill: var(--img); }
.xn.target .xdot { stroke: var(--ink); stroke-width: 2.4; }
.xn:hover .xdot, .xn:focus-visible .xdot, .xn.sel .xdot { stroke: var(--ink); stroke-width: 2.4; }
.xerr { fill: var(--faint); }
.xin { fill: #fff; stroke: var(--ink-2); stroke-width: 1.2; }
.xlabel { font: 400 10px var(--mono); fill: var(--ink-2); paint-order: stroke; stroke: rgba(255, 255, 255, 0.85); stroke-width: 3px; pointer-events: none; }
.xlabel.named { font: italic 500 12.5px var(--serif); fill: var(--ink); stroke: rgba(255, 255, 255, 0.92); stroke-width: 4px; stroke-linejoin: round; }
.xlabel.far { opacity: 0.28; }
.xpanel { padding: 14px; border-left: 1px solid var(--rule); overflow: auto; font-size: 0.88rem; line-height: 1.45; }
.xpanel h4 { font-size: 1.2rem; }
.xpanel .xback { margin-bottom: 12px; }
.xlist ul { list-style: none; margin: 0; padding: 0; }
.xlist li button { display: grid; grid-template-columns: minmax(0, 1fr) 56px 50px; gap: 8px; align-items: center; width: 100%; border: 0; background: none; padding: 3px 4px; border-radius: 5px; cursor: pointer; text-align: left; font-size: 0.82rem; }
.xlist li button:hover { background: var(--accent-wash); }
.xlist .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 0.76rem; }
.xlist .nm.named { font: italic 500 0.98rem var(--serif); }
.xlist .nm small { color: var(--faint); font: 400 0.68rem var(--mono); }
.xlist .bar { height: 6px; background: var(--wash); border-radius: 3px; overflow: hidden; }
.xlist .bar i { display: block; height: 100%; }
.xlist .bar .pos { background: var(--pos); }
.xlist .bar .neg { background: var(--neg); }
.xlist .w { font: 400 0.74rem var(--mono); text-align: right; color: var(--ink-2); }
@media (max-width: 1000px) {
  dialog.explorer { width: 100vw; height: 100vh; border-radius: 0; border: 0; }
  .xbody { grid-template-columns: 1fr; grid-auto-rows: max-content; overflow: auto; }
  .xstage { border-right: 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 96px 1fr; gap: 0 12px; overflow: visible; }
  .xstage .heatimg { grid-row: span 3; }
  .xstage .xctl, .xstage .xgroups, .xstage > .small { grid-column: 1 / -1; }
  .xcanvas { overflow-x: auto; }
  .xpanel { border-left: 0; border-top: 1px solid var(--rule); overflow: visible; }
}
/* the explorer's key to its colors */
.xkey { margin: 10px 0 0; }
.xkey .sw.dot { border-radius: 50%; }
.xkey .sw.line { width: 14px; height: 3px; border-radius: 2px; vertical-align: 3px; }
.xkey .sw.box { background: #fff; border: 1.2px solid var(--ink-2); }

/* ------------------------------------------------------------------ the feature sheet: examples at full size */
dialog.fsheet { width: min(1240px, calc(100vw - 24px)); max-width: none; max-height: calc(100vh - 24px); border: 0; border-radius: 14px; padding: 0 20px 18px; color: var(--ink); background: #fff; box-shadow: 0 24px 80px rgba(10, 14, 20, 0.35); }
dialog.fsheet::backdrop { background: rgba(23, 26, 33, 0.55); }
.fs-head { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 14px 44px 12px 0; background: #fff; border-bottom: 1px solid var(--rule); }
.fs-head h3 { margin: 0; font-size: 1.3rem; }
.fs-head h3.fs-anon { font: 500 1rem var(--mono); }
.fs-head .fc-meta { margin: 2px 0 0; }
.fs-close { position: absolute; right: 0; top: 10px; border: 0; background: none; font-size: 1.7rem; line-height: 1; padding: 4px 10px; cursor: pointer; color: var(--muted); }
.fs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; margin: 16px 0 12px; }
.fs-ex { margin: 0; }
.fs-ex .heatimg { border-radius: 8px; }
.fs-ex figcaption { margin-top: 6px; font-size: 0.86rem; color: var(--ink-2); }
.fs-note { margin: 0; font-size: 0.8rem; color: var(--muted); }
@media (max-width: 640px) { dialog.fsheet { padding: 0 12px 14px; } }
