/* ═══════════════════════════════════════════════════════
   KNOW YOUR VIAL — Global Stylesheet
   Design: Investigative journalism + pharmaceutical authority
   Fonts: Crimson Pro (headlines) + IBM Plex Sans (body) + IBM Plex Mono (data)
   Palette: Cool clinical — no warm tones
   Radius: 0px everywhere — ProPublica/Marshall Project standard
   Shadows: None — flat, borders only
   ═══════════════════════════════════════════════════════ */

/* ── TOKENS ── */
:root {
  --bg: #F7F8FA;
  --surface: #EEF0F3;
  --surface-2: #E4E7EC;
  --dark: #0F1114;
  --dark-raised: #1A1D23;
  --dark-surface: #252830;
  --nav-bg: #111318;

  --text: #1A1D23;
  --text-2: #5A6270;
  --text-3: #8E95A0;
  --text-inv: #F0F1F5;
  --text-inv-2: #B0B5C0;

  --crimson: #C22D2D;
  --crimson-bg: rgba(194, 45, 45, 0.07);
  --blue: #1B3A5C;
  --blue-bg: rgba(27, 58, 92, 0.06);
  --gold: #D4920B;
  --gold-bg: rgba(212, 146, 11, 0.07);
  --safe: #1A7A6D;
  --safe-bg: rgba(26, 122, 109, 0.07);

  --border: #DDE0E6;
  --border-dark: rgba(255, 255, 255, 0.07);

  --serif: 'Crimson Pro', Georgia, 'Times New Roman', serif;
  --sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'IBM Plex Mono', 'SF Mono', Menlo, monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-quart: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--sans); background: var(--bg); color: var(--text); line-height: 1.6; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }

/* ── NAV — dark, compact, fixed ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 52px; padding: 0 32px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--nav-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.nav-brand {
  font-family: var(--sans); font-size: 11px; font-weight: 600;
  letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--text-inv); text-decoration: none;
}
.nav-links { display: flex; gap: 24px; list-style: none; }
.nav-links a {
  font-size: 11px; font-weight: 500; letter-spacing: 1px; text-transform: uppercase;
  color: var(--text-inv-2); text-decoration: none;
  transition: color 150ms var(--ease-quart);
}
.nav-links a:hover { color: var(--text-inv); }
.nav-links a.active { color: var(--text-inv); }

/* mobile nav */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle svg { stroke: var(--text-inv); }
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 52px; left: 0; right: 0;
    background: var(--nav-bg); padding: 16px 32px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    gap: 16px;
  }
}

/* ── LAYOUT ── */
.inner { max-width: 1040px; margin: 0 auto; padding: 0 32px; }
.inner-narrow { max-width: 680px; margin: 0 auto; padding: 0 32px; }
.inner-wide { max-width: 1240px; margin: 0 auto; padding: 0 32px; }

/* ── TYPOGRAPHY ── */
.h-xl {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(36px, 4.5vw, 56px); line-height: 1.1;
  letter-spacing: -0.3px;
}
.h-lg {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(26px, 3vw, 38px); line-height: 1.2;
  letter-spacing: -0.2px;
}
.h-md {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(20px, 2.2vw, 28px); line-height: 1.25;
}
.h-sm {
  font-family: var(--sans); font-weight: 600;
  font-size: 17px; line-height: 1.35;
}
.section-label {
  font-family: var(--sans); font-size: 11px; font-weight: 600;
  letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--text-3); display: block; margin-bottom: 16px;
}
.section-label.crimson { color: var(--crimson); }
.section-label.blue { color: var(--blue); }
.section-label.safe { color: var(--safe); }
.section-label.gold { color: var(--gold); }

.body-lg { font-size: 17px; line-height: 1.7; color: var(--text-2); }
.body-md { font-size: 15px; line-height: 1.65; color: var(--text-2); }
.body-sm { font-size: 13px; line-height: 1.55; color: var(--text-2); }

code, .mono {
  font-family: var(--mono); font-size: 13px; font-weight: 400;
}
.mono-sm { font-family: var(--mono); font-size: 11px; }

/* ── DARK SECTIONS ── */
.dark { background: var(--dark); color: var(--text-inv); }
.dark .section-label { color: var(--text-inv-2); }
.dark .body-lg, .dark .body-md, .dark .body-sm { color: var(--text-inv-2); }
.dark .h-xl, .dark .h-lg, .dark .h-md { color: var(--text-inv); }

/* surface alt */
.surface-alt { background: var(--surface); }

