/* Compact research sections and layered demonstration controls. */
main > .section:not(.resources-section):not(.bibtex-section) { padding-block: 42px; }
.academic-heading { margin-bottom: 23px; }
.academic-heading h2 { display: flex; align-items: center; gap: 13px; font-size: 40px; font-weight: 720; line-height: 1.18; letter-spacing: -1.1px; }
.section-number { display: none; }
.academic-heading .section-deck { margin-top: 12px; max-width: 880px; font-size: 18px; line-height: 1.6; }
.abstract-copy { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 40px; max-width: none; margin-bottom: 24px; font-size: 20px; line-height: 1.65; }
.abstract-copy p { margin: 0; }
.overview-composition { max-width: 1060px; margin-inline: auto; gap: 24px; }
.overview-caption { margin-top: 12px; font-size: 12px; line-height: 1.65; }
.paper-figure figcaption { margin-top: 12px; font-size: 12.5px; line-height: 1.65; }

/* White content surfaces let the source artwork sit directly on the page. */
body, main > .section { background: #fff; }
.method-section, .results-section, .analysis-section { background: #fff; border-color: #e7eaf1; }
.method-section .paper-figure { max-width: 1060px; }
.method-section .paper-figure > .zoomable { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.method-explanation { margin-top: 22px; gap: 28px; font-size: 17px; line-height: 1.65; }
.method-explanation p { border-color: #d1d8eb; padding-top: 12px; }
.method-explanation strong { margin-bottom: 8px; font-size: 22px; }

/* Controls and recordings form one compact demonstration area. */
.demo-toolbar { align-items: center; justify-content: space-between; flex-direction: row; gap: 12px; margin-bottom: 16px; }
.demo-toolbar .demo-context { width: auto; text-align: right; color: #5d6779; font-size: 15px; }
.section .pill-tabs { gap: 5px; }
.section .pill-tabs > button { padding: 8px 15px; border-radius: 7px; font-size: 13px; }
#demo-panel { padding: 0; border: 0; border-radius: 0; background: transparent; }
.real-task-description { margin-bottom: 12px; font-size: 17px; line-height: 1.6; }
.simulation-filters { margin-bottom: 18px; gap: 24px; }
.simulation-filters button { padding-block: 8px 10px; }
.demo-group-grid.real-group-grid { max-width: none; gap: 24px; }
.demo-group-grid.simulation-group-grid { max-width: none; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.demo-card figcaption { padding: 13px 1px 3px; }
.demo-caption-line { margin-bottom: 3px; }
.demo-card h3 { font-size: 18px; line-height: 1.4; letter-spacing: -.25px; }
.demo-card p { margin-top: 5px; font-size: 12.5px; line-height: 1.6; }
.camera-switcher { gap: 20px; margin-top: 8px; }
.camera-switcher button { font-size: 12px; }
.evidence-note { margin-top: 16px; font-size: 12px; line-height: 1.65; }

/* Figures lead; detailed tables follow within a separate, aligned panel. */
.real-results-body { max-width: none; }
.hardware-label { margin-bottom: 12px; font-size: 12px; }
.performance-figures { padding: 20px; margin-bottom: 22px; gap: 24px; border: 1px solid #e5e8f0; border-radius: 12px; background: #fff; }
.performance-figures figcaption { margin-top: 10px; }
.result-tabs { margin-bottom: 14px; }
.comparison-panel { padding: 20px; border: 1px solid #e2e6ef; border-radius: 10px; background: #fff; }
.comparison-panel > h3 { margin-bottom: 6px; font-size: 19px; }
.table-description { margin-bottom: 14px; font-size: 13px; line-height: 1.65; }
.table-scroll { border-top: 1.5px solid #8c98b5; border-bottom: 1.5px solid #8c98b5; }
.comparison-table th { padding: 10px 12px; font-size: 12px; background: #f0f3f8; }
.comparison-table td { padding: 9px 12px; font-size: 13px; }
.comparison-table .group-row td { padding: 6px 12px; font-size: 11px; background: #f4f6f9 !important; }
.comparison-table tbody tr.ours td { background: #edf0fc; color: #45599b; border-top-color: #ccd4ef; }
.table-notes { margin: 12px 0 16px; font-size: 12px; line-height: 1.65; }
.table-notes p { margin-block: 5px; }
.table-notes summary { font-size: 12px; }
#result-panel + .text-link { display: inline-block; margin-top: 16px; }

.efficiency-figures { max-width: none; margin-bottom: 22px; padding: 20px; border: 1px solid #e3e7f0; border-radius: 12px; background: #fff; }
.efficiency-figures .zoomable { border-radius: 0; }
.efficiency-figures img { max-height: none; }
.efficiency-figures figcaption { padding-top: 12px; border-top: 1px solid #eceef4; }
.efficiency-subheading { margin-bottom: 12px; font-size: 16px; }
#latency-comparison th, #latency-comparison td { padding: 9px 12px; }

/* Each paired row is one reading unit; the original figures remain zoomable. */
.mechanism-figures { gap: 20px; }
.mechanism-row { max-width: none; gap: 28px; padding: 20px 22px; border: 1px solid #e4e8f0; border-radius: 12px; background: #fff; }
.mechanism-item h3, .mechanism-group > h3 { margin-bottom: 12px; font-size: 18px; line-height: 1.4; color: #35405b; }
.mechanism-item .zoomable { height: 240px; }
.mechanism-item img { max-height: 240px; }
.mechanism-item figcaption { margin-top: 12px; font-size: 12.5px; line-height: 1.65; }
.mechanism-row[data-mechanism-row="keyframe-comparisons"] h3 { font-size: 17px; }
.mechanism-row[data-mechanism-row="keyframe-comparisons"] .paper-figure { grid-template-rows: 220px 30px auto; gap: 10px; }
.mechanism-row[data-mechanism-row="keyframe-comparisons"] .zoomable { height: 220px; }
.mechanism-row[data-mechanism-row="keyframe-comparisons"] img { max-height: 220px; }
.resources-section { padding-block: 32px 24px; }
.resources-section h2, .bibtex-header h2 { font-size: 27px; }
.resources-section > p { margin-top: 10px; }
.bibtex-section { padding-bottom: 32px; }
.bibtex-section pre { padding: 20px; font-size: 12px; line-height: 1.65; }

@media (max-width: 1000px) {
  .demo-group-grid.simulation-group-grid { grid-template-columns: repeat(2,minmax(0,1fr)); max-width: none; }
  .performance-figures { gap: 18px; padding: 16px; }
  .mechanism-row { gap: 22px; padding: 18px; }
}
@media (max-width: 760px) {
  main > .section:not(.resources-section):not(.bibtex-section) { padding-block: 30px; }
  .academic-heading { margin-bottom: 19px; }
  .academic-heading h2 { align-items: flex-start; gap: 10px; font-size: 30px; letter-spacing: -.75px; }
  .section-number { margin-top: 3px; width: 25px; height: 25px; border-radius: 6px; font-size: 10px; }
  .academic-heading .section-deck { margin-top: 10px; font-size: 16px; line-height: 1.6; }
  .abstract-copy { grid-template-columns: 1fr; gap: 14px; margin-bottom: 20px; font-size: 18px; line-height: 1.65; }
  .overview-composition { gap: 22px; }
  .overview-caption, .paper-figure figcaption { font-size: 12px; line-height: 1.65; }
  .method-explanation { gap: 16px; margin-top: 18px; font-size: 16px; }
  .method-explanation p { padding-top: 10px; }
  .method-explanation strong { font-size: 21px; }
  .demo-toolbar { justify-content: flex-start; gap: 10px; }
  .demo-toolbar .demo-context { width: 100%; text-align: left; font-size: 14px; }
  .section .pill-tabs > button { font-size: 12px; padding: 8px 12px; }
  .real-task-description { font-size: 16px; text-align: left; }
  .simulation-filters { justify-content: flex-start; gap: 8px 16px; margin-bottom: 16px; }
  .simulation-filters button { font-size: 12px; }
  .demo-group-grid.real-group-grid { gap: 22px; }
  .performance-figures { padding: 14px; gap: 22px; margin-bottom: 18px; border-radius: 9px; }
  .performance-figures .zoomable { aspect-ratio: auto; }
  .comparison-panel { padding: 14px; border-radius: 9px; }
  .comparison-panel > h3 { font-size: 18px; }
  .result-tabs { flex-wrap: wrap; gap: 6px; }
  .result-tabs > button { padding-inline: 10px; }
  .comparison-table td, .comparison-table th { padding: 9px 10px; }
  .comparison-table td:first-child, .comparison-table th:first-child { min-width: 135px; }
  .comparison-table th { font-size: 11px; }
  .comparison-table td { font-size: 12px; }
  .table-notes { margin-bottom: 14px; }
  .efficiency-figures { padding: 14px; margin-bottom: 20px; border-radius: 9px; }
  .mobile-plot-parts { gap: 18px; }
  .mobile-plot-parts > .zoomable + .zoomable { padding-top: 16px; border-top: 1px solid #e8ebf2; }
  .efficiency-subheading { font-size: 15px; }
  .mechanism-figures { gap: 16px; }
  .mechanism-row, .mechanism-row[data-mechanism-row] { gap: 24px; padding: 16px; border-radius: 9px; }
  .mechanism-item h3, .mechanism-group > h3 { font-size: 17px; margin-bottom: 12px; }
  .mechanism-item .zoomable, .mechanism-row[data-mechanism-row] .zoomable { height: auto; }
  .mechanism-item img { height: auto; max-height: 340px; }
  .mechanism-item figcaption { font-size: 12px; }
  .mechanism-row[data-mechanism-row="keyframe-comparisons"] img { max-height: none; }
  .mechanism-row[data-mechanism-row="keyframe-comparisons"] .figure-pagination { margin-top: 10px; }
  .mechanism-row[data-mechanism-row="keyframe-comparisons"] figcaption { margin-top: 10px; }
}
@media (max-width: 560px) {
  .demo-group-grid.simulation-group-grid { grid-template-columns: 1fr; max-width: none; }
}

/* Clear controls and a restrained second surface for the demonstration cards. */
.performance-figures, .comparison-panel, .efficiency-figures, .mechanism-row {
  box-shadow: 0 7px 24px #27355209, 0 1px 3px #27355206;
}
.demo-toolbar { padding-bottom: 0; border-bottom: 1px solid #e1e5ec; }
.demo-toolbar .pill-tabs { flex-wrap: nowrap; padding: 0; gap: 8px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.demo-toolbar .pill-tabs > button { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 50px; padding: 10px 16px 14px; border: 0; border-radius: 6px 6px 0 0; color: #677081; background: transparent; font-size: 15px; font-weight: 650; transition: color .18s ease, background .18s ease; }
.demo-toolbar .pill-tabs > button::after { content: ''; position: absolute; bottom: -1px; left: 14px; right: 14px; height: 3px; border-radius: 3px 3px 0 0; background: #536ba8; transform: scaleX(.55); opacity: 0; transition: transform .2s ease, opacity .2s ease; }
.demo-toolbar .pill-tabs > button[aria-selected=true] { color: #253753; background: transparent; box-shadow: none; }
.demo-toolbar .pill-tabs > button[aria-selected=true]::after { transform: scaleX(1); opacity: 1; }
.demo-toolbar .pill-tabs button span { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 20px; padding-inline: 5px; margin: 0; border-radius: 5px; background: #edf0f5; color: #677185; font-size: 11px; font-weight: 600; opacity: 1; }
.demo-toolbar .pill-tabs button[aria-selected=true] span { background: #e9edf7; color: #415989; }
.demo-toolbar .demo-context { padding-bottom: 10px; }
.control-icon { display: block; flex: 0 0 auto; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.demo-toolbar .control-icon { width: 19px; height: 19px; }
.demo-card { padding: 12px; border: 1px solid #e1e6ef; border-radius: 12px; background: #fff; box-shadow: 0 4px 12px #2735520b; transition: box-shadow .2s ease, transform .2s ease; }
.demo-video-wrap { border-radius: 7px; }
.camera-switcher { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0,1fr); width: fit-content; max-width: 100%; margin: 0 0 8px auto; padding: 2px; gap: 2px; border: 1px solid #e9ebef; border-radius: 8px; background: #f0f2f5; box-shadow: inset 0 1px 2px #26344b05; }
.camera-switcher button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; min-height: 28px; padding: 4px 10px; border: 1px solid transparent; border-radius: 5px; color: #626c7b; background: transparent; font-size: 12px; font-weight: 600; line-height: 1.4; white-space: nowrap; transition: color .18s ease, background .18s ease, box-shadow .18s ease; }
.camera-switcher .control-icon { width: 14px; height: 14px; }
.camera-switcher button[aria-pressed=true] { color: #263955; background: #fff; border-color: #e1e5eb; box-shadow: 0 2px 4px #23334d12, 0 1px 1px #23334d08; }
.camera-switcher button[aria-pressed=true] .control-icon { color: #536ba8; }
.camera-switcher[data-views="3"] button { gap: 4px; padding-inline: 6px; font-size: 11px; }
.camera-switcher[data-views="3"] .control-icon { width: 14px; height: 14px; }
.real-group-grid .camera-switcher button { font-size: 12px; }
.single-view-note { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; width: fit-content; margin: 0 0 8px auto; padding: 5px 9px; border: 1px solid #e9ebef; border-radius: 8px; color: #667183; background: #f5f6f8; font-size: 11px; font-weight: 550; line-height: 1.5; }
.single-view-note::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #8e9cb3; }
.demo-toolbar button:focus-visible, .camera-switcher button:focus-visible, .simulation-filters button:focus-visible { outline: 2px solid #536ba8; outline-offset: 3px; }
.paper-figure .latency-chart { display: block; width: 100%; height: auto; }
.latency-chart .latency-bar { transform-box: fill-box; transform-origin: left center; transition: transform 1.15s cubic-bezier(.22,.7,.2,1), opacity .7s ease; transition-delay: var(--bar-delay,0ms); }
.latency-chart.is-pending .latency-bar { transform: scaleX(0); opacity: .15; }
.latency-chart.is-revealed .latency-bar { transform: scaleX(1); opacity: 1; }
@media (hover:hover) {
  .demo-card:hover { box-shadow: 0 9px 24px #27355216; transform: translateY(-2px); }
  .demo-toolbar .pill-tabs > button:not([aria-selected=true]):hover { background: #f5f7fa; color: #354763; }
  .camera-switcher button:not([aria-pressed=true]):hover { background: #ffffff80; color: #354763; }
}
@media (max-width:760px) {
  .demo-toolbar { gap: 10px; border-bottom: 0; }
  .demo-toolbar .pill-tabs { width: 100%; border-bottom: 1px solid #e1e5ec; gap: 4px; }
  .demo-toolbar .pill-tabs > button { flex: 1; min-height: 48px; padding: 9px 10px 13px; gap: 7px; font-size: 14px; }
  .demo-toolbar .demo-context { padding-bottom: 0; }
  .demo-card { padding: 10px; }
  .camera-switcher button { padding-inline: 9px; font-size: 12px; }
}
@media (pointer:coarse) {
  .camera-switcher button { min-height: 34px; }
}
@media (prefers-reduced-motion:reduce) {
  .demo-card, .latency-chart .latency-bar, .camera-switcher button, .demo-toolbar .pill-tabs > button, .demo-toolbar .pill-tabs > button::after { transition: none; }
  .demo-card:hover { transform: none; }
  .latency-chart.is-pending .latency-bar { transform: none; opacity: 1; }
}

/* Large, concise reading layer; full protocols remain available on demand. */
.real-group-grid .demo-card h3 { font-size: 20px; }
.simulation-group-grid figcaption { min-height: 0; }
.hardware-label { font-size: 16px; margin-bottom: 16px; }
.comparison-panel > h3 { font-size: 23px; line-height: 1.35; margin-bottom: 18px; }
.comparison-table td { font-size: 15px; }
.comparison-table th { font-size: 13px; }
.comparison-table .chunk-detail { font-size: 13px; }
.efficiency-subheading { font-size: 22px; margin-bottom: 16px; }
.mechanism-item h3, .mechanism-group > h3,
.mechanism-row[data-mechanism-row="keyframe-comparisons"] h3 { font-size: 22px; line-height: 1.35; margin-bottom: 16px; letter-spacing: -.35px; }
.mechanism-row[data-mechanism-row="keyframe-comparisons"] .paper-figure { grid-template-rows: 220px 30px; }
.performance-figures { margin-bottom: 12px; }
.efficiency-figures { margin-bottom: 24px; }
#performance-notes { margin-bottom: 24px; }
.content-details { margin: 16px 0 0; padding: 0; color: #5b6578; font-size: 16px; line-height: 1.65; }
.content-details > summary { display: flex; align-items: center; gap: 9px; width: fit-content; padding: 4px 0; color: #4e5d7e; font-size: 16px; font-weight: 550; list-style: none; cursor: pointer; }
.content-details > summary::-webkit-details-marker { display: none; }
.content-details > summary::before { content: ''; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform .18s ease; }
.content-details[open] > summary::before { transform: rotate(45deg); }
.content-details[open] { padding-bottom: 5px; }
.content-details p { max-width: 1000px; margin: 12px 0; font-size: 16px; line-height: 1.65; }
.content-details h4 { margin: 22px 0 8px; font-size: 18px; line-height: 1.4; color: #34415a; }
.content-details h4 + p { margin-top: 0; }
.table-notes .content-details { margin-top: 12px; }
.table-notes .content-details summary { font-size: 16px; }
.table-notes .content-details p { margin-block: 12px; }
.content-details summary:focus-visible { outline: 2px solid #536ba8; outline-offset: 4px; border-radius: 2px; }
.paper-figure .zoom-hint { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border-radius: 6px; font-size: 18px; line-height: 1; }
.section .text-link { font-size: 16px; }
.resources-section h2, .bibtex-header h2 { font-size: 32px; }
.resources-section p, .resources-section .text-link { font-size: 18px; }
.bibtex-section pre { font-size: 14px; }
@media (max-width:760px) {
  .comparison-table td { font-size: 14px; }
  .comparison-table th { font-size: 12px; }
  .comparison-panel > h3 { font-size: 21px; }
  .efficiency-subheading { font-size: 20px; }
  .mechanism-item h3, .mechanism-group > h3,
  .mechanism-row[data-mechanism-row="keyframe-comparisons"] h3 { font-size: 21px; }
  .content-details, .content-details p, .content-details > summary,
  .table-notes .content-details summary { font-size: 15px; }
  .resources-section h2, .bibtex-header h2 { font-size: 28px; }
  .bibtex-section pre { font-size: 13px; }
}
@media (prefers-reduced-motion:reduce) { .content-details > summary::before { transition: none; } }

/* Presentation order and consistent viewing windows. */
.hero-lead { max-width: none; margin-top: 12px; }
.project-meta .headline-metrics { grid-template-columns: repeat(7,minmax(0,1fr)); }
.project-meta .headline-metrics > div { padding-inline: 10px; }
.project-meta .headline-metrics dd { font-size: clamp(23px,2.15vw,31px); }
.real-group-grid .demo-video-wrap { aspect-ratio: 11 / 10; background: #edf0f4; }
.real-group-grid .demo-video-wrap video { object-fit: contain; }
.simulation-results { background: #fff; border-block: 1px solid #e7eaf1; }
.simulation-timings { margin-top: 30px; padding-top: 25px; border-top: 1px solid #dde3ed; }
#efficiency .efficiency-figures { margin-bottom: 0; }
@media (min-width:761px) and (max-width:1100px) {
  :root { --metric-strip-height: 210px; }
  .project-meta .headline-metrics { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px 0; }
  .project-meta .headline-metrics > div:nth-child(4) { border-right: 0; }
  .project-meta .headline-metrics > div:last-child { grid-column: span 2; }
}
@media (max-width:760px) {
  :root { --metric-strip-height: 250px; }
  .project-meta .headline-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); height: auto; min-height: var(--metric-strip-height); }
  .project-meta .headline-metrics > div { padding-inline: 8px; }
  .project-meta .headline-metrics > div:last-child { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: center; gap: 12px; padding-top: 10px; border-top: 1px solid #e7eaf1; }
  .project-meta .headline-metrics > div:last-child dt { margin: 0; font-size: 12px; }
  .project-meta .headline-metrics > div:last-child span { display: none; }
  .project-meta .headline-metrics dt { font-size: 11px; }
  .project-meta .headline-metrics span { font-size: 9px; }
}

/* A quiet entrance, then ordinary selectable text and links. */
@keyframes hero-enter {
  from { opacity: 0; transform: translateY(12px); filter: blur(3px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
.metric-pending { opacity: 0; }
.hero-enter { animation: hero-enter .85s cubic-bezier(.22,1,.36,1) var(--hero-delay,0ms) both; }
.hero-enter:focus-within { animation: none; }
.site-footer { display: block; width: 100%; margin: 36px 0 0; padding: 34px 0; border: 0; background: #111216; color: #b7bcc9; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px 32px; }
.site-footer .wordmark { color: #fff; font-size: 23px; font-weight: 800; letter-spacing: -.8px; }
.footer-inner > p { flex: 1; margin: 0; font-size: 16px; line-height: 1.6; }
.footer-inner > a:last-child { white-space: nowrap; color: #d1d6e0; font-size: 14px; border-bottom: 1px solid #606674; padding-bottom: 3px; }
.footer-inner > a:hover { color: #fff; }
@media (max-width:760px) {
  .site-footer { margin-top: 24px; padding-block: 28px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .footer-inner > p { max-width: 320px; font-size: 15px; }
}
@media (prefers-reduced-motion:reduce) {
  .metric-pending { opacity: 1; }
  .hero-enter { animation: none; }
}
