:root {
  --ink: #0d1425;
  --muted: #5d6472;
  --line: #dce1e8;
  --paper: #ffffff;
  --wash: #f4f7fb;
  --navy: #111d3d;
  --blue: #2d6cdf;
  --blue-soft: #e8f0ff;
  --mint: #bcf2c8;
  --peach: #ffd8a7;
  --rose: #ffd5dd;
  --max: 1180px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }
.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  border-radius: .4rem;
  padding: .7rem 1rem;
  color: white;
  background: var(--navy);
}
.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 0 max(24px, calc((100vw - var(--max)) / 2));
  border-bottom: 1px solid rgba(220, 225, 232, .82);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(16px);
}
.wordmark {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-weight: 750;
  letter-spacing: -.02em;
  text-decoration: none;
}
.wordmark-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 9px;
  color: white;
  background: var(--navy);
  font-family: var(--serif);
  font-style: italic;
}
.wordmark-light { color: var(--muted); font-weight: 500; }
.site-header nav { display: flex; gap: 1.65rem; }
.site-header nav a {
  color: #323948;
  font-size: .86rem;
  font-weight: 650;
  text-decoration: none;
}
.site-header nav a:hover { color: var(--blue); }

.hero {
  overflow: hidden;
  padding: clamp(72px, 10vw, 138px) 24px 72px;
  background:
    radial-gradient(circle at 8% 13%, rgba(188, 242, 200, .5), transparent 22rem),
    radial-gradient(circle at 93% 8%, rgba(255, 216, 167, .42), transparent 24rem),
    linear-gradient(180deg, #fff 0%, #fbfcff 100%);
}
.hero-inner {
  width: min(100%, 1050px);
  margin: 0 auto 56px;
  text-align: center;
}
.eyebrow,
.section-kicker {
  color: var(--blue);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.eyebrow { display: flex; align-items: center; justify-content: center; gap: .7rem; }
.eyebrow span { width: 26px; height: 2px; background: currentColor; }
h1 {
  margin: 1.3rem 0 1.7rem;
  font-family: var(--serif);
  font-size: clamp(3.1rem, 7vw, 6.5rem);
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: .97;
}
h1 em { color: var(--blue); font-weight: 400; }
.authors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .2rem 1.1rem;
  max-width: 990px;
  margin: 0 auto .65rem;
  font-size: 1.03rem;
  font-weight: 650;
}
.author-feature { color: var(--blue); }
.authors sup { font-size: .65em; }
.affiliations { margin: 0; color: var(--muted); font-size: .9rem; }
.hero-deck {
  max-width: 760px;
  margin: 2.1rem auto 1.8rem;
  color: #303746;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.3vw, 1.75rem);
  line-height: 1.45;
}
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; }
.button {
  display: inline-flex;
  align-items: center;
  gap: .52rem;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .65rem 1.05rem;
  font-size: .84rem;
  font-weight: 750;
  text-decoration: none;
}
.button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.button-primary { color: white; border-color: var(--navy); background: var(--navy); box-shadow: 0 7px 18px rgba(17, 29, 61, .17); }
.button-primary:hover { transform: translateY(-1px); background: #1b2b57; }
.button-muted { color: #7a8190; background: #f6f7f9; cursor: not-allowed; }

.figure-frame {
  overflow: hidden;
  width: min(100%, var(--max));
  margin-left: auto;
  margin-right: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  box-shadow: 0 22px 60px rgba(17, 29, 61, .08);
}
.figure-frame img { width: 100%; height: auto; }
.hero-figure img { max-height: 780px; object-fit: contain; }
figcaption {
  padding: .9rem 1.15rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .83rem;
  line-height: 1.5;
}

.section {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
  padding: clamp(84px, 10vw, 132px) 0;
}
.section-narrow { width: min(calc(100% - 48px), 980px); }
.section-tinted {
  position: relative;
}
.section-tinted::before {
  position: absolute;
  inset: 0 50%;
  z-index: -1;
  width: 100vw;
  transform: translateX(-50%);
  background: var(--wash);
  content: "";
}
h2 {
  margin: .55rem 0 1.2rem;
  font-family: var(--serif);
  font-size: clamp(2.3rem, 5vw, 4.15rem);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: 1.04;
}
h3 { margin: 0 0 .45rem; font-size: 1.15rem; line-height: 1.3; }
.abstract-text {
  margin: 2rem 0 3.2rem;
  color: #303746;
  font-family: var(--serif);
  font-size: clamp(1.08rem, 1.7vw, 1.28rem);
  line-height: 1.8;
}
.results-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid var(--line);
}
.results-strip > div { padding: 1.6rem; text-align: center; }
.results-strip > div + div { border-left: 1px solid var(--line); }
.metric { display: block; font-family: var(--serif); font-size: clamp(2.2rem, 4vw, 3.45rem); line-height: 1; letter-spacing: -.04em; }
.metric small { font-size: .48em; }
.metric-label { display: block; margin-top: .65rem; color: var(--muted); font-size: .79rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  align-items: end;
  gap: 4rem;
  margin-bottom: 3rem;
}
.section-heading p { margin: 0 0 .45rem; color: var(--muted); font-size: 1rem; }
.figure-large { margin-top: 1rem; }
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  margin-top: 2.4rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--line);
}
.steps article { padding: 1.6rem; background: white; }
.step-number {
  display: grid;
  width: 32px;
  height: 32px;
  margin-bottom: 1rem;
  place-items: center;
  border-radius: 50%;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: .8rem;
  font-weight: 800;
}
.steps p { margin: 0; color: var(--muted); font-size: .91rem; line-height: 1.58; }