/* ── SPACING ── */
.pt-hero { padding-top: 100px; }
.pt-xl { padding-top: 96px; }
.pb-xl { padding-bottom: 96px; }
.pt-lg { padding-top: 64px; }
.pb-lg { padding-bottom: 64px; }
.pt-md { padding-top: 40px; }
.pb-md { padding-bottom: 40px; }
.mt-xl { margin-top: 96px; }
.mb-xl { margin-bottom: 96px; }
.mt-lg { margin-top: 64px; }
.mb-lg { margin-bottom: 64px; }
.mt-md { margin-top: 40px; }
.mb-md { margin-bottom: 40px; }
.mt-sm { margin-top: 20px; }
.mb-sm { margin-bottom: 20px; }
.mt-xs { margin-top: 10px; }
.mb-xs { margin-bottom: 10px; }

/* ── GRID — 1px gap creates border effect ── */
.stat-grid {
  display: grid; gap: 1px; background: var(--border);
}
.dark .stat-grid { background: var(--border-dark); }
.stat-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.stat-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.stat-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 768px) {
  .stat-grid.cols-3, .stat-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .stat-grid.cols-2, .stat-grid.cols-3, .stat-grid.cols-4 { grid-template-columns: 1fr; }
}

.stat-cell { padding: 32px 24px; background: var(--bg); }
.dark .stat-cell { background: var(--dark); }

.stat-num {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(32px, 3.5vw, 48px); line-height: 1;
  margin-bottom: 8px;
}
.stat-num.crimson { color: var(--crimson); }
.stat-num.blue { color: var(--blue); }
.stat-num.safe { color: var(--safe); }
.stat-num.gold { color: var(--gold); }

.stat-desc { font-size: 13px; line-height: 1.5; color: var(--text-2); }
.dark .stat-desc { color: var(--text-inv-2); }
.stat-src { font-size: 11px; color: var(--text-3); margin-top: 6px; font-style: italic; }

/* ── CARD GRID (loose, with gap) ── */
.card-grid { display: grid; gap: 16px; }
.card-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.card-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 768px) {
  .card-grid.cols-2, .card-grid.cols-3 { grid-template-columns: 1fr; }
}

