/* topic-page.css — /air-quality, /road-closures, /power-outages (templates/topic_page.html, 2026-11-30).
   Sitewide tokens only (css/tokens.css). Sizes in rem so the desktop text scale and the Text size control apply.
   Data first: the headline reading is the largest thing on the first screen at 390 px. No dashed or dotted
   underlines on plain text (they read as links). */
.tp { color: var(--c-text); }
.tp a { color: var(--c-accent); text-decoration: underline; text-underline-offset: 0.15em; }
.tp a:hover { color: var(--c-accent-2); }
.tp-eyebrow { font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--c-text-3); margin-bottom: 0.375rem; }
.tp-h1 { font-size: clamp(1.5rem, 5.2vw, 2.25rem); font-weight: 800; line-height: 1.1; margin: 0 0 0.875rem; }
.tp-h2 { font-size: 1.0625rem; font-weight: 700; margin: 1.5rem 0 0.625rem; }

.tp-now { background: var(--c-surface); border: 1px solid var(--c-line-2); border-left: 0.25rem solid var(--c-accent);
  border-radius: var(--r-2); padding: 0.875rem 1rem; }
.tp-now.is-stale { border-left-color: var(--c-text-3); }
.tp-headline { font-size: clamp(1.1875rem, 4.6vw, 1.5rem); font-weight: 800; line-height: 1.25; margin: 0; }
.tp-sub { font-size: 1rem; line-height: 1.5; color: var(--c-text-2); margin: 0.375rem 0 0; }
.tp-meaning { font-size: 0.9375rem; line-height: 1.5; margin: 0.625rem 0 0; }
.tp-age { font-size: 0.8125rem; line-height: 1.5; color: var(--c-text-3); margin: 0.625rem 0 0; }
.tp-old { color: var(--c-warn); font-weight: 700; }
.tp-note { font-size: 0.875rem; line-height: 1.55; color: var(--c-text-2); margin: 0.5rem 0; }
.tp-dim { color: var(--c-text-3); font-weight: 400; }
.tp-go { margin: 0.625rem 0 0; font-size: 0.9375rem; font-weight: 600; }
.tp-go a { display: inline-block; padding: 0.625rem 0; min-height: 2.75rem; }

.tp-chip { display: inline-block; padding: 0.125rem 0.5rem; border-radius: var(--r-pill); font-size: 0.75rem;
  font-weight: 700; line-height: 1.5; vertical-align: 0.0625rem; background: var(--c-surface-3); color: var(--c-text); }
.tp-num { display: inline-block; min-width: 2.5rem; padding: 0.125rem 0.5rem; border-radius: var(--r-1);
  text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; background: var(--c-surface-3); }
.tp-dot { display: inline-block; width: 0.75rem; height: 0.75rem; border-radius: 50%; margin-right: 0.375rem;
  vertical-align: -0.0625rem; }
/* US EPA AQI colours; dark ink on the two light ones */
.tp-aqi-1 { background: #00E400; color: #000; }
.tp-aqi-2 { background: #FFFF00; color: #000; }
.tp-aqi-3 { background: #FF7E00; color: #fff; }
.tp-aqi-4 { background: #FF0000; color: #fff; }
.tp-aqi-5 { background: #8F3F97; color: #fff; }
.tp-aqi-6 { background: #7E0023; color: #fff; }
.tp-road-open { background: var(--c-good); color: #04210f; }
.tp-road-closed { background: var(--c-bad); color: #fff; }
.tp-road-restricted { background: var(--c-warn); color: var(--c-accent-ink); }
.tp-road-unknown { background: var(--c-surface-3); color: var(--c-text); }
.tp-po-medium { background: rgba(245, 158, 11, .25); }
.tp-po-large { background: var(--c-fire); color: #fff; }

.tp-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--c-line); border-radius: var(--r-2); }
.tp-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.tp-table th, .tp-table td { padding: 0.5625rem 0.75rem; text-align: left; border-bottom: 1px solid var(--c-line);
  vertical-align: middle; }
.tp-table thead th { font-size: 0.75rem; font-weight: 600; color: var(--c-text-3); background: var(--c-surface);
  white-space: nowrap; }
.tp-table tbody th { font-weight: 600; }
.tp-unit { font-weight: 400; }
/* phone: all five columns on the screen without scrolling sideways */
@media (max-width: 30rem) {
  .tp-table { font-size: 0.875rem; }
  .tp-table th, .tp-table td { padding: 0.5rem 0.4375rem; }
  .tp-table thead th { white-space: normal; font-size: 0.6875rem; }
  .tp-unit { display: block; }
  .tp-num { min-width: 2.125rem; padding: 0.125rem 0.3125rem; }
}
.tp-table tbody tr:last-child th, .tp-table tbody tr:last-child td { border-bottom: 0; }

.tp-card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-2); padding: 0.875rem 1rem; }
.tp-card p { margin: 0 0 0.5rem; line-height: 1.5; }
.tp-card-h { font-size: 1rem; }
.tp-plain { margin: 0 0 0.5rem 1.125rem; padding: 0; list-style: disc; font-size: 0.9375rem; line-height: 1.5; }
.tp-rows { list-style: none; margin: 0; padding: 0; border: 1px solid var(--c-line); border-radius: var(--r-2); }
.tp-row { padding: 0.625rem 0.875rem; border-bottom: 1px solid var(--c-line); font-size: 0.9375rem; line-height: 1.45; }
.tp-row:last-child { border-bottom: 0; }
.tp-row.is-full { border-left: 0.1875rem solid var(--c-bad); }
.tp-row-h { margin-bottom: 0.125rem; }
.tp-more { margin: 0.75rem 0; }
.tp-more > summary { cursor: pointer; padding: 0.75rem 0; min-height: 2.75rem; font-weight: 600; color: var(--c-accent); }
.tp-more > .tp-rows { margin-top: 0.25rem; }

.tp-map { width: 100%; height: min(58vh, 26.25rem); min-height: 17.5rem; border: 1px solid var(--c-line-2);
  border-radius: var(--r-2); overflow: hidden; background: var(--c-surface-2); }
.tp-switch { margin: 0.5rem 0 0; }
.tp-rs { display: inline-flex; align-items: center; gap: 0.375rem; min-height: 2.75rem; padding: 0 0.875rem;
  border: 1px solid var(--c-line-2); border-radius: var(--r-pill); background: var(--c-surface); color: var(--c-text);
  font-size: 0.875rem; font-weight: 600; cursor: pointer; }
.tp-rs[aria-pressed="false"] { color: var(--c-text-3); }
.tp-rs[aria-pressed="false"] span:last-child { text-decoration: line-through; }
.tp-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 0.375rem 1rem; margin: 0.625rem 0 0; padding: 0;
  font-size: 0.8125rem; color: var(--c-text-2); }
.tp-pop { font-size: 0.875rem; line-height: 1.45; color: #e7e5e4; }
.tp-pop strong { display: block; font-size: 0.9375rem; color: #f2efe6; }
.tp-pop-n { font-weight: 700; }

.tp-explain p, .tp-src p { font-size: 0.9375rem; line-height: 1.6; color: var(--c-text-2); margin: 0 0 0.625rem; max-width: 42rem; }
.tp-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.5rem 0 0.5rem; }
.tp .tp-links a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 0.875rem;
  border: 1px solid var(--c-line-2); border-radius: var(--r-pill); font-size: 0.875rem; font-weight: 600;
  color: var(--c-text); text-decoration: none; background: var(--c-surface); }
.tp .tp-links a:hover { border-color: var(--c-accent); color: var(--c-accent); }
