/* Calgary Landfill Fire Tracker
   Palette: prairie haze neutrals, umber smoke for anything plume-related,
   ember only for the fire site itself, and a deep sky blue for interaction.
   Type: Overpass (after Highway Gothic signage) for UI and data,
   Source Serif 4 for reading text. */

/* Self-hosted Latin subsets (SIL Open Font License). The fallback faces are
   scaled to the web fonts' metrics, so text doesn't jump when they swap in. */
@font-face {
  font-family: "Overpass"; src: url("/fonts/overpass-latin.woff2") format("woff2");
  font-weight: 300 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4"; src: url("/fonts/source-serif-4-latin.woff2") format("woff2");
  font-weight: 300 700; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Overpass Fallback"; src: local("Arial"), local("Helvetica Neue"), local("Helvetica"), local("Roboto");
  size-adjust: 100.9%; ascent-override: 87.51%; descent-override: 37.96%; line-gap-override: 0%;
}
@font-face {
  font-family: "Source Serif Fallback"; src: local("Georgia");
  size-adjust: 108.95%; ascent-override: 95.09%; descent-override: 30.75%; line-gap-override: 0%;
}

:root {
  --bg: #E5E9E7;
  --surface: #F2F4F2;
  --surface-2: #D8DEDB;
  --ink: #16202A;
  --ink-2: #44505B;
  --ink-3: #5B6771;
  --rule: #C4CCCA;
  --rule-strong: #97A2A2;
  --ember: #D4460E;
  --ember-ink: #AE3A0B;
  --smoke: #6E4329;
  --smoke-2: #9A6A4C;
  --smoke-3: #C9AC97;
  --smoke-wash: rgba(110, 67, 41, 0.08);
  --signal: #1C5A85;
  --signal-soft: #D2E1EB;
  --overlay: rgba(242, 244, 242, 0.92);
  --shadow: 0 1px 2px rgba(22, 32, 42, 0.08), 0 8px 24px -8px rgba(22, 32, 42, 0.18);

  --f-sans: "Overpass", "Overpass Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-serif: "Source Serif 4", "Source Serif Fallback", "Iowan Old Style", Georgia, serif;

  --t-xs: 0.8125rem;
  --t-sm: 0.875rem;
  --t-base: 1rem;
  --t-md: 1.125rem;
  --t-lg: 1.3125rem;
  --t-xl: 1.5rem;
  --t-2xl: clamp(1.875rem, 1.4rem + 1.4vw, 2.5rem);
  --t-hero: clamp(2rem, 1.35rem + 2.1vw, 3.25rem);

  --gutter: clamp(16px, 3.2vw, 40px);
  --max: 1360px;
  --header-h: 60px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11161B;
    --surface: #171E25;
    --surface-2: #202932;
    --ink: #E3E8EB;
    --ink-2: #A9B4BC;
    --ink-3: #7F8B95;
    --rule: #28323B;
    --rule-strong: #3D4954;
    --ember: #FF6A33;
    --ember-ink: #FF8A5C;
    --smoke: #E4A57B;
    --smoke-2: #C08A66;
    --smoke-3: #7C5D49;
    --smoke-wash: rgba(228, 165, 123, 0.08);
    --signal: #8CC2E8;
    --signal-soft: #1B3243;
    --overlay: rgba(23, 30, 37, 0.92);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px -10px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #11161B;
  --surface: #171E25;
  --surface-2: #202932;
  --ink: #E3E8EB;
  --ink-2: #A9B4BC;
  --ink-3: #7F8B95;
  --rule: #28323B;
  --rule-strong: #3D4954;
  --ember: #FF6A33;
  --ember-ink: #FF8A5C;
  --smoke: #E4A57B;
  --smoke-2: #C08A66;
  --smoke-3: #7C5D49;
  --smoke-wash: rgba(228, 165, 123, 0.08);
  --signal: #8CC2E8;
  --signal-soft: #1B3243;
  --overlay: rgba(23, 30, 37, 0.92);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px -10px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--t-base)/1.55 var(--f-sans);
  font-feature-settings: "kern", "tnum" 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--signal); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
.muted { color: var(--ink-3); }
.num { font-variant-numeric: tabular-nums; }

:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; border-radius: 4px; }

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 6px; text-decoration: none;
}
.skip:focus { top: 12px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 999px; padding: 10px 18px; border: 1px solid transparent;
  font-weight: 600; font-size: var(--t-sm); line-height: 1; cursor: pointer; white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s;
}
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.btn--ghost { background: var(--surface); border-color: var(--rule); color: var(--ink); }
.btn--ghost:hover { border-color: var(--rule-strong); }
.btn--line { background: transparent; border-color: var(--rule-strong); color: var(--ink); }
.btn--line:hover { background: var(--surface); }

/* ---------- Masthead ---------- */

.masthead {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--rule);
}
.masthead__inner {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
  height: var(--header-h); display: flex; align-items: center; gap: 24px;
}
.brand {
  display: grid; grid-template-columns: auto auto; grid-template-areas: "mark name" "mark credit";
  column-gap: 10px; align-items: center; flex-shrink: 0;
}
.brand__mark-link { grid-area: mark; display: block; }
.brand__mark { width: 30px; height: 30px; display: block; }
.m-plume--1 { fill: var(--smoke-3); }
.m-plume--2 { fill: var(--smoke-2); }
.m-site { fill: var(--ember); }
.brand__name { grid-area: name; padding-top: max(0px, calc(24px - 1.15em)); font-weight: 800; font-size: var(--t-md); letter-spacing: -0.015em; line-height: 1.15; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand__credit {
  grid-area: credit; justify-self: start; display: inline-flex; align-items: baseline; gap: 5px; min-height: 24px;
  font-size: 11.5px; font-weight: 600; line-height: 1.3; color: var(--ink-3); text-decoration: none; white-space: nowrap;
}
.brand__credit:hover { color: var(--ink); }

/* The Automators logo, from the shared <symbol>. Aspect ratio 918 x 718.6. */
.au-logo {
  /* Sized from the text and centred on the capital letters (Overpass caps are 0.7em),
     so the mark lines up with "Built by The Automators" at any font size.
     Its container uses align-items: baseline; the shift below moves it from the
     baseline to the cap-height midline. Logo aspect ratio is 918 x 718.6. */
  --logo-h: 0.9em;
  height: var(--logo-h); width: calc(var(--logo-h) * 1.2775);
  position: relative; top: calc((var(--logo-h) - 0.7em) / 2);
  fill: currentColor; flex-shrink: 0;
}

.status {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  font-size: var(--t-sm); color: var(--ink-2);
  padding-left: 20px; border-left: 1px solid var(--rule);
}
.status__text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status__text strong { color: var(--ink); font-weight: 700; }
.status__dot {
  width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
  background: var(--ember); box-shadow: 0 0 0 0 color-mix(in srgb, var(--ember) 50%, transparent);
  animation: ember 2.6s ease-out infinite;
}
.status[data-state="loading"] .status__dot { background: var(--rule-strong); animation: none; }
@keyframes ember {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ember) 55%, transparent); }
  70%, 100% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--ember) 0%, transparent); }
}

.nav { margin-left: auto; display: flex; gap: 4px; }
.nav a {
  color: var(--ink-2); text-decoration: none; font-size: var(--t-sm); font-weight: 600;
  padding: 8px 10px; border-radius: 6px;
}
.nav a:hover, .nav a[aria-current="true"] { color: var(--ink); background: var(--surface-2); }

/* ---------- Hero ---------- */

