:root {
  /* Brand: "Transit line". Cool platform neutrals; each city carries its own rapid-transit line colour. */
  --bg: #f7f8fa;
  --surface: #ffffff;
  --ink: #18202e;
  --ink-2: #586273;
  --line: #dde2ea;
  --accent: #2152a8;
  --accent-2: #183f84;
  --accent-soft: #e4ecf9;
  --warm: #c2501a;
  --warm-soft: #fbe7da;
  --l-calgary: #c8102e;
  --l-vancouver: #0067b1;
  --l-toronto: #e8b100;
  --l-montreal: #00a650;
  --l-ottawa: #8a3ffc;
  --l-edmonton: #e8731a;
  --l-winnipeg: #c8372d;
  --l-metro-vancouver: #0e8f8a;
  --city: var(--ink);
  --radius: 14px;
  --display: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11151d;
    --surface: #192030;
    --ink: #e8edf5;
    --ink-2: #9aa6ba;
    --line: #2b3445;
    --accent: #7ea8ff;
    --accent-2: #a9c4ff;
    --accent-soft: #1d2a45;
    --warm: #f0955a;
    --warm-soft: #3a2618;
    --l-calgary: #ff4d63;
    --l-vancouver: #3c9cff;
    --l-toronto: #ffd23f;
    --l-montreal: #2fd27a;
    --l-ottawa: #b894ff;
    --l-edmonton: #ff9b4d;
    --l-winnipeg: #ff6f61;
    --l-metro-vancouver: #38d0c8;
  }
}
[data-city="calgary"] { --city: var(--l-calgary); }
[data-city="vancouver"] { --city: var(--l-vancouver); }
[data-city="toronto"] { --city: var(--l-toronto); }
[data-city="montreal"] { --city: var(--l-montreal); }
[data-city="ottawa"] { --city: var(--l-ottawa); }
[data-city="edmonton"] { --city: var(--l-edmonton); }
[data-city="winnipeg"] { --city: var(--l-winnipeg); }
[data-city="metro-vancouver"] { --city: var(--l-metro-vancouver); }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--sans); }
img { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-2); }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.8rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); margin-top: 1.6em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ink-2); }
.fine { font-size: .82rem; color: var(--ink-2); margin-top: .4em; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--surface); padding: 8px 12px; z-index: 10; }
:focus-visible { outline: 3px solid var(--warm); outline-offset: 2px; border-radius: 4px; }

/* Header / footer */
.site-header { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 1000; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 62px; flex-wrap: wrap; }
.brand { font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; font-size: 1.2rem; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 26px; height: 26px; flex: none; display: block; }
nav { display: flex; gap: 18px; flex-wrap: wrap; }
nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; }
nav a:hover { color: var(--accent); }
.site-footer { border-top: 1px solid var(--line); margin-top: 64px; padding: 28px 0 40px; font-size: .9rem; }