/* ── CARDS — 0px radius, no shadow ── */
.card {
  padding: 24px; background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0;
}
.dark .card { background: var(--dark-raised); border-color: var(--border-dark); }
.card h3 { font-family: var(--sans); font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.dark .card h3 { color: var(--text-inv); }
.card p { font-size: 13px; line-height: 1.55; color: var(--text-2); }
.dark .card p { color: var(--text-inv-2); }

/* ── TAGS ── */
.tag {
  display: inline-block; font-family: var(--sans);
  font-size: 10px; font-weight: 600; letter-spacing: 1.5px;
  text-transform: uppercase; padding: 3px 8px; border-radius: 0;
}
.tag.crimson { background: var(--crimson-bg); color: var(--crimson); }
.tag.blue { background: var(--blue-bg); color: var(--blue); }
.tag.safe { background: var(--safe-bg); color: var(--safe); }
.tag.gold { background: var(--gold-bg); color: var(--gold); }

/* ── LEFT-BORDER CALLOUTS ── */
.callout {
  padding: 20px 24px; margin: 24px 0;
  border-left: 3px solid var(--border);
  background: transparent;
  font-size: 14px; line-height: 1.65;
}
.callout.crimson { border-left-color: var(--crimson); background: var(--crimson-bg); }
.callout.blue { border-left-color: var(--blue); background: var(--blue-bg); }
.callout.safe { border-left-color: var(--safe); background: var(--safe-bg); }
.callout.gold { border-left-color: var(--gold); background: var(--gold-bg); }
.callout h4 {
  font-family: var(--sans); font-size: 13px; font-weight: 700;
  margin-bottom: 6px; text-transform: uppercase; letter-spacing: 1px;
}
.callout.crimson h4 { color: var(--crimson); }
.callout.blue h4 { color: var(--blue); }
.callout.safe h4 { color: var(--safe); }
.callout.gold h4 { color: var(--gold); }
.callout p { color: var(--text-2); }
.dark .callout p { color: var(--text-inv-2); }

/* ── METHODOLOGY BOX (The Markup pattern) ── */
.method-box {
  border: 1px solid var(--border); padding: 24px; margin: 32px 0;
  background: var(--surface);
}
.dark .method-box { background: var(--dark-surface); border-color: var(--border-dark); }
.method-box h4 {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 12px;
}
.dark .method-box h4 { color: var(--text-inv-2); }

/* ── PULL QUOTE ── */
.pull-quote {
  padding: 32px 0; border-top: 2px solid var(--text);
  margin: 48px 0; max-width: 600px;
}
.dark .pull-quote { border-top-color: var(--text-inv); }
.pull-quote blockquote {
  font-family: var(--serif); font-size: clamp(20px, 2.5vw, 28px);
  line-height: 1.4; font-weight: 300; font-style: italic;
}
.pull-quote cite {
  display: block; margin-top: 12px; font-family: var(--sans);
  font-size: 12px; font-style: normal; font-weight: 500;
  letter-spacing: 0.5px; color: var(--text-2);
}
.dark .pull-quote cite { color: var(--text-inv-2); }

/* ── SPLITS ── */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.split.wide-left { grid-template-columns: 3fr 2fr; }
.split.wide-right { grid-template-columns: 2fr 3fr; }
@media (max-width: 768px) {
  .split, .split.wide-left, .split.wide-right { grid-template-columns: 1fr; gap: 32px; }
}

/* ── SUPPLY CHAIN FLOW ── */
.flow {
  display: flex; align-items: stretch; gap: 0;
  margin: 48px 0; flex-wrap: wrap;
}
.flow-step {
  flex: 1; min-width: 180px;
  padding: 28px 20px; position: relative;
  border-right: 1px solid var(--border);
}
.dark .flow-step { border-right-color: var(--border-dark); }
.flow-step:last-child { border-right: none; }
@media (max-width: 768px) {
  .flow { flex-direction: column; }
  .flow-step { border-right: none; border-bottom: 1px solid var(--border); }
  .dark .flow-step { border-bottom-color: var(--border-dark); }
  .flow-step:last-child { border-bottom: none; }
}
.flow-num {
  font-family: var(--serif); font-size: 40px; font-weight: 300;
  color: rgba(26, 29, 35, 0.06); position: absolute; top: 12px; right: 12px; line-height: 1;
}
.dark .flow-num { color: rgba(255, 255, 255, 0.04); }
.flow-step h4 {
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase;
  margin-bottom: 8px;
}
.flow-step p { font-size: 13px; line-height: 1.55; color: var(--text-2); }
.dark .flow-step h4 { color: var(--gold); }
.dark .flow-step p { color: var(--text-inv-2); }

/* ── TIMELINE ── */
.timeline { position: relative; padding-left: 24px; margin: 32px 0; }
.timeline::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px; background: var(--crimson);
}
.tl-item { padding: 0 0 28px 20px; position: relative; }
.tl-item::before {
  content: ''; position: absolute; left: -29px; top: 5px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--crimson); border: 2px solid var(--bg);
}
.dark .tl-item::before { border-color: var(--dark); }
.tl-item:last-child { padding-bottom: 0; }
.tl-date {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--crimson); margin-bottom: 2px;
}
.tl-title { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.tl-desc { font-size: 13px; line-height: 1.55; color: var(--text-2); }
.dark .tl-desc { color: var(--text-inv-2); }

/* ── BAR CHART ── */
.bar-chart { margin: 40px 0; }
.bar-row {
  display: grid; grid-template-columns: 130px 1fr 60px;
  align-items: center; gap: 12px; margin-bottom: 12px;
}
@media (max-width: 600px) { .bar-row { grid-template-columns: 90px 1fr 50px; } }
.bar-label { font-size: 13px; font-weight: 500; color: var(--text-2); text-align: right; }
.bar-track { height: 24px; background: var(--surface); overflow: hidden; }
.bar-fill {
  height: 100%; transition: width 1s var(--ease-out); width: 0;
}
.bar-fill.crimson { background: var(--crimson); }
.bar-fill.safe { background: var(--safe); }
.bar-fill.gold { background: var(--gold); }
.bar-value { font-family: var(--serif); font-size: 18px; font-weight: 300; }

/* ── PRICE TABLE ── */
.price-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 40px 0; }
.price-table thead th {
  font-family: var(--sans); font-size: 10px; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-3); padding: 10px 14px; text-align: left;
  border-bottom: 2px solid var(--border);
}
.price-table tbody td {
  padding: 14px; border-bottom: 1px solid var(--border); vertical-align: top;
}
.price-table .channel { font-weight: 600; color: var(--text); }
.price-table .price { font-family: var(--serif); font-size: 22px; font-weight: 300; }
.price-table .price.crimson { color: var(--crimson); }
.price-table .price.safe { color: var(--safe); }
.price-table .price.gold { color: var(--gold); }
.price-table .note { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.price-table .highlight-row { background: var(--safe-bg); }

/* ── PROVIDER CARDS ── */
.provider-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; margin: 40px 0;
}
.provider-grid .provider-card:first-child { grid-column: span 2; }
@media (max-width: 768px) {
  .provider-grid { grid-template-columns: 1fr; }
  .provider-grid .provider-card:first-child { grid-column: span 1; }
}
.provider-card {
  padding: 28px; background: var(--bg);
  border: 1px solid var(--border); border-radius: 0;
  transition: border-color 250ms var(--ease-quart);
}
.provider-card:hover { border-color: var(--safe); }
.provider-name { font-family: var(--sans); font-size: 18px; font-weight: 600; margin-bottom: 2px; }
.provider-type {
  font-size: 11px; font-weight: 600; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--safe); margin-bottom: 14px;
}
.provider-detail { font-size: 13px; color: var(--text-2); line-height: 1.5; margin-bottom: 6px; }
.provider-price {
  font-family: var(--serif); font-size: 28px; font-weight: 300;
  color: var(--safe); margin-top: 14px;
}
.provider-price span {
  font-family: var(--sans); font-size: 13px; color: var(--text-3); font-weight: 400;
}

