:root {
  --accent: #0f766e;        /* teal: not used by the indigenous/imported encoding */
  --accent-wash: #e6f5f2;
  --accent-soft: #99e2d0;
  --bg: #f3faf8;
  --panel: #fff;
  --ink: #16181d;
  --ink-soft: #5b6472;
  --line: #d9dce2;

  --indigenous: #b91c1c;   /* acquired in the US */
  --imported:   #1d4ed8;   /* acquired abroad */
  --nodata:     #b9bfc9;   /* a flag, not a number — never reads as zero */
  --grid:       #e9ebef;
}
* { box-sizing: border-box; }
body { margin:0; background:var(--bg); color:var(--ink);
  font:15px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
a { color:#1d4ed8; }

header { background:var(--panel); border-bottom:1px solid var(--line); padding:14px 20px 12px; }
h1 { font-size:19px; margin:0 0 2px; letter-spacing:-.01em; }
.tagline { color:var(--ink-soft); font-size:13px; margin:0 0 10px; }

/* Permanent, not dismissible. */
.banner { display:flex; flex-wrap:wrap; gap:6px 18px; padding:9px 12px; font-size:12.5px;
  border:1px solid var(--line); border-radius:6px; background:#fbfbfa; color:var(--ink-soft); }
.banner strong { color:var(--ink); font-weight:600; }
.banner .wide { flex-basis:100%; }

/* The route to CDC is on the screen, not buried in About. */
.cdc { margin-top:8px; padding:10px 12px; font-size:13px; border-radius:6px;
  background:#fef3c7; border:1px solid #d9a441; }

main { max-width:1100px; margin:0 auto; padding:20px; }
section { background:var(--panel); border:1px solid var(--line); border-radius:8px;
  padding:18px; margin-bottom:18px; }
h2 { font-size:15px; margin:0 0 4px; }
.sub { color:var(--ink-soft); font-size:12.5px; margin:0 0 14px; }

.controls { display:flex; gap:14px; flex-wrap:wrap; align-items:flex-end; margin-bottom:14px; }
label { display:block; font-size:12px; color:var(--ink-soft); margin-bottom:4px; }
select { padding:6px 8px; border:1px solid var(--line); border-radius:5px; background:#fff;
  font:inherit; font-size:13.5px; }

.legend { display:flex; gap:16px; flex-wrap:wrap; font-size:12.5px; margin-top:10px; }
.swatch { display:inline-block; width:12px; height:12px; border-radius:2px; vertical-align:-1px; margin-right:5px; }

table { border-collapse:collapse; width:100%; font-size:13.5px; }
th,td { text-align:left; padding:7px 10px; border-bottom:1px solid var(--line); }
th { font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:var(--ink-soft);
  font-weight:600; white-space:nowrap; }
/* Numeric headers must follow their values, or a right-aligned figure sits under
   nothing and reads as misaligned. */
th.num, td.num { text-align:right; }
td.num { font-variant-numeric:tabular-nums; }
tr:hover td { background:#fafbfc; }
.wrap { overflow-x:auto; }

/* A flag is not a number and must not look like one. min-width keeps a one-character
   flag ('-') a pill rather than collapsing into a disc. */
.flag { display:inline-block; min-width:2.4em; text-align:center; font-size:11px;
  padding:1px 7px; border-radius:999px; background:#eef0f3;
  border:1px dashed var(--nodata); color:var(--ink-soft);
  font-family:ui-monospace, SFMono-Regular, Menlo, monospace; cursor:help; }
.zero { color:var(--ink-soft); }

.note { font-size:12px; color:var(--ink-soft); margin:8px 0 0; }
footer { padding:16px 20px; font-size:12.5px; color:var(--ink-soft);
  border-top:1px solid var(--line); background:var(--panel); }


/* ---- the disease picker ---------------------------------------------------
   This control changes everything else on the page, so it is styled to look like
   the primary control rather than like body text. */
.picker { display:flex; gap:14px; flex-wrap:wrap; align-items:flex-end;
  background:var(--accent-wash); border:1px solid var(--accent-soft);
  border-radius:10px; padding:14px 16px; margin:0 0 16px; }
.picker .field { flex:1 1 340px; min-width:0; }
.picker .field.year { flex:0 0 130px; }
.picker label { display:block; font-size:11px; text-transform:uppercase;
  letter-spacing:.07em; font-weight:700; color:var(--accent); margin-bottom:6px; }
.picker select {
  width:100%; font-size:16px; font-weight:600; color:var(--ink);
  padding:11px 12px; background:#fff;
  border:2px solid var(--accent); border-radius:8px;
  box-shadow:0 1px 2px rgba(15,23,42,.08); cursor:pointer;
}
.picker select:hover { background:#fbfefd; }
.picker select:focus-visible { outline:3px solid var(--accent-soft); outline-offset:1px; }
.picker .hint { flex-basis:100%; font-size:12px; color:var(--ink-soft); margin:0; }

/* The selected condition is the headline, so it carries the weight. */
h2.title { display:block; border-bottom:2px solid var(--accent-soft);
  padding-bottom:9px; margin-bottom:6px; }
h2.title .name { display:block; font-size:23px; font-weight:700; letter-spacing:-.02em;
  color:var(--ink); line-height:1.2; }
h2.title .rest { display:block; font-size:13px; font-weight:500; color:var(--ink-soft);
  margin-top:3px; }

/* ---- shared panel / legend / badge / stat treatment ---------------------- */

/* Section labels get the atlas accent as a rule, so panels read as panels. */
h2 { display:flex; align-items:center; gap:8px; padding-bottom:7px;
     border-bottom:2px solid var(--accent-soft); }

.legend-box { background:var(--accent-wash); border:1px solid var(--line);
  border-radius:8px; padding:12px 14px; margin-top:12px; }
.legend-box .legend-title { font-size:11px; text-transform:uppercase; letter-spacing:.07em;
  font-weight:650; color:var(--ink-soft); margin-bottom:9px; }

/* Headline figures, so the numbers are not buried in a sentence. */
.stats { display:flex; gap:12px; flex-wrap:wrap; margin:2px 0 12px; }
.stat { flex:1 1 150px; background:var(--panel); border:1px solid var(--line);
  border-left:4px solid var(--accent); border-radius:8px; padding:10px 13px; }
.stat .n { display:block; font-size:23px; font-weight:650; letter-spacing:-.02em;
  font-variant-numeric:tabular-nums; line-height:1.15; }
.stat .k { display:block; font-size:11.5px; color:var(--ink-soft); margin-top:3px; }
.stat .k em { font-style:normal; color:var(--ink); }
.stat.muted { border-left-color:var(--line); }

/* Disease-atlas specifics. */
.flag { font-weight:600; }
.legend .swatch { box-shadow:0 0 0 1px rgba(0,0,0,.08); }
thead th { background:var(--accent-wash); }

/* ---- shared atlas nav (kept identical in both repos) ---------------------- */
.atlas-nav {
  display:flex; align-items:center; gap:4px; flex-wrap:wrap;
  padding:8px 20px; background:#161b26; color:#e8eaee; font-size:13px;
  border-bottom:3px solid var(--accent);
}
.atlas-nav .brand { font-weight:650; letter-spacing:-.01em; color:#fff;
  margin-right:14px; text-decoration:none; }
.atlas-nav a { display:inline-flex; align-items:center; gap:7px; color:#c3c9d4;
  text-decoration:none; padding:5px 11px; border-radius:6px; }
.atlas-nav a:hover { background:#242b3a; color:#fff; }
.atlas-nav a.active { background:var(--accent); color:#fff; }
.atlas-nav .ico { width:15px; height:15px; flex:none; }
.atlas-nav .sep { flex:1; }
.atlas-nav .disclaimer { color:#97a0b0; font-size:11.5px; }
@media (max-width:820px) { .atlas-nav .disclaimer { display:none; } }

/* The page header carries the atlas accent so you always know which one you are in. */
header { border-top:0; box-shadow:inset 0 3px 0 var(--accent-soft); }
h1 { display:flex; align-items:center; gap:9px; }
h1 .ico { width:20px; height:20px; color:var(--accent); flex:none; }

/* Data-age warning. Escalates rather than sitting quietly. */
.stale { margin-top:8px; padding:10px 12px; border-radius:6px; font-size:13px;
  background:#fef3c7; border:1px solid #d9a441; color:#4a3708; }
.stale.bad { background:#fee2e2; border-color:#dc7c7c; color:#5c1a1a; }
.stale:empty { display:none; }

/* ---- accessibility --------------------------------------------------------
   A skip link, because every page starts with a nav bar and a banner; without
   one, a keyboard or screen-reader user traverses them on every page. */
.skip { position:absolute; left:-9999px; top:0; z-index:100;
  background:var(--accent); color:#fff; padding:10px 16px; border-radius:0 0 6px 0;
  font-size:14px; font-weight:600; text-decoration:none; }
.skip:focus { left:0; }

/* A visible focus ring everywhere, not only on the controls that got one by hand. */
a:focus-visible, button:focus-visible, select:focus-visible,
input:focus-visible, [tabindex]:focus-visible {
  outline:3px solid var(--accent); outline-offset:2px; border-radius:3px;
}

/* ---- small screens -------------------------------------------------------- */
@media (max-width: 640px) {
  header { padding: 12px 14px 10px; }
  main { padding: 14px; }
  section { padding: 14px; }
  .banner { font-size: 12px; }
  .picker { padding: 12px; }
  .picker .field.year { flex: 1 1 100%; }
  select { min-height: 44px; }
  .atlas-nav a { padding: 9px 11px; }
  .stats { gap: 8px; }
  .stat { flex: 1 1 100%; }
}

/* Flag key under the jurisdiction table. */
dl.flagkey { display:grid; grid-template-columns:auto 1fr; gap:6px 12px; margin:8px 0 0;
  align-items:start; }
dl.flagkey dt { margin:0; }
dl.flagkey dd { margin:0; font-size:12.5px; color:var(--ink-soft); line-height:1.45; }
@media (max-width:640px) { dl.flagkey { grid-template-columns:1fr; gap:2px 0; }
  dl.flagkey dd { margin-bottom:8px; } }

/* The corrections route, in every footer. A site asking to be held to account should
   not make being told a scavenger hunt. */
a.correct { font-weight: 600; }

/* ---- warmth ----------------------------------------------------------------
   Chrome only. The indigenous/imported encoding and the flag styling are
   meaning-bearing and are left exactly as they were. */
body { background:
    linear-gradient(180deg, #e4f4f0 0%, rgba(228,244,240,0) 420px),
    var(--bg); }

header { background: linear-gradient(180deg, #ffffff 0%, #f5fcfa 100%); }

section { background: linear-gradient(180deg, #ffffff 0%, #fbfefd 100%);
          box-shadow: 0 1px 2px rgba(15,118,110,.05); }
thead th { background: var(--accent-wash); }
table tbody tr:nth-child(even) td { background: rgba(15,118,110,.022); }
.banner { background: linear-gradient(180deg,#fbfefd 0%, #f1fbf8 100%);
          border-color: var(--accent-soft); }
