/* hantavirus.one — design system
   News-broadsheet style. Off-white paper, serif headlines, monospace numbers.
   Single accent color. Hairlines as dividers. No cards, no shadows, no gradients.
*/

:root {
  /* paper */
  --paper: #faf8f4;
  --paper-edge: #f3efe7;

  /* ink */
  --ink: #1a1a1a;
  --ink-soft: #4a4a4a;
  --ink-faint: #8a8580;
  --hairline: rgba(26, 26, 26, 0.18);
  --hairline-strong: rgba(26, 26, 26, 0.4);

  /* accent (deep ink blue) */
  --accent: #1a3a52;
  --accent-soft: #3a607c;
  --accent-bg: #e8eef3;

  /* status (used sparingly, for risk-level callouts only) */
  --status-low: #2c5d3f;
  --status-low-bg: #e8efe9;
  --status-elevated: #8b6914;
  --status-elevated-bg: #f4ecd4;
  --status-high: #8b3a2a;
  --status-high-bg: #f4dcd4;

  /* Map severity palette — three distinct hues, semantic alarm scale.
     Red = confirmed (highest concern), yellow = suspected (warning),
     warm grey = monitoring-only (no impact yet). Hover lifts to brand blue. */
  --map-confirmed: #b03a2e;   /* warm broadsheet red, not fluoro */
  --map-suspected: #d4a541;   /* golden amber, clearly different hue */
  --map-monitoring: #d8d3c8;  /* warm grey, sits on paper */

  /* type */
  --serif: ui-serif, "Charter", "Iowan Old Style", "Source Serif Pro", "Cambria", Georgia, serif;
  --sans:  ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono:  ui-monospace, "SF Mono", "Cascadia Mono", "JetBrains Mono", "Roboto Mono", "Consolas", monospace;

  /* size scale (rem-based) */
  --fs-display:  clamp(2.6rem, 5.5vw, 4.5rem);
  --fs-h1:       clamp(1.6rem, 3vw, 2.25rem);
  --fs-h2:       clamp(1.25rem, 2vw, 1.5rem);
  --fs-h3:       1.1rem;
  --fs-body:     1.0625rem;   /* 17px */
  --fs-small:    0.875rem;
  --fs-tiny:     0.75rem;

  /* spacing */
  --col-max:     1100px;
  --prose-max:   680px;

  /* radii (we don't really use any, but keep token consistent) */
  --r: 0;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--serif);
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: "kern" 1, "liga" 1;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--col-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

@media (min-width: 768px) {
  main { padding: 0 2rem; }
}

/* ---------- typography ---------- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.display {
  font-size: var(--fs-display);
  line-height: 1.0;
  letter-spacing: -0.025em;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 600; }

p { margin: 0 0 1em; max-width: var(--prose-max); }
p.lede { font-size: 1.15rem; color: var(--ink-soft); }

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:hover { color: var(--ink); }

ul, ol { padding-left: 1.25rem; margin: 0 0 1em; }
li { margin-bottom: 0.35em; }

/* mono utility */
.mono, time, .num, .iso {
  font-family: var(--mono);
  font-feature-settings: "tnum" 1;
  font-variant-numeric: tabular-nums;
}

.label {
  font-family: var(--mono);
  font-size: var(--fs-tiny);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.dateline {
  font-family: var(--mono);
  font-size: var(--fs-tiny);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--hairline-strong);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .inner {
  max-width: var(--col-max);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

@media (min-width: 768px) {
  .site-header .inner { padding: 0.9rem 2rem; }
}

.site-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.015em;
}
.site-header .brand-glyph {
  width: 1.4em;
  height: 1.4em;
  color: var(--accent);
  flex-shrink: 0;
  display: block;
}
.site-header .brand:hover .brand-glyph,
.site-header .brand:focus-visible .brand-glyph {
  color: var(--ink);
}
.site-header .brand-text {
  display: inline-block;
}
.site-header .brand .dot { color: var(--accent); }

.site-header nav {
  display: flex;
  gap: 1.25rem;
  align-items: baseline;
  font-family: var(--mono);
  font-size: var(--fs-tiny);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  flex-wrap: wrap;
}

.site-header nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.35rem 0;
}
.site-header nav a:hover { color: var(--accent); }

@media (max-width: 600px) {
  .site-header .inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
  }
  .site-header nav {
    gap: 0.85rem;
    font-size: 0.7rem;
  }
}

/* ---------- masthead (page title block) ---------- */

