/* ------------------------------------------------------------------ tokens */
:root {
  --ink: #111827;
  --ink-2: #374151;
  --muted: #6B7280;
  --faint: #9CA3AF;
  --rule: #E5E7EB;
  --rule-2: #F1F3F6;
  --surface: #FFFFFF;
  --surface-2: #F7F8FA;

  /* paper colours: occlusion (Fig. 1/2), OOD test (Fig. 1), condition families (Fig. 3) */
  --occ: #E4572E;
  --occ-ink: #B23A16;
  --occ-wash: #FDEEE9;
  --ood: #7C3AED;
  --ood-ink: #6D28D9;
  --ood-wash: #F3EEFF;
  --c-standard: #9CA3AF;
  --c-latent: #56B4E9;
  --c-conventional: #0072B2;
  --c-sdo: #D55E00;
  --mot-1: #B7A3FB;
  --mot-2: #9B78F8;
  --mot-3: #7C3AED;

  --radius: 10px;
  --wrap: 1080px;
  --gutter: 24px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--surface); color: var(--ink);
  font-family: var(--font); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
b { font-weight: 650; }
sub { font-size: 0.72em; }
.muted { color: var(--muted); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
[hidden] { display: none !important; }

/* ------------------------------------------------------------------ nav */
.topnav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.topnav-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; height: 52px; gap: 16px;
}
.brand { font-weight: 700; text-decoration: none; font-size: 15px; white-space: nowrap; }
.navlinks { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.navlinks::-webkit-scrollbar { display: none; }
.navlinks a {
  text-decoration: none; font-size: 14px; color: var(--muted); padding: 6px 10px; border-radius: 999px; white-space: nowrap;
}
.navlinks a:hover { color: var(--ink); background: var(--rule-2); }
.navlinks a.active { color: var(--ink); background: var(--rule-2); font-weight: 600; }

/* ------------------------------------------------------------------ hero */
.hero { padding: 72px 0 56px; text-align: center; }
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 3.9rem); line-height: 1.05; letter-spacing: -0.025em;
  margin: 0 0 14px; font-weight: 750;
}
.subtitle { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--ink-2); margin: 0 auto 10px; max-width: 760px; line-height: 1.4; }
.authors {
  max-width: 960px; margin: 6px auto 8px; color: var(--ink-2); font-size: 16px; font-weight: 500;
  line-height: 1.7; text-wrap: balance;
}
.affils {
  max-width: 960px; margin: 0 auto 22px; color: var(--muted); font-size: 14px;
  line-height: 1.6; text-wrap: balance;
}
.authors > span { display: inline-block; white-space: nowrap; margin: 0 8px; }
.affils > span { display: inline-block; max-width: 100%; margin: 0 8px; }
.authors sup, .affils sup { font-size: 0.7em; margin-left: 1px; }
.links { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 999px;
  background: var(--ink); color: #fff; text-decoration: none; font-size: 15px; font-weight: 600;
}
.btn.is-disabled { background: var(--rule-2); color: var(--muted); cursor: default; }
.soon { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); }

.tldr {
  margin: 40px auto 0; max-width: 820px; text-align: left; display: flex; gap: 16px; align-items: baseline;
  padding: 18px 22px; background: var(--surface-2); border-radius: var(--radius);
}
.tldr p { margin: 0; }
.tldr-tag { font-weight: 750; font-size: 13px; letter-spacing: 0.04em; flex: none; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px auto 0; max-width: 820px; text-align: left; }
.stat { border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 16px; }
.stat-label { font-size: 13px; color: var(--muted); line-height: 1.35; }
.stat-value { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; margin: 6px 0 2px; }
.stat-value .from { color: var(--faint); font-weight: 600; font-size: 22px; }
.stat-value .arrow { color: var(--faint); font-weight: 400; margin: 0 6px; font-size: 20px; }
.stat-sub { font-size: 13px; color: var(--muted); }

