:root {
  color-scheme: light;
  --ink: #17211f;
  --muted: #65716d;
  --paper: #fbfbf8;
  --soft: #f2f4f0;
  --line: #dfe5df;
  --teal: #2bb8b3;
  --blue: #2f5f8d;
  --gold: #d5aa39;
  --red: #d85c5c;
  --deep: #101816;
  --shadow: 0 16px 36px rgba(16, 24, 22, 0.08);
}

* {
  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;
  line-height: 1.55;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(18px, 4vw, 42px);
  background: rgba(251, 251, 248, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 760;
  font-size: 20px;
}

.brand-mark {
  width: 20px;
  height: 20px;
  border: 2px solid var(--deep);
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 48%, var(--deep) 48% 52%, transparent 52%),
    linear-gradient(0deg, transparent 48%, var(--deep) 48% 52%, transparent 52%),
    radial-gradient(circle at 50% 52%, var(--teal) 0 25%, transparent 26%);
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 18px;
  color: var(--muted);
  font-size: 18px;
  font-weight: 700;
}

.top-nav a:hover {
  color: var(--ink);
}

.section-band,
.summary-strip,
.claim-strip,
.site-footer {
  width: min(1040px, calc(100% - 44px));
  margin-inline: auto;
}

.section-band {
  padding-block: clamp(38px, 6vw, 68px);
}

.narrative,
.split,
.roi-section,
.data-story,
.explorer,
.cite-section,
.access {
  border-top: 1px solid var(--line);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(250px, 0.66fr);
  gap: clamp(24px, 4vw, 46px);
  align-items: center;
  padding-top: clamp(48px, 7vw, 72px);
  padding-bottom: clamp(36px, 5vw, 54px);
}

.hero-copy,
.hero-visual,
.section-heading,
.compare-shell,
.roi-layout,
.trend-panel,
.figure-grid,
.explorer-layout,
.access {
  position: relative;
  z-index: 1;
}

.eyebrow,
.kicker {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 590px;
  margin-bottom: 16px;
  font-size: clamp(29px, 4vw, 43px);
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(23px, 2.7vw, 32px);
  line-height: 1.1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: clamp(19px, 1.9vw, 24px);
  line-height: 1.18;
  letter-spacing: 0;
}

.hero-lede,
.section-heading p,
.trend-copy p,
.roi-copy p,
.access p,
.model-notes p,
.paper-strip p {
  color: var(--muted);
  font-size: clamp(14px, 1.05vw, 16px);
}

.hero-lede {
  max-width: 560px;
}

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

.button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid var(--deep);
  border-radius: 5px;
  font-size: 13px;
  font-weight: 760;
}

.button svg,
.access-links svg,
.github-mark,
.hf-mark {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

img.hf-mark {
  display: block;
  object-fit: contain;
}

img.github-mark {
  display: block;
  object-fit: contain;
}

.button.primary {
  color: white;
  background: var(--deep);
}

.button.secondary {
  background: transparent;
}

.hero-visual {
  justify-self: end;
  width: min(280px, 100%);
}

.visual-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(16, 24, 22, 0.16);
  border-radius: 7px;
  background: #0a0d0c;
  box-shadow: var(--shadow);
  aspect-ratio: 1 / 1;
}

.visual-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.visual-stage img:first-child {
  opacity: 0.46;
  filter: grayscale(1) contrast(1.08);
}

.visual-stage img:nth-child(2) {
  mix-blend-mode: screen;
  animation: attentionPulse 5.5s ease-in-out infinite;
}

.hero-roi {
  position: absolute;
  left: 23%;
  width: 54%;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 3px;
  pointer-events: none;
}

.hero-roi-eyes {
  top: 31%;
  height: 13%;
}

.hero-roi-mouth {
  top: 75%;
  height: 13%;
}

.scanline {
  position: absolute;
  inset: 0;
  height: 18%;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  animation: scan 6s ease-in-out infinite;
}

.hero-caption {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.summary-strip div {
  padding: 16px 20px;
  border-right: 1px solid var(--line);
}

.summary-strip div:last-child {
  border-right: 0;
}

.summary-strip strong {
  display: block;
  font-size: clamp(23px, 2.6vw, 32px);
  line-height: 1;
}

.summary-strip span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.claim-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--line);
}

.claim-strip div {
  padding: 18px 20px;
  border-right: 1px solid var(--line);
}

.claim-strip div:last-child {
  border-right: 0;
}

.claim-strip span {
  display: block;
  margin-bottom: 7px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.claim-strip p {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 720;
  line-height: 1.45;
}

.paper-strip {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(280px, 1.1fr);
  gap: clamp(22px, 4vw, 42px);
  align-items: start;
  border-bottom: 1px solid var(--line);
}

.section-heading {
  max-width: 710px;
  margin-bottom: clamp(22px, 3.5vw, 34px);
}

.section-heading.compact {
  max-width: 640px;
  margin-bottom: 0;
}

.compare-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  box-shadow: var(--shadow);
}

