/* Layout: a civic campaign page. One column of reading width, with a wide hero "pharmacy shelf" of patch strengths, then actions as numbered steps. */
:root {
  --paper: #f5f3f8;
  --surface: #ffffff;
  --ink: #1d1530;
  --muted: #5e5672;
  --line: #ddd6e8;
  --accent: #a3195b;
  --accent-ink: #ffffff;
  --accent-soft: #f6e3ec;
  --violet: #4a3d7a;
  --patch: #efe4da;
  --patch-edge: #d8c6b6;
  --font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Public Sans", "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --step--1: 0.875rem; --step-0: 1.0625rem; --step-1: 1.3rem; --step-2: 1.7rem; --step-3: clamp(2.2rem, 6vw, 3.6rem);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #141020; --surface: #1d1830; --ink: #efeaf6; --muted: #aaa1bf; --line: #362e4d;
    --accent: #ef6aa6; --accent-ink: #1a0d14; --accent-soft: #3a1a2c; --violet: #b9adf0;
    --patch: #3a332f; --patch-edge: #5b4f47; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #141020; --surface: #1d1830; --ink: #efeaf6; --muted: #aaa1bf; --line: #362e4d;
  --accent: #ef6aa6; --accent-ink: #1a0d14; --accent-soft: #3a1a2c; --violet: #b9adf0;
  --patch: #3a332f; --patch-edge: #5b4f47; color-scheme: dark;
}
* { box-sizing: border-box; }
body { background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: var(--step-0); line-height: 1.6; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--paper); }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, textarea:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 1080px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.read { max-width: 68ch; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; text-wrap: balance; margin: 0; }
h2 { font-size: var(--step-2); font-weight: 700; }
h3 { font-size: var(--step-1); font-weight: 700; }
p { margin: 0; }
.eyebrow { font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.cite { font-size: var(--step--1); color: var(--muted); }

/* Top bar */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 10px; }
.brand { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 22px; height: 22px; border-radius: 5px; background: var(--patch); border: 1.5px solid var(--patch-edge); position: relative; }
.brand-mark::after { content: ""; position: absolute; inset: 5px; border-radius: 2px; background: var(--accent); }
.top nav { display: flex; gap: 16px; flex-wrap: wrap; font-size: var(--step--1); }
.top nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
.top nav a:hover { color: var(--accent); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 1rem/1 var(--font-body); padding: 14px 20px; border-radius: 999px; border: 2px solid var(--accent); text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn:hover { filter: brightness(1.06); }

/* Hero */
.hero { padding-block: 56px 40px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: var(--step-3); font-weight: 800; letter-spacing: -0.02em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { margin-top: 20px; font-size: 1.15rem; color: var(--muted); max-width: 52ch; }
.hero .ctas { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; }

/* The shelf: patch strengths, many out */
.shelf { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.shelf-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.shelf-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.slot { aspect-ratio: 1; max-width: 100%; border-radius: 9px; display: flex; align-items: flex-end; justify-content: center; padding: 6px; font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); position: relative; }
.slot.in { background: var(--patch); border: 1.5px solid var(--patch-edge); }
.slot.in::before { content: ""; position: absolute; inset: 22% 22% 38%; border-radius: 4px; border: 1px dashed var(--patch-edge); }
.slot.out { border: 1.5px dashed var(--line); background: repeating-linear-gradient(135deg, transparent 0 7px, var(--accent-soft) 7px 9px); }
.slot.out span { background: var(--surface); padding: 0 4px; border-radius: 3px; }
.shelf-key { margin-top: 14px; display: flex; gap: 16px; flex-wrap: wrap; font-size: var(--step--1); color: var(--muted); }
.shelf-key i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 6px; }
.shelf-note { margin-top: 12px; font-size: var(--step--1); color: var(--muted); }

/* Figures */
.figures { border-block: 1px solid var(--line); background: var(--surface); }
.figures .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.fig { padding: 26px 20px 24px; border-left: 1px solid var(--line); min-width: 0; }
.fig:first-child { border-left: 0; padding-left: 0; }
.fig b { display: block; font-family: var(--font-display); font-size: 2.1rem; font-weight: 800; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.fig .pill { display: inline-block; font-family: var(--font-mono); font-size: 0.8rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; padding: 6px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.fig p { margin-top: 10px; font-size: 0.95rem; }
.fig .cite { margin-top: 6px; }

/* Sections */
section.block { padding-block: 64px 8px; }
.sec-head { display: grid; gap: 10px; margin-bottom: 26px; }
.evidence { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 40px; }
.ev { padding-block: 18px; border-top: 1px solid var(--line); min-width: 0; }
.ev h3 { font-size: 1.1rem; }
.ev p { margin-top: 6px; color: var(--muted); }
.ev .cite { margin-top: 6px; }
.question { margin-top: 36px; padding: 28px; border-radius: 14px; background: var(--violet); color: var(--paper); }
.question p.big { font-family: var(--font-display); font-size: var(--step-2); font-weight: 700; line-height: 1.2; text-wrap: balance; }
.question p.small { margin-top: 14px; font-size: 0.95rem; opacity: 0.9; }
.question a { color: inherit; }

/* Asks timeline */
.asks { display: grid; gap: 0; border-left: 2px solid var(--line); margin-left: 8px; }
.ask { position: relative; padding: 4px 0 30px 28px; display: grid; grid-template-columns: 9.5rem 1fr; gap: 6px 24px; }
.ask::before { content: ""; position: absolute; left: -9px; top: 8px; width: 16px; height: 16px; border-radius: 50%; background: var(--paper); border: 3px solid var(--accent); }
.ask .when { font-family: var(--font-mono); font-size: 0.9rem; color: var(--accent); font-weight: 500; padding-top: 2px; }
.ask .what { min-width: 0; }
.ask .what p { margin-top: 6px; color: var(--muted); }

/* Actions */
.actions { display: grid; gap: 18px; }
.action { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; display: grid; grid-template-columns: 3rem 1fr; gap: 4px 16px; }
.action .num { font-family: var(--font-display); font-weight: 800; font-size: 2rem; line-height: 1; color: var(--accent); }
.action .body { min-width: 0; display: grid; gap: 12px; }
.action .body > p { color: var(--muted); }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: 600 0.95rem/1.2 var(--font-body); text-decoration: none; cursor: pointer; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
textarea { width: 100%; min-height: 230px; font: 0.95rem/1.55 var(--font-body); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 14px; resize: vertical; }
.status { font-size: var(--step--1); color: var(--accent); min-height: 1.2em; }
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.post { border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: var(--paper); display: grid; gap: 10px; align-content: space-between; min-width: 0; }
.post p { font-size: 0.95rem; }
.post .tag { font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.mono { font-family: var(--font-mono); font-size: 0.95rem; overflow-wrap: anywhere; user-select: all; }

/* Help */
.help { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.tip { padding: 18px 20px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); min-width: 0; }
.tip h3 { font-size: 1.05rem; }
.tip p { margin-top: 6px; color: var(--muted); font-size: 0.97rem; }
.callout { margin-top: 16px; padding: 14px 18px; border-radius: 10px; background: var(--accent-soft); color: var(--ink); font-size: 0.97rem; }

/* Sources */
.sources ol { margin: 0; padding-left: 1.3rem; display: grid; gap: 6px; font-size: 0.93rem; color: var(--muted); }
footer { margin-top: 64px; border-top: 1px solid var(--line); padding-block: 26px 40px; font-size: var(--step--1); color: var(--muted); }
footer .wrap { display: grid; gap: 6px; }

/* Shortage map + report form */
.map-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.map-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; min-width: 0; display: grid; gap: 18px; }
.map-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat b { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; line-height: 1; font-variant-numeric: tabular-nums; }
.stat span { display: block; margin-top: 6px; font-size: 0.82rem; color: var(--muted); line-height: 1.3; }
.tilemap-scroll { overflow-x: auto; }
.tilemap { display: grid; grid-template-columns: repeat(11, minmax(30px, 1fr)); grid-template-rows: repeat(8, auto); gap: 4px; min-width: 360px; }
.tile { aspect-ratio: 1; border-radius: 6px; border: 1px solid var(--line); background: var(--paper); color: var(--muted); font: 500 0.72rem/1 var(--font-mono); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; padding: 0; }
.tile small { font-size: 0.62rem; font-weight: 500; opacity: 0.9; }
.tile[aria-pressed="true"] { outline: 2.5px solid var(--ink); outline-offset: 1px; }
.legend { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 0.82rem; color: var(--muted); }
.legend .zero { width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--line); background: var(--paper); }
.legend .ramp { width: 120px; height: 10px; border-radius: 99px; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 25%, var(--surface)), var(--accent)); }
.state-detail { font-size: 0.95rem; padding: 12px 14px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); }
.map-status { font-size: 0.85rem; color: var(--muted); min-height: 1.2em; }
.report-form { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; display: grid; gap: 14px; min-width: 0; }
.report-form h3 { font-size: 1.15rem; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .field > legend { font-weight: 600; font-size: 0.92rem; padding: 0; }
.field .hint { font-size: 0.82rem; color: var(--muted); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.report-form select, .report-form input[type="text"], .report-form input[type="number"], .report-form input[type="month"] { width: 100%; font: 0.95rem/1.3 var(--font-body); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.report-form select:focus-visible, .report-form input:focus-visible { outline: 3px solid var(--violet); outline-offset: 1px; }
fieldset.field { border: 0; margin: 0; padding: 0; }
.radios { display: grid; gap: 6px; }
.radios label, .check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.93rem; cursor: pointer; }
.radios input, .check input { margin-top: 4px; accent-color: var(--accent); }
.report-form textarea { min-height: 110px; }
.form-msg { font-size: 0.9rem; min-height: 1.2em; color: var(--accent); }
.form-msg.err { color: var(--ink); background: var(--accent-soft); padding: 8px 10px; border-radius: 8px; }
.form-msg:empty { padding: 0; background: none; }
.mine { display: grid; gap: 6px; font-size: 0.88rem; }
.mine-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.mine-row span { min-width: 0; overflow-wrap: anywhere; }
.linkbtn { background: none; border: 0; color: var(--accent); font: 600 0.85rem var(--font-body); cursor: pointer; padding: 2px 4px; text-decoration: underline; text-underline-offset: 3px; }
.breakdowns { margin-top: 22px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.bd { min-width: 0; }
.bd h3 { font-size: 1rem; margin-bottom: 10px; }
.bar { display: grid; grid-template-columns: minmax(0, 1fr) 2.5rem; gap: 8px; align-items: center; font-size: 0.85rem; margin-bottom: 8px; }
.bar .lbl { grid-column: 1 / -1; color: var(--muted); }
.bar .track { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar .fill { height: 100%; background: var(--accent); border-radius: 99px; }
.bar .n { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.empty-note { font-size: 0.9rem; color: var(--muted); }

@media (max-width: 860px) {
  .map-layout { grid-template-columns: 1fr; }
  .breakdowns { grid-template-columns: 1fr; }
  .map-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .figures .wrap { grid-template-columns: repeat(2, 1fr); }
  .fig { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .fig:nth-child(-n+2) { border-top: 0; }
  .fig:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--line); }
  .posts { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .top nav { display: none; }
  .evidence, .help { grid-template-columns: 1fr; gap: 0; }
  .help { gap: 12px; }
  .ask { grid-template-columns: 1fr; }
  .action { grid-template-columns: 1fr; }
  .shelf-grid { gap: 7px; }
  .slot { font-size: 0.62rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .slot.out { animation: blink 3.2s ease-in-out infinite; }
  .slot.out:nth-child(3n) { animation-delay: 1.1s; }
  @keyframes blink { 50% { opacity: 0.55; } }
}

/* Standalone-site additions */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.report-form { position: relative; }