.abstract { max-width: 820px; margin: 18px auto 0; text-align: left; }
.abstract summary {
  cursor: pointer; font-weight: 600; font-size: 15px; color: var(--ink-2); list-style: none; display: inline-flex; gap: 8px; align-items: center;
}
.abstract summary::-webkit-details-marker { display: none; }
.abstract summary::before { content: "+"; font-weight: 700; width: 14px; }
.abstract[open] summary::before { content: "−"; }
.abstract p { color: var(--ink-2); font-size: 16px; }

.overview { max-width: 820px; margin: 28px auto 0; scroll-margin-top: 72px; }   /* same width as the TL;DR and stats */
.overview-video {
  display: block; width: 100%; aspect-ratio: 16 / 9; background: #000;
  border-radius: var(--radius); border: 1px solid var(--rule);
}

/* ------------------------------------------------------------------ sections */
.section { padding: 80px 0; }
.section.alt { background: var(--surface-2); }
.eyebrow {
  margin: 0 0 8px; font-size: 13px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted);
  display: flex; align-items: center; gap: 10px;
}
.section h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 12px; max-width: 860px; }
.lede { color: var(--ink-2); max-width: 780px; margin: 0 0 28px; }
h3.sub { font-size: 20px; margin: 48px 0 14px; }
.note { font-size: 14px; color: var(--muted); max-width: 860px; margin: 14px 0 0; }
.caveat { font-size: 14px; color: var(--muted); max-width: 860px; margin: 14px 0 0; }
.caveat b { color: var(--ink-2); }

.rq-num {
  display: inline-block; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: 0.04em;
  padding: 2px 8px; border-radius: 6px; text-transform: none;
}

.tag { display: inline-block; font-size: 12px; font-weight: 650; padding: 2px 8px; border-radius: 6px; line-height: 1.5; }
.tag-occ { background: var(--occ-wash); color: var(--occ-ink); }
.tag-ood { background: var(--ood-wash); color: var(--ood-ink); }

