/* RoboVerify project page.
   One text column (720px) that headings and prose share; figures, tables and videos break out to 1040px.
   Palette and type follow the overview video. */
:root {
  --ink: #1a1a1a; --text: #2c2c2c; --mut: #6e6e6e; --line: #e3e3e3; --soft: #f4f5f7;
  --red: #c8293a; --pink: #fdeeef; --ds: #a9a9a9; --dsd: #7a7a7a; --as: #3d3d3d; --green: #2e9d5b;
  --c1: #d98b8b; --c2: #c9a45c; --c3: #7fae8a; --c4: #9a86b8; --c5: #6f8ea1;
  --col: 720px; --mid: 880px; --wide: 1040px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--text); background: #fff;
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 16.5px; line-height: 1.72; -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img, video { display: block; max-width: 100%; }
p { margin: 0 0 18px; }
b, strong { font-weight: 700; color: var(--ink); }
.red, b.red { color: var(--red); }
.center { justify-content: center; text-align: center; }
.wrap { max-width: calc(var(--wide) + 56px); margin: 0 auto; padding: 0 28px; }

/* ---------- sticky section nav ---------- */
.topnav { position: fixed; inset: 0 0 auto 0; z-index: 50; height: 52px; background: rgba(255,255,255,.9); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); transform: translateY(-102%); transition: transform .3s ease; }
.topnav.show { transform: none; }
.navin { max-width: calc(var(--wide) + 56px); height: 100%; margin: 0 auto; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { font-weight: 700; font-size: 17px; letter-spacing: -.01em; text-decoration: none; color: var(--ink); }
.navlinks { display: flex; gap: 26px; overflow-x: auto; scrollbar-width: none; }
.navlinks::-webkit-scrollbar { display: none; }
.navlinks a { font-size: 13.5px; font-weight: 600; color: var(--mut); text-decoration: none; line-height: 50px; border-bottom: 2px solid transparent; white-space: nowrap; transition: color .15s; }
.navlinks a:hover { color: var(--ink); }
.navlinks a.on { color: var(--ink); border-color: var(--red); }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 52px 0 0; }
.logos { display: flex; align-items: center; gap: 32px; justify-content: center; }
.logos img { height: 30px; width: auto; }
.logos img.nv { height: 26px; }
h1 { margin: 34px auto 34px; font-weight: 700; color: var(--ink); }
h1 .name { display: block; font-size: clamp(46px, 7vw, 82px); line-height: 1.02; letter-spacing: -.028em; }
h1 .subtitle { display: block; margin-top: 14px; font-size: clamp(18px, 2.3vw, 26px); line-height: 1.25; font-weight: 600; color: #3a3a3a; letter-spacing: -.005em; }
.authors { margin: 0 auto 20px; }
.arow { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 2px; }
.arow + .arow { margin-top: 18px; }
.author { display: block; width: 124px; text-align: center; font-size: 14.5px; line-height: 1.3; font-weight: 600; color: var(--ink); text-decoration: none; }
.author img { width: 68px; height: 68px; margin: 0 auto 8px; border-radius: 50%; transition: box-shadow .15s; }
a.author:hover span { color: var(--red); }
a.author:hover img { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--red); }
.author sup, .aff sup, .note sup { font-size: .68em; color: var(--mut); font-weight: 400; }
.aff { margin: 0 0 2px; color: var(--mut); font-size: 14.5px; }
.aff span { margin: 0 12px; white-space: nowrap; }
.note { margin: 0 0 26px; color: var(--mut); font-size: 13px; }
.links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 20px; border-radius: 999px; background: var(--ink); color: #fff; text-decoration: none; font-weight: 600; font-size: 14px; transition: background .15s; }
.pill:hover { background: #000; }
.pill.soon { background: transparent; color: var(--mut); box-shadow: inset 0 0 0 1.5px var(--line); cursor: default; }
.pill svg { width: 16px; height: 16px; fill: currentColor; }
.pill small { font-weight: 400; font-size: 12px; }

.player { margin: 56px auto 0; max-width: var(--wide); border-radius: 14px; overflow: hidden; background: #000; box-shadow: 0 18px 50px -24px rgba(0,0,0,.35); scroll-margin-top: 72px; }
.player video { width: 100%; height: auto; aspect-ratio: 16 / 9; }

/* ---------- in short: one sentence and the three key numbers ---------- */
.short { text-align: center; margin-top: 84px; }
.tldr { max-width: 780px; margin: 0 auto; font-size: clamp(18px, 2vw, 22px); line-height: 1.55; font-weight: 600; color: var(--ink); letter-spacing: -.005em; }
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; max-width: 940px; margin: 60px auto 0; }
.key { border-top: 2px solid var(--ink); padding-top: 20px; }
.key b { display: block; font-size: clamp(34px, 4.4vw, 52px); line-height: 1.05; letter-spacing: -.025em; color: var(--red); font-variant-numeric: tabular-nums; white-space: nowrap; }
.key b i { font-style: normal; color: var(--dsd); }
.key > span { display: block; margin-top: 12px; font-size: 15.5px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.key small { display: block; margin-top: 3px; font-size: 13.5px; color: var(--mut); }
.pinkpill { display: table; margin: 40px auto 0; padding: 7px 22px; border-radius: 999px; background: var(--pink); color: var(--red); font-weight: 700; font-size: 14.5px; }

/* ---------- sections: every direct child sits in the text column unless it opts out ---------- */
main section { margin-top: 176px; scroll-margin-top: 92px; }
main section > * { max-width: var(--col); margin-left: auto; margin-right: auto; }
main section > .mid { max-width: var(--mid); }
main section > .wide { max-width: var(--wide); }
main section > .fig { max-width: 960px; }

.kicker { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; font-size: 12.5px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: var(--red); }
.kicker::before { content: ""; width: 30px; height: 2px; background: var(--red); }
.kicker span { color: var(--mut); font-weight: 600; letter-spacing: .08em; }
h2 { font-size: clamp(25px, 3vw, 35px); line-height: 1.2; margin-top: 0; margin-bottom: 24px; font-weight: 700; letter-spacing: -.018em; color: var(--ink); }
h3 { font-size: 20px; line-height: 1.3; margin-top: 108px; margin-bottom: 16px; font-weight: 700; letter-spacing: -.005em; color: var(--ink); }
h3 .n { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; margin-right: 12px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 13.5px; vertical-align: 2px; }
h4 { font-size: 16px; margin: 0 0 4px; color: var(--ink); }
.lead { font-size: 19px; line-height: 1.62; color: #333; margin-bottom: 20px; }
.cap { color: var(--mut); font-size: 13.5px; line-height: 1.55; margin-top: 12px; margin-bottom: 0; }
.eq { font-size: 20px; margin: 22px 0 24px; text-align: center; color: var(--ink); font-family: "Cambria Math", "Latin Modern Math", "STIX Two Math", Georgia, serif; }
.takeaway { margin-top: 72px; margin-bottom: 0; padding: 2px 0 2px 22px; border-left: 3px solid var(--red); font-size: 19px; line-height: 1.5; font-weight: 600; color: var(--ink); letter-spacing: -.005em; }
#abstract p { color: #3a3a3a; }

/* ---------- numbered failure modes ---------- */
.mode { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; margin-top: 36px; }
.mode .mk { width: 26px; height: 26px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 700; font-size: 13.5px; display: flex; align-items: center; justify-content: center; margin-top: 2px; }
.mode b { color: var(--ink); }

/* ---------- stat rows ---------- */
.stats { display: grid; gap: 36px; margin-top: 44px; margin-bottom: 0; align-items: start; }
.stats.s2 { grid-template-columns: repeat(2, 1fr); }
.stats.s3 { grid-template-columns: repeat(3, 1fr); }
.stat { border-top: 1px solid var(--ink); padding-top: 16px; font-size: 14px; line-height: 1.5; color: #4a4a4a; }
.stat b { display: block; margin-bottom: 8px; font-size: 34px; line-height: 1.1; letter-spacing: -.022em; color: var(--red); font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat b.long { font-size: 27px; line-height: 1.38; }

/* ---------- two-column blocks ---------- */
/* text on the left keeps the text column's left edge; the chart uses the space to the right */
.two { display: grid; grid-template-columns: 1fr 1.12fr; gap: 56px; align-items: center; margin-top: 28px; padding-left: max(0px, calc((100% - var(--col)) / 2)); }
.two p:last-child { margin-bottom: 0; }

/* ---------- diagrams ---------- */
.fig { margin-top: 44px; margin-bottom: 8px; }
.fig svg { width: 100%; height: auto; display: block; overflow: visible; }
.fig svg text, .chart svg text, #compound-plot text, #realchart text, #ablation text { font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif; }
.dimmed { opacity: .18; }
[data-grp] { transition: opacity .35s ease; }
.flow { stroke-dasharray: 6 7; animation: flow 1.1s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -13; } }
.pulse { transform-box: fill-box; transform-origin: center; animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .95; } 50% { opacity: .35; } }
.blink { animation: blink 2.4s ease-in-out infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.beat circle.k { animation: beat 3.6s ease-in-out infinite; }
@keyframes beat { 0%, 14%, 100% { stroke-width: 3; } 7% { stroke-width: 7; } }
.tool rect { fill: #f4f5f7; animation: toolglow 7.2s ease-in-out infinite; }
@keyframes toolglow { 0%, 12%, 100% { fill: #f4f5f7; } 4%, 8% { fill: #f9d5da; } }
.node rect { fill: #fff; stroke: #cfcfcf; stroke-width: 2; }
.node.key rect { stroke: var(--red); }
.edge { stroke: #b9b9b9; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; align-items: center; }
.chips button { border: 0; cursor: pointer; padding: 6px 15px; border-radius: 999px; background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); color: #444; font: 600 13.5px/1.2 inherit; font-family: inherit; transition: background .15s, color .15s; }
.chips button .k { color: var(--red); margin-right: 6px; }
.chips button:hover, .chips button.on { background: var(--ink); color: #fff; box-shadow: none; }
.chips button:hover .k, .chips button.on .k { color: #ff9aa5; }
.chips .hint { color: #a0a0a0; font-size: 13px; margin-left: 6px; }
.figcap { min-height: 4.8em; max-width: var(--col); margin: 18px auto 0; color: #3a3a3a; font-size: 14.5px; line-height: 1.6; }
.figcap b { color: var(--red); }

/* ---------- principles ---------- */
.principles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 28px; margin-top: 40px; }
.pr { border-top: 1px solid var(--ink); padding-top: 14px; }
.pr > .n { display: block; font-size: 13px; font-weight: 700; color: var(--red); letter-spacing: .08em; margin-bottom: 6px; }
.pr > .n::before { content: "0"; }
.pr h4 { font-size: 15px; line-height: 1.3; margin-bottom: 6px; }
.pr p { margin: 0; font-size: 13.5px; line-height: 1.5; color: #4a4a4a; }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }
table.t th, table.t td { padding: 8px 12px; text-align: right; border-bottom: 1px solid var(--line); }
table.t th { color: var(--mut); font-weight: 600; font-size: 13px; }
table.t th.l, table.t td.l { text-align: left; }
table.t tr.rv td { color: var(--red); font-weight: 700; }
table.t tr.sep td { border-bottom: 1px solid #bdbdbd; }
table.t tr.tot td { font-weight: 700; color: var(--ink); border-bottom: 0; }

/* ---------- charts ---------- */
.legend { display: flex; flex-wrap: wrap; gap: 8px 26px; margin: 0 0 18px; font-size: 13.5px; color: #444; }
.legend i { display: inline-block; width: 13px; height: 13px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; }
.charts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; margin-top: 10px; }
.chart h4 { font-size: 16px; margin: 0; }
.chart .gap { color: var(--red); font-weight: 600; font-size: 13.5px; }
.chart svg, #compound-plot svg, #realchart svg, #ablation svg { width: 100%; height: auto; display: block; overflow: visible; }
.bar { transform-origin: bottom; transform-box: fill-box; }
.hbar { transform-origin: left; transform-box: fill-box; }
.js .bar { transform: scaleY(0); transition: transform 1.1s cubic-bezier(.2,.8,.2,1); }
.js .hbar { transform: scaleX(0); transition: transform 1.1s cubic-bezier(.2,.8,.2,1); }
.js .in .bar, .js .in .hbar { transform: none; }
.slider { display: flex; align-items: center; gap: 14px; margin-top: 10px; font-size: 14px; }
.slider input { flex: 1; accent-color: var(--red); }
.readout { display: flex; gap: 30px; flex-wrap: wrap; margin-top: 6px; font-size: 14px; font-variant-numeric: tabular-nums; color: #444; }
.readout b { font-size: 20px; margin-left: 4px; }

/* ---------- videos ---------- */
.tabs { display: flex; gap: 8px; margin: 0 0 22px; flex-wrap: wrap; }
.tab { border: 0; cursor: pointer; padding: 6px 18px; border-radius: 999px; background: transparent; color: var(--mut); box-shadow: inset 0 0 0 1.5px var(--line); font: 600 14px/1.2 inherit; font-family: inherit; transition: background .15s, color .15s; }
.tab:hover { color: var(--ink); }
.tab.on { background: var(--ink); color: #fff; box-shadow: none; }
.vgrid { display: grid; grid-template-columns: 170px repeat(3, 1fr); gap: 12px; align-items: center; }
.vgrid + .vgrid, .syncgroup .vgrid + .vgrid { margin-top: 16px; }
.vhead + .syncgroup { margin-top: 0; }
.vhead { margin-bottom: 12px; }
.vgrid .colh { font-weight: 700; font-size: 14.5px; padding-bottom: 4px; border-bottom: 3px solid; }
.colh.ds { border-color: var(--ds); color: var(--dsd); } .colh.rv { border-color: var(--red); color: var(--red); } .colh.as { border-color: var(--as); color: var(--as); }
.vgrid .rowh { font-weight: 700; font-size: 15px; line-height: 1.3; padding-right: 10px; color: var(--ink); }
.vgrid .rowh small { display: block; font-weight: 400; color: var(--mut); font-size: 13px; margin-top: 4px; line-height: 1.4; }
.tile { position: relative; border-radius: 8px; overflow: hidden; background: #111; }
.tile video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.tile.real video { aspect-ratio: 640 / 450; }
.tile.sq video { aspect-ratio: 1 / 1; }
.tile .badge { position: absolute; left: 8px; bottom: 8px; border-radius: 6px; padding: 1px 9px; font-size: 12.5px; font-weight: 700; color: #fff; }
.badge.ok { background: var(--green); } .badge.no { background: var(--red); }
/* synced rows: no outcome while a run plays; when it ends, the clip gets a coloured frame and the
   outcome label pops in at the bottom-left corner, leaving the picture itself uncovered */
.sync .tile::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 0 transparent; transition: box-shadow .35s ease; pointer-events: none; }
.sync .tile.done.ok::after { box-shadow: inset 0 0 0 4px var(--green); }
.sync .tile.done.no::after { box-shadow: inset 0 0 0 4px var(--red); }
.sync .tile .badge { z-index: 1; left: 10px; bottom: 10px; font-size: 13.5px; padding: 2px 11px; opacity: 0; transform: translateY(8px) scale(.85); transform-origin: left bottom; transition: opacity .25s ease, transform .4s cubic-bezier(.2,1.5,.4,1); }
.sync .tile.done .badge { opacity: 1; transform: none; }

/* ---------- takeover walkthrough ---------- */
.walk { display: grid; grid-template-columns: 1.5fr 1fr; gap: 52px; align-items: center; margin-top: 40px; }
.wbar { height: 3px; background: var(--line); border-radius: 2px; margin-top: 10px; overflow: hidden; }
.wfill { height: 100%; width: 0; background: var(--red); }
.wsteps { list-style: none; margin: 0; padding: 0; }
.wsteps li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; opacity: .42; transition: opacity .3s; }
.wsteps li:last-child { border-bottom: 0; }
.wsteps li.on, .wsteps li:hover { opacity: 1; }
.wsteps li.done { opacity: .72; }
.wsteps .k { width: 24px; height: 24px; border-radius: 50%; background: #cfcfcf; color: #fff; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; margin-top: 1px; transition: background .3s; }
.wsteps li.on .k, .wsteps li.done .k { background: var(--red); }
.wsteps b { display: block; font-size: 15px; line-height: 1.3; }
.wsteps div > span { display: block; font-size: 13.5px; color: #555; line-height: 1.5; margin-top: 3px; }

/* ---------- bibtex, footer ---------- */
pre.bib { position: relative; margin-top: 0; margin-bottom: 0; padding: 20px 22px; background: var(--soft); border-radius: 12px; font-size: 13px; line-height: 1.6; overflow-x: auto; font-family: Consolas, "SFMono-Regular", Menlo, monospace; color: var(--ink); }
.copy { position: absolute; top: 14px; right: 14px; border: 0; border-radius: 999px; background: var(--ink); color: #fff; padding: 5px 16px; font: 600 13px/1.2 inherit; font-family: inherit; cursor: pointer; }
footer { max-width: var(--col); margin: 140px auto 0; padding: 26px 0 56px; border-top: 1px solid var(--line); color: var(--mut); font-size: 13px; line-height: 1.6; }
footer p { margin: 0 0 8px; }

/* ---------- reveal on scroll (only when the script runs) ---------- */
.js .rv-in { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.js .rv-in.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rv-in { opacity: 1; transform: none; transition: none; }
  .js .bar, .js .hbar { transform: none; transition: none; }
  .flow, .pulse, .blink, .beat circle.k, .tool rect { animation: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .principles { grid-template-columns: repeat(2, 1fr); gap: 24px 32px; }
  .two, .walk { grid-template-columns: 1fr; gap: 36px; }
  .two { max-width: var(--col) !important; padding-left: 0; }
  .charts { grid-template-columns: 1fr; max-width: 460px; margin-left: auto; margin-right: auto; }
  .vgrid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .vgrid .rowh { grid-column: 1 / -1; margin-top: 10px; }
  .vgrid .corner { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap, .navin { padding-left: 18px; padding-right: 18px; }
  .navlinks { gap: 18px; }
  .logos { gap: 18px; } .logos img { height: 24px; } .logos img.nv { height: 20px; }
  .author { width: 96px; font-size: 13px; } .author img { width: 56px; height: 56px; }
  .aff span { display: block; margin: 0; }
  .short { margin-top: 60px; }
  .keys { grid-template-columns: 1fr; gap: 26px; max-width: 340px; }
  .stats.s2, .stats.s3 { grid-template-columns: 1fr; gap: 24px; }
  .principles { grid-template-columns: 1fr; }
  main section { margin-top: 112px; }
  h3 { margin-top: 76px; }
  .lead { font-size: 17.5px; }
  .takeaway { font-size: 17.5px; margin-top: 52px; }
  .vgrid .colh { font-size: 12px; }
  .tile .badge { font-size: 10.5px; padding: 0 6px; left: 5px; bottom: 5px; }
  .sync .tile .badge { font-size: 11px; padding: 0 6px; left: 6px; bottom: 6px; }
  .sync .tile.done.ok::after, .sync .tile.done.no::after { box-shadow: inset 0 0 0 3px var(--green); } .sync .tile.done.no::after { box-shadow: inset 0 0 0 3px var(--red); }
  .chips button { font-size: 12.5px; padding: 5px 11px; }
  .fig { overflow-x: auto; -webkit-overflow-scrolling: touch; } .fig svg { min-width: 720px; }
  table.t { font-size: 13px; } table.t th, table.t td { padding: 7px 8px; }
}
