:root {
  --ink: #17201d;
  --muted: #5e6964;
  --paper: #f4f0e8;
  --paper-deep: #eae3d7;
  --card: #fffdf8;
  --safe: #117a62;
  --safe-soft: #d6eee5;
  --unsafe: #d14f36;
  --unsafe-soft: #f7ddd4;
  --purple: #7357a3;
  --line: rgba(23, 32, 29, 0.16);
  --shadow: 0 24px 80px rgba(38, 45, 39, 0.11);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 8%, rgba(115, 87, 163, 0.12), transparent 27rem),
    radial-gradient(circle at 90% 24%, rgba(17, 122, 98, 0.1), transparent 28rem),
    var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: 0.28;
  background-image: linear-gradient(rgba(23, 32, 29, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(23, 32, 29, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

a { color: inherit; }

.site-header {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 760;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.wordmark-mark {
  width: 32px;
  height: 36px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--ink);
  clip-path: polygon(50% 0, 92% 16%, 84% 72%, 50% 100%, 16% 72%, 8% 16%);
  font-family: Georgia, serif;
}

nav { display: flex; gap: 26px; }
nav a { color: var(--muted); font-size: 0.9rem; text-decoration: none; }
nav a:hover { color: var(--ink); }

.section-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.hero {
  min-height: 700px;
  padding: 84px 0 96px;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
  gap: 72px;
  align-items: center;
}

.eyebrow,
.section-label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.eyebrow { color: var(--safe); }

h1, h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

h1 { max-width: 850px; font-size: clamp(3.5rem, 7.2vw, 7rem); }
h1 em { color: var(--safe); font-weight: 500; }
h2 { font-size: clamp(2.3rem, 4.3vw, 4.6rem); }

.hero-deck {
  max-width: 760px;
  margin: 30px 0 26px;
  color: #39443f;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  line-height: 1.45;
}

.authors { max-width: 820px; display: flex; flex-wrap: wrap; gap: 5px 18px; font-size: 0.96rem; }
.equal-note { margin: 3px 0 0; color: var(--muted); font-size: 0.78rem; }

.hero-actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 10px; }

.button {
  min-height: 45px;
  padding: 10px 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 760;
  text-decoration: none;
}

.button-primary { color: white; background: var(--ink); }
.button-secondary { background: rgba(255, 253, 248, 0.64); }
.button[aria-disabled="true"] { cursor: default; }

.hero-panel { display: flex; justify-content: center; }
.signal-card {
  width: min(100%, 390px);
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255, 253, 248, 0.76);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  transform: rotate(1.5deg);
}

.signal-card > p { margin: 0 0 16px; color: var(--muted); font-size: 0.76rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.state-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.state { padding: 17px; border-radius: 16px; font-size: 0.83rem; font-weight: 800; line-height: 1.2; text-transform: uppercase; }
.state.safe { color: var(--safe); background: var(--safe-soft); }
.state.unsafe { color: var(--unsafe); background: var(--unsafe-soft); }
.signal-line { height: 64px; position: relative; }
.signal-line::before { position: absolute; top: 50%; left: 0; right: 0; height: 1px; content: ""; background: var(--line); }
.signal-line span { position: absolute; top: calc(50% - 7px); left: calc(50% - 7px); width: 14px; height: 14px; border: 3px solid var(--card); border-radius: 50%; background: var(--purple); box-shadow: 0 0 0 1px var(--purple); }
.signal-card strong, .signal-card small { display: block; text-align: center; }
.signal-card strong { font-family: Georgia, serif; font-size: 1.35rem; }
.signal-card small { margin-top: 4px; color: var(--muted); }

.metrics-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-block: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.5);
}

.metrics-band > div { padding: 32px 24px; text-align: center; }
.metrics-band > div + div { border-left: 1px solid var(--line); }
.metrics-band strong { display: block; font-family: Georgia, serif; font-size: clamp(2rem, 4vw, 3.4rem); font-weight: 500; line-height: 1; }
.metrics-band span { display: block; margin-top: 8px; color: var(--muted); font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; }

