:root {
  --ink: #15211c;
  --muted: #68736e;
  --paper: #f4f3ed;
  --surface: #fbfaf6;
  --line: #d9ddd7;
  --green: #0c7c59;
  --lime: #b9ed72;
  --orange: #ef7b45;
  --mono: "DM Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 80% 4%, rgba(185, 237, 114, .2), transparent 23rem),
    var(--paper);
  color: var(--ink);
  font-family: "Manrope", sans-serif;
}

nav, footer, main { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
nav {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; font-weight: 700; }
.brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px;
  background: var(--ink); color: var(--lime); border-radius: 9px; font-family: var(--mono);
}
.nav-links { display: flex; gap: 24px; margin-left: auto; margin-right: 30px; }
.nav-links a { color: var(--muted); text-decoration: none; font: 11px var(--mono); text-transform: uppercase; }
.nav-links a:hover { color: var(--green); }
.nav-meta { color: var(--muted); font: 12px var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin-right: 7px; }
.divider { display: inline-block; width: 1px; height: 12px; background: var(--line); margin: 0 12px -2px; }

.hero { padding: 108px 0 75px; max-width: 940px; }
.eyebrow { color: var(--green); font: 500 12px var(--mono); letter-spacing: .12em; margin-bottom: 22px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 30px; font-size: clamp(56px, 8vw, 104px); line-height: .94; letter-spacing: -.065em; }
h1 span { color: var(--green); }
.hero-copy { max-width: 700px; color: #4e5a54; font-size: 20px; line-height: 1.65; }
.hero-actions { display: flex; align-items: center; gap: 26px; margin-top: 38px; }
.primary-button {
  display: inline-flex; gap: 38px; align-items: center; padding: 16px 20px;
  color: white; background: var(--ink); border-radius: 6px; text-decoration: none; font-weight: 700;
}
.primary-button span { color: var(--lime); }
.method { color: var(--muted); font: 12px var(--mono); }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); background: var(--surface); }
.stat-card { min-height: 225px; padding: 27px; border-right: 1px solid var(--line); }
.stat-card:last-child { border-right: 0; }
.stat-card.featured { background: var(--ink); color: white; }
.stat-label { color: var(--muted); font: 12px var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.featured .stat-label { color: #a9b5af; }
.stat-value { margin-top: 23px; font-size: 62px; line-height: 1; font-weight: 700; letter-spacing: -.05em; }
.stat-value > span { font-size: 30px; color: var(--green); }
.featured .stat-value { color: var(--lime); }
.stat-note { display: flex; flex-direction: column; gap: 5px; margin-top: 27px; font-size: 13px; }
.stat-note span { color: var(--muted); font-size: 12px; }
.featured .stat-note span { color: #a9b5af; }

.data-grid { display: grid; gap: 22px; }
.visual-card { overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.visual-card img { display: block; width: 100%; height: auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.zoomable { cursor: zoom-in; }
.zoomable:focus-visible { outline: 3px solid var(--green); outline-offset: -3px; }
.visual-copy { display: flex; gap: 22px; align-items: start; padding: 25px 28px; }
.visual-index { color: var(--green); font: 12px var(--mono); }
.visual-copy h3 { margin: 0 0 6px; font-size: 20px; letter-spacing: -.02em; }
.visual-copy p { margin: 0; color: var(--muted); font-size: 13px; }
.mix-legend { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; padding: 20px 28px 24px; color: var(--muted); font: 10px var(--mono); }
.mix-legend span { display: flex; flex-direction: column; gap: 9px; }
.mix-legend i { display: block; width: var(--mix); min-width: 20px; height: 4px; background: var(--green); }
.protocol-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 22px; border: 1px solid var(--line); background: var(--surface); }
.protocol-strip div { display: flex; flex-direction: column; gap: 7px; padding: 21px; border-right: 1px solid var(--line); }
.protocol-strip div:last-child { border-right: 0; }
.protocol-strip strong { font-size: 13px; }
.protocol-strip span { color: var(--muted); font: 10px/1.5 var(--mono); }

.section { padding: 110px 0; border-bottom: 1px solid var(--line); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 48px; }
.section-heading .eyebrow { margin-bottom: 12px; }
h2 { margin-bottom: 0; font-size: clamp(35px, 4vw, 52px); letter-spacing: -.045em; }
.section-copy { max-width: 430px; margin-bottom: 4px; color: var(--muted); line-height: 1.6; }
.metric-switcher { display: flex; padding: 4px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.metric-switcher button {
  border: 0; padding: 10px 14px; background: transparent; color: var(--muted);
  border-radius: 4px; font: 500 12px var(--mono); cursor: pointer;
}
.metric-switcher button.active { color: white; background: var(--ink); }

.chart-shell { padding: 28px 32px 34px; background: var(--surface); border: 1px solid var(--line); }
.chart-scale { display: flex; justify-content: space-between; margin-left: 280px; padding-bottom: 14px; color: #8d9691; font: 11px var(--mono); border-bottom: 1px solid var(--line); }
.bar-chart { display: grid; gap: 12px; margin-top: 19px; }
.bar-row { display: grid; grid-template-columns: 35px 215px 1fr 48px; gap: 15px; align-items: center; min-height: 37px; }
.bar-rank, .bar-value { color: var(--muted); font: 12px var(--mono); }
.bar-value { text-align: right; color: var(--ink); font-weight: 500; }
.bar-name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-name small { color: var(--muted); font: 10px var(--mono); margin-left: 8px; }
.bar-track { height: 13px; background: #e8e9e3; overflow: hidden; }
.bar-fill { height: 100%; background: #b5bcb6; transition: width .7s cubic-bezier(.2,.8,.2,1); }
.bar-row.is-a6 .bar-fill { background: var(--green); }
.bar-row.is-a6 .bar-name, .bar-row.is-a6 .bar-value { color: var(--green); }

.gain-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gain-card { position: relative; padding: 29px; background: var(--surface); border: 1px solid var(--line); }
.gain-title { color: var(--muted); font: 12px var(--mono); text-transform: uppercase; }
.gain-values { display: flex; align-items: baseline; gap: 14px; margin: 25px 0; font-size: 28px; }
.gain-values strong { font-size: 43px; color: var(--green); }
.arrow { color: #a7afa9; font-size: 18px; }
.gain-pill { position: absolute; right: 25px; top: 25px; padding: 6px 9px; background: #e2f5c7; color: #426920; border-radius: 99px; font: 11px var(--mono); }
.gain-track { height: 6px; background: #e3e6e1; }
.gain-track span { display: block; height: 100%; background: var(--green); }

.contact-sheet { display: block; width: 100%; border: 1px solid var(--line); background: white; }
.evidence-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 22px; }
.evidence-card { overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.evidence-image { display: block; width: 100%; height: 290px; padding: 0; border: 0; border-bottom: 1px solid var(--line); background: #ecece7; cursor: zoom-in; overflow: hidden; }
.evidence-image img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .35s ease; }
.evidence-image:hover img { transform: scale(1.025); }
.evidence-caption { padding: 18px; }
.case-tag { display: inline-block; padding: 5px 7px; border-radius: 3px; color: #a34224; background: #f9ded3; font: 10px var(--mono); text-transform: uppercase; }
.case-tag.success { color: #23683f; background: #dcefd9; }
.evidence-caption p { margin: 12px 0 0; color: var(--muted); font-size: 12px; }
#image-dialog { max-width: min(1080px, 92vw); max-height: 92vh; padding: 12px; border: 0; border-radius: 8px; background: var(--surface); box-shadow: 0 20px 80px #0d181350; }
#image-dialog::backdrop { background: #0b1511cc; backdrop-filter: blur(5px); }
#image-dialog img { display: block; max-width: 100%; max-height: calc(92vh - 24px); }
.dialog-controls { position: fixed; top: 20px; right: 24px; z-index: 2; display: flex; align-items: center; gap: 10px; }
.dialog-original { padding: 12px 15px; border-radius: 99px; background: white; color: var(--ink); text-decoration: none; font: 11px var(--mono); }
.dialog-close { width: 40px; height: 40px; border: 0; border-radius: 50%; background: white; color: var(--ink); font-size: 24px; cursor: pointer; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--surface); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 17px 20px; border-bottom: 1px solid var(--line); text-align: right; font-size: 13px; }
th { color: var(--muted); font: 500 11px var(--mono); text-transform: uppercase; }
th:first-child, td:first-child { text-align: left; }
tbody tr:last-child td { border-bottom: 0; }
.a6-row { background: #eaf4dc; font-weight: 800; color: #155d47; }
.mini-badge { margin-right: 10px; padding: 4px 6px; background: var(--green); color: white; border-radius: 3px; font: 10px var(--mono); }

.takeaway { padding: 120px 0; text-align: center; }
.takeaway blockquote { max-width: 920px; margin: 0 auto 26px; font-size: clamp(36px, 5vw, 64px); line-height: 1.12; letter-spacing: -.05em; font-weight: 700; }
.takeaway blockquote span { color: var(--green); }
.takeaway p { color: var(--muted); }
footer { display: flex; justify-content: space-between; padding: 27px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font: 11px var(--mono); }

@media (max-width: 850px) {
  .nav-links { display: none; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat-card:nth-child(2) { border-right: 0; }
  .stat-card:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .section-heading { align-items: start; flex-direction: column; }
  .gain-grid { grid-template-columns: 1fr; }
  .protocol-strip { grid-template-columns: 1fr 1fr; }
  .protocol-strip div:nth-child(2) { border-right: 0; }
  .protocol-strip div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .evidence-grid { grid-template-columns: 1fr 1fr; }
  .chart-scale { display: none; }
  .bar-row { grid-template-columns: 28px 130px 1fr 42px; gap: 8px; }
  .bar-name small { display: none; }
}

@media (max-width: 560px) {
  nav, footer, main { width: min(100% - 24px, 1180px); }
  nav { align-items: flex-start; height: auto; padding: 18px 0; }
  .nav-meta { text-align: right; line-height: 1.8; max-width: 160px; }
  .divider { display: none; }
  .hero { padding: 72px 0 55px; }
  .hero-copy { font-size: 17px; }
  .hero-actions { align-items: start; flex-direction: column; }
  .stat-grid { grid-template-columns: 1fr; }
  .stat-card { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat-card:last-child { border-bottom: 0; }
  .section { padding: 76px 0; }
  .mix-legend { grid-template-columns: 1fr 1fr; }
  .protocol-strip { grid-template-columns: 1fr; }
  .protocol-strip div { border-right: 0; border-bottom: 1px solid var(--line); }
  .protocol-strip div:last-child { border-bottom: 0; }
  .evidence-grid { grid-template-columns: 1fr; }
  .evidence-image { height: 340px; }
  .metric-switcher { width: 100%; }
  .metric-switcher button { flex: 1; }
  .chart-shell { padding-inline: 13px; }
  .bar-row { grid-template-columns: 25px 108px 1fr 37px; }
  .bar-name { font-size: 11px; }
  footer { flex-direction: column; gap: 12px; }
}
