/* SpatialProbe project page. White page, serif headings, system sans body, paper palette. */
:root {
  --bg: #ffffff;
  --ink: #1d1f23;
  --ink-2: #464a52;
  --muted: #6b7078;
  --line: #e6e8ec;
  --soft: #f6f7f9;
  --con: #7570B3;
  --con-fill: #EFEEF7;
  --op: #FC8D62;
  --op-ink: #C9592E;
  --op-fill: #FEF0EA;
  --use: #66C2A5;
  --use-ink: #2F8D6F;
  --use-fill: #ECF7F3;
  --rep: #4A86D0;
  --rep-fill: #EAF2FB;
  --plan: #eceef1;
  --serif: "Times New Roman", "Liberation Serif", "Nimbus Roman", "Nimbus Roman No9 L", "DejaVu Serif", Times, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Liberation Sans", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", "DejaVu Sans Mono", monospace;

  --content: 1100px;                              /* content column */
  --gutter: clamp(20px, 6vw, 96px);              /* fluid side margins */
  --prose: 70ch;                                 /* reading width */
  --nav-h: 60px;
  --section-y: clamp(64px, 8vw, 112px);          /* vertical rhythm between sections */
  --block-gap: clamp(28px, 3.4vw, 44px);         /* heading block to content */
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 8px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, video, svg { max-width: 100%; }
a { color: var(--rep); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: 0.86em; }
:focus-visible { outline: 2px solid var(--rep); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: calc(var(--content) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  background: rgba(255, 255, 255, 0.9); backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.nav.scrolled, .nav.open { border-bottom-color: var(--line); }
.nav .wrap { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { font: 700 19px/1 var(--serif); color: var(--ink); letter-spacing: .01em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.nav ul { list-style: none; margin: 0 0 0 auto; padding: 0; display: flex; gap: 2px; }
.nav li a {
  display: block; padding: 6px 11px; border-radius: 999px; color: var(--ink-2); font-size: 14.5px; white-space: nowrap;
  transition: background .2s, color .2s;
}
.nav li a:hover { background: var(--soft); text-decoration: none; }
.nav li a.active { color: var(--ink); background: var(--rep-fill); }
.nav-toggle {
  display: none; margin-left: auto; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; cursor: pointer; align-items: center; justify-content: center; color: var(--ink);
}
.nav-toggle svg { width: 18px; height: 18px; }
.nav-toggle .x { display: none; }
.nav.open .nav-toggle .bars { display: none; }
.nav.open .nav-toggle .x { display: block; }

/* ---------- sections and type ---------- */
section { padding: var(--section-y) 0; border-top: 1px solid var(--line); }
section.hero { border-top: 0; padding: clamp(36px, 7vh, 84px) 0 var(--section-y); }
.eyebrow {
  font: 600 12.5px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
  margin: 0 0 14px; display: flex; align-items: center; gap: 10px;
}
.eyebrow .num { color: var(--rep); }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); }
h2 { font-size: clamp(25px, 2.5vw, 32px); line-height: 1.2; font-weight: 600; margin: 0 auto 16px; letter-spacing: -.005em;
     text-align: center; max-width: 26em; text-wrap: balance; }
h3 { font-size: clamp(19px, 1.6vw, 22px); line-height: 1.28; font-weight: 600; margin: 0 0 10px; }
.lead { font-size: 16px; line-height: 1.65; color: var(--ink-2); max-width: var(--prose); margin: 0 auto var(--block-gap);
        text-align: center; text-wrap: pretty; }
.prose { font-size: 15.5px; line-height: 1.72; color: var(--ink); max-width: var(--prose); margin: 0 auto 26px; text-wrap: pretty; }
h3.sub { max-width: var(--prose); margin: calc(var(--block-gap) * 1.3) auto 12px; }
.m { font-family: var(--serif); font-style: italic; font-size: 1.08em; white-space: nowrap; }
.m sub { font-size: .72em; }
figure.wide { margin: 30px 0 calc(var(--block-gap) * 1.1); }
figure.wide img { display: block; width: 100%; height: auto; }
.fig-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

figure { margin: 0; }
figcaption, .caption {
  font-size: 14px; line-height: 1.5; color: var(--muted); margin: 12px auto 0; max-width: min(100%, 940px); text-align: center;
}
figcaption b, .caption b { color: var(--ink-2); font-weight: 600; }

/* ---------- hero ---------- */
.hero { text-align: center; }
.hero .kicker { font: 600 12.5px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: clamp(16px, 2.4vh, 26px); }
.hero h1 {
  font-size: clamp(25px, calc(2.2vw + 10px), 40px); line-height: 1.22; font-weight: 500; letter-spacing: -.005em;
  margin: 0 auto; max-width: 30em; text-wrap: balance;
}
.hero h1 .bp { display: none; }                 /* the two-line break, wide screens only */
@media (min-width: 1024px) { .hero h1 .bp { display: inline; } .hero h1 { text-wrap: wrap; } }
.hero h1 strong { font-weight: 700; }
.rq {
  font: italic clamp(19px, 1.85vw, 25px)/1.45 var(--serif); color: var(--ink-2); max-width: 36em;
  margin: clamp(18px, 3.2vh, 34px) auto clamp(18px, 3vh, 30px); text-wrap: balance;
}
.hero-links { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 0 0 clamp(24px, 4.5vh, 48px); }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink); font-size: 15px; background: #fff; white-space: nowrap;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.btn:hover { text-decoration: none; border-color: #c9ced6; box-shadow: 0 2px 10px rgba(20, 30, 50, .07); transform: translateY(-1px); }
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn svg { width: 15px; height: 15px; }
.teaser img { display: block; width: 100%; height: auto; }
a.zoom { display: block; cursor: zoom-in; }
#abstract h2 { text-align: center; margin-bottom: 20px; }
.abstract {                                    /* a centred reading column after the centred hero */
  max-width: 612px; margin: 0 auto; font-size: clamp(16px, 1.2vw, 17px); line-height: 1.75; color: var(--ink);   /* narrower than --prose: a distinct centred block */
  text-align: left;
}

/* ---------- video ---------- */
.player {
  position: relative; aspect-ratio: 16 / 9; width: 100%; border-radius: var(--radius); overflow: hidden;
  background: #0f1115; box-shadow: 0 20px 50px -26px rgba(20, 30, 60, .35);
}
.player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #0f1115; }
.player .placeholder {
  position: absolute; inset: 0; display: none; place-items: center; text-align: center;
  background: radial-gradient(120% 90% at 50% 0%, #ffffff 0%, var(--rep-fill) 70%, #dfe9f6 100%); color: var(--ink);
}
.player.missing .placeholder { display: grid; }
.player.missing video { display: none; }
.placeholder .ring {
  width: 74px; height: 74px; border-radius: 50%; margin: 0 auto 18px; display: grid; place-items: center;
  background: #fff; box-shadow: 0 6px 24px rgba(74, 134, 208, .25);
}
.placeholder .ring svg { width: 26px; height: 26px; fill: var(--rep); margin-left: 4px; }
.placeholder .t { font: 600 26px/1.2 var(--serif); }
.placeholder .s { font-size: 15px; color: var(--muted); margin-top: 6px; }

/* ---------- framework ---------- */
.figure-card { border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(10px, 2vw, 24px); background: #fff; }
.figure-card img { display: block; width: 100%; height: auto; }
.dims { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 1.6vw, 20px); margin: var(--block-gap) 0 0; }
.dim { position: relative; border-radius: var(--radius); padding: 20px 22px 20px 26px; overflow: hidden; }
.dim::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.dim .k { font: 600 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--c-ink); }
.dim h3 { margin: 0 0 8px; color: var(--c-ink); }
.dim .q { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--ink); margin-bottom: 10px; line-height: 1.42; }
.dim p { margin: 0; font-size: 15px; color: var(--ink); line-height: 1.6; }
.dim.c { --c: var(--con); --c-ink: var(--con); }
.dim.o { --c: var(--op); --c-ink: var(--op-ink); }
.dim.u { --c: var(--use); --c-ink: var(--use-ink); }

.readout { margin-top: calc(var(--block-gap) * 1.6); }
.readout-head { margin: 0 auto 20px; max-width: var(--prose); }
.readout-head h3 { margin-bottom: 6px; }
.readout-head p { color: var(--ink-2); font-size: 15.5px; margin: 0; }
.anim-box { border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(6px, 1.2vw, 14px); background: #fff; }
.steps { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.steps li {
  display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; padding: 10px 12px; border-radius: 10px;
  cursor: pointer; transition: background .3s; font-size: 14.5px; color: var(--ink-2); line-height: 1.4;
}
.steps li b { display: block; color: var(--ink); font-size: 15px; }
.steps li .n {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 600 13px/1 var(--sans);
  background: var(--rep-fill); color: var(--rep); transition: background .3s, color .3s;
}
.steps li.on { background: var(--rep-fill); }
.steps li.on .n { background: var(--rep); color: #fff; }
#readout-svg { display: block; width: 100%; height: auto; font-family: var(--sans); }
#readout-svg .lbl { font-size: 14px; fill: var(--muted); }
#readout-svg .lbl-i { font-size: 15.5px; fill: var(--muted); font-style: italic; font-family: var(--serif); }
#readout-svg .tok { font-size: 16px; fill: var(--ink-2); font-family: var(--serif); }
#readout-svg .box { fill: #fff; stroke: #c9d3e0; stroke-width: 1.2; transition: stroke .3s; }
#readout-svg .boxtxt { font-size: 14px; fill: var(--ink-2); }
#readout-svg .cell { stroke: #fff; stroke-width: 2; transition: fill .35s ease; }
#readout-svg .cell.img { fill: #dbe6f4; }
#readout-svg .cell.obj { fill: #b7cdec; }
#readout-svg .cell.txt { fill: #eceef1; }
#readout-svg .cell.name { fill: #d5d8de; }
#readout-svg .cell.ans { fill: #eceef1; }
#readout-svg .cell.input.obj { fill: #8fb1df; }
#readout-svg .cell.input.name { fill: #b5bac3; }
#readout-svg .cell.flow, #readout-svg .cell.input.flow { fill: #9cc0ea; }
#readout-svg .cell.hit, #readout-svg .cell.input.hit { fill: var(--rep); }
#readout-svg .ring { fill: none; stroke: var(--rep); stroke-width: 2.2; opacity: 0; transition: opacity .3s; }
#readout-svg .ring.on { opacity: 1; }
#readout-svg .lrow { stroke: var(--rep); stroke-width: 1.2; stroke-dasharray: 4 4; opacity: .55; }
#readout-svg .vec { transition: transform 1.05s cubic-bezier(.45, .05, .2, 1), opacity .4s; }
#readout-svg .panel { fill: #fafbfd; stroke: #dfe4ec; stroke-width: 1.2; }
#readout-svg .probe { fill: #fff; stroke: var(--con); stroke-width: 1.4; }
#readout-svg .bar { transition: transform .6s cubic-bezier(.3, .7, .2, 1); transform-box: fill-box; transform-origin: bottom; }
#readout-svg .tag-txt { font: 600 20px var(--sans); fill: var(--rep); }
#readout-svg .arrow { stroke: #a9b6c8; stroke-width: 1.4; fill: none; }

/* ---------- results ---------- */
.chain { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 0 auto 8px; }
.chain a {
  display: inline-flex; align-items: center; padding: 8px 16px; border-radius: 999px; font: 600 15px/1 var(--sans);
  background: var(--f); color: var(--c);
}
.chain a:hover { text-decoration: none; filter: brightness(.97); }
.chain .arr { color: #b7bcc5; }
.chain a.c { --f: var(--con-fill); --c: var(--con); }
.chain a.o { --f: var(--op-fill); --c: var(--op-ink); }
.chain a.u { --f: var(--use-fill); --c: var(--use-ink); }

.result {
  display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: clamp(28px, 4vw, 56px); align-items: start;
  padding: var(--block-gap) 0; border-top: 1px dashed var(--line);
}
.result:first-of-type { border-top: 0; }
.result:last-of-type { padding-bottom: 0; }
.result .step { font: 600 12.5px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--c); margin-bottom: 10px; }
.result h3 { font-size: clamp(20px, 1.9vw, 24px); margin-bottom: 6px; }
.result .q { font-family: var(--serif); font-style: italic; font-size: 17px; line-height: 1.45; color: var(--ink-2); margin: 0 0 20px; max-width: var(--prose); }
.finding {
  border-left: 3px solid var(--c); background: var(--f); border-radius: 0 12px 12px 0; padding: 16px 20px;
  font-size: 15.5px; line-height: 1.55; color: var(--ink); max-width: var(--prose);
}
.finding .fl { display: block; font: 600 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--c); margin-bottom: 8px; }
.result.c { --c: var(--con); --f: var(--con-fill); }
.result.o { --c: var(--op-ink); --f: var(--op-fill); }
.result.u { --c: var(--use-ink); --f: var(--use-fill); }
.metric { font-size: 13.5px; color: var(--muted); margin: 14px 0 0; line-height: 1.5; max-width: var(--prose); }
.chart-card { position: relative; min-width: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; color: var(--ink-2); margin: 0 0 6px 4px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid line { stroke: #eef0f3; }
.chart .axis text { font: 12px var(--sans); fill: var(--muted); }
.chart .glabel { font: 600 13.5px var(--sans); fill: var(--ink-2); }
.chart .ylab { font: 12px var(--sans); fill: var(--muted); }
.chart .val { font: 600 11.5px var(--sans); fill: var(--ink-2); opacity: 0; transition: opacity .4s; }
.chart.done .val { opacity: 1; }
.chart .hit { fill: transparent; }
.chart .bar { transition: opacity .2s; }
.chart.hovering .bar { opacity: .35; }
.chart.hovering .bar.hl { opacity: 1; }
.chart .base { stroke: #9aa1ab; stroke-width: 1; }
.tip {
  position: absolute; pointer-events: none; z-index: 5; background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 10px; font-size: 13px; line-height: 1.35; box-shadow: 0 6px 20px rgba(20, 30, 50, .12); white-space: nowrap;
  opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s;
}
.tip.on { opacity: 1; transform: none; }
.tip .tv { font: 600 16px/1.2 var(--sans); color: var(--ink); }
.tip .tk { color: var(--muted); }
.tip i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; }

details.paperfig { margin-top: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
details.paperfig summary {
  cursor: pointer; list-style: none; padding: 11px 16px; font-size: 14.5px; color: var(--ink-2); display: flex; align-items: center; gap: 10px;
}
details.paperfig summary::-webkit-details-marker { display: none; }
details.paperfig summary::before { content: ""; flex: none; width: 7px; height: 7px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(-45deg); transition: transform .2s; }
details.paperfig[open] summary::before { transform: rotate(45deg); }
details.paperfig .inner { padding: 6px 18px 18px; }
details.paperfig img { display: block; width: 100%; max-width: 560px; margin: 0 auto; }

/* ---------- explorer ---------- */
.explorer { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 40px; padding: 16px 22px; border-bottom: 1px solid var(--line); background: #fcfcfd; }
.ctl { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ctl-label { font: 600 12px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.seg { display: inline-flex; padding: 3px; background: #f0f1f4; border-radius: 999px; }
.seg button {
  border: 0; background: transparent; padding: 7px 16px; border-radius: 999px; font: 500 14.5px var(--sans); color: var(--ink-2); cursor: pointer;
  transition: background .2s, color .2s, box-shadow .2s;
}
.seg button.on { background: #fff; color: var(--con); box-shadow: 0 1px 4px rgba(20, 30, 50, .12); font-weight: 600; }
.slider-wrap { position: relative; width: clamp(220px, 26vw, 300px); padding-top: 4px; }
.slider-wrap input { width: 100%; accent-color: var(--rep); margin: 0; display: block; }
.ticks { position: relative; height: 20px; font-size: 13px; color: var(--muted); margin-top: 4px; }
.ticks span { position: absolute; top: 0; white-space: nowrap; cursor: pointer; transform: translateX(-50%); padding: 0 2px; }
.ticks span:nth-child(1) { left: 0; transform: none; }
.ticks span:nth-child(2) { left: calc(8px + (100% - 16px) / 3); }
.ticks span:nth-child(3) { left: calc(8px + (100% - 16px) * 2 / 3); }
.ticks span:nth-child(4) { right: 0; transform: none; }
.ticks span.on { color: var(--rep); font-weight: 600; }
#planes { width: 100%; height: clamp(400px, 52vw, 640px); }
.explorer .foot { display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; flex-wrap: wrap; padding: 10px 22px 12px; font-size: 13.5px; color: var(--muted); border-top: 1px solid var(--line); }
.explorer .foot button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 12px; font: 13px var(--sans); color: var(--ink-2); cursor: pointer; }
.noscript-note { padding: 40px; text-align: center; color: var(--muted); }

/* ---------- planning ---------- */
.harness { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 2vw, 22px); }
.harness img { display: block; width: 100%; height: auto; border-radius: 10px; }
.group-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; margin: calc(var(--block-gap) * 1.3) 0 18px; }
.group-title h3 { margin: 0; }
.group-title span { color: var(--muted); font-size: 15px; }
.vgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.8vw, 22px); }
/* two cards (Geometric Assembly): same card width as a 3-column row, centred */
.vgrid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); width: calc((100% - 2 * clamp(14px, 1.8vw, 22px)) * 2 / 3 + clamp(14px, 1.8vw, 22px)); margin-inline: auto; }
.vcard { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; display: flex; flex-direction: column; min-width: 0; }
.vcard .media { position: relative; aspect-ratio: 1 / 1; background: #fff; border-bottom: 1px solid var(--line); flex: none; }
.vcard .media video, .vcard .media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: top; }
.vcard .body { padding: 14px 16px 16px; min-width: 0; }
.type {
  display: inline-block; font: 600 12.5px/1 var(--sans); letter-spacing: .04em; padding: 5px 10px; border-radius: 999px;
  background: var(--plan); color: var(--ink-2); margin-bottom: 10px;
}
.goal { font-size: 15px; line-height: 1.5; color: var(--ink); margin: 0 0 12px; }
.goal::before { content: "Goal "; font-weight: 600; color: var(--muted); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; margin-right: 4px; }
.plan { display: flex; flex-wrap: wrap; gap: 5px 4px; align-items: center; }
.plan .p-l { width: 100%; font-weight: 600; color: var(--muted); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 2px; }
.plan code { background: var(--soft); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: 12px; color: var(--ink-2); overflow-wrap: anywhere; }
.plan .ar { display: none; }                   /* the arrow is drawn before the next step, so it never ends a line */
.plan .ar + code { position: relative; margin-left: 17px; }
.plan .ar + code::before { content: "→"; position: absolute; left: -15px; top: 50%; transform: translateY(-50%); color: #a4abb5; font-family: var(--sans); font-size: 12px; }
.note { font-size: 13.5px; color: var(--muted); margin: 14px 0 0; max-width: var(--prose); }
.vcard .note { margin-top: 10px; }
.vcard.info { background: var(--soft); border-style: dashed; }
.vcard.info dl { margin: 4px 0 0; font-size: 14.5px; line-height: 1.5; }
.vcard.info dt { font-weight: 600; color: var(--ink); margin-top: 12px; }
.vcard.info dd { margin: 4px 0 0; color: var(--ink-2); }

/* ---------- failures ---------- */
.fig7 { margin: 0; }                           /* full content width (the wide redraw of Fig. 7) */
.fig7 img { display: block; width: 100%; height: auto; }
.fig7-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 599px) { .fig7 img { min-width: 600px; } }   /* phones: scroll sideways, labels stay legible */
.case { margin-top: calc(var(--block-gap) * 1.3); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(14px, 2.2vw, 26px); background: #fff; }
.case-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.case-head h3 { margin: 0 0 4px; }
.case-head .meta { font-size: 14.5px; color: var(--muted); }
.ctrl { display: flex; gap: 8px; flex-wrap: wrap; }
.ctrl button {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 7px 14px; font: 14px var(--sans); color: var(--ink); cursor: pointer;
}
.ctrl button:hover { border-color: #c9ced6; }
.ctrl svg { width: 13px; height: 13px; fill: currentColor; }
.goal-line { font-size: 15px; color: var(--ink); margin: 0 0 16px; max-width: var(--prose); }
.goal-line b { color: var(--muted); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; margin-right: 6px; }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(10px, 2vw, 22px); max-width: 880px; margin: 0 auto; align-items: start; }
.pair .side { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; min-width: 0; }
.pair .hd { padding: 10px 14px; font: 600 14.5px/1.3 var(--sans); display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.pair .hd .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.pair .media { position: relative; aspect-ratio: 1 / 1; background: #fff; }
.pair .media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: top; }
.progress { height: 3px; background: var(--line); }
.progress i { display: block; height: 100%; width: 0; background: var(--rep); }
.acts { list-style: none; margin: 0; padding: 12px 14px 14px; font-size: 13px; display: grid; gap: 4px; }
.acts li { display: flex; justify-content: space-between; gap: 2px 10px; align-items: baseline; flex-wrap: wrap; }
.acts li > * { min-width: 0; max-width: 100%; }
.acts code { font-size: 12.5px; color: var(--ink); overflow-wrap: anywhere; }
.acts .st { font-size: 12px; color: var(--muted); }
.acts .st.no { color: #b3261e; font-weight: 600; }
.acts .st.end { color: var(--ink-2); font-weight: 600; }
.outcome { margin: 18px auto 0; max-width: 880px; font-size: 15px; color: var(--ink-2); line-height: 1.55; background: var(--soft); border-radius: 10px; padding: 14px 16px; }
.outcome b { color: #b3261e; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: clamp(48px, 6vw, 72px) 0; text-align: center; }
footer p { margin: 0 0 18px; font: clamp(19px, 1.8vw, 22px)/1.4 var(--serif); }
footer .small { font: 13.5px var(--sans); color: var(--muted); margin-top: 22px; }

/* ---------- reveal (only when JS runs; content is never hidden otherwise) ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .nav li a { padding: 6px 8px; font-size: 14px; }
}
@media (max-width: 980px) {
  .nav ul {
    display: none; position: absolute; top: var(--nav-h); left: 0; right: 0; flex-direction: column; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 14px; box-shadow: 0 12px 24px -16px rgba(20, 30, 50, .25);
  }
  .nav.open ul { display: flex; }
  .nav li a { padding: 10px 12px; font-size: 15.5px; border-radius: 10px; }
  .nav-toggle { display: inline-flex; }
  .result { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .dims { grid-template-columns: minmax(0, 1fr); }
  .dim .q { max-width: var(--prose); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-card { max-width: 720px; }
}
@media (max-width: 900px) and (min-width: 600px) {
  /* video cards become horizontal rows: no orphan cards in a 2-column grid */
  .vgrid, .vgrid.two { grid-template-columns: minmax(0, 1fr); width: auto; }
  .vcard.info .body { padding: 18px 20px; }
}
@media (max-width: 760px) {
  .harness { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 599px) {
  body { font-size: 16px; }
  .vgrid, .vgrid.two { grid-template-columns: minmax(0, 1fr); width: auto; }
  .steps li { padding: 8px; grid-template-columns: 26px 1fr; gap: 8px; font-size: 13.5px; }
  .controls { padding: 14px 16px; gap: 14px; }
  .ctl { width: 100%; justify-content: space-between; }
  .slider-wrap { width: 100%; max-width: 100%; }
  .ctl.slider { display: block; }
  .ctl.slider .ctl-label { display: block; margin-bottom: 8px; }
  .seg button { padding: 7px 12px; font-size: 13.5px; }
  .explorer .foot { padding: 10px 16px 12px; }
  .pair .hd { font-size: 12.5px; padding: 8px 10px; min-height: 50px; align-items: flex-start; }
  .pair .hd .dot { margin-top: 4px; }
  .acts { font-size: 12px; padding: 10px; }
  .acts li { flex-direction: column; }
  .goal-line { font-size: 14px; }
  .hero-links .btn { padding: 8px 14px; font-size: 14px; }
  .acts code { font-size: 11px; overflow-wrap: break-word; }
}
@media (max-width: 380px) {
  .seg button { padding: 6px 9px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}

/* results: along inference (Finding 4) and Finding 5 in neutral ink */
.result.along, #findings-planning { --c: #5d636c; --f: var(--soft); }   /* Findings 4 and 5: one grey finding style */
.along-fig img { display: block; width: 100%; max-width: 520px; height: auto; margin: 0 auto; }
.finding.solo { margin: 28px auto 8px; }

/* planning demos: one row that scrolls and snaps, a part of the next card visible as a hint */
.row-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: calc(var(--block-gap) * 1.3) 0 14px; }
.row-head h3.sub { margin: 0; max-width: none; }
.row-arrows { display: flex; gap: 8px; }
.row-arrows .arrow {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink);
  display: grid; place-items: center; cursor: pointer; transition: border-color .2s, opacity .2s, box-shadow .2s;
}
.row-arrows .arrow:hover:not(:disabled) { border-color: #c9ced6; box-shadow: 0 2px 10px rgba(20, 30, 50, .08); }
.row-arrows .arrow:disabled { opacity: .35; cursor: default; }
.row-arrows .arrow svg { width: 15px; height: 15px; }
.row-arrows .next svg { transform: rotate(180deg); }
.carousel {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(250px, calc((100% - 3 * 20px) / 3.35), 340px);
  column-gap: 20px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  scroll-padding-left: 0; padding: 2px 2px 14px; align-items: start; outline: none;
  scrollbar-width: thin; scrollbar-color: #d3d7dd transparent;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent);
          mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent);
}
.carousel.at-end { -webkit-mask-image: none; mask-image: none; }
.carousel:focus-visible { box-shadow: 0 0 0 2px var(--rep-fill); border-radius: var(--radius); }
.carousel::-webkit-scrollbar { height: 6px; }
.carousel::-webkit-scrollbar-thumb { background: #d3d7dd; border-radius: 3px; }
.carousel .vcard { scroll-snap-align: start; }
.carousel .vcard .body { padding: 12px 14px 14px; }
.task { display: block; font: 600 11.5px/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.carousel .goal { font-size: 14px; }
.carousel .plan code { font-size: 11.5px; }
.carousel .note { font-size: 13px; }

/* the right-side section navigator (wide screens only) */
.sidenav { display: none; }
@media (min-width: 1200px) {
  .nav ul { display: none; }
  .sidenav {
    display: block; position: fixed; right: 18px; top: 50%; transform: translateY(-50%); z-index: 40;
    opacity: 0; pointer-events: none; transition: opacity .35s;
  }
  body.past-hero .sidenav { opacity: 1; pointer-events: auto; }
  .sidenav ul { list-style: none; margin: 0; padding: 0; position: relative; }
  .sidenav .track { position: absolute; right: 4px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
  .sidenav .track i { position: absolute; inset: 0; background: var(--rep); transform-origin: top; transform: scaleY(0); }
  .sidenav li a {
    display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 5px 0; text-decoration: none;
    color: var(--muted); font-size: 12.5px; line-height: 1.2; white-space: nowrap;
  }
  .sidenav .dot {
    order: 2; width: 9px; height: 9px; border-radius: 50%; background: #fff; border: 1.5px solid #c3c8cf; flex: none;
    position: relative; z-index: 1; transition: background .25s, border-color .25s, transform .25s;
  }
  .sidenav .lbl {
    order: 1; opacity: 0; transform: translateX(6px); transition: opacity .2s, transform .2s;
    background: rgba(255, 255, 255, .92); padding: 2px 6px; border-radius: 6px;
  }
  .sidenav li a:hover .lbl, .sidenav li a:focus-visible .lbl { opacity: 1; transform: none; }
  .sidenav li a:hover { color: var(--ink); }
  .sidenav li a.active { color: var(--ink); font-weight: 600; }
  .sidenav li a.active .dot { background: var(--rep); border-color: var(--rep); transform: scale(1.15); }
}
@media (min-width: 1560px) {                    /* room in the margin: the names stay visible */
  .sidenav { right: 28px; }
  .sidenav .lbl { opacity: 1; transform: none; background: none; padding: 0; }
}
@media (max-width: 760px) {
  .row-arrows { display: none; }
  .carousel { grid-auto-columns: 78%; column-gap: 14px; }
}
@media (max-width: 599px) {
  .fig-scroll img { min-width: 600px; }
  .prose { font-size: 15px; }
  .lead { text-align: left; }
}

:root { --con-hl: #E3E2F0; --op-hl: #FEE8E0; --use-hl: #E0F3ED; }   /* the three dimension fills */
.hl { padding: .02em .1em .06em; border-radius: .28em; color: var(--ink); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hl.c { background: var(--con-hl); }
.hl.o { background: var(--op-hl); }
.hl.u { background: var(--use-hl); }
.dim h3 .hl, .result .step .hl { color: var(--ink); }
.result .step .hl { padding: .2em .45em; letter-spacing: .1em; }

/* dimension cards: name, the Introduction's question, what the dimension tests */
.dim { background: #fff; border: 1px solid var(--line); }
.dim::before { width: 3px; }
.dim h3 { font-size: 21px; }
.dim .q { font-size: 16.5px; margin: 0 0 10px; color: var(--ink); }
.dim p { font-size: 14.5px; color: var(--ink-2); }

/* Findings: the claim, then three blocks along the paper's two axes and the planning set */
.lead.claim { font-family: var(--serif); font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; color: var(--ink); max-width: 40em; }
.fblock { padding-top: calc(var(--block-gap) * 1.2); margin-top: calc(var(--block-gap) * 0.6); border-top: 1px solid var(--line); }
.fblock:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
h3.block { text-align: center; font-size: clamp(21px, 2vw, 26px); margin: 0 auto 10px; }
h3.block::after { content: ""; display: block; width: 36px; height: 2px; margin: 12px auto 0; background: var(--rep); border-radius: 1px; }
.fblock > .lead { margin-bottom: 8px; font-size: 15px; color: var(--muted); }
.summary { max-width: var(--prose); margin: 8px auto 0; text-align: center; font: italic 17px/1.55 var(--serif); color: var(--ink); text-wrap: pretty; }
.xp { margin: 4px 0 var(--block-gap); }
.xp-title { font: 600 17px/1.3 var(--serif); margin: 0 0 6px; }
.xp-lead { font-size: 14.5px; color: var(--ink-2); margin: 0 0 14px; max-width: var(--prose); }
.result.along { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); align-items: center; border-top: 0; padding-top: 8px; }
.result.along .finding { margin: 0; }
.cases-title { font: 600 19px/1.3 var(--serif); margin: calc(var(--block-gap) * 1.2) 0 0; }
.cases-title + .case { margin-top: 14px; }
.row-title { font: 600 18px/1.3 var(--serif); margin: 0; }
.row-title span { font: 14px var(--sans); color: var(--muted); margin-left: 10px; }
#findings-planning .fig7 { margin-top: 26px; }
@media (max-width: 980px) {
  .result.along { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 1200px) {
  .sidenav li.sub a { font-size: 11.5px; padding: 3px 0; }
  .sidenav li.sub .dot { width: 6px; height: 6px; margin-right: 1.5px; }
}
@media (max-width: 599px) {
  .chain { gap: 6px; }
  .chain a { padding: 6px 11px; font-size: 13.5px; }
  .chain .arr { font-size: 13px; }
}
@media (max-width: 760px) {                     /* wide paper figures keep legible labels: scroll sideways */
  .fig-scroll img, .fig7 img { min-width: 680px; }
}

/* readout animation: each representation at its own read layer */
#readout-svg .lmark { font: italic 13px var(--serif); fill: var(--muted); transition: fill .3s; }
#readout-svg .lmark.on { fill: var(--rep); font-weight: 600; }
#readout-svg .lp rect { fill: #fff; stroke: #b9cbe4; stroke-width: 1; transition: stroke .3s, fill .3s; }
#readout-svg .lp text { font: italic 15px var(--serif); fill: #7f9bc2; transition: fill .3s; }
#readout-svg .lp.on rect { fill: var(--rep); stroke: var(--rep); }
#readout-svg .lp.on text { fill: #fff; font-weight: 600; }

/* the dimension questions in a darker shade of each dimension's colour (contrast on white >= 4.5:1) */
:root { --con-q: #5B55A0; --op-q: #B54E24; --use-q: #2E7F63; }
.dim.c .q, .result.c .q { color: var(--con-q); }
.dim.o .q, .result.o .q { color: var(--op-q); }
.dim.u .q, .result.u .q { color: var(--use-q); }

/* readout animation, refined: l_p corner tags, the "mean" caption, the step list's read location */
#readout-svg .lp rect { fill: #fff; stroke: #c4d3e8; stroke-width: 1; }
#readout-svg .lp text { font: italic 10.5px var(--serif); fill: #9bb0cc; }
#readout-svg .lp.on rect { fill: var(--rep); stroke: var(--rep); }
#readout-svg .lp.on text { fill: #fff; font-weight: 600; }
#readout-svg .mean { opacity: 0; transition: opacity .3s; }
#readout-svg .mean.on { opacity: 1; }
#readout-svg .mean rect { fill: #fff; stroke: var(--rep); stroke-width: 1; }
#readout-svg .mean text { font: 600 9px var(--sans); fill: var(--rep); letter-spacing: .02em; }
.steps li .where { display: block; margin-top: 3px; font-size: 12.5px; color: var(--muted); font-style: normal; }
.steps li .where sub { font-size: .75em; }

/* SpatialProbe-Bench: the two parts */
h3.sub.part { display: flex; align-items: center; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line); }
h3.sub.part .pn {
  flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font: 600 12.5px/1 var(--sans); color: var(--rep); background: var(--rep-fill);
}
#readout-svg .lbl.small { font-size: 13px; }
.steps li .where .nw { white-space: nowrap; }
/* l_p tags: legible (14 viewBox units), inactive ones faint but readable */
#readout-svg .lp text { font: italic 14px var(--serif); fill: #7b93b8; }
#readout-svg .lp rect { stroke: #b8c9e2; }
#readout-svg .lp.on text { fill: #fff; }
.readout-head p { text-wrap: pretty; }

/* readout animation, phone layout (below 720 px): the grid above the panel, text at least 11 px on screen */
#readout-svg.phone { max-width: 440px; margin: 0 auto; }
#readout-svg.phone .lbl { font-size: 13.5px; }
#readout-svg.phone .lbl.small { font-size: 13.5px; }
#readout-svg.phone .lbl-i { font-size: 14.5px; }
#readout-svg.phone .tok { font-size: 15px; }
#readout-svg.phone .boxtxt { font-size: 13.5px; }
#readout-svg.phone .tag-txt { font-size: 18px; }
#readout-svg.phone .lmark { font-size: 14px; }
#readout-svg.phone .lp text { font-size: 15px; }
#readout-svg.phone .mean text { font-size: 12px; }
#readout-svg .mean text { font-size: 11px; }
#readout-svg.phone .mean text { font-size: 12px; }
/* failure cases: one after another, Stepwise replies as JSON lines */
.case + .case { margin-top: clamp(20px, 2.6vw, 30px); }
.pair .media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: top; }
.acts code { word-break: break-word; }
.progress.still { background: transparent; }
/* phones: the two sides of a failure case stacked (ground truth on top), each full width with its own action list */
@media (max-width: 599px) {
  .pair { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .pair .hd { min-height: 0; font-size: 13.5px; padding: 9px 12px; align-items: center; }
  .pair .hd .dot { margin-top: 0; }
  .pair .media { max-width: 360px; margin: 0 auto; width: 100%; }
  .acts { font-size: 12.5px; padding: 10px 12px 12px; }
  .acts code { font-size: 12px; }
}

/* forward / inverse labels inside the operation question */
.q .dir { display: inline-block; min-width: 4.4em; font-style: normal; font-family: var(--sans, -apple-system, sans-serif); font-size: .8em; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; vertical-align: .08em; }

/* readout: observation patches, p set, accuracy-across-layers curve */
#readout-svg .patch { stroke: rgba(255, 255, 255, .7); stroke-width: 1; }
#readout-svg .pset { font: italic 12.5px var(--serif); fill: var(--muted); }
#readout-svg .pset tspan.on { fill: var(--rep); font-weight: 700; font-style: normal; font-family: var(--sans); }
#readout-svg .axis { stroke: #b9c0ca; stroke-width: 1; }
#readout-svg .acc { fill: none; stroke: var(--con); stroke-width: 2; }
#readout-svg .acc-peak { fill: var(--con); stroke: #fff; stroke-width: 1.5; }
#readout-svg .l0note { font: italic 13px var(--serif); fill: var(--rep); }
#readout-svg.phone .pset { font-size: 14px; }
#readout-svg.phone .l0note { font-size: 14.5px; }
/* l_p tags, active: white fill, blue ring (as the cells' highlight ring), blue text; inactive stay faint */
#readout-svg .lp.on rect { fill: #fff; stroke: var(--rep); stroke-width: 2.2; }
#readout-svg .lp.on text { fill: var(--rep); font-weight: 600; }
#readout-svg .acc-peak, #readout-svg .acc-tag { transition: opacity .25s ease; }
/* image x: the queried object's box wins over the patch grid */
#readout-svg .patch { stroke: rgba(255, 255, 255, .35); }
#readout-svg .objhalo { fill: none; stroke: #fff; stroke-width: 3.5; }
#readout-svg .objbox { fill: none; stroke: #2F6FC0; stroke-width: 2.5; stroke-dasharray: 6 3.5; }
/* image x: a thin white dashed box on the mug, no shadow */
#readout-svg .objhalo { stroke: none; }
#readout-svg .objbox { stroke: #fff; stroke-width: 1.6; stroke-dasharray: 5 3; }

/* question examples: swipe rows of example cards (pixel-exact crops of the supplement's figures) */
figure.exrow { margin: 26px 0 calc(var(--block-gap) * 1.1); }
figure.exrow .row-head { margin-top: 0; }
figure.exrow figcaption { margin-top: 10px; }

.row-title .hl { padding: .04em .32em .1em; }

/* diagnostic-set examples: planning-style cards (photo on top, the figure's text below) */
.exq .media { aspect-ratio: 1 / 1; }
.exq .media > a, .exq .media .tile { display: block; cursor: zoom-in; }
.exq .media > a img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.exq.vcard .media.opmedia { aspect-ratio: auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; padding: 10px; }
.opmedia .tile { position: relative; aspect-ratio: 1 / 1; border-radius: 8px; overflow: hidden; }
.opmedia .tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.opmedia .tile.notshown { outline: 2px dashed #E07A50; outline-offset: -2px; }
.opmedia .tile.notshown img { opacity: .85; }
.opmedia .lab { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); background: rgba(255, 255, 255, .92);
                border-radius: 999px; padding: 1px 8px; font: italic 12.5px/1.4 var(--serif); color: var(--ink); white-space: nowrap; }
.oparrow { display: grid; justify-items: center; color: #E07A50; }
.oparrow i { font: italic 600 15px/1 var(--serif); margin-bottom: 1px; }
.oparrow svg { width: 26px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.exq .task { display: block; }
.carousel.exq.con .task { color: #5B55A0; }
.carousel.exq.op .task { color: #B54E24; }
.type.con { background: var(--con-hl, #E3E2F0); color: #5B55A0; }
.type.op { background: var(--op-hl, #FEE8E0); color: #B54E24; letter-spacing: .02em; }
.exq-q { font-size: 14px; line-height: 1.5; color: var(--ink); margin: 0 0 8px; }
.exq-q .opsent { color: #B54E24; }
.opts { list-style: none; margin: 0; padding: 0; font-size: 14px; line-height: 1.5; color: var(--ink); }
.opts b { font-weight: 600; }
.opts li.ok { color: #1f8a4c; font-weight: 700; }
.opts li.ok b { font-weight: 700; }
.carousel.exq { align-items: stretch; }
.opmedia .tile.notshown { outline: none; }
.opmedia .tile.notshown::after { content: ""; position: absolute; inset: 0; border: 2px dashed #E07A50; border-radius: 8px; pointer-events: none; }

/* action lists in sync with the video: the running step lit, finished steps slightly emphasised, upcoming plain */
.plan code.stp, .acts li.stp { transition: background-color .2s, box-shadow .2s, color .2s; }
.plan code.stp.done { color: var(--ink); border-color: #cfd9e8; }
.plan code.stp.now { background: #EAF2FB; border-color: #4A86D0; box-shadow: 0 0 0 1px #4A86D0; color: #4A86D0; font-weight: 600; }
.acts li.stp { border-radius: 6px; padding: 1px 6px; margin: 0 -6px; }
.acts li.stp.done code { color: var(--ink); }
.acts li.stp:not(.done):not(.now) code { color: var(--ink-2); }
.acts li.stp.now { background: #EAF2FB; box-shadow: inset 0 0 0 1.5px #4A86D0; }
.acts li.stp.now code { color: #4A86D0; font-weight: 600; }
/* a not-executed call: held lit (display only) in the refusal red */
.acts li.stp.refused.now { background: #fbeaea; box-shadow: inset 0 0 0 1.5px #b3261e; }
.acts li.stp.refused.now code { color: #b3261e; }
/* readout: each representation in its own colour (Fig. 2 a): highlighted cells, ring, l_p tags, the curve's peak,
   the "mean" tag, the l = 0 mark, the current p, the step badges; arrows, probe and curve line stay neutral */
#readout-svg .cell.hit, #readout-svg .cell.input.hit { fill: var(--rc, var(--rep)); }
#readout-svg .ring { stroke: var(--rc, var(--rep)); }
#readout-svg .lp.on rect { stroke: var(--rc, var(--rep)); }
#readout-svg .lp.on text { fill: var(--rt, var(--rep)); }
#readout-svg .acc-peak { fill: var(--rc, var(--rep)); }
#readout-svg .mean rect { stroke: var(--rc, var(--rep)); }
#readout-svg .mean text { fill: var(--rt, var(--rep)); }
#readout-svg .lmark.on, #readout-svg .l0note { fill: var(--rt, var(--rep)); }
#readout-svg .pset tspan.on { fill: var(--rt, var(--rep)); }
#readout-svg .tag-txt { fill: var(--rt, var(--rep)); }
.steps li .n { background: var(--rl, var(--rep-fill)); color: var(--rt, var(--rep)); }
.steps li.on .n { background: #fff; color: var(--rt, var(--rep)); box-shadow: inset 0 0 0 2px var(--rc, var(--rep)); }

/* sizes: diagnostic example cards smaller, about four in view on a laptop; on tablets two and a bit
   cards instead of one large one; the right navigator's labels larger and visible from 1480 px */
.carousel.exq { grid-auto-columns: clamp(200px, calc((100% - 3 * 16px) / 4.3), 250px); column-gap: 16px; }
.carousel.exq.op { grid-auto-columns: clamp(220px, calc((100% - 3 * 16px) / 3.8), 285px); }
.carousel.exq .body { padding: 10px 12px 12px; }
.carousel.exq .exq-q, .carousel.exq .opts { font-size: 13px; }
@media (max-width: 980px) and (min-width: 600px) {
  .carousel { grid-auto-columns: clamp(240px, 42%, 320px); column-gap: 16px; }
  .carousel.exq { grid-auto-columns: clamp(200px, 34%, 250px); }
  .carousel.exq.op { grid-auto-columns: clamp(220px, 40%, 285px); }
}
@media (max-width: 599px) {
  .carousel.exq { grid-auto-columns: 64%; }
  .carousel.exq.op { grid-auto-columns: 78%; }
}
@media (min-width: 1200px) {
  .sidenav li a { font-size: 14px; padding: 6px 0; gap: 11px; }
  .sidenav .dot { width: 10px; height: 10px; }
  .sidenav li.sub a { font-size: 13px; padding: 4px 0; }
  .sidenav li.sub .dot { width: 7px; height: 7px; margin-right: 1.5px; }
}
@media (min-width: 1480px) {
  .sidenav { right: 24px; }
  .sidenav .lbl { opacity: 1; transform: none; background: none; padding: 0; }
}

/* type scale (strict sizes): section h2 > part / block titles > result / figure titles > row titles >
   card titles; failure cases are one swipe row like the other example rows */
h3.sub, h3.block { font-size: clamp(21px, 1.9vw, 24px); }
.result h3, .readout-head h3, .dim h3 { font-size: clamp(19px, 1.6vw, 21px); }
.row-title, .xp-title { font: 600 17px/1.3 var(--serif); }
.case-title { font: 600 16px/1.3 var(--sans); color: var(--ink); margin: 0 0 3px; }
.case-head .meta { font-size: 13px; }
.cases-head { margin-top: calc(var(--block-gap) * 1.2); }
.carousel.cases { grid-auto-columns: 88%; column-gap: 20px; align-items: stretch; }
.carousel.cases .case { margin-top: 0; scroll-snap-align: start; }
@media (max-width: 760px) { .carousel.cases { grid-auto-columns: 92%; column-gap: 12px; } }
.carousel.cases { grid-auto-columns: min(740px, 86%); }
.carousel.cases .pair { max-width: none; }
.carousel.cases .outcome { max-width: none; font-size: 14px; }
.carousel.cases .goal-line { font-size: 14px; }
@media (max-width: 760px) { .carousel.cases { grid-auto-columns: 92%; } }
.carousel.cases .case-head { flex-wrap: nowrap; }
.carousel.cases .case-head > div:first-child { flex: 1 1 auto; min-width: 0; }
.carousel.cases .ctrl { flex: none; }
@media (max-width: 599px) { .carousel.cases .case-head { flex-wrap: wrap; } }
.row-title .hl { font: inherit; color: var(--ink); margin-left: 0; }

/* ===== one column, one left edge =====================================================================
   Every section after the cover (title, Figure 1, Abstract) uses one column: its figures, cards and rows span the
   column, and its headings, paragraphs, findings and captions start on the column's left edge (no centred text).
   Paragraphs keep a reading measure (about 72 characters), so their right edge is ragged inside the column.
   Section dividers (the part headings' rules) span the full column, so each block reads as one unit. */
main > section:not(.hero):not(#abstract) h2 { text-align: left; margin-left: 0; margin-right: 0; max-width: none; }
main > section:not(.hero):not(#abstract) .lead { text-align: left; margin-left: 0; margin-right: 0; max-width: 72ch; }
.prose, .readout-head, .summary, .finding.solo, .lead.claim, .xp-lead, .note { margin-left: 0; margin-right: 0; text-align: left; }
.prose, .readout-head, .summary, .finding.solo, .xp-lead { max-width: 72ch; }
h3.sub { max-width: none; margin-left: 0; margin-right: 0; }
h3.block { text-align: left; margin-left: 0; margin-right: 0; }
h3.block::after { margin: 12px 0 0; }
main > section:not(.hero) figcaption, main > section:not(.hero) .caption { text-align: left; margin-left: 0; margin-right: 0; max-width: 90ch; }
.chain { justify-content: flex-start; }

/* ===== variant B: text and figures share BOTH edges =================================================
   One column of --content (1000 px) for every section after the cover; body text, captions, findings and notes run the
   full column width (left-aligned, not justified, body at most 16 px); figures, rows, the explorer, the readout card
   and the video fill the same column. The cover (title, Figure 1, Abstract) keeps its 1100 px width. */
:root { --content: 1000px; }
section.hero .wrap, #abstract .wrap { max-width: calc(1100px + 2 * var(--gutter)); }
main > section:not(.hero):not(#abstract) .lead,
.prose, .readout-head, .summary, .finding.solo, .lead.claim, .xp-lead, .note, .metric, .goal-line,
main > section:not(.hero) figcaption, main > section:not(.hero) .caption { max-width: none; }
.result .q, .finding, .dim .q { max-width: none; }
.carousel.cases .pair, .carousel.cases .outcome { max-width: none; }
#readout-svg .mean text { font-size: 12px; }   /* stays >= 11.5 px in the 1000 px column */

/* the cognitive reasoning chain as a centred formula between the SpatialProbe lead and the framework figure */
.chain-eq { display: flex; justify-content: center; align-items: center; gap: clamp(6px, 1.2vw, 14px);
            margin: 4px auto calc(var(--block-gap) * 0.9); font-family: var(--serif); color: var(--ink);
            font-size: clamp(17px, 2.1vw, 25px); white-space: nowrap; }
.chain-eq .t { font-style: italic; }
.chain-eq .ar { display: grid; justify-items: center; row-gap: 3px; min-width: clamp(54px, 7vw, 92px); }
.chain-eq .ar i { font-size: .72em; line-height: 1; }
.chain-eq .ar b { position: relative; display: block; width: 100%; height: 2px; border-radius: 1px; background: currentColor; }
.chain-eq .ar b::after { content: ""; position: absolute; right: -1px; top: 50%; width: 8px; height: 8px;
                         border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: translateY(-50%) rotate(45deg); }
.chain-eq .ar em { font: 600 11.5px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; font-style: normal; }
.chain-eq .ar.c { color: #5B55A0; } .chain-eq .ar.o { color: #B54E24; } .chain-eq .ar.u { color: #2E7F63; }
@media (max-width: 599px) { .chain-eq { gap: 4px; font-size: 16px; } .chain-eq .ar { min-width: 46px; } .chain-eq .ar em { font-size: 9.5px; letter-spacing: .03em; } }
.chain-eq .ar { padding: 0 3px; }
.chain-eq .ar em { font: italic .62em/1 var(--serif); letter-spacing: 0; text-transform: none; padding-right: 6px; }
@media (max-width: 599px) { .chain-eq { gap: 3px; font-size: 15px; } .chain-eq .ar { min-width: 50px; padding: 0 2px; } .chain-eq .ar em { font-size: .68em; letter-spacing: 0; } }
.eq-lead { margin-bottom: 10px; }
.chain-eq { margin: 6px auto 10px; }
.chain-eq .ar { row-gap: 4px; }
.eq-after { margin-top: 0; margin-bottom: calc(var(--block-gap) * 0.9); }
#spatialprobe > .wrap > .lead { margin-bottom: 12px; }
.eq-lead, .eq-after { font-size: 16px; line-height: 1.65; color: var(--ink-2); }
/* forward / inverse named in the operation card text, in the operation ink */
.dirw { color: #B54E24; font-weight: 600; }
.chart .gsub { font: 12px var(--sans); fill: var(--muted); }
.legend i.hatch { background: repeating-linear-gradient(45deg, #9aa1ab 0 2px, #fff 2px 4px); outline: 1px solid #9aa1ab; outline-offset: -1px; }
.legend i.ans { background: repeating-linear-gradient(45deg, #bfc4cc 0 2px, #fff 2px 4px); outline: 1px solid #8a909a; outline-offset: -1px; }
.video-note { margin-top: 14px; text-align: center; }
.video-note a { color: var(--ink-2); text-decoration: underline; text-decoration-color: #c9ced6; text-underline-offset: 3px; }
.video-note a:hover { color: var(--ink); text-decoration-color: currentColor; }
