:root {
  --ink: #1b2330; --ink2: #3a4454; --muted: #6f7888; --faint: #a4abb8; --line: #dcdfe6; --paper: #f6f4ee; --paper2: #efebe1;
  --card: #ffffff; --card2: #faf9f5;
  --hi: #7a5a9e; --hi-d: #55397a; --hi-t: #f0eaf7; --hi-m: #cdbde3;
  --lo: #d2691e; --lo-d: #9a4a10; --lo-t: #fdf0e4; --lo-m: #f1c9a6;
  --rl: #2e8b57; --rl-d: #1f6a40; --rl-t: #e4f3ea; --rl-m: #a9d8bd;
  --g: #c9921a; --g-d: #8f6508; --g-t: #fbf2dc;
  --dis: #17808a; --dis-d: #0e5a61; --dis-t: #e2f2f3;
  --goal: #c0392b; --goal-d: #8e2418; --goal-t: #fbe6e3;
  --wall: #cfcabd;
  --shadow: 0 10px 30px rgba(27, 35, 48, .09), 0 2px 6px rgba(27, 35, 48, .05);
  --shadow-s: 0 4px 14px rgba(27, 35, 48, .08), 0 1px 3px rgba(27, 35, 48, .05);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #eceef2; --ink2: #c9cfda; --muted: #98a1b2; --faint: #6b7385; --line: #343c4b; --paper: #12161d; --paper2: #181d26;
    --card: #1b212b; --card2: #161b23;
    --hi: #a68bcb; --hi-d: #c7b3e6; --hi-t: #2a2237; --hi-m: #4a3a63;
    --lo: #ec8a4a; --lo-d: #f3ad7c; --lo-t: #35261a; --lo-m: #5c3d25;
    --rl: #4fb87f; --rl-d: #7fd1a3; --rl-t: #1c2f26; --rl-m: #2f5a45;
    --g: #e0ad3f; --g-d: #efc766; --g-t: #342b17;
    --dis: #4fb3bc; --dis-d: #82ccd3; --dis-t: #18292c;
    --goal: #e5675a; --goal-d: #f0948a; --goal-t: #36201d;
    --wall: #3a4150;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35), 0 2px 6px rgba(0, 0, 0, .25);
    --shadow-s: 0 4px 14px rgba(0, 0, 0, .3), 0 1px 3px rgba(0, 0, 0, .2);
  }
}
:root[data-theme="dark"] {
  --ink: #eceef2; --ink2: #c9cfda; --muted: #98a1b2; --faint: #6b7385; --line: #343c4b; --paper: #12161d; --paper2: #181d26;
  --card: #1b212b; --card2: #161b23;
  --hi: #a68bcb; --hi-d: #c7b3e6; --hi-t: #2a2237; --hi-m: #4a3a63;
  --lo: #ec8a4a; --lo-d: #f3ad7c; --lo-t: #35261a; --lo-m: #5c3d25;
  --rl: #4fb87f; --rl-d: #7fd1a3; --rl-t: #1c2f26; --rl-m: #2f5a45;
  --g: #e0ad3f; --g-d: #efc766; --g-t: #342b17;
  --dis: #4fb3bc; --dis-d: #82ccd3; --dis-t: #18292c;
    --goal: #e5675a; --goal-d: #f0948a; --goal-t: #36201d;
  --wall: #3a4150;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35), 0 2px 6px rgba(0, 0, 0, .25);
  --shadow-s: 0 4px 14px rgba(0, 0, 0, .3), 0 1px 3px rgba(0, 0, 0, .2);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.62;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: var(--hi-d); text-decoration-color: color-mix(in srgb, var(--hi) 40%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
img, svg { max-width: 100%; }
svg.math { display: inline-block; overflow: visible; }
svg.math.display { display: block; margin: 0 auto; }
.wrap { width: min(1080px, calc(100% - 32px)); margin: 0 auto; }
.narrow { width: min(760px, 100%); margin-left: auto; margin-right: auto; }

#nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); }
#nav .wrap { display: flex; align-items: center; gap: 22px; height: 52px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
#nav a { color: var(--muted); text-decoration: none; font-size: 14.5px; font-weight: 600; letter-spacing: .01em; }
#nav a:hover, #nav a.on { color: var(--ink); }
#nav .brand { color: var(--ink); font-weight: 800; margin-right: 8px; }
#nav .sp { flex: 1; }
#theme { border: 1px solid var(--line); background: var(--card); color: var(--ink2); border-radius: 999px; padding: 4px 11px; font: 600 12.5px var(--sans); cursor: pointer; }

header.hero { padding: 64px 0 34px; text-align: center; }
.venue { display: inline-block; padding: 5px 15px; border-radius: 999px; background: var(--hi-t); color: var(--hi-d); border: 1.5px solid var(--hi-m);
  font-size: 13.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
h1.title { margin: 20px auto 20px; max-width: 900px; font-size: clamp(30px, 5.2vw, 52px); line-height: 1.12; letter-spacing: -.02em; font-weight: 800; }
.authors, .affil { display: flex; flex-wrap: wrap; justify-content: center; }
.authors { font-size: 18px; margin: 6px 0; }
.authors span { white-space: nowrap; margin: 0 9px; }
.authors sup, .affil sup { font-size: .7em; color: var(--muted); margin-left: 1px; }
.affil { color: var(--muted); font-size: 15px; margin: 4px 0; }
.affil span { margin: 0 9px; white-space: nowrap; }
.links { display: flex; flex-wrap: wrap; gap: 11px; justify-content: center; margin-top: 26px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 999px; text-decoration: none; font-weight: 700; font-size: 15px;
  background: var(--ink); color: var(--paper); border: 2px solid var(--ink); transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-s); }
.btn.alt { background: transparent; color: var(--ink); }

section { padding: 46px 0 14px; }
h2 { font-size: clamp(25px, 3.4vw, 34px); line-height: 1.2; letter-spacing: -.015em; margin: 0 0 8px; font-weight: 800; }
h2 + .lead { color: var(--muted); font-size: 18px; margin: 0 0 24px; max-width: 760px; }
h3 { font-size: 21px; margin: 34px 0 6px; font-weight: 750; letter-spacing: -.005em; }
p { margin: 0 0 14px; }
.kicker { font-size: 12.5px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }

.card { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); border: 1px solid color-mix(in srgb, var(--ink) 7%, transparent); }
.tldr { padding: 22px 26px; border-left: 6px solid var(--rl); border-radius: 14px; background: var(--card); box-shadow: var(--shadow-s); font-size: 19px; line-height: 1.5; }
.tldr b { color: var(--rl-d); }
.abstract { font-family: var(--serif); font-size: 18.5px; line-height: 1.66; color: var(--ink2); }
.abstract p { margin-bottom: 0; }

.contrib { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 22px; }
.contrib .card { padding: 20px 22px; }
.contrib .num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; font-weight: 800; font-size: 15px; margin-bottom: 10px; }
.contrib .c1 .num { background: var(--rl); } .contrib .c2 .num { background: var(--hi); } .contrib .c3 .num { background: var(--lo); }
.contrib h4 { margin: 0 0 6px; font-size: 17.5px; line-height: 1.3; }
.contrib p { margin: 0; color: var(--ink2); font-size: 15.5px; line-height: 1.55; }