/* Hero */
.hero { padding: 72px 0 0; position: relative; }
.hero-lines { display: block; width: 100%; height: 72px; margin-top: 48px; }
.hero-lines path { fill: none; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.hero-lines circle { fill: var(--surface); stroke: var(--ink); stroke-width: 3; }
.eyebrow { font-size: .9rem; font-weight: 600; color: var(--ink-2); margin-bottom: .8em; display: flex; align-items: center; gap: 8px; }
.eyebrow::before { content: ""; width: 18px; height: 6px; border-radius: 3px; background: var(--city); flex: none; }
.lede { font-size: clamp(1.05rem, 1.8vw, 1.25rem); color: var(--ink-2); max-width: 46em; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.btn { display: inline-block; padding: 12px 20px; border-radius: 999px; background: var(--accent); color: var(--surface); text-decoration: none; font-weight: 600; }
.btn:hover { background: var(--accent-2); color: var(--surface); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { background: var(--surface); color: var(--ink); }

/* Sections */
.section { padding-top: 48px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; }
.map { isolation: isolate; height: 460px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.map { position: relative; }
.map-fallback { position: absolute; inset: auto 12px 12px 12px; z-index: 2; margin: 0; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; color: var(--ink); text-decoration: none; transition: transform .15s ease, border-color .15s ease; }
.card:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--ink); }
.card h3 { font-size: 1.5rem; margin: .2em 0 .3em; }
.card p { color: var(--ink-2); }
.card-type { font-size: .85rem; color: var(--ink-2); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card-type::before { content: ""; width: 14px; height: 5px; border-radius: 3px; background: var(--city); flex: none; }
.card-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0 16px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.card-stats dt { font-size: .74rem; color: var(--ink-2); }
.card-stats dd { margin: 0; font-weight: 600; font-size: 1.1rem; }
.card-cta { margin-top: auto; color: var(--accent); font-weight: 600; }

.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 56px; padding-bottom: 48px; }
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; }
.how-grid p { color: var(--ink-2); }

/* Community page */
.c-hero { padding: 40px 0 28px; border-bottom: 1px solid var(--line); background: var(--surface); box-shadow: inset 0 6px 0 var(--city); }
.crumbs { font-size: .9rem; color: var(--ink-2); }
.chips { list-style: none; padding: 0; margin: 16px 0 0; display: flex; gap: 8px; flex-wrap: wrap; }
.chips li { background: var(--accent-soft); color: var(--ink); border-radius: 999px; padding: 5px 12px; font-size: .88rem; font-weight: 500; }
.c-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; padding-top: 12px; }
.c-side { padding-top: 34px; display: flex; flex-direction: column; gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.panel h2 { font-size: 1.25rem; margin-top: 0; }
.panel h3 { font-size: 1rem; margin-top: 1em; }
.panel-quiet { background: transparent; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; margin: 20px 0 0; }
.kpis div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.kpis dt { font-size: .82rem; color: var(--ink-2); }
.kpis dd { margin: 2px 0; font-family: var(--display); font-size: 1.8rem; font-weight: 700; }
.kpis span { font-size: .76rem; color: var(--ink-2); }
.insights { padding-left: 1.1em; }
.insights li { margin-bottom: .6em; }
.insights li::marker { color: var(--warm); }
.spots { list-style: none; padding: 0; margin: 0; }
.spots li { display: flex; flex-direction: column; padding: 12px 0; border-top: 1px solid var(--line); }
.spots li:first-child { border-top: 0; padding-top: 0; }
.spots span:last-child { color: var(--ink-2); font-size: .92rem; }
.spot-kind { font-size: .8rem; color: var(--accent); font-weight: 600; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { margin: .4em 0; }

/* Bars */
.bars { display: grid; gap: 8px; margin: 12px 0; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 48px; gap: 10px; align-items: center; font-size: .92rem; }
.bar-track { height: 12px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.bars-alt .bar-fill { background: var(--warm); }
.bar-val { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.cols { display: flex; align-items: flex-end; gap: 10px; height: 200px; margin-top: 16px; }
.col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.col-bar { flex: 0 0 auto; width: 100%; max-width: 46px; background: var(--accent); border-radius: 6px 6px 0 0; min-height: 2px; }
.col-partial .col-bar { background: repeating-linear-gradient(45deg, var(--accent), var(--accent) 4px, var(--accent-soft) 4px, var(--accent-soft) 8px); }
.col-val { font-size: .8rem; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.col-label { font-size: .78rem; color: var(--ink-2); border-top: 1px solid var(--line); width: 100%; text-align: center; padding-top: 4px; }

/* Compare */
.picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 24px; }
.picker label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: .92rem; }
.picker select { font: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.compare-out { overflow-x: auto; }
.cmp { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-width: 520px; }
.cmp th, .cmp td { padding: 12px 14px; text-align: left; border-top: 1px solid var(--line); vertical-align: top; }
.cmp thead th { border-top: 0; font-family: var(--display); font-size: 1.15rem; }
.cmp tbody th { font-weight: 500; color: var(--ink-2); width: 30%; }
.cmp td { font-variant-numeric: tabular-nums; }
.cmp .hi { color: var(--warm); font-weight: 600; }
.prose { max-width: 760px; }
.prose li { margin-bottom: .6em; }

/* MapLibre tweaks (scoped under .map so they beat maplibre-gl.css, which loads later): match popups and controls to the site palette, light and dark */
.map.maplibregl-map { font: inherit; background: var(--bg); }
.map .maplibregl-popup-content { background: var(--surface); color: var(--ink); border-radius: 10px; padding: 12px 30px 12px 14px; box-shadow: 0 6px 24px rgba(0,0,0,.18); font-size: .95rem; line-height: 1.45; }
.map .maplibregl-popup-content a { font-weight: 600; }
.map .maplibregl-popup-close-button { color: var(--ink-2); font-size: 20px; padding: 2px 8px; }
.map .maplibregl-popup-anchor-top .maplibregl-popup-tip, .map .maplibregl-popup-anchor-top-left .maplibregl-popup-tip, .map .maplibregl-popup-anchor-top-right .maplibregl-popup-tip { border-bottom-color: var(--surface); }
.map .maplibregl-popup-anchor-bottom .maplibregl-popup-tip, .map .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip, .map .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip { border-top-color: var(--surface); }
.map .maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--surface); }
.map .maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--surface); }
.map .maplibregl-cooperative-gesture-screen { font: inherit; }
.map .maplibregl-ctrl-group, .map .maplibregl-ctrl-attrib.maplibregl-compact { background: var(--surface); color: var(--ink-2); border: 1px solid var(--line); box-shadow: none; }
.map .maplibregl-ctrl-group button + button { border-top-color: var(--line); }
.map .maplibregl-ctrl-attrib { font-size: 12px; line-height: 1.4; }
.map .maplibregl-ctrl-attrib a { color: var(--ink-2); }
@media (prefers-color-scheme: dark) {
  .map .maplibregl-ctrl-group .maplibregl-ctrl-icon, .map .maplibregl-ctrl-attrib-button { filter: invert(1); }
}

