:root {
  --bg: #f0f1f3; --text: rgba(0,0,0,0.85); --text2: rgba(0,0,0,0.5); --text3: rgba(0,0,0,0.35);
  --glass: rgba(255,255,255,0.55); --glass-strong: rgba(243,244,246,0.85);
  --glass-border: rgba(255,255,255,0.30); --row-hover: rgba(255,255,255,0.5);
  --hairline: rgba(0,0,0,0.08); --chip: rgba(255,255,255,0.6);
  --link: #1e4f8f; --link-h: #163c6e; --map-bg: #dfe3e8; --accent: rgb(0,122,255); --bar-track: rgba(0,0,0,0.08);
  --card-solid: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #191b1f; --text: rgba(255,255,255,0.85); --text2: rgba(255,255,255,0.55); --text3: rgba(255,255,255,0.35);
    --glass: rgba(28,28,30,0.55); --glass-strong: rgba(28,29,33,0.85);
    --glass-border: rgba(255,255,255,0.10); --row-hover: rgba(255,255,255,0.06);
    --hairline: rgba(255,255,255,0.10); --chip: rgba(255,255,255,0.10);
    --link: #7db4f5; --link-h: #a8ccf8; --map-bg: #1a2230; --card-solid: #232529; --bar-track: rgba(255,255,255,0.10);
  }
  #map .leaflet-tile { filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(88%) saturate(60%); }
  .leaflet-popup-content-wrapper, .leaflet-popup-tip { background: rgb(44,44,46); color: rgba(255,255,255,0.85); }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body { font: 16px/1.5 -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
  color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
main { max-width: 680px; margin: 0 auto; padding: 24px 14px 40px; display: flex; flex-direction: column; gap: 12px; }
a { color: var(--link); } a:hover { color: var(--link-h); }
select:focus, button:focus-visible, a:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(0,122,255,0.4); }
h1 { margin: 0 0 4px; font-size: 24px; font-weight: 700; letter-spacing: -0.022em; line-height: 1.15; text-wrap: pretty; }
h2 { font-size: 18px; font-weight: 700; letter-spacing: -0.015em; margin: 14px 0 6px; }

.site-header { position: sticky; top: 0; z-index: 1000; background: var(--glass-strong);
  backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
  box-shadow: inset 0 0 0 1px var(--glass-border), 0 0.5px 0 var(--hairline);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 18px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text);
  font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.site-header nav { display: flex; align-items: center; gap: 16px; }
.site-header nav a { text-decoration: none; color: var(--text2); font-size: 13px; font-weight: 500; white-space: nowrap; }
.site-header nav a:hover, .site-header nav a.active { color: var(--text); }
.site-header nav a.active { font-weight: 600; }
.lang-switch { font-size: 12px !important; font-weight: 600 !important; padding: 3px 9px;
  border-radius: 999px; background: var(--chip); box-shadow: inset 0 0 0 1px var(--glass-border); }

.glass-card { background: var(--glass); backdrop-filter: saturate(180%) blur(40px);
  -webkit-backdrop-filter: saturate(180%) blur(40px); border-radius: 16px;
  box-shadow: inset 0 0 0 1px var(--glass-border); }
.summary-card { padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 12px; }
.summary-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600;
  color: var(--text2); background: var(--chip); border-radius: 999px; padding: 4px 11px;
  box-shadow: inset 0 0 0 1px var(--glass-border); text-decoration: none; }
a.chip { font-weight: 500; } a.chip:hover { color: var(--text); }
.pulse-wrap { position: relative; width: 8px; height: 8px; display: inline-block; }
.pulse-wrap span { position: absolute; inset: 0; border-radius: 50%; background: #0ca30c; }
.pulse-wrap span:last-child { animation: pulse-ring 2.4s ease-out infinite; }
@keyframes pulse-ring { 0% { transform: scale(1); opacity: 0.6; } 70% { transform: scale(2.4); opacity: 0; } 100% { transform: scale(2.4); opacity: 0; } }
.summary-stats { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.median-num { font-size: 40px; font-weight: 700; letter-spacing: -0.022em; line-height: 1;
  font-variant-numeric: tabular-nums; }
.over-num { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; color: var(--text); }
.over-label { text-align: right; font-size: 13px; color: var(--text2); line-height: 1.5; }
.dist-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; gap: 2px; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.band-chip { display: inline-flex; align-items: center; gap: 6px; border: none; cursor: pointer;
  font-family: inherit; font-size: 12px; font-weight: 600; color: var(--text); border-radius: 999px;
  height: 30px; padding: 0 12px; box-shadow: inset 0 0 0 1px var(--glass-border); }
.band-chip.on { box-shadow: inset 0 0 0 1.5px currentColor; }

.band-badge { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; color: var(--text); }
.band-badge .dot, .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.band-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600;
  color: var(--text); white-space: nowrap; border-radius: 999px; padding: 2px 9px; }
.band-pill .dot { width: 8px; height: 8px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: #ffffff; border: none; border-radius: 12px; min-height: 44px;
  padding: 10px 16px; font-family: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  text-decoration: none; box-shadow: inset 0 0.5px 0 rgba(255,255,255,0.3); }
.btn:hover { color: #ffffff; } .btn:active { background: rgb(41,98,217); }
.btn-block { display: flex; width: 100%; min-height: 48px; }
.btn-sm { min-height: 34px; padding: 0 16px; font-size: 13px; border-radius: 8px; }
/* While the browser's permission prompt is up the button is genuinely busy:
   locked, dimmed, and spinning, so a second tap is neither invited nor needed. */
.btn[disabled] { cursor: default; }
.btn.is-locating { opacity: 0.72; cursor: progress; }
.btn.is-locating > svg { display: none; }
.btn.is-locating::before { content: ''; width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.35); border-top-color: #ffffff;
  animation: bs-spin 0.7s linear infinite; }
@keyframes bs-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn.is-locating::before { animation-duration: 2.4s; } }

