/* CodeHOI: project page. A warm off-white page, white cards with a soft shadow, the mauve of the paper's figures as the
   one accent, and the four kinds of matter in the colours of the paper's tables. The program sits in a dark editor. */
@font-face { font-family: "Google Sans Flex"; src: url("../fonts/GoogleSansFlex-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Google Sans Flex"; src: url("../fonts/GoogleSansFlex-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Google Sans Flex"; src: url("../fonts/GoogleSansFlex-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Noto Sans Mono"; src: url("../fonts/NotoSansMono-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Noto Sans Mono"; src: url("../fonts/NotoSansMono-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #f6f5f2; --surface: #ffffff; --surface-2: #eeece7;
  --ink: #1e1e24; --ink-2: #3f3f48; --muted: #66666e; --faint: #a3a2a8;
  --line: #e3e1dc; --line-2: #d1cec7;
  --accent: #a0457a; --accent-ink: #873664; --accent-soft: #f0e3ea;
  /* the kinds of matter: the colour, the colour as text on its tint, the tint */
  --rigid: #2a78d6; --rigid-ink: #235a9e; --rigid-soft: #d5e1f0;
  --deformable: #eb6834; --deformable-ink: #a8481f; --deformable-soft: #f5dfd4;
  --codim: #1baf7a; --codim-ink: #157553; --codim-soft: #d3eade;
  --flowing: #eda100; --flowing-ink: #8a620c; --flowing-soft: #f5e8c9;
  /* the agents of the paper's overview figure */
  --object: #3468c0; --object-soft: #e3eaf6;
  --hoi: #a0457a; --hoi-soft: #f0e3ea;
  --eval: #e8700c; --eval-ink: #b25304; --eval-soft: #fbe9d8;
  --ok: #2f9450; --ok-soft: #dcefe1;
  --stage: #d9d5ce;                                   /* behind a render while it loads: the renders' own backdrop */
  --code-bg: #26262e; --code-bg-2: #2f2f39; --code-fg: #e2e2e8; --code-dim: #8c8c9c; --code-line: rgba(255, 255, 255, .08);
  --shadow: 0 1px 2px rgba(58, 50, 44, .05), 0 10px 28px rgba(58, 50, 44, .08);
  --shadow-s: 0 1px 2px rgba(58, 50, 44, .06), 0 4px 12px rgba(58, 50, 44, .07);
  --sans: "Google Sans Flex", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Noto Sans Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, video, svg { display: block; max-width: 100%; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1128px; margin-left: auto; margin-right: auto; padding-left: 24px; padding-right: 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* a kind of matter sets --m, --m-ink and --m-soft for whatever it holds */
[data-matter="rigid"] { --m: var(--rigid); --m-ink: var(--rigid-ink); --m-soft: var(--rigid-soft); }
[data-matter="deformable"] { --m: var(--deformable); --m-ink: var(--deformable-ink); --m-soft: var(--deformable-soft); }
[data-matter="codim"] { --m: var(--codim); --m-ink: var(--codim-ink); --m-soft: var(--codim-soft); }
[data-matter="flowing"] { --m: var(--flowing); --m-ink: var(--flowing-ink); --m-soft: var(--flowing-soft); }

/* ---------------------------------------------------------------- nav */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(246, 245, 242, .86); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s ease; }
.nav.scrolled { border-bottom-color: var(--line); }
.nav-in { display: flex; align-items: center; gap: 28px; height: 58px; }
.brand { font-weight: 700; font-size: 1.06rem; letter-spacing: -.01em; color: var(--ink); white-space: nowrap; }
.brand b, h1 b { font-weight: inherit; color: var(--accent); }
.brand:hover { text-decoration: none; }
.nav-links { display: flex; gap: 2px; margin-left: auto; }
.nav-links a { color: var(--muted); font-size: .9rem; font-weight: 500; padding: 6px 12px; border-radius: 999px; transition: color .15s ease, background .15s ease; }
.nav-links a:hover { color: var(--ink); text-decoration: none; background: var(--surface-2); }
.nav-links a.on { color: var(--accent-ink); background: var(--accent-soft); }
.nav-cta { font-size: .88rem; font-weight: 500; color: #fff; background: var(--ink); padding: 7px 16px; border-radius: 999px; }
.nav-cta:hover { text-decoration: none; background: #000; }
.nav-cta.disabled { background: var(--surface-2); color: var(--faint); cursor: default; user-select: none; }

/* ---------------------------------------------------------------- hero */
.hero { text-align: center; padding-top: 58px; padding-bottom: 40px; }
.badge { display: inline-block; font-size: .8rem; font-weight: 500; letter-spacing: .06em; color: var(--accent-ink); background: var(--accent-soft); padding: 4px 13px; border-radius: 999px; margin-bottom: 18px; }
h1 { font-size: clamp(3rem, 8.4vw, 5.2rem); line-height: 1; letter-spacing: -.03em; font-weight: 700; margin: 0 0 16px; }
.subtitle { font-size: clamp(1.1rem, 2.5vw, 1.5rem); line-height: 1.35; font-weight: 500; letter-spacing: -.012em; margin: 0 auto 20px; max-width: 760px; text-wrap: balance; }
.authors { margin: 0; font-size: 1.05rem; font-weight: 500; display: flex; justify-content: center; flex-wrap: wrap; gap: 2px 26px; }
.affil { margin: 2px 0 24px; color: var(--muted); }
.buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 17px; border-radius: 999px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font-weight: 500; font-size: .92rem; transition: transform .12s ease, background .12s ease; }
.btn:hover { text-decoration: none; transform: translateY(-1px); background: #000; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { background: var(--surface); }
.btn.disabled, .btn.disabled:hover { background: var(--surface-2); border-color: var(--surface-2); color: var(--faint); cursor: default; transform: none; user-select: none; }
.btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.soon { font-size: .66rem; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; background: #fff; color: var(--muted); padding: 2px 7px; border-radius: 999px; }
.tldr { max-width: 800px; margin: 34px auto 0; padding: 16px 20px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); text-align: left; font-size: 1.02rem; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }
.tldr b { color: var(--accent-ink); font-weight: 700; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.pill { display: inline-flex; align-items: center; gap: 7px; font-size: .84rem; font-weight: 500; padding: 5px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* ---------------------------------------------------------------- sections: full-width rules between them */
main > section { padding: 72px 0; border-top: 1px solid var(--line); }
main > section.first { border-top: 0; padding-top: 4px; }
.sec-head { margin-bottom: 26px; }
.kicker { display: block; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
h2 { font-size: clamp(1.6rem, 3vw, 2.05rem); line-height: 1.2; letter-spacing: -.022em; font-weight: 700; margin: 0; text-wrap: balance; }
h3 { font-size: 1.16rem; line-height: 1.3; letter-spacing: -.012em; font-weight: 700; margin: 0; }
.lead { color: var(--muted); margin: 10px 0 0; }   /* as wide as the results under it: its lines end where the videos end */
.cap { color: var(--muted); font-size: .86rem; line-height: 1.55; margin: 12px 2px 0; }
.sec-bar { margin-bottom: 24px; }
.sec-bar .sec-head { margin-bottom: 16px; }

/* ---------------------------------------------------------------- shared pieces */
/* a solver's tag: its name in the matter's colour on the matter's tint, as in the paper's figures */
.tag { display: inline-flex; align-items: center; height: 21px; padding: 0 8px; border-radius: 999px; font: 700 .68rem/1 var(--mono); letter-spacing: .02em; color: var(--m-ink, var(--ink-2)); background: var(--m-soft, var(--surface-2)); }
.tags { display: inline-flex; gap: 5px; }
.mode { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.mdot { display: inline-flex; align-items: center; gap: 7px; font-size: .86rem; font-weight: 500; }
.mdot::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--m); }
/* a result: a video with rounded corners and a soft shadow, nothing drawn over it */
.vp { position: relative; margin: 0; border-radius: 14px; overflow: hidden; background: var(--stage); box-shadow: var(--shadow-s); }
.vp video { width: 100%; height: 100%; object-fit: cover; }
/* the kinds of matter as tabs: the chosen one filled with its colour */
.mtabs { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.mtab { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 15px 0 13px; border-radius: 999px; border: 1.5px solid var(--line); background: transparent; font-size: .9rem; font-weight: 500; color: var(--muted); cursor: pointer; white-space: nowrap; transition: background .16s ease, color .16s ease, border-color .16s ease; }
.mtab::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--m); transition: background .16s ease; }
.mtab:hover { color: var(--ink); border-color: var(--line-2); }
.mtab[aria-selected="true"] { background: var(--m); border-color: var(--m); color: #fff; }
.mtab[aria-selected="true"]::before { background: #fff; }
/* while the kinds follow one another, a line along the chosen one's foot shows the time it has left */
.mtab[aria-selected="true"]::after, .pick[aria-selected="true"] .pick-img::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: calc(var(--p, 0) * 100%); background: rgba(255, 255, 255, .62); }
.mtab[data-matter="flowing"][aria-selected="true"]::after { background: rgba(43, 32, 5, .34); }
.mtab[data-matter="flowing"][aria-selected="true"] { color: #2b2005; }   /* dark text on the yellow */
.mtab[data-matter="flowing"][aria-selected="true"]::before { background: #2b2005; }

/* ---------------------------------------------------------------- the first card: one run, its input, its program, its reviews */
.run { border-radius: 22px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.run-top { display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(372px, .78fr); }
.run-view { position: relative; min-height: 100%; background: var(--stage); overflow: hidden; }
.run-view::before { content: ""; display: block; padding-top: 75%; }   /* at least 4:3; taller when the panel beside it is */
.run-view video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .28s ease; }
.run-view.swap video { opacity: 0; }
.run-side { display: flex; flex-direction: column; gap: 22px; padding: 24px 26px 22px; border-left: 1px solid var(--line); min-width: 0; }
.block-h { display: flex; align-items: baseline; gap: 10px; margin: 0 0 9px; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.block-h span[data-run] { font-weight: 500; letter-spacing: .04em; text-transform: none; color: var(--faint); font-size: .8rem; }
.block-h .tags { margin-left: auto; align-self: center; }
.in-row { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 14px; align-items: center; }
.in-row img, .bubble { width: 104px; height: 78px; border-radius: 10px; object-fit: cover; box-shadow: var(--shadow-s); }
.in-row blockquote, .g-in blockquote { margin: 0; font-size: 1rem; line-height: 1.45; color: var(--ink); text-wrap: pretty; }
/* the input of a text-only task: no picture, a speech bubble */
.bubble { display: grid; place-items: center; background: var(--accent-soft); box-shadow: none; }
.bubble svg { width: 44%; height: auto; }
/* the Evaluator Agent's rounds, top to bottom */
.rounds { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.round { position: relative; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 11px; align-items: start; }
.round + .round::before { content: ""; position: absolute; left: 11px; top: -12px; height: 12px; width: 2px; background: var(--line); }
.round:not(:last-child)::after { content: ""; position: absolute; left: 11px; top: 24px; bottom: 0; width: 2px; background: var(--line); }
.r-ic { position: relative; z-index: 1; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--eval-soft); color: var(--eval-ink); }
.round.accept .r-ic { background: var(--ok); color: #fff; }
.r-ic svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.r-h { display: flex; align-items: baseline; gap: 8px; font-size: .86rem; line-height: 24px; font-weight: 700; }
.r-h span { font-weight: 500; color: var(--eval-ink); }
.round.accept .r-h span { color: var(--ok); }
.r-h small { font-size: .84rem; font-weight: 400; color: var(--muted); }
.r-h small::before { content: "\00B7"; margin-right: 8px; color: var(--faint); }
.round q { display: block; quotes: "\201C" "\201D"; font-size: .9rem; line-height: 1.45; color: var(--ink-2); text-wrap: pretty; }
.scores { display: grid; grid-template-columns: repeat(4, max-content); gap: 4px 12px; margin: 5px 0 0 -35px; }   /* under the round's mark too: the four fit one line */
.score { display: inline-flex; align-items: center; gap: 5px; font-size: .77rem; color: var(--ink-2); white-space: nowrap; }
.pips { display: inline-flex; gap: 2px; }
.pips i { width: 5px; height: 5px; border-radius: 50%; background: var(--line-2); }
.pips i.on { background: var(--ok); }
/* the four runs, one per kind of matter: a frame of each result and its kind under it; the shown one is ringed */
.picker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: auto; }
.pick { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 0; border: 0; background: none; cursor: pointer; min-width: 0; }
.pick-img { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--stage); box-shadow: var(--shadow-s); transition: transform .14s ease, box-shadow .14s ease; }
.pick-img img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.pick-lab { font-size: .72rem; font-weight: 500; line-height: 1.2; text-align: center; color: var(--muted); transition: color .14s ease; }
.pick:hover .pick-img { transform: translateY(-2px); }
.pick:hover .pick-lab { color: var(--ink); }
.pick[aria-selected="true"] .pick-img { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--m); }
.pick[aria-selected="true"] .pick-img::after { background: var(--m); }
.pick[aria-selected="true"] .pick-lab { color: var(--m-ink); text-shadow: .35px 0 0 currentColor, -.35px 0 0 currentColor; }   /* heavier without growing wider: no label rewraps when chosen */
.pick:focus-visible { outline: none; }
.pick:focus-visible .pick-img { outline: 2px solid var(--accent); outline-offset: 4px; }

/* the program: a dark editor under the result, its tabs the parts the agents wrote */
.run-code { background: var(--code-bg); color: var(--code-fg); }
.code-bar { display: flex; align-items: flex-end; gap: 2px; padding: 10px 14px 0; border-bottom: 1px solid var(--code-line); }
.code-title { align-self: center; margin: 0 14px 10px 6px; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--code-dim); white-space: nowrap; }
.code-tab { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border: 0; border-radius: 9px 9px 0 0; background: transparent; color: var(--code-dim); font-size: .86rem; font-weight: 500; cursor: pointer; transition: color .14s ease, background .14s ease; }
.code-tab::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--a); opacity: .55; }
.code-tab[data-agent="object"] { --a: #7ba3e8; }
.code-tab[data-agent="hoi"] { --a: #d98bb6; }
.code-tab:hover { color: var(--code-fg); }
.code-tab[aria-selected="true"] { background: var(--code-bg-2); color: #fff; box-shadow: inset 0 2px 0 var(--a); }
.code-tab[aria-selected="true"]::before { opacity: 1; }
.code-tab.given::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--a); }   /* a part that is given, not written: a hollow mark */
.code-file { margin: 0 6px 9px auto; align-self: center; font: 400 .76rem/1 var(--mono); color: var(--code-dim); white-space: nowrap; }
.code-file b { font-weight: 400; color: var(--code-fg); }
.code-body { height: 336px; overflow: auto; padding: 14px 0; background: var(--code-bg-2); font: 400 12.5px/1.64 var(--mono); tab-size: 4; scrollbar-color: #55556a transparent; }
.code-body:focus-visible { outline-offset: -2px; }
.cl { display: flex; width: max-content; min-width: 100%; }
.cl .n { position: sticky; left: 0; flex: none; width: 54px; padding-right: 16px; text-align: right; color: #62627a; background: var(--code-bg-2); user-select: none; -webkit-user-select: none; }
.cl .t { white-space: pre; padding-right: 22px; }
.cl.skip .n, .cl.skip .t { color: #55556a; letter-spacing: .12em; }
.code-body .k { color: #e58fb8; } .code-body .s { color: #9fd6a5; } .code-body .m { color: #f0b870; }
.code-body .c { color: #85859a; } .code-body .f { color: #8fb8f0; } .code-body .b { color: #c9a8f0; }

/* ---------------------------------------------------------------- method */
.figure { background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); padding: 18px; overflow-x: auto; }
.figure img { width: 100%; min-width: 760px; height: auto; }
.agents { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.agent { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); padding: 18px 20px 20px; border-top: 3px solid var(--a); }
.agent[data-agent="object"] { --a: var(--object); --a-soft: var(--object-soft); }
.agent[data-agent="hoi"] { --a: var(--hoi); --a-soft: var(--hoi-soft); }
.agent[data-agent="eval"] { --a: var(--eval); --a-soft: var(--eval-soft); }
.agent-h { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.agent-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--a); color: #fff; font-weight: 700; font-size: .84rem; }
.agent p { margin: 0; color: var(--ink-2); font-size: .95rem; line-height: 1.55; text-wrap: pretty; }
.sub-head { margin: 44px 0 14px; }
.sub-head p { margin: 4px 0 0; color: var(--muted); }
.solvers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.solver { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); padding: 16px 18px 18px; }
.solver .tag { height: 24px; padding: 0 10px; font-size: .78rem; }
.solver b { display: block; margin: 10px 0 2px; font-size: .98rem; }
.solver p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.5; text-wrap: pretty; }

/* ---------------------------------------------------------------- reconstruction: input video, camera view, novel view */
.rec-head, .rec-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.rec-head { margin-bottom: 10px; font-size: .95rem; font-weight: 500; text-align: center; }
.rec-rows { display: flex; flex-direction: column; gap: 14px; }
.tabs-row { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; }
.tabs-row .tag { height: 24px; padding: 0 10px; font-size: .76rem; }
.rec-row .vp { aspect-ratio: 16 / 10; }
.vp-lab { display: none; position: absolute; left: 8px; top: 8px; font-size: .72rem; font-weight: 500; background: rgba(255, 255, 255, .92); border-radius: 999px; padding: 2px 9px; }

/* ---------------------------------------------------------------- generation: six tasks per kind of matter */
.ggrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px 18px; }
.g-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 21px; margin: 0 2px 8px; }
.gcard .vp { aspect-ratio: 4 / 3; }
.g-in { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; align-items: center; margin: 12px 2px 0; }
.g-in img, .g-in .bubble { width: 76px; height: 57px; border-radius: 8px; object-fit: cover; box-shadow: var(--shadow-s); }
.g-in .bubble { box-shadow: none; }
.g-in blockquote { font-size: .93rem; line-height: 1.42; }

/* ---------------------------------------------------------------- simulation: three examples, a reference over its tracking */
/* one grid for the row names and the examples: each example a column on the grid's rows (its input, the reference,
   the arrow, the tracking), so the upright names stay level with the videos */
.sgrid { display: grid; grid-template-columns: 22px repeat(3, minmax(0, 1fr)); grid-template-rows: auto auto 40px auto; column-gap: 14px; }
.scol { display: grid; grid-row: 1 / span 4; grid-template-rows: subgrid; min-width: 0; }
.scol .mode { margin: 0 2px 8px; }
.sgrid .vp { aspect-ratio: 16 / 9; }
.s-row { grid-column: 1; align-self: center; justify-self: center; writing-mode: vertical-rl; transform: rotate(180deg); font-size: .9rem; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.s-row.s-ref { grid-row: 2; }
.s-row.s-trk { grid-row: 4; }
/* the supplementary's badge: a white disc ringed in the matter's colour, an arrow down from the result to its tracking */
.s-arrow { align-self: center; justify-self: center; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1.5px var(--m-ink); color: var(--m-ink); }
.s-arrow svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------------------------------------------------------- benchmark */
.bench { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.card { background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); padding: 22px 24px 24px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; margin-bottom: 18px; }
.card-h h3 small { display: block; margin-top: 2px; font-size: .88rem; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .84rem; color: var(--ink-2); }
/* the tasks, one square each: a block per input, a row per kind of matter */
/* two tasks side by side, each under a bracket just as wide as its blocks: reconstruction over the videos, generation
   over its three inputs; every count is centred under its block, in one size and weight with its name */
.waffle { --sq: 22px; --sg: 5px; display: flex; justify-content: center; align-items: flex-start; gap: 26px 76px; }
.w-task { flex: none; min-width: 0; }
.w-head { position: relative; margin-bottom: 20px; padding-bottom: 9px; border-bottom: 1.5px solid var(--line-2); text-align: center; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.w-head::before, .w-head::after { content: ""; position: absolute; top: 100%; width: 1.5px; height: 8px; background: var(--line-2); }
.w-head::before { left: 0; }
.w-head::after { right: 0; }
.w-blocks { display: flex; justify-content: center; align-items: flex-start; gap: 46px; padding: 0 14px; }
.w-group { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.w-cells { display: grid; grid-template-rows: repeat(4, var(--sq)); grid-auto-flow: column; grid-auto-columns: var(--sq); gap: var(--sg); }
.w-cells i { border-radius: 4px; background: var(--m); }
.w-lab { display: flex; align-items: baseline; justify-content: center; gap: 6px; font-size: .95rem; font-weight: 500; white-space: nowrap; }
.w-lab b { font: inherit; font-variant-numeric: tabular-nums; }
/* a segmented control: the measure the bars show */
.seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; }
.seg button { height: 30px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; font-size: .85rem; font-weight: 500; color: var(--muted); cursor: pointer; white-space: nowrap; transition: background .15s ease, color .15s ease; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: #fff; color: var(--accent-ink); box-shadow: 0 1px 2px rgba(58, 50, 44, .16); }
/* a list of meters per kind of matter: a backbone, its bar and its figure per row */
.meters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 28px; }
.mgroup h4 { margin: 0 0 12px; font-size: .95rem; font-weight: 700; }
.mrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 8px; align-items: baseline; padding: 5px 0; font-size: .82rem; line-height: 1.3; border-radius: 6px; cursor: default; }
.mname { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mval { font-variant-numeric: tabular-nums; font-weight: 500; }
.mrow.best .mname, .mrow.best .mval { font-weight: 700; color: var(--ink); }
.mtrack { grid-column: 1 / -1; height: 8px; border-radius: 99px; background: var(--m-soft); overflow: hidden; }
.mtrack i { display: block; height: 100%; width: calc(var(--v, 0) * 100%); border-radius: 99px; background: var(--m); transition: width .8s cubic-bezier(.2, .8, .2, 1), filter .15s ease; }
.meters:not(.in) .mtrack i { width: 0; }
/* the axis under a group's bars: they start at its low end, not at zero */
.maxis { position: relative; height: 22px; margin-top: 9px; border-top: 1px solid var(--line-2); font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.maxis span { position: absolute; top: 5px; }
.maxis span:nth-child(1) { left: 0; }
.maxis span:nth-child(2) { left: 50%; transform: translateX(-50%); }
.maxis span:nth-child(3) { right: 0; }
.maxis span::before { content: ""; position: absolute; top: -9px; width: 1px; height: 4px; background: var(--line-2); }
.maxis span:nth-child(1)::before { left: 0; } .maxis span:nth-child(2)::before { left: 50%; } .maxis span:nth-child(3)::before { right: 0; }
.mrow:hover .mtrack i, .mrow:focus-visible .mtrack i { filter: brightness(.88); }
details.table { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
details.table summary { cursor: pointer; font-size: .86rem; font-weight: 500; color: var(--muted); width: max-content; }
details.table summary:hover { color: var(--ink); }
.tscroll { overflow-x: auto; margin-top: 12px; }
/* the full table in the manner of a paper's: rules above and below, a thin rule under the heads, no vertical lines.
   A kind of matter heads its three columns with its dot and a short rule of its colour; space sets the groups apart */
table { border-collapse: collapse; width: 100%; min-width: 760px; font-size: .84rem; font-variant-numeric: tabular-nums; border-top: 1.5px solid var(--line-2); border-bottom: 1.5px solid var(--line-2); }
th, td { padding: 7px 8px; text-align: right; white-space: nowrap; }
td { color: var(--ink-2); }
thead th { font-size: .78rem; font-weight: 500; color: var(--muted); padding-top: 6px; padding-bottom: 7px; }
thead tr:last-child th { text-align: center; border-bottom: 1px solid var(--line-2); }
thead tr:first-child th[data-matter] { position: relative; text-align: center; padding-top: 11px; padding-bottom: 9px; font-size: .84rem; font-weight: 600; color: var(--ink); }
thead tr:first-child th[data-matter]::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--m); vertical-align: 1px; }
thead tr:first-child th[data-matter]::after { content: ""; position: absolute; left: 22px; right: 6px; bottom: 0; height: 2px; background: var(--m); }
tbody th, thead tr th:first-child { text-align: left; }
tbody th { font-weight: 500; color: var(--ink); }
tbody tr:first-child > * { padding-top: 10px; }
tbody tr:last-child > * { padding-bottom: 10px; }
tbody tr:hover > * { background: var(--bg); }
th.gs, td.gs { padding-left: 28px; }
td.top { font-weight: 700; color: var(--ink); }
.tnote { margin: 10px 0 0; font-size: .78rem; line-height: 1.5; color: var(--muted); }
.tnote b { font-weight: 600; color: var(--ink-2); }
.tip { position: fixed; z-index: 80; pointer-events: none; background: var(--ink); color: #fff; border-radius: 9px; padding: 8px 12px 9px; font-size: .8rem; line-height: 1.4; max-width: 280px; box-shadow: 0 6px 20px rgba(0, 0, 0, .18); }
.tip b { display: block; font-size: 1.02rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.tip span { display: block; color: rgba(255, 255, 255, .72); }

/* ---------------------------------------------------------------- bibtex, footer */
.bib { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px; }
.bib pre { margin: 0; font: 400 .86rem/1.7 var(--mono); color: var(--ink-2); white-space: pre; overflow-x: auto; }
.copy { position: absolute; right: 14px; top: 14px; height: 30px; padding: 0 13px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-size: .8rem; font-weight: 500; cursor: pointer; }
.copy:hover { border-color: var(--line-2); }
.footer { padding: 34px 0 52px; border-top: 1px solid var(--line); color: var(--muted); font-size: .86rem; text-align: center; }
.footer p { margin: 0 auto; max-width: 820px; text-wrap: pretty; }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 1020px) {
  .run-top { grid-template-columns: 1fr; }
  .run-side { border-left: 0; border-top: 1px solid var(--line); }
  .picker { order: -1; margin-top: 0; max-width: 460px; }   /* under the video: the kinds first, then the run chosen */
  .meters { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 26px; }
  .waffle { --sq: 16px; --sg: 4px; gap: 26px 36px; }
  .w-blocks { gap: 24px; padding: 0 12px; }
  .w-lab { flex-direction: column; align-items: center; gap: 0; line-height: 1.3; font-size: .84rem; }   /* the count over its name */
  .solvers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ggrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {   /* the links no longer fit beside the name */
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; }
}
@media (max-width: 720px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .nav-in { height: 52px; gap: 12px; }
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; }
  .hero { padding-top: 40px; padding-bottom: 32px; }
  main > section { padding: 52px 0; }
  .run { border-radius: 18px; }
  .run-side { padding: 18px 16px; gap: 22px; }
  .scores { grid-template-columns: repeat(2, max-content); gap: 5px 18px; }
  .code-title { display: none; }
  .code-bar { padding: 8px 8px 0; }
  .code-tab { padding: 0 11px; }
  .code-file { display: none; }
  .code-body { height: 300px; font-size: 11.5px; }
  .cl .n { width: 42px; padding-right: 12px; }
  .agents { grid-template-columns: 1fr; }
  .figure { padding: 12px; border-radius: 16px; }
  /* a phone: the input video on top, the two views under it, each panel named */
  .rec-head { display: none; }
  .rec-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .rec-row .vp:first-child { grid-column: 1 / -1; }
  .vp-lab { display: block; }
  .rec-rows { gap: 22px; }
  .ggrid { grid-template-columns: 1fr; gap: 30px; }
  /* a phone: one example under another, each panel named */
  .sgrid { grid-template-columns: 1fr; grid-template-rows: none; row-gap: 30px; }
  .s-row { display: none; }
  .scol { grid-row: auto; grid-template-rows: auto auto 36px auto; }
  .card { padding: 18px 16px 20px; border-radius: 16px; }
  .waffle { --sq: min(13px, 2.9vw); --sg: 3px; flex-direction: column; align-items: center; gap: 28px; }
  .w-blocks { gap: min(10px, 2.2vw); padding: 0; }
  .w-lab { font-size: min(.7rem, 2.8vw); }   /* the longest name stays within its five squares on the narrowest phones */
  .meters { grid-template-columns: 1fr; }
  .bib { padding: 50px 16px 18px; }
}
@media (max-width: 420px) {
  .solvers { grid-template-columns: 1fr; }
  .mtab { height: 34px; padding: 0 12px 0 10px; font-size: .84rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
