/* GLP-1 price index — public-good microsite. Light + dark, editorial, trustworthy. */
:root {
  --bg: #F7F4EE; --surface: #FFFFFF; --surface-2: #FBF8F2;
  --ink: #23201C; --ink-2: #55504A; --muted: #7C766C; --faint: #A8A296;
  --border: #E6E0D4; --border-2: #D8D1C3;
  --accent: #AC4520; --accent-soft: #F4E7E0;
  --good: #3F7A4E; --good-soft: #E7F0E7; --warn: #B5701A;
  /* sequential price ramp (light -> dark = cheaper -> pricier) */
  --seq-0: #F1E7D8; --seq-1: #E4C09C; --seq-2: #D6996C; --seq-3: #C06B3C; --seq-4: #8F3E1B;
  --nodata: #E6E1D7;
  --shadow: 0 1px 2px rgba(40,37,29,.05), 0 6px 20px rgba(40,37,29,.04);
  --radius: 12px; --radius-sm: 8px;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17150F; --surface: #201D17; --surface-2: #262218;
    --ink: #F1ECE0; --ink-2: #CFC8BA; --muted: #A49C8D; --faint: #7C7566;
    --border: #353025; --border-2: #423C2F;
    --accent: #E07A4E; --accent-soft: #3A2A22;
    --good: #7FB98B; --good-soft: #23301F; --warn: #D79A4A;
    --seq-0: #5C4E38; --seq-1: #86653E; --seq-2: #AE7A45; --seq-3: #CE9053; --seq-4: #ECBE86;
    --nodata: #322D23;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
h1,h2,h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
a { color: var(--accent); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* Header */
header.site { border-bottom: 1px solid var(--border); background: var(--surface); }
.head-in { padding: 22px 0 20px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; }
.brandmark { font-family: var(--serif); font-weight: 600; font-size: 22px; letter-spacing: -.02em; }
.brandmark b { color: var(--accent); font-weight: 600; }
h1 { font-size: clamp(24px, 4vw, 34px); margin: 14px 0 6px; }
.lede { color: var(--ink-2); max-width: 62ch; font-size: 16px; margin: 0; }
.updated { color: var(--muted); font-size: 13px; margin-top: 8px; }
.updated b { color: var(--ink-2); font-weight: 600; }

/* info banner */
.notice {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px; font-size: 13px; color: var(--ink-2);
  margin: 18px 0 0; display: flex; gap: 10px;
}
.notice svg { flex: 0 0 auto; color: var(--accent); margin-top: 1px; }

/* Controls */
.controls { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; margin: 26px 0 8px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.forma { grid-column: span 12; }
.field.med { grid-column: span 5; }
.field.dose { grid-column: span 4; }
.field.uf { grid-column: span 3; }
label.lbl { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
select {
  appearance: none; width: 100%; background: var(--surface); color: var(--ink);
  border: 1px solid var(--border-2); border-radius: var(--radius-sm); padding: 11px 34px 11px 12px;
  font: inherit; font-size: 14px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237C766C' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}
select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button {
  font: inherit; font-size: 13px; font-weight: 500; padding: 9px 14px; cursor: pointer;
  background: var(--surface); color: var(--ink-2); border: 1px solid var(--border-2);
  border-radius: 100px; transition: all .12s ease;
}
.seg button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Layout */
.grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 24px; margin: 22px 0 40px; align-items: start; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.field { min-width: 0; }
.card-h { padding: 16px 18px 12px; border-bottom: 1px solid var(--border); }
.card-b { padding: 16px 18px; }
.prod-title { font-size: 19px; }
.prod-sub { color: var(--muted); font-size: 13px; margin-top: 4px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 100px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--border); }
.tag.status { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.tag.ind { background: var(--good-soft); color: var(--good); border-color: transparent; }
.offlabel { color: var(--warn); font-size: 12.5px; margin-top: 8px; display: flex; gap: 7px; }

/* ceiling banner */
.ceil { display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  background: var(--surface-2); border: 1px dashed var(--border-2); border-radius: var(--radius-sm);
  padding: 12px 14px; margin-bottom: 14px; }
.ceil .k { font-size: 12.5px; color: var(--muted); }
.ceil .v { font-family: var(--serif); font-size: 20px; font-weight: 600; }

/* price table */
.tscroll { overflow-x: auto; margin: 0 -4px; }
table.prices { width: 100%; border-collapse: collapse; min-width: 300px; }
table.prices th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--border); }
table.prices td { padding: 11px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.prices tr:last-child td { border-bottom: 0; }
.rank { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); color: var(--ink-2); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); }
tr.best .rank { background: var(--accent); color: #fff; border-color: var(--accent); }
.ph { font-weight: 600; font-size: 14px; }
.price { font-family: var(--serif); font-size: 17px; font-weight: 600; white-space: nowrap; }
.vs { font-size: 12px; color: var(--good); font-weight: 600; white-space: nowrap; }
.avail { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; }
.avail.yes { color: var(--good); } .avail.no { color: var(--accent); }
.nostreet { color: var(--muted); font-size: 13.5px; padding: 6px 2px; }

/* PR real / other chains */
.subsec { margin-top: 16px; }
.subsec h4 { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.pr-real { background: var(--good-soft); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13px; color: var(--ink-2); }
.pr-real b { font-family: var(--serif); color: var(--good); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12.5px; padding: 4px 10px; border-radius: 100px; border: 1px solid var(--border); background: var(--surface-2); color: var(--ink-2); }
.chip.live { border-color: var(--good); color: var(--good); }
.conf { font-size: 11.5px; color: var(--faint); margin-top: 7px; }

/* Map */
.map-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.map-modes { display: flex; gap: 4px; }
.map-modes button { font: inherit; font-size: 12px; font-weight: 600; padding: 6px 11px; border-radius: 100px; border: 1px solid var(--border-2); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.map-modes button[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
#map-holder { position: relative; margin-top: 6px; }
#map-holder svg { width: 100%; height: auto; display: block; }
.uf { fill: var(--nodata); stroke: var(--surface); stroke-width: 1; transition: fill .15s ease; cursor: pointer; }
.uf:hover { stroke: var(--ink); stroke-width: 1.5; }
.uf.sel { stroke: var(--ink); stroke-width: 2; }
.legend { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; margin-top: 10px; font-size: 11.5px; color: var(--muted); }
.legend .sw { width: 20px; height: 12px; border-radius: 2px; display: inline-block; }
.legend .ends { display: flex; justify-content: space-between; width: 100%; margin-top: 3px; }
.map-note { font-size: 12px; color: var(--muted); margin-top: 10px; line-height: 1.5; }
#tooltip { position: fixed; pointer-events: none; z-index: 50; background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 500; padding: 6px 9px; border-radius: 6px; opacity: 0; transition: opacity .1s; white-space: nowrap; }
#tooltip b { font-family: var(--serif); }

/* Methodology + footer */
.method { margin: 10px 0 40px; }
details.method-d { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 18px; margin-bottom: 12px; }
details.method-d summary { cursor: pointer; font-family: var(--serif); font-size: 17px; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.method-d summary::-webkit-details-marker { display: none; }
details.method-d summary::after { content: "+"; color: var(--muted); font-size: 22px; font-family: var(--sans); }
details.method-d[open] summary::after { content: "\2212"; }
details.method-d .md { padding: 0 0 18px; color: var(--ink-2); font-size: 14px; }
.method .md h4 { margin: 14px 0 4px; font-family: var(--sans); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.method .md ul { margin: 6px 0; padding-left: 20px; } .method .md li { margin: 4px 0; }

footer.site { border-top: 1px solid var(--border); background: var(--surface); color: var(--ink-2); font-size: 12px; line-height: 1.6; }
footer .foot-in { padding: 26px 0 40px; }
footer p { margin: 0 0 10px; max-width: 90ch; }
footer .legal { color: var(--muted); font-size: 11.5px; }

@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr; }
  .field.med, .field.dose, .field.uf { grid-column: span 12; }
}
