
:root {
  --ink: #102219;
  --muted: #627269;
  --paper: #f7faf7;
  --paper-2: #edf5ef;
  --line: #d3e5d8;
  --green: #00b83e;
  --green-bright: #20ee74;
  --green-dark: #08612c;
  --night: #04120a;
  --night-2: #0a2415;
  --white: #ffffff;
  --reading: 760px;
  --shadow: 0 22px 70px rgba(5, 42, 20, .13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--green-dark); text-underline-offset: 3px; }
a:hover { color: #008c2f; }
img { display: block; max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }

.progress { position: fixed; z-index: 100; inset: 0 auto auto 0; height: 3px; width: 0; background: var(--green-bright); box-shadow: 0 0 18px var(--green-bright); }
.topbar {
  position: absolute; z-index: 20; inset: 0 0 auto; padding: 22px clamp(22px, 5vw, 76px);
  display: flex; align-items: center; justify-content: space-between; gap: 20px; color: #d9eadf;
  font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
}
.topbar .mark { color: var(--green-bright); }
.topbar-actions { display: flex; gap: 8px; }
.icon-button {
  width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%;
  color: white; background: rgba(255,255,255,.05); cursor: pointer; font-size: 15px;
}
.icon-button:hover { background: rgba(32,238,116,.15); border-color: rgba(32,238,116,.6); }

.hero {
  min-height: 92vh; color: white; background:
    radial-gradient(circle at 75% 42%, rgba(0,184,62,.18), transparent 30%),
    linear-gradient(132deg, #020a05 0%, #06170d 58%, #0b2d19 100%);
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); align-items: stretch;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .16; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.1) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.1) 1px, transparent 1px);
  background-size: 74px 74px; mask-image: linear-gradient(to right, black, transparent 75%);
}
.hero-copy { align-self: center; padding: 118px 7vw 86px; position: relative; z-index: 2; }
.eyebrow { color: var(--green-bright); font-size: 12px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; margin: 0 0 24px; }
h1 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; letter-spacing: -.045em; font-size: clamp(52px, 6.4vw, 104px); line-height: .97; margin: 0; max-width: 920px; }
.deck { color: #cde0d3; max-width: 820px; font-size: clamp(18px, 1.45vw, 24px); line-height: 1.48; margin: 30px 0 26px; }
.byline { color: #89a795; font-size: 14px; margin-bottom: 32px; }
.byline strong { color: white; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 19px; border-radius: 999px;
  font-size: 13px; font-weight: 850; letter-spacing: .02em; text-decoration: none;
}
.button-primary { color: #04210e; background: var(--green-bright); }
.button-primary:hover { color: #04210e; background: #62f598; }
.button-secondary { color: white; border: 1px solid rgba(255,255,255,.24); background: rgba(255,255,255,.04); }
.button-secondary:hover { color: white; border-color: rgba(32,238,116,.7); background: rgba(32,238,116,.1); }
.hero-visual { position: relative; min-height: 640px; overflow: hidden; }
.hero-visual::after { content:""; position:absolute; inset:0; background: linear-gradient(90deg, var(--night) 0%, transparent 35%), linear-gradient(0deg, rgba(4,18,10,.45), transparent 40%); }
.hero-visual img { width: 100%; height: 100%; object-fit: cover; object-position: 45% center; filter: saturate(1.08) contrast(1.03); }
.visual-badge { position: absolute; z-index: 3; right: 38px; bottom: 42px; padding: 10px 14px; border: 1px solid rgba(32,238,116,.46); background: rgba(1,12,5,.72); backdrop-filter: blur(10px); border-radius: 999px; color: #d9ffe7; font-size: 11px; font-weight: 900; letter-spacing: .1em; }

.metrics { background: var(--night); color: white; border-top: 1px solid rgba(32,238,116,.25); border-bottom: 1px solid rgba(32,238,116,.18); }
.metrics-inner { max-width: 1280px; margin: auto; padding: 0 24px; display: grid; grid-template-columns: repeat(4, 1fr); }
.metric { padding: 27px clamp(18px, 3vw, 42px); border-right: 1px solid rgba(255,255,255,.1); }
.metric:last-child { border-right: 0; }
.metric strong { display: block; color: var(--green-bright); font-family: Georgia, serif; font-size: clamp(30px, 4vw, 52px); font-weight: 500; line-height: 1; }
.metric span { display: block; color: #9db3a5; font-size: 12px; font-weight: 750; line-height: 1.4; margin-top: 8px; }

.opening { max-width: 1280px; margin: auto; padding: 92px 24px 54px; }
.opening blockquote { margin: 0; padding-left: clamp(22px, 4vw, 60px); border-left: 4px solid var(--green); color: var(--ink); font-family: Georgia, serif; font-size: clamp(30px, 4.2vw, 64px); line-height: 1.13; letter-spacing: -.025em; }
.opening p { max-width: 780px; margin: 25px 0 0 clamp(26px, 4vw, 64px); color: var(--muted); font-size: 16px; }

.layout { max-width: 1280px; margin: 0 auto; padding: 40px 24px 120px; display: grid; grid-template-columns: 240px minmax(0, var(--reading)); gap: clamp(42px, 6vw, 96px); justify-content: center; }
.toc { position: sticky; top: 26px; align-self: start; padding: 20px 0; max-height: calc(100vh - 52px); overflow: auto; }
.toc-title { color: var(--green-dark); font-size: 11px; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; margin-bottom: 14px; }
.toc a { display: block; padding: 6px 0 6px 14px; border-left: 1px solid var(--line); color: #74827a; font-size: 12px; font-weight: 650; line-height: 1.35; text-decoration: none; }
.toc a.active { color: var(--green-dark); border-color: var(--green); font-weight: 850; }
.toc-tools { display: flex; gap: 8px; margin-top: 18px; }
.toc-tools button { border: 1px solid var(--line); background: white; color: var(--green-dark); border-radius: 999px; padding: 6px 11px; cursor: pointer; font-weight: 800; }

.article { min-width: 0; }
.article-section { scroll-margin-top: 32px; margin-bottom: 78px; }
.article h2 { font-family: Georgia, serif; font-size: clamp(34px, 4vw, 54px); font-weight: 500; line-height: 1.08; letter-spacing: -.028em; margin: 0 0 28px; color: var(--ink); }
.article h2::before { content: ""; display: block; width: 48px; height: 4px; background: var(--green); margin-bottom: 22px; }
.article p { font-family: Georgia, "Times New Roman", serif; font-size: 20px; line-height: 1.78; margin: 0 0 22px; }
.article strong { color: #082e17; }
.impact-line { font-size: 36px !important; line-height: 1.22 !important; color: var(--green-dark); font-style: italic; margin: 42px 0 !important; }
.insight-line { padding: 24px 28px; border-radius: 16px; background: var(--green-dark); color: white; font-size: 25px !important; line-height: 1.4 !important; box-shadow: var(--shadow); }
.insight-line strong { color: var(--green-bright); }
.closed-loop { padding: 24px 28px; border: 1px solid #bfe1c9; border-radius: 14px; background: var(--paper-2); font-family: ui-sans-serif, system-ui, sans-serif !important; font-size: 17px !important; font-weight: 750; line-height: 1.6 !important; }
.sequence-list { list-style: none; counter-reset: discovery; padding: 0; margin: 38px 0; }
.sequence-list li { counter-increment: discovery; position: relative; padding: 18px 18px 18px 66px; border-top: 1px solid var(--line); font-family: Georgia, serif; font-size: 18px; line-height: 1.55; }
.sequence-list li::before { content: counter(discovery, decimal-leading-zero); position: absolute; left: 0; top: 16px; color: var(--green); font-family: ui-monospace, monospace; font-weight: 900; }
.source-list { padding-left: 22px; }
.source-list li { margin-bottom: 12px; font-size: 15px; overflow-wrap: anywhere; }
.data-note { padding: 20px 22px; border-left: 4px solid var(--green); background: var(--paper-2); color: #516157; font-family: ui-sans-serif, system-ui, sans-serif !important; font-size: 14px !important; line-height: 1.6 !important; }

.visual-label { color: var(--green-dark); font-size: 11px; font-weight: 950; letter-spacing: .15em; text-transform: uppercase; margin-bottom: 18px; }
.history-timeline { width: min(980px, calc(100vw - 40px)); margin: 42px 0 52px max(0px, calc((var(--reading) - 980px) / 2)); padding: clamp(24px, 4vw, 42px); border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: var(--shadow); }
.timeline-item { position: relative; display: grid; grid-template-columns: 130px 1fr; gap: 24px; padding: 16px 0 18px; border-top: 1px solid var(--line); }
.timeline-item::before { content: ""; position: absolute; left: 121px; top: 27px; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px #e2f8e9; }
.timeline-item:first-of-type { border-top: 0; }
.timeline-year { color: var(--green-dark); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; font-weight: 900; letter-spacing: .02em; }
.timeline-item strong { display: block; margin-bottom: 4px; font-family: ui-sans-serif, system-ui, sans-serif; font-size: 15px; }
.timeline-item p { margin: 0 !important; color: #59675f; font-family: ui-sans-serif, system-ui, sans-serif !important; font-size: 14px !important; line-height: 1.55 !important; }

.matrix-wrap { width: min(1080px, calc(100vw - 40px)); margin: 42px 0 52px max(0px, calc((var(--reading) - 1080px) / 2)); padding: clamp(22px, 3vw, 34px); overflow-x: auto; border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: var(--shadow); }
.analgesic-matrix { width: 100%; min-width: 760px; border-collapse: separate; border-spacing: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; font-size: 13px; line-height: 1.45; }
.analgesic-matrix th, .analgesic-matrix td { padding: 14px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.analgesic-matrix th:last-child, .analgesic-matrix td:last-child { border-right: 0; }
.analgesic-matrix tbody tr:last-child > * { border-bottom: 0; }
.analgesic-matrix thead th { color: white; background: var(--green-dark); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.analgesic-matrix tbody th { width: 22%; color: var(--green-dark); background: #f6faf7; }
.analgesic-matrix tbody tr:nth-child(even) td { background: #fbfdfb; }
.analgesic-matrix .candidate-row > * { background: #e3f8e9 !important; }
.matrix-note { margin: 14px 2px 0 !important; color: var(--muted); font-family: ui-sans-serif, system-ui, sans-serif !important; font-size: 12px !important; line-height: 1.5 !important; }

.figure-card { position: relative; margin: 48px 0; background: white; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.figure-card img { width: 100%; height: auto; background: white; }
.figure-card figcaption { padding: 17px 20px 20px; color: #516057; font-size: 13px; line-height: 1.5; }
.figure-card figcaption span { color: #78847d; }
.figure-wide { width: min(980px, calc(100vw - 40px)); margin-left: max(0px, calc((var(--reading) - 980px) / 2)); }
.zoom-button { position: absolute; z-index: 2; right: 12px; top: 12px; width: 38px; height: 38px; border: 1px solid rgba(0,0,0,.12); border-radius: 50%; background: rgba(255,255,255,.88); backdrop-filter: blur(8px); color: var(--green-dark); cursor: pointer; font-size: 16px; }
.evidence-grid { width: min(1060px, calc(100vw - 40px)); margin-left: max(0px, calc((var(--reading) - 1060px) / 2)); display: grid; grid-template-columns: 1fr; gap: 10px; }
.evidence-grid .figure-card { margin: 16px 0; }

.modal { border: 0; border-radius: 18px; padding: 0; width: min(1200px, 94vw); max-height: 92vh; background: white; box-shadow: 0 30px 100px rgba(0,0,0,.45); }
.modal::backdrop { background: rgba(0,10,4,.82); backdrop-filter: blur(8px); }
.modal img { max-height: 84vh; width: 100%; object-fit: contain; }
.modal-close { position: absolute; right: 12px; top: 12px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: #06170d; color: white; font-size: 20px; cursor: pointer; }

.endcap { background: var(--night); color: white; padding: 74px 24px; }
.endcap-inner { max-width: 980px; margin: auto; }
.endcap .eyebrow { margin-bottom: 16px; }
.endcap h2 { font-family: Georgia, serif; font-size: clamp(36px, 5vw, 66px); font-weight: 500; line-height: 1.1; margin: 0 0 18px; }
.endcap p { color: #a8bbaa; max-width: 760px; }
.footer { background: #020904; color: #819487; padding: 24px; font-size: 12px; }
.footer-inner { max-width: 1280px; margin: auto; display: flex; justify-content: space-between; gap: 18px; }
.footer a { color: #b8d4c1; }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 50px; }
  .hero-visual { min-height: 520px; max-height: 70vh; }
  .hero-visual::after { background: linear-gradient(0deg, rgba(4,18,10,.45), transparent 40%); }
  .metrics-inner { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.1); }
  .layout { grid-template-columns: minmax(0, var(--reading)); }
  .toc { display: none; }
  .figure-wide, .evidence-grid, .history-timeline, .matrix-wrap { width: 100%; margin-left: 0; }
}

@media (max-width: 620px) {
  .topbar { padding: 18px; }
  .topbar .mark { display: none; }
  .hero-copy { padding: 104px 20px 50px; }
  h1 { font-size: 51px; }
  .deck { font-size: 18px; }
  .hero-visual { min-height: 460px; }
  .visual-badge { right: 16px; bottom: 16px; }
  .metrics-inner { padding: 0; }
  .metric { padding: 22px 18px; }
  .opening { padding-top: 68px; }
  .opening blockquote { font-size: 35px; }
  .layout { padding-inline: 19px; padding-bottom: 80px; }
  .article h2 { font-size: 38px; }
  .article p { font-size: 18px; line-height: 1.72; }
  .impact-line { font-size: 29px !important; }
  .sequence-list li { padding-left: 48px; }
  .timeline-item { grid-template-columns: 92px 1fr; gap: 18px; }
  .timeline-item::before { left: 84px; }
  .footer-inner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

@media print {
  .topbar, .progress, .toc, .hero-actions, .zoom-button, .modal, .endcap, .footer { display: none !important; }
  .hero { min-height: auto; display: block; color: black; background: white; }
  .hero-copy { padding: 20px 0 40px; }
  .hero-visual { display: none; }
  .deck, .byline { color: #333; }
  .metrics { color: black; background: white; }
  .layout { display: block; padding: 0; }
  .article { max-width: none; }
  .reveal { opacity: 1; transform: none; }
  .figure-card { break-inside: avoid; box-shadow: none; }
}