.hero {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(20px, 3vw, 36px) var(--gutter) 0;
  display: grid;
  grid-template-columns: minmax(340px, 470px) minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  grid-template-areas: "head map" "check map" "facts map";
  column-gap: clamp(28px, 3.5vw, 56px);
}
.hero__head { grid-area: head; padding-top: 8px; }
.hero__facts { grid-area: facts; }
.hero__check { grid-area: check; }
.hero__map { grid-area: map; min-width: 0; }
/* Once the fire is out: no live wind readout, plume view or forecast scrubber. */
.is-out .hero__facts, .is-out .map-mode, .is-out .scrub { display: none; }
.is-out .hero__headline { min-height: 0; }

.hero__day { font-size: var(--t-sm); color: var(--ink-2); font-weight: 600; margin-bottom: 18px; }
.hero__day #day-count { color: var(--ember-ink); font-weight: 800; }
.hero__asof { font-weight: 400; color: var(--ink-3); margin-left: 6px; }
.hero__headline {
  font-size: var(--t-hero); line-height: 1.06; font-weight: 750; letter-spacing: -0.028em;
  text-wrap: balance; min-height: 3.2em;
}
.hero__headline .place {
  text-decoration: underline; text-decoration-color: var(--smoke-2);
  text-decoration-thickness: 0.09em; text-underline-offset: 0.12em; cursor: pointer;
}
.hero__headline .place:hover, .hero__headline .place:focus-visible { text-decoration-color: var(--smoke); background: var(--smoke-wash); }
.hero__detail { margin-top: 16px; font-family: var(--f-serif); font-size: var(--t-md); line-height: 1.55; color: var(--ink-2); max-width: 38em; }
.hero__detail:empty { display: none; }

.wind {
  margin-top: 28px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
}
.wind > div { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.wind > div:nth-child(odd) { padding-right: 16px; }
.wind > div:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--rule); }
.wind dt { font-size: var(--t-xs); color: var(--ink-3); display: flex; align-items: center; gap: 6px; position: relative; }
.wind dd { font-size: var(--t-lg); font-weight: 650; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.wind dd small { display: block; font-size: var(--t-xs); font-weight: 500; color: var(--ink-3); letter-spacing: 0; line-height: 1.35; margin-top: 3px; min-height: 1.35em; }
.wind dd .flag { color: var(--smoke); }

.info {
  width: 17px; height: 17px; border-radius: 50%; border: 1px solid var(--rule-strong); background: none;
  font-size: 11px; font-weight: 700; line-height: 1; padding: 0; cursor: help; color: var(--ink-2);
}
.tip {
  position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 5; width: 240px;
  background: var(--ink); color: var(--bg); font-size: var(--t-xs); line-height: 1.45; padding: 8px 10px; border-radius: 6px;
  opacity: 0; pointer-events: none; transform: translateY(4px); transition: opacity 0.15s, transform 0.15s;
}
.info:hover + .tip, .info:focus-visible + .tip { opacity: 1; transform: none; }

.check { margin-top: 28px; }
.check__saved { font-size: var(--t-xs); color: var(--ink-2); margin-top: 6px; }

/* Two daily numbers under the headline */
.pulse { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 22px; }
.pulse > div { border-top: 3px solid var(--ink); padding-top: 10px; }
.pulse dt { font-size: var(--t-xl); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pulse dd { font-size: var(--t-xs); color: var(--ink-2); line-height: 1.45; margin-top: 4px; }
.pulse__def { color: var(--ink-3); }

/* Forecast periods in the community card */
.fc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
.fc__tile { border-radius: 10px; padding: 10px 10px 11px; background: var(--bg); border: 1px solid var(--rule); }
.fc__tile[data-l="likely"] { background: var(--smoke); border-color: var(--smoke); color: var(--bg); }
.fc__tile[data-l="possible"] { background: color-mix(in srgb, var(--smoke-3) 55%, var(--bg)); border-color: var(--smoke-3); }
.fc__when { font-size: var(--t-xs); font-weight: 700; opacity: 0.85; }
.fc__lvl { font-size: var(--t-sm); font-weight: 800; margin-top: 2px; line-height: 1.2; }
.fc__time { font-size: var(--t-xs); margin-top: 2px; line-height: 1.3; opacity: 0.9; }
.tips { margin-top: 12px; display: grid; gap: 6px; }
.tips li { position: relative; padding-left: 18px; font-size: var(--t-sm); line-height: 1.45; color: var(--ink-2); }
.tips li::before { content: ""; position: absolute; left: 3px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--smoke-2); }
.tips strong { color: var(--ink); font-weight: 700; }

/* Tonight across southeast Calgary (under the map) */
.tonight { margin-top: 22px; padding: 18px 20px; border-radius: 14px; background: var(--surface); border: 1px solid var(--rule); }
.tonight__head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 16px; }
.tonight__head h2 { font-size: var(--t-lg); font-weight: 800; letter-spacing: -0.015em; }
.tonight__when { font-size: var(--t-sm); color: var(--ink-3); }
.tn__label { font-size: var(--t-sm); font-weight: 700; margin-top: 12px; display: flex; align-items: center; gap: 8px; }
.tn__label::before { content: ""; width: 12px; height: 12px; border-radius: 3px; background: var(--smoke); }
.tn__names { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tn__name {
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; cursor: pointer;
  padding: 7px 11px; border-radius: 8px; border: 1px solid var(--rule-strong); background: var(--bg); color: var(--ink);
  font-weight: 700; font-size: var(--t-sm); text-align: left;
}
.tn__name:hover { border-color: var(--ink-2); }
.tn__name small { font-weight: 500; font-size: 11px; color: var(--ink-3); }
.tn__more, .tn__none { font-size: var(--t-sm); color: var(--ink-2); margin-top: 10px; line-height: 1.45; }
.tonight__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tonight__actions .btn { text-decoration: none; }
.check__label { display: block; font-weight: 700; font-size: var(--t-md); margin-bottom: 10px; }
.check__row { display: flex; gap: 8px; }
.check__input {
  flex: 1; min-width: 0; font: inherit; font-size: var(--t-base);
  padding: 11px 14px; border-radius: 10px; border: 1px solid var(--rule-strong);
  background: var(--surface); color: var(--ink);
}
.check__input::placeholder { color: var(--ink-3); }
.check__input:focus { outline: 2px solid var(--signal); outline-offset: 0; border-color: transparent; }
.check__hint { font-size: var(--t-xs); color: var(--ink-3); margin-top: 8px; }

.verdict { margin-top: 18px; padding: 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--rule); }
.verdict__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; }
.verdict__title { font-weight: 800; font-size: var(--t-xl); letter-spacing: -0.02em; line-height: 1.15; }
.verdict__sub { font-size: var(--t-xs); color: var(--ink-3); margin-top: 3px; }
.verdict__now { font-size: var(--t-base); font-weight: 600; margin-top: 12px; line-height: 1.45; }
.verdict__strip { margin-top: 16px; }
.verdict__record { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--rule); font-size: var(--t-sm); line-height: 1.5; color: var(--ink-2); }
.verdict__record strong { color: var(--ink); }
.verdict__share { margin-top: 16px; }
.pill { font-size: var(--t-xs); font-weight: 800; padding: 4px 11px; border-radius: 999px; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); }
.pill[data-l="likely"] { background: var(--smoke); color: var(--bg); }
.pill[data-l="possible"] { background: var(--smoke-3); color: var(--ink); }
.strip-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; font-size: var(--t-xs); font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.strip-key { display: inline-flex; gap: 12px; font-weight: 500; color: var(--ink-3); }
.strip-key span { display: inline-flex; align-items: center; gap: 5px; }
.strip-key i { width: 10px; height: 10px; border-radius: 2px; background: var(--surface-2); display: inline-block; }
.strip-key i[data-l="likely"] { background: var(--smoke); }
.strip-key i[data-l="possible"] { background: var(--smoke-3); }
.strip-key i.night { box-shadow: inset 0 -4px 0 color-mix(in srgb, var(--ink) 30%, transparent); }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 1px; height: 26px; border-radius: 4px; overflow: hidden; }
.strip i { background: var(--surface-2); }
.strip i[data-l="possible"] { background: var(--smoke-3); }
.strip i[data-l="likely"] { background: var(--smoke); }
.strip i.night { box-shadow: inset 0 -4px 0 color-mix(in srgb, var(--ink) 14%, transparent); }
.strip-scale { position: relative; height: 14px; font-size: 11px; color: var(--ink-3); margin-top: 6px; font-variant-numeric: tabular-nums; }
.strip-scale span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.strip-scale span.start { left: 0; transform: none; }
.strip-scale span.end { right: 0; left: auto; transform: none; }
.verdict__next { margin-top: 10px; font-size: var(--t-sm); line-height: 1.5; }
.verdict__next strong { font-weight: 700; }

