:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f7f8fa;
  --text: #1b1f24;
  --muted: #5b6470;
  --faint: #8a929c;
  --line: #e6e8eb;
  --accent: #1f4e8c;
  --accent-soft: #e8eff8;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15.5px/1.7 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, video:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
img, video { display: block; max-width: 100%; }
figure, p { margin-top: 0; }
.container { width: min(960px, calc(100% - 40px)); margin-inline: auto; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 30; padding: 8px 12px; background: var(--text); color: var(--bg); }
.skip-link:focus { top: 8px; }

.site-header { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
.nav { height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.wordmark { font: 600 18px "IBM Plex Sans", Inter, system-ui, sans-serif; color: var(--text); }
.wordmark:hover { text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 23px; }
.nav-links a { color: var(--muted); font-size: 13px; font-weight: 500; white-space: nowrap; }
.nav-links a:hover { color: var(--accent); text-decoration: none; }

.hero { max-width: 900px; padding-top: 70px; padding-bottom: 34px; text-align: center; }
.venue { margin-bottom: 16px; color: var(--accent); font-size: 17px; font-weight: 700; letter-spacing: .03em; }
h1, h2, h3 { font-family: "IBM Plex Sans", Inter, system-ui, sans-serif; }
h1 { margin: 0 auto 21px; max-width: 900px; font-size: clamp(30px, 4.2vw, 42px); font-weight: 600; letter-spacing: -.025em; line-height: 1.23; }
.authors { max-width: 840px; margin: 0 auto 8px; font-size: 16px; line-height: 1.8; }
.author { white-space: nowrap; }
.authors a { color: inherit; text-decoration: underline; text-decoration-color: var(--faint); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.authors a:hover { color: var(--accent); text-decoration-color: var(--accent); }
.authors sup, .affiliations sup { margin-left: 2px; color: var(--accent); font-size: .7em; font-weight: 600; }
.affiliations { display: flex; flex-wrap: wrap; justify-content: center; gap: 1px 16px; max-width: 900px; margin: 0 auto 24px; color: var(--muted); font-size: 13px; }
.affiliations span { white-space: nowrap; }
.hero-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pill { display: inline-flex; align-items: center; min-height: 38px; padding: 5px 15px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--text); font-size: 13px; font-weight: 600; }
.pill:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.pill-primary { border-color: var(--text); background: var(--text); color: var(--bg); }
.pill-primary:hover { border-color: var(--accent); background: var(--accent); color: var(--bg); }

.teaser { max-width: 960px; padding-top: 18px; }
.teaser img { width: 100%; height: auto; }
.teaser figcaption, .figure figcaption { margin: 9px 0 0; color: var(--faint); font-size: 12px; text-align: center; line-height: 1.55; }

.highlights { max-width: 880px; display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 46px; padding-top: 23px; padding-bottom: 26px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.highlights > div { padding: 0 20px; text-align: center; border-right: 1px solid var(--line); }
.highlights > div:last-child { border-right: 0; }
.highlights strong { display: block; color: var(--accent); font: 600 28px "IBM Plex Sans", Inter, system-ui, sans-serif; line-height: 1.3; }
.highlights span { display: block; max-width: 230px; margin: 3px auto 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

.section { padding-top: 60px; padding-bottom: 62px; }
.section-soft { background: var(--surface); }
.section h2 { margin: 0 0 22px; font-size: 27px; font-weight: 600; letter-spacing: -.015em; text-align: center; }
.section h3 { margin: 35px 0 10px; font-size: 18px; font-weight: 600; }
.section p { max-width: 820px; margin-left: auto; margin-right: auto; line-height: 1.8; }
.section p:last-child { margin-bottom: 0; }
.section:not(.section-soft) + .section:not(.section-soft) { border-top: 1px solid var(--line); }
.method-body { max-width: 820px; margin-inline: auto; }
.method-body h3 { margin-top: 32px; }
.math-figure { margin: 20px auto 15px; padding: 18px 18px 14px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 6px; background: var(--bg); }
.math-figure img { height: auto; margin-inline: auto; }
.math-figure .math-objective-main { width: min(100%, 203px); }
.math-constraint { display: flex; align-items: center; justify-content: center; gap: 20px; max-width: 720px; margin: 14px auto 0; padding: 12px 16px; border-radius: 4px; background: var(--accent-soft); }
.math-constraint span { flex: none; color: var(--accent); font-size: 13px; font-weight: 700; }
.math-constraint img { width: min(100%, 206px); }
.math-figure figcaption { max-width: 680px; margin: 13px auto 0; color: var(--muted); font-size: 12px; line-height: 1.6; text-align: center; }
.math-figure-theorem { padding: 6px 18px; }
.eq { max-width: 100%; margin: 14px 0 16px; overflow-x: auto; overflow-y: hidden; padding: 2px 0; }
.eq .katex-display { margin: 0; }
.katex { font-size: 1.04em; }
.math-figure .eq { margin: 0; }
.takeaways { max-width: 820px; margin: 0 auto; padding-left: 22px; }
.takeaways li { margin-bottom: 12px; padding-left: 4px; line-height: 1.75; }
.takeaways li:last-child { margin-bottom: 0; }
.math-figure-theorem img { width: min(100%, 420px); }
.method-body .method-note { color: var(--muted); font-size: 13px; }
.method-diagrams { display: grid; gap: 23px; margin: 26px 0 30px; }
.method-diagram { margin: 0; }
.method-diagram figcaption { margin-bottom: 11px; font-size: 14px; font-weight: 600; }
.diagram-flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.diagram-flow-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.diagram-flow li { position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 82px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); text-align: center; }
.diagram-flow li:not(:last-child)::after { position: absolute; top: 50%; right: -17px; transform: translateY(-50%); color: var(--accent); content: "→"; font-size: 17px; font-weight: 600; }
.diagram-flow strong { font-size: 14px; line-height: 1.3; }
.diagram-flow li > span { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.4; }
#experiments > p { max-width: none; }
.figure { margin: 25px 0 0; }
.figure img { width: 100%; height: auto; margin-inline: auto; }
.figure figcaption { max-width: 820px; margin: 12px auto 0; }
.arena { max-width: 790px; margin: 30px auto 30px; }

.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
caption { margin-bottom: 10px; color: var(--muted); font-size: 13px; text-align: left; }
th, td { padding: 11px 13px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
th:first-child { text-align: left; }
thead th { border-top: 1px solid var(--line); color: var(--muted); font-weight: 600; }
tbody th { font-weight: 500; }
.ours { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.ours th { font-weight: 700; }
.dsrl-table small { display: inline-block; margin-left: 3px; color: var(--faint); font-size: 11px; }
.emphasis { color: var(--accent); font-weight: 700; }
.note { margin-top: 12px; color: var(--faint); font-size: 12px; }
.bar-chart { max-width: 720px; margin: 34px auto 0; }
.bar-chart figcaption { margin-bottom: 12px; font-size: 15px; font-weight: 600; text-align: center; }
.bar-chart ul { margin: 0; padding: 0; list-style: none; }
.bar-chart li { display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: center; gap: 10px; margin-bottom: 5px; font-size: 13px; }
.bar-label { color: var(--muted); text-align: right; white-space: nowrap; }
.bar-track { display: flex; align-items: center; gap: 7px; padding-right: 26px; }
.bar { flex: none; height: 17px; border-radius: 2px; background: #b4bcc8; }
.bar-value { font-weight: 600; font-variant-numeric: tabular-nums; }
.bar-ours .bar { background: var(--accent); }
.bar-ours .bar-label { color: var(--text); font-weight: 600; }
.bar-ours .bar-value { color: var(--accent); }
.bar-chart .note { text-align: center; }
.bar-chart li { position: relative; cursor: default; }
.bar-chart li:hover .bar, .bar-chart li:focus .bar { filter: brightness(.9); }
.bar-chart li:focus { outline: none; }
.bar-chart li:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bar-tip { display: none; position: absolute; z-index: 5; top: calc(100% + 4px); left: 114px; right: 0; padding: 9px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); box-shadow: 0 6px 20px rgba(20, 30, 45, .12); color: var(--muted); font-size: 12px; line-height: 1.5; }
.bar-chart li:hover .bar-tip, .bar-chart li:focus .bar-tip { display: block; }
.tip-group { display: block; }
.tip-group + .tip-group { margin-top: 4px; }
.tip-group b { margin-right: 4px; color: var(--text); font-weight: 600; }
.plot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 27px 22px; margin: 27px auto; }
.plot { margin: 0; }
.plot a { display: block; border: 1px solid var(--line); background: #fff; }
.plot a:hover { border-color: var(--accent); }
.plot img { width: 100%; height: auto; }
.plot figcaption { margin-top: 7px; color: var(--muted); font-size: 13px; text-align: center; }

.video-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 10px; margin: 0 auto 6px; }
.vc-btn { min-width: 76px; min-height: 34px; padding: 4px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--text); font: 600 13px Inter, system-ui, sans-serif; cursor: pointer; }
.vc-btn:hover { border-color: var(--accent); color: var(--accent); }
.vc-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.vc-timeline { display: flex; flex: 1 1 320px; align-items: center; gap: 10px; max-width: 560px; min-width: 220px; }
.vc-timeline input[type=range] { flex: 1; min-width: 0; height: 24px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.vc-timeline input[type=range]:disabled { cursor: default; opacity: .5; }
.vc-time { flex: none; min-width: 74px; color: var(--muted); font: 500 12px Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums; text-align: right; }
.vc-note { flex-basis: 100%; color: var(--muted); font-size: 12px; text-align: center; }
.sync-video { cursor: pointer; }
.video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 22px; margin-top: 28px; }
.video-item { margin: 0; }
.video-item video { width: 100%; aspect-ratio: 16 / 9; border-radius: 6px; background: #101114; object-fit: contain; }
.video-item figcaption { margin-top: 8px; color: var(--text); font-size: 14px; font-weight: 600; text-align: center; }
.featured-video { max-width: 880px; margin: 26px auto 34px; }

.citation pre { overflow-x: auto; margin: 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--muted); font: 12px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.footer { border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; }
.footer .container { display: flex; justify-content: space-between; gap: 15px; padding-top: 25px; padding-bottom: 35px; }

@media (max-width: 680px) {
  .container { width: min(100% - 32px, 500px); }
  .nav { height: 54px; }
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 12px; }
  .nav-links a:nth-child(1), .nav-links a:nth-child(2) { display: none; }
  .hero { padding-top: 45px; padding-bottom: 24px; }
  h1 { font-size: clamp(27px, 7vw, 36px); }
  .authors { font-size: 14px; }
  .affiliations { font-size: 12px; }
  .affiliations span { white-space: normal; }
  .teaser { padding-top: 10px; }
  .highlights { grid-template-columns: 1fr; margin-top: 32px; padding: 0; }
  .highlights > div { padding: 16px 6px; border-right: 0; border-bottom: 1px solid var(--line); }
  .highlights > div:last-child { border-bottom: 0; }
  .highlights strong { font-size: 25px; }
  .highlights span { max-width: 320px; }
  .section { padding-top: 48px; padding-bottom: 52px; }
  .section h2 { font-size: 24px; }
  .section h3 { font-size: 17px; }
  .section p { font-size: 14px; }
  .math-figure { padding: 18px 12px 14px; }
  .katex { font-size: .95em; }
  .takeaways li { font-size: 14px; }
  .math-constraint { flex-direction: column; gap: 8px; margin-top: 14px; padding: 12px 10px; }
  .math-constraint img { width: min(100%, 191px); }
  .diagram-flow, .diagram-flow-three { grid-template-columns: 1fr; gap: 17px; }
  .diagram-flow li { min-height: 62px; padding: 8px 12px; }
  .diagram-flow li:not(:last-child)::after { top: auto; right: 50%; bottom: -17px; transform: translateX(50%); content: "↓"; font-size: 14px; }
  table { min-width: 590px; font-size: 12px; }
  th, td { padding: 10px 9px; }
  .bar-chart li { grid-template-columns: 86px minmax(0, 1fr); gap: 8px; font-size: 12px; }
  .bar-tip { left: 0; }
  .plot-grid { grid-template-columns: 1fr; }
  .video-grid { grid-template-columns: 1fr; gap: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