figure { margin: 24px 0; }
figure.card { padding: 18px; }
figcaption { color: var(--muted); font-size: 14.5px; line-height: 1.5; margin-top: 12px; }
figcaption b { color: var(--ink2); }
.video-frame { overflow: hidden; border-radius: 18px; background: #0f1319; box-shadow: var(--shadow); }
.video-frame video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #0f1319; }
.chapters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chapters button { border: 1px solid var(--line); background: var(--card); color: var(--ink2); border-radius: 999px; padding: 6px 14px; font: 600 13.5px var(--sans); cursor: pointer; }
.chapters button:hover { border-color: var(--ink2); }
.chapters button .t { color: var(--muted); font-variant-numeric: tabular-nums; margin-left: 6px; font-weight: 500; }

.eq { margin: 18px 0; padding: 16px 12px; background: var(--card2); border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; font-size: 19px; text-align: center; }
.eq .tag { float: right; color: var(--muted); font-size: 15px; margin-left: 12px; }
.eq svg.math { color: var(--ink); }
.note { font-size: 14.5px; color: var(--muted); }
.pill { display: inline-block; padding: 1px 10px 2px; border-radius: 999px; font-size: .86em; font-weight: 700; border: 1.5px solid; white-space: nowrap; }
.pill.hi { background: var(--hi-t); color: var(--hi-d); border-color: var(--hi-m); }
.pill.lo { background: var(--lo-t); color: var(--lo-d); border-color: var(--lo-m); }
.pill.rl { background: var(--rl-t); color: var(--rl-d); border-color: var(--rl-m); }
.pill.g { background: var(--g-t); color: var(--g-d); border-color: var(--g); }
.pill.dis { background: var(--dis-t); color: var(--dis-d); border-color: var(--dis); }

.two { display: grid; grid-template-columns: 1.05fr 1fr; gap: 28px; align-items: start; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 14px 0; }
.steps li { counter-increment: s; position: relative; padding: 4px 0 10px 44px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 2px; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--paper);
  display: grid; place-items: center; font-size: 14px; font-weight: 800; }