/* ---------- Map ---------- */

.hero__map { position: relative; display: flex; flex-direction: column; }
.map {
  position: relative; width: 100%;
  height: clamp(480px, calc(100svh - var(--header-h) - 200px), 780px);
  border-radius: 14px; overflow: hidden; background: var(--surface-2);
  border: 1px solid var(--rule);
}
.map canvas.plume-particles { position: absolute; top: 0; left: 0; pointer-events: none; }
.map-top {
  position: absolute; left: 12px; top: 12px; z-index: 2; max-width: calc(100% - 70px);
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px;
}
.map-mode { display: inline-flex; background: var(--overlay); border-radius: 8px; padding: 3px; box-shadow: var(--shadow); }
.map-mode button {
  border: 0; background: none; border-radius: 6px; padding: 5px 10px; cursor: pointer;
  font-size: var(--t-xs); font-weight: 700; color: var(--ink-2); white-space: nowrap;
}
.map-mode button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.map-legend {
  display: flex; flex-wrap: wrap; gap: 4px 14px;
  background: var(--overlay); border-radius: 8px; padding: 7px 12px; box-shadow: var(--shadow);
  font-size: var(--t-xs); color: var(--ink-2);
}
.lg--ramp { width: 56px; background: linear-gradient(90deg, color-mix(in srgb, var(--smoke) 8%, transparent), var(--smoke)); }
.scrub.is-off { opacity: 0.35; pointer-events: none; }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 14px; height: 10px; border-radius: 2px; display: inline-block; }
.lg--likely { background: var(--smoke); opacity: 0.75; }
.lg--possible { background: var(--smoke-3); }
.lg--listed { border: 1.5px dashed var(--ink-2); background: transparent; }
.lg--station { width: 10px; height: 10px; border-radius: 50%; background: #006699; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--rule-strong); }

.maplibregl-ctrl-group { background: var(--overlay) !important; box-shadow: var(--shadow) !important; border-radius: 8px !important; }
.maplibregl-ctrl-group button + button { border-top-color: var(--rule) !important; }
:root[data-scheme="dark"] .maplibregl-ctrl-icon { filter: invert(1); }
.maplibregl-ctrl-attrib, .maplibregl-ctrl-attrib-inner { background: var(--overlay) !important; color: var(--ink-3) !important; font-size: 11px; }
.maplibregl-ctrl-attrib a { color: var(--ink-2); }
.maplibregl-popup-content {
  background: var(--surface); color: var(--ink); border-radius: 10px; padding: 12px 14px;
  box-shadow: var(--shadow); font: 400 var(--t-sm)/1.45 var(--f-sans);
}
.maplibregl-popup-tip { border-top-color: var(--surface) !important; border-bottom-color: var(--surface) !important; }
.maplibregl-popup-close-button { color: var(--ink-3); font-size: 18px; padding: 2px 8px; }
.pop__t { font-weight: 700; font-size: var(--t-base); }
.pop__m { color: var(--ink-2); }

.site-marker { position: relative; width: 18px; height: 18px; }
.site-marker::before, .site-marker::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--ember);
}
.site-marker::before { border: 3px solid var(--surface); }
.site-marker::after { animation: site-pulse 2.4s ease-out infinite; opacity: 0.5; }
@keyframes site-pulse { from { transform: scale(1); opacity: 0.55; } to { transform: scale(3.2); opacity: 0; } }

.station-marker {
  display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 5px;
  border-radius: 13px; border: 2px solid var(--surface); box-shadow: 0 0 0 1px rgba(0,0,0,.18), var(--shadow);
  font: 800 12px/1 var(--f-sans); cursor: pointer;
}

/* Time scrubber: a wind timeline you can drag through */
.scrub { margin-top: 14px; }
.scrub__head { display: flex; align-items: center; gap: 12px; min-height: 36px; }
.scrub__play {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--rule-strong); background: var(--surface);
  display: grid; place-items: center; cursor: pointer; flex-shrink: 0;
}
.scrub__play svg { width: 14px; height: 14px; fill: var(--ink); }
.scrub__play .i-pause { display: none; }
.scrub__play[aria-pressed="true"] .i-play { display: none; }
.scrub__play[aria-pressed="true"] .i-pause { display: inline; }
.scrub__when { font-weight: 650; font-size: var(--t-base); font-variant-numeric: tabular-nums; flex: 1; min-width: 0; }
.scrub__when small { color: var(--ink-2); font-weight: 400; font-size: var(--t-sm); margin-left: 6px; }
.scrub__now { background: none; border: 0; color: var(--signal); font-weight: 600; font-size: var(--t-sm); cursor: pointer; padding: 6px; }
.scrub__track { position: relative; height: 46px; margin-top: 6px; }
.scrub__arrows { position: absolute; inset: 0 0 12px; width: 100%; height: 34px; overflow: visible; }
.scrub__arrows .past { opacity: 0.45; }
.scrub__arrows .night { fill: color-mix(in srgb, var(--ink) 6%, transparent); }
.scrub__arrows .now-line { stroke: var(--ember); stroke-width: 1.5; }
.scrub__range {
  position: absolute; left: 0; right: 0; bottom: 0; width: 100%; margin: 0; height: 46px;
  appearance: none; -webkit-appearance: none; background: transparent; cursor: grab;
}
.scrub__range:active { cursor: grabbing; }
.scrub__range::-webkit-slider-runnable-track { height: 46px; background: linear-gradient(var(--rule-strong), var(--rule-strong)) bottom 5px left 0 / 100% 2px no-repeat; }
.scrub__range::-moz-range-track { height: 2px; background: var(--rule-strong); }
.scrub__range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 4px; height: 46px; border-radius: 2px; background: var(--ink);
  box-shadow: 0 0 0 3px var(--bg);
}
.scrub__range::-moz-range-thumb { width: 4px; height: 46px; border-radius: 2px; background: var(--ink); border: 0; box-shadow: 0 0 0 3px var(--bg); }
.scrub__range:focus-visible { outline: none; }
.scrub__range:focus-visible::-webkit-slider-thumb { background: var(--signal); box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--signal); }
.scrub__range:focus-visible::-moz-range-thumb { background: var(--signal); }
.scrub__scale { position: relative; height: 18px; font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.scrub__scale span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.scrub__scale span.now { color: var(--ember-ink); font-weight: 700; }

/* Countdown banner */
.countdown { background: var(--ink); color: var(--bg); font-size: var(--t-sm); }
.countdown__inner {
  max-width: var(--max); margin: 0 auto; padding: 9px var(--gutter);
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 40px; text-align: center;
}
.countdown__item { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 12px; min-width: 0; }
.countdown__timer { display: inline-flex; gap: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; color: color-mix(in srgb, var(--ember) 55%, var(--bg)); }
.cd b { font-weight: 850; font-size: var(--t-md); letter-spacing: -0.01em; }
.cd i { font-style: normal; font-weight: 600; font-size: var(--t-xs); margin-left: 1px; opacity: 0.8; }
.cd--today { font-weight: 850; font-size: var(--t-md); }
.countdown__what { color: color-mix(in srgb, var(--bg) 88%, transparent); }
.countdown__what a { color: inherit; text-decoration-color: color-mix(in srgb, var(--bg) 40%, transparent); }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.linkish { background: none; border: 0; padding: 0; color: var(--signal); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer; }

/* ---------- Sections ---------- */

.section {
  max-width: var(--max); margin: 0 auto; padding: clamp(56px, 7vw, 104px) var(--gutter) 0;
}
.section__head { max-width: 760px; margin-bottom: clamp(24px, 3vw, 40px); }
.section__head h2 { font-size: var(--t-2xl); line-height: 1.1; font-weight: 800; letter-spacing: -0.025em; }
.section__lede { margin-top: 10px; color: var(--ink-2); font-size: var(--t-md); max-width: 60ch; }
.section h3 { font-size: var(--t-md); font-weight: 750; letter-spacing: -0.01em; }

/* Air */
.air {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 32px);
}
.air__index { grid-column: span 5; }
.air__stations { grid-column: span 7; }
.air__chart { grid-column: span 8; }
.air__advice { grid-column: span 4; }