.map-wrap { position: relative; }
/* Shown only while we have no position — the map IS the fallback input. */
.map-hint { position: absolute; left: 50%; top: 10px; transform: translateX(-50%);
  z-index: 800; max-width: calc(100% - 20px); text-align: center; background: var(--glass);
  backdrop-filter: saturate(180%) blur(40px); -webkit-backdrop-filter: saturate(180%) blur(40px);
  border-radius: 999px; padding: 7px 14px; font-size: 12px; font-weight: 600; color: var(--text);
  box-shadow: inset 0 0 0 1px var(--glass-border), 0 4px 12px rgba(0,0,0,0.12); pointer-events: none; }
#map { height: 340px; border-radius: 16px; overflow: hidden; background: var(--map-bg);
  box-shadow: inset 0 0 0 1px var(--glass-border), 0 0 0 0.5px var(--hairline); }
.map-legend { position: absolute; left: 10px; bottom: 10px; z-index: 800; display: flex;
  flex-wrap: wrap; gap: 9px; align-items: center; background: var(--glass);
  backdrop-filter: saturate(180%) blur(40px); -webkit-backdrop-filter: saturate(180%) blur(40px);
  border-radius: 999px; padding: 6px 12px; font-size: 11px; font-weight: 500; color: var(--text);
  box-shadow: inset 0 0 0 1px var(--glass-border), 0 4px 12px rgba(0,0,0,0.12); }
.map-legend span { display: inline-flex; align-items: center; gap: 5px; }
.map-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.leaflet-container { font-family: inherit; }

.rec-card { box-shadow: inset 0 0 0 1.5px var(--accent); padding: 16px 18px;
  display: flex; flex-direction: column; gap: 12px; }
.rec-eyebrow { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700;
  color: var(--accent); letter-spacing: 0.02em; }
.rec-main { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.rec-name { font-size: 19px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.25; }
.rec-meta { font-size: 13px; color: var(--text2); margin-top: 2px; }
.rec-occ { font-size: 30px; font-weight: 700; letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums; line-height: 1.1; }
/* The card's own arithmetic: one row per input, the estimate it adds up to,
   and the note that keeps it an estimate. */
.rec-why { border-radius: 12px; background: var(--row-hover); padding: 11px 13px; }
.rw-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.01em; }
.rw-total { color: var(--text2); font-weight: 500; white-space: nowrap; }
.rw-total-l { font-size: 11px; }
.rw-total strong { font-size: 15px; color: var(--text); font-weight: 700;
  font-variant-numeric: tabular-nums; }
.rw-rows { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.rw-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding-top: 6px; border-top: 1px solid var(--glass-border); }
.rw-row:first-child { padding-top: 0; border-top: 0; }
.rw-l { font-size: 12.5px; font-weight: 600; }
.rw-d { font-size: 11.5px; color: var(--text3); margin-top: 1px; }
.rw-v { font-size: 13px; font-weight: 700; white-space: nowrap;
  font-variant-numeric: tabular-nums; }
.rw-note { font-size: 11px; color: var(--text3); margin: 8px 0 0; line-height: 1.4; }
/* Filters that match nothing: say so and offer the way back, rather than
   leaving a blank card that reads as a page that broke. */
.list-empty { display: flex; flex-direction: column; align-items: center; gap: 12px;
  text-align: center; padding: 26px 18px; }
