/* GLP-1 Price Compare — design system
   Tokens: paper / panel / rule / ink (deep teal) / cobalt / verified / rise / amber
   Type: Instrument Serif for display and hero figures; Public Sans for everything else. */

:root {
  --paper: #ffffff;
  --panel: #f2f5f4;
  --panel-2: #e8eeec;
  --rule: #d6dedc;
  --ink: #143238;
  --ink-2: #4b6469;
  --ink-3: #5b757b;
  --cobalt: #1d4ed8;
  --cobalt-soft: #e6edfd;
  --verified: #0e7c4a;
  --verified-soft: #e2f3ea;
  --rise: #b3261e;
  --rise-soft: #fbe8e6;
  --amber: #8a5b00;
  --amber-soft: #fff1d6;
  --display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max: 1180px;
  --measure: 70ch;
  --radius: 6px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  font-feature-settings: "tnum" 1, "lnum" 1;
}
a { color: var(--cobalt); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; }
img, svg { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; color: var(--ink); }
h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2.2rem, 4.2vw, 3.4rem); letter-spacing: -0.005em; }
h2 { font-family: var(--display); font-weight: 400; font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin-top: 2.2rem; }
h3 { font-size: 1.15rem; font-weight: 600; margin-top: 1.6rem; }
p, ul, ol, dl { margin: 0 0 1rem; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.measure { max-width: var(--measure); }
.small { font-size: .9rem; color: var(--ink-2); }
.muted { color: var(--ink-3); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: .5rem .75rem; border-radius: var(--radius); }
.skip-link:focus { left: 12px; z-index: 100; }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); background: var(--paper); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 64px; }
.wordmark { display: inline-flex; align-items: baseline; gap: .55rem; color: var(--ink); text-decoration: none; }
.wordmark .mark { width: 22px; height: 22px; align-self: center; }
.wordmark .name { font-family: var(--display); font-size: 1.55rem; letter-spacing: -0.01em; }
.wordmark .tag { font-size: .8rem; color: var(--ink-3); }
.nav { display: flex; gap: 1.2rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-size: .95rem; font-weight: 500; padding: .25rem 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--ink); }
.menu-toggle { display: none; }

/* Status strip: the dataset version line */
.status-strip { background: var(--panel); border-bottom: 1px solid var(--rule); font-size: .88rem; color: var(--ink-2); }
.status-strip .wrap { display: flex; flex-wrap: wrap; gap: .25rem 1.75rem; padding-top: .45rem; padding-bottom: .45rem; }
.status-strip b { color: var(--ink); font-weight: 600; }

main { padding: 2.2rem 0 3rem; }
.breadcrumbs { font-size: .88rem; color: var(--ink-3); margin-bottom: 1.2rem; }
.breadcrumbs a { color: var(--ink-2); }
.breadcrumbs span { margin: 0 .5rem; }
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 64ch; margin-bottom: 1.2rem; }
.dateline { font-size: .9rem; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; margin-bottom: 1.6rem; }
.dateline span b { font-weight: 600; color: var(--ink); }

/* The answer block: a stamped statement */
.answer { border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.4rem 1.6rem 1.2rem; margin: 0 0 2rem; background: var(--paper); max-width: 60rem; }
.answer .asof { font-family: var(--display); font-size: 1.45rem; margin: 0 0 .5rem; }
.answer .asof b { font-weight: 400; color: var(--verified); }
.answer p { margin-bottom: .7rem; max-width: 72ch; }
.answer .basis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .8rem 1.4rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.answer .basis div { font-size: .9rem; color: var(--ink-2); }
.answer .basis strong { display: block; color: var(--ink); font-size: 1.05rem; font-weight: 600; }

/* Observation cards: the signature element. The number is the hero. */
.observations { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin: 0 0 2rem; }
.obs { border: 1px solid var(--rule); border-radius: var(--radius); padding: 1rem 1.1rem 1rem; background: var(--paper); display: flex; flex-direction: column; gap: .2rem; }
.obs .label { font-size: .88rem; color: var(--ink-2); }
.obs .figure { font-family: var(--display); font-size: clamp(2.4rem, 4vw, 3.2rem); line-height: 1; color: var(--ink); margin: .2rem 0 .1rem; }
.obs .figure small { font-family: var(--sans); font-size: .95rem; color: var(--ink-2); margin-left: .3rem; }
.obs .who { font-weight: 600; }
.obs .who a { color: var(--ink); }
.obs .basis { font-size: .86rem; color: var(--ink-2); }
.obs .stamp { display: flex; align-items: center; gap: .5rem; font-size: .82rem; color: var(--ink-2); margin-top: .4rem; }