.air__label { font-weight: 600; color: var(--ink-2); font-size: var(--t-sm); }
.air__value { display: flex; align-items: baseline; gap: 14px; margin-top: 4px; }
#aqhi-value { font-size: clamp(4rem, 3rem + 3vw, 6rem); font-weight: 800; line-height: 0.9; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.air__risk { font-size: var(--t-xl); font-weight: 700; letter-spacing: -0.015em; }
.air__meta { font-size: var(--t-xs); color: var(--ink-3); margin-top: 10px; }

.aqhi-scale { display: grid; grid-template-columns: repeat(11, 1fr); gap: 2px; margin-top: 18px; position: relative; padding-bottom: 20px; }
.aqhi-scale i { height: 10px; }
.aqhi-scale i:first-child { border-radius: 5px 0 0 5px; }
.aqhi-scale i:nth-child(11) { border-radius: 0 5px 5px 0; }
.aqhi-scale .band { position: absolute; bottom: 0; font-size: 11px; color: var(--ink-3); }
.aqhi-scale .pin {
  position: absolute; top: -5px; width: 4px; height: 20px; border-radius: 2px; background: var(--ink);
  box-shadow: 0 0 0 2px var(--bg); transform: translateX(-50%); transition: left 0.5s cubic-bezier(.2,.8,.2,1);
}

.forecast { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 18px; border-top: 1px solid var(--rule); }
.forecast > div { padding: 10px 12px 0 0; }
.forecast > div + div { padding-left: 12px; border-left: 1px solid var(--rule); }
.forecast dt, .forecast .f-when { font-size: var(--t-xs); color: var(--ink-3); }
.forecast .f-val { font-size: var(--t-lg); font-weight: 700; font-variant-numeric: tabular-nums; }
.forecast .f-val small { font-size: var(--t-xs); font-weight: 500; color: var(--ink-2); margin-left: 4px; }

