:root {
  --ink: #252823;
  --muted: #62665f;
  --line: #e1e2dc;
  --accent: #b74732;
  --green: #3e6355;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: #fff; color: var(--ink); font: 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button { font: inherit; color: inherit; cursor: pointer; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
img { max-width: 100%; height: auto; display: block; }
figure, p, h1, h2, h3 { margin: 0; }
p + p { margin-top: 16px; }
[hidden] { display: none !important; }
.shell { width: min(1000px, calc(100% - 48px)); margin-inline: auto; }
.skip-link { position: fixed; top: -70px; left: 20px; z-index: 10; background: white; padding: 12px; }
.skip-link:focus { top: 10px; }

/* A compact paper header keeps the recorded demos in the opening viewport. */
.hero { text-align: center; padding: 32px 0 28px; }
h1 { font-size: clamp(26px, 3vw, 38px); line-height: 1.2; font-weight: 650; letter-spacing: -.025em; }
.authors { display: flex; justify-content: center; gap: 16px; font-size: 15px; margin-top: 14px; }
.authors > span { color: #a3a59b; }
.authors a { border-bottom: 1px solid #c7c9bf; }
.venue { margin-top: 9px; font-size: 14px; font-weight: 600; }
.publication-status { margin-top: 6px; font-size: 12px; color: var(--muted); }

.section-topline { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 20px; }
.section-index { display: block; color: var(--muted); font: 10px/1.5 var(--mono); letter-spacing: .08em; margin-bottom: 8px; }
h2 { font-size: 27px; line-height: 1.25; font-weight: 600; letter-spacing: -.02em; }
h3 { font-size: 18px; font-weight: 550; line-height: 1.3; }
.demo-section h2 { font-size: 26px; }
.text-button { background: none; border: 0; border-bottom: 1px solid #b8bab0; padding: 5px 0; font-size: 12px; white-space: nowrap; display: inline-flex; gap: 10px; align-items: center; }
.text-button:hover { color: var(--accent); border-color: var(--accent); }
.demo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.demo-card { min-width: 0; }
.demo-image { background: #272c29; padding: 8px; border-radius: 6px; overflow: hidden; }
.demo-image img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 2px; }
.demo-card figcaption { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 10px 1px; font-size: 13px; font-weight: 550; }
.task-label { font: 8px/1.5 var(--mono); color: var(--muted); letter-spacing: .05em; }
.demo-caption { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; color: var(--muted); font-size: 10px; }
.demo-caption p { margin: 0; }
.legend-swatch { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 1px; }
.kept { background: #d5d7cd; border: 1px solid #989c90; }
.dropped { background: #434a43; margin-left: 14px; }
.stats-strip { margin-top: 26px; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, 1fr); padding: 24px 0 32px; }
.stats-strip > div { text-align: center; }
.stats-strip > div + div { border-left: 1px solid var(--line); }
.stats-strip strong { font-size: 30px; line-height: 1.2; font-weight: 500; letter-spacing: -.04em; }
.stats-strip strong span { font-size: 20px; color: var(--muted); padding-left: 2px; }
.stats-strip p { font-size: 11px; color: var(--muted); margin-top: 7px; }

.section-space { padding-top: 38px; padding-bottom: 38px; }
.method-section, .findings-section { border-block: 1px solid var(--line); }
.section-aside { font-size: 12px; color: var(--muted); text-align: right; line-height: 1.7; }
.section-intro { max-width: 850px; font-size: 15px; color: var(--muted); line-height: 1.85; margin-bottom: 24px; }
.method-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.method-steps article { border-top: 1px solid var(--line); padding-top: 16px; }
.step-number { font: 11px var(--mono); color: var(--muted); }
.method-steps h3 { margin: 10px 0; }
.method-steps p { font-size: 13px; color: var(--muted); line-height: 1.85; }
.step-formula { font-family: Georgia, "Times New Roman", serif; font-size: 17px; margin-top: 16px; }

.outline-tag { color: var(--muted); font: 10px/1.5 var(--mono); white-space: nowrap; }
.result-panel { margin-bottom: 24px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; font-variant-numeric: tabular-nums; }
caption { text-align: left; font-size: 12px; color: var(--muted); padding-bottom: 14px; }
thead { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
th, td { padding: 15px 12px; }
th { font-size: 12px; font-weight: 550; }
thead th:not(:first-child), tbody td { text-align: right; }
thead th span { display: block; font-size: 10px; font-weight: 400; color: var(--muted); margin-top: 3px; white-space: nowrap; }
tbody tr { border-bottom: 1px solid var(--line); }
td small { font-size: 11px; color: var(--muted); white-space: nowrap; }
.cg-column { background: #f7f7f4; }
thead .cg-column { color: var(--accent); }
tbody .cg-column { font-weight: 650; }
.positive { color: var(--green); }
.row-note { display: block; font-size: 10px; font-weight: 400; color: var(--muted); }
.table-note { font-size: 11px; color: var(--muted); line-height: 1.85; margin-top: 12px; }
.performance-figure { margin-top: 28px; }
.performance-figure img { width: 100%; }
.performance-figure figcaption { font-size: 12px; color: var(--muted); margin-top: 16px; line-height: 1.8; }
.performance-figure figcaption strong { color: var(--ink); font-weight: 550; }

.findings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 45px; margin-top: 24px; }
.findings-copy p { font-size: 14px; color: var(--muted); line-height: 1.9; }
.inline-link { font-size: 12px; border-bottom: 1px solid #b9bdae; display: inline-block; margin-top: 16px; padding-bottom: 3px; }
.inline-link span { margin-left: 12px; }
.drift-card { padding: 22px; border: 1px solid var(--line); border-radius: 4px; }
.drift-card h3 { font-size: 16px; }
.drift-card > p { font-size: 11px; color: var(--muted); margin-top: 7px; }
.drift-row { margin-top: 22px; }
.drift-row > div:first-child { display: flex; justify-content: space-between; font-size: 12px; align-items: baseline; }
.drift-row strong { font-size: 18px; font-weight: 500; }
.drift-row small { font-size: 11px; color: var(--muted); }
.bar-track { height: 10px; background: #e8eae3; border-radius: 2px; margin-top: 9px; overflow: hidden; }
.bar-track span { display: block; height: 100%; background: var(--green); }
.concat .bar-track span { background: var(--accent); }
.drift-card > .drift-note { margin-top: 20px; font-size: 10px; line-height: 1.8; }
.scope-details { margin-top: 28px; border-top: 1px solid var(--line); }
.scope-details summary { padding: 16px 0 0; cursor: pointer; font-size: 13px; list-style: none; display: flex; justify-content: space-between; }
.scope-details summary::-webkit-details-marker { display: none; }
.scope-details summary span { font-size: 20px; color: var(--muted); }
.scope-details[open] summary span { transform: rotate(45deg); }
.scope-details > div { padding-top: 16px; max-width: 850px; font-size: 13px; color: var(--muted); line-height: 1.9; }
.citation-section pre { background: #f6f6f3; border-radius: 4px; padding: 24px; overflow: auto; font: 12px/1.85 var(--mono); margin: 0; }
.copy-status { font-size: 11px; color: var(--muted); min-height: 20px; margin-top: 8px; }
.site-footer { border-top: 1px solid var(--line); padding-block: 22px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.wordmark { font-size: 14px; font-weight: 650; }
.brand-period { color: var(--accent); }
.site-footer p { font-size: 10px; line-height: 1.9; }
.site-footer p span { color: var(--muted); }
.site-footer > a:last-child { font-size: 11px; color: var(--muted); }

@media (max-width: 800px) {
  .shell { width: calc(100% - 40px); }
  .hero { padding-top: 26px; }
  .demo-grid { gap: 12px; }
  .demo-image { padding: 6px; }
  .demo-card figcaption { font-size: 12px; display: block; }
  .task-label { display: block; margin-top: 3px; }
  .demo-caption { font-size: 9px; }
  .method-steps { gap: 20px; }
  .findings-grid { gap: 28px; }
  .section-aside { display: none; }
  .site-footer > a:last-child { display: none; }
}

@media (max-width: 560px) {
  .hero { padding: 22px 0 24px; }
  h1 { font-size: 27px; line-height: 1.22; }
  .authors { font-size: 13px; margin-top: 12px; gap: 12px; }
  .venue { font-size: 13px; margin-top: 8px; }
  .publication-status { font-size: 11px; margin-top: 5px; }
  .section-topline { gap: 15px; margin-bottom: 18px; }
  .section-index { font-size: 9px; margin-bottom: 6px; }
  h2, .demo-section h2 { font-size: 23px; }
  .text-button { font-size: 10px; gap: 5px; }
  .demo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .demo-card figcaption { display: flex; padding: 9px 0; font-size: 12px; }
  .task-label { font-size: 7px; margin: 0; }
  .demo-caption { display: block; line-height: 1.8; margin-top: 8px; }
  .demo-caption p + p { margin-top: 4px; }
  .stats-strip { margin-top: 20px; padding: 20px 0 24px; gap: 10px; }
  .stats-strip strong { font-size: 26px; }
  .stats-strip strong span { font-size: 17px; }
  .stats-strip p { font-size: 9px; line-height: 1.7; max-width: 100px; margin: 7px auto 0; padding-inline: 3px; }
  .section-space { padding-block: 28px; }
  .section-intro { font-size: 13px; margin-bottom: 20px; }
  .method-steps { grid-template-columns: 1fr; gap: 20px; }
  .method-steps article { position: relative; padding-left: 30px; padding-top: 15px; }
  .step-number { position: absolute; left: 0; top: 19px; }
  .method-steps h3 { margin: 0 0 9px; font-size: 17px; }
  .step-formula { font-size: 16px; margin-top: 10px; }
  .outline-tag { display: none; }
  table { font-size: 12px; min-width: 565px; }
  th, td { padding: 13px 10px; }
  caption { font-size: 11px; max-width: 320px; }
  td small { font-size: 10px; }
  .table-note { font-size: 10px; }
  .performance-figure { margin-top: 24px; }
  .performance-figure figcaption { font-size: 11px; margin-top: 12px; }
  .findings-grid { grid-template-columns: 1fr; gap: 22px; margin-top: 20px; }
  .findings-copy p { font-size: 13px; }
  .scope-details > div { font-size: 12px; }
  .citation-section pre { font-size: 10px; padding: 16px; }
  .site-footer { align-items: flex-start; gap: 15px; }
  .site-footer p { font-size: 9px; max-width: 210px; }
  .site-footer .wordmark { font-size: 12px; }
}

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