/* Page structure extends the original DiagGen / Nerfies styles. */
:root {
  --ink: #242424;
  --muted: #65706b;
  --green: #355943;
  --line: #e3e7e5;
  --soft: #f6f8f6;
  --blue: hsl(204, 86%, 43%);
  --section-nav-top: 0px;
}
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--section-nav-height, 64px) + var(--section-nav-top) + 16px); }
[hidden] { display: none !important; }
button, input { font: inherit; }
button { cursor: pointer; }
a { text-underline-offset: 0.2em; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, [role="tabpanel"]:focus-visible {
  outline: 3px solid #9dcbb2;
  outline-offset: 4px;
}
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -80px; left: 20px; z-index: 100; padding: 12px 20px; background: #fff; color: var(--green); border: 1px solid var(--green); border-radius: 8px; }
.skip-link:focus { top: 12px; }
.page-shell .container.is-max-desktop { max-width: 1040px; }
.publication-header .hero-body { padding: 4rem 2rem 2rem; }
.publication-title { font-size: clamp(2rem, 3vw, 2.85rem); letter-spacing: -0.035em; }
.publication-authors { font-size: 1.04rem !important; }
.publication-notes { font-size: 0.79rem !important; }
.publication-institutions { font-size: 0.81rem !important; line-height: 1.75; max-width: 850px; }
.publication-links { margin-top: 1.6rem; }
.section-nav { position: sticky; top: var(--section-nav-top); z-index: 30; width: calc(100% - 4rem); max-width: 1040px; margin: 0 auto 2rem; padding: 0.55rem 0.4rem; border: 1px solid transparent; border-top-color: var(--line); border-bottom-color: var(--line); background: #fff; transition: background-color 180ms, border-color 180ms, border-radius 180ms, box-shadow 180ms; }
.section-nav.is-stuck { border-color: #dfe8df; border-radius: 0 0 14px 14px; background: #f4f8f3; box-shadow: 0 6px 24px rgba(35, 48, 40, 0.09); }
.progress-track { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.2rem 0.65rem; list-style: none; margin: 0; padding: 0; }
.progress-item a { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0.55rem 0.6rem; border-bottom: 2px solid transparent; color: #69756d; font-size: 0.8rem; font-weight: 500; line-height: 1.4; white-space: nowrap; transition: color 150ms, border-color 150ms, border-radius 150ms, background-color 150ms; }
.progress-item a:hover { color: var(--green); border-bottom-color: #cbd9cf; }
.progress-item.active a { color: #273e2e; border-bottom-color: var(--green); }
.section-nav.is-stuck .progress-item a { border-bottom-color: transparent; border-radius: 999px; }
.section-nav.is-stuck .progress-item a:hover { background: #eaf1e8; }
.section-nav.is-stuck .progress-item.active a { background: #dfeadd; }
.chapter { padding: 2.5rem 2rem 3rem; scroll-margin-top: 15px; }
.section-divider { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.section-number { color: var(--green); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; padding: 0.45rem 0.6rem; border: 1px solid #dce5df; border-radius: 6px; background: #fafcfa; }
.divider-line { flex: 1; height: 1px; background: linear-gradient(to right, #cbd9cf, #e7ece8); }
.chapter-heading { margin-bottom: 2rem; }
.chapter-heading .title { margin-bottom: 0.65rem; color: #2b322d; font-family: 'Google Sans', 'Noto Sans', sans-serif; font-weight: 600; font-size: clamp(1.75rem, 3vw, 2.25rem); letter-spacing: -0.025em; }
.chapter-heading p, .subsection-heading p { max-width: 760px; color: var(--muted); font-size: 0.97rem; line-height: 1.75; }
.subsection-heading { margin-bottom: 1.3rem; }
.subsection-title { margin-bottom: 0.65rem; color: #303b33; font-family: 'Google Sans', 'Noto Sans', sans-serif; font-size: 1.4rem; font-weight: 600; letter-spacing: -0.015em; }
.subsection-heading .eyebrow, .eyebrow { margin-bottom: 0.55rem; color: #587566; font-size: 0.64rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.media-unit { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #f4f6f4; box-shadow: 0 8px 24px rgba(35, 48, 40, 0.055); }
.media-unit video { width: 100%; height: auto; display: block; background: #f5f6f5; object-fit: contain; }
.media-unit:fullscreen { width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: center; background: #121612; border: 0; border-radius: 0; }
.media-unit:fullscreen .paired-grid { max-height: calc(100vh - 70px); }
.media-unit:fullscreen video { max-height: calc(100vh - 110px); }
.media-caption { margin: 1.1rem auto 0; max-width: 880px; color: #5b665e; font-size: 0.9rem; line-height: 1.8; }
.play-fallback { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); padding: 0.85rem 1.35rem; background: #fff; color: #273e30; border: 1px solid #a5bbab; border-radius: 50px; font-weight: 600; box-shadow: 0 4px 20px #0002; }
.media-error { padding: 1rem; color: #9f3c2c; font-size: 0.85rem; background: #fff9f6; }
.contributions { margin-top: 2.7rem; }
.contribution-list { margin: 1.35rem 0 0; list-style: none; }
.contribution-list li { display: grid; grid-template-columns: 34px 1fr; gap: 1.15rem; padding: 1.3rem 0; border-top: 1px solid var(--line); }
.contribution-index { padding-top: 0.2rem; color: #6c8d76; font-size: 0.77rem; font-weight: 600; }
.contribution-list h4 { font-size: 1.07rem; font-weight: 600; margin-bottom: 0.4rem; color: #334238; }
.contribution-list p { color: #5d685f; font-size: 0.93rem; line-height: 1.6; max-width: 870px; }
.gallery-film { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.method-block + .method-block { margin-top: 3.7rem; padding-top: 2.7rem; border-top: 1px solid var(--line); }
.figure-details { margin-top: 1.25rem; border: 1px solid var(--line); border-radius: 8px; background: #fcfdfc; }
.figure-details summary { padding: 0.9rem 1.1rem; color: var(--green); cursor: pointer; font-size: 0.84rem; }
.figure-details figure { padding: 0.4rem 1rem 1rem; }
.figure-details img { display: block; width: 100%; }
.figure-details figcaption { padding-top: 0.65rem; color: var(--muted); font-size: 0.78rem; line-height: 1.7; }
.paired-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1px; background: var(--line); }
.paired-clip { min-width: 0; background: #fff; }
.paired-clip figcaption { padding: 0.7rem 1rem; background: #f7f9f7; color: #344b3c; font-weight: 600; font-size: 0.8rem; }
.pair-controls { display: flex; gap: 0.6rem; align-items: center; padding: 0.7rem 0.85rem; background: #fff; }
.pair-controls button, .text-button { padding: 0.4rem 0.65rem; min-height: 36px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--green); font-size: 0.74rem; white-space: nowrap; }
.pair-controls button:hover, .text-button:hover { background: var(--soft); border-color: #9cb2a3; }
.pair-controls [data-seek] { width: 100%; min-width: 20px; accent-color: var(--green); cursor: pointer; }
.time-display { font-size: 0.7rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.results-card { margin-top: 2rem; padding: 2rem 2.1rem; border: 1px solid #dfe8e1; border-radius: 12px; background: #fafcf9; }
.results-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.results-heading h4 { color: #2b4333; font-family: 'Google Sans', sans-serif; font-size: 1.25rem; font-weight: 600; }
.result-delta { flex: none; color: var(--green); font-size: 1.65rem; font-weight: 600; letter-spacing: -0.035em; }
.result-delta span { font-size: 0.73rem; font-weight: 400; letter-spacing: 0; }
.results-intro { margin-top: 1rem; color: #5f6d63; font-size: 0.88rem; line-height: 1.7; }
.pmsc-chart { margin: 1.7rem 0; }
.chart-row, .chart-axis { display: grid; grid-template-columns: 112px 1fr; gap: 1rem; align-items: center; }
.chart-row + .chart-row { margin-top: 0.8rem; }
.chart-row > span { font-size: 0.78rem; color: #58695e; }
.chart-track { position: relative; height: 33px; background: repeating-linear-gradient(to right, #dae3dc 0px, #dae3dc 1px, transparent 1px, transparent 25%); border-right: 1px solid #dae3dc; }
.chart-bar { display: block; width: var(--score-position); height: 100%; border-radius: 0 4px 4px 0; background: #b9cbbf; }
.chart-bar.after { background: #4f775c; }
.chart-bar b { display: block; padding: 7px 10px 0 0; font-size: 0.8rem; line-height: 1.4; text-align: right; color: #263b2d; }
.chart-bar.after b { color: #fff; }
.chart-axis { margin-top: 0.5rem; }
.chart-axis > div { display: flex; justify-content: space-between; color: #78867c; font-size: 0.68rem; }
.result-counts { display: flex; gap: 3rem; padding-top: 1rem; border-top: 1px solid #e2e9e3; }
.result-counts > div { display: flex; flex-direction: column-reverse; gap: 0.15rem; }
.result-counts dt { font-size: 0.73rem; color: #63736a; }
.result-counts dd { font-size: 1.55rem; color: #354e3e; font-variant-numeric: tabular-nums; }
.results-note { font-size: 0.76rem; line-height: 1.8; color: #65756a; margin-top: 1.25rem; }
.results-note a { white-space: normal; }
.experiment-tabs { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 0.7rem; margin-bottom: 1.4rem; }
#real-world .experiment-tabs { grid-template-columns: repeat(3, minmax(0,1fr)); }
.experiment-tab { min-width: 0; display: flex; flex-direction: column; overflow: hidden; padding: 5px 5px 0.8rem; border: 1px solid #dfe6e1; border-radius: 9px; background: #fff; color: #4e6054; text-align: left; transition: border-color 150ms, background 150ms; }
.experiment-tab img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 5px; filter: saturate(0.8); }
.experiment-tab .tab-title { margin: 0.6rem 0.45rem 0; font-size: 0.89rem; font-weight: 600; }
.experiment-tab .tab-detail { margin: 0.2rem 0.45rem 0; font-size: 0.66rem; line-height: 1.5; color: #748078; }
.experiment-tab:hover { background: #f6f8f6; border-color: #9bb2a3; }
.experiment-tab[aria-selected="true"] { background: #f0f5ef; border-color: #53765f; box-shadow: inset 0 0 0 1px #53765f; }
.experiment-tab[aria-selected="true"] .tab-title { color: #2c4935; }
.experiment-tab[aria-selected="true"] img { filter: none; }
.example-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 0.4rem 1rem; margin-bottom: 0.85rem; }
.example-heading h3 { color: #344739; font-size: 1.02rem; font-weight: 600; }
.example-heading h3 span { color: #758077; font-weight: 400; font-size: 0.87rem; }
.duration { color: #738179; font-size: 0.69rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.section-note { max-width: 880px; margin: 1.4rem auto 0; padding-top: 1.1rem; border-top: 1px solid var(--line); color: #79857c; font-size: 0.76rem; line-height: 1.8; }
.comparison-labels { display: grid; grid-template-columns: 1fr 1fr; color: #405447; font-size: 0.79rem; font-weight: 600; padding: 0 0.8rem 0.6rem; }
.comparison-labels span + span { padding-left: 0.8rem; }
.full-film-link { display: flex; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; font-size: 0.8rem; }
.citation-heading { display: flex; align-items: center; justify-content: space-between; color: #596b5f; font-size: 0.85rem; margin-bottom: 0.85rem; }
#BibTeX pre { border: 1px solid var(--line); border-radius: 10px; padding: 1.5rem; background: #f6f8f6; font-size: 0.75rem; line-height: 1.8; overflow: auto; }
.footer { margin-top: 1.5rem; background: #f8faf8; border-top: 1px solid var(--line); }
.footer .content { font-size: 0.77rem; line-height: 1.9; color: #6e7a71; }
.footer .column { width: 100%; max-width: 820px; }
@media (max-width: 1279px) {
  .publication-header .hero-body { padding-top: 3rem; }
}
@media (max-width: 768px) {
  .section-nav { width: calc(100% - 2.5rem); margin-bottom: 1rem; }
  .progress-track { gap: 0 0.5rem; }
  .progress-item a { padding: 0.5rem; font-size: 0.74rem; }
  .publication-header .hero-body { padding: 2.5rem 1.25rem 1.6rem; }
  .publication-title { font-size: 2rem; }
  .publication-authors { font-size: 0.88rem !important; }
  .publication-institutions { font-size: 0.73rem !important; }
  .chapter { padding: 2rem 1.25rem; }
  .chapter-heading { margin-bottom: 1.5rem; }
  .chapter-heading p, .subsection-heading p { font-size: 0.89rem; }
  .subsection-title { font-size: 1.22rem; }
  .contribution-list li { gap: 0.55rem; grid-template-columns: 28px 1fr; }
  .contribution-list h4 { font-size: 1rem; }
  .contribution-list p, .media-caption { font-size: 0.85rem; }
  .method-block + .method-block { margin-top: 2.7rem; padding-top: 2rem; }
  .results-card { padding: 1.3rem; }
  .results-heading { align-items: flex-start; flex-wrap: wrap; }
  .chart-row, .chart-axis { grid-template-columns: 87px 1fr; gap: 0.7rem; }
  .chart-row > span { font-size: 0.7rem; }
  .result-counts { gap: 2rem; }
  .experiment-tabs { gap: 0.45rem; }
  .experiment-tab .tab-title { font-size: 0.74rem; margin-left: 0.3rem; margin-right: 0.3rem; }
  .experiment-tab .tab-detail { display: none; }
  .example-heading h3 { font-size: 0.93rem; }
  .example-heading h3 span { font-size: 0.79rem; }
  .pair-controls { flex-wrap: wrap; gap: 0.45rem; }
  .pair-controls [data-seek] { width: auto; flex: 1; min-width: 60px; }
  .time-display { font-size: 0.65rem; }
  .paired-clip figcaption { font-size: 0.7rem; padding: 0.65rem; }
}
@media (max-width: 540px) {
  .paired-grid { grid-template-columns: 1fr; }
  .experiment-tabs { grid-template-columns: repeat(2, minmax(0,1fr)); }
  #real-world .experiment-tabs { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .experiment-tab .tab-title { font-size: 0.78rem; }
  .pair-controls [data-seek] { order: 5; flex-basis: 100%; min-height: 28px; }
  .pair-controls [data-fullscreen] { margin-left: auto; }
  .comparison-labels { font-size: 0.62rem; padding: 0 0.4rem 0.5rem; }
  .result-delta { font-size: 1.4rem; }
  .chart-row, .chart-axis { grid-template-columns: 74px 1fr; gap: 0.5rem; }
  .chart-bar b { padding-right: 5px; font-size: 0.7rem; }
  .result-counts { gap: 1.5rem; }
  .results-note { font-size: 0.7rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
