:root {
  --bg: #fbfaf7;
  --panel: #ffffff;
  --ink: #1c1c21;
  --ink-2: #4a4a55;
  --ink-3: #7c7c88;
  --line: #e6e3dc;
  --tile: #efece6;
  --accent: #3346c9;
  --accent-soft: #e8ebfb;
  --ours: #3346c9;
  --chip: #f1efea;
  --shadow: 0 1px 2px rgba(20, 20, 30, .06), 0 4px 16px rgba(20, 20, 30, .05);
  --radius: 10px;
  --maxw: 1120px;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111216; --panel: #181a20; --ink: #ecebf0; --ink-2: #b9b8c4; --ink-3: #8a8996; --line: #2a2c35; --tile: #22242c;
    --accent: #8f9cff; --accent-soft: #23284a; --ours: #8f9cff; --chip: #23252d; --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  }
}
:root[data-theme="dark"] {
  --bg: #111216; --panel: #181a20; --ink: #ecebf0; --ink-2: #b9b8c4; --ink-3: #8a8996; --line: #2a2c35; --tile: #22242c;
  --accent: #8f9cff; --accent-soft: #23284a; --ours: #8f9cff; --chip: #23252d; --shadow: 0 1px 2px rgba(0, 0, 0, .4);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

/* ---- nav ---- */
nav.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); }
nav.top .wrap { display: flex; align-items: center; gap: 22px; height: 52px; }
nav.top .brand { font: 600 18px var(--serif); color: var(--ink); letter-spacing: .01em; }
nav.top .links { display: flex; gap: 18px; overflow-x: auto; scrollbar-width: none; flex: 1; }
nav.top .links a { color: var(--ink-2); font-size: 14px; white-space: nowrap; }
nav.top .links a.on { color: var(--ink); font-weight: 600; }
nav.top .ctl { display: flex; gap: 6px; }
nav.top button { font: 500 12px var(--sans); color: var(--ink-2); background: var(--chip); border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 10px; cursor: pointer; }
nav.top button.on { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
@media (max-width: 760px) { nav.top .links { display: none; } nav.top .wrap { justify-content: space-between; } }

/* ---- hero ---- */
header.hero { padding: 64px 0 24px; text-align: center; }
header.hero h1 { font: 500 clamp(44px, 7vw, 76px)/1 var(--serif); margin: 0; letter-spacing: -.01em; }
header.hero .sub { font: 400 clamp(20px, 3vw, 28px)/1.25 var(--serif); color: var(--ink-2); margin: 12px 0 18px; letter-spacing: .04em; }
header.hero .sub .hl { color: var(--ink); font-weight: 600; }   /* user 2026-11-17: upright subtitle, Co / S / Mo bold, no colour */
header.hero .authors { color: var(--ink-3); font-size: 15px; }
/* user 2026-11-23: 'Further Results' heading between the abstract / pipeline row and the results tabs (same face as the section titles) */
.results-head { padding: 56px 0 18px; }
.results-head h2 { font: 500 34px/1.15 var(--serif); margin: 0; letter-spacing: -.005em; text-wrap: balance; }
/* user 2026-11-23: the website video (hook + motion compression) under the subtitle, full content width, above the teaser */
header.hero .hero-video { margin: 10px 0 38px; }
header.hero .hero-video video { display: block; width: 100%; max-width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius);
  background: #070a16; box-shadow: var(--shadow); }
.pills { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 22px 0 8px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; background: var(--ink); color: var(--bg);
  font-size: 14px; font-weight: 500; }
.pill.off { background: var(--chip); color: var(--ink-3); border: 1px solid var(--line); cursor: default; }
.pill:hover { text-decoration: none; }

/* ---- sections ---- */
section { padding: 56px 0 8px; }
section > .wrap > h2 { font: 500 34px/1.15 var(--serif); margin: 0 0 6px; letter-spacing: -.005em; }
h3 { font: 600 19px/1.3 var(--sans); margin: 40px 0 6px; }
.kicker { font: 600 12px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.lede { color: var(--ink-2); max-width: 760px; margin: 6px 0 20px; }
.note { color: var(--ink-3); font-size: 14px; }
p { max-width: 780px; }
.abstract .wrap { max-width: 900px; text-align: center; }
.abstract p { font: 400 19px/1.65 var(--serif); max-width: none; margin: 0; color: var(--ink); text-align: justify; hyphens: auto; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 0; }
.math { font-family: var(--serif); font-style: italic; white-space: nowrap; }

/* ---- panels / cards ---- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 20px 0; }
.cards3 .card h4 { margin: 0 0 6px; font: 600 15px var(--sans); }
.cards3 .card .n { font: 500 13px var(--mono); color: var(--accent); margin-bottom: 4px; }
.cards3 .card p { font-size: 14.5px; color: var(--ink-2); margin: 0; }
@media (max-width: 860px) { .cards3 { grid-template-columns: 1fr; } }
figure.fig { margin: 18px 0; }
figure.fig img { width: 100%; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
figure.fig figcaption { font-size: 14px; color: var(--ink-2); margin: 10px auto 0; max-width: 900px; text-align: justify; hyphens: auto; }

/* ---- controls ---- */
.ctrls { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 14px; }
.row-ctl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-ctl > .lab { font: 600 12px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); min-width: 70px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font: 500 13px var(--sans); color: var(--ink-2); background: var(--chip); border: 1px solid transparent; border-radius: 999px;
  padding: 5px 12px; cursor: pointer; transition: all .12s; }
.chip:hover { color: var(--ink); border-color: var(--line); }
.chip.on { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); }
.thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.thumb { width: 58px; height: 42px; border-radius: 6px; overflow: hidden; border: 2px solid transparent; cursor: pointer; padding: 0;
  background: var(--tile); opacity: .72; transition: all .12s; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:hover { opacity: 1; }
.thumb.on { border-color: var(--accent); opacity: 1; }
.tabs { display: inline-flex; gap: 2px; background: var(--chip); padding: 3px; border-radius: 999px; margin: 6px 0 14px; flex-wrap: wrap; }
.tab { font: 500 14px var(--sans); color: var(--ink-2); padding: 6px 16px; border-radius: 999px; cursor: pointer; border: 0; background: none; }
.tab.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.pager { display: flex; gap: 8px; align-items: center; justify-content: center; margin: 14px 0; font-size: 14px; color: var(--ink-3); }
.pager button { font: 500 13px var(--sans); background: var(--chip); color: var(--ink-2); border: 1px solid var(--line); border-radius: 8px;
  padding: 5px 12px; cursor: pointer; }
.pager button:disabled { opacity: .4; cursor: default; }

/* ---- video tiles ---- */
.tile { position: relative; margin: 0; background: var(--tile); border-radius: 8px; overflow: hidden; }
.tile video, .tile img { width: 100%; height: 100%; display: block; object-fit: contain; background: var(--tile); }
.tile .tag { position: absolute; left: 6px; top: 6px; font: 600 11px var(--sans); letter-spacing: .02em; color: #fff; background: rgba(18, 18, 24, .62);
  padding: 2px 7px; border-radius: 5px; pointer-events: none; }
.tile.ours { outline: 2px solid var(--ours); outline-offset: -2px; }
.tile.ours .tag { background: var(--ours); color: #fff; }
.tile.src .tag { background: rgba(18, 18, 24, .78); }
.tile .tag { opacity: .7; }   /* user 2026-11-17: every tile label (source, generated, sample 1, ...) 30% transparent (was 50%) */
.tile .tgt { position: absolute; right: 4px; bottom: 4px; width: 18%; height: auto; object-fit: contain; border: 1px solid #fff;
  border-radius: 3px; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); transition: all .16s ease; cursor: zoom-in; background: var(--tile); }
.tile .tag-tgt { display: none; }
.tile.has-tgt:hover .tgt, .tile.has-tgt.peek .tgt { right: 0; bottom: 0; width: 100%; height: 100%; border: 0; border-radius: 0; box-shadow: none; }
.tile.has-tgt:hover .tag-tgt, .tile.has-tgt.peek .tag-tgt { display: block; z-index: 2; }
.tile.has-tgt:hover .tag:not(.tag-tgt), .tile.has-tgt.peek .tag:not(.tag-tgt) { display: none; }
/* prompt icon (bottom left of generated videos) and its tooltip, user 2026-11-15 */
.tile .pbtn { position: absolute; left: 6px; bottom: 6px; z-index: 3; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 6px;
  display: flex; align-items: center; justify-content: center; color: #fff; background: rgba(18, 18, 24, .62); cursor: help; opacity: .85; }
.tile .pbtn:hover, .tile .pbtn:focus-visible { opacity: 1; background: var(--ours); outline: none; }
.ptip { position: fixed; z-index: 1000; display: none; max-width: min(380px, calc(100vw - 16px)); padding: 9px 11px; border-radius: 8px;
  background: rgba(18, 18, 24, .94); color: #fff; font: 400 12.5px/1.45 var(--sans); box-shadow: 0 6px 24px rgba(0, 0, 0, .25); pointer-events: none; }
.ptip b { display: block; font: 600 10.5px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: #b9bdf5; margin-bottom: 3px; }
.tile.missing { display: flex; align-items: center; justify-content: center; color: var(--ink-3); font-size: 12px; }
.tile.missing::after { content: "not available"; }
.cap { font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.cap b { color: var(--ink); font-weight: 600; }

.strip { display: grid; gap: 8px; }
.cmp { display: grid; grid-template-columns: 74px 1fr; gap: 8px; align-items: center; margin-bottom: 8px; }
.cmp .rl { font: 600 13px var(--sans); color: var(--ink-2); text-align: right; }
.cmp .rl.ours { color: var(--ours); }
.cmp .rl small { display: block; font-weight: 400; color: var(--ink-3); font-size: 11px; }
.colheads { display: grid; gap: 8px; font: 600 12px var(--sans); color: var(--ink-3); text-align: center; margin-bottom: 4px; }

.gal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 16px; }
@media (max-width: 900px) { .gal { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gal { grid-template-columns: 1fr; } }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.galhead { grid-column: 1 / -1; font: 600 12px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3);
  border-bottom: 1px solid var(--line); padding-bottom: 4px; margin-top: 6px; }
.gal.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .gal.two { grid-template-columns: 1fr; } }
.trip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }

.hscroll { overflow-x: auto; padding-bottom: 4px; }
.hscroll > * { min-width: 640px; }

/* ---- teaser ---- */
.teaser { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 18px; margin-top: 8px; }
/* source -> generated arrows, a rule between the two columns of example cards (user 2026-11-15) */
.tgal, .gal.two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 0; }
.tgal > :nth-child(odd), .gal.two > :nth-child(odd) { padding-right: 16px; }
.tgal > :nth-child(even), .gal.two > :nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line); }
.tgal > :nth-child(even) { border-left: 2px solid var(--ink-2); }   /* teaser only: darker, bolder centre line (user 2026-11-15) */
.tpair { display: grid; grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr); align-items: center; }
.flow { align-items: center; }
.tarrow { display: flex; justify-content: center; color: var(--ours); }
.tarrow.down svg { transform: rotate(90deg); }
.tarrow.down { margin: -4px 0 4px; }
.cmp.darrow { margin: -8px 0 0; }
@media (max-width: 760px) { .tgal, .gal.two { grid-template-columns: 1fr; } .tgal > *, .gal.two > * { padding: 0 !important; border: 0 !important; } }
.teaser .tcap { color: var(--ink-2); font-size: 14.5px; margin: 12px 2px 0; max-width: none; }

