:root {
  --paper: #faf8f4;
  --card: #fffefb;
  --ink: #1d2621;
  --body: #38433d;
  --muted: #6f7770;
  --rule: #e4ded3;
  --green: #30483c;
  --green-dark: #23352c;
  --clay: #8a6a4c;
  --lilac: #7b6f96;
  --sand: #efe9df;
  --ours: #eef1ea;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-family: var(--sans);
  color: var(--ink);
  font-size: 16px;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 88px; }
body { margin: 0; background: var(--paper); line-height: 1.6; }
h1, h2, p, figure { margin: 0; }
h1, h2 { font-weight: 400; text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; border-radius: 2px; }
sup { font-size: .68em; font-weight: 500; color: var(--clay); margin-left: 1px; }
svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

.page-width { width: min(1080px, calc(100% - 64px)); margin-inline: auto; }

.skip-link { position: fixed; top: 10px; left: 10px; z-index: 50; padding: 10px 18px; background: var(--ink); color: var(--paper); border-radius: 999px; transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(250, 248, 244, .88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--rule); }
.nav-shell { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.wordmark { font-family: var(--serif); font-size: 1.35rem; font-weight: 500; letter-spacing: -.01em; color: var(--ink); }
.wordmark i { color: var(--green); }
.site-header nav { display: flex; gap: 30px; font-size: .76rem; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }
.site-header nav a { transition: color .15s; }
.site-header nav a:hover { color: var(--green); }
.nav-paper { color: var(--ink); }

/* Hero */
.hero { padding: 104px 0 80px; }
.project-name { display: block; font-family: var(--serif); font-size: clamp(4rem, 9.5vw, 7.25rem); line-height: 1; letter-spacing: -.025em; }
.project-name i { color: var(--green); }
.paper-subtitle { display: block; margin-top: 22px; font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.25; letter-spacing: -.01em; color: var(--body); }
.hero-meta { margin-top: 60px; padding-top: 30px; border-top: 1px solid var(--rule); }
.authors { display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: 1.03rem; font-weight: 500; }
.affiliations { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-top: 12px; font-size: .86rem; color: var(--muted); }
.affiliations sup { margin: 0 3px 0 0; }
.correspondence { margin-top: 6px; font-size: .86rem; color: var(--muted); }
.resource-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.button { display: inline-flex; align-items: center; gap: 9px; height: 46px; padding: 0 22px; border: 1px solid var(--ink); border-radius: 999px; font-size: .92rem; font-weight: 500; transition: background .15s, border-color .15s, color .15s; }
.button-primary { background: var(--ink); color: var(--paper); }
.button-primary:hover { background: var(--green); border-color: var(--green); }
.button-secondary:hover { background: var(--sand); }
.button > span[aria-hidden] { font-size: 1.1rem; }

/* Sections */
.section { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 32px 56px; padding: 80px 0; border-top: 1px solid var(--rule); }
.section-label h2 { font-family: var(--serif); font-size: 2rem; line-height: 1.15; letter-spacing: -.01em; }
.section-label span { display: block; margin-top: 10px; font-size: .74rem; letter-spacing: .14em; color: var(--clay); }

.prose { max-width: 680px; }
.prose p { font-family: var(--serif); font-size: 1.2rem; line-height: 1.72; color: var(--body); }
.prose p + p { margin-top: 1.15em; }
.prose p:first-child { font-size: 1.36rem; line-height: 1.6; color: var(--ink); }
.prose strong { font-weight: 500; color: var(--green); }
.prose em { color: var(--lilac); }

/* Method figure */
.section-wide .paper-figure { grid-column: 1 / -1; }
.paper-figure { background: var(--card); border: 1px solid var(--rule); border-radius: 6px; padding: 32px; }
.figure-scroll { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #c9c0b2 transparent; }
.paper-figure img { display: block; width: 100%; height: auto; }
.paper-figure figcaption { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--rule); font-family: var(--serif); font-style: italic; font-size: 1.02rem; color: var(--muted); }
.paper-figure figcaption a { font-family: var(--sans); font-style: normal; font-size: .82rem; letter-spacing: .04em; color: var(--green); margin-left: 8px; border-bottom: 1px solid currentColor; white-space: nowrap; }
.paper-figure figcaption a:hover { color: var(--clay); }

/* Results table */
.results { max-width: 760px; }
.table-heading { font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--body); margin-bottom: 18px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 1rem; line-height: 1.45; font-variant-numeric: tabular-nums; border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }
th, td { padding: 15px 16px; text-align: right; white-space: nowrap; border-top: 1px solid var(--rule); }
th:first-child { text-align: left; padding-left: 4px; width: 42%; }
th:last-child, td:last-child { padding-right: 4px; }
thead th { border-top: 0; border-bottom: 1px solid var(--ink); padding-block: 12px; font-size: .72rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); vertical-align: bottom; }
.th-detail { display: block; margin-top: 2px; font-size: .95em; letter-spacing: .06em; text-transform: none; color: #9a9f97; }
tbody th { font-weight: 500; }
.budget-start > * { border-top: 1px solid #cfc6b8; }
.tag { margin-left: 8px; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: .98rem; color: var(--muted); }
.ours > * { background: var(--ours); color: var(--green); font-weight: 600; border-top-color: transparent; }
.ours .tag { color: var(--lilac); }
.table-note { margin-top: 16px; font-size: .86rem; line-height: 1.7; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); }
.footer-shell { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 110px; }
.footer-shell > div { display: flex; gap: 26px; font-size: .76rem; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }
.footer-shell > div a:hover { color: var(--green); }

@media (max-width: 900px) {
  .section { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 64px 0; }
  .section-label { display: flex; align-items: baseline; gap: 14px; }
  .section-label span { margin-top: 0; }
  .results, .prose { max-width: none; }
}

@media (max-width: 700px) {
  html { scroll-padding-top: 76px; }
  .page-width { width: calc(100% - 40px); }
  .site-header nav a:not(.nav-paper) { display: none; }
  .hero { padding: 60px 0 52px; }
  .project-name { font-size: 4.2rem; }
  .paper-subtitle { font-size: 1.7rem; }
  .desktop-break { display: none; }
  .hero-meta { margin-top: 40px; padding-top: 24px; }
  .authors { gap: 4px 18px; font-size: 1rem; }
  .affiliations { display: grid; gap: 6px; }
  .resource-links { flex-direction: column; align-items: stretch; max-width: 320px; }
  .button { justify-content: center; }
  .section { padding: 48px 0; }
  .section-label h2 { font-size: 1.75rem; }
  .prose p { font-size: 1.1rem; }
  .prose p:first-child { font-size: 1.22rem; }
  .paper-figure { padding: 14px; }
  .paper-figure img { min-width: 760px; }
  .paper-figure figcaption { margin-top: 14px; padding-top: 12px; font-size: .95rem; }
  table { min-width: 500px; font-size: .92rem; }
  th, td { padding: 13px 10px; }
  .tag { display: block; margin-left: 0; }
  .footer-shell { flex-direction: column; justify-content: center; gap: 12px; padding-block: 28px; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
