:root {
  color-scheme: light;
  --ink: #10243e;
  --ink-soft: #43556a;
  --paper: #f4f7f6;
  --card: #ffffff;
  --line: #cdd9d8;
  --line-strong: #9dafaf;
  --teal: #087f73;
  --teal-dark: #075e57;
  --teal-soft: #dcefeb;
  --amber: #a85f00;
  --amber-soft: #f8e9d2;
  --navy: #10243e;
  --red: #a33a42;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(16, 36, 62, 0.08);
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
button, input { font: inherit; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--navy);
  color: white;
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid #d97706; outline-offset: 3px; }

.site-header {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.wordmark-mark {
  width: 30px;
  height: 18px;
  border: 2px solid var(--teal);
  border-width: 0 0 2px;
  position: relative;
}
.wordmark-mark::before,
.wordmark-mark::after {
  content: "";
  position: absolute;
  top: 7px;
  height: 2px;
  background: var(--teal);
  transform-origin: left center;
}
.wordmark-mark::before { left: 0; width: 18px; transform: rotate(-24deg); }
.wordmark-mark::after { right: 0; width: 15px; transform: rotate(31deg); }
.site-header nav, .site-footer nav { display: flex; flex-wrap: wrap; gap: 16px; }
.site-header nav a, .site-footer a {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.site-header nav a:hover, .site-footer a:hover { color: var(--teal-dark); }

.hero {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(64px, 10vw, 128px) 0 72px;
  display: grid;
  gap: 48px;
}
.hero-copy { max-width: 790px; }
.kicker {
  margin: 0 0 15px;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
h1, h2, h3, p { text-wrap: pretty; }
h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(3.2rem, 10.5vw, 7.9rem);
  line-height: 0.87;
  letter-spacing: -0.072em;
  font-weight: 800;
}
h1 em { color: var(--teal); font-family: var(--serif); font-weight: 400; }
.lede {
  max-width: 720px;
  margin: 32px 0 0;
  color: var(--ink-soft);
  font-size: clamp(1.08rem, 2.1vw, 1.4rem);
  line-height: 1.55;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}
.button.primary { background: var(--ink); color: white; }
.button.secondary { background: transparent; }
.button:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(16, 36, 62, 0.12); }

.hero-result {
  align-self: end;
  border-top: 5px solid var(--teal);
  padding: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.result-label { margin: 0; color: var(--ink-soft); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.hero-result > strong { display: block; margin: 18px 0 6px; font: 800 clamp(3.8rem, 12vw, 6.5rem)/.8 var(--sans); letter-spacing: -.08em; }
.hero-result > strong small { color: var(--ink-soft); font-size: .28em; letter-spacing: -.03em; }
.hero-result > p:not(.result-label) { margin: 18px 0 24px; color: var(--ink-soft); }
.result-foot { display: flex; justify-content: space-between; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; }
.result-foot b { color: var(--teal-dark); }

.evidence-strip {
  border-block: 1px solid var(--line);
  background: #eef3f1;
  display: grid;
}
.evidence-strip > div { min-width: 0; padding: 24px max(16px, calc((100vw - 1240px) / 2)); border-bottom: 1px solid var(--line); }
.evidence-strip span, .evidence-strip small { display: block; color: var(--ink-soft); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.evidence-strip strong { display: block; margin: 5px 0 2px; font: 700 1.35rem/1.2 var(--mono); }

.section, .explorer-section, .boundary {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(72px, 10vw, 128px) 0;
}
.section-heading { max-width: 810px; margin-bottom: 42px; }
.section-heading h2, .boundary h2 {
  margin: 0;
  font-size: clamp(2.2rem, 5.5vw, 4.4rem);
  line-height: 1;
  letter-spacing: -.052em;
}
.section-heading > p:last-child { max-width: 720px; color: var(--ink-soft); font-size: 1.08rem; }
.finding-grid { display: grid; gap: 14px; }
.finding-card { min-height: 250px; padding: 26px; border: 1px solid var(--line); background: var(--card); }
.finding-card.dark { background: var(--navy); color: white; border-color: var(--navy); }
.finding-card span { color: var(--teal-dark); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.finding-card.dark span { color: #82d8cc; }
.finding-card strong { display: block; margin: 22px 0; font: 800 clamp(2.8rem, 7vw, 4.8rem)/1 var(--mono); letter-spacing: -.06em; }
.finding-card p { margin: 0; color: var(--ink-soft); }
.finding-card.dark p { color: #c9d5df; }
.figure-card { margin: 28px 0 0; border: 1px solid var(--line); background: white; box-shadow: var(--shadow); }
.figure-card img { width: 100%; height: auto; }
.figure-card figcaption { padding: 16px 20px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 13px; }

.explorer-section {
  width: 100%;
  padding-inline: max(16px, calc((100vw - 1240px) / 2));
  background: var(--navy);
  color: white;
}
.section-heading.inverse .kicker { color: #83dcd1; }
.section-heading.inverse > p:last-child { color: #bac9d5; }
.lab-grid { display: grid; gap: 16px; }
.control-panel, .model-panel, .heatmap-panel { border: 1px solid #3a5068; background: #162e4a; border-radius: var(--radius); }
.control-panel { padding: 22px; }
.control-heading, .panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.control-heading { padding-bottom: 16px; border-bottom: 1px solid #3a5068; }
.control-heading h3, .panel-heading h3 { margin: 2px 0 0; font-size: 1.05rem; }
.control-heading button { border: 0; background: transparent; color: #91ddd4; font-weight: 800; cursor: pointer; }
.control-panel label { display: flex; justify-content: space-between; gap: 16px; margin: 22px 0 8px; color: #d6e2eb; font-size: 13px; font-weight: 700; }
.control-panel output { color: #91ddd4; font: 700 12px var(--mono); }
input[type="range"] { width: 100%; accent-color: #55c8ba; cursor: pointer; }
.control-note { margin: 24px 0 0; padding-top: 18px; border-top: 1px solid #3a5068; color: #aebfcd; font-size: 12px; }
.model-panel { min-width: 0; overflow: hidden; }
.panel-heading { padding: 20px 22px; border-bottom: 1px solid #3a5068; }
.panel-heading span { color: #91ddd4; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.panel-heading p { margin: 3px 0 0; color: #aebfcd; font: 12px var(--mono); }
.chart { min-height: 360px; padding: 10px; overflow: hidden; }
.chart svg { width: 100%; height: auto; }
.metric-grid { display: grid; border-top: 1px solid #3a5068; }
.metric { min-width: 0; padding: 17px 20px; border-bottom: 1px solid #3a5068; }
.metric span { display: block; color: #aebfcd; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.metric strong { display: block; margin-top: 5px; color: #91ddd4; font: 700 1.08rem var(--mono); overflow-wrap: anywhere; }
.heatmap-panel { margin-top: 16px; overflow: hidden; }
.heatmap-wrap { overflow-x: auto; padding: 20px; }
.heatmap { width: 100%; min-width: 720px; border-collapse: separate; border-spacing: 5px; }
.heatmap th { padding: 7px; color: #aebfcd; font-size: 11px; font-weight: 700; }
.heatmap td { padding: 13px 8px; border-radius: 7px; text-align: center; font: 700 12px var(--mono); color: white; }
.legend { display: flex; flex-wrap: wrap; gap: 12px 18px; margin: 0; padding: 0 22px 22px; color: #aebfcd; font-size: 11px; }
.legend i { width: 13px; height: 13px; border-radius: 3px; margin-right: -7px; }
.legend-low { background: #3d6680; }.legend-mid { background: #2c8f86; }.legend-high { background: #b66a29; }

.methods-layout { display: grid; gap: 44px; }
.text-link { color: var(--teal-dark); font-weight: 800; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.method-steps { border-top: 1px solid var(--line-strong); }
.method-steps article { display: grid; grid-template-columns: 42px 90px 1fr; gap: 12px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.method-steps span { color: var(--teal-dark); font: 700 12px var(--mono); }
.method-steps h3, .method-steps p { margin: 0; }
.method-steps h3 { font-size: 1rem; }
.method-steps p { color: var(--ink-soft); font-size: 14px; }

.boundary { padding-inline: clamp(24px, 6vw, 80px); border: 1px solid var(--ink); background: var(--amber-soft); }
.boundary .kicker { color: var(--amber); }
.boundary > p:not(.kicker) { max-width: 900px; color: #4e4337; font-size: 1.08rem; }
.boundary-links { display: flex; flex-wrap: wrap; gap: 12px 22px; margin-top: 28px; }
.boundary-links a { font-weight: 800; text-underline-offset: 4px; }

.source-grid { display: grid; gap: 14px; }
.source-card { padding: 23px; border: 1px solid var(--line); background: var(--card); }
.source-card > span { color: var(--teal-dark); font: 700 11px var(--mono); text-transform: uppercase; }
.source-card h3 { margin: 12px 0 10px; font-size: 1.05rem; line-height: 1.35; }
.source-card p { margin: 0 0 14px; color: var(--ink-soft); font-size: 13px; }
.source-card a { color: var(--teal-dark); font-size: 13px; font-weight: 800; }
.maturity { padding-top: 36px; }

.site-footer {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 44px;
  border-top: 1px solid var(--line-strong);
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.site-footer div { display: grid; }
.site-footer span { color: var(--ink-soft); font-size: 12px; }
.noscript { margin: 0; padding: 12px; background: #fff3cd; text-align: center; }

@media (min-width: 680px) {
  .hero { grid-template-columns: minmax(0, 1.5fr) minmax(290px, .5fr); align-items: end; }
  .evidence-strip { grid-template-columns: repeat(2, 1fr); }
  .evidence-strip > div { padding: 24px; }
  .evidence-strip > div:nth-child(odd) { padding-left: max(24px, calc((100vw - 1240px) / 2)); }
  .finding-grid { grid-template-columns: repeat(3, 1fr); }
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .metric { border-right: 1px solid #3a5068; }
  .source-grid { grid-template-columns: repeat(2, 1fr); }
  .site-footer { flex-direction: row; justify-content: space-between; align-items: flex-end; }
}

@media (min-width: 960px) {
  .site-header nav { gap: 28px; }
  .evidence-strip { grid-template-columns: repeat(4, 1fr); padding-inline: max(16px, calc((100vw - 1240px) / 2)); }
  .evidence-strip > div { padding: 24px; border-right: 1px solid var(--line); border-bottom: 0; }
  .evidence-strip > div:first-child { padding-left: 0; }
  .evidence-strip > div:last-child { border-right: 0; padding-right: 0; }
  .lab-grid { grid-template-columns: 310px minmax(0, 1fr); }
  .methods-layout { grid-template-columns: minmax(300px, .8fr) minmax(0, 1.2fr); }
  .sticky-heading { position: sticky; top: 28px; align-self: start; }
}

@media (max-width: 620px) {
  .site-header { align-items: flex-start; padding: 18px 0; }
  .site-header nav { justify-content: flex-end; gap: 8px 13px; }
  .site-header nav a { font-size: 12px; }
  .wordmark span:last-child { display: none; }
  .hero { padding-top: 72px; }
  h1 { font-size: clamp(3rem, 15vw, 5.4rem); }
  .method-steps article { grid-template-columns: 32px 1fr; }
  .method-steps p { grid-column: 2; }
}

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