/* Rues refaites à Granby — direction « Asphalte & ligne jaune » (mockup 1a mobile / 1b desktop).
   Mobile first; desktop layout from 1000px. Animations use transform/opacity only. */

@font-face { font-family: Archivo; font-style: normal; font-weight: 400 800; font-stretch: 100%; font-display: swap;
  src: url(../fonts/archivo-wght-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Archivo; font-style: normal; font-weight: 800; font-stretch: 75%; font-display: swap;
  src: url(../fonts/archivo-condensed-800-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(../fonts/plexmono-500-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 600; font-display: swap;
  src: url(../fonts/plexmono-600-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --asphalt: #24251F; --paper: #F3F0E8; --card: #FBFAF6; --yellow: #F2C230; --yellow-hi: #FFD54A;
  --ink: #1C1D1A; --ink2: #33352F; --muted: #5D5E57; --line: #DEDAD0; --line2: #CFCBC0; --track: #E5E1D7;
  --soft: #EFEBE2; --note: #FBEFC4; --on-dark: #D8D5CB; --dim: #8E8B82;
  --green: #2E8F5B; --green-dk: #267A4D; --amber: #E0A01A; --red: #CF4430; --grey: #A19F97;
  --sans: Archivo, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --spring: cubic-bezier(.2, 1.18, .36, 1);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --hd: 56px;
  --gut: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--hd) + 8px); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; }
h1, h2, h3, p, ol, ul, figure, blockquote { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: #7A5A00; }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 1em; height: 1em; flex: none; }
.sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.cond { font-weight: 800; font-stretch: 75%; letter-spacing: -.01em; }
.mono { font-family: var(--mono); font-weight: 500; }
.muted { color: var(--muted); }
.small { font-size: 11px; }
.eyebrow { font: 600 11px/1.3 var(--mono); letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.eyebrow.y { color: var(--yellow); }

/* focus: ink ring on light surfaces, yellow ring on dark ones */
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
.hero :focus-visible, .rate-hd :focus-visible, .actions :focus-visible, .ft :focus-visible, .lb :focus-visible, .ctr-dark :focus-visible { outline-color: var(--yellow); }
[tabindex="-1"]:focus { outline: none; }

.skip { position: fixed; z-index: 100; left: 12px; top: -60px; padding: 10px 16px; background: var(--yellow); color: var(--ink); font-weight: 700; border-radius: 999px; text-decoration: none; }
.skip:focus { top: 10px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 14px 22px; border-radius: 999px; font-weight: 700; font-size: 16px; line-height: 1.2; text-decoration: none; transition: transform .12s ease, background-color .15s; }
.btn:active { transform: scale(.97); }
.btn-y { background: var(--yellow); color: var(--ink); }
.btn-y:hover { background: var(--yellow-hi); color: var(--ink); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--ink2); }
.btn-wide { width: 100%; }
.btn-sm { min-height: 44px; padding: 10px 18px; font-size: 15px; }
.btn .st { color: var(--yellow); font-size: 18px; }
.arr { font-size: 18px; }

/* ---------- header ---------- */
.hd { position: sticky; top: 0; z-index: 50; height: var(--hd); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 18px; background: var(--paper); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-height: 44px; }
.logo { width: 28px; height: 28px; border-radius: 7px; background: var(--asphalt); display: flex; align-items: center; justify-content: center; flex: none; }
.logo::before { content: ''; width: 4px; height: 18px; background: repeating-linear-gradient(to bottom, var(--yellow) 0 5px, transparent 5px 8px); }
.brand-t { display: flex; flex-direction: column; line-height: 1.1; }
.brand-n { font-weight: 800; font-size: 16px; font-stretch: 75%; }
.brand-s { font: 500 9.5px var(--mono); color: var(--muted); letter-spacing: .05em; }
.nav { display: none; }
.lang { display: flex; border: 1.5px solid var(--ink); border-radius: 999px; overflow: hidden; flex: none; }
.lang button { font: 600 12px var(--mono); padding: 0 12px; min-height: 36px; min-width: 44px; position: relative; }
.lang button::after { content: ''; position: absolute; inset: -4px 0; } /* taller tap target */
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* ---------- hero / top ---------- */
.top { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "hero" "stats" "intro"; position: relative; isolation: isolate; }
.hero { grid-area: hero; background: var(--asphalt); color: var(--paper); padding: 30px 64px 34px 22px; display: flex; flex-direction: column; gap: 16px; }
.hero h1 { font-size: clamp(34px, 10vw, 44px); line-height: .98; text-wrap: balance; }
.hero-sub { font-size: 16px; line-height: 1.45; color: var(--on-dark); text-wrap: pretty; }
.lane { grid-area: hero; justify-self: end; width: 7px; margin-right: 30px; position: relative; overflow: hidden; z-index: 1; pointer-events: none; }
.lane::before { content: ''; position: absolute; left: 0; right: 0; top: -54px; bottom: 0; background: repeating-linear-gradient(to bottom, var(--yellow) 0 30px, transparent 30px 54px); animation: lane 1.5s linear infinite; will-change: transform; }
@keyframes lane { to { transform: translateY(54px); } }
.stats { grid-area: stats; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.stats li { padding: 16px 14px; display: flex; flex-direction: column; gap: 4px; }
.stats li + li { border-left: 1px solid var(--line); }
.stats b { font-size: 24px; line-height: 1.05; }
.stats span { font-size: 12px; line-height: 1.25; color: var(--muted); }
.intro { grid-area: intro; padding: 24px 22px; display: flex; flex-direction: column; gap: 14px; font-size: 15px; line-height: 1.55; }
.intro p { text-wrap: pretty; }

/* ---------- how ---------- */
.how { padding: 0 22px 28px; display: flex; flex-direction: column; gap: 12px; }
.steps { display: grid; gap: 12px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; font-size: 15px; line-height: 1.4; }
.steps .num { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--yellow); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px; }
.steps li > span:last-child { padding-top: 6px; }

/* ---------- map section ---------- */
.mapsec { border-top: 1px solid var(--line); }
.mapsec-hd { padding: 12px 14px 10px; display: flex; flex-direction: column; gap: 10px; }
.mapsec-hd .eyebrow { display: none; }
.mapsec-hd h2 { font-size: 23px; line-height: 1.05; }
.mapsec-t { padding-right: 140px; min-height: 44px; display: flex; flex-direction: column; justify-content: center; }
.map-tools { display: contents; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 2px 14px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; white-space: nowrap; font-weight: 600; font-size: 13px; min-height: 40px; padding: 0 13px; border-radius: 999px; border: 1.5px solid var(--line2); transition: background-color .15s, color .15s, border-color .15s, transform .12s; }
.chip:active, .near:active { transform: scale(.96); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.near { position: absolute; right: 14px; top: 12px; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; font: 600 12.5px var(--mono); border: 1.5px solid var(--ink); border-radius: 999px; background: var(--paper); transition: transform .12s, background-color .15s; }
.near .ic { font-size: 15px; }
.near[aria-busy="true"] .ic { animation: spin 1s linear infinite; }
.mapsec-hd { position: relative; }

.mapbox { position: relative; }
.mapwrap { position: relative; height: 62vh; height: 62svh; min-height: 320px; max-height: 720px; isolation: isolate; background: #E9E6DF; }
.map { position: absolute; inset: 0; z-index: 0; }
.legend { position: absolute; z-index: 5; top: 10px; left: 10px; padding: 7px 10px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 2px 6px rgba(0,0,0,.08); font: 500 10.5px var(--mono); pointer-events: none; }
.legend ul { display: flex; gap: 9px; }
.legend li { display: flex; align-items: center; gap: 4px; }
.lg-t, .lg-l { display: none; }
.lg-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.lv-green { background: var(--green-dk); color: #fff; }
.lv-amber { background: var(--amber); color: var(--ink); }
.lv-red { background: var(--red); color: #fff; }
.lv-grey { background: var(--grey); color: var(--ink); }
.lg-dot.lv-green, .dot.lv-green, .sl-dot.lv-green { background: var(--green); }
.map-msg { position: absolute; z-index: 6; left: 50%; top: 50%; transform: translate(-50%, -50%); width: max-content; max-width: calc(100% - 40px); display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 16px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 6px 20px rgba(0,0,0,.12); font-size: 14px; text-align: center; }
.map-msg .btn { min-height: 44px; }
.map-hint { position: absolute; z-index: 6; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(28,29,26,.45); color: #fff; font: 600 15px var(--mono); opacity: 0; transition: opacity .25s; pointer-events: none; }
.map-hint.show { opacity: 1; }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--track); border-top-color: var(--ink); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Leaflet skin */
.leaflet-container { font: 12px/1.4 var(--sans); background: #E9E6DF; }
.leaflet-tile-pane { filter: grayscale(1) contrast(.92) brightness(1.06); }
.leaflet-container .leaflet-control-attribution { font: 500 10.5px/1.6 var(--mono); background: rgba(251,250,246,.88); color: var(--muted); padding: 0 6px; }
.leaflet-container .leaflet-control-attribution a { color: var(--ink); }
.leaflet-touch .leaflet-bar, .leaflet-bar { border: 1.5px solid var(--ink); border-radius: 10px; box-shadow: none; overflow: hidden; }
.leaflet-bar a, .leaflet-touch .leaflet-bar a { width: 44px; height: 44px; line-height: 42px; font: 600 22px/42px var(--sans); color: var(--ink); background: var(--card); border-bottom-color: var(--line); }
.leaflet-bar a:hover { background: var(--soft); }
.leaflet-bar a.leaflet-disabled { color: var(--line2); background: var(--card); }
.leaflet-tooltip.tt { background: var(--ink); color: var(--paper); border: 0; border-radius: 6px; padding: 5px 9px; font: 600 13px var(--sans); box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.leaflet-tooltip-top.tt::before { border-top-color: var(--ink); }
.mk, .mk-ring, .me-ring { transform-box: fill-box; transform-origin: center; }
.mk.pop { animation: mk-pop .55s var(--spring) both; }
@keyframes mk-pop { from { transform: scale(0); opacity: 0; } 50% { opacity: 1; } to { transform: scale(1); opacity: 1; } }
.mk.bump { animation: mk-bump .8s var(--spring); }
@keyframes mk-bump { 30% { transform: scale(1.5); } to { transform: scale(1); } }
.mk-ring { animation: ring 1.2s ease-out forwards; }
.me-ring { animation: ring 2s ease-out infinite; }
@keyframes ring { from { transform: scale(1); opacity: .9; } to { transform: scale(2.8); opacity: 0; } }

/* ---------- street panel: bottom sheet (mobile) ---------- */
.panel { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; height: 440px; display: flex; flex-direction: column; background: var(--card); border-radius: 22px 22px 0 0; box-shadow: 0 -8px 30px rgba(0,0,0,.18); transform: translateY(110%); visibility: hidden; }
.panel::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 60px; background: var(--card); } /* covers the gap during the spring overshoot */
.panel[data-state="peek"], .panel[data-state="full"] { visibility: visible; }
.panel.anim { transition: transform .46s var(--spring); }
.pn-grab { flex: none; position: relative; display: flex; justify-content: center; align-items: center; height: 34px; touch-action: none; cursor: grab; }
.grab { width: 96px; height: 34px; display: flex; align-items: center; justify-content: center; }
.grab span { width: 40px; height: 5px; border-radius: 3px; background: var(--line2); }
.pn-x { position: absolute; right: 8px; top: 4px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 18px; color: var(--muted); }
.pn-x:hover { background: var(--soft); color: var(--ink); }
.pn-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 2px 20px 18px; display: flex; flex-direction: column; gap: 16px; }
.pn-cta { flex: none; padding: 12px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--track); background: var(--card); }
.pn-empty { display: none; }

.pn-title { display: flex; flex-direction: column; gap: 6px; padding-right: 30px; }
.badge { align-self: flex-start; font: 600 10.5px var(--mono); letter-spacing: .06em; padding: 4px 8px; border: 1.5px solid var(--ink); border-radius: 4px; }
.pn-title h3 { font-size: 30px; line-height: 1; }
.pn-sec { font-size: 14px; color: var(--muted); }
.layer { display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; background: var(--note); border-radius: 10px; }
.layer b { display: block; font-size: 14px; }
.layer span { display: block; font-size: 12.5px; line-height: 1.4; color: #4A4B45; margin-top: 3px; }
.dot { flex: none; width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; }
.insp { padding: 11px 12px; border-radius: 10px; border: 1.5px solid var(--ink); background: var(--card); }
.insp p:first-child { font: 600 10.5px var(--mono); letter-spacing: .06em; margin-bottom: 4px; }
.insp p + p { font-size: 13.5px; line-height: 1.45; white-space: pre-line; }
.already { display: flex; align-items: center; gap: 8px; font: 600 12px var(--mono); color: var(--green-dk); }
.already .ic { font-size: 16px; }
.score { display: flex; gap: 14px; align-items: stretch; }
.tile { flex: none; width: 104px; padding: 12px; border-radius: 12px; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; }
.tile span { font: 600 10.5px var(--mono); letter-spacing: .06em; }
.tile b { font-size: 38px; line-height: 1; }
.tile small { font: 600 16px var(--sans); }
.sbars { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.sb p { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 4px; }
.bar { display: block; height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: var(--ink); transform: scaleX(var(--v, 0)); transform-origin: left; transition: transform .9s var(--ease); }
.lbl-m { font: 600 11px var(--mono); letter-spacing: .08em; color: var(--muted); }
.tp { display: flex; flex-direction: column; gap: 9px; }
.tp-r { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 10px; align-items: center; }
.tp-b { position: relative; height: 32px; border-radius: 6px; background: var(--soft); overflow: hidden; }
.tp-b > i { position: absolute; inset: 0; background: var(--yellow); transform: scaleX(var(--v, 0)); transform-origin: left; transition: transform .9s var(--ease); }
.tp-b > span { position: absolute; left: 10px; right: 6px; top: 0; bottom: 0; display: flex; align-items: center; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-r > b { font: 600 12px var(--mono); text-align: right; }
.none { padding: 22px 18px; border-radius: 12px; border: 1.5px dashed #B9B5AA; display: flex; flex-direction: column; gap: 6px; }
.none b { font-size: 22px; }
.none span { font-size: 14px; line-height: 1.45; color: var(--muted); }
.media { display: flex; flex-direction: column; gap: 9px; }
.photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ph { display: block; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: repeating-linear-gradient(135deg, var(--track) 0 6px, #EDE9E0 6px 12px); transition: transform .12s; }
.ph:active { transform: scale(.97); }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.cm { padding: 12px; border-radius: 10px; background: var(--paper); display: flex; flex-direction: column; gap: 5px; }
.cm p { font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.cm footer { font: 500 11px var(--mono); color: var(--muted); }
.media-none { font-size: 13px; color: var(--muted); }

/* ---------- street list ---------- */
.slist { margin: 0 14px; border-bottom: 1px solid var(--line); }
.slist summary { display: flex; align-items: center; gap: 8px; min-height: 48px; font-weight: 600; font-size: 14px; cursor: pointer; list-style: none; }
.slist summary::-webkit-details-marker { display: none; }
.slist summary::before { content: '+'; font: 600 16px var(--mono); width: 18px; }
.slist[open] summary::before { content: '–'; }
.slist ul { padding-bottom: 10px; display: grid; gap: 2px; }
.slist button { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 8px; border-radius: 8px; text-align: left; font-size: 14px; }
.slist button:hover { background: var(--soft); }
.slist button small { color: var(--muted); font-size: 12px; margin-left: auto; text-align: right; }
.sl-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ink); flex: none; }

/* ---------- results ---------- */
.results { padding: 26px 20px 26px; display: flex; flex-direction: column; gap: 18px; }
.res-hd { display: flex; flex-direction: column; gap: 6px; }
.live { display: flex; align-items: center; gap: 8px; font: 600 11px var(--mono); letter-spacing: .08em; color: var(--green-dk); }
.live-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.live-dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--green); animation: live 1.8s ease-out infinite; }
@keyframes live { from { transform: scale(1); opacity: .7; } to { transform: scale(3.2); opacity: 0; } }
.res-hd h2 { font-size: 32px; line-height: 1; }
.ctrs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ctr { padding: 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.ctr b { font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; min-height: 30px; }
.ctr span { font-size: 12px; line-height: 1.25; }
.ctr-dark { background: var(--asphalt); color: var(--paper); border-color: var(--asphalt); }
.ctr-dark b { color: var(--yellow); }
.res-grid { display: grid; gap: 22px; }
.card h3 { font-weight: 700; font-size: 17px; }
.card .sub { font-size: 12.5px; color: var(--muted); margin: 2px 0 10px; }
.worst .wl { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.wl li + li { border-top: 1px solid #ECE8DF; }
.wr { width: 100%; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 11px 12px; min-height: 56px; text-align: left; transition: background-color .15s; }
.wr:hover { background: var(--soft); }
.wr:active { background: var(--track); }
.wr-r { font: 600 12px var(--mono); color: var(--muted); }
.wr-m { display: flex; flex-direction: column; min-width: 0; }
.wr-m b { font-size: 15px; }
.wr-m span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wr-d, .wr-n { display: none; }
.wr-o { font-weight: 800; font-size: 19px; line-height: 1; padding: 6px 10px; border-radius: 8px; font-variant-numeric: tabular-nums; }
#worst-empty { margin-top: 8px; }
.pl { display: flex; flex-direction: column; gap: 10px; }
.pl li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: baseline; font-size: 13px; }
.pl li > span { min-width: 0; }
.pl .bar { grid-column: 1 / -1; grid-row: 2; height: 10px; border-radius: 2px; }
.pl .bar > i { background: var(--asphalt); border-radius: 2px; }
.pl b { font-size: 12px; grid-column: 2; grid-row: 1; }
.load-err { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; border: 1.5px dashed var(--red); border-radius: 12px; font-size: 14px; }

/* skeletons */
.sk { position: relative; display: block; overflow: hidden; background: var(--track); border-radius: 6px; }
.sk::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent); transform: translateX(-100%); animation: shim 1.3s ease-in-out infinite; }
@keyframes shim { to { transform: translateX(100%); } }
.sk-num { width: 56px; height: 28px; }
.ctr-dark .sk { background: #3A3B35; }
.ctr-dark .sk::after, .dark .sk::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent); }
.sk-row { padding: 14px 12px; }
.sk-row .sk { height: 18px; }
.sk-row.dark .sk { background: #3A3B35; }

/* ---------- actions & sources ---------- */
.actions { background: var(--asphalt); color: var(--paper); padding: 26px 20px; display: flex; flex-direction: column; gap: 14px; }
.actions h2 { font-size: 27px; line-height: 1.05; }
.al { display: flex; flex-direction: column; gap: 12px; }
.ac { display: grid; grid-template-columns: 66px minmax(0, 1fr); gap: 12px; }
.ac-d { font: 600 11.5px var(--mono); color: var(--yellow); padding-top: 2px; }
.ac-t { font-size: 14px; line-height: 1.4; }
.ac-t a { color: inherit; text-decoration-color: var(--yellow); }
.ac-t a:hover { color: var(--yellow); }
.ac-planned .ac-d { color: var(--dim); }
.ac-planned .ac-t { color: #A9A69C; }
.ac-tag { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; padding: 1px 7px; border: 1.5px solid var(--yellow); border-radius: 999px; font: 600 10px/1.6 var(--mono); letter-spacing: .06em; color: var(--yellow); vertical-align: 1px; white-space: nowrap; }
.ac-tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--yellow); animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
.ac-empty { font-size: 14px; color: #A9A69C; }
.sources { padding: 24px 20px 28px; display: flex; flex-direction: column; gap: 10px; }
.sources h2 { font: 600 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.srcl { display: flex; flex-direction: column; gap: 10px; }
.srcl a { font-size: 14px; line-height: 1.35; display: inline-block; padding: 2px 0; }

/* ---------- footer ---------- */
.ft { padding: 18px 20px calc(30px + env(safe-area-inset-bottom)); border-top: 6px solid var(--yellow); background: var(--ink); color: #C9C6BC; font-size: 12px; line-height: 1.5; display: flex; flex-direction: column; gap: 8px; }
.ft .mono { font-size: 11px; }
.ft a { color: #F3F0E8; }

/* ---------- rating form (dialog) ---------- */
dialog { padding: 0; border: 0; color: var(--ink); }
.rate { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; background: var(--paper); overflow: hidden; overflow: clip; }
.rate[open] { display: flex; animation: sheet-in .5s var(--spring); }
.rate.closing { animation: sheet-out .26s ease-in forwards; }
@keyframes sheet-in { from { transform: translateY(100%); } }
@keyframes sheet-out { to { transform: translateY(100%); } }
.rate::backdrop { background: rgba(18,19,16,.55); }
.rate.fallback { position: fixed; inset: 0; z-index: 200; }
.rate-f { position: relative; flex: 1; display: flex; flex-direction: column; min-height: 0; width: 100%; }
.rate-hd { flex: none; background: var(--asphalt); color: var(--paper); padding: calc(12px + env(safe-area-inset-top)) 18px 16px; display: flex; align-items: center; gap: 14px; }
.back { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1.5px solid #5A5B53; display: flex; align-items: center; justify-content: center; font-size: 20px; transition: transform .12s, background-color .15s; }
.back:hover { background: #33352F; }
.back:active { transform: scale(.94); }
.rate-ht { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rate-ht .eyebrow { font-size: 10.5px; }
.rate-hd h2 { font-size: 22px; line-height: 1.05; }
.rate-meta { font-size: 12.5px; color: #C9C6BC; }
.rate-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 18px 18px calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 22px; }
.note { display: flex; gap: 10px; padding: 12px; background: var(--note); border-radius: 10px; font-size: 13px; line-height: 1.45; }
.note b { flex: none; font-weight: 800; }
.note-ok { background: #E3EFE6; }
.note-ok .ic { color: var(--green-dk); font-size: 16px; margin-top: 1px; }
.fld { display: flex; flex-direction: column; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.fld-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.lbl { font-weight: 700; font-size: 15px; padding: 0; }
legend.lbl { margin-bottom: 8px; }
.req { color: var(--red); }
.opt { font-weight: 400; color: var(--muted); font-size: 13px; }
.val { font-size: 11.5px; color: var(--muted); }
.fld .sub { font-size: 12.5px; color: var(--muted); margin-top: -4px; }
.star-row { display: flex; gap: 8px; }
.star-row label { flex: 1; height: 48px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 26px; cursor: pointer; background: var(--card); color: var(--line2); border: 1.5px solid var(--line); transition: background-color .15s, color .15s, border-color .15s; -webkit-tap-highlight-color: transparent; }
.star-row label.on { background: var(--asphalt); color: var(--yellow); border-color: var(--asphalt); }
.star-row label:hover { border-color: var(--ink); }
.star-row label.pop .ic { animation: star-pop .38s var(--spring); }
@keyframes star-pop { 45% { transform: scale(1.35) rotate(-8deg); } }
.star-row input:focus-visible + label, .chks input:focus-visible + label, .seg input:focus-visible + label, #photo-in:focus-visible + .drop { outline: 3px solid var(--ink); outline-offset: 2px; }
.fld.bad .star-row label { border-color: var(--red); }
.chks { gap: 8px; }
.chks label { display: flex; gap: 12px; align-items: center; min-height: 48px; padding: 10px 12px; border-radius: 10px; cursor: pointer; background: var(--card); border: 1.5px solid var(--line); font-size: 14px; line-height: 1.3; transition: background-color .15s, border-color .15s; }
.chks .box { flex: none; width: 22px; height: 22px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 15px; background: var(--card); color: transparent; border: 1.5px solid var(--ink); transition: transform .15s var(--spring); }
.chks input:checked + label { background: var(--note); border-color: var(--ink); }
.chks input:checked + label .box { background: var(--ink); color: var(--yellow); transform: scale(1.08); }
.chks input + label:active .box { transform: scale(.9); }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 4px; background: #E9E5DC; border-radius: 12px; }
.seg label { min-height: 44px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; cursor: pointer; transition: background-color .15s, color .15s; }
.seg input:checked + label { background: var(--ink); color: var(--paper); }
textarea { width: 100%; min-height: 96px; resize: vertical; padding: 12px; border-radius: 10px; border: 1.5px solid var(--line2); background: var(--card); font: 16px/1.4 var(--sans); color: var(--ink); }
textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(242,194,48,.55); }
.drop { position: relative; height: 112px; border-radius: 12px; border: 1.5px dashed #9E9B92; background: repeating-linear-gradient(135deg, var(--soft) 0 8px, #F6F3EC 8px 16px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; transition: border-color .15s, transform .12s; }
.drop:hover, .drop.over { border-color: var(--ink); }
.drop:active { transform: scale(.99); }
.drop-a { font-weight: 700; font-size: 15px; }
.drop-h { font-size: 10.5px; color: var(--muted); }
.drop-busy { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; gap: 10px; background: rgba(251,250,246,.92); border-radius: inherit; font-size: 14px; font-weight: 600; }
.drop.busy .drop-busy { display: flex; }
.pv { position: relative; align-self: flex-start; }
.pv img { width: 112px; height: 112px; object-fit: cover; border-radius: 12px; border: 1.5px solid var(--ink); animation: fade-up .35s var(--ease); }
.pv-x { position: absolute; top: -10px; right: -10px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
.pv-x .ic { width: 30px; height: 30px; padding: 7px; border-radius: 50%; background: var(--ink); color: var(--paper); }
.err { font-size: 13px; color: #A3301F; font-weight: 600; }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.send { display: flex; flex-direction: column; gap: 10px; }
.form-msg:empty { display: none; }
.form-msg { padding: 10px 12px; border-radius: 10px; background: #F8E1DC; color: #8E2A1B; font-size: 14px; font-weight: 600; }
.btn-send { min-height: 56px; background: var(--yellow); color: var(--ink); font-size: 16px; }
.btn-send:hover { background: var(--yellow-hi); }
.btn-send[aria-disabled="true"] { background: var(--line); color: #6E6F68; }
.btn-send[aria-disabled="true"]:active { transform: none; }
.btn-send.busy { pointer-events: none; }
.btn-send.busy::before { content: ''; width: 18px; height: 18px; border-radius: 50%; border: 3px solid rgba(28,29,26,.25); border-top-color: var(--ink); animation: spin .8s linear infinite; }
.help { font-size: 12px; line-height: 1.4; color: var(--muted); text-align: center; }
.done { position: absolute; inset: 0; z-index: 3; background: var(--paper); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 30px 26px; text-align: center; }
.done-ck { width: 84px; height: 84px; border-radius: 50%; background: var(--asphalt); color: var(--yellow); display: flex; align-items: center; justify-content: center; font-size: 44px; animation: ck-in .6s var(--spring) both; }
.done-line { width: min(280px, 80%); height: 7px; background: repeating-linear-gradient(90deg, var(--yellow) 0 26px, transparent 26px 42px); transform-origin: left; animation: line-in .9s var(--ease) .2s both; }
.done h3 { font-size: 36px; line-height: 1; animation: fade-up .5s var(--ease) .3s both; }
.done p { max-width: 330px; font-size: 15px; line-height: 1.45; animation: fade-up .5s var(--ease) .4s both; }
.done .btn { margin-top: 6px; min-width: 160px; animation: fade-up .5s var(--ease) .5s both; }
@keyframes ck-in { from { transform: scale(.3) rotate(-25deg); opacity: 0; } }
@keyframes line-in { from { transform: scaleX(0); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } }

/* lightbox */
.lb { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; background: rgba(18,19,16,.94); overflow: hidden; overflow: clip; }
.lb[open] { display: flex; align-items: center; justify-content: center; animation: fade .25s ease-out; }
.lb::backdrop { background: rgba(18,19,16,.6); }
.lb img { max-width: 100%; max-height: 100%; object-fit: contain; animation: zoom-in .35s var(--spring); }
.lb-x { position: absolute; z-index: 2; top: calc(12px + env(safe-area-inset-top)); right: 12px; width: 48px; height: 48px; border-radius: 50%; background: var(--paper); color: var(--ink); display: flex; align-items: center; justify-content: center; font-size: 20px; }
@keyframes fade { from { opacity: 0; } }
@keyframes zoom-in { from { transform: scale(.92); opacity: 0; } }

/* toast */
.toast { position: fixed; z-index: 300; left: 50%; top: calc(var(--hd) + 10px + env(safe-area-inset-top)); max-width: calc(100% - 32px); width: max-content; padding: 11px 16px; border-radius: 12px; background: var(--ink); color: var(--paper); font-size: 14px; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.25); transform: translate(-50%, -14px); opacity: 0; pointer-events: none; transition: transform .35s var(--spring), opacity .25s; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* reveal on scroll (only applied by JS to elements that start below the fold) */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.rv.in { opacity: 1; transform: none; }

/* pause continuous animations of sections that are off-screen */
.off, .off *, .off ::before, .off ::after, .off::before { animation-play-state: paused !important; }

/* ---------- tablet tweaks ---------- */
@media (min-width: 640px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .steps li { flex-direction: column; }
  .steps li > span:last-child { padding-top: 0; }
  .photos { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .panel { left: 50%; right: auto; width: 560px; margin-left: -280px; }
}

/* ---------- desktop (1b) ---------- */
@media (min-width: 1000px) {
  :root { --hd: 68px; }
  .hd { padding: 0 max(40px, calc(50% - 600px)); }
  .logo { width: 32px; height: 32px; border-radius: 8px; }
  .logo::before { width: 5px; height: 20px; background: repeating-linear-gradient(to bottom, var(--yellow) 0 6px, transparent 6px 9px); }
  .brand-n { font-size: 18px; }
  .brand-s { font-size: 10px; }
  .nav { display: flex; align-items: center; gap: 26px; margin-left: auto; margin-right: 10px; font-size: 15px; font-weight: 500; }
  .nav a { text-decoration: none; padding: 8px 0; background: linear-gradient(var(--yellow), var(--yellow)) left bottom / 100% 3px no-repeat; background-size: 0 3px; transition: background-size .25s var(--ease); }
  .nav a:hover { color: var(--ink); background-size: 100% 3px; }

  .top { grid-template-columns: minmax(0, 1.15fr) 10px minmax(0, 1fr); grid-template-areas: "hero lane intro" "stats stats stats"; column-gap: 48px; max-width: 1280px; margin: 0 auto; padding: 0 40px; }
  .top::before { content: ''; grid-area: 1 / 1 / 2 / -1; background: var(--asphalt); box-shadow: 0 0 0 100vmax var(--asphalt); clip-path: inset(0 -100vmax); z-index: -1; }
  .hero { background: none; padding: 64px 0 60px; gap: 20px; }
  .hero h1 { font-size: 64px; line-height: .95; }
  .hero-sub { font-size: 19px; }
  .hero .btn { font-size: 17px; padding: 16px 26px; }
  .hero .eyebrow { font-size: 12px; }
  .lane { grid-area: lane; justify-self: stretch; width: auto; margin: 0; }
  .lane::before { top: -60px; background: repeating-linear-gradient(to bottom, var(--yellow) 0 34px, transparent 34px 60px); animation-duration: 1.7s; }
  @keyframes lane { to { transform: translateY(60px); } }
  .intro { color: #E2DFD6; padding: 98px 0 60px; font-size: 16px; line-height: 1.6; gap: 16px; }
  .intro b { color: var(--paper); }
  .stats { border-bottom: 0; }
  .stats li { padding: 26px 24px 26px 0; flex-direction: row; align-items: baseline; gap: 14px; }
  .stats li + li { padding-left: 24px; }
  .stats b { font-size: 40px; white-space: nowrap; }
  .stats span { font-size: 14px; }

  .how { max-width: 1280px; margin: 0 auto; padding: 8px 40px 48px; }
  .how .eyebrow { margin-bottom: 4px; }
  .steps { gap: 16px; }
  .steps li { padding: 22px; border-radius: 14px; gap: 12px; font-size: 17px; }
  .steps .num { width: 44px; height: 44px; font-size: 22px; }

  .mapsec { max-width: 1280px; margin: 0 auto; padding: 44px 40px 40px; border-top: 0; }
  .mapsec-hd { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 0 0 18px; }
  .mapsec-hd .eyebrow { display: block; }
  .mapsec-t { padding: 0; gap: 6px; }
  .mapsec-hd h2 { font-size: 40px; line-height: 1; }
  .map-tools { display: flex; gap: 8px; align-items: center; }
  .chips { margin: 0; padding: 0; overflow: visible; gap: 8px; }
  .chip { font-size: 14px; min-height: 44px; padding: 0 16px; }
  .chip:hover { border-color: var(--ink); }
  .near { position: static; margin-left: 8px; font-size: 13px; padding: 0 16px; }
  .near:hover { background: var(--soft); }
  .mapbox { display: grid; grid-template-columns: minmax(0, 1fr) 400px; height: 620px; border: 1px solid #D6D2C7; border-radius: 14px; overflow: hidden; background: var(--card); }
  .mapwrap { height: auto; max-height: none; min-height: 0; }
  .legend { top: auto; bottom: 14px; left: 14px; padding: 12px 14px; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.1); font: 400 13px var(--sans); }
  .legend ul { flex-direction: column; gap: 6px; }
  .legend li { gap: 8px; }
  .lg-t { display: block; margin-bottom: 6px; font: 600 10.5px var(--mono); letter-spacing: .06em; color: var(--muted); }
  .lg-l { display: inline; }
  .lg-s { display: none; }
  .lg-dot { width: 12px; height: 12px; border: 2px solid var(--ink); }

  .panel { position: relative; z-index: auto; left: auto; right: auto; bottom: auto; width: auto; margin: 0; height: auto !important; transform: none !important; visibility: visible; border-radius: 0; box-shadow: none; border-left: 1px solid var(--line); min-height: 0; }
  .panel::after, .pn-grab { display: none; }
  .pn-body { padding: 24px 24px 18px; gap: 18px; }
  .pn-cta { padding: 14px 24px 20px; }
  .pn-title { padding-right: 0; gap: 7px; }
  .pn-title h3 { font-size: 34px; }
  .layer { padding: 12px; }
  .tile { width: 110px; }
  .tile b { font-size: 40px; }
  .photos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ph { aspect-ratio: 4 / 3; }
  .pn-empty { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 10px; padding: 10px 6px 40px; }
  .pn-empty h3 { font-size: 34px; line-height: 1; }
  .pn-empty p { color: var(--muted); font-size: 15px; line-height: 1.5; max-width: 300px; }
  .pn-empty-lane { width: 120px; height: 7px; margin-bottom: 8px; background: repeating-linear-gradient(90deg, var(--yellow) 0 22px, transparent 22px 36px); }
  .slist { margin: 14px 0 0; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; }
  .slist ul { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }

  .results { max-width: 1280px; margin: 0 auto; padding: 48px 40px; gap: 24px; border-top: 1px solid var(--line); }
  .res-hd { flex-direction: row-reverse; align-items: baseline; justify-content: space-between; }
  .res-hd h2 { font-size: 40px; }
  .ctrs { gap: 16px; }
  .ctr { padding: 22px; border-radius: 14px; flex-direction: row; align-items: baseline; gap: 12px; }
  .ctr b { font-size: 56px; min-height: 56px; }
  .ctr span { font-size: 16px; }
  .sk-num { width: 90px; height: 48px; }
  .res-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
  .card { padding: 22px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
  .card h3 { font-size: 18px; }
  .card .sub { font-size: 13px; }
  .worst .wl { border: 0; border-radius: 0; background: none; }
  .wl li { border-top: 1px solid #ECE8DF; }
  .wr { grid-template-columns: 26px minmax(0, 1fr) auto auto; gap: 14px; padding: 10px 4px; }
  .wr-r { font-size: 13px; }
  .wr-m b { font-size: 16px; }
  .wr-s { display: none; }
  .wr-d { display: block; }
  .wr-n { display: block; font: 500 12px var(--mono); color: var(--muted); }
  .pl li { grid-template-columns: 200px minmax(0, 1fr) 44px; gap: 12px; align-items: center; font-size: 13.5px; }
  .pl .bar { grid-column: 2; grid-row: 1; height: 14px; }
  .pl b { grid-column: 3; text-align: right; font-size: 12.5px; }

  .bottom { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
  .actions { padding: 44px 40px 44px max(40px, calc(50vw - 600px)); gap: 16px; }
  .actions h2 { font-size: 36px; }
  .al { gap: 0; }
  .ac { grid-template-columns: 80px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-top: 1px solid #3A3B35; }
  .ac-d { font-size: 12.5px; }
  .ac-t { font-size: 15px; line-height: 1.45; }
  .sources { padding: 44px max(40px, calc(50vw - 600px)) 44px 40px; gap: 14px; }
  .sources h2 { font: 800 36px/1.2 var(--sans); font-stretch: 75%; letter-spacing: -.01em; text-transform: none; color: var(--ink); }
  .srcl a { font-size: 15px; line-height: 1.4; }

  .ft { flex-direction: row; justify-content: space-between; gap: 40px; padding: 22px max(40px, calc(50% - 600px)) 26px; font-size: 13px; }
  .ft p:first-child { max-width: 760px; }
  .ft .mono { font-size: 12px; white-space: nowrap; }

  .rate { width: min(560px, calc(100vw - 32px)); height: auto; max-height: min(880px, calc(100vh - 48px)); margin: auto; border-radius: 16px; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
  .rate[open] { animation: modal-in .35s var(--spring); }
  .rate.closing { animation: modal-out .2s ease-in forwards; }
  @keyframes modal-in { from { transform: translateY(16px) scale(.97); opacity: 0; } }
  @keyframes modal-out { to { transform: translateY(10px) scale(.98); opacity: 0; } }
  .rate-hd { padding: 18px 22px; }
  .rate-body { padding: 20px 22px 26px; }
  .lb { width: min(1240px, calc(100vw - 48px)); height: calc(100vh - 48px); margin: auto; border-radius: 14px; }
}

@media (hover: none) {
  .star-row label:hover { border-color: var(--line); }
  .star-row label.on:hover { border-color: var(--asphalt); }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .rv { opacity: 1; transform: none; }
}
