/* Good Air web: the app's design language for the air quality, alerts, guide, tracker and blog pages.
   Tokens follow the iOS app: system font, black/white canvases, AQI hues from AQIHue, glass chrome. */
:root {
  --bg: #ffffff; --bg2: #f2f2f7; --text: #000000; --text2: rgba(60, 60, 67, .78); --muted: #8a8a8e;
  --line: rgba(60, 60, 67, .16); --card: #f2f2f7; --card2: #e9e9ee; --elev: #ffffff;
  --accent: #007aff; --btn-bg: #000; --btn-text: #fff;
  --glass: rgba(255, 255, 255, .72); --glass-line: rgba(0, 0, 0, .07); --shadow: 0 10px 30px rgba(0, 0, 0, .10);
  --ok: #24a148; --care: #b98900; --limit: #e26a00; --avoid: #d92d20;
  --wrap: 760px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000; --bg2: #000000; --text: #ffffff; --text2: rgba(235, 235, 245, .78); --muted: #8d8d93;
    --line: rgba(84, 84, 88, .55); --card: #1c1c1e; --card2: #2c2c2e; --elev: #1c1c1e;
    --accent: #0a84ff; --btn-bg: #fff; --btn-text: #000;
    --glass: rgba(28, 28, 30, .66); --glass-line: rgba(255, 255, 255, .09); --shadow: 0 10px 30px rgba(0, 0, 0, .5);
    --ok: #32d74b; --care: #ffd60a; --limit: #ff9f0a; --avoid: #ff453a;
  }
}

/* AQI hues (AQIHue in the app): base/glow/acc/fg drive the dark hero, tint/glowL the light one,
   badge/ink the rounded-square number badges. */