.prose-section, .figure-section, .results-section, .contributions-section { padding-block: 120px; }
.section-label { margin-bottom: 38px; color: var(--muted); }
.section-label span { margin-right: 12px; color: var(--safe); }
.prose-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 90px; align-items: start; }
.prose-grid p { margin-top: 0; color: var(--muted); }
.prose-grid .lead { color: var(--ink); font-size: 1.2rem; }

.figure-card {
  padding: clamp(18px, 4vw, 50px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: white;
  box-shadow: var(--shadow);
}
.figure-card img { width: 100%; height: auto; display: block; }
.caption { max-width: 880px; margin: 20px auto 0; color: var(--muted); font-size: 0.9rem; text-align: center; }
.dataset-section {
  padding-block: 120px;
  border-block: 1px solid var(--line);
  background: #1a2420;
  color: #f6f2e9;
}
.dataset-section .section-label, .dataset-section .lead, .dataset-section .caption { color: #b9c2bd; }
.dataset-heading, .results-heading, .qual-heading { display: grid; grid-template-columns: 1.12fr 0.88fr; gap: 80px; align-items: end; }
.dataset-heading .lead, .results-heading .lead { margin: 0; }
.dataset-pipeline-card { margin-top: 58px; }
.dataset-breakdown { margin: 32px 0; display: grid; grid-template-columns: 0.55fr 0.55fr 0.55fr 1.6fr; gap: 1px; overflow: hidden; border: 1px solid rgba(255,255,255,0.16); border-radius: 20px; background: rgba(255,255,255,0.16); }
.dataset-breakdown > div { min-height: 140px; padding: 25px; display: flex; flex-direction: column; justify-content: space-between; background: #202c27; }
.dataset-breakdown strong { font-family: Georgia, serif; font-size: 2.6rem; font-weight: 500; }
.dataset-breakdown span { color: #b9c2bd; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; }
.dataset-breakdown .breakdown-note strong { color: #8fd4bd; }
.dataset-breakdown .breakdown-note span { max-width: 340px; letter-spacing: 0; line-height: 1.5; text-transform: none; }
.wide-figure { margin-top: 32px; padding: 18px; border-radius: 20px; }

.results-heading { margin-bottom: 56px; }
.result-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.result-card { min-height: 250px; padding: 30px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,253,248,0.76); }
.result-card > p { margin: 0 0 auto; color: var(--muted); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; }
.result-card strong { margin-block: 30px 18px; font-family: Georgia, serif; font-size: clamp(2rem, 4vw, 3.7rem); font-weight: 500; letter-spacing: -0.05em; line-height: 1; }
.result-card strong span { font-size: 0.45em; }
.result-card strong i { padding-inline: 5px; color: var(--muted); font-family: inherit; font-style: normal; }
.result-card small { color: var(--muted); line-height: 1.5; }
.accent-safe { box-shadow: inset 0 4px var(--safe); }
.accent-purple { box-shadow: inset 0 4px var(--purple); }
.accent-coral { box-shadow: inset 0 4px var(--unsafe); }

.table-card { margin-top: 24px; overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: var(--card); box-shadow: var(--shadow); }
.table-heading { padding: 26px 30px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.table-heading .kicker { margin: 0 0 5px; color: var(--safe); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.table-heading h3 { margin: 0; font-family: Georgia, serif; font-size: 1.7rem; font-weight: 500; }
.table-heading > span { color: var(--muted); font-size: 0.8rem; }
.table-scroll { overflow-x: auto; }
table { width: 100%; min-width: 680px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 15px 22px; border-bottom: 1px solid var(--line); text-align: right; }
th:first-child, td:first-child { text-align: left; }
thead th { color: var(--muted); background: #f0ece4; font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
.ours-row { color: #0b5d4a; background: var(--safe-soft); }

.secondary-results { margin-top: 24px; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; }
.secondary-results article { min-height: 240px; padding: 34px; background: rgba(255,253,248,0.54); }
.secondary-results article:nth-child(even) { border-left: 1px solid var(--line); }
.secondary-results article:nth-child(n+3) { border-top: 1px solid var(--line); }
.secondary-results .number { color: var(--safe); font-family: Georgia, serif; font-size: 2.2rem; }
.secondary-results h3 { margin: 12px 0 8px; font-family: Georgia, serif; font-size: 1.5rem; font-weight: 500; }
.secondary-results p { margin: 0; color: var(--muted); }

.qualitative-section { padding-block: 120px; background: #ded5c6; }
.qual-heading { align-items: start; }
.qual-heading > p { margin: 0; color: var(--muted); }
.dark-frame { margin-top: 52px; background: #fff; }
.more-results { margin-top: 18px; }
.more-results summary { padding: 18px 22px; cursor: pointer; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,253,248,0.62); font-weight: 760; list-style-position: inside; }
.more-results[open] summary { background: var(--card); }

.contribution-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: var(--line); }
.contribution-grid article { min-height: 330px; padding: 34px; background: var(--card); }
.contribution-grid article > span { color: var(--unsafe); font-size: 0.74rem; font-weight: 800; letter-spacing: 0.12em; }
.contribution-grid h3 { margin: 70px 0 14px; font-family: Georgia, serif; font-size: 1.8rem; font-weight: 500; line-height: 1.1; }
.contribution-grid p { margin: 0; color: var(--muted); }

.resources-section { padding-block: 130px; color: white; background: var(--purple); }
.resources-section .eyebrow { color: #d7c9ee; }
.resources-section h2 { max-width: 800px; }
.resources-deck { max-width: 720px; color: #e0d8ee; font-size: 1.12rem; }
.resource-grid { margin-top: 50px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.resource-grid > * { min-height: 150px; padding: 24px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid rgba(255,255,255,0.26); border-radius: 18px; background: rgba(255,255,255,0.07); color: white; text-decoration: none; }
.resource-grid a:hover { background: rgba(255,255,255,0.14); }
.resource-grid span { color: #d7c9ee; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.resource-grid strong { font-family: Georgia, serif; font-size: 1.2rem; font-weight: 500; }
.citation-placeholder { margin-top: 34px; padding: 22px 26px; display: flex; gap: 26px; border-radius: 16px; color: #ded5eb; background: rgba(24,19,34,0.24); }
.citation-placeholder span { font-weight: 800; }
.citation-placeholder code { white-space: normal; }

footer { padding-block: 56px; background: #111815; color: white; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: end; }
.footer-grid strong { font-family: Georgia, serif; font-size: 1.4rem; }
.footer-grid p { margin: 8px 0 0; color: #aeb8b3; font-size: 0.86rem; }

@media (max-width: 900px) {
  .site-header nav { display: none; }
  .hero { min-height: auto; grid-template-columns: 1fr; padding-top: 56px; }
  .hero-panel { justify-content: flex-start; }
  .metrics-band { grid-template-columns: 1fr 1fr; }
  .metrics-band > div:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .metrics-band > div:nth-child(4) { border-top: 1px solid var(--line); }
  .prose-grid { grid-template-columns: 1fr; gap: 34px; }
  .dataset-heading, .results-heading, .qual-heading { grid-template-columns: 1fr; gap: 30px; }
  .dataset-breakdown { grid-template-columns: 1fr 1fr; }
  .dataset-breakdown .breakdown-note { grid-column: 1 / -1; }
  .result-cards, .contribution-grid { grid-template-columns: 1fr; }
  .contribution-grid article { min-height: auto; }
  .contribution-grid h3 { margin-top: 40px; }
  .resource-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .section-shell, .site-header { width: min(100% - 28px, 1180px); }
  .hero { padding-bottom: 70px; gap: 48px; }
  h1 { font-size: clamp(3rem, 15vw, 4.4rem); }
  .metrics-band strong { font-size: 2.2rem; }
  .metrics-band span { font-size: 0.67rem; }
  .prose-section, .figure-section, .dataset-section, .results-section, .qualitative-section, .contributions-section, .resources-section { padding-block: 82px; }
  .signal-card { padding: 24px; transform: none; }
  .result-cards, .secondary-results, .resource-grid, .footer-grid { grid-template-columns: 1fr; }
  .secondary-results article:nth-child(even) { border-left: 0; }
  .secondary-results article:nth-child(n+2) { border-top: 1px solid var(--line); }
  .resource-grid > * { min-height: 120px; }
  .citation-placeholder { flex-direction: column; gap: 8px; }
}

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