.compare-controls,
.condition-tabs {
  display: flex;
  gap: 6px;
  padding: 9px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}

.compare-tab,
.condition-tab {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 760;
  white-space: nowrap;
  cursor: pointer;
}

.compare-tab.is-active,
.condition-tab.is-active {
  color: white;
  background: var(--deep);
}

.compare-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(280px, 1fr);
  gap: clamp(18px, 3vw, 30px);
  align-items: center;
  padding: clamp(18px, 3vw, 30px);
}

figure {
  margin: 0;
}

figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.main-heatmap img {
  width: min(260px, 100%);
  margin-inline: auto;
  border-radius: 7px;
  border: 1px solid rgba(16, 24, 22, 0.13);
  background: #050706;
  box-shadow: 0 12px 26px rgba(16, 24, 22, 0.11);
  opacity: 1;
  transition: opacity 180ms ease;
}

.main-heatmap img.is-fading {
  opacity: 0.36;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 20px;
  max-width: 360px;
}

.mini-grid img {
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid var(--line);
}

.split {
  display: grid;
  grid-template-columns: minmax(280px, 0.86fr) minmax(300px, 1fr);
  gap: clamp(24px, 4vw, 44px);
  align-items: start;
  border-top: 1px solid var(--line);
}

.formula-stack {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.formula {
  padding: 12px 14px;
  border-left: 3px solid var(--teal);
  background: var(--soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(13px, 1.2vw, 15px);
  line-height: 1.45;
  overflow-x: auto;
}

.formula-fraction {
  display: inline-flex;
  width: 100%;
  align-items: center;
  gap: 12px;
}

.fraction {
  display: inline-grid;
  min-width: min(360px, 100%);
  text-align: center;
}

.fraction span:first-child {
  padding-bottom: 6px;
  border-bottom: 1px solid currentColor;
}

.fraction span:last-child {
  padding-top: 6px;
}

.mechanism-diagram {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.se-flow,
.step {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
}

.se-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  min-height: 118px;
  padding: 18px;
}

.se-flow span,
.se-flow strong {
  display: grid;
  min-height: 56px;
  place-items: center;
  padding: 10px;
  border-radius: 6px;
  text-align: center;
  font-size: 13px;
  line-height: 1.25;
}

.se-flow span {
  background: var(--soft);
}

.se-flow strong {
  color: white;
  background: var(--deep);
}

.se-flow svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.step {
  padding: 17px 18px;
}

.step strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
}

.step span {
  color: var(--muted);
  font-size: 14px;
}

.roi-layout,
.trend-panel,
.explorer-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.74fr) minmax(300px, 1fr);
  gap: clamp(22px, 4vw, 42px);
  align-items: center;
}

.face-map {
  position: relative;
  overflow: hidden;
  width: min(260px, 100%);
  margin-inline: auto;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #070908;
  box-shadow: var(--shadow);
}

.face-map img {
  width: 100%;
  filter: grayscale(1) contrast(1.08);
}

.roi-band {
  position: absolute;
  left: 23.2%;
  width: 53.2%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(16, 24, 22, 0.26);
  color: #101816;
  font-size: 12px;
  font-weight: 800;
}

.roi-band.eyes {
  top: 31.25%;
  height: 13.4%;
  background: rgba(43, 184, 179, 0.55);
}

.roi-band.nose {
  top: 53.57%;
  height: 13.4%;
  background: rgba(213, 170, 57, 0.66);
}

.roi-band.mouth {
  top: 75.45%;
  height: 13.4%;
  background: rgba(216, 92, 92, 0.62);
}

.evidence-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.trend-panel {
  margin-top: clamp(28px, 4vw, 42px);
  padding-top: clamp(24px, 3.5vw, 36px);
  border-top: 1px solid var(--line);
}

.trend-panel img,
.figure-grid img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
}

.trend-panel figure {
  max-width: 315px;
}

.analysis-stack {
  display: grid;
  gap: 18px;
}

.analysis-block {
  display: grid;
  grid-template-columns: minmax(220px, 0.46fr) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 30px);
  align-items: start;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
}

.analysis-copy > p:not(.kicker) {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.analysis-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.35;
}

.analysis-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.analysis-block.roi-block {
  grid-template-columns: 1fr;
  gap: 16px;
}

.roi-block .analysis-copy {
  max-width: 660px;
}

.analysis-figures {
  display: grid;
  gap: 14px;
}

.analysis-figures.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.analysis-figures img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
}

.roi-analysis-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 0.32fr);
  gap: 16px;
  align-items: start;
}

.roi-figure-stack,
.roi-side-evidence {
  min-width: 0;
}

.roi-figure-stack {
  display: grid;
  gap: 14px;
}

.roi-figure-stack img {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
}

.roi-side-evidence {
  display: grid;
  gap: 14px;
}