@media (max-width: 860px) {
  .c-grid { grid-template-columns: 1fr; gap: 0; }
  .map { height: 360px; }
  .bar-row { grid-template-columns: 110px 1fr 44px; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .hero { padding: 48px 0 40px; }
  nav { gap: 14px; }
  .card-stats { grid-template-columns: repeat(3, 1fr); }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Safety */
.kpis .lvl-low dd { color: var(--accent); }
.kpis .lvl-high dd { color: var(--warm); }
.rc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 18px 0 8px; }
.rc { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.rc-title { font-weight: 600; font-size: .92rem; margin-bottom: 10px; }
.rc-row { display: grid; grid-template-columns: 128px 1fr 44px; gap: 10px; align-items: center; font-size: .86rem; margin: 6px 0; }
.rc-name { color: var(--ink-2); }
.rc-track { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.rc-fill { display: block; height: 100%; border-radius: 999px; background: var(--ink-2); }
.rc-this .rc-fill { background: var(--warm); }
.rc-this .rc-name { color: var(--ink); font-weight: 600; }
.rc-med .rc-fill { background: var(--accent); }
.rc-val { text-align: right; font-variant-numeric: tabular-nums; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; margin-top: 8px; }
.two-col h3 { margin-top: 1em; }
.two-col .bar-row { grid-template-columns: 140px 1fr 44px; }
@media (max-width: 520px) { .rc-row { grid-template-columns: 110px 1fr 40px; } }

/* Multi-city */
nav a[aria-current="page"] { color: var(--accent); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.city-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 18px; }
@media (min-width: 760px) { .city-cards { grid-template-columns: repeat(2, 1fr); } }
.city-card h3 { font-size: 2rem; }
.card-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.card-chips span { background: var(--accent-soft); border-radius: 999px; padding: 3px 10px; font-size: .82rem; }
.mini { display: grid; gap: 6px; margin: 10px 0 0; }
.mini div { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 6px 0; font-size: .92rem; }
.mini dt { color: var(--ink-2); }
.mini dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }
.rel { display: block; font-size: .78rem; color: var(--ink-2); margin-top: 2px; }
.rel-up::before { content: "▲ "; color: var(--warm); }
.rel-down::before { content: "▼ "; color: var(--accent); }
.note { background: var(--warm-soft); border-radius: 10px; padding: 10px 14px; font-size: .92rem; }
.c-hero .kpis { margin-top: 24px; }

/* Home city cards: facts, climate, live weather */
.city-card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 30px; }
.wx { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft); border-radius: 999px; padding: 4px 12px 4px 10px; font-size: .85rem; white-space: nowrap; }
.wx-ico { font-size: 1rem; line-height: 1; }
.wx-t { font-weight: 600; font-variant-numeric: tabular-nums; }
.wx-d { color: var(--ink-2); }
.facts-h { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; color: var(--ink-2); margin: 14px 0 6px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 10px; margin: 0; padding: 12px 0; border-top: 1px solid var(--line); }
.facts dt { font-size: .74rem; color: var(--ink-2); }
.facts dd { margin: 1px 0; font-weight: 600; font-size: 1.08rem; font-variant-numeric: tabular-nums; }
.facts span { display: block; font-size: .72rem; color: var(--ink-2); line-height: 1.35; }
.trange { position: relative; height: 34px; margin: 6px 4px 18px; border-bottom: 1px dashed var(--line); }
.trange-bar { position: absolute; top: 12px; height: 10px; border-radius: 999px; background: linear-gradient(90deg, #6fa8c9, var(--accent) 45%, var(--warm)); }
.trange-zero { position: absolute; top: 6px; height: 22px; border-left: 1px solid var(--ink-2); opacity: .45; }
.trange-lbl { position: absolute; top: 26px; transform: translateX(-50%); font-size: .72rem; color: var(--ink-2); white-space: nowrap; }
.h2h { margin-top: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; }
.h2h h3 { margin: 0 0 8px; }
.h2h ul { margin: 0; padding-left: 1.1em; }
.h2h li { margin: .35em 0; }
.h2h li::marker { color: var(--warm); }
@media (max-width: 420px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.trange-cap { font-size: .72rem; color: var(--ink-2); margin: 4px 0 0; }

/* Header: city switcher + search */
.header-inner { flex-wrap: nowrap; gap: 14px; }
.brand { flex: none; }
.citysw { position: relative; flex: none; }
.citysw summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: .92rem; white-space: nowrap; }
.citysw summary::-webkit-details-marker { display: none; }
.citysw summary:hover { border-color: var(--accent); }
.citysw summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.citysw-k { color: var(--ink-2); font-size: .8rem; }
.citysw-v { font-weight: 600; }
.citysw summary svg { width: 12px; height: 12px; transition: transform .15s; }
.citysw[open] summary svg { transform: rotate(180deg); }
.citysw-panel { position: absolute; left: 0; top: calc(100% + 8px); width: min(320px, calc(100vw - 32px)); max-height: min(70vh, 520px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgb(0 0 0 / .14); padding: 10px; z-index: 1100; }
.citysw-group + .citysw-group { margin-top: 6px; }
.citysw-prov { margin: 6px 8px 2px; font-size: .74rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.citysw ul { list-style: none; margin: 0; padding: 0; }
.citysw-panel a { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.citysw-panel a:hover, .citysw-panel a:focus-visible { background: var(--accent-soft); outline: none; }
.citysw-panel a[aria-current="page"] span { color: var(--accent); font-weight: 600; }
.citysw-panel small { color: var(--ink-2); font-size: .8rem; }
.citysw-panel .citysw-all { border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; margin-top: 6px; padding-top: 10px; color: var(--accent); font-weight: 500; font-size: .9rem; }

.search { position: relative; flex: 1 1 auto; max-width: 420px; margin-left: auto; }
.search input { width: 100%; font: inherit; font-size: .95rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px 8px 36px; -webkit-appearance: none; appearance: none; }
.search input::placeholder { color: var(--ink-2); }
.search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.search-ico { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--ink-2); pointer-events: none; }
.search-list { position: absolute; left: 0; right: 0; top: calc(100% + 8px); list-style: none; margin: 0; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgb(0 0 0 / .14); z-index: 1100; max-height: 70vh; overflow: auto; }
.search-list a { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: baseline; padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.search-list strong { font-weight: 600; }
.search-list small { grid-column: 2; color: var(--ink-2); font-size: .8rem; }
.search-list .sr-kind { grid-row: span 2; align-self: center; font-size: .68rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 2px 6px; min-width: 38px; text-align: center; }
.search-list li[aria-selected="true"] a, .search-list a:hover { background: var(--accent-soft); }
.search-list li[aria-selected="true"] .sr-kind, .search-list a:hover .sr-kind { background: var(--surface); }
.search-empty { padding: 10px; color: var(--ink-2); font-size: .9rem; }
.site-header nav { flex: none; }

.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 10px 0; }
.footer-nav a { color: var(--ink); font-weight: 500; }
.results { list-style: none; padding: 0; margin: 8px 0 24px; display: grid; gap: 8px; }
.results a { display: flex; flex-direction: column; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; }
.results a:hover { border-color: var(--accent); }
.results span { color: var(--ink-2); font-size: .88rem; }

@media (max-width: 720px) {
  .header-inner { flex-wrap: wrap; gap: 10px 12px; padding-top: 10px; padding-bottom: 10px; min-height: 0; }
  .brand { font-size: 1.05rem; }
  .citysw-k { display: none; }
  .site-header nav { margin-left: auto; }
  .search { order: 3; flex-basis: 100%; max-width: none; margin-left: 0; }
}
@media (max-width: 380px) { .brand-mark { width: 26px; height: 26px; flex: none; display: block; } }
.header-inner { position: relative; }
@media (max-width: 720px) {
  .citysw { position: static; }
  .citysw-panel { left: 16px; right: 16px; width: auto; }
}

/* Transit-line brand details */
.city-card, .cards .card { border-top: 6px solid var(--city); }
.citysw-panel a span { display: inline-flex; align-items: center; gap: 8px; }
.citysw-panel a span::before, .citysw summary::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 3px var(--warm); flex: none; }
.citysw summary:not([data-city])::before { display: none; }
.wx { background: var(--accent-soft); }
@media (max-width: 720px) {
  .header-inner { gap: 10px 8px; }
  .brand { font-size: 1rem; gap: 8px; }
  .brand-mark { width: 24px; height: 24px; }
  .citysw summary { padding: 6px 10px; gap: 6px; font-size: .88rem; }
  .site-header nav a { font-size: .9rem; }
}

/* ---- City page: browse (filters, sorting, groups) ---- */
[hidden] { display: none !important; }
.browse { display: grid; gap: 14px; margin: 0 0 26px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.browse-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.browse-find { flex: 1 1 260px; }
.browse-find input { width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: 999px; padding: 10px 16px; }
.browse-find input:focus-visible, .browse-sel select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.browse-sel { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--ink-2); font-weight: 600; }
.browse-sel select { font: inherit; font-weight: 500; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: 999px; padding: 9px 14px; max-width: 100%; }
.browse-set { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; min-width: 0; }
.browse-set legend { float: left; padding: 0; margin-right: 6px; font-size: .82rem; font-weight: 600; color: var(--ink-2); min-width: 7.5em; }
.chip { position: relative; display: inline-block; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip span { display: inline-block; padding: 6px 13px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--bg); font-size: .9rem; font-weight: 500; color: var(--ink); }
.chip input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--surface); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip:hover span { border-color: var(--accent); }
.browse-count { margin: 2px 0 0; font-size: .9rem; color: var(--ink-2); }
.linklike { font: inherit; font-size: inherit; background: none; border: 0; padding: 0; margin-left: 10px; color: var(--accent); font-weight: 600; text-decoration: underline; cursor: pointer; }
.cgroup { margin: 0 0 34px; }
.cgroup-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-bottom: 14px; }
.cgroup-head h3 { margin: 0; font-size: 1.25rem; }
.cgroup-head p { margin: 0; font-size: .92rem; }
@media (max-width: 720px) {
  .browse { padding: 14px; }
  .browse-set legend { float: none; width: 100%; margin: 0 0 2px; }
  .browse-sel { width: 100%; }
  .browse-sel select { flex: 1; }
}

.schools { list-style: none; padding: 0; margin: 12px 0; }
.schools li { display: flex; flex-direction: column; padding: 10px 0; border-top: 1px solid var(--line); }
.schools li:first-child { border-top: 0; }
.school-name { font-weight: 600; }
.school-meta { color: var(--ink-2); font-size: .88rem; }

/* Match-me quiz */
.match-form { display: grid; gap: 14px; margin-bottom: 28px; }
.match-q legend { min-width: 11em; }
.rent-kpis { margin: 4px 0 16px; }
.match-reset { justify-self: start; }
.match-out h2 { margin: 0 0 6px; }
.match-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.match-card { background: var(--surface); border: 1px solid var(--line); border-top: 6px solid var(--city, var(--accent)); border-radius: 14px; padding: 16px 18px; }
.match-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.match-name { font-weight: 700; font-size: 1.1rem; color: var(--ink); text-decoration: none; }
.match-name:hover { text-decoration: underline; }
.match-sub { display: block; font-size: .85rem; color: var(--ink-2); margin-top: 2px; }
.match-score { text-align: center; background: var(--accent-soft); border-radius: 12px; padding: 6px 12px; min-width: 62px; }
.match-score b { display: block; font-size: 1.35rem; line-height: 1.1; }
.match-score span { font-size: .72rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }
.match-why { margin: 12px 0 0; padding-left: 1.1em; font-size: .93rem; }
.match-why li { margin: 2px 0; }
.match-bad { margin: 10px 0 0; font-size: .88rem; color: var(--ink-2); }
.match-links { margin: 12px 0 0; font-size: .9rem; }
@media (max-width: 560px) { .match-q legend { float: none; display: block; margin-bottom: 4px; } }

/* Source notes, printed once at the bottom of a page */
.fn { font-size: .7em; line-height: 0; margin-left: .15em; font-weight: 600; }
.fn a { text-decoration: none; padding: 0 .12em; }
.sources { padding-top: 8px; border-top: 1px solid var(--line, #d9dee6); }
.sources h2 { font-size: 1rem; margin-bottom: .5em; }
.sources ol { margin: 0; padding-left: 1.4em; font-size: .82rem; color: var(--ink-2); }
.sources li { margin: 0 0 .6em; max-width: 78ch; }
.sources li:target { background: rgba(255, 210, 90, .25); }
.fn-back { text-decoration: none; margin-left: .3em; }

/* Shortlist */
.card { position: relative; }
.sl-btn { display: inline-flex; align-items: center; gap: .4em; cursor: pointer; user-select: none; color: var(--ink-2); font-size: 1.15rem; line-height: 1; }
.card .sl-btn { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; justify-content: center; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); }
.sl-btn:hover, .sl-btn:focus-visible { color: var(--accent); border-color: var(--accent); }
.sl-btn[aria-pressed="true"] { color: var(--accent); }
.sl-page { margin: .2em 0 .6em; }
.sl-page .sl-btn { font-size: .95rem; padding: .45em .9em; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.sl-pill { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 50; display: flex; align-items: center; gap: .6em; padding: .55em .7em .55em 1.1em; background: var(--ink); color: var(--bg); border-radius: 999px; box-shadow: 0 6px 24px rgba(0,0,0,.28); font-size: .95rem; max-width: calc(100vw - 32px); }
.sl-pill[hidden] { display: none; }
.sl-pill a { color: inherit; font-weight: 600; text-decoration: none; }
.sl-pill .sl-clear { background: transparent; border: 1px solid currentColor; color: inherit; border-radius: 999px; padding: .2em .7em; font-size: .8rem; cursor: pointer; }
.cmp-tools { display: flex; flex-wrap: wrap; gap: .6em; margin: 0 0 1em; }
.cmp-tools button { font: inherit; font-size: .9rem; padding: .45em .95em; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); cursor: pointer; }
.cmp-tools button:hover { border-color: var(--accent); }
@media print { .sl-pill, .sl-btn { display: none !important; } }
.badge{display:inline-block;padding:.15rem .6rem;border-radius:999px;background:var(--accent-soft,#e6f0ee);color:var(--accent,#0b5d57);font-size:.85rem;font-weight:600;margin-right:.4rem}
table.data{width:100%;border-collapse:collapse;margin:.5rem 0;font-size:.95rem}
table.data th,table.data td{padding:.45rem .6rem;border-bottom:1px solid var(--line,#ddd);text-align:left}
table.data thead th{font-weight:600}
@media(max-width:600px){table.data{font-size:.88rem}}

/* ===== Chinook theme (dark prairie sky): overrides the base tokens and components above ===== */
:root, :root:not([data-theme="light"]) {
  --bg: #0d1726; --surface: #152338; --ink: #eaf1fa; --ink-2: #a3b3c9; --line: #26364f;
  --accent: #6fb7ff; --accent-2: #a8d3ff; --accent-soft: #1c3150; --warm: #f2c14e; --warm-soft: #3a3220;
  --bike: #f2c14e; --radius: 20px;
  --display: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --l-calgary: #ff6b7d; --l-vancouver: #4aa8ff; --l-toronto: #ffd23f; --l-montreal: #34d27f;
  --l-ottawa: #b894ff; --l-edmonton: #ff9b4d; --l-winnipeg: #ff7a6b; --l-metro-vancouver: #38d0c8;
  color-scheme: dark;
}
h1, h2, h3 { font-weight: 700; letter-spacing: -0.03em; }
h1 { font-size: clamp(2.6rem, 7vw, 5.4rem); line-height: 1; letter-spacing: -0.04em; }
.brand { font-weight: 700; letter-spacing: -0.01em; font-size: 1.25rem; }
.brand-mark { width: 32px; height: 32px; }
.site-header { background: color-mix(in srgb, var(--bg) 90%, transparent); border-bottom-color: var(--line); }
.c-hero { background: var(--surface); box-shadow: none; border: 1px solid var(--line); border-radius: 28px; max-width: 1120px; margin: 20px auto 0; padding: 40px 0 32px; }
@media (max-width: 1160px) { .c-hero { margin: 12px 12px 0; border-radius: 22px; } }
.chips li { background: transparent; border: 1px solid #3a4d6b; color: #c7d4e6; }
.kpis div { border-radius: 18px; padding: 16px 18px; }
.kpis dd { font-weight: 700; color: var(--accent); }
.btn { color: #0d1726; font-weight: 700; }
.btn:hover { color: #0d1726; }
.btn-ghost { color: var(--ink); border-color: #3a4d6b; }
.badge { background: var(--warm); color: #0d1726; }
.card:hover { border-color: var(--accent); }
.sl-pill { background: var(--warm); color: #0d1726; }
/* Commute bars */
.cm-key { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: .88rem; color: var(--ink-2); margin: 0 0 12px; }
.cm-sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-left: 8px; }
.cm-sw:first-child { margin-left: 0; }
.commute { list-style: none; margin: 0 0 12px; padding: 18px 20px; display: flex; flex-direction: column; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.cm-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .95rem; margin-bottom: 6px; }
.cm-val { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.cm-bar { display: block; height: 8px; border-radius: 4px; margin-top: 4px; }
.cm-drive { background: var(--accent); }
.cm-bike { background: var(--bike); }
dl.kpis + h3, ul + h3, p + h3, .bars + h3 { margin-top: 1.8em; }
.amen-kpis dd { font-family: var(--sans); font-size: 1rem; font-weight: 500; line-height: 1.45; color: var(--ink); }
.amen-kpis div:first-child dd { font-family: var(--display); font-size: 1.35rem; font-weight: 700; color: var(--accent); }
.amen-kpis span { display: block; margin-top: 4px; }
/* One colour for every city: sky blue; wheat marks "you are here" */
:root, :root:not([data-theme="light"]) {
  --l-calgary: var(--accent); --l-vancouver: var(--accent); --l-toronto: var(--accent); --l-montreal: var(--accent);
  --l-ottawa: var(--accent); --l-edmonton: var(--accent); --l-winnipeg: var(--accent); --l-metro-vancouver: var(--accent);
}
/* Home hero skyline */
.hero { padding-top: 64px; }
.hero-inner { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 40px; }
.hero-text { flex: 999 1 460px; min-width: 0; }
.hero h1 { font-size: clamp(2.3rem, 4.6vw, 3.7rem); }
.skyline { flex: 1 1 400px; min-width: 0; margin: 0; }
.sky-row { display: flex; align-items: flex-end; gap: 8px; height: 280px; padding: 0 6px; border-bottom: 6px solid var(--warm); }
.sky-t { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; color: var(--ink); text-decoration: none; }
.sky-n { font-family: var(--display); font-weight: 700; font-size: .95rem; margin-bottom: 4px; }
.sky-b { display: block; width: 100%; background: var(--accent); border-radius: 6px 6px 0 0; transition: filter .15s ease; }
.sky-t:hover .sky-b, .sky-t:focus-visible .sky-b { filter: brightness(1.18); }
.sky-t:hover { color: var(--ink); }
.sky-t.here .sky-b { background: var(--warm); }
.sky-t.here .sky-n { color: var(--warm); }
.sky-labels { display: flex; gap: 8px; padding: 8px 6px 0; }
.sky-labels span { flex: 1; min-width: 0; text-align: center; font-size: .74rem; line-height: 1.25; color: var(--ink-2); overflow: visible; }
.sky-labels span.here { color: var(--warm); font-weight: 600; }
.skyline figcaption { margin-top: 10px; font-size: .82rem; color: var(--ink-2); }
@media (max-width: 520px) { .sky-row { height: 200px; gap: 5px; } .sky-labels { gap: 5px; } .sky-labels span { font-size: .66rem; } .sky-n { font-size: .8rem; } }
/* City cards: three-tower glyph instead of a colour stripe */
.city-card, .cards .card { border-top: 1px solid var(--line); }
.city-card .card-type::before { display: none; }
.city-glyph { display: inline-flex; align-items: flex-end; gap: 2px; height: 16px; margin-right: 4px; }
.city-glyph i { display: block; width: 5px; background: var(--accent); border-radius: 1px; }
.city-glyph i:nth-child(1) { height: 60%; } .city-glyph i:nth-child(2) { height: 100%; } .city-glyph i:nth-child(3) { height: 45%; }
.city-card.here .city-glyph i:nth-child(2) { background: var(--warm); }