/* ---- tables ---- */
table.res { border-collapse: collapse; font-size: 14.5px; margin: 10px 0 6px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; }
table.res th, table.res td { padding: 8px 14px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.res th { font-weight: 600; color: var(--ink-2); font-size: 13px; background: color-mix(in srgb, var(--chip) 60%, var(--panel)); }
table.res td:first-child, table.res th:first-child { text-align: left; }
table.res tr:last-child td { border-bottom: 0; }
table.res tr.ours td { background: var(--accent-soft); }
table.res td.b { font-weight: 700; }
table.res th.grp { border-bottom: 1px solid var(--line); text-align: center; color: var(--ink); }
.tblwrap { overflow-x: auto; }
.tcaption { font-size: 13.5px; color: var(--ink-2); max-width: 900px; }

/* ---- DCT demo ---- */
.dct { display: grid; grid-template-columns: 1.3fr 1fr; gap: 22px; align-items: center; }
@media (max-width: 860px) { .dct { grid-template-columns: 1fr; } }
.dct > *, .abl > * { min-width: 0; }
.abl { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.dct svg { width: 100%; height: auto; display: block; }
.dct input[type=range] { width: 100%; accent-color: var(--accent); }
.bandbar { display: grid; grid-template-columns: repeat(16, 1fr); gap: 2px; margin: 8px 0 4px; }
.bandbar span { height: 12px; border-radius: 2px; transition: opacity .15s; }

/* ---- misc ---- */
ul.lim { max-width: 820px; color: var(--ink-2); padding-left: 20px; }
ul.lim li { margin: 6px 0; }
pre.bib { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; font: 13px/1.5 var(--mono);
  overflow-x: auto; color: var(--ink-2); }
footer { padding: 48px 0 64px; color: var(--ink-3); font-size: 13px; text-align: center; }

/* ---- selection mode (?edit) ---- */
.pickcard { position: relative; }
.pickx { position: absolute; top: -8px; right: -8px; z-index: 5; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink-2); font: 700 13px var(--sans); cursor: pointer; box-shadow: var(--shadow); }
.pickx:hover { color: #fff; background: #d23c3c; border-color: #d23c3c; }
.pickcard.picked > *:not(.pickx) { opacity: .3; }
.pickcard.picked .pickx { background: #d23c3c; color: #fff; border-color: #d23c3c; }
.pickcard.picked { outline: 2px dashed #d23c3c; outline-offset: 4px; border-radius: 6px; }
.pickbar { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 50; width: min(720px, calc(100% - 24px));
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 6px 24px rgba(0, 0, 0, .18); padding: 10px 14px; }
.pickrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.pickrow span { color: var(--ink-2); flex: 1; }
.pickrow button { font: 500 13px var(--sans); border: 1px solid var(--line); background: var(--chip); color: var(--ink); border-radius: 8px; padding: 5px 12px; cursor: pointer; }
.picklist { width: 100%; margin-top: 8px; font: 12px var(--mono); border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink-2); resize: vertical; }

.stepper { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.stepper button { font: 500 13px var(--sans); border: 1px solid var(--line); background: var(--chip); color: var(--ink); border-radius: 8px; padding: 4px 10px; cursor: pointer; }
select.pick { font: 500 13px var(--sans); color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; max-width: min(460px, 70vw); }

/* ---- results bar: one button per results section, only the chosen section is shown ---- */
#results, .tab-anchor { scroll-margin-top: 52px; }
.tabbar { position: sticky; top: 52px; z-index: 15; background: var(--bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 10px 0; margin-top: 40px; }
.rtabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.rtab { font: 550 13px/1.3 var(--sans); padding: 9px 10px; border-radius: 999px; cursor: pointer; background: transparent; color: var(--ink);
  border: 1px solid var(--line); white-space: normal; text-wrap: balance; }   /* 2026-11-20: long names wrap instead of being cut off */
.rtab:hover { background: var(--panel); border-color: var(--ink-3); }
.rtab[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.rtab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rtabs.cols3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }   /* the highlight bar: 9 tabs as 3 x 3 (2026-11-20) */
@media (max-width: 620px) { .rtabs, .rtabs.cols3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rtab { font-size: 12px; padding: 8px 6px; border-radius: 14px; } }
.tab-panel { padding-top: 32px; }
.tab-panel[hidden] { display: none !important; }

/* dump-section example labels (user 2026-11-17): an ID plus source -> target, for picking examples for the main section */
.dlab { font: 500 12px/1.4 var(--mono, ui-monospace, monospace); color: var(--ink-2); margin: 6px 0 2px; overflow-wrap: anywhere; }
.dlab b, .dlab-id { color: var(--accent); font-weight: 700; }