/* Grade chips and freshness */
.grade { display: inline-flex; align-items: center; justify-content: center; width: 1.45rem; height: 1.45rem; border-radius: 4px; font-weight: 700; font-size: .78rem; border: 1px solid var(--rule); background: var(--panel); color: var(--ink); vertical-align: middle; }
.grade-A { background: var(--verified-soft); border-color: #bfe3cf; color: var(--verified); }
.grade-B { background: var(--cobalt-soft); border-color: #c3d3f7; color: var(--cobalt); }
.grade-C, .grade-D { background: var(--amber-soft); border-color: #f0d9a3; color: var(--amber); }
.grade-U { background: var(--panel-2); color: var(--ink-3); }
.fresh { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; color: var(--ink-2); white-space: nowrap; }
.fresh::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: var(--ink-3); }
.fresh-Fresh::before { background: var(--verified); }
.fresh-Recent::before { background: var(--cobalt); }
.fresh-Stale::before { background: var(--amber); }
.fresh-Expired::before { background: var(--rise); }
.chip { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .78rem; font-weight: 600; border: 1px solid var(--rule); background: var(--panel); color: var(--ink-2); vertical-align: middle; }
.chip-third { background: var(--amber-soft); color: var(--amber); border-color: #f0d9a3; }
.chip-flat { background: var(--verified-soft); color: var(--verified); border-color: #bfe3cf; }
.chip-brand { background: var(--cobalt-soft); color: var(--cobalt); border-color: #c3d3f7; }
.delta-down { color: var(--verified); font-weight: 600; white-space: nowrap; }
.delta-up { color: var(--rise); font-weight: 600; white-space: nowrap; }
.delta-none { color: var(--ink-3); }

/* Ledger tables */
.table-wrap { overflow-x: auto; margin: 0 0 1.6rem; border: 1px solid var(--rule); border-radius: var(--radius); }
table.ledger { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.ledger caption { text-align: left; padding: .8rem 1rem; font-size: .88rem; color: var(--ink-2); border-bottom: 1px solid var(--rule); caption-side: top; }
table.ledger th, table.ledger td { padding: .6rem .8rem; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
table.ledger th { position: sticky; top: 0; background: var(--panel); font-weight: 600; font-size: .82rem; color: var(--ink-2); white-space: nowrap; z-index: 1; }
table.ledger th.sortable { cursor: pointer; }
table.ledger th.sortable::after { content: " ↕"; color: var(--ink-3); font-size: .75rem; }
table.ledger th[aria-sort="ascending"]::after { content: " ↑"; color: var(--ink); }
table.ledger th[aria-sort="descending"]::after { content: " ↓"; color: var(--ink); }
table.ledger td.num, table.ledger th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.ledger td.num strong { font-weight: 600; }
table.ledger tr:last-child td { border-bottom: 0; }
table.ledger tbody tr:hover { background: #fafbfa; }
table.ledger .prov a { color: var(--ink); font-weight: 600; text-decoration: none; }
table.ledger .prov a:hover { text-decoration: underline; }
table.ledger .sub { display: block; font-size: .8rem; color: var(--ink-3); font-weight: 400; }
table.ledger .src a { color: var(--ink-2); font-size: .82rem; }
.table-note { font-size: .88rem; color: var(--ink-2); margin: -.8rem 0 1.6rem; }

/* Prose and sections */
.prose { max-width: var(--measure); }
.prose h2 { font-size: 1.5rem; }
.prose li { margin-bottom: .35rem; }
.prose dt { font-weight: 600; margin-top: .6rem; }
.prose dd { margin: 0 0 .4rem; color: var(--ink-2); }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2.5rem; align-items: start; }
.side { border-left: 1px solid var(--rule); padding-left: 1.4rem; font-size: .92rem; }
.side h3 { margin-top: 0; font-size: .95rem; }
.side ul { list-style: none; padding: 0; }
.side li { margin-bottom: .45rem; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.2rem; margin: 0 0 1.5rem; font-size: .95rem; max-width: 60rem; }
.facts dt { font-weight: 600; color: var(--ink-2); }
.facts dd { margin: 0; }
.notice { border: 1px solid var(--rule); border-left: 4px solid var(--amber); border-radius: var(--radius); padding: .8rem 1rem; margin: 0 0 1.5rem; font-size: .93rem; background: var(--paper); max-width: 60rem; }
.notice.ok { border-left-color: var(--verified); }
.notice.info { border-left-color: var(--cobalt); }
.faq details { border-top: 1px solid var(--rule); padding: .8rem 0; max-width: var(--measure); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: .6rem 0 0; color: var(--ink-2); }
.grid-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .8rem 1.5rem; padding: 0; list-style: none; margin: 0 0 1.5rem; }
.grid-links li { border-top: 1px solid var(--rule); padding-top: .6rem; }
.grid-links a { font-weight: 600; text-decoration: none; color: var(--ink); }
.grid-links a:hover { text-decoration: underline; }
.grid-links .small { display: block; margin-top: .15rem; }
.definition { border-top: 1px solid var(--rule); padding: .7rem 0; max-width: var(--measure); }
.definition b { display: block; }
.btn { display: inline-block; padding: .55rem .95rem; border: 1px solid var(--ink); border-radius: var(--radius); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .92rem; background: var(--paper); }
.btn:hover { background: var(--panel); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #0f2a2f; }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0 1.5rem; }
form.corrections { max-width: 40rem; display: grid; gap: .8rem; }
form.corrections label { font-weight: 600; font-size: .92rem; }
form.corrections input, form.corrections textarea, form.corrections select { width: 100%; padding: .55rem .7rem; border: 1px solid var(--rule); border-radius: var(--radius); font: inherit; font-size: .95rem; }
code, pre { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .88em; }
pre { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); padding: .9rem 1rem; overflow-x: auto; }

/* Home */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 2.5rem; align-items: start; margin-bottom: 2rem; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); margin-bottom: .6rem; }
.hero .lede { font-size: 1.2rem; }
.hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; }
.stat { border-top: 2px solid var(--ink); padding-top: .5rem; }
.stat .n { font-family: var(--display); font-size: 2.2rem; line-height: 1; }
.stat .l { font-size: .86rem; color: var(--ink-2); }
.medlinks { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin: 1.5rem 0 2.5rem; }
.medlink { border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.1rem 1.2rem; text-decoration: none; color: var(--ink); display: block; }
.medlink:hover { border-color: var(--ink); }
.medlink b { font-family: var(--display); font-size: 1.5rem; font-weight: 400; display: block; margin-bottom: .2rem; }
.medlink span { color: var(--ink-2); font-size: .92rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); background: var(--panel); padding: 2.2rem 0 2.5rem; font-size: .9rem; color: var(--ink-2); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1.5rem 2rem; margin-bottom: 1.8rem; }
.footer-grid h4 { font-size: .85rem; margin-bottom: .5rem; color: var(--ink); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: .3rem; }
.footer-grid a { color: var(--ink-2); text-decoration: none; }
.footer-grid a:hover { text-decoration: underline; }
.footer-legal p { max-width: 90ch; margin-bottom: .6rem; }

@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
  .side { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 1rem; }
  .hero { grid-template-columns: 1fr; }
  .site-header .wrap { flex-wrap: wrap; align-items: center; }
  .menu-toggle { display: inline-block; background: none; border: 1px solid var(--rule); border-radius: var(--radius); padding: .4rem .7rem; font: inherit; }
  .nav { display: none; width: 100%; flex-direction: column; gap: .2rem; padding-bottom: .8rem; }
  .nav[data-open="true"] { display: flex; }
  .facts { grid-template-columns: 1fr; gap: .1rem .5rem; }
  .facts dt { margin-top: .5rem; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
@media print { .site-header, .site-footer, .status-strip, .side { display: none; } }
.fresh-Unknown::before { background: var(--ink-3); }

/* ---------- expansion: tools + ask ---------- */
.calc{background:var(--panel,#f6f4ef);border:1px solid var(--line,#d9d4c8);border-radius:10px;padding:1rem 1.1rem;margin:1.1rem 0}
.calc label{display:block;font-weight:600;margin:.65rem 0 .25rem;font-size:.95rem}
.calc select,.calc input[type=number],.calc input[type=search]{width:100%;max-width:34rem;padding:.55rem .6rem;border:1px solid var(--line,#c9c3b5);border-radius:8px;background:#fff;font:inherit}
.calc .facts{margin-top:.9rem}
.chips{display:flex;flex-wrap:wrap;gap:.4rem;margin-top:.9rem}
.chip{border:1px solid var(--line,#c9c3b5);background:#fff;border-radius:999px;padding:.35rem .7rem;font:inherit;font-size:.85rem;cursor:pointer;text-align:left}
.chip:hover,.chip:focus{border-color:#143238;outline:none}
#ask-out section.prose{margin-top:.9rem}
