:root {
  --blue: #3273dc;
  --blue-dark: #2156a5;
  --ink: #242424;
  --muted: #5f6368;
  --line: #dedede;
  --soft: #f5f5f5;
  --green: #237a4b;
  --max: 960px;
  --wide: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); text-decoration: underline; }
button { font: inherit; }
.container, .wide-container { width: calc(100% - 40px); margin: 0 auto; }
.container { max-width: var(--max); }
.wide-container { max-width: var(--wide); }
.narrow { max-width: 860px; margin-right: auto !important; margin-left: auto !important; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 50; transform: translateY(-180%); padding: 8px 12px; background: #111; color: #fff; border-radius: 4px; }
.skip-link:focus { transform: none; }

.publication-header { padding: 72px 0 32px; text-align: center; }
h1 { max-width: 1080px; margin: 0 auto 27px; font-size: clamp(36px, 5vw, 54px); line-height: 1.15; font-weight: 700; letter-spacing: -.025em; }
.accent { color: var(--blue); }
.authors { max-width: 970px; margin: 0 auto; color: #333; font-size: 19px; line-height: 1.85; }
.authors a { white-space: nowrap; }
sup { font-size: .65em; vertical-align: super; }
.affiliations { margin: 6px 0 0; font-size: 17px; }
.venue { margin: 8px 0 0; font-size: 19px; font-weight: 700; }
.publication-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 23px; }
.pill { display: inline-flex; align-items: center; gap: 8px; min-height: 43px; padding: 0 17px; border-radius: 999px; background: #363636; color: #fff; font-size: 15px; font-weight: 600; }
.pill:hover { background: #111; color: #fff; text-decoration: none; }
.pill-icon { display: grid; width: 20px; height: 20px; place-items: center; font-size: 17px; }
.pill small { color: #cfcfcf; font-size: 11px; font-weight: 500; }
.pill.disabled { background: #777; cursor: default; }

.teaser { padding: 22px 0 46px; }
.teaser video { width: 100%; border: 1px solid #d4d4d4; border-radius: 10px; background: #111; }
.teaser-caption { max-width: 970px; margin: 17px auto 0; font-size: 18px; line-height: 1.55; text-align: center; }

.overview-video { padding-top: 48px; }
.overview-player { max-width: 1120px; margin: 0 auto; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--soft); box-shadow: 0 18px 45px rgba(0, 0, 0, .1); }
.overview-player video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #111; }
.overview-player figcaption { display: flex; justify-content: space-between; gap: 20px; padding: 12px 15px; }
.overview-player figcaption span { color: var(--muted); font-size: 13px; }

.path-renders { padding-top: 48px; }
.video-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.video-grid figure { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--soft); }
.video-grid video { width: 100%; aspect-ratio: 7 / 4; background: #111; }
.video-grid figcaption { display: flex; justify-content: space-between; gap: 15px; align-items: baseline; margin: 0; padding: 10px 13px; color: var(--ink); text-align: left; }
.video-grid figcaption span { color: var(--muted); font-size: 12px; }
.video-note { max-width: 900px; margin: 16px auto 0 !important; color: var(--muted); font-size: 12px; text-align: center; }
.matched-motion { background: #f6f8fa; }
.matched-video-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.matched-video-grid figure { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: #fff; box-shadow: 0 14px 34px rgba(0,0,0,.08); }
.matched-video-grid video { width: 100%; aspect-ratio: 1712 / 730; background: #071116; }
.matched-video-grid figcaption { display: flex; justify-content: space-between; gap: 15px; margin: 0; padding: 11px 13px; color: var(--ink); text-align: left; }
.matched-video-grid figcaption span { color: var(--muted); font-size: 12px; }
.protocol-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-top: 16px; }
.protocol-strip span { padding: 10px 12px; border-left: 3px solid var(--blue); background: #fff; color: var(--muted); font-size: 12px; }
.protocol-strip b { display: block; color: var(--ink); }

.section { padding: 52px 0; border-top: 1px solid #ececec; }
.section h2 { margin: 0 0 22px; font-size: 32px; line-height: 1.25; text-align: center; }
.section h3 { margin: 0 0 10px; font-size: 21px; line-height: 1.35; }
.section p { margin: 0 0 16px; }
.section-intro { margin: -5px 0 30px !important; color: var(--muted); text-align: center; }
#abstract p { text-align: justify; }

.method-figure { margin: 28px 0 20px; }
.method-figure img { width: 100%; padding: 12px; border: 1px solid #d2d2d2; background: #101515; cursor: zoom-in; }
figcaption, .method-figure figcaption { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.5; text-align: center; }
.method-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 27px; }
.method-points p { margin: 0; font-size: 15px; }

.example { margin-top: 34px; }
.example + .example { margin-top: 50px; }
.example h3 { display: flex; align-items: baseline; justify-content: center; gap: 12px; text-align: center; }
.example h3 span { color: var(--muted); font-size: 14px; font-weight: 400; }
.comparison { display: grid; grid-template-columns: repeat(5, minmax(190px, 1fr)); gap: 8px; overflow-x: auto; padding: 2px 2px 8px; }
.comparison figure { min-width: 0; margin: 0; }
.comparison img { width: 100%; aspect-ratio: 7 / 4; object-fit: cover; border: 2px solid transparent; cursor: zoom-in; }
.comparison figcaption { margin: 0; padding: 7px 4px; background: var(--soft); color: #333; font-size: 13px; font-weight: 600; }
.comparison figcaption small { display: block; color: var(--muted); font-size: 10px; font-weight: 400; }
.comparison .ours img { border-color: var(--blue); }
.comparison .ours figcaption { background: #eaf2ff; color: var(--blue-dark); }
.example-caption { max-width: 850px; margin: 7px auto 0 !important; color: var(--muted); font-size: 14px; text-align: center; }
.provenance-note { max-width: 860px; margin: 34px auto 0 !important; padding: 13px 17px; border-left: 4px solid var(--blue); background: #f4f7fb; color: var(--muted); font-size: 14px; }

.table-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.nvs-complete, .pose-summary-table { grid-column: 1 / -1; }
.nvs-complete tbody tr:nth-child(3n) td { border-bottom: 2px solid #cfd5da; }
.scene-evidence { margin: 0 0 28px; padding: 18px; border: 1px solid var(--line); border-radius: 6px; background: #fafafa; }
.scene-evidence > img { width: 100%; }
.scene-evidence-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-top: 6px; }
.scene-evidence-stats p { margin: 0; padding: 10px 12px; border-top: 3px solid var(--blue); background: white; }
.scene-evidence-stats strong, .scene-evidence-stats span { display: block; }
.scene-evidence-stats strong { color: var(--blue-dark); font-size: 20px; }
.scene-evidence-stats span { color: var(--muted); font-size: 11px; }
.table-block { padding: 22px; border: 1px solid var(--line); border-radius: 6px; }
.table-block h3 { margin-bottom: 2px; text-align: center; }
.table-caption { margin: 0 0 15px !important; color: var(--muted); font-size: 13px; text-align: center; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; text-align: center; font-variant-numeric: tabular-nums; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--line); }
th { background: var(--soft); font-weight: 600; }
th:first-child, td:first-child { text-align: left; }
tbody tr:last-child td { border-bottom: 0; }
.best td, .best-cell { font-weight: 700; }
.best td { background: #eef4ff; }
.best-cell { background: #dceaff; color: #174985; }
.footnote { margin: 12px 0 0 !important; color: var(--muted); font-size: 12px; line-height: 1.45; }
.pose-result { display: grid; grid-template-columns: .9fr 1.1fr; gap: 34px; align-items: center; margin: 40px 0; }
.pose-result img { width: 100%; }
.inline-metrics { display: flex; gap: 22px; margin-top: 20px !important; }
.inline-metrics span { color: var(--muted); font-size: 12px; }
.inline-metrics b { color: var(--ink); font-size: 23px; }
.cross-dataset { margin-top: 18px; }
.all-pose-video { margin: 40px 0; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: #fafafa; }
.all-pose-video video { width: 100%; aspect-ratio: 1920 / 888; background: #f7f7f3; }

.analysis-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 50px; }
.analysis-grid > div { padding: 23px; border: 1px solid var(--line); border-radius: 6px; }
.analysis-grid p { color: var(--muted); font-size: 14px; }
.ablation-bar { display: grid; grid-template-columns: 120px 1fr 40px; gap: 10px; align-items: center; margin: 12px 0; font-size: 13px; }
.ablation-bar i { height: 12px; overflow: hidden; background: #e5e5e5; border-radius: 2px; }
.ablation-bar i b { display: block; height: 100%; background: var(--blue); }
.efficiency-list { margin: 0; }
.efficiency-list div { display: flex; justify-content: space-between; gap: 20px; padding: 11px 0; border-top: 1px solid var(--line); }
.efficiency-list div:first-child { border-top: 0; }
.efficiency-list dt { color: var(--muted); font-size: 14px; }
.efficiency-list dd { margin: 0; font-weight: 700; }

.limitations-copy { max-width: 900px; margin: 0 auto 25px; }
.limitations-copy p { color: var(--muted); text-align: center; }

.bibtex { position: relative; max-width: 900px; margin: 0 auto; }
.bibtex pre { overflow-x: auto; margin: 0; padding: 23px; border-radius: 6px; background: #f4f4f4; color: #333; font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; }
.bibtex button { position: absolute; top: 10px; right: 10px; padding: 5px 11px; border: 1px solid #bbb; border-radius: 4px; background: #fff; cursor: pointer; }

footer { padding: 35px 20px 55px; border-top: 1px solid #ececec; color: var(--muted); font-size: 13px; text-align: center; }
footer p { margin: 4px 0; }

dialog { width: min(1500px, calc(100% - 30px)); max-height: calc(100vh - 30px); padding: 0; border: 0; border-radius: 4px; background: #111; box-shadow: 0 25px 80px #0008; }
dialog::backdrop { background: #000b; }
dialog img { width: 100%; max-height: calc(100vh - 30px); object-fit: contain; }
dialog button { position: fixed; top: 20px; right: 24px; width: 42px; height: 42px; border: 1px solid #fff8; border-radius: 50%; background: #111c; color: #fff; font-size: 27px; line-height: 1; cursor: pointer; }

@media (max-width: 800px) {
  .publication-header { padding-top: 45px; }
  h1 { font-size: 36px; }
  .authors { font-size: 17px; }
  .method-points, .table-grid, .pose-result, .analysis-grid, .video-grid, .matched-video-grid { grid-template-columns: 1fr; }
  .protocol-strip, .scene-evidence-stats { grid-template-columns: 1fr 1fr; }
  .comparison { grid-template-columns: repeat(5, 76vw); }
  .example h3 { display: block; }
  .example h3 span { display: block; margin-top: 4px; }
  .pose-result { gap: 10px; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .container, .wide-container { width: calc(100% - 26px); }
  h1 { font-size: 31px; }
  .publication-header { padding-top: 35px; }
  .authors { line-height: 1.7; }
  .affiliations { font-size: 15px; }
  .teaser-caption { font-size: 16px; }
  .section { padding: 42px 0; }
  .section h2 { font-size: 27px; }
  .method-points { gap: 12px; }
  .comparison { grid-template-columns: repeat(5, 82vw); }
  .table-block, .analysis-grid > div { padding: 14px; }
  th, td { padding: 8px; }
  .inline-metrics { flex-wrap: wrap; gap: 12px; }
  .protocol-strip, .scene-evidence-stats { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