.list-empty p { margin: 0; font-size: 14px; color: var(--text2); }
.rec-alt { font-size: 12px; color: var(--text2); }
.rec-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rec-basis { font-size: 12px; color: var(--text3); }

.teaser { padding: 12px 16px; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; border-radius: 12px; }
a .teaser:hover { background: var(--row-hover); }
.teaser-title { font-size: 14px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
.teaser-sub { font-size: 12px; color: var(--text2); line-height: 1.45; }

.controls { display: flex; gap: 8px; align-items: center; justify-content: space-between;
  flex-wrap: wrap; margin-top: 4px; }
select { appearance: none; -webkit-appearance: none; font-family: inherit; font-size: 13px;
  max-width: 100%; text-overflow: ellipsis;
  font-weight: 500; color: var(--text); height: 36px; margin: 0; padding: 0 30px 0 13px; border: none;
  border-radius: 999px; background-color: var(--chip); cursor: pointer;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 10 10"><path d="M2 3.5 L5 6.5 L8 3.5" stroke="%23888" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>');
  background-repeat: no-repeat; background-position: right 11px center;
  box-shadow: inset 0 0 0 1px var(--glass-border), 0 0.5px 1px rgba(0,0,0,0.06); }
.sort-note { font-size: 12px; color: var(--text3); font-weight: 500; }

#list { overflow: hidden; }
#list > a, #list > div.facility-card-wrap { text-decoration: none; color: inherit; display: block; }
.facility-card { padding: 13px 16px 12px; display: flex; flex-direction: column; gap: 9px;
  box-shadow: inset 0 -0.5px 0 var(--hairline); transition: background 120ms; }
a:hover .facility-card { background: var(--row-hover); }
.facility-card .fc-top { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.facility-card h3 { margin: 0 0 2px; font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
  line-height: 1.3; color: var(--text); }
.facility-card .meta { font-size: 13px; color: var(--text2); }
.fc-occ { font-size: 24px; font-weight: 700; letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums; line-height: 1.1; text-align: right; }
.fc-right { flex-shrink: 0; text-align: right; }
.occ-bar { position: relative; height: 6px; border-radius: 999px; background: var(--hairline); overflow: hidden; }
.occ-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; display: block; }

.stale-banner { background: #fab219; color: #1a1a18; padding: 8px 14px; border-radius: 12px;
  font-size: 13px; font-weight: 500; }

.back-link { display: inline-flex; align-items: center; gap: 5px; font-size: 13px;
  font-weight: 500; text-decoration: none; }
.fac-hero { display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; flex-wrap: wrap; }
.fac-h1 { margin: 0 0 3px; font-size: 21px; font-weight: 700; letter-spacing: -0.02em;
  line-height: 1.25; text-wrap: pretty; }
.gauge { position: relative; height: 8px; border-radius: 999px; background: var(--hairline); overflow: hidden; }
.gauge i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; display: block; }
.gauge b { position: absolute; top: 0; bottom: 0; left: 50%; width: 1.5px; background: var(--text3); }
.gauge-axis { display: flex; justify-content: space-between; font-size: 11px;
  color: var(--text3); font-variant-numeric: tabular-nums; margin-top: 4px; }
#minimap { height: 220px; background: var(--map-bg); }
@media (prefers-color-scheme: dark) {
  #minimap .leaflet-tile { filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(88%) saturate(60%); }
}
.addr-row { display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; padding: 13px 16px; }
.addr { display: flex; align-items: flex-start; gap: 9px; min-width: 0;
  font-size: 13px; color: var(--text); line-height: 1.45; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 640px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stay-line { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text2); }
.stay-line strong { color: var(--text); font-variant-numeric: tabular-nums; }
.stat-grid .stat { border-radius: 14px; padding: 13px 15px; display: flex;
  flex-direction: column; gap: 8px; min-width: 0; }
.stat-bar { height: 4px; }

.stat-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.stat { background: var(--glass); backdrop-filter: saturate(180%) blur(40px);
  -webkit-backdrop-filter: saturate(180%) blur(40px); border-radius: 12px;
  box-shadow: inset 0 0 0 1px var(--glass-border); padding: 12px 16px; min-width: 128px; }
.stat .n { font-size: 24px; font-weight: 700; letter-spacing: -0.015em; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--text2); font-size: 12px; margin-top: 2px; }
/* Chart window switcher. Plain links, so the longer views are shareable and
   survive JavaScript being off. */
.range-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 0; }
.range-tab { text-decoration: none; color: var(--text2); font-size: 13px; font-weight: 600;
  padding: 6px 13px; min-height: 32px; display: inline-flex; align-items: center;
  border-radius: 999px; background: var(--chip); box-shadow: inset 0 0 0 1px var(--glass-border); }
