/* Talli — dark "garage HUD". Palette from the dataviz reference (dark steps). */
:root {
  color-scheme: dark;
  --page: #0d0d0d;
  --surface: #1a1a19;
  --surface-2: #222220;
  --border: rgba(255, 255, 255, 0.10);
  --text: #ffffff;
  --text-2: #c3c2b7;
  --muted: #898781;
  --grid: #2c2c2a;
  --axis: #383835;

  --s1: #3987e5; /* fuel / consumption */
  --s2: #d95926; /* service / seasonal comparison */
  --s3: #199e70; /* fixed costs */
  --s4: #c98500; /* other */

  --good: #0ca30c;
  --warning: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b;

  --accent: #fab219;
  --radius: 10px;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--page); color: var(--text); font-size: 15px; line-height: 1.45; }
a { color: inherit; }
.muted { color: var(--muted); }
.empty { color: var(--muted); padding: 24px; }

/* Top bar & garage tabs */
.topbar { display: flex; align-items: center; gap: 28px; padding: 14px 28px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: rgba(13, 13, 13, 0.92); backdrop-filter: blur(8px); z-index: 5; }
.brand { white-space: nowrap; text-decoration: none; font-weight: 800; letter-spacing: 0.22em; font-size: 14px; }
.brand-mark { color: var(--accent); }
.garage { display: flex; gap: 6px; overflow-x: auto; }
.sync-warn { margin-left: auto; padding: 6px 12px; border-radius: 8px; background: rgba(250, 178, 25, 0.12); color: var(--warning); font-size: 13px; }
.garage a { text-decoration: none; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-2); white-space: nowrap; font-size: 14px; }
.garage a small { color: var(--muted); margin-left: 4px; }
.garage a.on { background: var(--surface-2); color: var(--text); border-color: rgba(250, 178, 25, 0.5); }
.garage a.sold { opacity: 0.7; }

main { max-width: 1440px; margin: 0 auto; padding: 24px 28px 64px; display: grid; gap: 20px; }

/* Panels */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; min-width: 0; }
.panel-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.panel-head h2 { margin: 0; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-2); font-weight: 700; }
.panel-head .muted { font-size: 13px; }
.cols { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }

/* Hero: the character sheet */
.hero { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 28px; align-items: center; padding: 26px 28px; border-radius: 14px; border: 1px solid var(--border);
  background: radial-gradient(120% 140% at 0% 0%, rgba(57, 135, 229, 0.16), transparent 55%), radial-gradient(90% 120% at 100% 100%, rgba(250, 178, 25, 0.08), transparent 60%), var(--surface); }
