:root {
  color-scheme: light;
  --ink: #20222a;
  --muted: #656773;
  --accent: #0a6f96;
  --accent-soft: #e8f1f5;
  --ochre: #8a6212;
  --line: #e7e7ed;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, video:focus-visible { outline: 3px solid #7fb4cc; outline-offset: 5px; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }
img, video { display: block; max-width: 100%; height: auto; }
figure, p { margin: 0; }
main, .site-nav, footer { width: min(1080px, calc(100% - 64px)); margin-inline: auto; }
.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.site-nav a { color: var(--muted); }
.site-nav a:first-child { font-weight: 650; color: var(--ink); }

.project-header { padding: 64px 0 40px; text-align: center; }
.eyebrow { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
h1 { max-width: 1000px; margin: 15px auto 26px; font-size: clamp(30px, 4vw, 46px); line-height: 1.18; font-weight: 750; letter-spacing: -.035em; text-wrap: balance; }
.authors { max-width: 900px; margin-inline: auto; font-size: 19px; line-height: 1.9; }
.authors a, .authors span { white-space: nowrap; }
.affiliation { margin-top: 5px; color: var(--muted); font-size: 16px; }
.equal-note { margin-top: 2px; color: var(--muted); font-size: 13px; }
.resource-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 25px; }
.button { display: inline-flex; align-items: center; gap: 14px; padding: 8px 23px; border: 1px solid #dcdce4; border-radius: 24px; color: var(--ink); font-size: 15px; font-weight: 600; }
.button:hover { background: var(--accent-soft); text-decoration: none; }
.button-primary { border-color: var(--ink); background: var(--ink); color: #fff; }
.button-primary:hover { background: #33404a; }

h2 { margin: 0 0 22px; font-size: 28px; font-weight: 650; letter-spacing: -.025em; line-height: 1.3; }
h3 { margin: 0 0 10px; font-size: 19px; font-weight: 650; letter-spacing: -.015em; line-height: 1.35; }

.hero { padding: 8px 0 44px; }
.hero video { width: 100%; border: 1px solid var(--line); border-radius: 8px; background: #f5f0e8; }
.hero figcaption { max-width: 880px; margin: 16px auto 0; color: var(--muted); font-size: 15px; line-height: 1.65; text-align: center; }

.text-section { max-width: 880px; margin: 38px auto 60px; }
.text-section p + p { margin-top: 17px; }
.key-idea { padding: 44px 0 20px; border-top: 1px solid var(--line); }
.key-idea h2 { text-align: center; margin-bottom: 14px; }
.key-idea .lead { max-width: 820px; margin: 0 auto 30px; text-align: center; font-size: 18px; }
.formula { white-space: nowrap; font-family: "Cambria Math", Cambria, "Times New Roman", serif; font-size: 1.08em; }

.figure-section { padding: 44px 0 15px; border-top: 1px solid var(--line); margin-bottom: 45px; }
.figure-section h2 { text-align: center; margin-bottom: 30px; }
.figure-section img { width: 100%; }
figcaption { max-width: 920px; margin: 20px auto 0; font-size: 15px; line-height: 1.65; color: var(--muted); }
.figure-narrow { max-width: 640px; margin-inline: auto; }

.method-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; align-items: start; }
.method-step img { width: 100%; aspect-ratio: 3 / 2; object-fit: contain; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.method-step h3 { margin-top: 18px; }
.method-step h3 .step { color: var(--accent); margin-right: 6px; }
.method-step p { color: #4a4c57; font-size: 15.5px; line-height: 1.65; }

.result-block + .result-block { margin-top: 52px; }
.result-block h3 { text-align: center; font-size: 21px; margin-bottom: 18px; }
.table-wrap { overflow-x: auto; }
.results-table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.results-table th, .results-table td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.results-table th:first-child, .results-table td:first-child { text-align: left; }
.results-table thead th { border-bottom: 2px solid var(--ink); font-weight: 650; }
.results-table tbody tr.ours { background: var(--accent-soft); }
.results-table tbody tr.ours td:first-child { font-weight: 650; color: var(--accent); }
.results-table tbody tr.group-start td { border-top: 2px solid #c9c9d3; }

.code-section pre + p { margin-top: 14px; }
pre { margin: 0; padding: 24px; overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: #f7f7fa; font-size: 13px; line-height: 1.7; tab-size: 2; }
code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
.citation-section { scroll-margin-top: 30px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.text-button { background: transparent; color: var(--accent); border: 0; padding: 0; font-size: 14px; }
.text-button:hover { text-decoration: underline; }
.copy-status { min-height: 1.7em; margin-top: 8px; color: var(--muted); font-size: 13px; }
footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 15px; border-top: 1px solid var(--line); padding: 25px 0 40px; color: var(--muted); font-size: 13px; }

@media (max-width: 860px) {
  .method-steps { grid-template-columns: minmax(0, 1fr); gap: 34px; max-width: 560px; margin-inline: auto; }
}
@media (max-width: 760px) {
  main, .site-nav, footer { width: calc(100% - 40px); }
  .project-header { padding: 42px 0 28px; }
  .authors { font-size: 17px; }
  .text-section { margin: 35px auto 45px; }
  .figure-section { padding-top: 32px; margin-bottom: 30px; }
  h2 { font-size: 25px; }
  .results-table { font-size: 13.5px; }
  .results-table th, .results-table td { padding: 7px 8px; }
  pre { padding: 17px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