.steps.plain li { padding-left: 26px; }
.steps.plain li::before { content: ''; left: 6px; top: 12px; width: 9px; height: 9px; }

svg.diagram { width: 100%; height: auto; display: block; }
svg.diagram text { font-family: var(--sans); fill: var(--ink); }
svg.diagram .muted { fill: var(--muted); }
svg.diagram .box { fill: var(--card); stroke: var(--line); stroke-width: 2; }
svg.diagram .wall { fill: var(--wall); }
svg.diagram .flow { stroke-dasharray: 7 7; animation: dash 1.4s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -28; } }
@media (prefers-reduced-motion: reduce) { svg.diagram .flow { animation: none; } html { scroll-behavior: auto; } }

.demo { margin-top: 14px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tabs button { border: 1.5px solid var(--line); background: var(--card); color: var(--ink2); border-radius: 12px; padding: 10px 16px; font: 700 14.5px var(--sans); cursor: pointer; text-align: left; }
.tabs button .n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--line); color: var(--ink2); font-size: 12.5px; margin-right: 8px; }
.tabs button.on { border-color: var(--ink); color: var(--ink); box-shadow: var(--shadow-s); }
.tabs button.on .n { background: var(--ink); color: var(--paper); }
.panel { display: none; padding: 20px; }
.panel.on { display: block; }
.panel .intro { margin: 0 0 14px; color: var(--ink2); font-size: 16px; }
.panel .intro b { color: var(--ink); }
.stage { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 18px; align-items: start; }
.stage.wide { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
canvas.cv { width: 100%; display: block; border-radius: 12px; background: var(--card2); border: 1px solid var(--line); touch-action: none; }
.controls { display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; }
.controls label { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; color: var(--ink2); font-weight: 600; }
.controls label output { font-family: var(--mono); font-size: 13px; color: var(--ink); }
.controls label input[type=range] { grid-column: 1 / -1; width: 100%; accent-color: var(--ink); }
.controls .row { display: flex; flex-wrap: wrap; gap: 8px; }
.controls .chk { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink2); }
.controls button, .mini { border: 1.5px solid var(--line); background: var(--card); color: var(--ink); border-radius: 10px; padding: 7px 12px; font: 700 13.5px var(--sans); cursor: pointer; }
.controls button:hover, .mini:hover { border-color: var(--ink2); }
.readout { font-family: var(--mono); font-size: 12.5px; line-height: 1.6; color: var(--ink2); background: var(--card2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; }
.readout b { color: var(--ink); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.legend i.ln { width: 18px; height: 3px; border-radius: 2px; vertical-align: 3px; }

table.res { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
table.res th, table.res td { padding: 7px 10px; text-align: right; border-bottom: 1px solid var(--line); }
table.res th:first-child, table.res td:first-child, table.res td:nth-child(2), table.res th:nth-child(2) { text-align: left; }
table.res thead th { color: var(--muted); font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; border-bottom: 2px solid var(--ink2); }
table.res td.best { font-weight: 800; color: var(--rl-d); }
table.res td.ours, table.res th.ours { background: color-mix(in srgb, var(--rl) 9%, transparent); }
table.res tr.grp td { border-top: 2px solid var(--line); }
.tablewrap { overflow-x: auto; padding: 8px 16px 12px; }
.figs2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.figimg { width: 100%; height: auto; border-radius: 10px; background: #fff; display: block; }

pre.bib { margin: 0; padding: 18px 20px; overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 14px; font: 13.5px/1.55 var(--mono); color: var(--ink2); }
footer { padding: 36px 0 60px; color: var(--muted); font-size: 14px; text-align: center; }

@media (max-width: 860px) {
  .contrib { grid-template-columns: 1fr; }
  .two, .stage, .stage.wide, .figs2 { grid-template-columns: 1fr; }
  body { font-size: 16.5px; }
  .panel { padding: 14px; }
}

.pill.goal { background: var(--goal-t); color: var(--goal-d); border-color: var(--goal); }

.demo-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.demo-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 6px; }
.demo-ctls { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: flex-start; margin: 14px 0 4px; }
.demo-ctls .ctl { margin: 0; }
.demo-ctls .ctl:nth-child(2) { flex: 1 1 260px; max-width: 420px; }
.demo-main, .demo-side { min-width: 0; }
.mz canvas { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: 12px; cursor: crosshair; touch-action: none; }
.mini { display: block; border-radius: 10px; cursor: pointer; border: 1px solid var(--line); }
.bars { display: block; margin: 4px 0 8px; max-width: 100%; }
.ctl { margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lab { display: block; width: 100%; font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.side-title { font-weight: 800; font-size: 15px; margin-bottom: 6px; color: var(--ink2); }
.slider { display: flex; align-items: center; gap: 10px; width: 100%; }
.slider input[type=range], .ctl input[type=range] { flex: 1 1 140px; accent-color: var(--lo); }
.ticks { display: flex; justify-content: space-between; width: 100%; font-size: 12px; color: var(--muted); padding: 0 6px; font-variant-numeric: tabular-nums; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: var(--card); color: var(--ink2); padding: 7px 14px; font: 600 13.5px var(--sans); cursor: pointer; border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--ink); color: var(--paper); }
.btn.small { padding: 6px 12px; font-size: 13.5px; cursor: pointer; background: var(--card); color: var(--ink); border: 1.5px solid var(--line); }
.chk { border: 1.5px solid var(--line); background: var(--card); color: var(--ink2); border-radius: 999px; padding: 6px 14px; font: 600 13px var(--sans); cursor: pointer; }
.chk.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.readout { display: grid; gap: 4px; margin: 4px 0 10px; font-size: 14.5px; }
.readout div { display: flex; justify-content: space-between; gap: 14px; border-bottom: 1px dashed var(--line); padding: 3px 0; }
.readout .k { color: var(--muted); }
.readout .v, .scores .v { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); text-align: right; }
.readout.wide { max-width: 760px; }
.takeaway { margin: 8px 0 0; padding: 10px 14px; border-left: 4px solid var(--lo); background: var(--card2); border-radius: 8px; font-size: 14.5px; color: var(--ink2); }
.scores { margin: 6px 0 10px; font-size: 14px; }
.scores .sc { display: flex; justify-content: space-between; padding: 3px 8px; border-radius: 8px; }
.scores .sc.best { background: var(--rl-t); color: var(--rl-d); font-weight: 700; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; font-size: 13.5px; color: var(--ink2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.ic { display: inline-block; font-style: normal; font-size: 16px; line-height: 1; }
.ic.dot { width: 12px; height: 12px; border-radius: 50%; }
.ic.ring { width: 12px; height: 12px; border-radius: 50%; border: 2.5px solid; }
.ic.bar { width: 46px; height: 10px; border-radius: 3px; border: 1px solid var(--line); }
.ic.bar.teal { background: linear-gradient(90deg, color-mix(in srgb, var(--dis) 0%, var(--card)), var(--dis)); }
.ic.bar.green { background: linear-gradient(90deg, color-mix(in srgb, var(--rl) 0%, var(--card)), var(--rl)); }
.ic.line { width: 22px; height: 3px; border-radius: 2px; }
.ic.line.dash { height: 0; border-top: 2px dashed; background: none; }
@media (max-width: 820px) {
  .demo-row, .demo-two { grid-template-columns: 1fr; }
}