.hero.retired { filter: saturate(0.35); }
.hero-art { position: relative; }
.car-art { width: 100%; height: auto; display: block; }
.car-art .shadow { fill: rgba(0, 0, 0, 0.55); }
.car-art .body { fill: #2b3442; stroke: #6da7ec; stroke-width: 1.5; }
.car-art .glass { fill: #10161f; stroke: #3987e5; stroke-width: 1; }
.car-art .line-detail { stroke: rgba(109, 167, 236, 0.35); stroke-width: 1; }
.car-art .lamp { fill: #fff6d6; }
.car-art .tail { fill: var(--critical); }
.car-art .wheel circle { fill: #0b0b0b; stroke: #52514e; stroke-width: 3; }
.car-art .wheel .hub { fill: #383835; stroke: #898781; stroke-width: 1.5; }
.plate { position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%); background: #f4f4f0; color: #111; font-weight: 800; letter-spacing: 0.08em; border-radius: 4px; padding: 2px 10px 2px 0; display: flex; align-items: center; gap: 8px; font-size: 15px; border: 2px solid #111; box-shadow: 0 0 0 1px #666; }
.plate .eu { background: #1f4fa8; color: #fc0; font-size: 9px; padding: 5px 4px; border-radius: 2px 0 0 2px; letter-spacing: 0; }

.eyebrow { color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; font-size: 12px; }
.hero h1 { margin: 2px 0 12px; font-size: 34px; line-height: 1.1; }
.retired-tag { display: inline-block; margin: -4px 0 12px; padding: 3px 10px; border-radius: 4px; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); font-size: 13px; }
.level { display: flex; gap: 14px; align-items: center; }
.lvl-badge { width: 74px; height: 74px; flex: none; border-radius: 50%; display: grid; place-content: center; text-align: center; font-size: 26px; font-weight: 800; line-height: 1;
  border: 2px solid var(--accent); box-shadow: 0 0 22px rgba(250, 178, 25, 0.25), inset 0 0 14px rgba(250, 178, 25, 0.12); }
.lvl-badge small { display: block; font-size: 10px; letter-spacing: 0.2em; color: var(--accent); margin-bottom: 3px; }
.xp { flex: 1; }
.xp-top { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.xp-top em { font-style: normal; color: var(--muted); border-bottom: 1px dotted var(--muted); cursor: help; font-size: 11px; }
.xp-bar, .attr-bar { height: 8px; background: #1b2a3d; border-radius: 4px; overflow: hidden; }
.xp-bar i, .attr-bar i { display: block; height: 100%; width: var(--w, 0%); background: linear-gradient(90deg, #2a78d6, #6da7ec); border-radius: 4px; }
.xp-bar i { background: linear-gradient(90deg, #c98500, var(--accent)); }
.xp-bar { background: #3a2c0c; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; color: var(--muted); font-size: 13px; }
.hero-meta b { color: var(--text); font-weight: 600; }

.hero-attrs { display: grid; gap: 11px; }
.attr-top { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); margin-bottom: 4px; }
.attr-top b { color: var(--text); font-weight: 600; }
.attr-top small { color: var(--muted); font-weight: 400; }
.attr-note { color: var(--muted); font-size: 11px; margin-top: 3px; }
.ach { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.ach-item { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); cursor: default; }
.ach-item span { color: var(--accent); margin-right: 5px; }

/* Alerts */
.alerts { display: grid; gap: 10px; }
.alert { display: flex; gap: 14px; align-items: flex-start; padding: 14px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); border-left-width: 4px; }
.alert > b { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-content: center; font-size: 14px; color: #0d0d0d; }
.alert strong { display: block; }
.alert p { margin: 2px 0 0; color: var(--text-2); font-size: 14px; }
.al-critical { border-left-color: var(--critical); background: linear-gradient(90deg, rgba(208, 59, 59, 0.18), var(--surface) 60%); }
.al-critical > b { background: var(--critical); color: #fff; }
.al-serious { border-left-color: var(--serious); }
.al-serious > b { background: var(--serious); }
.al-info { border-left-color: var(--muted); }
.al-info > b { background: var(--muted); }

/* Stat tiles */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; position: relative; min-width: 0; }
.t-label { color: var(--muted); font-size: 13px; }
.t-value { font-size: 30px; font-weight: 650; margin: 2px 0; }
.t-value small { font-size: 14px; color: var(--muted); font-weight: 400; }
.t-delta { color: var(--text-2); font-size: 13px; }
.spark { position: absolute; right: 16px; top: 18px; }
.spark-line { fill: none; stroke: var(--s1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; opacity: 0.85; }
.spark-end { fill: var(--s1); stroke: var(--surface); stroke-width: 2; }

/* Cooldowns */
.cd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.cd { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; display: grid; gap: 7px; }
.cd header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cd-name { font-weight: 600; }
.cd-main { font-size: 19px; font-weight: 650; font-variant-numeric: tabular-nums; }
.cd-sub { color: var(--muted); font-size: 12px; }
.cd-bar { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; }
.cd-bar i { height: 7px; border-radius: 2px; background: #2f2f2c; }
.st-ok .cd-bar i.on { background: var(--good); }
.st-soon .cd-bar i.on { background: var(--warning); }
.st-overdue .cd-bar i.on { background: var(--critical); }
.st-unknown .cd-bar i { background: repeating-linear-gradient(45deg, #2f2f2c 0 3px, #383835 3px 6px); }
.cd.st-overdue { border-color: rgba(208, 59, 59, 0.55); box-shadow: 0 0 0 1px rgba(208, 59, 59, 0.2), 0 0 18px rgba(208, 59, 59, 0.12); }
.cd.st-overdue .cd-main { color: #ff8c8c; }
.cd.st-soon { border-color: rgba(250, 178, 25, 0.4); }
.cd.st-unknown { border-style: dashed; }
.badge { font-size: 11px; padding: 2px 8px 2px 4px; border-radius: 999px; background: #2a2a28; color: var(--text-2); white-space: nowrap; }
.badge b { display: inline-grid; place-content: center; width: 16px; height: 16px; border-radius: 50%; font-size: 10px; margin-right: 3px; color: #0d0d0d; }
.badge.st-ok b { background: var(--good); }
.badge.st-soon b { background: var(--warning); }
.badge.st-overdue b { background: var(--critical); color: #fff; }
.badge.st-unknown b { background: var(--muted); }

/* Legends & segmented control */
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--text-2); margin-left: auto; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.key { display: inline-block; width: 14px; height: 3px; border-radius: 2px; flex: none; }
.key.k-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--s1); opacity: 0.6; }
.key.k-s1 { background: var(--s1); }
.key.k-s2 { background: var(--s2); }
.key.k-ref { background: var(--muted); height: 1px; }
.key.k-pin { width: 8px; height: 8px; background: var(--text-2); transform: rotate(45deg); border-radius: 1px; }
.key.s1 { background: var(--s1); height: 10px; width: 10px; border-radius: 2px; }
.key.s2 { background: var(--s2); height: 10px; width: 10px; border-radius: 2px; }
.key.s3 { background: var(--s3); height: 10px; width: 10px; border-radius: 2px; }
.key.s4 { background: var(--s4); height: 10px; width: 10px; border-radius: 2px; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg button { background: none; border: 0; color: var(--text-2); padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.seg button.on { background: var(--surface-2); color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }

/* Charts */
.chart { position: relative; }
.chart svg { display: block; overflow: visible; }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart .axis { stroke: var(--axis); stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .ref { stroke: var(--muted); stroke-width: 1; }
.chart .ref-label { fill: var(--muted); font-size: 11px; }
.chart .pin { stroke: var(--text-2); stroke-width: 1; opacity: 0.28; }
.chart .pin-mark { fill: var(--text-2); }
.chart .pin-label { fill: var(--text-2); font-size: 11px; }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.s1 { stroke: var(--s1); }
.chart .line.s2 { stroke: var(--s2); }
.chart .area.s1 { fill: var(--s1); opacity: 0.1; }
.chart .owned { fill: var(--accent); opacity: 0.05; }
.chart .dot { stroke: var(--surface); stroke-width: 2; }
.chart .dot.s1 { fill: var(--s1); }
.chart .dot.soft { opacity: 0.55; }
.chart .dot.hollow { fill: var(--surface); stroke: var(--s1); stroke-width: 1.5; opacity: 0.8; }
.chart .dot.fail { fill: var(--critical); }
.chart .cross { stroke: var(--text-2); stroke-width: 1; opacity: 0.4; }
.chart .hover-ring { fill: none; stroke: var(--text); stroke-width: 2; }
.chart .bar.s1 { fill: var(--s1); }
.chart .bar.s2 { fill: var(--s2); }
.chart .bar.s3 { fill: var(--s3); }
.chart .bar.s4 { fill: var(--s4); }
.chart .storage { fill: var(--muted); opacity: 0.08; }
.chart .storage-label { fill: var(--muted); font-size: 12px; }
.tip { position: absolute; pointer-events: none; background: #262624; border: 1px solid var(--border); border-radius: 8px; padding: 8px 11px; font-size: 13px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); z-index: 3; min-width: 170px; max-width: 320px; }
.tip .row { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.tip .row b { margin-left: auto; padding-left: 10px; }
.tip .muted { font-size: 12px; margin-top: 3px; }

/* Log */
.log { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 13px; }
.log li { display: grid; grid-template-columns: 78px 22px 1fr auto; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--grid); }
.log-date { color: var(--muted); font-variant-numeric: tabular-nums; }
.log-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.log-amt { font-variant-numeric: tabular-nums; }

/* Specs & inspections */
.specs { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; font-size: 13px; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; overflow-wrap: anywhere; }
.insp { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 13px; }
.insp th { text-align: left; color: var(--muted); font-weight: 500; padding: 4px 0; border-bottom: 1px solid var(--axis); }
.insp td { padding: 4px 0; border-bottom: 1px solid var(--grid); }
.insp .num { text-align: right; font-variant-numeric: tabular-nums; }
.insp .fail { color: #ff8c8c; }

/* Condition map (carmap.js): blueprint sheet, zones filled by condition */
.cmap { --bp: #0f1d2e; --bp-line: #bcd6f5; --bp-dim: #6da7ec; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.cmap-sheet { background: var(--bp); border: 1px solid rgba(109, 167, 236, 0.35); border-radius: var(--radius); padding: 10px; }
.cmap-sheet svg { display: block; width: 100%; height: auto; overflow: visible; }
.cmap-body { fill: rgba(188, 214, 245, 0.05); stroke: var(--bp-line); stroke-width: 2.2; vector-effect: non-scaling-stroke; pointer-events: none; }
.cmap-mirror { fill: rgba(188, 214, 245, 0.05); stroke: var(--bp-line); stroke-width: 1.8; vector-effect: non-scaling-stroke; pointer-events: none; }
.cmap-glass { fill: rgba(109, 167, 236, 0.12); stroke: var(--bp-line); stroke-opacity: 0.6; stroke-width: 1; vector-effect: non-scaling-stroke; pointer-events: none; }
.cmap-roof { fill: none; stroke: var(--bp-line); stroke-opacity: 0.35; stroke-width: 1; vector-effect: non-scaling-stroke; pointer-events: none; }
.cmap-dim, .cmap-ext { fill: none; stroke: var(--bp-dim); stroke-opacity: 0.55; stroke-width: 0.8; vector-effect: non-scaling-stroke; }
.cmap-ext { stroke-opacity: 0.3; }
.cmap-arrow { fill: var(--bp-dim); }
.cmap-dim-t { fill: var(--bp-dim); fill-opacity: 0.75; font-size: 92px; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
.cmap-hatch-bg { fill: #2c2c2a; }
.cmap-hatch-fg { fill: #5d5c58; }
.cmap-part { cursor: pointer; outline: none; }
.cmap-part .zone { fill: var(--c); fill-opacity: 0.78; stroke: var(--bp); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.cmap-part .line-part { fill: none; stroke: var(--c); stroke-width: 70px; stroke-opacity: 0.75; stroke-linecap: round; stroke-linejoin: round; vector-effect: none; }
.cmap-part.unknown .zone { fill: url(#cmap-hatch); fill-opacity: 1; stroke: #898781; stroke-dasharray: 6 4; }
.cmap-part.unknown .line-part { fill: none; stroke: #5d5c58; }
.cmap-part.hot .zone { fill-opacity: 1; stroke: #fff; stroke-width: 2.6; }
.cmap-part.hot .line-part { stroke-opacity: 1; stroke: var(--c); }
.cmap-tick { fill: none; stroke: var(--bp-line); stroke-width: 1; vector-effect: non-scaling-stroke; pointer-events: none; }
.cmap-needle { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; vector-effect: non-scaling-stroke; pointer-events: none; }
.cmap-callout { cursor: pointer; }
.cmap-callout circle { fill: var(--bp); stroke: var(--c); stroke-width: 1.8; vector-effect: non-scaling-stroke; }
.cmap-callout text { fill: var(--bp-line); font-size: 68px; font-weight: 700; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
.cmap-callout.unknown circle { stroke: #898781; stroke-dasharray: 4 3; }
.cmap-callout.hot circle { fill: var(--c); }
.cmap-callout.hot text { fill: #0d0d0d; }
.cmap-callout.unknown.hot circle { fill: #898781; }

/* Important and overdue: blink. Reduced motion: a steady red outline instead. */
@keyframes cmap-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.18; } }
.cmap-part.blink .zone, .cmap-callout.blink circle, .cmap-list li.blink .cmap-dot, .cmap-sw-blink { animation: cmap-blink 1s ease-in-out infinite; }

.cmap-list { list-style: none; margin: 0; padding: 4px 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; max-height: 470px; overflow-y: auto; }
.cmap-list li { display: grid; grid-template-columns: 26px 1fr auto; grid-template-areas: "n name pill" "n short short"; gap: 0 8px; padding: 6px 12px; border-bottom: 1px solid var(--grid); cursor: pointer; outline: none; }
.cmap-list li:last-child { border-bottom: 0; }
.cmap-list li.hot, .cmap-list li:focus-visible { background: #2a2a27; }
.cmap-n { grid-area: n; font-family: ui-monospace, Consolas, monospace; color: var(--muted); font-size: 12px; padding-top: 1px; }
.cmap-name { grid-area: name; font-weight: 600; }
.cmap-pill { grid-area: pill; display: inline-flex; align-items: center; gap: 6px; color: var(--c); font-size: 12px; font-weight: 600; }
.cmap-list li.unknown .cmap-pill { color: var(--muted); }
.cmap-short { grid-area: short; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

.cmap-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--text-2); margin-left: auto; }
.cmap-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cmap-scale { display: inline-block; width: 80px; height: 8px; border-radius: 4px; background: var(--scale, linear-gradient(90deg, var(--good), var(--warning), var(--serious), var(--critical))); }
.cmap-sw-unknown { display: inline-block; width: 16px; height: 11px; border-radius: 3px; background: repeating-linear-gradient(45deg, #5d5c58 0 3px, #2c2c2a 3px 7px); }
.cmap-sw-blink { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: var(--critical); }

.cmap-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--muted)); flex: none; }
.unknown > .cmap-dot, .cmap-dot.unknown { background: repeating-linear-gradient(45deg, #898781 0 2px, #383835 2px 4px); }
.cmap-tip { position: fixed; z-index: 20; pointer-events: none; width: max-content; max-width: 360px; background: #262624; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px 11px; font-size: 13px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55); }
.cmap-tip-head { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.cmap-tip-head .cmap-st { margin-left: auto; padding-left: 12px; }
.cmap-where { color: var(--muted); font-size: 12px; margin: 1px 0 8px 18px; }
.cmap-tip ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cmap-tip li { display: grid; grid-template-columns: 10px 1fr; gap: 8px; align-items: start; }
.cmap-tip li .cmap-dot { margin-top: 5px; }
.cmap-item-top { display: flex; gap: 10px; align-items: baseline; }
.cmap-item-top b { font-weight: 600; }
.cmap-item-top .cmap-st { margin-left: auto; }
.cmap-st { font-size: 11px; font-weight: 600; white-space: nowrap; color: var(--c, var(--text-2)); }
.unknown .cmap-st, .unknown > div .cmap-st { color: var(--muted); }
.cmap-main { font-variant-numeric: tabular-nums; }
.cmap-sub { color: var(--muted); font-size: 12px; }
.cmap-checks { margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--grid); color: var(--text-2); font-size: 12px; }
.cmap-checks span { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 2px; }
.cmap-hint { margin-top: 8px; color: var(--accent); font-size: 11px; }

@media (prefers-reduced-motion: reduce) {
  .cmap-part.blink .zone, .cmap-callout.blink circle, .cmap-list li.blink .cmap-dot, .cmap-sw-blink { animation: none; }
  .cmap-part.blink .zone, .cmap-callout.blink circle { stroke: var(--critical); stroke-width: 4; }
  .cmap-list li.blink .cmap-dot { box-shadow: 0 0 0 2px var(--critical); }
  .cmap-sw-blink { background: transparent; border: 2px solid var(--critical); }
}

.login { max-width: 360px; margin: 10vh auto; display: grid; gap: 10px; }
.login input, .login button { font: inherit; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); }
.login button { background: var(--accent); color: #0d0d0d; font-weight: 700; cursor: pointer; }

/* The car page is desktop-first; on narrow screens everything stacks. */
@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr 1fr; }
  .hero-attrs { grid-column: 1 / -1; }
  .cols { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .cmap { grid-template-columns: 1fr; }
  .cmap-list { max-height: none; display: grid; grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  main { padding: 16px; }
  .topbar { padding: 12px 16px; gap: 14px; }
  .hero { grid-template-columns: 1fr; padding: 18px; }
  .hero h1 { font-size: 26px; }
  .tiles { grid-template-columns: 1fr; }
  .legend, .cmap-legend { margin-left: 0; }
  .cmap-list { grid-template-columns: 1fr; }
}
