:root {
  color-scheme: light;
  --ink: #202724;
  --muted: #58645d;
  --paper: #fbfcfa;
  --green: #37805e;
  --green-dark: #286347;
  --line: #dce2dc;
  --page-width: min(1160px, calc(100% - 64px));
  --text-width: 850px;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 28px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, figure { margin: 0; }
img, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; }
a { color: var(--green-dark); text-underline-offset: 4px; }
a, button { touch-action: manipulation; }
a:focus-visible, button:focus-visible, pre:focus-visible { outline: 2px solid var(--green-dark); outline-offset: 4px; }
::selection { color: #173b2a; background: #dcebdc; }
.page-shell { width: var(--page-width); margin-inline: auto; }
h2 { font-size: 34px; line-height: 1.25; font-weight: 650; letter-spacing: -0.025em; text-align: center; }
h3 { font-size: 24px; line-height: 1.3; font-weight: 600; letter-spacing: -0.015em; }
p { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; z-index: 10; top: 8px; left: 8px; padding: 8px 12px; transform: translateY(-150%); background: white; }
.skip-link:focus { transform: translateY(0); }

/* Retain the original centered paper identity and green title. */
.paper-header { max-width: 1060px; padding-top: 70px; text-align: center; }
h1 { font-size: clamp(36px, 4.5vw, 58px); line-height: 1.16; font-weight: 550; letter-spacing: -0.035em; text-wrap: balance; }
h1 strong { color: var(--green); font-weight: 720; }
h1 em { color: var(--green-dark); font-family: Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -0.04em; }
.authors { margin-top: 27px; color: var(--green-dark); font-size: 20px; font-weight: 550; }
.affiliations { margin-top: 3px; font-size: 15px; }
.venue { margin-top: 10px; color: var(--ink); font-size: 16px; font-weight: 500; }
.paper-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; min-width: 96px; padding: 8px 17px; border: 1px solid transparent; border-radius: 24px; color: white; background: var(--green-dark); font-size: 14px; font-weight: 550; text-decoration: none; }
.pill svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pill.is-disabled { color: #68716b; background: #f0f2ee; border-color: #dfe4dd; cursor: default; }
.pill-primary { transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease; }
.pill-primary:hover { background: #1b4f35; transform: translateY(-2px); box-shadow: 0 5px 12px rgba(31, 65, 41, 0.14); }

/* The teaser keeps its original dark caption, with a wider image and lighter frame. */
.hero-section { max-width: 1080px; margin-top: 44px; }
.hero-media { overflow: hidden; border: 1px solid #e0e5df; border-radius: 8px; background: #23382e; box-shadow: 0 7px 22px rgba(28, 47, 36, 0.06); }
.hero-media img { width: 100%; background: white; }
.hero-media figcaption { padding: 17px 26px 19px; color: #e2e8e1; font-size: 14px; line-height: 1.6; text-align: left; }
.page-index { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px 36px; max-width: 1080px; margin-top: 22px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.page-index a { padding: 4px 0; color: #5b695f; font-size: 13px; text-decoration: none; }
.page-index a:hover { color: var(--green-dark); text-decoration: underline; }
.content-section { margin-top: 88px; }
#abstract { max-width: 1040px; margin-top: 62px; padding: 36px 64px 43px; border-top: 2px solid #8aa184; background: #eff3e9; }
#abstract h2 { text-align: left; }
#abstract > p { max-width: var(--text-width); margin-top: 20px; }
.text-section { max-width: var(--text-width); }
.text-section > p { margin-top: 24px; color: #354239; font-family: Georgia, "Times New Roman", serif; font-size: 19px; line-height: 1.8; text-align: left; }

/* Figure-led method layout, with the full system above the two component views. */
.method { padding-top: 38px; border-top: 1px solid var(--line); }
.method-subsection { margin-top: 34px; }
.method-subsection > h3 { text-align: center; }
.method-subsection > p { max-width: var(--text-width); margin: 15px auto 0; }
.method-figure { margin-top: 25px; }
.figure-detail-link { position: relative; display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: white; cursor: zoom-in; transition: border-color 160ms ease; }
.figure-detail-link:hover { border-color: #9db4a5; }
.figure-detail-link::after { position: absolute; right: 10px; bottom: 10px; padding: 5px 10px; border: 1px solid #ccd8ca; border-radius: 3px; background: #fbfcfa; color: var(--green-dark); content: "View full size ↗"; font-size: 11px; font-weight: 500; opacity: 0; transition: opacity 160ms ease; pointer-events: none; }
.figure-detail-link:hover::after, .figure-detail-link:focus-visible::after { opacity: 1; }
.method-figure img { width: 100%; }
.method-figure figcaption { margin: 12px 3px 0; color: var(--muted); font-size: 13px; line-height: 1.65; text-align: left; }
.system-overview .method-figure figcaption { max-width: 960px; margin-inline: auto; }
.framework-detail-grid, .evaluation-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 38px; margin-top: 42px; align-items: start; }
.framework-detail, .evaluation-detail { min-width: 0; margin-top: 0; }
.framework-detail > h3, .evaluation-detail > h3 { min-height: 2.6em; margin-bottom: 16px; font-size: 22px; text-align: center; }
.framework-detail .method-figure, .evaluation-detail .method-figure { margin: 0; }
.framework-detail > p, .evaluation-detail > p { margin-top: 17px; font-size: 15px; line-height: 1.7; }

/* Keep the available overview video distinct from the comparison placeholders. */
.demo-heading { max-width: var(--text-width); margin: 0 auto 26px; text-align: center; }
.demo-heading p, .section-intro { margin-top: 15px; }
.demo-video { width: min(1020px, 100%); aspect-ratio: 16 / 9; margin-inline: auto; border-radius: 6px; background: #111a15; object-fit: contain; }
.demo-block h3 { margin-top: 13px; color: var(--muted); font-size: 14px; font-weight: 450; text-align: center; letter-spacing: 0; }
#demos { padding: 38px 40px 26px; border-radius: 8px; background: #23382e; }
#demos .demo-heading { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr); gap: 42px; align-items: center; max-width: none; margin-bottom: 28px; text-align: left; }
#demos h2 { max-width: 410px; color: #f3f5ec; font-size: 32px; text-align: left; }
#demos .demo-heading p { margin: 0; color: #cbd8cc; font-size: 15px; }
#demos .demo-video { width: 100%; border: 1px solid #516556; border-radius: 3px; }
#demos .demo-block h3 { color: #c6d3c7; font-size: 13px; }
.results { padding-top: 38px; border-top: 1px solid var(--line); }
.section-heading { display: grid; grid-template-columns: 280px minmax(0, 1fr); align-items: start; gap: 45px; }
.section-heading h2 { text-align: left; }
.section-heading .section-intro { max-width: 730px; margin: 0; }
.result-subsection { margin-top: 42px; }
.result-subsection > h3 { text-align: left; }
.result-subsection > p { max-width: 900px; margin-top: 14px; }
.results > .result-subsection + .result-subsection { margin-top: 64px; padding-top: 34px; border-top: 1px solid var(--line); }

/* A restrained comparison matrix: neutral media areas, green method labels. */
.simulation-video-grid, .real-world-video-grid { display: grid; gap: 23px; margin-top: 28px; }
.simulation-map-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px 16px; min-width: 0; }
.real-world-trial-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 24px; min-width: 0; }
.simulation-map-row h4, .real-world-trial-row h4 { grid-column: 1 / -1; color: #4f5c53; font-size: 14px; line-height: 1.5; font-weight: 550; }
.simulation-map-row, .real-world-trial-row { padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.simulation-map-row:last-child, .real-world-trial-row:last-child { padding-bottom: 0; border-bottom: 0; }
.simulation-map-row h4, .real-world-trial-row h4 { font-variant-numeric: tabular-nums; }
.experiment-video-card { min-width: 0; }
.experiment-video-placeholder { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; padding: 8px; border-top: 2px solid transparent; border-radius: 2px; background: #e9eee5; color: #596650; font-size: 12px; text-align: center; }
.experiment-video-card figcaption { padding-top: 8px; color: #576057; font-size: 13px; line-height: 1.5; text-align: center; }
.experiment-video-card.is-tapnav .experiment-video-placeholder { border-top: 2px solid #7a9b81; }
.experiment-video-card.is-tapnav figcaption { color: var(--green-dark); font-weight: 700; }
.experiment-video-card video { width: 100%; aspect-ratio: 16 / 9; border-radius: 4px; background: #111a15; object-fit: contain; }
.result-figure { margin-top: 32px; }
#simulation-results > h3, #real-world-results > h3 { font-family: Georgia, "Times New Roman", serif; font-size: 30px; font-weight: 400; letter-spacing: -0.025em; }
.result-subsection > .result-figure + p { margin-top: 21px; }
.recovery-block { max-width: 760px; margin: 44px auto 0; }
.recovery-block .demo-heading { margin-bottom: 18px; }
.recovery-block h3 { font-size: 23px; }
.recovery-video-slot { width: 100%; min-width: 0; }
.evaluation-detail-grid { margin-top: 54px; padding-top: 34px; border-top: 1px solid var(--line); }

/* Citation and the original page credit. */
.citation-section { max-width: 900px; }
.bibtex-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.copy-button { min-height: 38px; padding: 6px 15px; border: 1px solid #cbd5ca; border-radius: 5px; color: var(--green-dark); background: white; cursor: pointer; font-size: 12px; font-weight: 550; }
.copy-button:hover { background: #eef3ec; }
pre { overflow-x: auto; margin: 20px 0 0; padding: 24px 27px; border: 1px solid #e0e6dc; border-radius: 5px; background: #f0f3ec; color: #3d4b40; font-family: "SFMono-Regular", Consolas, monospace; font-size: 13px; line-height: 1.8; }
pre code { font: inherit; }
.site-footer { width: var(--page-width); margin: 70px auto 0; padding: 25px 0 30px; border-top: 1px solid var(--line); font-size: 12px; text-align: center; }
.site-footer p { color: #6b746b; }

@media (max-width: 900px) {
  :root { --page-width: calc(100% - 40px); }
  .framework-detail-grid, .evaluation-detail-grid { gap: 26px; }
  .framework-detail > h3, .evaluation-detail > h3 { font-size: 20px; }
  .simulation-map-row { gap: 9px 11px; }
  .experiment-video-placeholder { font-size: 11px; }
}

@media (max-width: 700px) {
  .paper-header { padding-top: 43px; }
  .title-break { display: none; }
  h1 { font-size: 39px; }
  h2 { font-size: 30px; }
  .authors { margin-top: 24px; font-size: 18px; }
  .affiliations { font-size: 14px; }
  .venue { font-size: 15px; }
  .hero-section { margin-top: 32px; }
  .hero-media figcaption { padding: 15px 18px; font-size: 13px; }
  .page-index { gap: 12px 25px; margin-top: 14px; padding: 12px 0; }
  #abstract { margin-top: 46px; padding: 27px 27px 32px; }
  .content-section { margin-top: 62px; }
  .text-section > p { margin-top: 20px; font-size: 18px; line-height: 1.75; }
  .framework-detail-grid, .evaluation-detail-grid { grid-template-columns: 1fr; gap: 34px; }
  .framework-detail > h3, .evaluation-detail > h3 { min-height: 0; font-size: 22px; }
  .simulation-map-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 12px; }
  .real-world-trial-row { gap: 9px 12px; }
  .result-subsection { margin-top: 34px; }
  .recovery-block { margin-top: 34px; }
  #demos { padding: 26px 22px 20px; }
  #demos .demo-heading, .section-heading { grid-template-columns: 1fr; gap: 15px; }
  #demos h2 { max-width: none; font-size: 29px; }
}

@media (max-width: 440px) {
  :root { --page-width: calc(100% - 32px); }
  body { font-size: 15px; }
  h1 { font-size: 35px; line-height: 1.18; }
  h2 { font-size: 29px; }
  h3 { font-size: 22px; }
  .paper-links { gap: 8px; }
  .pill { min-width: 86px; padding-inline: 13px; }
  .hero-media { border-radius: 5px; }
  .hero-media figcaption { font-size: 12px; padding: 13px 15px; }
  .page-index { gap: 10px 21px; }
  .page-index a { font-size: 12px; }
  #demos { padding: 23px 16px 18px; border-radius: 5px; }
  #demos h2 { font-size: 27px; }
  #demos .demo-heading p { font-size: 14px; }
  .method, .results { padding-top: 28px; }
  .framework-detail > p, .evaluation-detail > p { font-size: 15px; }
  .experiment-video-placeholder { font-size: 11px; }
  .experiment-video-card figcaption { font-size: 12px; }
  .method-figure figcaption { font-size: 12px; }
  #abstract { padding: 24px 22px 28px; }
  #simulation-results > h3, #real-world-results > h3 { font-size: 27px; }
  pre { padding: 17px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