.result-block { padding: 3rem 0; border-top: 1px solid var(--line); }
.result-block:last-child { border-bottom: 1px solid var(--line); }
.result-copy {
  display: grid;
  grid-template-columns: 45px 1fr;
  gap: 1rem;
  max-width: 820px;
  margin-bottom: 1.7rem;
}
.result-copy p { margin: 0; color: var(--muted); }
.result-index {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  color: var(--blue);
  background: var(--blue-soft);
  font-weight: 850;
}
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: white; outline-offset: 4px; }
table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: .84rem; font-variant-numeric: tabular-nums; }
caption { padding: .85rem 1rem; color: var(--muted); background: #f8fafc; font-size: .76rem; text-align: left; }
th, td { padding: .7rem .85rem; border-top: 1px solid #e9edf2; text-align: right; white-space: nowrap; }
th:first-child, td:first-child { position: sticky; left: 0; z-index: 1; text-align: left; background: white; }
thead th { color: white; border-color: rgba(255,255,255,.15); background: var(--navy); font-size: .73rem; letter-spacing: .03em; }
thead th:first-child { z-index: 2; background: var(--navy); }
.group-row th { padding: .5rem .85rem; color: #596174; background: #f3f5f8; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
.ours-row th, .ours-row td { color: #153f95; background: #edf3ff; }
.ours-row th:first-child { background: #edf3ff; }
.ours-row th span { display: inline-block; margin-left: .4rem; border-radius: 999px; padding: .12rem .42rem; color: white; background: var(--blue); font-size: .6rem; letter-spacing: .06em; text-transform: uppercase; }
.dense-table { min-width: 1050px; font-size: .79rem; }
.dense-table th, .dense-table td { padding: .65rem .65rem; }

.bar-chart { max-width: 850px; margin: .8rem 0 0 61px; padding: 1.5rem; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfe; }
.bar-row { display: grid; grid-template-columns: 190px 1fr 72px; align-items: center; gap: 1rem; margin: 1rem 0; font-size: .84rem; }
.bar-label { color: #414958; font-weight: 650; }
.bar-track { overflow: hidden; height: 13px; border-radius: 999px; background: #e6eaf0; }
.bar { display: block; width: var(--score); height: 100%; border-radius: inherit; background: #a6b0c2; }
.ours-bar .bar { background: linear-gradient(90deg, var(--blue), #5b8ff0); }
.ours-bar strong, .ours-bar .bar-label { color: var(--blue); }
.chart-note { margin: 1.2rem 0 0; color: var(--muted); font-size: .72rem; text-align: right; }

.state-pair { display: grid; grid-template-columns: 1fr 48px 1fr; align-items: center; gap: 1rem; margin-top: 2.5rem; }
.state-pair figure { position: relative; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: white; }
.state-label { position: absolute; top: .8rem; left: .8rem; z-index: 1; border-radius: 999px; padding: .38rem .7rem; color: #9b2636; background: var(--rose); font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.state-label-next { color: #17602b; background: var(--mint); }
.state-arrow { color: var(--blue); font-size: 2rem; text-align: center; }

.takeaway {
  padding: clamp(95px, 13vw, 170px) 24px;
  color: white;
  background: var(--navy);
  text-align: center;
}
.takeaway .section-kicker { color: #8fb5ff; }
.takeaway blockquote {
  max-width: 1050px;
  margin: 1.4rem auto 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 4.3vw, 4.3rem);
  letter-spacing: -.04em;
  line-height: 1.16;
}
.takeaway em { color: #9dbdff; font-weight: 400; }

.citation-section { width: min(calc(100% - 48px), 980px); }
.citation-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; }
.copy-button { margin-bottom: 1.4rem; border: 1px solid var(--line); border-radius: 999px; padding: .55rem .9rem; color: #303746; background: white; font-size: .76rem; font-weight: 750; cursor: pointer; }
.copy-button:hover { border-color: var(--blue); color: var(--blue); }
pre { overflow: auto; margin: 1rem 0 0; border-radius: 14px; padding: 1.4rem; color: #e8eefc; background: #10172a; font: .82rem/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.footer {
  display: flex;
  justify-content: space-between;
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
  padding: 2.3rem 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .78rem;
}
.footer p { margin: 0; }
.footer a { color: var(--ink); text-decoration: none; }
.footer a:hover { color: var(--blue); }

@media (max-width: 800px) {
  .site-header nav { display: none; }
  .hero { padding-top: 74px; }
  .section-heading { grid-template-columns: 1fr; gap: 1rem; }
  .results-strip { grid-template-columns: 1fr; }
  .results-strip > div + div { border-top: 1px solid var(--line); border-left: 0; }
  .steps { grid-template-columns: 1fr; }
  .state-pair { grid-template-columns: 1fr; }
  .state-arrow { transform: rotate(90deg); }
  .bar-chart { margin-left: 0; }
  .bar-row { grid-template-columns: 1fr 64px; gap: .45rem 1rem; }
  .bar-track { grid-column: 1 / -1; grid-row: 2; }
  .bar-row strong { grid-column: 2; grid-row: 1; text-align: right; }
}

@media (max-width: 520px) {
  .site-header { padding-inline: 18px; }
  .wordmark-light { display: none; }
  .hero, .section, .section-narrow, .citation-section, .footer { width: 100%; padding-left: 18px; padding-right: 18px; }
  .hero { padding-bottom: 60px; }
  h1 { font-size: clamp(2.75rem, 14vw, 4rem); }
  .actions { flex-direction: column; align-items: stretch; }
  .button { justify-content: center; }
  .hero-figure { border-radius: 12px; }
  .result-copy { grid-template-columns: 38px 1fr; }
  .citation-heading { align-items: flex-start; flex-direction: column; gap: 0; }
  .copy-button { margin-bottom: .7rem; }
  .footer { flex-direction: column; gap: .5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