/* ------------------------------------------------------------------ motivation */
.mot-steps { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0 0 20px; flex-wrap: wrap; }
.mot-steps button {
  font: inherit; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  border: 1px solid var(--rule); background: var(--surface); color: var(--muted); padding: 7px 14px 7px 8px; border-radius: 999px;
}
.mot-steps .n {
  width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center;
  font-size: 12px; font-weight: 700; background: var(--rule-2); color: var(--muted);
}
.mot-steps button[aria-selected="true"] { border-color: var(--ink); color: var(--ink); font-weight: 600; }
.mot-steps button[aria-selected="true"] .n { background: var(--ink); color: #fff; }

.mot-grid { display: grid; grid-template-columns: 1fr 22px 1fr 22px 1.45fr; align-items: stretch; gap: 10px; }
.mot-card { margin: 0; border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px; background: var(--surface); display: flex; flex-direction: column; }
.mot-test { border-color: #D9CCFB; }
.mot-head { font-size: 14px; color: var(--muted); margin-bottom: 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mot-frame { position: relative; aspect-ratio: 4 / 3; border-radius: 6px; overflow: hidden; background: var(--rule-2); }
.mot-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.5s ease; }
.mot-frame img.on { opacity: 1; }
.mot-train .mot-frame { box-shadow: 0 0 0 0 transparent; transition: box-shadow 0.3s; }
.mot[data-step="2"] .mot-train .mot-frame, .mot[data-step="3"] .mot-train .mot-frame { box-shadow: 0 0 0 2px var(--occ); }
.mot-foot { font-size: 13px; color: var(--muted); margin: 8px 0 0; line-height: 1.4; }
.mot-arrow { align-self: center; height: 2px; background: var(--faint); position: relative; }
.mot-arrow::after {
  content: ""; position: absolute; right: -1px; top: -4px; border: 5px solid transparent; border-left: 7px solid var(--faint); border-right: 0;
}

.mot-chart .mot-head { color: var(--ink-2); font-weight: 600; }
.mot-bars { --lw: 120px; position: relative; padding-top: 30px; margin-top: auto; margin-bottom: auto; }
.mbar { display: grid; grid-template-columns: var(--lw) 1fr; align-items: center; height: 46px; }
.mlab { font-size: 14px; color: var(--ink-2); padding-right: 10px; transition: color 0.3s; }
.mbar .track { position: relative; height: 20px; }
.mbar .fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 0 4px 4px 0;
  transition: width 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.mbar[data-row="1"] .fill { background: var(--mot-1); }
.mbar[data-row="2"] .fill { background: var(--mot-2); }
.mbar[data-row="3"] .fill { background: var(--mot-3); }
.mbar .val {
  position: absolute; top: 50%; transform: translateY(-50%); left: calc(var(--v) * 1% + 8px);
  font-size: 15px; font-weight: 700; opacity: 0; transition: opacity 0.4s 0.6s; font-variant-numeric: tabular-nums;
}
.mbar.on .fill { width: calc(var(--v) * 1%); }
.mbar.on .val { opacity: 1; }
.mbar:not(.on) .mlab { color: var(--faint); }
.mot-bars .ref {
  position: absolute; top: 4px; bottom: 26px; left: calc(var(--lw) + (100% - var(--lw)) * var(--v) / 100);
  border-left: 1.5px solid var(--faint);
}
.mot-bars .ref span {
  position: absolute; top: -4px; right: 6px; white-space: nowrap; font-size: 12px; color: var(--muted);
}
.mot-bars .axis { position: relative; height: 22px; margin-left: var(--lw); border-top: 1px solid var(--rule); }
.mot-bars .axis span {
  position: absolute; left: calc(var(--v) * 1%); transform: translateX(-50%); top: 3px; font-size: 12px; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.mot-bars .axis span:first-child { transform: none; }
.mot-bars .axis span:last-child { transform: translateX(-100%); }

.mot-caption { margin-top: 18px; min-height: 56px; max-width: 860px; }
.mot-caption p { margin: 0; font-size: 18px; color: var(--ink-2); }
.replay {
  font: inherit; font-size: 14px; color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline;
  text-underline-offset: 3px;
}

/* ------------------------------------------------------------------ study flow */
.flow {
  display: grid; grid-template-columns: 1.25fr repeat(4, 1fr) 1.2fr; column-gap: 30px; row-gap: 6px;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px 20px 20px;
}
.fnode { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 36px; grid-row: 1; }
.fnode .rq-pill { position: absolute; top: 0; left: 50%; transform: translateX(-50%); }
.rq-pill {
  display: inline-block; white-space: nowrap; text-decoration: none; background: var(--ink); color: #fff;
  font-size: 12px; font-weight: 650; padding: 3px 10px; border-radius: 999px;
}
a.rq-pill:hover, .rq1-bracket:hover .rq-pill { background: var(--ood-ink); }
.fbox, .cams, .targets { height: 84px; display: flex; align-items: center; justify-content: center; }
.fbox {
  width: 100%; max-width: 104px; border-radius: 8px; font-weight: 700; font-size: 18px; border: 1.5px solid var(--faint);
  background: var(--surface-2);
}
.fbox.occ { border: 1.5px dashed var(--occ); color: var(--occ-ink); background: var(--occ-wash); font-family: var(--mono); font-size: 16px; }
.fbox.alt-path { opacity: 0.85; }
.fbox.enc { clip-path: polygon(0 0, 100% 18%, 100% 82%, 0 100%); background: #EEF1F5; border: 0; }
.fbox.wam { background: #EEF1F5; border-color: #CBD3DD; }
.cams { display: grid; grid-template-columns: 1.6fr 1fr; grid-template-rows: 40px 40px; gap: 4px; width: 100%; max-width: 156px; }
.cams img { width: 100%; height: 100%; min-height: 0; object-fit: cover; border-radius: 3px; }
.cams .cam-head { grid-row: 1 / 3; }
.targets { flex-direction: column; gap: 6px; }
.target { display: flex; gap: 3px; }
.chunk {
  font-size: 12px; font-family: var(--mono); border: 1.5px solid #E6A23C; background: #FFF7E8; border-radius: 5px; padding: 1px 6px;
}
.target img { width: 64px; border-radius: 3px; border: 1.5px solid #6B9BD1; }
.fname { font-size: 14px; font-weight: 650; margin-top: 8px; line-height: 1.3; }
.fsub { font-size: 12px; color: var(--muted); line-height: 1.35; }
.fnode:not(.f-out)::after {
  content: ""; position: absolute; right: -25px; top: calc(36px + 42px - 1px); width: 20px; height: 2px; background: var(--faint);
}
.fnode:not(.f-out)::before {
  content: ""; position: absolute; right: -27px; top: calc(36px + 42px - 5px); border: 5px solid transparent; border-left: 7px solid var(--faint);
  border-right: 0; z-index: 1;
}
.rq1-bracket {
  grid-row: 2; grid-column: 2 / 5; position: relative; height: 40px; text-decoration: none; margin: 4px 8% 0;
  border: 2px solid var(--ink); border-top: 0; border-radius: 0 0 8px 8px;
}
.rq1-bracket .rq-pill { position: absolute; left: 50%; bottom: -12px; transform: translateX(-50%); }
.rq1-inline { display: none; }
.flow-note { font-size: 14px; color: var(--muted); margin: 28px 0 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.rq-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 28px; }
.rq-card {
  display: block; text-decoration: none; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 18px; transition: border-color 0.2s, transform 0.2s;
}
.rq-card:hover { border-color: var(--ink); }
.rq-card h3 { margin: 10px 0 4px; font-size: 19px; }
.rq-card p { margin: 0; color: var(--ink-2); font-size: 15px; }
.rq-card .rq-finding { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rule); color: var(--ink); font-weight: 550; }

.bench { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 28px; font-size: 14px; color: var(--ink-2); }

/* ------------------------------------------------------------------ RQ1 */
.rq1-paths { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.path { margin: 0; border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px; }
.path-name { font-weight: 650; margin-bottom: 12px; }
.path p { margin: 12px 0 0; font-size: 15px; color: var(--ink-2); }
.path-flow { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.pc {
  position: relative; font-size: 14px; padding: 5px 12px; border-radius: 7px; background: var(--rule-2); border: 1.5px solid transparent;
  font-weight: 600;
}
.pc:not(:last-child)::after { content: "→"; position: absolute; right: -19px; color: var(--faint); font-weight: 400; }
.pc.occ { border: 1.5px dashed var(--occ); background: var(--occ-wash); color: var(--occ-ink); font-family: var(--mono); }
.pc.enc, .pc.wam { background: #EEF1F5; }
.rq1-canvas { display: block; width: 100%; max-width: 250px; height: auto; margin: 0 auto 16px; border-radius: 6px; background: var(--rule-2); }
.rq1-sample { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 14px; font-size: 14px; color: var(--muted); }
#rq1-q { color: var(--ink-2); font-weight: 650; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ RQ2 playground */
.controlled { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: -12px 0 28px; }
.controlled li { font-size: 13px; color: var(--ink-2); border: 1px solid var(--rule); background: var(--surface); padding: 3px 10px; border-radius: 999px; }

.pg {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 28px;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px;
}
.pg-frame { position: relative; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: var(--rule-2); user-select: none; -webkit-user-select: none; }
.pg-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#pg-img { transition: opacity 0.12s; }
.pg-frame.show-clean #pg-img { opacity: 0; }
.pg-badge { position: absolute; top: 10px; left: 10px; }
.pg-clean-label {
  position: absolute; top: 10px; right: 10px; font-size: 12px; font-weight: 650; padding: 2px 8px; border-radius: 6px;
  background: rgba(17, 24, 39, 0.8); color: #fff; opacity: 0; transition: opacity 0.12s;
}
.pg-frame.show-clean .pg-clean-label { opacity: 1; }
.pg-frame.show-clean .pg-badge { opacity: 0; }
.pg-instr { font-size: 14px; color: var(--muted); margin: 12px 0 0; }

.pg-controls { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.ctl-label { display: block; font-size: 13px; font-weight: 650; color: var(--ink-2); margin-bottom: 8px; }
.scenes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.scenes button {
  padding: 0; border: 0; border-radius: 6px; overflow: hidden; cursor: pointer; aspect-ratio: 4 / 3; background: var(--rule-2);
  outline: 2px solid transparent; outline-offset: 1px; opacity: 0.7; transition: opacity 0.15s;
}
.scenes button img { width: 100%; height: 100%; object-fit: cover; }
.scenes button:hover { opacity: 1; }
.scenes button[aria-checked="true"] { outline-color: var(--ink); opacity: 1; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button {
  font: inherit; font-size: 14px; cursor: pointer; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--rule);
  background: var(--surface); color: var(--ink-2);
}
.seg button:hover { border-color: var(--faint); }
.seg button[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
input[type="range"] { width: 100%; accent-color: var(--ink); margin: 0; }
.ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; padding: 0 2px; }
.ctl-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-sm {
  font: inherit; font-size: 14px; cursor: pointer; padding: 7px 14px; border-radius: 8px; border: 1px solid var(--rule);
  background: var(--surface-2); color: var(--ink); user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
.btn-sm:hover { border-color: var(--faint); }
.btn-sm:active, .btn-sm.pressed { background: var(--rule); }
.pg-desc { border-top: 1px solid var(--rule); padding-top: 14px; font-size: 14px; color: var(--ink-2); }
.pg-desc p { margin: 0 0 6px; }

/* ------------------------------------------------------------------ charts */
.chartblock { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px 20px 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chips button {
  font: inherit; font-size: 13px; cursor: pointer; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--rule);
  background: var(--surface); color: var(--ink-2);
}
.chips button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chart-note { font-size: 15px; color: var(--ink-2); min-height: 48px; margin: 0 0 12px; max-width: 900px; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.panels { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.panel-title { font-size: 15px; font-weight: 650; margin: 10px 0 0; }
.panel-sub { font-size: 12px; color: var(--muted); margin: 0 0 6px; }
.panel svg { display: block; width: 100%; overflow: visible; }
.panel svg text { font-family: var(--font); }
.row { cursor: default; }
.row .dimmable { transition: opacity 0.25s; }
.row.dim .dimmable { opacity: 0.18; }
.row:focus { outline: none; }
.row:focus-visible .hit { stroke: var(--ink); stroke-width: 1.5; }
.chart-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.tableview summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.tableview table { border-collapse: collapse; font-size: 13px; margin-top: 10px; font-variant-numeric: tabular-nums; }
.tableview th, .tableview td { padding: 4px 14px 4px 0; text-align: right; border-bottom: 1px solid var(--rule-2); }
.tableview th:first-child, .tableview td:first-child { text-align: left; }
.tableview th { color: var(--muted); font-weight: 600; }

.tooltip {
  position: fixed; z-index: 50; pointer-events: none; background: var(--ink); color: #fff; font-size: 13px; line-height: 1.45;
  padding: 8px 10px; border-radius: 8px; max-width: 260px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}
.tooltip b { font-weight: 650; }
.tooltip .tt-row { display: flex; justify-content: space-between; gap: 14px; font-variant-numeric: tabular-nums; }
.tooltip .tt-k { color: #C9CED6; }

/* ------------------------------------------------------------------ findings */
.finding {
  margin-top: 28px; background: var(--surface); border: 1px solid var(--rule); border-left: 4px solid var(--ink);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 16px 20px; max-width: 900px;
}
.finding-tag { font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.finding p { margin: 6px 0 0; font-size: 17px; }

/* ------------------------------------------------------------------ RQ3 */
.alloc { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.alloc-card { margin: 0; border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px; background: var(--surface); }
.alloc-card img { width: 100%; max-width: 300px; margin: 0 auto; border-radius: 6px; }
.alloc-name { font-weight: 650; margin-top: 12px; }
.alloc-eq { font-family: var(--mono); font-size: 13px; color: var(--ink-2); margin: 2px 0 6px; }
.alloc-card p { font-size: 14px; color: var(--ink-2); margin: 0; }
.alloc-cov { font-size: 12px; color: var(--muted); margin-top: 8px; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ real robot */
.rr { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px; }
.rr-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.rr-title { font-size: 18px; font-weight: 650; }
.rr-title .muted { font-weight: 500; }
.rr-speed { display: flex; align-items: center; gap: 10px; }
.rr-speed .ctl-label { margin: 0; }
.rr-speed .seg button { font-size: 13px; padding: 4px 11px; font-variant-numeric: tabular-nums; }

.rr-players { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.rr-side { margin: 0; min-width: 0; }
.rr-cap { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 650; margin-bottom: 8px; }
.rr-rate { margin-left: auto; font-size: 14px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.rr-rate::after { content: " successes"; font-weight: 400; color: var(--muted); }
.sw { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.sw-std { background: var(--c-standard); }
.sw-occ { background: var(--occ); }
.rr-video { position: relative; aspect-ratio: 16 / 9; background: #111827; border-radius: 8px; overflow: hidden; }
.rr-video video { display: block; width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.rr-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, 0.25); pointer-events: none; }
.rr-prog i { display: block; height: 100%; width: 0; background: #fff; }
.rr-paused {
  position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%;
  background: rgba(17, 24, 39, 0.7); pointer-events: none; opacity: 0; transition: opacity 0.15s;
}
.rr-paused::after {
  content: ""; position: absolute; left: 20px; top: 16px; border: 10px solid transparent; border-left: 16px solid #fff; border-right: 0;
}
.rr.is-paused .rr-paused { opacity: 1; }
.rr-side.is-empty .rr-paused { opacity: 0; }
.rr-side.is-empty .rr-video::after {
  content: "No clip for this cell"; position: absolute; inset: 0; display: grid; place-items: center; color: #C9CED6; font-size: 14px;
}
.rr-trials { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; min-height: 43px; }
.rr-trials button {
  position: relative; padding: 0; border: 0; width: 76px; aspect-ratio: 16 / 9; border-radius: 5px; overflow: hidden; cursor: pointer;
  background: var(--rule-2); opacity: 0.55; outline: 2px solid transparent; outline-offset: 1px; transition: opacity 0.15s;
}
.rr-trials button img { width: 100%; height: 100%; object-fit: cover; }
.rr-trials button span {
  position: absolute; left: 5px; bottom: 1px; color: #fff; font-size: 12px; font-weight: 700; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}
.rr-trials button:hover { opacity: 0.85; }
.rr-trials button[aria-checked="true"] { opacity: 1; outline-color: var(--ink); }

.rr-matrix-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 4px 16px; flex-wrap: wrap;
  margin: 22px 0 6px; padding-top: 18px; border-top: 1px solid var(--rule);
}
.rr-matrix-head .legend { margin: 0; }
.rr-hint { font-size: 13px; color: var(--muted); margin: 0; }
.rr-scroll { overflow-x: auto; }
.rr-matrix { width: 100%; min-width: 760px; border-collapse: separate; border-spacing: 4px; font-variant-numeric: tabular-nums; }
.rr-matrix th { font-size: 13px; font-weight: 650; color: var(--ink-2); text-align: left; padding: 2px 6px; line-height: 1.3; }
.rr-matrix thead th { color: var(--muted); }
.rr-matrix tbody th, .rr-matrix tfoot th { width: 150px; position: sticky; left: 0; z-index: 1; background: var(--surface); }
.rr-matrix td { padding: 0; }
.rr-cell {
  font: inherit; width: 100%; display: flex; flex-direction: column; gap: 3px; padding: 7px 10px 7px 6px; text-align: left;
  border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); color: inherit; cursor: pointer;
}
button.rr-cell:hover { border-color: var(--faint); }
.rr-cell[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--surface-2); }
.rr-cell.is-static { cursor: default; border-color: transparent; }
.rr-bar { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 6px; font-size: 13px; }
.rr-bar b { font-weight: 650; text-align: right; }
.rr-track { height: 8px; border-radius: 0 4px 4px 0; background: var(--rule-2); }
.rr-track i { display: block; height: 100%; border-radius: 0 4px 4px 0; }
.rr-base .rr-track i { background: var(--c-standard); }
.rr-vocc .rr-track i { background: var(--occ); }
.rr-matrix tfoot th, .rr-matrix tfoot .rr-bar b { color: var(--muted); }

/* ------------------------------------------------------------------ citation / footer */
.bibtex {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px 18px; overflow-x: auto;
  font-family: var(--mono); font-size: 13px; line-height: 1.55; margin: 0;
}
.footer { padding: 28px 0 40px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--rule); }

/* ------------------------------------------------------------------ analysis */
.sens-plot { margin-top: 6px; }
.sens-plot svg { display: block; overflow: visible; }
.sens-plot .pt { outline: none; }
.sens-plot .pt.dim { opacity: 0.2; }
.sens-plot .pt:focus-visible .hit { stroke: var(--ink); stroke-width: 1.5; }
.gen { display: grid; gap: 14px; }
.gen .legend { margin: 0; }
.gen-head, .gen-row { display: grid; grid-template-columns: 210px minmax(0, 1fr) 150px; gap: 18px; align-items: center; }
.gen-head { font-size: 12px; font-weight: 650; color: var(--muted); }
.gen-name b, .gen-delta b { display: block; font-weight: 650; font-variant-numeric: tabular-nums; }
.gen-name span, .gen-delta span { display: block; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.gen-bars { display: grid; gap: 4px; border-left: 1px solid #C9CED6; }
.gbar { display: flex; align-items: center; gap: 6px; }
.gbar i { flex: none; height: 14px; border-radius: 0 4px 4px 0; }
.gbar b { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 900px) {
  .mot-grid { grid-template-columns: 1fr 1fr; }
  .mot-grid .mot-arrow { display: none; }
  .mot-chart { grid-column: 1 / -1; }
  .flow { grid-template-columns: repeat(3, 1fr); row-gap: 26px; }
  .fnode { grid-row: auto; }
  .fnode.f-enc::after, .fnode.f-enc::before { display: none; }
  .rq1-bracket { display: none; }
  .rq1-inline { display: inline-block; }
  .panels { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 760px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .brand { display: none; }
  .topnav-inner { justify-content: flex-start; }
  .hero { padding: 48px 0 40px; }
  .stats, .rq-cards, .bench, .rq1-paths, .alloc { grid-template-columns: 1fr; }
  .tldr { flex-direction: column; gap: 4px; }
  .section { padding: 56px 0; }
  .mot-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .mot-card { padding: 10px; }
  .mot-bars { --lw: 100px; }
  .mot-caption p { font-size: 16px; }
  .flow { grid-template-columns: 1fr 1fr; padding: 16px 12px; column-gap: 26px; }
  .fnode.f-corrupt::after, .fnode.f-corrupt::before, .fnode.f-latent::after, .fnode.f-latent::before { display: none; }
  .fnode.f-enc::after, .fnode.f-enc::before { display: block; }
  .pg { grid-template-columns: 1fr; padding: 14px; gap: 18px; }
  .chartblock { padding: 14px 12px 10px; }
  .alloc-card img { max-width: 260px; }
  .rr { padding: 14px; }
  .rr-players { grid-template-columns: 1fr; gap: 22px; }
  .rr-matrix { min-width: 640px; }
  .rr-matrix tbody th, .rr-matrix tfoot th { width: 104px; font-size: 12px; }
  .gen-head { display: none; }
  .gen-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 8px; }
  .gen-bars { grid-column: 1 / -1; grid-row: 2; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