/* ── INFO ROWS ── */
.info-row {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 0; border-bottom: 1px solid var(--border);
}
.dark .info-row { border-bottom-color: var(--border-dark); }
.info-row:last-child { border-bottom: none; }
.info-icon {
  flex-shrink: 0; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
}
.info-icon.crimson { background: var(--crimson-bg); color: var(--crimson); }
.info-icon.safe { background: var(--safe-bg); color: var(--safe); }
.info-icon.blue { background: var(--blue-bg); color: var(--blue); }
.info-icon.gold { background: var(--gold-bg); color: var(--gold); }

.info-content h4 { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.dark .info-content h4 { color: var(--text-inv); }
.info-content p { font-size: 13px; line-height: 1.55; color: var(--text-2); }
.dark .info-content p { color: var(--text-inv-2); }

/* ── ARGUMENT CARDS ── */
.argument {
  padding: 28px; margin-bottom: 20px;
  border-left: 3px solid var(--gold);
  background: var(--surface);
}
.dark .argument { background: var(--dark-raised); }
.argument .they-say {
  font-family: var(--serif); font-size: 20px; font-weight: 300;
  font-style: italic; margin-bottom: 14px;
}
.argument .reality { font-size: 14px; line-height: 1.65; color: var(--text-2); }
.dark .argument .reality { color: var(--text-inv-2); }
.argument .reality strong { font-weight: 600; }

/* ── DIVIDER ── */
hr { height: 1px; background: var(--border); border: none; margin: 0; }
.dark hr { background: var(--border-dark); }

/* ── SECTION NUMBER (ghost) ── */
.sec-num {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(80px, 10vw, 140px); line-height: 1;
  color: rgba(27, 58, 92, 0.04);
  position: absolute; right: 32px; top: 48px;
  pointer-events: none; user-select: none;
}
.dark .sec-num { color: rgba(255, 255, 255, 0.03); }

/* ── REVEAL ── */
.reveal {
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 80ms; }
.reveal-d2 { transition-delay: 160ms; }
.reveal-d3 { transition-delay: 240ms; }

/* ── FOOTER ── */
.footer { background: var(--dark); color: var(--text-inv-2); padding: 80px 32px 40px; }
.footer-inner { max-width: 1040px; margin: 0 auto; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; margin-bottom: 64px;
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }
.footer h3 {
  font-family: var(--serif); font-size: 24px; font-weight: 300;
  color: var(--text-inv); margin-bottom: 12px;
}
.footer p { font-size: 13px; line-height: 1.6; }
.footer-links { list-style: none; }
.footer-links li {
  font-size: 13px; padding: 5px 0;
  border-bottom: 1px solid var(--border-dark);
}
.footer-links li:last-child { border-bottom: none; }
.footer-links a { color: var(--text-inv-2); text-decoration: none; transition: color 150ms; }
.footer-links a:hover { color: var(--text-inv); }
.footer-bottom {
  padding-top: 24px; border-top: 1px solid var(--border-dark);
  font-size: 11px; display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; letter-spacing: 0.5px;
}

/* ── FTC DISCLOSURE ── */
.ftc-disclosure {
  font-size: 12px; line-height: 1.5; color: var(--text-3);
  padding: 12px 0; border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

/* ── ARTICLE LAYOUT ── */
.article-header { max-width: 680px; }
.article-body { max-width: 680px; }
.article-body p { font-size: 17px; line-height: 1.75; color: var(--text); margin-bottom: 24px; }
.article-body p strong { font-weight: 600; }
.article-body .lead { font-size: 19px; line-height: 1.7; color: var(--text-2); }

/* ── STICKY TOC (desktop) ── */
.toc-sidebar {
  position: sticky; top: 72px;
  font-size: 12px; line-height: 2;
}
.toc-sidebar a {
  display: block; color: var(--text-3); text-decoration: none;
  transition: color 150ms;
}
.toc-sidebar a:hover { color: var(--text); }

/* ── UTILITIES ── */
.max-w-sm { max-width: 480px; }
.max-w-md { max-width: 600px; }
.max-w-lg { max-width: 720px; }
.text-crimson { color: var(--crimson); }
.text-safe { color: var(--safe); }
.text-blue { color: var(--blue); }
.text-gold { color: var(--gold); }
.text-inv { color: var(--text-inv); }
.text-2 { color: var(--text-2); }
.text-3 { color: var(--text-3); }
.fw-300 { font-weight: 300; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
