:root {
  --ink: #17212b;
  --muted: #52606d;
  --paper: #ffffff;
  --wash: #f4f7f7;
  --line: #dbe3e5;
  --teal: #176b68;
  --teal-dark: #104d4b;
  --gold: #d88a2c;
  --radius: 14px;
  --shadow: 0 14px 32px rgba(27, 47, 54, .08);
  --content-max: 1160px;
  --page-gutter: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
.container, .wide-container { width: min(var(--content-max), calc(100% - var(--page-gutter) - var(--page-gutter))); margin: 0 auto; }
.hero .container { width: min(1120px, calc(100% - var(--page-gutter) - var(--page-gutter))); }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 10; padding: 8px 14px; color: #fff; background: var(--teal-dark); border-radius: 6px; }
.skip-link:focus { left: 8px; }

.hero { color: #fff; background: linear-gradient(126deg, #0f4c4d 0%, #176b68 50%, #1d7771 100%); }
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 72px; border-bottom: 1px solid rgba(255,255,255,.21); }
.wordmark { color: #fff; font-size: 1.18rem; font-weight: 760; letter-spacing: -.03em; text-decoration: none; }
.nav-links { display: flex; gap: 24px; }
.nav-links a { color: rgba(255,255,255,.87); font-size: .9rem; font-weight: 650; text-decoration: none; }
.nav-links a:hover, .nav-links a:focus-visible { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.hero-content { max-width: 1020px; padding: 88px 0 84px; text-align: center; }
.eyebrow { margin: 0 0 10px; color: var(--teal); font-size: .78rem; font-weight: 780; letter-spacing: .12em; text-transform: uppercase; }
.hero .eyebrow { color: #f6c98a; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 980px; margin: 0 auto 25px; font-size: clamp(2.25rem, 5vw, 4.45rem); line-height: 1.07; letter-spacing: -.052em; }
h2 { margin-bottom: 19px; font-size: clamp(1.7rem, 3.1vw, 2.55rem); line-height: 1.12; letter-spacing: -.037em; }
h3 { margin-bottom: 10px; font-size: 1.1rem; line-height: 1.25; letter-spacing: -.02em; }
.authors { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin-bottom: 4px; font-size: 1.05rem; font-weight: 650; }
sup { line-height: 0; }
.contribution { margin: 12px 0 0; color: rgba(255,255,255,.72); font-size: .86rem; }
.affiliations { color: rgba(255,255,255,.9); font-size: .92rem; }
.affiliations p { margin-bottom: 2px; }
.resources { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 10px; margin-top: 30px; }
.resource-item { width: 190px; text-align: center; }
.resource-button { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 14px; border: 1px solid rgba(255,255,255,.4); border-radius: 8px; color: #fff; font-size: .9rem; font-weight: 700; text-decoration: none; }
.resource-item .resource-button { justify-content: center; width: 100%; }
.resource-button:not(.is-disabled):hover, .resource-button:not(.is-disabled):focus-visible { color: var(--teal-dark); background: #fff; }
.resource-button.is-disabled { cursor: not-allowed; opacity: .76; }
.resource-button .ai, .resource-button .fab { font-size: 1.05rem; line-height: 1; }
.button-status { padding-left: 3px; color: #f6c98a; font-size: .73rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }

.news-band { border-bottom: 1px solid var(--line); background: #f9fbfb; }
.news-content { display: grid; grid-template-columns: 130px 1fr; gap: 16px; align-items: start; padding: 22px 0; }
.news-content h2 { margin: 0; color: var(--teal); font-size: 1rem; letter-spacing: 0; }
.news-content ul { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.news-content li { color: #36434b; font-size: .94rem; }
.news-content time { margin-right: 7px; color: var(--teal); font-weight: 760; }

.section { padding: 88px 0; }
.section-heading { width: 100%; }
.centered-heading { margin-right: auto; margin-left: auto; text-align: center; }
.prose { color: #425159; }
.prose p { max-width: 820px; margin-bottom: 1em; }
.prose p:last-child { margin-bottom: 0; }
#overview { padding-bottom: 44px; }
#overview .eyebrow { margin-bottom: 14px; }
#overview .section-heading h2 { margin-bottom: 0; }
.overview-copy { max-width: 940px; margin-top: 26px; margin-bottom: 0; font-size: 1.08rem; }
.overview-copy p { max-width: 100%; margin-bottom: 22px; }
.method-section { padding-top: 44px; }
code { padding: .08em .32em; border-radius: 4px; background: #e9f0f0; color: #1a5655; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .88em; }
.figure-section { padding: 70px 0; }
.figure-section-tint { background: var(--wash); }
.paper-figure { margin: 0; }
.paper-figure img { display: block; width: 100%; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.figure-overview { width: 100%; margin: 0 auto; }
.method-overview { width: 100%; margin-top: 52px; padding: 0; border: 0; border-radius: var(--radius); background: var(--wash); }
.method-figure-canvas { position: relative; width: 100%; aspect-ratio: 4628 / 2693; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.method-figure-canvas img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.method-overview-controls { display: flex; justify-content: flex-end; margin-top: 12px; }
.method-overview figcaption { margin-top: 7px; }
.method-replay { padding: 6px 11px; border: 1px solid #b7c7c8; border-radius: 6px; color: var(--teal-dark); background: #fff; font: inherit; font-size: .8rem; font-weight: 720; cursor: pointer; }
.method-replay:hover, .method-replay:focus-visible { border-color: var(--teal); color: #fff; background: var(--teal); }
.method-animation-ready .stages li { opacity: 0; transform: translateY(9px); transition: opacity 420ms ease, transform 420ms ease; }
.method-animation-ready .stages li.is-visible { opacity: 1; transform: translateY(0); }
.method-animation-ready .method-context,
.method-animation-ready .method-comparison,
.method-animation-ready .method-stage,
.method-animation-ready .method-full-overview { opacity: 0; transition: opacity 700ms ease; }
.method-animation-ready .method-context.is-visible,
.method-animation-ready .method-comparison.is-visible,
.method-animation-ready .method-stage.is-visible,
.method-animation-ready .method-full-overview.is-visible { opacity: 1; }
figcaption { width: 100%; margin: 14px 0 0; color: var(--muted); font-size: .9rem; line-height: 1.52; }

.stages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 36px 0 0; padding: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--line); list-style: none; }
.stages li { min-width: 0; padding: 27px 18px 25px; background: #fff; }
.stage-number { display: block; margin-bottom: 27px; color: var(--gold); font-size: .78rem; font-weight: 800; letter-spacing: .1em; }
.stages p { margin: 0; color: var(--muted); font-size: .93rem; line-height: 1.55; }

.frequency-section { background: #102f31; color: #fff; }
.frequency-grid { display: grid; grid-template-columns: minmax(0, .36fr) minmax(0, .64fr); gap: 34px; align-items: center; margin-top: 20px; }
.frequency-section .eyebrow { color: #f3bd71; }
.frequency-section .prose { color: #d0dddc; }
.frequency-section code { background: rgba(255,255,255,.13); color: #fff; }
.frequency-section figcaption { color: #c8d8d7; }
.frequency-section .paper-figure img { box-shadow: 0 18px 40px rgba(0,0,0,.2); }

.register-dynamics-section { border-bottom: 1px solid var(--line); }
.dynamics-item { margin-top: 46px; }
.dynamics-item + .dynamics-item { margin-top: 72px; }
.dynamics-copy { width: 100%; margin-bottom: 24px; }
.dynamics-copy h3 { color: var(--ink); }
.dynamics-figure { width: 100%; }

.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 38px; }
.metric-card { position: relative; overflow: hidden; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 7px 20px rgba(30,48,54,.045); }
.metric-card::before { position: absolute; top: 0; right: 0; left: 0; height: 4px; background: var(--teal); content: ""; }
.metric-name { margin-bottom: 12px; color: var(--teal); font-size: .83rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.metric-value { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: clamp(1.85rem, 3vw, 2.55rem); font-weight: 750; line-height: 1; letter-spacing: -.05em; }
.metric-value b { color: var(--gold); font-weight: 500; }
.metric-direction { margin: 0; color: var(--muted); font-size: .9rem; }
.qualitative-gallery { margin: 35px 0 0; padding: 4px; border: 1px solid var(--line); border-radius: 9px; background: #c6d0d1; }
.qualitative-grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 3px; overflow: hidden; border-radius: 5px; background: #c6d0d1; }
.qualitative-grid img { display: block; width: 100%; height: auto; min-width: 0; align-self: start; }
.qualitative-gallery figcaption { margin: 14px 0 7px; color: var(--muted); }

.citation-section { padding-bottom: 96px; }
.citation-box { position: relative; width: 100%; margin-top: 28px; padding: 22px; border-radius: var(--radius); background: #102f31; }
pre { max-width: 100%; margin: 0; overflow: auto; white-space: pre-wrap; color: #f7fbfa; font: .86rem/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
pre code { padding: 0; background: transparent; color: inherit; font: inherit; }
.copy-button { margin-top: 17px; padding: 8px 12px; border: 1px solid rgba(255,255,255,.52); border-radius: 6px; color: #fff; background: transparent; font: inherit; font-size: .86rem; font-weight: 700; cursor: pointer; }
.copy-button:hover, .copy-button:focus-visible { color: #102f31; background: #fff; }
.copy-status { display: inline; margin: 0 0 0 10px; color: #c8d8d7; font-size: .84rem; }
.footer { padding: 25px 0; color: #b9cecc; background: #0d2527; font-size: .86rem; }
.footer .container { display: flex; justify-content: space-between; gap: 18px; }
.footer p { margin: 0; }

@media (max-width: 820px) {
  .hero-content { padding: 68px 0 64px; }
  .section { padding: 64px 0; }
  #overview { padding-bottom: 40px; }
  .method-section { padding-top: 40px; }
  .stages { grid-template-columns: repeat(2, 1fr); }
  .frequency-grid { grid-template-columns: 1fr; gap: 30px; }
  .metric-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1280px) {
  .qualitative-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .qualitative-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; }
}

@media (min-width: 1300px) {
  .stages h3 { white-space: nowrap; }
}

@media (max-width: 560px) {
  :root { --page-gutter: 14px; }
  #overview { padding-bottom: 32px; }
  .method-section { padding-top: 32px; }
  .nav { min-height: 62px; }
  .nav-links { gap: 14px; font-size: .85rem; }
  .hero-content { padding: 51px 0 54px; }
  h1 { font-size: 2.22rem; }
  .authors { gap: 3px 12px; font-size: .96rem; }
  .affiliations { font-size: .82rem; }
  .resources { align-items: center; flex-direction: column; }
  .resource-item { width: min(100%, 280px); }
  .resource-button { justify-content: center; }
  .news-content { grid-template-columns: 1fr; gap: 5px; }
  .section, .citation-section { padding: 52px 0; }
  .figure-section { padding: 52px 0; }
  .stages { grid-template-columns: 1fr; }
  .stages li { padding: 23px 20px; }
  .stage-number { margin-bottom: 18px; }
  .metric-card { padding: 25px; }
  .method-overview { margin-top: 36px; padding: 0; }
  .footer .container { flex-direction: column; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .method-replay { display: none; }
}