.masthead {
  text-align: center;
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 2rem;
}

.masthead .dateline { display: block; margin-bottom: 0.75rem; }
.masthead h1 { font-family: var(--serif); }
.masthead .tagline {
  margin-top: 0.5rem;
  color: var(--ink-soft);
  font-style: italic;
  max-width: 50ch;
  margin-left: auto;
  margin-right: auto;
}

/* On narrow phones (≤480px) the longest H1 ("MV Hondius hantavirus outbreak"
   = 30 chars) wraps to 3 lines at the default --fs-display floor (2.6rem).
   Drop the masthead H1 to a 2rem floor on mobile so every page H1 lands in
   1-2 lines max. Brand display (.brand-display) and article H1 are NOT
   affected — this only retunes the masthead heading. */
@media (max-width: 480px) {
  .masthead h1.display {
    font-size: 2rem;
  }
}

/* ---------- hero (photo + stats) ---------- */

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  border-top: 1px solid var(--hairline-strong);
  border-bottom: 1px solid var(--hairline-strong);
  padding: 1.5rem 0 1.75rem;
  margin: 0 0 2.5rem;
}
@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.1fr 1fr;
    gap: 2.25rem;
    align-items: start;  /* counters block lines up with the top of the lead photo, no dead space above */
  }
}

/* Lead news story card: photo + outlet/date + headline, all clickable. */
.hero-lead {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.hero-lead-card {
  display: block;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: transform 120ms ease;
}
.hero-lead-card:hover,
.hero-lead-card:focus-visible {
  outline: none;
}
.hero-lead-card:hover .hero-lead-headline,
.hero-lead-card:focus-visible .hero-lead-headline {
  color: var(--accent);
}
.hero-lead-card:hover .hero-lead-cta,
.hero-lead-card:focus-visible .hero-lead-cta {
  color: var(--accent);
}
.hero-lead-card:hover .cta-arrow {
  transform: translateX(3px);
}

.hero-lead-photo {
  margin: 0;
}
.hero-lead-photo img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--hairline);
  background: var(--paper-edge);
  transition: filter 120ms ease;
}
.hero-lead-card:hover .hero-lead-photo img {
  filter: brightness(0.96);
}