.h-blue    { --base: #030514; --glow: #2e85ff; --acc: #144dd1; --fg: #73b8ff; --tint: #e0edff; --glowL: #599efa; --badge: #4da6fa; --ink: #fff; --deep: #1f5fae; }
.h-green   { --base: #030a03; --glow: #14eb4d; --acc: #0da62e; --fg: #59ff8c; --tint: #e0f7e0; --glowL: #47e06b; --badge: #2ecc59; --ink: #062110; --deep: #13843a; }
.h-yellow  { --base: #0f0d00; --glow: #ffb80d; --acc: #d18000; --fg: #ffd947; --tint: #fff7db; --glowL: #f2bf26; --badge: #f2bf1a; --ink: #241a00; --deep: #9a6f00; }
.h-orange  { --base: #120800; --glow: #ff8014; --acc: #d14700; --fg: #ffa652; --tint: #ffeddb; --glowL: #ff8c26; --badge: #fa801a; --ink: #fff; --deep: #b54e00; }
.h-red     { --base: #0f0303; --glow: #ff5214; --acc: #b8140a; --fg: #ff8047; --tint: #ffe6e0; --glowL: #f24d38; --badge: #eb402e; --ink: #fff; --deep: #b3261a; }
.h-crimson { --base: #0d0300; --glow: #fa330d; --acc: #a60d05; --fg: #ff6b38; --tint: #ffe0d1; --glowL: #ff6126; --badge: #d92614; --ink: #fff; --deep: #a31b0c; }
.h-purple  { --base: #0d030f; --glow: #b84ddb; --acc: #701f94; --fg: #db9ef5; --tint: #f2e6f7; --glowL: #a859b8; --badge: #9947a3; --ink: #fff; --deep: #7a3384; }
.h-maroon  { --base: #0f0005; --glow: #bd1442; --acc: #6b051f; --fg: #ff7594; --tint: #f7e0e6; --glowL: #a3193d; --badge: #8c0d29; --ink: #fff; --deep: #8c0d29; }
.h-none    { --base: #0b0b0d; --glow: #5a5a62; --acc: #2c2c30; --fg: #c7c7cc; --tint: #f2f2f7; --glowL: #c7c7cc; --badge: #8e8e93; --ink: #fff; --deep: #6e6e73; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.47 -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; letter-spacing: -.01em; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.small { font-size: 14px; }
.muted { color: var(--muted); }

/* ---------- header: glass bar with a segmented control ---------- */
.top { position: sticky; top: 0; z-index: 40; background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(22px); backdrop-filter: saturate(180%) blur(22px); border-bottom: 1px solid var(--glass-line); }
.top-in { max-width: 1120px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-weight: 700; font-size: 17px; flex: none; letter-spacing: -.02em; }
.logo:hover { text-decoration: none; }
.logo img { border-radius: 8px; box-shadow: 0 0 0 1px var(--glass-line); }
.nav { display: flex; gap: 2px; padding: 3px; margin: 0 auto; border-radius: 999px; background: var(--card); }
.nav a { color: var(--text); font-size: 14px; font-weight: 600; padding: 7px 14px; border-radius: 999px; white-space: nowrap; }
.nav a:hover { text-decoration: none; background: var(--card2); }
.nav a[aria-current] { background: var(--elev); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
@media (prefers-color-scheme: dark) { .nav a[aria-current] { background: #3a3a3c; } }
.get-app { flex: none; background: var(--btn-bg); color: var(--btn-text); font-size: 14px; font-weight: 700; padding: 8px 16px; border-radius: 999px; }
.get-app:hover { text-decoration: none; opacity: .85; }
/* Header search: an icon on every page that opens the city search under the bar. */
.hs-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 999px; background: var(--card); color: var(--text); }
.hs-btn svg { width: 19px; height: 19px; fill: currentColor; }
.hs-btn:hover, .hs-btn[aria-expanded="true"] { text-decoration: none; background: var(--card2); }
.hsearch { max-width: 1120px; margin: 0 auto; padding: 2px 20px 12px; }
.hsearch .search { max-width: 640px; margin: 0 auto; box-shadow: none; }

/* phones: the nav moves to a floating glass tab bar, like the app */
.tabbar { display: none; }
@media (max-width: 760px) {
  .top-in { padding: 9px 16px; }
  .nav { display: none; }
  .hs-btn { margin-left: auto; }
  .hsearch { padding: 2px 16px 10px; }
  .tabbar { display: flex; position: fixed; z-index: 45; left: 50%; bottom: calc(10px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(420px, calc(100% - 24px)); justify-content: space-between; padding: 6px; border-radius: 999px; background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); border: 1px solid var(--glass-line); box-shadow: var(--shadow); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px 5px; border-radius: 999px; color: var(--text); font-size: 10.5px; font-weight: 600; letter-spacing: 0; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar a[aria-current] { color: var(--accent); background: rgba(120, 120, 128, .16); }
  .tabbar svg { width: 22px; height: 22px; fill: currentColor; }
}

/* ---------- layout & type ---------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 14px 20px 110px; }
.wrap.wide { max-width: 1000px; }
h1 { font-size: clamp(30px, 4.6vw, 40px); line-height: 1.1; font-weight: 700; letter-spacing: -.03em; margin: 6px 0 10px; }
h2 { font-size: 23px; line-height: 1.25; font-weight: 700; letter-spacing: -.022em; margin: 56px 0 14px; }
h3 { font-size: 18px; font-weight: 650; margin: 24px 0 8px; }
p { margin: 0 0 14px; }
ul, ol { padding-left: 22px; margin: 0 0 14px; }
li { margin-bottom: 6px; }
.lead { font-size: 19px; line-height: 1.5; color: var(--text2); margin-bottom: 24px; letter-spacing: -.015em; }
.lead a, .lead b { color: var(--text); font-weight: 650; }
.kicker { font-size: 13px; font-weight: 600; color: var(--muted); margin: 8px 0 0; letter-spacing: 0; }
.kicker a { color: inherit; }
.more { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; margin: 6px 18px 6px 0; }
section { margin-top: 6px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } .wrap { padding: 10px 16px 120px; } h2 { margin-top: 44px; } }
.link-row { margin-top: 18px; }

.crumbs ol { list-style: none; padding: 0; margin: 2px 0 8px; display: flex; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "›"; margin: 0 7px; opacity: .6; }
.crumbs a { color: var(--muted); }

/* ---------- immersive hero (MetalAQIBackground on the web) ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; color: #fff; border-radius: 30px; padding: 26px 26px 24px; margin: 4px 0 18px; min-height: 470px; display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(42% 75% at 50% -12%, color-mix(in srgb, var(--glow) 90%, transparent), transparent 72%),
    radial-gradient(70% 55% at 18% 8%, color-mix(in srgb, var(--acc) 60%, transparent), transparent 72%),
    radial-gradient(60% 50% at 88% 22%, color-mix(in srgb, var(--acc) 38%, transparent), transparent 70%),
    var(--base); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,.35), transparent 50%), radial-gradient(1px 1px at 70% 18%, rgba(255,255,255,.25), transparent 50%), radial-gradient(1px 1px at 85% 60%, rgba(255,255,255,.2), transparent 50%), radial-gradient(1px 1px at 35% 70%, rgba(255,255,255,.18), transparent 50%); }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.glass-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; font-size: 13px; font-weight: 600; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .14); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); color: inherit; }
.glass-chip svg { width: 15px; height: 15px; fill: currentColor; }
.insight { font-size: clamp(29px, 5.4vw, 42px); line-height: 1.16; font-weight: 500; letter-spacing: -.028em; margin: 20px 0 0; max-width: 17em; opacity: .92; }
.hero-num-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 34px; }
.hero-num { font-size: clamp(92px, 17vw, 128px); line-height: .82; font-weight: 400; letter-spacing: -.05em; color: var(--fg); font-variant-numeric: tabular-nums; }
.hero-num small { font-size: 26px; font-weight: 500; letter-spacing: -.01em; margin-left: 10px; }
.glass-btn { flex: none; display: grid; place-items: center; width: 66px; height: 50px; border-radius: 999px; color: inherit; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .16); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.glass-btn:hover { text-decoration: none; background: rgba(255, 255, 255, .22); }
.glass-btn svg { width: 22px; height: 22px; fill: currentColor; }
.hero h1 { font-size: 22px; line-height: 1.25; font-weight: 650; letter-spacing: -.02em; margin: 16px 0 2px; }
.hero h1 span { opacity: .7; font-weight: 500; }
.hero-meta { font-size: 15px; margin: 0; opacity: .66; }
.hero-meta svg { width: 12px; height: 12px; fill: currentColor; vertical-align: -1px; margin-right: 4px; }
.rainbow { position: relative; height: 5px; border-radius: 9px; margin: 20px 0 2px; }
.rainbow.naqi { background: linear-gradient(90deg, #4da6fa 0 8%, #2ecc59 18%, #f2bf1a 36%, #fa801a 55%, #eb402e 72%, #d92614 92%); }
.rainbow.usAqi, .rainbow.mee { background: linear-gradient(90deg, #4da6fa 0, #2ecc59 8%, #f2bf1a 22%, #fa801a 34%, #eb402e 46%, #9947a3 64%, #8c0d29 92%); }
.rainbow i { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px rgba(0, 0, 0, .22), 0 2px 8px rgba(0, 0, 0, .3); }
.hero-second { font-size: 14px; font-weight: 600; opacity: .8; margin: 6px 0 0; }
.hero.compact { min-height: 0; }
.hero.compact .insight { font-size: clamp(24px, 4vw, 32px); }
@media (prefers-color-scheme: light) {
  .hero { color: #000; background:
    radial-gradient(42% 75% at 50% -12%, color-mix(in srgb, var(--glowL) 75%, transparent), transparent 72%),
    radial-gradient(70% 55% at 18% 8%, color-mix(in srgb, var(--glowL) 34%, transparent), transparent 72%),
    var(--tint); }
  .hero::after { display: none; }
  .hero-num { color: var(--deep); }
  .glass-chip, .glass-btn { background: rgba(255, 255, 255, .62); border-color: rgba(0, 0, 0, .06); }
  .glass-btn:hover { background: rgba(255, 255, 255, .85); }
}
@media (max-width: 760px) {
  .hero { margin-left: -16px; margin-right: -16px; border-radius: 0 0 30px 30px; padding: 20px 20px 22px; min-height: 520px; margin-top: 2px; }
}

/* ---------- badges (rounded squares, like the app's ranking rows) ---------- */
.bdg { display: inline-grid; place-items: center; min-width: 48px; height: 48px; padding: 0 8px; border-radius: 13px; background: var(--badge); color: var(--ink); font-weight: 700; font-size: 18px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; flex: none; }
.bdg.sm { min-width: 38px; height: 34px; border-radius: 10px; font-size: 15px; padding: 0 6px; }
.pill { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-weight: 600; font-size: 14px; color: var(--text); }
.pill b { display: inline-grid; place-items: center; min-width: 40px; height: 30px; padding: 0 7px; border-radius: 9px; background: var(--badge); color: var(--ink); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pill em { font-style: normal; color: var(--muted); font-weight: 500; font-size: 13.5px; }
.pill.none b { background: var(--card2); color: var(--muted); }
.chip-n { display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 6px; border-radius: 7px; background: var(--badge); color: var(--ink); font-size: 12.5px; font-weight: 700; margin-left: 6px; }
.chip-n.plain { background: var(--card2); color: var(--text); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--b, var(--badge)); margin-right: 8px; vertical-align: 1px; }
.sw { display: inline-block; width: 13px; height: 13px; border-radius: 4px; background: var(--b); margin-right: 9px; vertical-align: -1px; }

/* ---------- ranking rows (LeaderboardView) ---------- */
.list { list-style: none; padding: 0; margin: 4px 0 12px; counter-reset: r; }
.list li { counter-increment: r; margin: 0; }
.list li a { display: flex; align-items: center; gap: 14px; padding: 9px 4px 9px 0; color: var(--text); border-bottom: 1px solid var(--line); }
.list li:last-child a { border-bottom: 0; }
.list:has(+ details.show-all) li:last-child a { border-bottom: 1px solid var(--line); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.list li a::before { content: counter(r, decimal-leading-zero); width: 26px; flex: none; text-align: center; color: var(--muted); font-size: 16px; font-variant-numeric: tabular-nums; }
.list.medals li:nth-child(1) a::before { content: "🥇"; }
.list.medals li:nth-child(2) a::before { content: "🥈"; }
.list.medals li:nth-child(3) a::before { content: "🥉"; }
.list li a::after { content: "›"; color: var(--muted); opacity: .6; font-size: 22px; margin-left: 2px; }
.list li a:hover { text-decoration: none; }
.list li a:hover .list-name b { text-decoration: underline; }
.list-name { flex: 1; min-width: 0; }
.list-name b { display: block; font-size: 17px; font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-name small { display: block; font-size: 14px; color: var(--muted); line-height: 1.3; }
.grid-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); column-gap: 32px; }

.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.seg a { padding: 8px 15px; border-radius: 999px; font-size: 14.5px; font-weight: 600; color: var(--text); background: var(--card); }
.seg a:hover { text-decoration: none; background: var(--card2); }
.seg a.on { background: var(--btn-bg); color: var(--btn-text); }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; margin: 0 0 14px; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: 16px; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
thead th { font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: 0; white-space: nowrap; border-bottom: 1px solid var(--line); }
table.rank td:first-child { color: var(--muted); font-variant-numeric: tabular-nums; width: 1%; white-space: nowrap; }
table.rank td a { color: var(--text); font-weight: 600; }
table.data td:first-child { font-weight: 600; }
th[data-sort] { cursor: pointer; user-select: none; }
th[data-sort]::after { content: " ↕"; opacity: .35; }
th[aria-sort="ascending"]::after { content: " ↑"; opacity: .8; }
th[aria-sort="descending"]::after { content: " ↓"; opacity: .8; }
caption { text-align: left; color: var(--muted); font-size: 13px; padding-bottom: 6px; }
.acts { list-style: none; margin: 0 0 14px; padding: 2px 20px; background: var(--card); border-radius: 24px; }
.acts li { margin: 0; padding: 15px 0 16px; border-bottom: 1px solid var(--line); }
.acts li:last-child { border-bottom: 0; }
.act-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.act-h h3 { font-size: 16px; font-weight: 650; letter-spacing: -.01em; margin: 0; line-height: 1.3; }
.acts p { margin: 6px 0 0; font-size: 15px; line-height: 1.45; color: var(--text2); }
.st { display: inline-block; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.st.ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.st.care { background: color-mix(in srgb, var(--care) 18%, transparent); color: color-mix(in srgb, var(--care) 75%, var(--text)); }
.st.limit { background: color-mix(in srgb, var(--limit) 16%, transparent); color: var(--limit); }
.st.avoid { background: color-mix(in srgb, var(--avoid) 14%, transparent); color: var(--avoid); }
@media (max-width: 560px) { .act td:last-child { font-size: 14.5px; } table { font-size: 15px; } th, td { padding: 9px 6px; } }

/* ---------- grouped content (cards, tiles) ---------- */
.health { background: var(--card); border-radius: 22px; padding: 16px 20px; font-size: 16.5px; line-height: 1.5; color: var(--text2); margin: 0 0 8px; }
.cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.cards li { margin: 0; }
.cards a { display: flex; flex-direction: column; gap: 4px; height: 100%; background: var(--card); color: var(--text); padding: 18px; border-radius: 24px; transition: transform .2s ease; }
.cards a:hover { text-decoration: none; transform: translateY(-2px); }
.cards b { font-size: 18px; line-height: 1.28; letter-spacing: -.02em; }
.cards span { font-size: 14.5px; color: var(--muted); }
.card-cat { font-size: 12.5px !important; font-weight: 650; color: var(--accent) !important; }
.list-cards { grid-template-columns: 1fr; }
.country-cards { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.cols { list-style: none; padding: 0; columns: 3 150px; column-gap: 28px; }
.cols li { break-inside: avoid; padding: 4px 0; }
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { margin: 0; }
.chips a, .chips > li > span { display: inline-flex; align-items: center; background: var(--card); color: var(--text); padding: 7px 8px 7px 14px; border-radius: 999px; font-size: 15px; font-weight: 600; }
.chips a:hover { background: var(--card2); text-decoration: none; }
.chips small { color: var(--muted); font-weight: 500; margin-left: 6px; }
.stations { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 32px; }
.stations li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); margin: 0; font-size: 15.5px; }
.stations li small { color: var(--muted); text-align: right; }
.facts, .pols { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 0 0 10px; }
.facts li, .pol { background: var(--card); border-radius: 20px; padding: 14px 16px; margin: 0; }
.facts b { display: block; font-size: 30px; line-height: 1.1; font-weight: 600; letter-spacing: -.03em; }
.facts span { font-size: 13.5px; color: var(--muted); }
.pol b { display: block; font-size: 14px; color: var(--muted); font-weight: 600; }
.pol span { display: block; font-size: 30px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.pol small { color: var(--muted); font-size: 12.5px; }

.dist { display: flex; height: 8px; border-radius: 999px; overflow: hidden; gap: 2px; margin: 6px 0 8px; }
.dist span { background: var(--b); }
.dist-legend { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13.5px; color: var(--muted); }
.dist-legend li { margin: 0; }
.dist-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--b); margin-right: 6px; }
.dist-legend b { color: var(--text); }

/* AQI scale: coloured bars with the range and name under each */
.scale { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; margin: 14px 0 18px; }
.scale-seg { display: block; min-width: 0; color: var(--muted); padding: 0 2px 0 0; }
.scale-seg::before { content: ""; display: block; height: 6px; border-radius: 6px; background: var(--b); margin-bottom: 9px; }
.scale.has-on .scale-seg::before { opacity: .32; }
.scale.has-on .scale-seg.on::before { opacity: 1; height: 10px; margin: -2px 0 7px; }
.scale-seg b { display: block; font-size: 12.5px; font-weight: 650; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.scale-seg span { display: block; font-size: 11.5px; line-height: 1.25; margin-top: 1px; }
.scale.has-on .scale-seg:not(.on) b { color: var(--muted); font-weight: 600; }
.scale-seg.on span { color: var(--text); font-weight: 600; }
a.scale-seg:hover { text-decoration: none; }
@media (max-width: 480px) { .scale { gap: 3px; } .scale-seg b { font-size: 11px; white-space: nowrap; letter-spacing: -.02em; } .scale-seg span { font-size: 10.5px; } }
a.scale-seg:hover::before { opacity: .7; }
a.scale-seg:hover b { color: var(--text); }

/* AQI range page header: the app's light tint, no duplicate colour block */
.range-hero { position: relative; overflow: hidden; border-radius: 30px; padding: 28px 28px 14px; margin: 4px 0 8px; background: radial-gradient(70% 90% at 85% -20%, color-mix(in srgb, var(--glowL) 40%, transparent), transparent 70%), var(--tint); }
.range-hero .kicker { margin: 0 0 10px; color: color-mix(in srgb, var(--deep) 80%, var(--text)); }
.range-hero h1 { margin: 0 0 14px; max-width: 15em; }
.range-hero h1 b { display: block; font-weight: inherit; color: var(--deep); }
.range-hero .lead { color: var(--text); opacity: .8; max-width: 34em; }
.range-hero .scale { margin-bottom: 14px; }
@media (prefers-color-scheme: dark) {
  .range-hero { background: radial-gradient(70% 90% at 85% -20%, color-mix(in srgb, var(--glow) 45%, transparent), transparent 70%), var(--base); color: #fff; }
  .range-hero h1 b { color: var(--fg); }
  .range-hero .kicker { color: var(--fg); }
  .range-hero .lead { color: #fff; }
  .range-hero .scale-seg { color: rgba(255, 255, 255, .6); }
  .range-hero .scale-seg b, .range-hero .scale-seg.on span { color: #fff; }
  .range-hero .scale.has-on .scale-seg:not(.on) b { color: rgba(255, 255, 255, .6); }
}
@media (max-width: 760px) { .range-hero { margin: 0 -16px 8px; border-radius: 0 0 28px 28px; padding: 22px 20px 10px; } }
.callout { background: var(--card); border-radius: 24px; padding: 4px 22px 6px; margin-top: 28px; }
.callout h2 { margin-top: 18px; font-size: 19px; }
.callout p { color: var(--text2); }
.tips { list-style: none; padding: 0; }
.tips li { position: relative; padding: 0 0 0 26px; margin-bottom: 12px; }
.tips li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); opacity: .7; }

.chart { margin: 4px 0 14px; background: var(--card); border-radius: 22px; padding: 14px 14px 8px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .gl { stroke: var(--line); stroke-width: 1; }
.chart .gt { fill: var(--muted); font-size: 11px; }

/* ---------- weather & alerts ---------- */
.wx-now { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; font-size: 16px; color: var(--text2); }
.wx-now b { font-size: 40px; line-height: 1.1; font-weight: 500; letter-spacing: -.04em; color: var(--text); }
.alert-box { background: var(--card); border-radius: 18px; padding: 12px 16px; margin: 8px 0 14px; }
.alert-box > b { font-size: 15px; }
.alert-box p { margin: 6px 0 0; font-size: 15px; }
details.alert { background: var(--card); border-radius: 20px; margin: 0 0 8px; }
.alert-list + details.show-all { margin-top: 2px; }
details.alert summary { cursor: pointer; padding: 14px 18px; list-style: none; display: grid; grid-template-columns: auto 1fr; gap: 3px 4px; align-items: baseline; }
details.alert summary b { font-size: 16px; font-weight: 650; line-height: 1.35; }
details.alert summary::-webkit-details-marker { display: none; }
details.alert summary span, details.alert summary small { grid-column: 2; color: var(--muted); font-size: 13.5px; }
details.alert > div { padding: 0 16px 12px; font-size: 15px; }
.rf { font-size: 12.5px; font-weight: 650; padding: 3px 9px; border-radius: 999px; background: var(--card2); white-space: nowrap; }
.rf.LE, .rf.E { background: color-mix(in srgb, #2e85ff 22%, transparent); }
.rf.D, .rf.LD, .rf.NR { background: color-mix(in srgb, #fa801a 22%, transparent); }
.now-box { background: var(--card); border-radius: 24px; padding: 16px 20px; margin: 6px 0 12px; }
.now-box > b { font-size: 15px; color: var(--muted); }
.now-box ul { margin: 8px 0 6px; padding-left: 20px; }
.now-box p { margin: 0; }
.delta.up { color: var(--avoid); font-weight: 650; }
.delta.down { color: var(--ok); font-weight: 650; }
.prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 48px 0 8px; }
.prev-next a { display: flex; flex-direction: column; gap: 2px; background: var(--card); color: var(--text); border-radius: 20px; padding: 14px 18px; font-size: 17px; font-weight: 650; letter-spacing: -.015em; }
.prev-next a.next { text-align: right; }
.prev-next a:hover { text-decoration: none; background: var(--card2); }
.prev-next small { font-size: 13px; font-weight: 600; color: var(--accent); letter-spacing: 0; }

details.show-all { margin: -4px 0 14px; }
details.show-all > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; font-size: 15px; font-weight: 600; color: var(--accent); padding: 8px 0; }
details.show-all > summary::-webkit-details-marker { display: none; }
details.show-all > summary::after { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-2px); transition: transform .2s ease; }
details.show-all[open] > summary { display: none; }
details.show-all > ul, details.show-all > ol { margin-top: 0; }
.chips + details.show-all > .chips { margin-top: 8px; }

.warn-rows { list-style: none; padding: 0; margin: 0 0 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); column-gap: 32px; }
.warn-rows li { display: flex; gap: 12px; align-items: baseline; margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line); }
.warn-rows .dot { flex: none; margin: 0; transform: translateY(-1px); }
.warn-rows div { min-width: 0; flex: 1; }
.warn-rows b { font-size: 16.5px; font-weight: 650; letter-spacing: -.01em; }
.warn-rows b a { color: var(--text); }
.warn-rows small { font-size: 13.5px; color: var(--muted); margin-left: 8px; }
.warn-rows small a { color: inherit; }
.warn-rows p { margin: 3px 0 0; font-size: 15px; line-height: 1.45; color: var(--text2); }
.tally { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; font-weight: 600; color: var(--text2); margin: -4px 0 6px; }
details.day { border-top: 1px solid var(--line); margin-top: 8px; }
details.day + details.day { margin-top: 0; }
details.day > summary { cursor: pointer; list-style: none; position: relative; padding: 18px 36px 14px 0; }
details.day > summary::-webkit-details-marker { display: none; }
details.day > summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font-size: 24px; color: var(--muted); }
details.day[open] > summary::after { content: "−"; }
details.day > summary h2 { margin: 0 0 8px; font-size: 19px; }
details.day > summary .tally { margin: 0; }
details.all { margin: 18px 0; }
details.all summary { cursor: pointer; font-weight: 650; padding: 8px 0; }

/* ---------- app CTA (styled like a home screen widget) ---------- */
.cta-card { display: flex; gap: 18px; align-items: center; background: var(--card); border-radius: 28px; padding: 22px 24px; margin: 48px 0; }
.cta-card img { border-radius: 14px; box-shadow: 0 0 0 1px var(--glass-line), 0 8px 22px rgba(10, 60, 255, .2); flex: none; }
.cta-card h2 { font-size: 19px; margin: 0 0 6px; }
.cta-card p { font-size: 15px; color: var(--muted); margin: 0 0 12px; }
.cta-body { min-width: 0; flex: 1; }
.store-row { display: flex; flex-wrap: wrap; gap: 8px; }
.store-btn { display: inline-flex; align-items: center; gap: 9px; background: var(--btn-bg); color: var(--btn-text); border-radius: 999px; padding: 8px 18px 8px 14px; line-height: 1.05; font-size: 16px; font-weight: 700; min-height: 46px; }
.store-btn:hover { text-decoration: none; opacity: .86; }
.store-btn svg { width: 19px; height: 19px; fill: currentColor; flex: none; }
.store-btn small { display: block; font-size: 10.5px; font-weight: 500; opacity: .8; }
.store-btn.hide { display: none; }
@media (max-width: 480px) {
  .cta-card { display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; align-items: center; padding: 18px; border-radius: 26px; }
  .cta-card img { width: 44px; height: 44px; border-radius: 11px; }
  .cta-body { display: contents; }
  .cta-card h2 { font-size: 17px; line-height: 1.3; margin: 0; }
  .cta-card p, .cta-card .store-row { grid-column: 1 / -1; }
  .cta-card p { margin: 12px 0 14px; }
}
.sticky-cta { display: none !important; }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 14px 30px 14px 0; font-weight: 600; position: relative; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 11px; font-size: 22px; font-weight: 400; color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 0 10px; color: var(--text2); }

/* ---------- articles ---------- */
.post h1 { font-size: clamp(32px, 5vw, 46px); margin-top: 8px; }
.dek { font-size: 20px; line-height: 1.42; color: var(--text2); margin: 0 0 12px; letter-spacing: -.015em; }
.byline { font-size: 14px; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 22px; }
.prose { font-size: 18px; line-height: 1.62; }
.prose h2 { font-size: 26px; margin-top: 42px; }
.prose li { margin-bottom: 8px; }
.prose blockquote { margin: 20px 0; padding: 6px 18px; border-left: 3px solid var(--accent); color: var(--text2); }
.prose code { background: var(--card); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 30px 0; }
.prose table { font-size: 15.5px; }
.toc { background: var(--card); border-radius: 22px; padding: 16px 20px; margin: 0 0 24px; font-size: 16px; }
.toc ol { margin: 8px 0 0; }
.toc li { margin-bottom: 4px; }
.note-box { background: var(--card); border-radius: 18px; padding: 14px 18px; font-size: 16px; }
.cat-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; }
.cat-nav a { background: var(--card); color: var(--text); padding: 8px 15px; border-radius: 999px; font-size: 14.5px; font-weight: 600; }
.cat-nav a:hover { text-decoration: none; background: var(--card2); }
.live-aqi, .live-cities { margin: 20px 0; }
.live-aqi a { display: flex; align-items: center; gap: 14px; background: var(--card); color: var(--text); border-radius: 22px; padding: 14px 18px; font-weight: 600; }
.live-aqi a:hover { text-decoration: none; background: var(--card2); }
.live-aqi .bdg { font-size: 20px; }
.related { margin-top: 32px; }
.source { margin-top: 28px; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); margin-top: 24px; }
.foot-in { max-width: 1120px; margin: 0 auto; padding: 32px 20px calc(110px + env(safe-area-inset-bottom)); }
.foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; }
.foot h3 { font-size: 13px; color: var(--muted); font-weight: 600; margin: 0 0 8px; }
.foot-cols a { display: block; color: var(--text); font-size: 15px; padding: 3px 0; }
.foot-legal { margin: 28px 0 6px; font-size: 13px; color: var(--muted); }
.foot-legal a { color: inherit; }
.foot-legal span { margin: 0 6px; opacity: .6; }
.foot-note { font-size: 12.5px; color: var(--muted); max-width: 720px; }
@media (min-width: 761px) { .foot-in { padding-bottom: 40px; } }

/* ---------- widget cards (home screen widgets) ---------- */
.cards a.widget { gap: 2px; }
.w-num { font-size: 44px !important; line-height: 1 !important; font-weight: 400; letter-spacing: -.04em; color: var(--text) !important; font-variant-numeric: tabular-nums; margin-bottom: 8px; }
.w-num small { font-size: 15px; font-weight: 500; color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.w-bar { display: block; height: 5px; border-radius: 9px; background: var(--card2); margin-top: 10px; overflow: hidden; }
.w-bar em { display: block; height: 100%; border-radius: 9px; background: var(--badge); }

/* ---------- landing page ---------- */
.hero.home { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: end; min-height: 560px; padding: 34px; margin-top: 10px; }
.home-copy { align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.home-copy .glass-chip { align-self: flex-start; }
.hero .home-h1 { font-size: clamp(40px, 6.2vw, 68px); line-height: 1.02; font-weight: 600; letter-spacing: -.045em; margin: 22px 0 14px; max-width: 11em; }
.home-sub { font-size: 19px; line-height: 1.45; opacity: .78; margin: 0 0 24px; max-width: 30em; }
/* "near you" card: a home screen widget. Reading first, then what it means, then the facts. */
.near-card { display: flex; flex-direction: column; color: inherit; padding: 24px 24px 20px; border-radius: 30px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); -webkit-backdrop-filter: blur(30px) saturate(160%); backdrop-filter: blur(30px) saturate(160%); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .55); transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s ease; }
.near-card:hover { text-decoration: none; transform: translateY(-3px); }
.near-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.near-label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; opacity: .62; }
.near-label svg { width: 11px; height: 11px; fill: currentColor; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; letter-spacing: .02em; text-transform: uppercase; opacity: .62; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #34c759; box-shadow: 0 0 0 0 rgba(52, 199, 89, .5); animation: live 2.4s ease-out infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(52, 199, 89, .45); } 70%, 100% { box-shadow: 0 0 0 7px rgba(52, 199, 89, 0); } }
@media (prefers-reduced-motion: reduce) { .live::before { animation: none; } }
.near-city { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; margin-top: 14px; }
.near-city b { font-size: 24px; font-weight: 650; letter-spacing: -.025em; line-height: 1.15; }
.near-city small { font-size: 15px; opacity: .55; }
.near-read { display: flex; align-items: flex-end; gap: 14px; margin: 26px 0 0; }
.near-card .hero-num { font-size: clamp(88px, 9.5vw, 116px); line-height: .8; margin: 0; }
.near-side { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; padding-bottom: 4px; min-width: 0; }
.near-pill { display: inline-block; padding: 5px 11px; border-radius: 999px; background: var(--badge); color: var(--ink); font-size: 13.5px; font-weight: 700; letter-spacing: -.005em; white-space: nowrap; }
.near-side small { font-size: 13px; font-weight: 600; opacity: .55; padding-left: 2px; }
.near-advice { font-size: 17px; font-weight: 600; letter-spacing: -.015em; margin-top: 18px; }
.near-card .rainbow { margin: 14px 0 0; height: 6px; }
.near-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 22px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .12); }
.near-stats > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 0 12px; border-left: 1px solid rgba(255, 255, 255, .12); }
.near-stats > span:first-child { padding-left: 0; border-left: 0; }
.near-stats small { font-size: 12px; font-weight: 500; opacity: .55; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.near-stats b { font-size: 16px; font-weight: 650; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.near-go { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 15px; font-weight: 600; }
.near-go i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--badge); color: var(--ink); transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.near-go svg { width: 17px; height: 17px; fill: currentColor; }
.near-card:hover .near-go i { transform: translateX(3px); }
@media (prefers-color-scheme: light) {
  .near-card { background: rgba(255, 255, 255, .78); border-color: rgba(255, 255, 255, .9); box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 30px 60px -28px color-mix(in srgb, var(--deep) 45%, transparent), 0 2px 8px rgba(0, 0, 0, .04); }
  .near-card:hover { box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 36px 70px -28px color-mix(in srgb, var(--deep) 55%, transparent), 0 2px 8px rgba(0, 0, 0, .04); }
  .near-stats, .near-go { border-top-color: rgba(0, 0, 0, .07); }
  .near-stats > span { border-left-color: rgba(0, 0, 0, .07); }
  .live { opacity: .7; }
}
@media (max-width: 860px) {
  .hero.home { grid-template-columns: minmax(0, 1fr); min-height: 0; padding: 24px 20px 22px; }
  .hero .home-h1 { margin-top: 18px; }
}

/* search with suggestions */
.search { position: relative; display: flex; align-items: center; gap: 6px; max-width: 520px; padding: 6px 6px 6px 16px; border-radius: 999px; background: var(--elev); color: var(--text); box-shadow: 0 10px 30px rgba(0, 0, 0, .18); border: 1px solid var(--glass-line); }
.search > svg { width: 20px; height: 20px; fill: var(--muted); flex: none; }
.search input { flex: 1; width: 0; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 17px; padding: 10px 4px; -webkit-appearance: none; appearance: none; }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search button { flex: none; border: 0; cursor: pointer; background: var(--btn-bg); color: var(--btn-text); font: inherit; font-size: 15px; font-weight: 700; padding: 10px 18px; border-radius: 999px; }
.search:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent), 0 10px 30px rgba(0, 0, 0, .18); }
.sugg { position: absolute; z-index: 30; top: calc(100% + 8px); left: 0; right: 0; list-style: none; margin: 0; padding: 6px; border-radius: 22px; background: var(--elev); box-shadow: 0 18px 50px rgba(0, 0, 0, .22); border: 1px solid var(--glass-line); max-height: 420px; overflow-y: auto; }
.sugg li { margin: 0; }
.sugg a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 14px; color: var(--text); }
.sugg a:hover, .sugg li[aria-selected="true"] a { background: var(--card); text-decoration: none; }
.sugg b { display: block; font-size: 16px; font-weight: 600; }
.sugg small { display: block; font-size: 13px; color: var(--muted); }
.sugg .bdg { min-width: 40px; height: 36px; border-radius: 11px; font-size: 15px; }
.sugg .empty { padding: 12px 14px; color: var(--muted); font-size: 15px; }
.wrap > .search { margin: 8px 0 22px; }

.w-num.sm { font-size: 34px !important; margin: 10px 0 0; }
.w-num.sm small { font-size: 13px; }

/* app showcase band */
.app-band { display: grid; grid-template-columns: 1fr 1.05fr; gap: 24px; align-items: center; margin: 44px 0 20px; padding: 34px; border-radius: 32px; color: #fff; overflow: hidden;
  background: radial-gradient(60% 80% at 80% 0%, rgba(46, 133, 255, .55), transparent 70%), radial-gradient(50% 70% at 0% 100%, rgba(20, 77, 209, .45), transparent 70%), #04060f; }
.app-band h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.05; letter-spacing: -.04em; margin: 6px 0 16px; }
.app-band .card-cat { color: #8fbaff !important; }
.app-band a:not(.store-btn) { color: #9cc3ff; }
.app-band .store-btn { background: #fff; color: #000; }
.ticks { list-style: none; padding: 0; margin: 0 0 20px; }
.ticks li { position: relative; padding-left: 28px; margin-bottom: 10px; font-size: 16px; color: rgba(255, 255, 255, .78); }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 0; color: #59ff8c; font-weight: 700; }
.ticks b { color: #fff; font-weight: 600; }
.app-shots { display: flex; gap: 12px; justify-content: center; }
.app-shots img { width: 31%; max-width: 210px; height: auto; border-radius: 22px; box-shadow: 0 20px 40px rgba(0, 0, 0, .5); }
.app-shots img:nth-child(2) { transform: translateY(-18px); }
@media (max-width: 860px) {
  .app-band { grid-template-columns: 1fr; padding: 26px 20px; margin-left: -16px; margin-right: -16px; border-radius: 28px; }
  .app-shots { order: -1; }
}

/* One app banner at a time: iPhone Safari already shows Apple's Smart App Banner. */
.ios-safari .get-app { display: none; }
@media (max-width: 760px) { .hero.home { margin-top: -6px; } }

/* station list on city pages: badge first, like the app's rows */
.station-rows { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 32px; margin: 4px 0 12px; }
.station-rows li { display: flex; align-items: center; gap: 14px; padding: 10px 0; margin: 0; border-bottom: 1px solid var(--line); }
.station-rows .list-name b { font-size: 16px; font-weight: 600; white-space: normal; }
.station-rows .bdg.sm { min-width: 44px; height: 36px; font-size: 15.5px; }

/* ---------- illustrations ---------- */
.post-hero { margin: 0 0 24px; }
.post-hero img, .post-fig img { display: block; width: 100%; height: auto; border-radius: 24px; background: var(--card); }
.post-fig { margin: 26px 0; }
.post-fig figcaption { font-size: 14.5px; color: var(--muted); margin-top: 10px; line-height: 1.45; }
.cards a .card-img { display: block; width: calc(100% + 36px); max-width: none; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; margin: -18px -18px 12px; border-radius: 24px 24px 0 0; background: var(--card2); }
.list-cards a { display: grid; grid-template-columns: 240px 1fr; grid-template-rows: auto auto 1fr; column-gap: 18px; align-items: start; }
.list-cards a .card-img { grid-row: 1 / 4; width: 100%; margin: 0; border-radius: 16px; }
@media (max-width: 600px) { .list-cards a { display: flex; } .list-cards a .card-img { width: calc(100% + 36px); margin: -18px -18px 12px; border-radius: 24px 24px 0 0; } }

/* code samples (developers page) */
pre.code { background: var(--card); border-radius: 16px; padding: 14px 18px; overflow-x: auto; font-size: 14px; line-height: 1.6; margin: 0 0 16px; }
pre.code code, .prose code, p code { font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.answer { font-size: 16px; line-height: 1.5; color: var(--text2); margin: 18px 0 14px; }
.answer b { color: var(--text); font-weight: 650; }

/* Landing hero: flat, on the page background (no gradient wash), in both themes.
   The near-you card carries the AQI colour through its number and pill. */
.hero.home, html .hero.home { background: none; color: var(--text); border-radius: 0; padding-left: 0; padding-right: 0; min-height: 0; padding-top: 40px; padding-bottom: 32px; }
.hero.home::after { display: none; }
/* nothing to clip without the backdrop; clipping cut off the search box's shadow, focus ring and suggestions */
.hero.home { overflow: visible; }
.hero.home .glass-chip { background: var(--card); border-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.hero.home .home-sub { color: var(--text2); opacity: 1; }
.hero.home .near-card, .hero.home .near-card:hover { background: var(--card); border: 0; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
.hero.home .near-stats, .hero.home .near-go { border-top-color: var(--line); }
.hero.home .near-stats > span { border-left-color: var(--line); }
.hero.home .hero-num { color: var(--deep); }
@media (prefers-color-scheme: dark) { .hero.home .hero-num { color: var(--fg); } }
@media (prefers-color-scheme: light) { .hero.home { background: none; } }
@media (max-width: 760px) { .hero.home { margin-left: 0; margin-right: 0; border-radius: 0; padding: 20px 0 24px; } }

/* =====================================================================
   Design system v2 (15 October 2026): one loud element per page, quiet
   secondary text, rails on phones, grids on larger screens. Everything
   stays in the HTML; only presentation changes.
   ===================================================================== */
:root { --text2: rgba(60, 60, 67, .64); --text3: rgba(60, 60, 67, .48); --muted: rgba(60, 60, 67, .48); --sep: rgba(60, 60, 67, .14); --gut: 20px; }
@media (prefers-color-scheme: dark) { :root { --text2: rgba(235, 235, 245, .62); --text3: rgba(235, 235, 245, .42); --muted: rgba(235, 235, 245, .42); --sep: rgba(84, 84, 88, .55); } }
body { font-size: 16px; line-height: 1.5; }
.wrap { padding: 12px var(--gut) 110px; }
@media (max-width: 760px) { .wrap { padding: 8px var(--gut) 120px; } }
h1 { font-size: clamp(28px, 4.2vw, 40px); line-height: 1.12; letter-spacing: -.032em; margin: 4px 0 10px; }
h2 { font-size: clamp(20px, 2.3vw, 24px); line-height: 1.25; font-weight: 650; letter-spacing: -.02em; margin: 48px 0 12px; }
h3 { font-size: 16px; }
.lead { font-size: 16px; line-height: 1.5; color: var(--text2); margin-bottom: 20px; }
@media (min-width: 761px) { .lead { font-size: 18px; } }
.small { font-size: 13px; }
.muted, .small.muted { color: var(--text3); }
.eyebrow, .kicker { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text3); margin: 0 0 8px; }
.kicker a { color: inherit; }
.crumbs ol { flex-wrap: nowrap; white-space: nowrap; overflow: hidden; font-size: 12.5px; margin: 0 0 10px; color: var(--text3); }
.crumbs li { flex: none; }
.crumbs li:last-child { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.crumbs a { color: var(--text3); }
.more { font-size: 14px; }

/* section header: heading left, a quiet link right (Airbnb) */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 48px 0 12px; }
.sec-head h2 { margin: 0; }
.sec-head > a, .sec-head > span { flex: none; font-size: 14px; color: var(--text2); font-weight: 500; }
.sec-head > span { color: var(--text3); font-size: 13px; }
.sec-sub { margin: -6px 0 12px; font-size: 13px; color: var(--text3); }

/* rails: sideways on phones, grids from tablet up (Netflix) */
.rail { list-style: none; display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; margin: 0 calc(-1 * var(--gut)); padding: 0 var(--gut) 6px; scroll-padding: 0 var(--gut); scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail > li { flex: none; margin: 0; scroll-snap-align: start; }
.rail.chips { flex-wrap: nowrap; gap: 8px; }
/* two rows of chips that scroll together on phones; each row packs tight */
.chip-rows { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; margin: 0 calc(-1 * var(--gut)); padding: 0 0 6px var(--gut); scrollbar-width: none; }
.chip-rows::-webkit-scrollbar { display: none; }
.chip-rows > .chips { flex-wrap: nowrap; margin: 0; }
.chip-rows > .chips::after { content: ""; flex: none; order: 999; width: calc(var(--gut) - 8px); }
.chip-rows li { flex: none; }
@media (min-width: 761px) {
  .rail { overflow: visible; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .rail > li { flex: initial; }
  .rail.chips { display: flex; flex-wrap: wrap; }
  .chip-rows { flex-direction: row; flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
  .chip-rows > .chips { display: contents; }
  .chip-rows > .chips::after { content: none; }
}

/* tiles inside rails: trackers, countries, nearby, guides */
.tile { display: flex; flex-direction: column; gap: 4px; height: 100%; box-sizing: border-box; padding: 16px; border-radius: 18px; background: var(--card); color: var(--text); }
.tile:hover { text-decoration: none; background: var(--card2); }
.rail > li > .tile { width: 236px; }
.rail.narrow > li > .tile { width: 150px; }
.rail.mini > li > .tile { width: 112px; padding: 12px; }
@media (min-width: 761px) { .rail > li > .tile, .rail.narrow > li > .tile, .rail.mini > li > .tile { width: auto; } .rail.narrow, .rail.mini { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }
.tile .t-num { font-size: 34px; line-height: 1; font-weight: 300; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.tile .t-num small { font-size: 12px; font-weight: 500; letter-spacing: 0; color: var(--text3); margin-left: 6px; }
.tile .t-name { font-size: 15px; font-weight: 600; line-height: 1.3; }
.tile .t-sub { font-size: 12.5px; color: var(--text3); line-height: 1.35; }
.tile .t-bar { display: block; height: 4px; border-radius: 9px; background: var(--card2); margin-top: auto; overflow: hidden; }
.tile .t-bar em { display: block; height: 100%; border-radius: 9px; background: var(--badge); }
.tile .t-top { margin-top: 8px; }
.tile .t-quiet { font-size: 22px; font-weight: 500; letter-spacing: -.025em; line-height: 1.15; }
.mini .tile .t-num { font-size: 24px; margin-top: 8px; color: var(--deep); }
@media (prefers-color-scheme: dark) { .mini .tile .t-num { color: var(--fg); } }

/* grouped lists (Apple): rows in one rounded panel, value on the right */
.list { background: var(--card); border-radius: 18px; padding: 0 16px; margin: 0 0 12px; }
.list li a { gap: 12px; min-height: 54px; padding: 8px 0; border-bottom: 1px solid var(--sep); }
.list li a::before, .list.medals li:nth-child(n) a::before { content: counter(r); width: 20px; font-size: 13px; text-align: left; color: var(--text3); }
.list li a::after { display: none; }
.list li a .bdg { order: 2; min-width: 42px; height: 28px; border-radius: 8px; font-size: 14px; padding: 0 7px; }
.list-name b { font-size: 16px; }
.list-name small { font-size: 12.5px; color: var(--text3); }
.list.grid-list { display: block; }
details.show-all > .list { margin-top: 8px; }
.station-rows { background: var(--card); border-radius: 18px; padding: 0 16px; display: block; margin: 0 0 12px; }
.station-rows li { min-height: 48px; padding: 6px 0; border-bottom: 1px solid var(--sep); }
.station-rows li:last-child { border-bottom: 0; }
.station-rows li .bdg { order: 2; }
.station-rows .list-name b { font-size: 15px; font-weight: 500; }
.station-rows .list-name small { display: none; }

/* toggle between two parallel lists on phones; side by side from tablet up */
.pair > input { position: absolute; opacity: 0; pointer-events: none; }
.seg-ctl { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 10px; background: var(--card); margin: 0 0 12px; }
.seg-ctl label { height: 32px; display: grid; place-items: center; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text2); cursor: pointer; }
.pair > input:nth-of-type(1):checked ~ .seg-ctl label:nth-child(1), .pair > input:nth-of-type(2):checked ~ .seg-ctl label:nth-child(2) { background: var(--elev); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
@media (prefers-color-scheme: dark) { .pair > input:nth-of-type(1):checked ~ .seg-ctl label:nth-child(1), .pair > input:nth-of-type(2):checked ~ .seg-ctl label:nth-child(2) { background: #3a3a3c; } }
.pair > input:focus-visible ~ .seg-ctl { outline: 2px solid var(--accent); outline-offset: 2px; }
.pair .pane h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }
.pair > input:nth-of-type(1):checked ~ .pane.b, .pair > input:nth-of-type(2):checked ~ .pane.a { display: none; }
@media (min-width: 761px) {
  .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; align-items: start; }
  .pair .seg-ctl { display: none; }
  .pair > input:nth-of-type(n) ~ .pane { display: block; }
  .pair .pane h2 { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; margin: 0 0 12px; font-size: 18px; }
}

/* stat strip: three numbers in one panel */
.kstrip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--card); border-radius: 18px; margin: 16px 0; list-style: none; padding: 0; }
.kstrip li { margin: 0; padding: 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kstrip li + li { border-left: 1px solid var(--sep); }
.kstrip li:nth-child(4) { border-left: 0; border-top: 1px solid var(--sep); }
.kstrip li:nth-child(n+5) { border-top: 1px solid var(--sep); }
.kstrip span { font-size: 12px; color: var(--text3); }
.kstrip b { font-size: 22px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kstrip b.lg { font-size: 30px; font-weight: 300; letter-spacing: -.04em; }
.kstrip small { font-size: 11.5px; color: var(--text3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* slim app row (App Store "GET") */
.cta-slim { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; background: var(--card); margin: 36px 0; }
.cta-slim img { flex: none; border-radius: 11px; box-shadow: 0 0 0 1px var(--glass-line); }
.cta-slim div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cta-slim b { font-size: 15px; font-weight: 600; line-height: 1.3; }
.cta-slim span { font-size: 12.5px; line-height: 1.35; color: var(--text3); }
.cta-slim .get { flex: none; height: 30px; padding: 0 16px; border-radius: 999px; background: var(--card2); color: var(--accent); font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; letter-spacing: .02em; }
.cta-slim .get:hover { text-decoration: none; filter: brightness(1.1); }
@media (prefers-color-scheme: dark) { .cta-slim .get { background: #3a3a3c; } }

/* status pills stay (the user's call); quieter row text around them */
.acts { padding: 2px 16px; border-radius: 18px; }
.acts li { padding: 13px 0 14px; }
.act-h h3 { font-size: 15px; }
.acts p { font-size: 13.5px; line-height: 1.42; color: var(--text2); margin-top: 4px; }
.st { font-size: 12px; padding: 3px 9px; }
.activities .small { font-size: 12px; }

/* numbered steps (IKEA) */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; display: flex; flex-direction: column; gap: 14px; }
.steps li { counter-increment: s; display: flex; gap: 14px; margin: 0; font-size: 15px; line-height: 1.47; }
.steps li::before { content: counter(s, decimal-leading-zero); flex: none; width: 24px; font-size: 13px; font-weight: 700; color: var(--limit); font-variant-numeric: tabular-nums; padding-top: 2px; }
.risk { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--sep); }
.risk h2 { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text3); margin: 0 0 6px; }
.risk p { font-size: 17px; line-height: 1.45; margin: 0; }
.note-card { background: var(--card); border-radius: 16px; padding: 16px; margin: 28px 0 0; }
.note-card h2 { font-size: 14px; font-weight: 600; margin: 0 0 6px; letter-spacing: 0; }
.note-card p { font-size: 13.5px; line-height: 1.47; color: var(--text2); margin: 0; }

/* FAQ: lighter */
.faq summary { font-size: 15px; padding: 15px 30px 15px 0; }
.faq details > div { font-size: 15px; }
.faq details { border-bottom-color: var(--sep); }
.foot { border-top-color: var(--sep); }

/* hero v2: one number, one line of meaning, one quiet caption */
.hero.v2 { display: block; min-height: 0; color: var(--text); border-radius: 26px; padding: 22px 20px 18px; margin: 6px 0 0;
  background: linear-gradient(180deg, var(--tint) 0%, color-mix(in srgb, var(--tint) 40%, var(--bg)) 72%, var(--bg) 100%); }
@media (prefers-color-scheme: dark) { .hero.v2 { background: linear-gradient(180deg, color-mix(in srgb, var(--acc) 24%, #000) 0%, color-mix(in srgb, var(--acc) 9%, #000) 62%, #0b0b0c 100%); } }
@media (prefers-color-scheme: light) { .hero.v2 { background: linear-gradient(180deg, var(--tint) 0%, color-mix(in srgb, var(--tint) 40%, #fff) 72%, #fff 100%); } }
.hero.v2::after { display: none; }
.hero.v2 h1 { font-size: clamp(26px, 3.4vw, 32px); line-height: 1.12; font-weight: 700; letter-spacing: -.03em; margin: 0; }
.hero.v2 h1 span { display: block; font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--text3); opacity: 1; margin-top: 4px; }
.hero-read { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 18px; }
.hero.v2 .hero-num { font-size: clamp(84px, 13vw, 116px); line-height: .82; font-weight: 300; letter-spacing: -.055em; color: var(--deep); }
@media (prefers-color-scheme: dark) { .hero.v2 .hero-num { color: var(--fg); } }
.hero-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; padding-bottom: 4px; }
.hero-pill { padding: 4px 11px; border-radius: 999px; background: var(--badge); color: var(--ink); font-size: 13px; font-weight: 700; white-space: nowrap; }
.hero-side small { font-size: 12.5px; color: var(--text3); }
.hero-left { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hero-place { color: var(--text); }
.hero-place:hover { text-decoration: none; }
.hero-place b { font-size: 20px; font-weight: 650; letter-spacing: -.02em; }
.hero-place small { font-size: 13px; color: var(--text3); margin-left: 4px; }
.hero-place:hover b { text-decoration: underline; text-underline-offset: 3px; }
.hero.v2 .insight { font-size: 16px; line-height: 1.45; font-weight: 400; letter-spacing: -.01em; margin: 14px 0 0; max-width: 34em; color: var(--text2); opacity: 1; }
.hero.v2 .rainbow { margin: 16px 0 0; }
.hero-cap { margin: 12px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--text3); }
.hero-cap b { color: var(--text2); font-weight: 600; }
.hero.v2 .eyebrow { margin-bottom: 10px; }
@media (max-width: 760px) { .hero.v2 { margin: 4px -8px 0; border-radius: 24px; padding: 20px 18px 16px; min-height: 0; } }

/* home: flat hero, near-you card v2 */
.hero.home .home-h1 { font-size: clamp(32px, 5.4vw, 60px); margin: 14px 0 12px; }
.home-sub { font-size: 16px; }
@media (max-width: 760px) { .home-sub { font-size: 15px; } }
.hero.home .eyebrow { display: inline-flex; align-items: center; gap: 7px; margin: 0; }
.hero.home .eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #34c759; }
.near-card { gap: 0; padding: 18px 18px 16px; border-radius: 22px; }
.near-top { font-size: 12.5px; color: var(--text3); }
.near-label { opacity: 1; font-size: 12.5px; font-weight: 500; }
.near-read { margin: 14px 0 0; justify-content: space-between; align-items: flex-end; }
.near-left { display: flex; flex-direction: column; gap: 2px; }
.near-card .near-city { margin: 0; display: block; }
.near-city b { display: inline; font-size: 20px; }
.near-city small { font-size: 13px; color: var(--text3); opacity: 1; }
.near-card .hero-num { font-size: clamp(72px, 9vw, 96px); line-height: .86; }
.near-side { align-items: flex-end; text-align: right; }
.near-side small { opacity: 1; color: var(--text3); font-size: 12.5px; padding: 0; }
.near-advice { font-size: 15px; font-weight: 400; color: var(--text2); margin-top: 14px; }
.near-card .rainbow { margin-top: 14px; }
.near-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--sep); font-size: 13px; color: var(--text3); }
.near-foot b { font-weight: 400; }
.near-card .near-go { margin: 0; padding: 0; border: 0; color: var(--accent); font-size: 13.5px; font-weight: 600; display: inline; }

/* ranking table v2: city with its area underneath, compact badges, filter */
table.rank.v2 td, table.rank.v2 th { padding: 10px 8px 10px 0; }
table.rank.v2 td:first-child { font-size: 13px; color: var(--text3); width: 28px; }
table.rank.v2 td small { display: block; font-size: 12px; color: var(--text3); font-weight: 400; line-height: 1.3; }
table.rank.v2 td a { font-size: 15.5px; }
table.rank.v2 th:nth-child(n+3), table.rank.v2 td:nth-child(n+3) { text-align: right; padding-right: 0; padding-left: 8px; width: 1%; white-space: nowrap; }
table.rank.v2 tr > *:nth-child(n+3) + * { color: var(--text2); }
table.rank.v2 thead th { font-size: 12px; color: var(--text3); }
.bdg.xs { min-width: 40px; height: 26px; border-radius: 8px; font-size: 13.5px; padding: 0 6px; }
.filter { display: flex; align-items: center; gap: 8px; height: 42px; border-radius: 12px; background: var(--card); padding: 0 12px; margin: 0 0 8px; color: var(--text3); }
.filter svg { width: 16px; height: 16px; fill: currentColor; flex: none; }
.filter input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 15px; -webkit-appearance: none; appearance: none; }

/* pollutant tiles: three to a row */
.kstrip.pols li, .kstrip li { border: 0; }
.kstrip li { border-left: 1px solid var(--sep); }
.kstrip li:nth-child(3n+1) { border-left: 0; }
.kstrip li:nth-child(n+4) { border-top: 1px solid var(--sep); }
.kstrip.pols { margin: 0 0 8px; }

/* story cards in rails */
.rail.stories > li { width: 262px; }
@media (min-width: 761px) { .rail.stories { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); } .rail.stories > li { width: auto; } }
.story-card { display: flex; flex-direction: column; gap: 6px; color: var(--text); }
.story-card:hover { text-decoration: none; }
.story-card:hover b { text-decoration: underline; }
.story-card img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: 14px; background: var(--card); margin-bottom: 4px; }
.story-card .eyebrow { margin: 0; }
.story-card b { font-size: 15px; line-height: 1.33; font-weight: 600; letter-spacing: -.012em; }
.tile .eyebrow { margin: 0 0 2px; }
.rail.chips a { white-space: nowrap; }
.chips a, .chips > li > span { font-size: 14.5px; padding: 6px 6px 6px 14px; min-height: 38px; box-sizing: border-box; }
.chip-n { border-radius: 999px; min-width: 32px; height: 26px; font-size: 12.5px; }
.cta-slim span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile .t-bar { margin-top: 10px; }
.tile .t-sub + .t-bar, .tile .t-num + .t-bar { margin-top: auto; padding-top: 0; }
.tile { min-height: 0; }
.rail .tile .t-bar { margin-top: 12px; }
/* small uppercase section label that is still an H2 */
h2.h-eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text3); margin: 28px 0 8px; }
.pols-sec .small { font-size: 12px; margin-top: 6px; }
/* two-column fact strip */
.kstrip.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kstrip.two li { border-left: 0; border-top: 0; }
.kstrip.two li:nth-child(2n) { border-left: 1px solid var(--sep); }
.kstrip.two li:nth-child(n+3) { border-top: 1px solid var(--sep); }
.kstrip.two b { font-size: 26px; font-weight: 300; letter-spacing: -.03em; order: 0; }
.kstrip.two span { order: 1; font-size: 12px; line-height: 1.35; }
.chart { border-radius: 18px; }
.activities h2 { margin-bottom: 4px; }
.activities .sec-sub { margin: 0 0 12px; font-size: 13.5px; line-height: 1.45; color: var(--text2); }
/* country page */
h1.split span { display: block; font-size: 15px; font-weight: 400; letter-spacing: 0; color: var(--text3); margin-top: 4px; }
.kstrip.big b.lg { color: var(--deep); }
@media (prefers-color-scheme: dark) { .kstrip.big b.lg { color: var(--fg); } }
.kstrip.big { margin: 18px 0 20px; }
.dist { height: 6px; margin: 4px 0 8px; }
.dist-legend { font-size: 12px; gap: 2px 12px; color: var(--text3); }
.tile-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tile-grid li { margin: 0; }
.pair { margin-top: 28px; }
.sec-head + .pair { margin-top: 0; }
/* AQI range page */
.range-v2 { padding: 14px 0 4px; }
.range-v2 h1 { margin: 0 0 12px; font-size: 28px; }
.range-v2 h1 b { display: block; font-size: clamp(64px, 11vw, 88px); line-height: .9; font-weight: 300; letter-spacing: -.05em; color: var(--deep); margin-bottom: 4px; }
@media (prefers-color-scheme: dark) { .range-v2 h1 b { color: var(--fg); } }
.range-v2 .lead { margin-bottom: 14px; }
.range-v2 .scale { margin: 14px 0 0; }
.scale-seg b { font-size: 11.5px; }
.scale-seg span { font-size: 10.5px; }
.scale-seg::before { height: 5px; }
.scale.has-on .scale-seg.on::before { height: 7px; margin: -1px 0 8px; }

/* blog listings: lead story, then compact rows (Apple News) */
.rail-nav { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--gut)) 20px; padding: 0 var(--gut); scrollbar-width: none; }
.rail-nav::-webkit-scrollbar { display: none; }
.rail-nav a { flex: none; font-size: 14px; }
@media (min-width: 761px) { .rail-nav { flex-wrap: wrap; overflow: visible; margin: 0 0 24px; padding: 0; } }
.story-lead { display: flex; flex-direction: column; gap: 8px; color: var(--text); margin: 4px 0 8px; }
.story-lead:hover { text-decoration: none; }
.story-lead:hover b { text-decoration: underline; }
.story-lead img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: 16px; background: var(--card); margin-bottom: 4px; }
.story-lead .eyebrow { margin: 4px 0 0; }
.story-lead b { font-size: clamp(22px, 3vw, 28px); line-height: 1.2; font-weight: 700; letter-spacing: -.025em; }
.story-lead .sr-desc { font-size: 14px; line-height: 1.45; color: var(--text2); }
.story-rows { list-style: none; padding: 0; margin: 18px 0 0; }
.story-rows li { margin: 0; }
.story-row { display: flex; gap: 14px; padding: 14px 0; border-top: 1px solid var(--sep); color: var(--text); }
.story-row:hover { text-decoration: none; }
.story-row:hover b { text-decoration: underline; }
.sr-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.sr-text .eyebrow { margin: 0; }
.story-row b { font-size: 16px; line-height: 1.3; font-weight: 600; letter-spacing: -.015em; }
.story-row .sr-desc { display: none; font-size: 14px; line-height: 1.45; color: var(--text2); }
.sr-meta { font-size: 12.5px; color: var(--text3); }
.story-row img { flex: none; width: 96px; height: 96px; object-fit: cover; object-position: left center; border-radius: 12px; background: var(--card); }
@media (min-width: 761px) {
  .story-row { gap: 20px; padding: 18px 0; }
  .story-row .sr-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .story-row img { width: 200px; height: auto; aspect-ratio: 1200 / 630; object-position: center; }
  .story-row b { font-size: 18px; }
}

/* articles: calm header, edge-to-edge hero on phones, folding contents, quiet citations */
.post h1 { font-size: clamp(28px, 4.6vw, 44px); line-height: 1.12; letter-spacing: -.035em; margin: 0 0 12px; }
.post .eyebrow { margin: 12px 0 10px; }
.post .eyebrow a { color: inherit; }
.dek { font-size: 17px; line-height: 1.47; color: var(--text2); margin: 0 0 16px; }
@media (min-width: 761px) { .dek { font-size: 20px; } }
.byline { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text); border: 0; padding: 0; margin: 0 0 20px; }
.byline img { border-radius: 50%; flex: none; }
.byline span { display: flex; flex-direction: column; }
.byline a { color: var(--text); font-weight: 600; }
.byline small { font-size: 12.5px; color: var(--text3); }
.post-hero { margin: 0 0 20px; }
@media (max-width: 760px) { .post-hero { margin: 0 calc(-1 * var(--gut)) 20px; } .post-hero img { border-radius: 0; } }
details.toc { background: var(--card); border-radius: 14px; padding: 0 16px; margin: 0 0 24px; font-size: 15px; }
details.toc summary { cursor: pointer; list-style: none; min-height: 50px; display: flex; align-items: center; gap: 6px; position: relative; padding-right: 24px; }
details.toc summary::-webkit-details-marker { display: none; }
details.toc summary b { font-weight: 600; }
details.toc summary span { color: var(--text3); }
details.toc summary::after { content: ""; position: absolute; right: 4px; top: 50%; width: 7px; height: 7px; margin-top: -6px; border: solid var(--text3); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s ease; }
details.toc[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
details.toc ol { margin: 0 0 14px; padding-left: 20px; }
details.toc li { margin-bottom: 6px; }
.prose { font-size: 17px; line-height: 1.65; }
.prose h2 { font-size: clamp(21px, 2.6vw, 26px); margin-top: 40px; }
.prose a { color: var(--text); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 70%, transparent); text-underline-offset: 3px; }
.prose a:hover { color: var(--accent); }
.cite { font-size: 13.5px; color: var(--text3); }
.cite a { color: var(--text3); text-decoration-color: color-mix(in srgb, var(--text3) 60%, transparent); }
.prose table { font-size: 14.5px; }
.prose th { font-size: 12px; color: var(--text3); }
.prose .live-cities .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--gut)); padding: 0 var(--gut) 4px; scrollbar-width: none; }
@media (min-width: 761px) { .prose .live-cities .chips { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; } }
.hub-links { margin-top: 20px; }
.prose .chips a, .prose .live-aqi a { text-decoration: none; color: var(--text); white-space: nowrap; }
.byline a { text-decoration: none; }
@media (min-width: 761px) { .pair > input:nth-of-type(1):checked ~ .pane.b, .pair > input:nth-of-type(2):checked ~ .pane.a { display: block; } }
.byline span span { display: inline; }
.story-row img { align-self: flex-start; }
.kstrip small { white-space: normal; }