.stations { width: 100%; border-collapse: collapse; margin-top: 12px; font-variant-numeric: tabular-nums; }
.stations th { text-align: left; font-size: var(--t-xs); font-weight: 600; color: var(--ink-3); padding: 0 8px 8px 0; border-bottom: 1px solid var(--rule-strong); }
.stations td { padding: 11px 8px 11px 0; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.stations th:nth-child(n+2), .stations td:nth-child(n+2) { text-align: right; }
.stations .st-name { font-weight: 650; }
.stations .st-sub { display: block; font-size: var(--t-xs); color: var(--ink-3); font-weight: 400; }
.stations tr.is-mobile .st-name::after { content: "Mobile lab"; margin-left: 8px; font-size: 11px; font-weight: 700; color: var(--smoke); }
.aq-chip { display: inline-grid; place-items: center; min-width: 30px; height: 26px; padding: 0 7px; border-radius: 6px; font-weight: 800; font-size: var(--t-sm); }
.pm { font-weight: 650; }
.pm small { color: var(--ink-3); font-weight: 400; font-size: 11px; margin-left: 2px; }
.pm.is-high { color: var(--ember-ink); }
.air__note { font-size: var(--t-sm); color: var(--ink-2); margin-top: 14px; font-family: var(--f-serif); line-height: 1.55; }
.air__note:empty { display: none; }

.air__chart figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; font-weight: 700; font-size: var(--t-md); }
.air__chart figcaption { align-items: center; }
.chart-key { display: flex; flex-wrap: wrap; gap: 6px 4px; margin-top: 10px; }
.key-btn {
  display: inline-flex; align-items: center; gap: 7px; background: none; border: 0; cursor: pointer;
  padding: 5px 8px; border-radius: 6px; font-size: var(--t-xs); font-weight: 600; color: var(--ink-2);
}
.key-btn:hover { background: var(--surface-2); }
.key-btn i { width: 16px; height: 3px; border-radius: 2px; display: inline-block; }
.key-btn[aria-pressed="false"] { color: var(--ink-3); text-decoration: line-through; }
.key-btn[aria-pressed="false"] i { opacity: 0.3; }
.chart { position: relative; margin-top: 14px; height: 280px; }
.chart svg { width: 100%; height: 100%; overflow: visible; display: block; }
.chart .grid line { stroke: var(--rule); }
.chart .axis text { fill: var(--ink-3); font: 11px var(--f-sans); font-variant-numeric: tabular-nums; }
.chart .guide line { stroke: var(--ember); stroke-dasharray: 4 4; }
.chart .guide text { fill: var(--ember-ink); font: 600 11px var(--f-sans); }
.chart .night rect { fill: color-mix(in srgb, var(--ink) 4%, transparent); }
.chart .series path { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .hover line { stroke: var(--ink-3); }
.chart-tip {
  position: absolute; top: 0; pointer-events: none; background: var(--ink); color: var(--bg);
  border-radius: 8px; padding: 8px 10px; font-size: var(--t-xs); line-height: 1.5; white-space: nowrap;
  transform: translateX(-50%); opacity: 0; transition: opacity 0.12s; z-index: 3; font-variant-numeric: tabular-nums;
}
.chart-tip b { font-weight: 700; }
.chart-empty { height: 100%; display: grid; place-items: center; color: var(--ink-3); border: 1px dashed var(--rule-strong); border-radius: 10px; font-size: var(--t-sm); text-align: center; padding: 20px; }

.advice { display: grid; gap: 0; margin-top: 12px; border-top: 1px solid var(--rule); }
.advice > div { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.advice > div[aria-current="true"] { background: var(--smoke-wash); margin: 0 -12px; padding: 12px; border-radius: 8px; border-bottom-color: transparent; }
.advice .a-band { font-weight: 700; font-size: var(--t-sm); display: flex; align-items: center; gap: 8px; }
.advice .a-band i { width: 10px; height: 10px; border-radius: 2px; }
.advice p { font-size: var(--t-sm); color: var(--ink-2); margin-top: 4px; }
.air__source { font-size: var(--t-xs); color: var(--ink-3); margin-top: 14px; }

/* Smoke record */
.record { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.rank { border-bottom: 1px solid var(--rule); }
.rank__link {
  width: 100%; display: grid; text-decoration: none; grid-template-columns: 2.2rem minmax(0, 14rem) minmax(0, 1fr) 4.5rem; align-items: center; gap: 12px;
  padding: 10px 4px; background: none; border: 0; cursor: pointer; text-align: left; color: var(--ink); border-radius: 6px;
}
.rank__link:hover { background: var(--surface); }
.rank[aria-current="true"] .rank__link { background: var(--smoke-wash); }
.rank__n { font-weight: 800; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.rank__name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank__name small { display: block; font-size: 11px; font-weight: 500; color: var(--ink-3); }
.rank__bar { display: flex; height: 10px; border-radius: 3px; overflow: hidden; background: var(--surface-2); }
.rank__bar i { display: block; height: 100%; background: var(--smoke); border-radius: 3px; }
.rank--head { display: grid; grid-template-columns: 2.2rem minmax(0, 14rem) minmax(0, 1fr) 4.5rem; gap: 12px; padding: 0 4px 8px; font-size: var(--t-xs); font-weight: 600; color: var(--ink-3); border-bottom-color: var(--rule-strong); }
.rank__h { text-align: right; font-weight: 750; font-variant-numeric: tabular-nums; }
.rank__h small { font-weight: 500; color: var(--ink-3); font-size: 11px; }
#ranks-more { margin-top: 16px; }
.record__check { margin-top: 16px; font-family: var(--f-serif); font-size: var(--t-base); line-height: 1.55; color: var(--ink-2); max-width: 60ch; }
.record__check:empty { display: none; }
.record__note { margin-top: 24px; font-size: var(--t-sm); color: var(--ink-3); max-width: 72ch; }

.record__card { position: sticky; top: calc(var(--header-h) + 24px); border-top: 3px solid var(--ink); padding-top: 18px; }
.rc__name { font-size: var(--t-xl); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.rc__where { font-size: var(--t-sm); color: var(--ink-3); margin-top: 2px; }
.rc__big { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.rc__big b { font-size: clamp(3.5rem, 2.6rem + 2.6vw, 5rem); font-weight: 850; letter-spacing: -0.045em; line-height: 0.85; color: var(--smoke); font-variant-numeric: tabular-nums; }
.rc__big span { font-size: var(--t-base); color: var(--ink-2); line-height: 1.3; }
.rc__big strong { font-size: var(--t-xl); font-weight: 800; color: var(--ink); letter-spacing: -0.015em; }
.rc__explain { margin-top: 12px; font-family: var(--f-serif); font-size: var(--t-base); line-height: 1.55; color: var(--ink-2); }
.rc__share { margin-top: 18px; }

.cal { margin-top: 20px; }
.cal figcaption { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.cal__title { font-weight: 750; font-size: var(--t-sm); }
.cal__sum { font-size: var(--t-sm); color: var(--ink-2); }
.cal__grid { display: grid; grid-template-columns: 3.4rem repeat(24, minmax(0, 1fr)); gap: 2px; align-items: center; }
.cal__grid i { display: block; height: 14px; border-radius: 2px; background: color-mix(in srgb, var(--ink) 7%, transparent); }
.cal__grid i[data-l="likely"] { background: var(--smoke); }
.cal__grid i[data-l="possible"] { background: var(--smoke-3); }
.cal__grid i[data-l="none"] { background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 6%, transparent); }
.cal__grid i.is-now { outline: 2px solid var(--ink); outline-offset: 1px; }
.cal__day { font-size: 11px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 14px; }
.cal__hour { font-size: 11px; color: var(--ink-2); white-space: nowrap; overflow: visible; height: 16px; }
.cal__key { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; font-size: var(--t-xs); color: var(--ink-3); }
.cal__key span { display: inline-flex; align-items: center; gap: 6px; }
.cal__key i { display: inline-block; width: 12px; height: 10px; border-radius: 2px; background: color-mix(in srgb, var(--ink) 7%, transparent); }
.cal__key i[data-l="likely"] { background: var(--smoke); }
.cal__key i[data-l="possible"] { background: var(--smoke-3); }
.cal__key i[data-l="none"] { background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 12%, transparent); }
.rc__facts { margin-top: 16px; border-top: 1px solid var(--rule); }
.rc__facts > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--rule); font-size: var(--t-sm); }
.rc__facts dt { color: var(--ink-3); }
.rc__facts dd { font-weight: 650; text-align: right; }

/* Share button and panel */
.btn--share { background: var(--ink); color: var(--bg); border-color: var(--ink); padding: 11px 18px; }
.btn--share:hover { background: color-mix(in srgb, var(--ink) 86%, var(--bg)); }
.btn--share svg { width: 16px; height: 16px; stroke-width: 1.8; }

.sh {
  width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 16px;
  background: var(--surface); color: var(--ink); box-shadow: 0 24px 80px -20px rgba(0, 0, 0, 0.45); overflow: auto;
}
.sh::backdrop { background: rgba(10, 14, 18, 0.55); backdrop-filter: blur(2px); }
.sh > * { margin-left: 22px; margin-right: 22px; }
.sh__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; }
.sh__head h2 { font-size: var(--t-lg); font-weight: 800; letter-spacing: -0.015em; line-height: 1.2; }
.sh__close { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--rule); background: var(--bg); font-size: 22px; line-height: 1; cursor: pointer; color: var(--ink-2); flex-shrink: 0; }
.sh__preview { margin-top: 14px; }
.sh__preview img { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--rule); background: #11161B; }
.sh__preview.is-tall img { width: auto; max-width: 100%; max-height: 46vh; margin: 0 auto; }
.sh__preview figcaption { font-size: var(--t-xs); color: var(--ink-3); margin-top: 6px; }
.sh__label { display: block; font-size: var(--t-xs); font-weight: 700; color: var(--ink-2); margin-top: 16px; margin-bottom: 6px; }
.sh__post {
  display: block; width: calc(100% - 44px); box-sizing: border-box; resize: vertical; min-height: 140px;
  border-radius: 10px; border: 1px solid var(--rule-strong); background: var(--bg); color: var(--ink);
  font: 14px/1.5 var(--f-sans); padding: 10px 12px;
}
.sh__targets { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.sh__btn {
  border-radius: 10px; border: 1px solid var(--rule-strong); background: var(--bg); color: var(--ink);
  padding: 11px 12px; font-weight: 700; font-size: var(--t-sm); cursor: pointer; text-align: left;
}
.sh__btn:hover { border-color: var(--ink-2); }
a.sh__btn { text-decoration: none; display: flex; align-items: center; }
.sh__btn.is-dl { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.sh__btn.is-fb { background: #1877F2; border-color: #1877F2; color: #fff; }
.sh__btn.is-nd { background: #0F7A2C; border-color: #0F7A2C; color: #fff; }
.sh__btn.is-wa { background: #128C4B; border-color: #128C4B; color: #fff; }
.sh__btn.is-x { background: #0F1419; border-color: #0F1419; color: #fff; }
.sh__hint { font-size: var(--t-sm); color: var(--ink); margin-top: 10px; line-height: 1.45; }
.sh__hint:empty { display: none; }
.sh__head h2:focus { outline: none; }
.sh__hint:not(:empty) { padding: 10px 12px; border-radius: 8px; background: var(--signal-soft); }
.sh__local { font-size: var(--t-xs); color: var(--ink-3); margin-top: 10px; line-height: 1.5; }
.sh__embed { margin-top: 14px; margin-bottom: 20px; border-top: 1px solid var(--rule); padding-top: 12px; }
.sh__embed summary { cursor: pointer; font-weight: 700; font-size: var(--t-sm); }
.sh__embed p { font-size: var(--t-xs); color: var(--ink-2); margin: 8px 0; }
.sh__code {
  width: 100%; box-sizing: border-box; border-radius: 8px; border: 1px solid var(--rule-strong); background: var(--bg); color: var(--ink);
  font: 12px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; padding: 8px 10px; resize: vertical;
}
.sh__row { margin-top: 8px; }
.sh__row .sh__btn { display: inline-block; }
.sh__frame iframe { width: 100%; height: 300px; border: 0; margin-top: 12px; }
.sh > :last-child { margin-bottom: 22px; }

/* What's in the smoke */
.contents { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.contents__live, .contents__lab { border-top: 3px solid var(--ink); padding-top: 18px; }
.contents__lead { margin-top: 8px; font-family: var(--f-serif); font-size: var(--t-base); line-height: 1.6; color: var(--ink-2); max-width: 60ch; }
.gases { margin-top: 18px; display: grid; gap: 14px; }
.gas__top { display: flex; justify-content: space-between; gap: 12px; font-size: var(--t-sm); }
.gas__name { font-weight: 650; }
.gas__val { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.gas__track { position: relative; height: 8px; border-radius: 4px; background: var(--surface-2); margin-top: 6px; }
.gas__fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--signal); min-width: 3px; }
.gas__fill.is-over { background: var(--ember); }
.gas__note { font-size: 11px; color: var(--ink-3); margin-top: 4px; }
.contents__src { margin-top: 14px; font-size: var(--t-xs); color: var(--ink-3); }
.lab { width: 100%; border-collapse: collapse; margin-top: 16px; }
.lab th, .lab td { text-align: left; padding: 11px 10px 11px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.lab thead th { font-size: var(--t-xs); font-weight: 600; color: var(--ink-3); border-bottom-color: var(--rule-strong); padding-top: 0; }
.lab td { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 650; }
.lab td:last-child { color: var(--ink-3); font-weight: 500; }
.lab tbody td:nth-child(2) { color: var(--ember-ink); }
.lab__name { display: block; font-weight: 700; }
.lab__what { display: block; font-size: var(--t-xs); font-weight: 400; color: var(--ink-3); margin-top: 2px; max-width: 46ch; }
.lab-else { margin-top: 14px; }
.lab-else li { font-size: var(--t-sm); color: var(--ink-2); padding: 6px 0 6px 20px; position: relative; }
.lab-else li::before { content: ""; position: absolute; left: 2px; top: 12px; width: 8px; height: 8px; border-radius: 50%; background: #2F8F5B; }
.contents__health { margin-top: 28px; padding: 18px 22px; border-radius: 12px; background: var(--surface); border: 1px solid var(--rule); font-family: var(--f-serif); font-size: var(--t-base); line-height: 1.6; max-width: 900px; }
.contents__health a { font-family: var(--f-sans); font-size: var(--t-sm); font-weight: 600; }

/* Situation */
.situation { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.official__status { font-size: var(--t-lg); font-weight: 650; letter-spacing: -0.012em; line-height: 1.4; }
.official__status .tag {
  display: inline-block; vertical-align: 0.18em; margin-right: 10px; padding: 4px 10px; border-radius: 999px;
  font-size: var(--t-sm); font-weight: 700; letter-spacing: 0; background: color-mix(in srgb, var(--ember) 14%, transparent); color: var(--ember-ink);
}
.official__body { margin-top: 16px; font-family: var(--f-serif); font-size: var(--t-md); line-height: 1.6; color: var(--ink); max-width: 66ch; }
.official__body p + p { margin-top: 0.8em; }
.latest { margin-top: 28px; padding: 22px 24px; border-radius: 12px; background: var(--surface); border: 1px solid var(--rule); }
.latest__meta { font-size: var(--t-sm); color: var(--ink-2); }
.latest__meta strong { color: var(--ink); }
.latest__title { font-size: var(--t-lg); font-weight: 750; letter-spacing: -0.015em; margin-top: 4px; line-height: 1.25; }
.latest__body { margin-top: 10px; font-family: var(--f-serif); font-size: var(--t-base); line-height: 1.6; color: var(--ink-2); }
.latest__body p + p { margin-top: 0.7em; }
.latest a { display: inline-block; margin-top: 12px; font-weight: 600; font-size: var(--t-sm); }
.official__src { margin-top: 16px; font-size: var(--t-xs); color: var(--ink-3); }

.scale { border-top: 3px solid var(--ink); padding-top: 18px; }
.fields { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 18px 0 8px; }
.field { aspect-ratio: 150 / 65; border: 1.5px solid var(--smoke-2); border-radius: 3px; position: relative; background: var(--smoke-wash); }
.field::before { content: ""; position: absolute; top: 0; bottom: 0; left: 13%; right: 13%; border-left: 1px solid var(--smoke-3); border-right: 1px solid var(--smoke-3); }
.field::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; border-left: 1px solid var(--smoke-3); }
.figures > div { display: grid; grid-template-columns: 9.5rem 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.figures dt { font-size: var(--t-xl); font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.figures dd { font-size: var(--t-sm); color: var(--ink-2); }
.scale .btn { margin-top: 20px; }

/* Timeline */
.timeline { position: relative; }
.timeline::before { content: ""; position: absolute; left: 7.25rem; top: 8px; bottom: 8px; width: 1px; background: var(--rule-strong); }
.day { display: grid; grid-template-columns: 6.25rem 1fr; gap: 2rem; padding: 0 0 30px; position: relative; }
.day__when { text-align: right; padding-top: 1px; }
.day__n { display: block; font-weight: 800; font-size: var(--t-lg); letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.day__date { display: block; font-size: var(--t-xs); color: var(--ink-3); margin-top: 2px; }
.day::after {
  content: ""; position: absolute; left: calc(7.25rem - 5px); top: 7px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--rule-strong);
}
.day[data-heat="high"]::after { background: var(--ember); border-color: var(--ember); }
.day[data-heat="mid"]::after { background: var(--smoke-2); border-color: var(--smoke-2); }
.day.is-today::after { background: var(--ink); border-color: var(--ink); }
.day__events { display: grid; gap: 14px; }
.day.is-older { display: none; }
.timeline.is-expanded .day.is-older { display: grid; }
.tl-more { margin: 4px 0 0 calc(6.25rem + 2rem); }
.ev__src { font-size: var(--t-xs); color: var(--ink-3); font-weight: 600; }
.ev__src.is-city { color: var(--signal); }
.ev__src.is-data { color: var(--smoke); }
.ev__text { font-family: var(--f-serif); font-size: var(--t-md); line-height: 1.5; margin-top: 2px; max-width: 62ch; }
.ev__text a { font-family: var(--f-sans); font-size: var(--t-sm); font-weight: 600; margin-left: 4px; white-space: nowrap; }

.day__pm { font-size: var(--t-xs); color: var(--ink-3); }
.day__pm b { color: var(--ink); font-weight: 750; font-variant-numeric: tabular-nums; }
.day__pm b.is-over { color: var(--ember-ink); }

.tl-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); gap: clamp(32px, 5vw, 80px); align-items: start; }
.tl-aside { align-self: stretch; }
.tl-sticky { position: sticky; top: calc(var(--header-h) + 28px); border-top: 3px solid var(--ink); padding-top: 18px; }
.tl-cap, .tl-note { font-size: var(--t-xs); color: var(--ink-3); margin-top: 6px; line-height: 1.5; }
.tl-note { margin-top: 12px; }
.tl-chart { margin-top: 26px; }
.tl-plot { position: relative; height: 220px; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; align-items: end; border-bottom: 1px solid var(--rule-strong); }
.tl-guide { position: absolute; left: 0; right: 0; border-top: 1.5px dashed var(--ember); z-index: 1; pointer-events: none; }
.tl-guide span { position: absolute; right: 0; top: -17px; font-size: 11px; font-weight: 700; color: var(--ember-ink); }
.tl-col { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; background: none; border: 0; padding: 0; cursor: pointer; position: relative; }
.tl-bar { display: block; background: var(--smoke-3); border-radius: 3px 3px 0 0; position: relative; transition: background-color 0.2s; }
.tl-col.is-over .tl-bar { background: color-mix(in srgb, var(--ember) 70%, var(--bg)); }
.tl-col:hover .tl-bar, .tl-col.is-active .tl-bar { background: var(--ink); }
.tl-col.is-over:hover .tl-bar, .tl-col.is-over.is-active .tl-bar { background: var(--ember); }
.tl-val { position: absolute; bottom: calc(100% + 3px); left: 50%; transform: translateX(-50%); font-size: 10px; font-weight: 700; color: var(--ink); opacity: 0; font-variant-numeric: tabular-nums; }
.tl-col:hover .tl-val, .tl-col.is-active .tl-val, .tl-col:focus-visible .tl-val { opacity: 1; }
.tl-day { position: absolute; top: calc(100% + 5px); left: 0; right: 0; text-align: center; font-size: 10px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tl-col:nth-child(odd):not(.is-active) .tl-day { visibility: hidden; }
.tl-col.is-active .tl-day { color: var(--ink); font-weight: 700; }
.tl-axis { display: flex; justify-content: space-between; margin-top: 22px; font-size: 11px; color: var(--ink-3); }

/* Background */
.bg { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(24px, 5vw, 80px); align-items: start; }
.bg__story p { font-family: var(--f-serif); font-size: var(--t-md); line-height: 1.65; max-width: 62ch; }
.bg__story p + p { margin-top: 1em; }
.bg a, .legal a { font-family: var(--f-sans); font-size: var(--t-xs); font-weight: 700; margin-left: 2px; white-space: nowrap; }
.reading { margin-top: 24px; border-top: 1px solid var(--rule); }
.reading summary { cursor: pointer; padding: 14px 0; font-weight: 650; font-size: var(--t-sm); color: var(--ink-2); }
.reading summary:hover { color: var(--ink); }
.reading li { padding: 8px 0; border-top: 1px solid var(--rule); font-size: var(--t-sm); }
.reading li a { font-size: var(--t-sm); font-weight: 600; margin: 0; white-space: normal; }
.reading li span { display: block; color: var(--ink-3); font-size: var(--t-xs); }
.legal { border-top: 3px solid var(--ink); }
.legal li { display: grid; grid-template-columns: 9.5rem 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.legal__when { font-weight: 750; font-size: var(--t-sm); padding-top: 1px; }
.legal li > p:last-child { font-size: var(--t-sm); color: var(--ink-2); line-height: 1.55; }

/* Coverage */
.coverage { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.chip {
  border: 1px solid var(--rule-strong); background: transparent; border-radius: 999px; padding: 7px 14px;
  font-size: var(--t-sm); font-weight: 600; cursor: pointer; color: var(--ink-2);
}
.chip:hover { border-color: var(--ink-2); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.stories > li { border-bottom: 1px solid var(--rule); }
.story { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 16px 0; text-decoration: none; color: inherit; }
.story__meta { font-size: var(--t-xs); color: var(--ink-3); grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; }
.story__outlet { font-weight: 700; color: var(--ink-2); }
.story__title { font-size: var(--t-md); font-weight: 650; line-height: 1.3; letter-spacing: -0.008em; text-wrap: pretty; }
.story:hover .story__title { color: var(--signal); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.story__topic { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.story__topic[data-t="fire"] { background: var(--ember); }
.story__topic[data-t="air"] { background: var(--smoke-2); }
.story__topic[data-t="court"] { background: var(--signal); }
.story__summary { grid-column: 1 / -1; font-family: var(--f-serif); font-size: var(--t-sm); color: var(--ink-2); line-height: 1.5; }
#more-stories { margin-top: 20px; }

.releases { border-top: 3px solid var(--ink); padding-top: 18px; }
.release-list { margin-top: 10px; }
.release-list li { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.release-list a { display: block; text-decoration: none; color: var(--ink); font-weight: 600; font-size: var(--t-base); line-height: 1.35; }
.release-list a:hover { color: var(--signal); text-decoration: underline; }
.release-list time { display: block; font-size: var(--t-xs); color: var(--ink-3); margin-bottom: 2px; font-variant-numeric: tabular-nums; }

.media { margin-top: clamp(40px, 5vw, 64px); }
.media__h { margin-bottom: 14px; }
.photos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.photo { margin: 0; }
.photo a { display: block; border-radius: 10px; overflow: hidden; background: var(--surface-2); aspect-ratio: 4 / 3; }
.photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.photo a:hover img { transform: scale(1.03); }
.photo figcaption { font-size: var(--t-xs); color: var(--ink-2); margin-top: 8px; line-height: 1.4; }
.photo figcaption span { color: var(--ink-3); display: block; }

.videos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.video__frame { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; }
.video__frame img { width: 100%; height: 100%; object-fit: cover; opacity: 0.88; }
.video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video__play {
  position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(17, 22, 27, 0.72); display: grid; place-items: center;
}
.video__play svg { width: 22px; height: 22px; fill: #fff; margin-left: 3px; }
.video__play:hover { background: var(--ember); }
.video__t { font-weight: 650; font-size: var(--t-sm); margin-top: 8px; line-height: 1.35; }
.video__m { font-size: var(--t-xs); color: var(--ink-3); }

.social { columns: 3 320px; column-gap: 16px; }
.social > * { break-inside: avoid; margin-bottom: 16px; }
.post {
  display: block; padding: 16px 18px; border-radius: 12px; border: 1px solid var(--rule); background: var(--surface);
  text-decoration: none; color: inherit;
}
.post:hover { border-color: var(--rule-strong); }
.post__who { display: flex; align-items: baseline; gap: 8px; font-size: var(--t-sm); }
.post__who strong { font-weight: 700; }
.post__who span { color: var(--ink-3); }
.post__text { margin-top: 8px; font-family: var(--f-serif); font-size: var(--t-base); line-height: 1.5; }
.post__foot { margin-top: 10px; font-size: var(--t-xs); color: var(--ink-3); display: flex; justify-content: space-between; gap: 8px; }
.post__net { font-weight: 700; color: var(--ink-2); }

/* Help */
.help { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.checklist { counter-reset: none; }
.checklist li { position: relative; padding: 12px 0 12px 34px; border-bottom: 1px solid var(--rule); font-size: var(--t-md); line-height: 1.45; }
.checklist li::before {
  content: ""; position: absolute; left: 2px; top: 15px; width: 18px; height: 18px; border-radius: 5px;
  border: 1.5px solid var(--ink-2);
}
.checklist li::after {
  content: ""; position: absolute; left: 8px; top: 18px; width: 6px; height: 10px;
  border: solid var(--ink); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.help__who { margin-top: 18px; font-family: var(--f-serif); font-size: var(--t-md); line-height: 1.55; color: var(--ink-2); }
.call { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; padding: 20px 0; border-top: 3px solid var(--ink); }
.call + .call { margin-top: 12px; }
.call--urgent { border-top-color: var(--ember); }
.call__num a { font-size: clamp(2.75rem, 2rem + 2vw, 3.75rem); font-weight: 850; letter-spacing: -0.04em; line-height: 0.9; color: var(--ink); text-decoration: none; font-variant-numeric: tabular-nums; }
.call--urgent .call__num a { color: var(--ember); }
.call__what { font-size: var(--t-sm); color: var(--ink-2); line-height: 1.5; padding-top: 4px; }
.call__what strong { color: var(--ink); }

.faq { margin-top: clamp(40px, 5vw, 64px); max-width: 860px; }
.faq h3 { margin-bottom: 10px; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  list-style: none; cursor: pointer; padding: 16px 40px 16px 0; font-weight: 650; font-size: var(--t-md); position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; margin-top: -6px;
  background: linear-gradient(var(--ink-2), var(--ink-2)) center / 12px 2px no-repeat, linear-gradient(var(--ink-2), var(--ink-2)) center / 2px 12px no-repeat;
  transition: transform 0.2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 18px; font-family: var(--f-serif); font-size: var(--t-md); line-height: 1.6; color: var(--ink-2); max-width: 66ch; }

/* For reporters and researchers */
.data { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.data__col { border-top: 3px solid var(--ink); padding-top: 18px; }
.dl { margin-top: 10px; }
.dl li { padding: 11px 0; border-bottom: 1px solid var(--rule); }
.dl a { font-weight: 700; }
.dl span { display: block; font-size: var(--t-sm); color: var(--ink-2); margin-top: 2px; }
.data__note { margin-top: 14px; font-size: var(--t-xs); color: var(--ink-3); line-height: 1.5; }
.data__note code { font-size: 12px; color: var(--ink-2); background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.emb { margin-top: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
.emb__name { font-weight: 700; margin-bottom: 8px; }
.emb__row { display: flex; gap: 12px; align-items: center; margin-top: 8px; font-size: var(--t-sm); }

/* About */
.about__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(24px, 4vw, 64px); }
.about__method p { font-family: var(--f-serif); font-size: var(--t-md); line-height: 1.6; color: var(--ink-2); max-width: 60ch; }
.about__method p + p { margin-top: 1em; }
.sources li { padding: 11px 0; border-bottom: 1px solid var(--rule); font-size: var(--t-sm); color: var(--ink-2); }
.sources li:first-child { border-top: 1px solid var(--rule); }
.sources strong { display: block; color: var(--ink); font-weight: 650; }
.src-state { font-size: var(--t-xs); color: var(--ink-3); }
.src-state::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin: 0 6px 1px 8px; background: var(--rule-strong); }
.src-state[data-ok="true"]::before { background: #2F8F5B; }
.src-state[data-ok="stale"]::before { background: #C98A1B; }
.src-state[data-ok="false"]::before { background: var(--ember); }

/* Footer */
.footer { margin-top: clamp(64px, 8vw, 120px); border-top: 1px solid var(--rule); }
.footer__inner {
  max-width: var(--max); margin: 0 auto; padding: 28px var(--gutter);
  display: grid; grid-template-columns: 1fr auto; gap: 12px 32px; align-items: center;
}
.footer__legal { font-size: var(--t-xs); color: var(--ink-3); }

/* "Built by" credit strip at the very bottom */
.credit { border-top: 1px solid var(--rule); padding: 14px var(--gutter) 16px; text-align: center; }
.credit a {
  display: inline-flex; align-items: baseline; gap: 8px; padding: 8px 0;
  font-size: 12.5px; color: var(--ink-3); text-decoration: none;
}
.credit a:hover { color: var(--ink); }
.credit .au-logo { --logo-h: 1.05em; opacity: 0.8; }
.credit a:hover .au-logo { opacity: 1; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; z-index: 60;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px; font-size: var(--t-sm); font-weight: 600;
  transition: opacity 0.2s, transform 0.2s; pointer-events: none;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
  .nav { display: none; }
  .air__index { grid-column: span 12; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 32px; }
  .air__index > .forecast { grid-column: 2; grid-row: 1 / span 4; align-self: start; margin-top: 0; }
  .air__stations, .air__chart, .air__advice { grid-column: span 12; }
  .tl-wrap { grid-template-columns: minmax(0, 1fr); }
  .tl-aside { order: -1; }
  .tl-sticky { position: static; }
  .photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  :root { --header-h: 56px; }
  .status { padding-left: 14px; }
  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "head" "check" "map" "facts";
  }
  .hero__headline { min-height: 0; }
  .hero__map { margin-top: 20px; }
  .map { height: 62svh; min-height: 380px; }
  .situation, .coverage, .help, .about__grid, .bg, .record, .contents, .data { grid-template-columns: minmax(0, 1fr); }
  .record__card { position: static; order: -1; }
  .legal li { grid-template-columns: 1fr; gap: 2px; }
  .videos { grid-template-columns: minmax(0, 1fr); }
  .air__index { display: block; }
  .air__index > .forecast { margin-top: 18px; }
  .footer__inner { grid-template-columns: 1fr; }
  .footer__share { justify-self: start; }
}

@media (max-width: 560px) {
  .brand__name { font-size: 15px; }
  .brand__mark { width: 26px; height: 26px; }
  .brand { column-gap: 8px; }
  .brand__credit { font-size: 10.5px; }
  .brand__city, .status__src, .day__wd { display: none; }
  .masthead__inner { gap: 14px; }
  .status { font-size: var(--t-xs); }
  .map-legend { font-size: 11px; padding: 6px 10px; gap: 2px 10px; }
  .timeline::before { left: 4.6rem; }
  .day { grid-template-columns: 3.6rem 1fr; gap: 1.6rem; }
  .day::after { left: calc(4.6rem - 5px); }
  .tl-more { margin-left: calc(3.6rem + 1.6rem); }
  .figures > div { grid-template-columns: 1fr; gap: 2px; }
  .photos { grid-template-columns: minmax(0, 1fr); }
  .stations .st-sub { display: none; }
  .check__row .btn span { display: none; }
  .rank__link { grid-template-columns: 1.8rem minmax(0, 1fr) 3.2rem; }
  .rank--head { grid-template-columns: 1.8rem minmax(0, 1fr) 3.2rem; }
  .rank--head span:nth-child(3) { display: none; }
  .rc__facts > div { flex-direction: column; gap: 2px; }
  .pulse { gap: 12px; margin-top: 18px; }
  .pulse dt { font-size: var(--t-lg); }
  .pulse__def { display: none; }
  .rc__facts dd { text-align: left; }
  .cal__grid { grid-template-columns: 2.9rem repeat(24, minmax(0, 1fr)); gap: 1px; }
  .cal__grid i { height: 10px; }
  .sh > * { margin-left: 16px; margin-right: 16px; }
  .sh__post { width: calc(100% - 32px); }
  .rank__bar { grid-column: 2 / -1; grid-row: 2; }
  .countdown__inner { gap: 6px 16px; padding-top: 7px; padding-bottom: 7px; }
  .countdown { font-size: var(--t-xs); }
  .cd b { font-size: var(--t-base); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