.hero-lead-meta {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-top: 0.7rem;
  font-family: var(--mono);
  font-size: var(--fs-tiny);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.hero-lead-source {
  font-weight: 700;
  color: var(--accent);
}
.hero-lead-source[data-outlet="aljazeera"] { color: #fa9907; }
.hero-lead-source[data-outlet="cnn"]       { color: #cc0000; }
.hero-lead-source[data-outlet="nbcnews"]   { color: #6460aa; }
.hero-lead-source[data-outlet="cbsnews"]   { color: #0066cc; }
.hero-lead-source[data-outlet="washingtonpost"] { color: #000; }
.hero-lead-source[data-outlet="npr"]       { color: #1a1a1a; }
.hero-lead-source[data-outlet="time"]      { color: #d40000; }
.hero-lead-source[data-outlet="abcnews"]   { color: #0033a0; }
.hero-lead-source[data-outlet="pbs"]       { color: #002f6c; }
.hero-lead-source[data-outlet="rte"]       { color: #00833f; }
.hero-lead-source[data-outlet="unnews"]    { color: #009edb; }
.hero-lead-source[data-outlet="ukhsa"]     { color: #003078; }
.hero-lead-source[data-outlet="foxnews"]   { color: #003366; }

.hero-lead-sep { color: var(--ink-faint); }
.hero-lead-date { color: var(--ink-faint); }

.hero-lead-headline {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0.25rem 0 0.45rem;
  transition: color 120ms ease;
  max-width: 28ch;
}

.hero-lead-cta {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  font-family: var(--mono);
  font-size: var(--fs-tiny);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color 120ms ease;
}
.hero-lead-cta .cta-arrow {
  transition: transform 120ms ease;
}

/* "More from CNN, NBC..." anchor below the lead card */
.hero-lead-more {
  display: inline-block;
  margin-top: 0.45rem;
  padding: 0.5rem 0;
  font-family: var(--mono);
  font-size: var(--fs-tiny);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  border-top: 1px dashed var(--hairline);
  border-bottom: 1px dashed var(--hairline);
}
.hero-lead-more strong {
  color: var(--ink);
  font-weight: 700;
}
.hero-lead-more:hover,
.hero-lead-more:focus-visible {
  color: var(--accent);
  outline: none;
}
.hero-lead-more:hover strong {
  color: var(--accent);
}

.hero-stats {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Used when the counter block is dropped into a flow (e.g. /map.html under
   the legend) instead of sitting in the homepage hero grid. Adds breathing
   room above so it doesn't collide with the previous block, and drops
   per-counter severity colour coding — on the map page the legend already
   uses red/yellow/grey for case status, so colouring "deaths" red would
   collide semantically with the legend's "confirmed cases = red". */
.hero-stats--standalone {
  margin: 2rem 0 1rem;
}
.hero-stats--standalone .counter { color: var(--ink); }
.hero-stats--standalone .counter::before { background: var(--hairline-strong); opacity: 1; }

/* 4 equal-size counters; mobile 2x2, desktop 2x2 within hero column,
   single row when stacked above narrow hero. */
.hero-counters {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--hairline-strong);
  border-bottom: 1px solid var(--hairline-strong);
}
@media (min-width: 1100px) {
  .hero-counters { grid-template-columns: repeat(4, 1fr); }
}

.counter {
  padding: 1rem 0.85rem 0.85rem;
  border-right: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  position: relative;
}
.counter:nth-child(2n) { border-right: none; }
.counter:nth-last-child(-n+2) { border-bottom: none; }
@media (min-width: 1100px) {
  .counter { border-bottom: none; padding: 1.2rem 1rem 1rem; }
  .counter:nth-child(2n) { border-right: 1px solid var(--hairline); }
  .counter:last-child { border-right: none; }
}

/* Top accent strip = colour-coded severity */
.counter::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: currentColor;
  opacity: 0.85;
}

.counter-num {
  font-family: var(--mono);
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: currentColor;
  font-variant-numeric: tabular-nums;
}
.counter-lbl {
  font-family: var(--mono);
  font-size: var(--fs-tiny);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 0.15rem;
}

/* Severity colour coding */
.counter--deaths    { color: var(--status-high); }     /* rust red */
.counter--confirmed { color: var(--accent); }          /* deep ink blue */
.counter--suspected { color: var(--status-elevated); } /* amber */
.counter--countries { color: var(--ink-soft); }        /* neutral graphite */

.hero-meta,
.hero-risk {
  font-family: var(--serif);
  font-size: var(--fs-small);
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.5;
}
.hero-meta strong { color: var(--ink); font-weight: 700; }
.hero-meta-sub {
  font-family: var(--mono);
  font-size: var(--fs-tiny);
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}
.hero-risk strong { color: var(--ink); }
.hero-risk a {
  color: var(--ink-soft);
  text-decoration: underline dotted;
  font-family: var(--mono);
  font-size: var(--fs-tiny);
  letter-spacing: 0.04em;
}

/* ---------- home page mini map ---------- */

.home-map {
  margin: 0 0 2.5rem;
  border-top: 1px solid var(--hairline-strong);
  padding-top: 1rem;
}
.home-map h2 {
  margin-bottom: 0.4rem;
}

/* Interactive inline SVG map (homepage and /map) */
.map-wrap-interactive {
  position: relative;
  margin-top: 0.85rem;
  background: var(--paper-edge);
  border: 1px solid var(--hairline);
  padding: 0.5rem;
  overflow: hidden;
}
.map-wrap-interactive svg.world-map--interactive {
  width: 100%;
  height: auto;
  display: block;
  max-height: 420px;
}
.map-wrap-interactive--large svg.world-map--interactive {
  max-height: 600px;
}
.map-wrap-interactive svg.world-map--interactive .sphere {
  fill: none;
  stroke: var(--hairline);
}
.map-wrap-interactive svg.world-map--interactive path {
  fill: #efebe2;
  stroke: var(--hairline-strong);
  stroke-width: 0.4;
  transition: fill 120ms ease, transform 120ms ease;
}
/* Map severity palette — three distinct hues. Red = confirmed,
   yellow = suspected, warm grey = monitoring-only. Hover lifts to brand
   blue (--accent) so the interactive feedback contrasts against all three
   base fills regardless of severity level. */
.map-wrap-interactive svg.world-map--interactive path.confirmed {
  fill: var(--map-confirmed);
  cursor: pointer;
}
.map-wrap-interactive svg.world-map--interactive path.suspected {
  fill: var(--map-suspected);
  cursor: pointer;
}
.map-wrap-interactive svg.world-map--interactive path.monitoring {
  fill: var(--map-monitoring);
  cursor: pointer;
}
.map-wrap-interactive svg.world-map--interactive path[data-name]:hover,
.map-wrap-interactive svg.world-map--interactive path[data-name]:focus {
  fill: var(--accent);  /* brand blue — distinct from all three severity hues */
  outline: none;
  stroke: var(--ink);
  stroke-width: 1;
}
.home-map .world-map-legend {
  margin-top: 0.7rem;
}

/* ---------- map count bubbles (only on /map.html) ----------
   HTML overlay (not <text> in SVG) so the font-size doesn't scale with the
   SVG viewBox — guarantees a readable label at any viewport. Position is %
   from the wrapper, which has the same 2:1 aspect-ratio as the viewBox so
   the bubble sits exactly over its country. */
.map-wrap-interactive--with-bubbles {
  position: relative;
  /* Lock wrapper aspect to the cropped SVG viewBox (750×500 = 3:2) so
     bubble % coordinates land on the right path. Crop trims empty Pacific
     edges, giving mobile users a +50% taller map at the same width
     vs the original 2:1 frame. */
  aspect-ratio: 3 / 2;
  max-height: 600px;
  /* Center the SVG inside the wrapper so its bounds match the bubble layer. */
  display: grid;
  place-items: center;
}
.map-wrap-interactive--with-bubbles svg.world-map--interactive {
  width: 100%;
  height: 100%;
  max-height: 100%;
}
.map-bubble {
  position: absolute;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  /* Mobile-first: 22px is the minimum that fits a 2-digit number with the
     mono font at 11px and still has comfortable click hit area (≥24 with
     ring). Counts ≥10 get a pill via :is variant below. */
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--map-confirmed);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 1px rgba(26, 26, 26, 0.18);
  cursor: pointer;
  z-index: 5;
  /* Reset default <button> styling so the bubble looks identical to its
     non-interactive (decorative) form, while still being a real button. */
  padding: 0;
  margin: 0;
  font-family: var(--mono);  /* override UA <button> font */
  -webkit-appearance: none;
  appearance: none;
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.map-bubble--suspected {
  background: var(--map-suspected);  /* yellow, matches suspected fill */
  color: var(--ink);  /* yellow + dark ink reads better than yellow + paper */
}
.map-bubble:hover,
.map-bubble:focus-visible {
  transform: translate(-50%, -50%) scale(1.18);
  box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px var(--paper);
  outline: none;
  z-index: 10;
}
/* If the count text is wider than 1 character, the grid centering gives
   it a pill shape automatically because we use min-width via padding. */
.map-bubble:not(:empty)[style*="left"] {
  min-width: 22px;
  padding: 0 5px;
  width: auto;
}

@media (min-width: 700px) {
  .map-bubble {
    width: 26px;
    height: 26px;
    font-size: 12px;
    border-width: 2px;
  }
  .map-bubble:not(:empty)[style*="left"] {
    min-width: 26px;
    padding: 0 6px;
  }
}
@media (min-width: 1000px) {
  .map-bubble {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }
  .map-bubble:not(:empty)[style*="left"] {
    min-width: 30px;
    padding: 0 7px;
  }
}

/* Tooltip that appears next to a hovered/tapped country */
.map-tooltip {
  position: fixed;
  z-index: 100;
  pointer-events: none;
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: 0.6rem 0.85rem;
  font-family: var(--mono);
  font-size: var(--fs-tiny);
  color: var(--ink);
  min-width: 180px;
  max-width: 260px;
  box-shadow: 4px 4px 0 rgba(26, 26, 26, 0.08);
}
.map-tooltip[hidden] { display: none; }
.map-tooltip strong {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
  display: block;
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.map-tooltip .row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.1rem 0;
}
.map-tooltip .row .lbl {
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.map-tooltip .row .val {
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.map-tooltip .status {
  display: block;
  margin-top: 0.5rem;
  padding-top: 0.45rem;
  border-top: 1px dashed var(--hairline);
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  line-height: 1.4;
}

/* Visual flash when a country is clicked and the table row scrolls into view */
table.countries tr.flash {
  animation: rowFlash 1.2s ease-out;
}
@keyframes rowFlash {
  0%, 100% { background: var(--paper); }
  20%      { background: var(--accent-bg); }
}

/* ---------- home page section spacing + h2 metadata ---------- */

.home-table,
.home-timeline {
  margin: 0 0 2.5rem;
  border-top: 1px solid var(--hairline-strong);
  padding-top: 1rem;
}

h2 .h2-meta {
  font-family: var(--mono);
  font-size: var(--fs-tiny);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-left: 0.6rem;
  vertical-align: middle;
}

.masthead h1 .domain-tld,
.masthead .brand-display .domain-tld {
  color: var(--accent);
  font-weight: 700;
}

/* Brand display paragraph (replaces an h1 since the SEO h1 is in the article).
   Override the global p { max-width: --prose-max } so the centered text
   doesn't sit inside a left-anchored 680px block. */
.masthead .brand-display {
  max-width: none;
  margin-bottom: 0;
}

/* ---------- risk banner ---------- */

.risk-banner {
  border-left: 3px solid var(--status-low);
  background: var(--status-low-bg);
  padding: 1rem 1.25rem;
  margin: 0 0 2.5rem;
}
.risk-banner .label { color: var(--status-low); margin-bottom: 0.25rem; }
.risk-banner p { margin-bottom: 0.4rem; max-width: 60ch; }
.risk-banner p:last-child { margin-bottom: 0; }
.risk-banner .source { font-size: var(--fs-small); color: var(--ink-soft); }

.risk-banner.elevated { border-color: var(--status-elevated); background: var(--status-elevated-bg); }
.risk-banner.elevated .label { color: var(--status-elevated); }
.risk-banner.high { border-color: var(--status-high); background: var(--status-high-bg); }
.risk-banner.high .label { color: var(--status-high); }

/* ---------- two-column row (table + timeline) ---------- */

.row-2col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin: 0 0 2.5rem;
}

@media (min-width: 900px) {
  .row-2col {
    grid-template-columns: 3fr 2fr;
    gap: 2.5rem;
  }
}

.row-2col > section {
  border-top: 1px solid var(--hairline-strong);
  padding-top: 1rem;
}

.row-2col h2 {
  font-family: var(--serif);
  font-size: var(--fs-h2);
  margin-bottom: 1rem;
}

/* ---------- countries table ---------- */

table.countries {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-small);
}
table.countries th, table.countries td {
  text-align: left;
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--hairline);
}
table.countries th {
  font-family: var(--mono);
  font-size: var(--fs-tiny);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}
table.countries th:hover { color: var(--accent); }
table.countries td.iso {
  font-family: var(--mono);
  color: var(--ink-faint);
  font-size: var(--fs-tiny);
}
table.countries td.country-name {
  white-space: nowrap;
}
table.countries .flag-wrap {
  display: inline-block;
  width: 1.4em;
  height: 1em;
  vertical-align: -0.18em;
  margin-right: 0.5em;
  border: 1px solid var(--hairline);
  overflow: hidden;
  background: var(--paper-edge);
}
table.countries .flag-wrap svg.flag {
  display: block;
  width: 100%;
  height: 100%;
}
table.countries td.num {
  font-family: var(--mono);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
table.countries td.status {
  font-size: var(--fs-tiny);
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Mobile: convert country table to card layout below 700px. Each row becomes
   a self-contained block; column headers move into ::before pseudos using
   data-label so labels stay close to values. */
@media (max-width: 700px) {
  table.countries thead { display: none; }
  table.countries,
  table.countries tbody,
  table.countries tr,
  table.countries td {
    display: block;
    width: 100%;
  }
  table.countries tr {
    border: 1px solid var(--hairline);
    margin-bottom: 0.6rem;
    padding: 0.65rem 0.85rem;
    background: var(--paper);
  }
  table.countries td {
    border: none;
    padding: 0.15rem 0;
    text-align: left;
  }
  table.countries td.iso { display: none; } /* ISO becomes implicit via the flag */
  table.countries td.country-name {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--hairline);
    padding-bottom: 0.45rem;
  }
  table.countries td.num {
    text-align: left;
    font-family: var(--mono);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.2rem 0;
  }
  table.countries td.num::before {
    content: attr(data-label);
    color: var(--ink-faint);
    font-family: var(--mono);
    font-size: var(--fs-tiny);
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }
  table.countries td.status {
    margin-top: 0.45rem;
    padding-top: 0.45rem;
    border-top: 1px dashed var(--hairline);
    color: var(--ink-soft);
    font-size: var(--fs-small);
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.45;
    white-space: normal;
  }
}

/* ---------- timeline ---------- */

ul.timeline {
  list-style: none;
  padding-left: 0;
  border-left: 1px solid var(--hairline-strong);
  padding-left: 1rem;
}
ul.timeline li {
  margin-bottom: 1rem;
  position: relative;
}
ul.timeline li::before {
  content: "";
  position: absolute;
  left: -1.4rem;
  top: 0.55em;
  width: 7px;
  height: 7px;
  background: var(--ink);
}
ul.timeline time {
  display: block;
  font-size: var(--fs-tiny);
  color: var(--ink-faint);
  letter-spacing: 0.04em;
  margin-bottom: 0.15rem;
}
ul.timeline p {
  font-size: var(--fs-small);
  margin: 0;
  line-height: 1.45;
}
ul.timeline .src {
  color: var(--ink-faint);
  font-size: var(--fs-tiny);
}
ul.timeline .src a {
  color: var(--ink-faint);
}

/* ---------- map (inline svg) ---------- */

.map-wrap {
  margin: 0 0 2.5rem;
  border-top: 1px solid var(--hairline-strong);
  border-bottom: 1px solid var(--hairline);
  padding: 1rem 0 1.25rem;
}
.map-wrap h2 {
  margin-bottom: 1rem;
}
.map-svg {
  width: 100%;
  height: auto;
  background: transparent;
}
.map-svg .country { fill: var(--paper-edge); stroke: var(--hairline-strong); stroke-width: 0.5; }
.map-svg .country.affected { fill: var(--accent); }
.map-svg .country.suspected { fill: var(--accent-soft); }

/* world map (on /map.html) */
.world-map-wrap {
  margin: 1.5rem 0 2rem;
  border: 1px solid var(--hairline);
  background: var(--paper-edge);
  padding: 0.75rem;
}
.world-map {
  width: 100%;
  height: auto;
  display: block;
}
.world-map path {
  fill: #efebe2;
  stroke: var(--hairline-strong);
  stroke-width: 0.4;
  transition: fill 120ms ease;
}
.world-map path.confirmed { fill: var(--map-confirmed); }
.world-map path.suspected { fill: var(--map-suspected); }
.world-map path.monitoring { fill: var(--map-monitoring); }
.world-map path.sphere {
  fill: none;
  stroke: var(--hairline);
}
.world-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-family: var(--mono);
  font-size: var(--fs-tiny);
  letter-spacing: 0.04em;
  margin-top: 0.75rem;
  color: var(--ink-soft);
}
.world-map-legend .swatch {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  vertical-align: middle;
  margin-right: 0.35rem;
  border: 1px solid var(--hairline);
}

.map-legend {
  font-family: var(--mono);
  font-size: var(--fs-tiny);
  color: var(--ink-soft);
  margin-top: 0.75rem;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.map-legend .swatch {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  vertical-align: middle;
  margin-right: 0.25rem;
}

/* ---------- news strip ---------- */

/* News list (full archive on /news.html). Same subgrid technique as
   ol.news-feed so every row's time / source / headline shares column tracks
   and aligns vertically. */
ul.news-list {
  list-style: none;
  padding-left: 0;
  margin: 0 0 2.5rem;
  border-top: 1px solid var(--hairline-strong);
  display: grid;
  grid-template-columns: max-content max-content 1fr;
  column-gap: 0.85rem;
}
ul.news-list li {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  align-items: baseline;
  border-bottom: 1px solid var(--hairline);
  padding: 0.85rem 0;
}
ul.news-list time {
  font-family: var(--mono);
  font-size: var(--fs-tiny);
  color: var(--ink-faint);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
ul.news-list .src {
  font-family: var(--mono);
  font-size: var(--fs-tiny);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  white-space: nowrap;
}
ul.news-list a {
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.35;
  color: var(--ink);
  text-decoration: none;
}
ul.news-list a:hover {
  color: var(--accent);
  text-decoration: underline;
}

@media (max-width: 700px) {
  ul.news-list {
    display: block;
  }
  ul.news-list li {
    display: block;
    grid-column: auto;
  }
  ul.news-list time,
  ul.news-list .src {
    display: inline-block;
    margin-right: 0.6rem;
    margin-bottom: 0.2rem;
  }
  ul.news-list a {
    display: block;
  }
}

/* ---------- news feed (chronological list) ---------- */

.home-press {
  margin: 0 0 2.5rem;
  border-top: 1px solid var(--hairline-strong);
  padding-top: 1rem;
}
.home-press h2 {
  margin-bottom: 1rem;
}
/* News feed grid: ol owns the column track sizes, rows participate via
   subgrid so every row's time / source / headline aligns to the same x-axis.
   Without subgrid each row's <a> would be its own grid and columns would
   re-size per-row, making text "scatter" vertically. */
ol.news-feed {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  border-top: 1px solid var(--hairline);
  display: grid;
  grid-template-columns: max-content max-content 1fr;
  column-gap: 1.1rem;
}
.news-row {
  display: contents;
}
.news-row-link {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  align-items: baseline;
  padding: 0.9rem 0.85rem 0.95rem;
  text-decoration: none;
  color: inherit;
  background: var(--paper);
  transition: background 120ms ease, border-color 120ms ease;
  border-left: 3px solid transparent;
  border-bottom: 1px solid var(--hairline);
}
.news-row-link:hover,
.news-row-link:focus-visible {
  background: var(--paper-edge);
  border-left-color: var(--accent);
  outline: none;
}
.news-row-link:hover .news-row-headline,
.news-row-link:focus-visible .news-row-headline {
  color: var(--accent);
}
.news-row-time {
  font-family: var(--mono);
  font-size: var(--fs-tiny);
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.news-row-source {
  font-family: var(--mono);
  font-size: var(--fs-tiny);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}
.news-row-headline {
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.35;
  color: var(--ink);
  transition: color 120ms ease;
}

/* Mobile: collapse to a single stacked column per row. Drop the parent grid
   so subgrid no longer applies. */
@media (max-width: 700px) {
  ol.news-feed {
    display: block;
  }
  .news-row {
    display: block;
    border-bottom: 1px solid var(--hairline);
  }
  .news-row-link {
    display: grid;
    grid-column: auto;
    grid-template-columns: 1fr;
    gap: 0.25rem;
    border-bottom: none;
  }
  .news-row-time,
  .news-row-source {
    display: inline-block;
  }
}

/* Outlet brand colours, by source slug. Slug = lowercase source name
   stripped of punctuation/whitespace. */
.news-row-source[data-outlet="cnn"]            { color: #cc0000; }
.news-row-source[data-outlet="nbcnews"]        { color: #6460aa; }
.news-row-source[data-outlet="cbsnews"]        { color: #0066cc; }
.news-row-source[data-outlet="washingtonpost"] { color: #000; }
.news-row-source[data-outlet="npr"]            { color: #1a1a1a; }
.news-row-source[data-outlet="time"]           { color: #d40000; }
.news-row-source[data-outlet="abcnews"]        { color: #0033a0; }
.news-row-source[data-outlet="pbsnewshour"]    { color: #002f6c; }
.news-row-source[data-outlet="aljazeera"]      { color: #fa9907; }
.news-row-source[data-outlet="cbcnews"]        { color: #cc0000; }
.news-row-source[data-outlet="who"]            { color: #008dc9; }
.news-row-source[data-outlet="cdc"]            { color: #075290; }
.news-row-source[data-outlet="ecdc"]           { color: #0033a0; }
.news-row-source[data-outlet="unnews"]         { color: #009edb; }
.news-row-source[data-outlet="france24"]       { color: #003892; }
.news-row-source[data-outlet="euronews"]       { color: #1c2c5b; }
.news-row-source[data-outlet="harvardhealth"]  { color: #a51c30; }
.news-row-source[data-outlet="rte"]            { color: #00833f; }
.news-row-source[data-outlet="ukhsa"]          { color: #003078; }
.news-row-source[data-outlet="foxnews"]        { color: #003366; }
.news-row-source[data-outlet="usnewsworldreport"] { color: #c20029; }

/* ---------- about/data block ---------- */

.row-about {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin: 0 0 2.5rem;
  border-top: 1px solid var(--hairline-strong);
  padding-top: 1.25rem;
}
@media (min-width: 900px) {
  .row-about { grid-template-columns: 2fr 1fr; gap: 2.5rem; }
}

.row-about .data-card {
  font-family: var(--mono);
  font-size: var(--fs-small);
  background: var(--accent-bg);
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent);
}
.row-about .data-card .label {
  margin-bottom: 0.5rem;
}
.row-about .data-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.row-about .data-card li {
  margin-bottom: 0.35rem;
}
.row-about .data-card li a {
  color: var(--accent);
  font-family: var(--mono);
}
.row-about .data-card .meta {
  font-size: var(--fs-tiny);
  color: var(--ink-soft);
  margin-top: 0.75rem;
  border-top: 1px solid var(--hairline);
  padding-top: 0.5rem;
}

/* ---------- sources strip ---------- */

.sources-strip {
  font-size: var(--fs-small);
  color: var(--ink-soft);
  margin: 0 0 2.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.sources-strip .label { margin-bottom: 0.5rem; }
.sources-strip p { max-width: none; margin-bottom: 0; }

/* ---------- SEO long-form article ---------- */

article.seo {
  max-width: var(--prose-max);
  margin: 3rem auto 4rem;
  padding-top: 2rem;
  border-top: 2px solid var(--ink);
}
article.seo h1 {
  font-size: var(--fs-h1);
  margin-bottom: 1.5rem;
}
article.seo h2 {
  font-size: var(--fs-h2);
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
}
article.seo h3 {
  font-size: var(--fs-h3);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
article.seo p {
  font-size: var(--fs-body);
  line-height: 1.65;
  max-width: none;
}
article.seo ul { margin-bottom: 1em; }
article.seo .small {
  font-size: var(--fs-small);
  color: var(--ink-soft);
}

/* FAQ items */
article.seo details {
  border-top: 1px solid var(--hairline);
  padding: 0.85rem 0;
}
article.seo details:last-of-type {
  border-bottom: 1px solid var(--hairline);
}
article.seo summary {
  cursor: pointer;
  font-weight: 600;
  font-family: var(--serif);
}
article.seo summary:hover { color: var(--accent); }
article.seo details[open] summary { color: var(--accent); }
article.seo details > p {
  margin-top: 0.5rem;
  margin-bottom: 0;
}

/* ---------- page figures (photos with captions) ---------- */

.page-figure {
  margin: 1.5rem 0 2rem;
  max-width: var(--prose-max);
}
.page-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--hairline);
  background: var(--paper-edge);
}
.page-figure figcaption {
  font-family: var(--mono);
  font-size: var(--fs-tiny);
  color: var(--ink-soft);
  margin-top: 0.6rem;
  letter-spacing: 0.03em;
  line-height: 1.5;
}
.page-figure figcaption a {
  color: var(--ink-soft);
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}
.page-figure figcaption a:hover {
  color: var(--accent);
}

.page-figure--square img {
  max-width: 500px;
  margin: 0 auto;
}

/* ---------- callouts ---------- */

.callout {
  border-left: 3px solid var(--ink-faint);
  background: var(--paper-edge);
  padding: 0.85rem 1.1rem;
  margin: 1.5rem 0;
  font-size: var(--fs-small);
  color: var(--ink-soft);
}
.callout.medical {
  border-color: var(--status-elevated);
  background: var(--status-elevated-bg);
  color: var(--ink);
}
.callout strong { color: var(--ink); }

/* ---------- prose pages ---------- */

.prose {
  max-width: var(--prose-max);
  margin: 0 auto 4rem;
}
.prose h1 { font-size: var(--fs-h1); margin-bottom: 1rem; }
.prose h2 { margin-top: 2.25rem; margin-bottom: 0.75rem; }
.prose h3 { margin-top: 1.5rem; }
.prose p, .prose li { line-height: 1.65; }
.prose .lede { font-size: 1.15rem; color: var(--ink-soft); margin-bottom: 1.5rem; }

/* ---------- footer ---------- */

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--hairline-strong);
  background: var(--paper-edge);
  padding: 1.5rem 0 2rem;
}
.site-footer .inner {
  max-width: var(--col-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}
@media (min-width: 768px) {
  .site-footer .inner { padding: 0 2rem; }
}
.site-footer p {
  font-size: var(--fs-small);
  color: var(--ink-soft);
  max-width: 60ch;
  margin-bottom: 0.75rem;
}
.site-footer nav {
  font-family: var(--mono);
  font-size: var(--fs-tiny);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  border-top: 1px solid var(--hairline);
  padding-top: 1rem;
}
.site-footer nav a {
  color: var(--ink-soft);
  text-decoration: none;
}
.site-footer nav a:hover { color: var(--accent); }
.site-footer .copy {
  font-family: var(--mono);
  font-size: var(--fs-tiny);
  color: var(--ink-faint);
  margin-top: 0.75rem;
  letter-spacing: 0.04em;
}

/* ---------- focus / a11y ---------- */

*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- utility ---------- */

.divider {
  height: 0;
  border-top: 1px solid var(--hairline-strong);
  margin: 2.5rem 0;
}

.smallcaps {
  font-family: var(--serif);
  font-variant: small-caps;
  letter-spacing: 0.05em;
}

.center { text-align: center; }
.muted { color: var(--ink-soft); }
.tnum { font-variant-numeric: tabular-nums; }