.range-tab:hover { color: var(--text); }
.range-tab.on { color: #ffffff; background: #1e4f8f; box-shadow: none; }
.range-note { margin: -2px 0 0; font-size: 12.5px; }

.chart-wrap { overflow-x: auto; background: var(--glass); backdrop-filter: saturate(180%) blur(40px);
  -webkit-backdrop-filter: saturate(180%) blur(40px); border: none; border-radius: 16px;
  box-shadow: inset 0 0 0 1px var(--glass-border); padding: 14px; margin: 10px 0; }

.wizard-card { background: var(--glass); backdrop-filter: saturate(180%) blur(40px);
  -webkit-backdrop-filter: saturate(180%) blur(40px); border-radius: 16px;
  box-shadow: inset 0 0 0 1px var(--glass-border); padding: 14px 18px; margin: 10px 0; }
.wizard-card h3 { margin: 0 0 6px; font-size: 16px; letter-spacing: -0.01em; }
.wizard-card.urgent { box-shadow: inset 0 0 0 2px #d03b3b; }

footer { max-width: 680px; margin: 0 auto; padding: 18px 14px 36px; color: var(--text2);
  font-size: 12px; line-height: 1.6; box-shadow: inset 0 0.5px 0 var(--hairline); }
footer p { margin: 0 0 4px; }

@media (max-width: 420px) {
  .median-num { font-size: 32px; }
  .fc-occ { font-size: 20px; }
  #map { height: 300px; }
}

.search-input { flex: 1 1 200px; min-width: 0; font-family: inherit; font-size: 13px;
  font-weight: 500; color: var(--text); height: 34px; padding: 0 13px; border: none;
  border-radius: 999px; background: var(--chip);
  box-shadow: inset 0 0 0 1px var(--glass-border), 0 0.5px 1px rgba(0,0,0,0.06); }
.search-input::placeholder { color: var(--text3); }
.search-input:focus { outline: none; box-shadow: inset 0 0 0 1px var(--glass-border), 0 0 0 3px rgba(0,122,255,0.4); }

.subtitle { margin: -6px 0 0; font-size: 13px; color: var(--text2); line-height: 1.5; }
.triage-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (max-width: 560px) { .triage-row { grid-template-columns: 1fr; } }
.triage-card { padding: 12px 14px; display: flex; flex-direction: column; gap: 4px;
  text-decoration: none; color: var(--text); border-radius: 14px; }
.triage-card:hover { background: var(--row-hover); color: var(--text); }
.open-pill { display: inline-flex; align-items: center; gap: 4px; padding: 0 7px;
  border-radius: 20px; font-size: 11px; font-weight: 600; line-height: 17px;
  background: rgba(12,163,12,0.13); color: #0a7d0a; white-space: nowrap; vertical-align: 1px; }
.open-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: #0ca30c; }
@media (prefers-color-scheme: dark) { .open-pill { color: #5fd35f; } }
.nodata { display: inline-block; padding: 0 7px; border-radius: 20px; font-size: 11px;
  font-weight: 600; line-height: 17px; background: var(--chip); color: var(--text3);
  box-shadow: inset 0 0 0 1px var(--glass-border); vertical-align: 1px; }
.spec-pill { display: inline-block; padding: 0 7px; border-radius: 20px; font-size: 11px;
  font-weight: 650; line-height: 17px; background: rgba(250,178,25,0.18); color: #8a5a00;
  vertical-align: 1px; }
@media (prefers-color-scheme: dark) { .spec-pill { color: #f3c14f; } }
.child-toggle { display: flex; justify-content: center; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 500; color: var(--text2); cursor: pointer;
  user-select: none; margin-top: -4px; }
.child-toggle input { accent-color: rgb(0,122,255); margin: 0; }
.spec-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 12px;
  color: var(--text2); cursor: pointer; user-select: none; white-space: nowrap; }
.spec-toggle input { accent-color: rgb(0,122,255); margin: 0; }
.spec-note { font-size: 13px; line-height: 1.45; padding: 9px 12px; border-radius: 10px;
  background: rgba(250,178,25,0.14); color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(250,178,25,0.35); }
.cl-status { margin: 0; font-size: 12px; color: var(--text3); line-height: 1.6; padding: 0 2px; }
.cl-status a { color: inherit; }
.cl-status a:hover { color: var(--text); }
.cl-note { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--text2); padding: 0 2px; }
.cl-trick { margin: 2px 0 0; font-size: 13px; line-height: 1.55; color: var(--text);
  border-left: 3px solid rgb(0,122,255); padding: 2px 2px 2px 12px; }
.cd-days2 { display: flex; gap: 4px; margin-top: 8px; }
.cd-best { font-size: 12.5px; font-weight: 600; }
.h1-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.info-btn { flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--chip); color: var(--text2); box-shadow: inset 0 0 0 1px var(--glass-border);
  font-family: inherit; display: flex; align-items: center; justify-content: center; }
.info-btn:hover { color: var(--text); }
.clx-card { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.clx-card p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--text2); text-wrap: pretty; }
.dot-lines { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--text); padding-top: 2px; }
.dot-line { display: inline-flex; align-items: center; gap: 7px; }
.dot-line .dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.act-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 560px) { .act-grid { grid-template-columns: 1fr; } }
.act-card { border-radius: 16px; padding: 14px 15px 13px; display: flex; flex-direction: column; gap: 9px; }
.act-head { display: flex; align-items: center; gap: 10px; }
.act-card .icon-tile { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; }
.act-title { font-size: 13px; font-weight: 650; letter-spacing: -0.01em; }
.act-desc { font-size: 12px; color: var(--text2); line-height: 1.45; margin: 0; text-wrap: pretty; }
.act-btns { margin-top: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.act-btn { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; height: 30px;
  padding: 0 13px; font-size: 12.5px; font-weight: 600; color: #ffffff; text-decoration: none; }
.act-btn:hover { color: #ffffff; filter: brightness(1.08); }
.act-btn-2 { background: var(--chip); color: var(--text); box-shadow: inset 0 0 0 1px var(--glass-border); }
.act-btn-2:hover { background: var(--row-hover); color: var(--text); filter: none; }
.btn-pill { border-radius: 999px; height: 36px; padding: 0 15px; }
#clinic-search { flex: 1 1 120px; }
#clinic-region { min-width: 0; flex: 0 1 250px; }
.search-pill { border-radius: 999px; }
.clinic-item { animation: row-in 300ms cubic-bezier(0.25,0.1,0.25,1) both; }
.clinic-item + .clinic-item { box-shadow: inset 0 0.5px 0 var(--hairline); }
.clinic-row { display: flex; width: 100%; text-align: left; align-items: center; gap: 13px; border: none;
  cursor: pointer; font-family: inherit; font-size: inherit; background: transparent; color: var(--text);
  padding: 14px 16px; transition: background 120ms; }
.clinic-row:hover { background: var(--row-hover); }
.cl-rank { flex-shrink: 0; width: 18px; font-size: 13px; font-weight: 600; color: var(--text3);
  font-variant-numeric: tabular-nums; text-align: right; }
.cl-mid { flex: 1; min-width: 0; }
.cl-name { display: block; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.cl-sub { display: block; font-size: 12px; color: var(--text3); margin-top: 1px; }
.cl-right { flex-shrink: 0; text-align: right; }
.cl-num { display: block; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.cl-lbl { display: block; font-size: 11px; color: var(--text3); }
.cl-minibar { display: block; width: 64px; height: 3px; border-radius: 999px; background: var(--bar-track);
  margin-top: 4px; margin-left: auto; position: relative; overflow: hidden; }
.cl-minibar i { position: absolute; inset: 0 auto 0 0; background: #2a78d6; border-radius: 999px; }
.chev { flex-shrink: 0; color: var(--text); transition: transform 150ms; }
.clinic-item.open .chev { transform: rotate(90deg); }
.clinic-detail { padding: 6px 16px 14px 47px; }
.cd-panel { background: var(--bar-track); border-radius: 12px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 14px; animation: row-in 220ms cubic-bezier(0.25,0.1,0.25,1) both; }
.cd-stats { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.cd-nums { display: flex; gap: 18px; flex-wrap: wrap; }
.cd-stat { display: flex; flex-direction: column; }
.cd-big { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.15; }
.cd-lbl { font-size: 11px; color: var(--text3); }
.cd-div { width: 0.5px; background: var(--hairline); align-self: stretch; }
.cd-days { display: flex; gap: 4px; }
.dow-c { width: 23px; height: 23px; border-radius: 50%; display: inline-flex; align-items: center;
  justify-content: center; font-size: 11px; font-weight: 700; background: var(--bar-track); color: var(--text3); }
.dow-c.on { background: #2a78d6; color: #ffffff; }
.cd-cap { font-size: 12px; color: var(--text3); margin-bottom: 10px; }
.cd-bars { display: flex; gap: 8px; align-items: flex-end; height: 52px; }
.cd-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.cd-col i { display: block; border-radius: 5px; min-height: 3px; }
.cd-axis { height: 0.5px; background: var(--hairline); margin-top: 1px; }
.cd-blabs { display: flex; gap: 8px; margin-top: 5px; }
.cd-blab { flex: 1; font-size: 10px; color: var(--text3); text-align: center; white-space: nowrap; }
.cd-blab.peak { color: var(--text); font-weight: 700; }
.cd-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cd-btn { flex: 1 1 auto; justify-content: center; display: inline-flex; align-items: center; gap: 7px;
  border-radius: 9px; height: 38px; padding: 0 16px; font-size: 13px; font-weight: 600; text-decoration: none; }
.cd-btn-1 { background: rgb(0,122,255); color: #ffffff; }
.cd-btn-1:hover { background: rgb(41,98,217); color: #ffffff; }
.cd-btn-2 { background: var(--chip); color: var(--text); box-shadow: inset 0 0 0 1px var(--glass-border); }
.cd-btn-2:hover { background: var(--row-hover); color: var(--text); }
.surg-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (max-width: 560px) { .surg-grid { grid-template-columns: 1fr; } }
.surg-card { border-radius: 16px; padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 8px; }
.surg-name { font-size: 13px; font-weight: 650; letter-spacing: -0.01em; }
.surg-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.surg-n { font-size: 24px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.1;
  font-variant-numeric: tabular-nums; }
.surg-l { font-size: 11px; color: var(--text3); }
.surg-spark { flex-shrink: 0; opacity: 0.9; }
.surg-sub { display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  flex-wrap: wrap; box-shadow: inset 0 0.5px 0 var(--hairline); padding-top: 8px; }
.surg-12 { font-size: 12px; font-weight: 600; color: var(--text2); }
.surg-12.hot { color: #c93400; }
@media (prefers-color-scheme: dark) { .surg-12.hot { color: #ff9066; } }
.surg-qc { font-size: 11.5px; color: var(--text3); }
.surg-card { cursor: pointer; }
.surg-card:hover { background: var(--row-hover); }
.surg-card .chev { margin-left: 6px; color: var(--text2); transition: transform 150ms; }
.surg-card.open .chev { transform: rotate(90deg); }
.surg-card.open { grid-column: 1 / -1; cursor: default; }
.surg-detail { margin-top: 4px; box-shadow: inset 0 0.5px 0 var(--hairline); padding-top: 10px; }
.surg-legend { display: flex; gap: 14px; align-items: center; font-size: 11px; color: var(--text2); margin-bottom: 6px; flex-wrap: wrap; }
.surg-legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 5px; vertical-align: 2px; }
.surg-take { margin: 0 0 8px; font-size: 13.5px; line-height: 1.5; }
.surg-chartwrap { position: relative; }
.surg-tip { position: absolute; top: 6px; pointer-events: none; background: var(--card-solid);
  border-radius: 9px; padding: 6px 9px; font-size: 11.5px; line-height: 1.45;
  box-shadow: 0 4px 14px rgba(0,0,0,0.22), inset 0 0 0 1px var(--glass-border); white-space: nowrap; }
.surg-cap { font-size: 11px; color: var(--text3); margin-top: 2px; }
.surg-big { width: 100%; height: 170px; display: block; color: var(--text); touch-action: pan-y; }
.vrow { padding: 5px 0; }
.vrow + .vrow { box-shadow: inset 0 0.5px 0 var(--hairline); }
.vrow-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 12.5px; }
.vrow-name { min-width: 0; line-height: 1.35; }
.vrow.me .vrow-name { font-weight: 700; }
.vrow-val { flex-shrink: 0; color: var(--text2); font-variant-numeric: tabular-nums; font-size: 11.5px; }
.vrow-bar { height: 4px; border-radius: 999px; background: var(--bar-track); position: relative; overflow: hidden; margin-top: 5px; }
.vrow-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; }
.surg-cmp-note { font-size: 11.5px; color: var(--text3); margin-top: 6px; }
.surg-steps { margin: 0; padding-left: 20px; font-size: 13px; line-height: 1.55; }
.surg-steps li { margin-bottom: 8px; }
.step-data { display: block; margin-top: 2px; font-size: 12px; font-weight: 600; color: #2a78d6; }
@media (prefers-color-scheme: dark) { .step-data { color: #6ea8e8; } }

.cl-off { opacity: 0.55; }
.cl-off:hover, .cl-off.open { opacity: 1; }
@keyframes row-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.tc-t { font-size: 14px; font-weight: 650; letter-spacing: -0.01em; }
.tc-d { font-size: 12px; color: var(--text2); line-height: 1.4; flex: 1; }
.tc-a { font-size: 12px; font-weight: 600; color: var(--link); margin-top: 2px; }

main.wide { max-width: 760px; }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.gcard-link { text-decoration: none; color: inherit; display: block; height: 100%; }
.gcard { height: 100%; margin: 0; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.gcard-link:hover .gcard { background: var(--row-hover); }
.gcard-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.icon-tile { width: 42px; height: 42px; border-radius: 12px; display: flex;
  align-items: center; justify-content: center; flex-shrink: 0; }
.phone-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 15px;
  font-weight: 700; border-radius: 999px; padding: 4px 13px;
  font-variant-numeric: tabular-nums; white-space: nowrap; }
.gcard-body { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.gcard-body h3 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.35; }
.gcard-desc { margin: 0; font-size: 13px; line-height: 1.55; color: var(--text2); text-wrap: pretty; }
.gcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gcard-action { font-size: 13px; font-weight: 600; color: var(--text); text-wrap: pretty; }
.gcard-arrow { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%; }

.annual-card { padding: 8px 16px 12px; overflow-x: auto; }
.annual-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.annual-table th { text-align: right; font-weight: 600; color: var(--text2); padding: 8px 6px 6px;
  font-size: 12px; }
.annual-table th:first-child, .annual-table td:first-child { text-align: left; }
.annual-table td { text-align: right; padding: 7px 6px; box-shadow: inset 0 0.5px 0 var(--hairline);
  font-variant-numeric: tabular-nums; }
.annual-table td:first-child { font-weight: 600; }
.annual-note { margin: 8px 0 0; font-size: 11px; color: var(--text3); line-height: 1.5; }

.geo-error { margin: -4px 0 0; font-size: 12px; color: #d03b3b; line-height: 1.5;
  text-align: center; }

/* Controls row: one shared height, whatever each base class says. */
.controls .btn, .controls .search-input, .controls select { height: 36px; min-height: 36px; }
.controls .btn { font-size: 13px; padding: 0 15px; }

/* Mobile: action cards go icon-beside-text so the list is one scroll away,
   and the detail panel reclaims the rank-column indent. */
@media (max-width: 640px) {
  .clinic-detail { padding-left: 16px; }
  .site-header nav { gap: 6px 11px; flex-wrap: wrap; }
  .site-header nav a { font-size: 12.5px; }
}

/* One line per offer, above the list. Deliberately not a card: it sits between
   the map and the emergency-room list, and anything taller than a couple of
   rows there is a toll gate on the data the reader came for. The full cards
   below the list carry the argument; this carries the link. */
.offer-strip { margin: 4px 0 12px; padding: 0 2px; display: grid; gap: 8px; }
.offer-row { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text2);
  display: flex; gap: 6px 10px; align-items: baseline; flex-wrap: wrap; }
.offer-t { text-wrap: pretty; }
.offer-a { font-weight: 600; text-decoration: none; white-space: nowrap; }
.offer-a:hover { text-decoration: underline; }

/* Same row, other devices. layout.js swaps the App Store link for the
   add-to-home-screen line on Android and reveals the code on a computer; both
   take the full width of the row so the line above keeps reading as one
   sentence. The QR plate stays white because a code needs a light quiet zone
   to scan and the strip sits on a dark surface in dark mode. */
.offer-and { flex: 1 1 100%; text-wrap: pretty; }
.offer-and[hidden] { display: none; }
.offer-qr { flex: 1 1 100%; display: flex; align-items: center; gap: 12px;
            margin-top: 8px; padding-top: 0; border-top: 0; }
.offer-qr .app-qr-img { width: 88px; height: 88px; }
.offer-qr-t { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text2);
              text-wrap: pretty; }

/* The paid iPhone app, in full. Sits directly above the donation ask, because a
   CA$4.99/month subscription is worth more than a one-time CA$5 donation and
   only one of the two should get the reader's first glance. On the homepage
   both cards render below the list, after the reader has their answer. */
.app-card { padding: 18px 18px 20px; }
.app-h { margin: 0 0 6px; font-size: 16px; font-weight: 650; letter-spacing: -0.012em; }
.app-p { margin: 0 0 10px; font-size: 14px; line-height: 1.55; color: var(--text2); text-wrap: pretty; }
.app-price { margin: 0 0 14px; font-size: 13px; line-height: 1.5; color: var(--text3, var(--text2)); }
.app-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.app-btns .btn { flex: 1 1 200px; }
/* The store's own name for the app, under the button that opens it. The site is
   branded Boussole Sante and Apple serves "Urgences Quebec: temps attente", so
   without this line the reader crosses a rename mid-decision. Hidden for Android
   readers by layout.js along with the button, since there is nothing to name. */
.app-store-name { margin: 10px 0 0; font-size: 12px; line-height: 1.5;
                  color: var(--text3, var(--text2)); }

/* The computer handoff. Unhidden by layout.js only when the reader is on a
   machine that cannot install an iPhone app from a link, so it never takes
   space on the phones that can. The white plate is not decoration: a QR code
   needs a light quiet zone around it to scan, and the card sits on a dark
   surface in dark mode. */
.app-qr { display: flex; align-items: center; gap: 14px; margin-top: 16px;
          padding-top: 16px; border-top: 1px solid var(--line, rgba(128,128,128,0.22)); }
.app-qr[hidden] { display: none; }
.app-qr-img { flex: 0 0 auto; width: 108px; height: 108px; border-radius: 8px;
              background: #ffffff; padding: 6px; }
.app-qr-t { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text2); text-wrap: pretty; }

/* Support ask. Rendered after the visitor already has their answer, so it
   reads as a footnote to a finished task rather than a toll gate. */
.sup-card { padding: 18px 18px 20px; }
.sup-h { margin: 0 0 6px; font-size: 16px; font-weight: 650; letter-spacing: -0.012em; }
.sup-p { margin: 0 0 14px; font-size: 14px; line-height: 1.55; color: var(--text2); text-wrap: pretty; }
.sup-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.sup-btns .btn { flex: 1 1 160px; }
.btn-ghost { background: var(--chip); color: var(--text);
  box-shadow: inset 0 0 0 1px var(--hairline); }
.btn-ghost:hover { color: var(--text); }
.btn-ghost:active { background: var(--row-hover); }
.sup-more { display: inline-block; margin-top: 12px; font-size: 13px; font-weight: 500;
  text-decoration: none; }
.sup-long { padding: 6px 18px 18px; }
.sup-long h2 { font-size: 15px; margin: 16px 0 4px; }
.sup-long p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text2); text-wrap: pretty; }
.lede { margin: 0 0 6px; font-size: 15px; line-height: 1.55; color: var(--text2); text-wrap: pretty; }

/* Crawlable per-clinic index at the foot of /cliniques, and the clinic page
   itself. Deliberately quiet: it is there for links and for a reader who wants
   a specific place by name, not to compete with the ranked list above it. */
.cl-idx { margin-top: 22px; }
.cl-idx-g { margin-top: 14px; }
.cl-idx-g h3 { font-size: 0.9rem; margin: 0 0 6px; color: var(--text2); font-weight: 600; }
.cl-idx-g ul { margin: 0; padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 14px; }
.cl-idx-g li a { font-size: 0.86rem; color: var(--text2); text-decoration: none; }
.cl-idx-g li a:hover { color: var(--accent, #2a78d6); text-decoration: underline; }
.crumb { margin: 0 0 6px; font-size: 0.86rem; }
.crumb a { color: var(--text3); text-decoration: none; }
.cl-how { margin: 8px 0 0; padding-left: 18px; }
.cl-how li { margin-bottom: 8px; font-size: 0.92rem; line-height: 1.45; }

/* Surgery detail pages: one per region x specialty. Static, no script. */
.cl-crumb { margin: 0 0 6px; font-size: 12.5px; }
.cl-crumb a { color: var(--text3); text-decoration: none; }
.cl-crumb a:hover { color: var(--text); }
.cl-lede { margin: 2px 0 12px; font-size: 15px; line-height: 1.55; color: var(--text2); }
.cl-take { margin: 10px 0 0; font-size: 14px; line-height: 1.55; color: var(--text); }
/* Three columns that shrink instead of pushing the card off a phone screen:
   the labels ("depuis plus de 6 mois") are long enough that a flex row sized
   to their content overflows 430px and clips the third number. */
.sg-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.sg-stats > div { display: flex; flex-direction: column; min-width: 0; }
.sg-stats strong { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.sg-stats span { font-size: 11.5px; color: var(--text3); margin-top: 2px; line-height: 1.3; }
.sg-spark { display: block; width: 100%; height: 110px; color: #2a78d6; margin: 6px 0 4px; }
.sg-ex { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.sg-chip { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--bar-track);
  font-size: 12.5px; color: var(--text); }
.sg-hosp { list-style: none; padding: 0; margin: 6px 0; }
.sg-hosp li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 2px;
  border-bottom: 0.5px solid var(--hairline); font-size: 13.5px; }
.sg-hn { color: var(--text3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sg-steps { padding-left: 20px; margin: 6px 0; }
.sg-steps li { font-size: 13.5px; line-height: 1.55; margin-bottom: 8px; color: var(--text2); }
.sg-more { margin-top: 22px; }
.sg-more ul { list-style: none; padding: 0; margin: 4px 0 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2px 16px; }
.sg-more li { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 5px 2px; }
.sg-idx { margin-top: 26px; }
.sg-idx-r { margin-top: 12px; }
.sg-idx-r h3 { font-size: 13px; margin: 0 0 3px; color: var(--text2); }
.sg-idx-r ul { list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1px 14px; }
.sg-idx-r li { font-size: 12.5px; padding: 3px 0; }
