:root {
  --paper: #fdfaf4;
  --ink: #181818;
  --muted: #61605b;
  --line: #dcd9d1;
  --link: #286a9c;
  --green: #256b55;
  --green-light: #e2eee5;
  --blue-light: #e5eaf0;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 20px/1.75 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
::selection { background: #d5e8de; color: var(--ink); }
a { color: var(--link); text-decoration: none; text-underline-offset: 4px; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 5px;
}
button { font: inherit; color: inherit; cursor: pointer; }
img { max-width: 100%; height: auto; display: block; }
video { display: block; width: 100%; aspect-ratio: 16/9; background: #171717; object-fit: contain; }
p { margin: 0 0 20px; }
strong { font-weight: 650; }
sup { font-size: .68em; vertical-align: super; line-height: 0; margin-left: 2px; }
sub { font-size: .72em; }
[hidden] { display: none !important; }
.container { width: min(1080px, calc(100% - 64px)); margin-inline: auto; }
.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  padding: 10px 18px;
  background: var(--ink);
  color: white;
  z-index: 100;
}
.skip-link:focus { top: 12px; }

/* Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(253, 250, 244, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.header-inner {
  max-width: 1440px;
  margin: auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 32px;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 9px;
  font: 600 18px var(--mono);
  letter-spacing: .035em;
  color: var(--ink);
}
.wordmark-symbol { font: 32px/1 var(--serif); color: var(--green); }
.wordmark:hover { text-decoration: none; }
.header-links { display: flex; gap: 28px; font: 17px/1.5 var(--mono); }
.header-links a { color: var(--ink); white-space: nowrap; }
.contents {
  display: none;
  position: fixed;
  right: 23px;
  top: 113px;
  width: 210px;
  font: 16px/1.5 var(--mono);
  z-index: 5;
  border-left: 1px solid var(--line);
  padding-left: 17px;
}
.contents-label {
  display: block;
  color: var(--muted);
  font-size: 16px;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 15px;
}
.contents a { display: block; padding: 8px 0; color: var(--muted); }
.contents a.active { color: var(--ink); font-weight: 700; }

/* Paper title and authors */
.hero { padding-top: 62px; padding-bottom: 36px; }
h1 { margin: 0; font: 400 42px/1.16 var(--serif); letter-spacing: -1.3px; max-width: 1040px; }
.project-name {
  display: block;
  font-size: clamp(58px, 7.3vw, 92px);
  line-height: 1;
  letter-spacing: -4px;
  margin-bottom: 16px;
}
.paper-title { display: block; max-width: 1010px; text-wrap: balance; }
.authors {
  display: flex;
  flex-wrap: wrap;
  column-gap: 19px;
  row-gap: 7px;
  max-width: 1000px;
  margin-top: 29px;
  font: 18px/1.8 var(--mono);
}
.authors span { white-space: nowrap; }
.author-row { display: flex; flex-wrap: wrap; column-gap: 19px; row-gap: 7px; flex-basis: 100%; }
.affiliations {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px 22px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--muted);
  max-width: 1000px;
}
.contribution { font: 16px/1.6 var(--mono); color: var(--muted); margin: 12px 0 0; }
.publication-links { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 30px; font: 18px/1.6 var(--mono); }
.publication-links a { padding: 3px 0; }

/* Sections and figures */
.section { padding-top: 48px; padding-bottom: 44px; scroll-margin-top: 15px; }
.section h2 {
  font: 600 26px/1.5 var(--mono);
  letter-spacing: -.65px;
  margin: 0 0 24px;
  display: flex;
  gap: 12px;
  align-items: baseline;
}
.section h2::before { content: ""; background: var(--ink); width: 9px; height: 9px; flex: 0 0 9px; align-self: center; }
.section h2.lead { display: block; font: 400 40px/1.3 var(--serif); letter-spacing: -.5px; margin: 0 0 24px; }
.section h2.lead::before { content: none; }
.lead em { color: var(--green); }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; }
.video-figure, .paper-figure { margin: 26px 0 0; }
.video-figure video { border-radius: 12px; box-shadow: 0 3px 18px #18181809; }
figcaption { font-size: 18px; line-height: 1.65; color: var(--muted); margin-top: 16px; }
.figure-link { display: block; background: white; border: 1px solid #e7e3dc; border-radius: 10px; overflow: hidden; padding: 14px; }
.figure-link:hover { border-color: #aaa79f; }
.figure-link img { width: 100%; }
.compact-figure { max-width: 900px; margin-inline: auto; }
.highlights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; border-block: 1px solid var(--line); padding: 28px 0; margin-top: 35px; }
.highlights > div + div { border-left: 1px solid var(--line); padding-left: 28px; }
.metric-value { display: block; font: 400 48px/1.15 var(--serif); letter-spacing: -1.5px; color: var(--green); }
.metric-value > span { font-size: 23px; letter-spacing: -.5px; }
.metric-label { display: block; font: 600 20px/1.5 var(--mono); margin: 12px 0 5px; }
.metric-detail { display: block; font-size: 17px; line-height: 1.6; color: var(--muted); }
.method-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 31px; }
.method-steps article { border-top: 2px solid var(--ink); padding-top: 16px; }
h3 { font-size: 21px; line-height: 1.45; margin: 11px 0; font-weight: 600; }
.method-steps p { font-size: 18px; line-height: 1.7; margin: 0; color: #4c4b46; }

/* Benchmark controls and readable, horizontally scrollable tables */
.benchmark-tabs { display: flex; flex-wrap: wrap; gap: 8px; border-bottom: 1px solid var(--line); margin-top: 25px; padding-bottom: 12px; }
.benchmark-tab { border: 1px solid transparent; background: none; border-radius: 5px; padding: 10px 15px; font: 16px/1.5 var(--mono); }
.benchmark-tab:hover { background: #eeece5; }
.benchmark-tab[aria-selected=true] { background: var(--ink); color: var(--paper); }
.benchmark-panel { padding-top: 12px; }
.table-scroll { overflow-x: auto; width: 100%; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: 18px; font-variant-numeric: tabular-nums; }
caption { text-align: left; font: 17px/1.6 var(--mono); color: var(--muted); padding: 14px 0; }
th { text-align: left; font-weight: 600; }
thead th { font: 16px/1.5 var(--mono); color: var(--muted); border-bottom: 1px solid var(--line); padding: 12px; }
tbody td, tbody th { padding: 14px 12px; border-bottom: 1px solid #e6e2d9; }
th:first-child { padding-left: 0; }
.results-table { min-width: 680px; }
.results-table th:first-child { width: 18%; }
.results-table td:nth-child(2), .results-table td:nth-child(3) { width: 30%; }
.results-table td:last-child { width: 18%; white-space: nowrap; }
.result-bar { display: block; padding: 7px 10px; position: relative; isolation: isolate; font: 17px/1.6 var(--mono); }
.result-bar::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--value); z-index: -1; border-radius: 2px; }
.base::before { background: var(--blue-light); }
.recovered::before { background: var(--green-light); }
.recovered { font-weight: 700; color: #22573f; }
.gain { font: 600 17px var(--mono); color: var(--green); }
.real-world-table { min-width: 900px; margin-top: 16px; font-size: 17px; }
.real-world-table td { text-align: center; font-family: var(--mono); }
.real-world-table thead th:not(:first-child) { text-align: center; }
.real-world-table .ours { background: #e9eee440; color: var(--green); }
.real-world-table .group-start th, .real-world-table .group-start td { border-top: 1px solid #b5b1a7; }
.recovery-gallery { margin-top: 24px; border-block: 1px solid var(--line); padding: 18px 0; }
.recovery-gallery summary { cursor: pointer; font: 600 18px/1.7 var(--mono); color: var(--link); }
.recovery-gallery[open] { padding-bottom: 22px; }
.recovery-gallery .paper-figure { max-width: 900px; margin-inline: auto; }
.recovery-gallery summary:focus-visible { outline: 2px solid var(--link); outline-offset: 5px; }

/* Computation and planning results */
.efficiency-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 48px; margin-top: 28px; }
.efficiency-stat { border-left: 3px solid var(--green); padding: 7px 0 6px 23px; }
.efficiency-stat .metric-value { font-size: 60px; }
.efficiency-stat h3 { font-size: 21px; margin-bottom: 8px; }
.latency-chart { margin-top: 26px; font: 16px/1.5 var(--mono); }
.latency-chart > div { display: grid; grid-template-columns: 185px minmax(30px, 1fr) 98px; gap: 12px; align-items: center; margin: 20px 0; }
.latency-chart b { text-align: right; font-weight: 500; white-space: nowrap; }
.latency-track { height: 14px; background: #ece9e1; border-radius: 2px; overflow: hidden; }
.latency-fill { display: block; height: 100%; background: #a9b4bd; width: var(--value); }
.ours-fill { background: var(--green); }
.planning-callout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 50px; align-items: center; border-block: 1px solid var(--line); margin-top: 38px; padding: 29px 0; }
.planning-callout p { font-size: 18px; color: #4c4b46; margin: 0; }
.planning-result { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 15px; font: 40px/1.2 var(--serif); letter-spacing: -1px; }
.planning-result strong { color: var(--green); font-weight: 400; }
.percent { font-size: 22px; }
.result-arrow { font-size: 27px; color: #928e82; }

/* Resources and citation */
.resource-list { border-top: 1px solid var(--line); margin-top: 25px; }
.resource-list > a { display: flex; align-items: center; justify-content: space-between; padding: 20px 2px; border-bottom: 1px solid var(--line); color: var(--ink); }
.resource-list > a:hover { text-decoration: none; color: var(--link); }
.resource-list strong { display: block; font: 600 18px/1.7 var(--mono); }
.resource-list > a > span:last-child { font-size: 23px; }
.copy-button { border: 1px solid #bfbbae; background: transparent; padding: 9px 13px; border-radius: 4px; font: 16px/1.5 var(--mono); white-space: nowrap; }
.copy-button:hover { background: #eeece5; }
.citation-block { border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); background: #ffffff60; padding: 20px; }
.citation-block pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 16px/1.8 var(--mono); }
.citation-block code { font: inherit; }
.copy-status { display: block; min-height: 24px; margin-top: 8px; font-size: 16px; color: var(--green); }
.site-footer { border-top: 1px solid var(--line); margin-top: 30px; padding-top: 28px; padding-bottom: 42px; display: flex; justify-content: space-between; gap: 35px; color: var(--muted); font-size: 16px; }
.footer-name { font: 600 16px var(--mono); color: var(--ink); }

@media (min-width: 1024px) {
  .section h2.lead { font-size: min(36px, 3vw); white-space: nowrap; }
}

@media (min-width: 1500px) {
  .contents { display: block; }
  main > .container, .site-footer { transform: translateX(-70px); }
}

@media (max-width: 900px) {
  h1 { font-size: 36px; }
  .hero { padding-top: 44px; }
  .highlights { gap: 18px; }
  .highlights > div + div { padding-left: 18px; }
  .method-steps { grid-template-columns: 1fr; gap: 25px; }
  .efficiency-layout { grid-template-columns: 1fr; gap: 28px; }
  .efficiency-stat { max-width: 380px; }
  .planning-callout { gap: 26px; grid-template-columns: minmax(0, 1fr) 220px; }
}

@media (max-width: 760px) {
  .highlights { grid-template-columns: 1fr; gap: 22px; padding: 26px 0; }
  .highlights > div { display: grid; grid-template-columns: 190px minmax(0, 1fr); column-gap: 22px; align-items: center; }
  .highlights > div + div { border-left: 0; border-top: 1px solid var(--line); padding: 22px 0 0; }
  .highlights .metric-value { grid-row: span 2; }
  .metric-label { margin: 0 0 4px; }
  .planning-callout { grid-template-columns: 1fr; gap: 25px; }
  .planning-result { justify-content: flex-start; }
}

@media (max-width: 640px) {
  body { font-size: 18px; line-height: 1.75; }
  .container { width: calc(100% - 36px); }
  .header-inner { padding: 0 18px; min-height: 64px; }
  .header-links { gap: 18px; font-size: 16px; }
  .wordmark { font-size: 16px; }
  .wordmark-symbol { font-size: 28px; }
  .hero { padding-top: 34px; padding-bottom: 24px; }
  h1 { font-size: 29px; line-height: 1.2; letter-spacing: -.7px; }
  .project-name { font-size: 62px; letter-spacing: -3px; margin-bottom: 15px; }
  .paper-title { text-wrap: pretty; }
  .authors { font-size: 16px; row-gap: 8px; column-gap: 16px; margin-top: 25px; }
  .author-row { display: contents; }
  .affiliations { font-size: 15px; gap: 6px 14px; }
  .contribution { font-size: 15px; }
  .publication-links { gap: 12px 20px; font-size: 16px; margin-top: 25px; }
  .section { padding-top: 34px; padding-bottom: 30px; }
  .section h2 { font-size: 23px; letter-spacing: -.4px; gap: 10px; margin-bottom: 20px; }
  .section h2::before { width: 8px; height: 8px; flex-basis: 8px; }
  .section h2.lead { font-size: 32px; line-height: 1.35; margin-bottom: 22px; }
  .section-heading { gap: 12px; flex-wrap: wrap; }
  .video-figure, .paper-figure { margin-top: 20px; }
  .video-figure video { border-radius: 7px; }
  .highlights { margin-top: 28px; }
  .figure-link { padding: 6px; border-radius: 6px; }
  .method-steps { margin-top: 26px; }
  .method-steps article { padding-top: 13px; }
  .method-steps h3 { margin: 6px 0 12px; }
  .benchmark-tabs { gap: 5px; }
  .benchmark-tab { padding: 9px 11px; }
  table { font-size: 16px; }
  caption { font-size: 16px; }
  thead th { padding: 11px 10px; }
  tbody td, tbody th { padding: 12px 10px; }
  .result-bar { font-size: 16px; padding: 7px 9px; }
  .gain { font-size: 16px; }
  .real-world-table { font-size: 16px; }
  .efficiency-stat { padding-left: 19px; }
  .efficiency-stat .metric-value { font-size: 54px; }
  .latency-chart > div { grid-template-columns: minmax(0, 1fr) auto; gap: 9px 12px; }
  .latency-chart > div > span { grid-column: 1; grid-row: 1; }
  .latency-chart b { grid-column: 2; grid-row: 1; }
  .latency-track { grid-column: 1 / -1; grid-row: 2; }
  .planning-callout { margin-top: 28px; }
  .planning-result { font-size: 40px; }
  .copy-button { margin-bottom: 12px; }
  .citation-block { padding: 16px; }
  .citation-block pre { font-size: 15px; }
  .site-footer { flex-direction: column; align-items: flex-start; gap: 14px; padding-top: 24px; padding-bottom: 30px; margin-top: 20px; }
}

@media (max-width: 480px) {
  .highlights > div { display: block; }
  .metric-label { margin: 10px 0 4px; }
}

@media (max-width: 360px) {
  html { scroll-padding-top: 125px; }
  .header-inner { flex-wrap: wrap; padding-block: 12px; gap: 10px; }
  .header-links { width: 100%; justify-content: space-between; }
}

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