/* ThinkWAM refresh — content sections below the hero.
   The hero and headline-metric strip are intentionally untouched. */
:root {
  --tint: #f5f6fa;
  --card-line: #e3e6ee;
  --card-shadow: 0 1px 2px rgba(31, 41, 74, .04), 0 10px 30px rgba(31, 41, 74, .06);
  --radius: 14px;
  --night: #000;
}

/* ---------- Section rhythm ---------- */
main > .band { padding-block: 60px; border: 0; background: #fff; }
main > .band.band-tint { background: var(--tint); }
main > .band + .band { border-top: 1px solid #eceef3; }
main > .band.band-tint + .band, main > .band + .band.band-tint { border-top-color: transparent; }

/* ---------- Section headings ---------- */
.band .academic-heading { position: relative; margin-bottom: 28px; max-width: 860px; }
.band .section-index {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px;
  font: 600 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 1.5px;
  color: var(--green); text-transform: uppercase;
}
.band .section-index::after { content: ''; width: 36px; height: 1px; background: currentColor; opacity: .55; }
.band .academic-heading h2 { font-size: clamp(30px, 3.4vw, 42px); font-weight: 760; letter-spacing: -1.4px; line-height: 1.12; color: #1d2030; }
.band .academic-heading .section-deck { margin-top: 14px; max-width: 720px; font-size: 17px; line-height: 1.65; color: #626879; }
.band .academic-heading .section-deck b { color: #35466f; }
.band .academic-heading .section-deck u { text-underline-offset: 3px; }

/* ---------- Generic cards ---------- */
.figure-card, .table-card, .overview-composition {
  background: #fff; border: 1px solid var(--card-line); border-radius: var(--radius); box-shadow: var(--card-shadow);
}
.figure-card { padding: 24px; }
.table-card { padding: 8px 8px 4px; overflow: hidden; }
.table-card .table-scroll { border: 0; border-radius: 8px; }
.table-card .comparison-panel > h3, .table-card .hardware-label { padding: 16px 16px 4px; margin: 0 0 10px; }
.table-card .real-results-body { max-width: none; }
.paper-figure .zoomable { border-radius: 8px; }
.zoom-hint { border-radius: 999px; padding: 4px 10px; }

/* ---------- 01 Overview ---------- */
#overview .abstract-copy {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 32px; max-width: none; margin-bottom: 28px; align-items: start;
}
#overview .abstract-copy p:first-child { margin: 0; font-size: 24px; line-height: 1.5; letter-spacing: -.3px; color: #23273a; font-weight: 450; }
#overview .abstract-copy p:last-child { margin: 4px 0 0; padding-left: 22px; border-left: 2px solid #d5dbef; font-size: 16px; line-height: 1.75; color: #5d6373; }
#overview .overview-composition { padding: 24px; gap: 28px; }

/* ---------- 02 Method ---------- */
.method-section .figure-card .paper-figure { max-width: none; }
.method-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 28px 0 0; padding: 0; list-style: none; counter-reset: none; }
.method-steps li {
  position: relative; padding: 26px 24px 24px; background: #fff; border: 1px solid var(--card-line);
  border-radius: var(--radius); box-shadow: var(--card-shadow); transition: transform .25s ease, box-shadow .25s ease;
}
.method-steps li:hover { transform: translateY(-3px); box-shadow: 0 1px 2px rgba(31,41,74,.05), 0 16px 36px rgba(31,41,74,.1); }
.method-steps li + li::before {
  content: '→'; position: absolute; left: -17px; top: 34px; color: #9aa6cf; font-size: 15px;
}
.step-num {
  display: inline-grid; place-items: center; width: 32px; height: 32px; margin-bottom: 14px; border-radius: 50%;
  background: linear-gradient(135deg, #6678b9, #45568f); color: #fff; font-size: 14px; font-weight: 700;
}
.method-steps strong { display: block; margin-bottom: 6px; font-size: 19px; letter-spacing: -.3px; color: #23273a; }
.method-steps p { margin: 0; font-size: 15px; line-height: 1.7; color: #5f6472; }
.method-section .content-details { margin-top: 24px; }

/* ---------- 03 Demonstrations ---------- */
#demonstrations .demo-toolbar { justify-content: flex-start; }
#demonstrations #demo-panel {
  padding: 28px 28px 32px; background: var(--tint); border: 1px solid #eceef4; border-radius: 18px;
}
#demonstrations .real-task-description { margin-bottom: 14px; }
#demonstrations .simulation-filters { border-bottom-color: #dfe2ea; }
.demo-card { padding: 12px 12px 16px; background: #fff; border: 1px solid var(--card-line); border-radius: var(--radius); box-shadow: var(--card-shadow); }
.demo-card .camera-switcher { margin: 0 0 10px; }
.demo-video-wrap { border-radius: 9px; }
.demo-card figcaption { padding: 12px 4px 0; }
.demo-card h3 { font-size: 15.5px; }

/* ---------- Pills ---------- */
.pill-tabs > button { background: #fff; transition: background .2s ease, color .2s ease, border-color .2s ease; }
.pill-tabs > button:hover:not([aria-selected=true]) { border-color: #b9c2e0; color: #3e4c7c; }
.band-tint .pill-tabs > button:not([aria-selected=true]) { background: #fff; }

/* ---------- 04 Performance ---------- */
.results-section .native-charts { gap: 24px; }
.results-section .chart-card { border-radius: var(--radius); border-color: var(--card-line); box-shadow: var(--card-shadow); padding: 24px; }
.results-section .chart-card,
.results-section .figure-card,
.results-section .efficiency-figures,
.results-section .zoomable { background: transparent; border: 0; box-shadow: none; border-radius: 0; }
.results-section .figure-card,
.results-section .efficiency-figures { padding: 0; }

/* ---------- 05 / 06 Tables ---------- */
.simulation-results .result-tabs { margin-bottom: 20px; }
.comparison-table thead th { background: #f6f7fb; }
.comparison-table tbody tr.ours td { background: #eef1fb; }
.real-world-results .table-card { max-width: 1040px; }

/* ---------- 07 Efficiency ---------- */
#efficiency .figure-card { margin-bottom: 0; }
#efficiency .efficiency-figures { margin: 0 auto; }
#efficiency .efficiency-subheading { max-width: none; margin: 0 0 16px; font-size: 19px; color: #23273a; }
#efficiency #latency-comparison { max-width: none; }

/* Results and their demonstrations share one numbered section. */
.performance-efficiency, .simulation-timings, .demo-block { margin-top: 30px; }
.subsection-heading { margin: 0 0 20px; color: #23273a; font-size: 25px; line-height: 1.25; letter-spacing: -.5px; }
.demo-block .real-task-description { margin-bottom: 18px; }
.demo-block .demo-context { margin: -10px 0 20px; text-align: center; color: #626879; }
.demo-block .simulation-filters { max-width: none; }
.demo-block .demo-group-grid { width: 100%; margin-inline: auto; gap: 16px; }
.demo-block .simulation-group-grid { max-width: 1120px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.demo-block .real-group-grid { width: 88%; max-width: 760px; }
.demo-block .demo-card { padding: 8px 8px 10px; }
.demo-block .camera-switcher { margin-bottom: 8px; }
.simulation-group-grid .camera-switcher button { gap: 4px; padding-inline: 5px; font-size: 11px; }
.simulation-group-grid .camera-switcher .control-icon { width: 12px; height: 12px; }
.demo-block .demo-card figcaption { padding-top: 9px; min-height: 0; }
.simulation-timings .efficiency-subheading { max-width: none; margin: 0 0 20px; font-size: 25px; }
.simulation-timings #latency-comparison { max-width: none; }
.mechanism-row[data-mechanism-row="correction-and-recoveries"] { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.mechanism-row[data-mechanism-row="correction-and-recoveries"] .zoomable { height: auto; padding: 0; }
.mechanism-row[data-mechanism-row="correction-and-recoveries"] img { width: 100%; height: auto; max-height: none; }
@media (min-width: 761px) {
  .mechanism-row[data-mechanism-row="correction-and-recoveries"] { grid-template-rows: auto 1fr; row-gap: 12px; }
  .mechanism-row[data-mechanism-row="correction-and-recoveries"] > .mechanism-item,
  .mechanism-row[data-mechanism-row="correction-and-recoveries"] > .mechanism-group { display: grid; grid-template-rows: subgrid; grid-row: span 2; row-gap: 12px; }
  .mechanism-row[data-mechanism-row="correction-and-recoveries"] > .mechanism-group > .mechanism-item { display: contents; }
  .mechanism-row[data-mechanism-row="correction-and-recoveries"] .mechanism-item > h3,
  .mechanism-row[data-mechanism-row="correction-and-recoveries"] .mechanism-group > h3 { min-height: 0; margin: 0; align-items: flex-start; }
}
@media (min-width: 761px) and (max-width: 1000px) {
  .simulation-group-grid .camera-switcher button { gap: 2px; padding-inline: 2px; font-size: 10px; }
  .simulation-group-grid .camera-switcher .control-icon { width: 10px; height: 10px; }
}

/* ---------- 08 Analysis ---------- */
.analysis-section .mechanism-figures { gap: 28px; }
.analysis-section .mechanism-row {
  max-width: none; padding: 28px; background: #fff; border: 1px solid var(--card-line); border-radius: var(--radius); box-shadow: var(--card-shadow);
}

/* ---------- BibTeX + footer (bookend the dark hero) ---------- */
.band.band-dark { background: var(--night); color: #e8e9ef; border-top: 0; }
.band-dark .section-index { color: #9fb0ef; display: inline-flex; align-items: center; gap: 10px; margin-bottom: 12px; font: 600 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 1.5px; text-transform: uppercase; }
.band-dark .section-index::after { content: ''; width: 36px; height: 1px; background: currentColor; opacity: .55; }
.bibtex-section { padding-block: 80px; }
.band-dark .bibtex-header { align-items: flex-end; margin-bottom: 22px; }
.band-dark .bibtex-header h2 { margin: 0; color: #fff; font-size: 34px; }
.band-dark .bibtex-header button {
  border: 1px solid #3a3d4a; border-radius: 999px; background: #1c1e26; color: #dfe3f5; padding: 8px 18px; font-size: 13px; cursor: pointer;
}
.band-dark .bibtex-header button:hover { background: #2a2d3a; border-color: #565a6c; }
.band-dark pre { background: #181a21; color: #c9cfe6; border: 1px solid #262833; border-radius: 12px; padding: 28px; font-size: 13.5px; }
/* BibTeX and footer read as one continuous dark block. */
main > .band.band-dark { padding-bottom: 56px; }
.site-footer { background: var(--night); border-top: 0; margin-top: 0; padding-block: 0 32px; color: #8d92a3; }
.site-footer .footer-inner { padding-top: 24px; padding-right: 64px; border-top: 1px solid rgba(255,255,255,.08); }
.site-footer .wordmark, .site-footer .footer-inner .wordmark { color: #fff; }
.site-footer a { color: #b9c0dc; }
.site-footer a:hover { color: #fff; }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 50; display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: 50%; background: #1d2030; color: #fff; font-size: 18px; text-decoration: none;
  box-shadow: 0 8px 24px rgba(17,18,22,.25); opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, background .2s ease;
}
.back-to-top.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.back-to-top:hover { background: var(--green-dark); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  #overview .abstract-copy { grid-template-columns: 1fr; gap: 18px; }
  .method-steps { grid-template-columns: 1fr; gap: 14px; }
  .method-steps li + li::before { content: none; }
  .analysis-section .mechanism-row { padding: 20px; }
}
@media (max-width: 760px) {
  main > .band { padding-block: 40px; }
  .band .academic-heading { margin-bottom: 24px; }
  .band .academic-heading .section-deck { font-size: 15px; }
  #overview .abstract-copy p:first-child { font-size: 19px; }
  #overview .overview-composition, .figure-card { padding: 12px; }
  #demonstrations #demo-panel { padding: 16px 12px 20px; border-radius: 14px; }
  .analysis-section .mechanism-row { padding: 14px; }
  .demo-block .simulation-group-grid { max-width: 640px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .demo-block .real-group-grid { max-width: 360px; }
  .mechanism-row[data-mechanism-row="correction-and-recoveries"] { grid-template-columns: 1fr; }
  .band-dark pre { padding: 18px; font-size: 12px; }
  .back-to-top { right: 16px; bottom: 16px; width: 40px; height: 40px; }
  .nav-inner nav { overflow-x: auto; scrollbar-width: none; }
  .nav-inner nav::-webkit-scrollbar { display: none; }
}
@media (max-width: 560px) {
  .demo-block .simulation-group-grid { width: 92%; max-width: 320px; grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .method-steps li, .back-to-top { transition: none; }
  .method-steps li:hover { transform: none; }
}

/* Source-derived ablation table follows the mechanism examples. */
.ablation-section .table-card { max-width: 1040px; margin-inline: auto; }
.ablation-section .comparison-table th:first-child, .ablation-section .comparison-table td:first-child { min-width: 210px; }
.ablation-note { max-width: 1040px; margin: 14px auto 0; color: #626879; font-size: 14px; line-height: 1.6; }

.resource-icon.bibtex-icon { flex: 0 0 18px; width: 18px; height: 18px; fill: none; stroke: currentColor; }