.roi-takeaway {
  display: grid;
  align-content: center;
  min-height: 128px;
  padding: 16px;
  border: 1px solid rgba(47, 95, 141, 0.2);
  border-radius: 7px;
  background: var(--soft);
}

.roi-takeaway span {
  margin-bottom: 7px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.roi-takeaway strong {
  font-size: 15px;
  line-height: 1.35;
}

.roi-takeaway.muted {
  background: white;
}

.core-result {
  margin-bottom: 18px;
  padding: 20px;
  border: 1px solid rgba(47, 95, 141, 0.22);
  border-left: 4px solid var(--blue);
  border-radius: 7px;
  background: white;
}

.core-result h3 {
  max-width: 790px;
  margin-bottom: 8px;
  font-size: clamp(20px, 2vw, 26px);
}

.core-result p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.explorer-layout {
  align-items: start;
}

.explorer-layout .condition-tabs {
  grid-column: 1 / -1;
  padding: 0 0 12px;
  border-bottom: 0;
}

.roi-rank {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
}

.rank-row {
  display: grid;
  grid-template-columns: 74px minmax(120px, 1fr) 54px;
  gap: 12px;
  align-items: center;
  min-height: 34px;
}

.rank-label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.rank-track {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: var(--soft);
}

.rank-fill {
  height: 100%;
  border-radius: inherit;
  transition: width 280ms ease;
}

.rank-value {
  text-align: right;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.chart-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.citation-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 2fr));
  gap: 16px;
  width: 80%;
}

.citation-grid article {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
}

.citation-grid h3 {
  margin-bottom: 10px;
}

.citation-grid pre {
  overflow-x: auto;
  margin: 0;
  max-width: 100%;
  padding: 14px;
  border-radius: 6px;
  background: var(--soft);
  font-size: 11.5px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.citation-grid p {
  color: var(--muted);
  font-size: 14px;
}

.text-link {
  display: inline-flex;
  margin-top: 12px;
  min-height: 34px;
  align-items: center;
  padding: 7px 11px;
  border: 1px solid var(--deep);
  border-radius: 5px;
  font-size: 13px;
  font-weight: 760;
}

.access {
  width: min(1040px, calc(100% - 44px));
  margin-bottom: 36px;
  padding-block: clamp(38px, 6vw, 68px);
}

.access-card {
  padding: clamp(24px, 4vw, 38px);
  border-radius: 8px;
  background: var(--deep);
  color: white;
}

.access-card .eyebrow,
.access-card p {
  color: rgba(255, 255, 255, 0.7);
}

.access-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 24px;
}

.access-links a {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 13px;
  font-weight: 760;
}

.access-links a:hover {
  background: rgba(255, 255, 255, 0.13);
}

.access-links svg {
  width: 15px;
  height: 15px;
}

.access-links img.github-mark {
  filter: invert(1);
}

.access-note {
  max-width: 720px;
  margin-top: 22px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.7);
}

.request-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.55fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.request-grid h3 {
  margin-bottom: 8px;
  color: white;
}

.request-grid pre {
  overflow-x: auto;
  margin: 0;
  padding: 14px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  padding: 18px 0 26px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 13px;
}

@keyframes attentionPulse {
  0%, 100% { opacity: 0.82; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.015); }
}

@keyframes scan {
  0%, 100% { transform: translateY(-20%); opacity: 0; }
  42%, 58% { opacity: 0.45; }
  50% { transform: translateY(510%); }
}

@media (max-width: 880px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .paper-strip,
  .split,
  .roi-layout,
  .trend-panel,
  .citation-grid,
  .request-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    justify-self: start;
  }

  .summary-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .analysis-block {
    grid-template-columns: 1fr;
  }

  .roi-analysis-layout {
    grid-template-columns: 1fr;
  }

  .roi-side-evidence {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }
}

@media (max-width: 620px) {
  .section-band,
  .summary-strip,
  .claim-strip,
  .access,
  .site-footer {
    width: min(100% - 28px, 1040px);
  }

  .analysis-figures.two-up,
  .roi-side-evidence,
  .request-grid,
  .claim-strip {
    grid-template-columns: 1fr;
  }

  .summary-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .summary-strip div {
    border-bottom: 1px solid var(--line);
    padding: 15px 16px;
  }

  .summary-strip div:nth-child(2n) {
    border-right: 0;
  }

  .summary-strip div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .claim-strip div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 15px 16px;
  }

  .claim-strip div:last-child {
    border-bottom: 0;
  }

  .compare-grid {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .mini-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .rank-row {
    grid-template-columns: 68px minmax(90px, 1fr) 48px;
  }

  .formula-fraction {
    display: grid;
    gap: 8px;
  }

  .fraction {
    min-width: 0;
    font-size: 12px;
  }

  .se-flow {
    grid-template-columns: 1fr;
  }

  .se-flow svg {
    transform: rotate(90deg);
  }
}
