/* Palm Eye Cloud portal — the 2026-10-23 dashboard wave: the twin's map, vehicle glyphs and fleet clusters, raw data on
 * demand, the expanding metric deep dive and its visuals, the satellites, the data export and the comparison.
 * Copyright © 2026 Palm Digitalz. All rights reserved. */

/* ---------- vehicle glyphs ---------- */
.vg { display: block; width: 100%; height: auto; overflow: visible; }
.vg-body { fill: currentColor; }
.vg-wheel { fill: currentColor; stroke: var(--surface); stroke-width: 1.2; }
.vg-hub { fill: var(--surface); }
.vg-ring { fill: none; stroke: currentColor; stroke-width: 2.2; }
.vg-stroke { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- the twin's map: the corner overview and the map it grows into ---------- */
button.twin-mini-wrap { position: relative; border: 0; cursor: zoom-in; color: inherit; font: inherit; pointer-events: auto; }  /* the HUD layer lets clicks through to the stage; its map must take them (2026-10-24: "the map … still does not expand") */
button.twin-mini-wrap:hover .twin-mini-grow, button.twin-mini-wrap:focus-visible .twin-mini-grow { opacity: 1; }
.twin-mini-grow { position: absolute; right: 8px; top: 6px; font-size: 13px; line-height: 1; color: #fff; opacity: .55; transition: opacity .15s; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.twin-mapx { position: absolute; inset: 6% 6% 9% 6%; z-index: 30; display: flex; flex-direction: column; border-radius: 14px; overflow: hidden;
  background: rgba(14, 14, 18, .82); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: 0 24px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.08) inset; color: #fff; transform-origin: top left; }
.twin-mapx[hidden] { display: none; }
@media (max-width: 640px) {
  .twin-mapx { position: fixed; inset: auto 0 0 0; height: 86dvh; z-index: 60; background: rgba(14, 14, 18, .97); border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -8px 40px rgba(0,0,0,.45); }
  .twin-mapx .sheet-grab { display: block; width: 36px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.28); margin: 8px auto 0; flex: none; }
  .twin-mapx-head { touch-action: none; } .twin-mapx-zoom { display: none; }
}
.twin-mapx-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.08); }
.twin-mapx-head .btn { color: #fff; }
.twin-mapx-zoom { color: rgba(255,255,255,.6); font-size: 12px; min-width: 40px; }
.twin-mapx-canvas { flex: 1 1 auto; display: block; width: 100%; min-height: 0; cursor: grab; touch-action: none; outline: none; }
.twin-mapx-canvas:active { cursor: grabbing; }
.twin-mapx-foot { padding: 8px 12px; font-size: var(--t-foot); color: rgba(255,255,255,.6); display: flex; align-items: center; gap: 4px 16px; flex-wrap: wrap; }
.twin-mapx-key { display: inline-flex; align-items: center; gap: 6px; } .twin-mapx-hint { margin-left: auto; }
.twin-mapx-legend { display: inline-block; width: 60px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, rgb(90,200,250), rgb(232,163,61), rgb(255,69,58)); }
.twin-mapx-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.twin-mapx-dot.start { background: #30D158; } .twin-mapx-dot.end { background: #FF453A; }
.switch.sm { transform: scale(.88); }

/* ---------- fleet map: a pin wears its vehicle; a crowd becomes a cluster that opens ---------- */
.pin[hidden], .cluster[hidden] { display: none !important; }
/* the pin: a white disc holding the vehicle seen from above, its status dot at the corner (2026-10-24) */
.pin { width: 30px; height: 30px; }
.pin .pin-disc { position: absolute; inset: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 0.5px rgba(0,0,0,.18), 0 1px 4px rgba(0,0,0,.28); display: grid; place-items: center; transition: transform var(--dur-fast) var(--ease); }
.pin .pin-glyph { width: 20px; height: 20px; }
.tg .tg-body { fill: #3A3A3C; } .tg .tg-glass { fill: #A7C7E7; } .tg .tg-bar { stroke: #3A3A3C; stroke-width: 1.8; stroke-linecap: round; fill: none; }
.pin .pin-dot { inset: auto; right: -1px; bottom: -1px; width: 11px; height: 11px; border-width: 2px; }
.pin:hover .pin-dot, .pin.on .pin-dot { transform: none; }
.pin:hover .pin-disc, .pin.on .pin-disc { transform: scale(1.12); }
.pin.on .pin-disc { box-shadow: 0 0 0 2.5px var(--accent), 0 2px 8px rgba(0,0,0,.3); }
.pin.fault .pin-dot { background: var(--red); }
.pin .pin-label { left: 36px; }
.zoomed-out .pin:not(.on) { width: 24px; height: 24px; } .zoomed-out .pin:not(.on) .pin-glyph { width: 16px; height: 16px; }
@media (prefers-color-scheme: dark) { .pin .pin-disc { background: #F2F2F7; } }
.cluster { position: relative; border: 0; padding: 0; background: none; cursor: zoom-in; display: grid; place-items: center; }
/* a cluster is a small flat disc in its lead status colour with a hairline ring, as on Apple Maps — no glow, no gloss */
/* a cluster is a neutral disc with its count, as on Apple Maps — red only when every vehicle in it has a fault */
.cluster-blob { position: relative; width: var(--cs, 36px); height: var(--cs, 36px); border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: #1C1C1E; box-shadow: 0 0 0 0.5px rgba(0,0,0,.18), 0 1px 4px rgba(0,0,0,.28); transition: transform var(--dur-fast) var(--ease); }
.cluster-blob.fault { box-shadow: 0 0 0 2.5px var(--red), 0 1px 4px rgba(0,0,0,.28); }
@media (prefers-color-scheme: dark) { .cluster-blob { background: #F2F2F7; } }
.cluster:hover .cluster-blob, .cluster:focus-visible .cluster-blob { transform: scale(1.06); }
.cluster-n { font-weight: 600; font-size: var(--t-subhead); line-height: 1; }
.cluster-glyphs { display: none; }
.cluster-ring { position: absolute; inset: -5px; border-radius: 50%; }
.cluster-pop { position: absolute; bottom: calc(100% + 14px); left: 50%; transform: translateX(-50%); min-width: 220px; max-width: 280px; max-height: 260px; overflow: auto;
  background: var(--surface); color: var(--label); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; z-index: 5; text-align: left; }
.cluster-pop[hidden] { display: none; }
.cluster-row { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 6px 8px; border-radius: 10px; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.cluster-row:hover, .cluster-row:focus-visible { background: var(--surface2); }
.cluster-row .vg { width: 30px; flex: none; }
.cluster-row .dot { flex: none; }
.cluster-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--secondary); }
.cluster-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cluster-legend .vg { width: 24px; color: var(--secondary); }

/* ---------- comparison colours: A and B, validated (dataviz validate_palette: lightness band, CVD ΔE ≥ 28, contrast) ---------- */
:root { --cmp-a: #3A93FF; --cmp-b: #C08026; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --cmp-a: #0A6FD6; --cmp-b: #A8650A; } }
:root[data-theme="light"] { --cmp-a: #0A6FD6; --cmp-b: #A8650A; }
:root[data-theme="dark"] { --cmp-a: #3A93FF; --cmp-b: #C08026; }

/* ---------- readings: estimated marks, raw on demand ---------- */
.rd-est { color: var(--secondary); font-weight: 600; }
.rd-rawbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding: 10px 14px; border-radius: 12px; background: var(--surface2); flex-wrap: wrap; }
.rd-group-raw .rd-tile { border-style: dashed; }
.rd-raw-note { font-weight: 400; font-size: 12px; }
.rd-tile.dd-source { visibility: hidden; }
.picker-raw { display: flex; align-items: center; gap: 6px; font-size: 12px; margin-top: 8px; }
.stat-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.stat-tools label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }

/* ---------- the deep dive: a tile grown into a sheet ---------- */
.dd-back { position: fixed; inset: 0; z-index: 900; background: rgba(0, 0, 0, .45); }
.dd-sheet { position: fixed; z-index: 901; left: 50%; top: 50%; width: min(980px, calc(100vw - 32px)); max-height: min(88vh, 900px); translate: -50% -50%; overflow: auto;
  background: var(--surface); color: var(--label); border-radius: 20px; box-shadow: 0 24px 64px rgba(0,0,0,.4), 0 0 0 1px var(--hairline-soft); transform-origin: top left; outline: none; overscroll-behavior: contain; }
.dd-inner { padding: 20px 24px 24px; }
.dd-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dd-title-wrap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dd-title { margin: 0; font-size: 20px; font-weight: 650; letter-spacing: -.01em; }
.dd-kind { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-subhead); font-weight: 500; color: var(--secondary); white-space: nowrap; }
.dd-kind::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--quaternary); flex: none; }
.dd-kind.k-measured::before { background: var(--green); } .dd-kind.k-calculated::before { background: var(--blue); } .dd-kind.k-estimated::before { background: var(--accent); } .dd-kind.k-raw::before { background: var(--grey); }
.dd-hero { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.dd-val { font-size: 44px; font-weight: 300; letter-spacing: -.02em; line-height: 1.05; }
.dd-unit { font-size: 16px; color: var(--secondary); margin-left: 6px; }
.dd-when { font-size: 13px; }
.dd-scrub { margin: 10px 0 4px; }
.dd-range { width: 100%; }
.dd-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 14px; }
@media (max-width: 640px) { .dd-bar .grow { flex-basis: 100%; height: 0; } .dd-bar .grow + .btn.ghost { margin-left: -10px; } } /* on a phone the text actions start a line on the text edge */
.dd-seg button[aria-selected="true"] { background: var(--surface); color: var(--label); box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.dd-view { min-height: 220px; }
.dd-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; margin-top: 16px; }
.dd-stat { background: var(--surface2); border-radius: 12px; padding: 10px 12px; }
.dd-stat-k { font-size: 12px; color: var(--secondary); }
.dd-stat-v { font-size: 18px; margin-top: 2px; }
.dd-stat-u { font-size: 12px; color: var(--secondary); }
.dd-section { margin-top: 20px; border-top: 1px solid var(--hairline-soft); padding-top: 14px; }
.dd-h { font-size: var(--t-body); color: var(--label); margin: 0 0 12px; font-weight: 600; }
.dd-formula { font-size: 13px; background: var(--surface2); padding: 2px 8px; border-radius: 6px; }
.dd-inputs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.dd-chip { border: 1px solid var(--hairline); background: var(--surface); color: var(--label); border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 13px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.dd-chip:hover { background: var(--surface2); } .dd-chip.off { opacity: .55; cursor: default; border-style: dashed; }
.dd-chip-k { font-size: 11px; color: var(--secondary); }
.dd-legend { display: grid; gap: 6px; margin-top: 12px; }
.dd-leg { display: grid; grid-template-columns: 110px 1fr; gap: 10px; align-items: start; font-size: 13px; opacity: .6; }
.dd-leg.on { opacity: 1; } .dd-leg.on .dd-kind { color: var(--label); font-weight: 600; }
@media (max-width: 640px) {
  .dd-sheet { left: 0; right: 0; top: auto; bottom: 0; translate: none; width: 100%; max-height: 92dvh; border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .dd-sheet .sheet-grab { display: block; width: 36px; height: 5px; border-radius: 3px; background: var(--quaternary); margin: 8px auto 0; }
  .dd-inner { padding: 12px 16px 24px; } .dd-head { touch-action: none; } .dd-val { font-size: 34px; } .dd-leg { grid-template-columns: 1fr; }
}

/* ---------- the visuals ---------- */
.mv { display: grid; grid-template-columns: minmax(180px, 260px) 1fr; gap: 24px; align-items: start; }
@media (max-width: 720px) { .mv { grid-template-columns: 1fr; } }
.mv-tank-col, .mv-dial-col { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.mv-big { font-size: 30px; font-weight: 300; }
.mv-word { font-size: 13px; font-weight: 600; color: var(--secondary); }
.mv-word.good { color: var(--green); } .mv-word.warn { color: var(--yellow, #FFD60A); } .mv-word.bad { color: var(--red); } .mv-word.info { color: var(--blue, #0A84FF); }
.mv-cap { font-size: 12px; color: var(--secondary); margin: 6px 0; }
.mv-side { min-width: 0; }
.mv-sub { margin-top: 12px; }
.mv-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 18px; margin: 0; }
.mv-fact dt { font-size: 12px; color: var(--secondary); }
.mv-fact dd { margin: 2px 0 0; font-size: 17px; font-variant-numeric: tabular-nums; }
.mv-fact-sub { display: block; font-size: 12px; color: var(--tertiary, var(--secondary)); margin-top: 2px; }
.mv-inputs { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 14px; font-size: 13px; color: var(--secondary); }
.mv-inputs label { display: inline-flex; align-items: center; gap: 6px; }
.mv-input { width: 84px; height: 30px; border-radius: 8px; border: 1px solid var(--hairline); background: var(--surface2); color: var(--label); padding: 0 8px; font: inherit; }
/* tank */
.mv-tank { width: 150px; height: auto; }
.mv-tank-cap { fill: var(--surface3); }
.mv-tank-body { fill: var(--surface2); }
.mv-tank-glass { fill: none; stroke: var(--hairline); stroke-width: 2; }
.mv-tank-tick { stroke: var(--secondary); stroke-width: 1.5; opacity: .5; }
.mv-liquid { transition: transform var(--dur-sheet) var(--ease); fill: var(--green); }
.mv-liquid.warn { fill: var(--yellow, #FFD60A); } .mv-liquid.bad { fill: var(--red); }
@media (prefers-reduced-motion: reduce) { .mv-liquid { transition: none; } }
.mv-spark { width: 100%; height: 46px; display: block; }
.mv-spark polyline { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
/* dial */
.mv-dial { width: 230px; height: auto; }
.mv-dial-track { fill: none; stroke: var(--surface3); stroke-width: 10; stroke-linecap: round; }
.mv-dial-zone { fill: none; stroke-width: 10; } .mv-dial-zone.bad { stroke: var(--red); opacity: .8; }
.mv-dial-seen { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; opacity: .8; }
.mv-dial-tick { stroke: var(--secondary); stroke-width: 1.5; }
.mv-dial-num { fill: var(--secondary); font-size: 10px; text-anchor: middle; font-family: inherit; }
.mv-needle { transform-box: view-box; transform-origin: 100px 100px; transition: transform var(--dur) var(--ease); }
.mv-needle path { fill: var(--label); } .mv-needle circle { fill: var(--accent); }
.mv-dial-val { fill: var(--label); font-size: 26px; font-weight: 300; text-anchor: middle; font-family: inherit; }
.mv-dial-unit { fill: var(--secondary); font-size: 11px; text-anchor: middle; font-family: inherit; }
/* bands */
.mv-bands { display: grid; gap: 7px; }
.mv-band { display: grid; grid-template-columns: minmax(110px, 160px) 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.mv-band-k { color: var(--secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv-band-track { height: 10px; border-radius: 5px; background: var(--surface2); overflow: hidden; }
.mv-band-fill { display: block; height: 100%; border-radius: 5px; background: var(--accent); }
.mv-band-fill.good { background: var(--green); } .mv-band-fill.warn, .mv-band-fill.warn-soft { background: var(--yellow, #FFD60A); } .mv-band-fill.bad { background: var(--red); } .mv-band-fill.info { background: var(--blue, #0A84FF); }
.mv-band-v { font-size: 12px; white-space: nowrap; }
/* thermometer */
.mv-thermo { width: 90px; height: auto; }
.mv-thermo-tube { fill: var(--surface2); stroke: var(--hairline); }
.mv-thermo-bulb { fill: var(--accent); }
.mv-thermo-fill { fill: var(--accent); transition: y var(--dur) var(--ease), height var(--dur) var(--ease); }
.mv-thermo-fill.good { fill: var(--green); } .mv-thermo-fill.bad { fill: var(--red); } .mv-thermo-fill.info { fill: var(--blue, #0A84FF); } .mv-thermo-fill.warn, .mv-thermo-fill.warn-soft { fill: var(--yellow, #FFD60A); }
.mv-zone.good { fill: var(--green); } .mv-zone.bad { fill: var(--red); } .mv-zone.info { fill: var(--blue, #0A84FF); } .mv-zone.warn, .mv-zone.warn-soft { fill: var(--yellow, #FFD60A); }
.mv-thermo-num { fill: var(--secondary); font-size: 9px; text-anchor: end; font-family: inherit; }
.mv-thermo-mark { stroke-width: 2; } .mv-thermo-mark.min { stroke: var(--blue, #0A84FF); } .mv-thermo-mark.max { stroke: var(--red); }
/* battery */
.mv-battery { width: 220px; height: auto; }
.mv-bat-body { fill: var(--surface2); stroke: var(--hairline); stroke-width: 2; }
.mv-bat-cap { fill: var(--surface3); }
.mv-bat-fill { fill: var(--secondary); transition: width var(--dur) var(--ease); } .mv-bat-fill.good { fill: var(--green); } .mv-bat-fill.bad { fill: var(--red); } .mv-bat-fill.info { fill: var(--blue, #0A84FF); }
.mv-bat-bolt { fill: #fff; stroke: rgba(0,0,0,.25); transition: opacity var(--dur-fast); }
/* percent, trim */
.mv-pct { display: flex; flex-direction: column; gap: 8px; }
.mv-pct-track { height: 22px; border-radius: 11px; background: var(--surface2); overflow: hidden; }
.mv-pct-fill { display: block; height: 100%; background: var(--accent); border-radius: 11px; transition: width var(--dur) var(--ease); }
.mv-pct-scale { display: flex; justify-content: space-between; font-size: 11px; }
.mv-trim { display: grid; grid-template-columns: 1fr 2px 1fr; height: 22px; align-items: stretch; }
.mv-trim-half { background: var(--surface2); display: flex; overflow: hidden; } .mv-trim-half.l { justify-content: flex-end; border-radius: 11px 0 0 11px; } .mv-trim-half.r { border-radius: 0 11px 11px 0; }
.mv-trim-mid { background: var(--secondary); }
.mv-trim-neg, .mv-trim-pos { display: block; height: 100%; transition: width var(--dur) var(--ease); }
.mv-trim-neg { background: var(--blue, #0A84FF); } .mv-trim-pos { background: var(--accent); }
.mv-gear { font-size: 64px; }
/* g-ball */
.mv-gball { width: 220px; height: auto; }
.mv-gring { fill: none; stroke: var(--hairline); } .mv-gring.outer { stroke: var(--secondary); }
.mv-gaxis { stroke: var(--hairline); }
.mv-gtext { fill: var(--secondary); font-size: 9px; text-anchor: middle; font-family: inherit; } .mv-gtext.l { text-anchor: start; } .mv-gtext.r { text-anchor: end; }
.mv-gtrail circle { fill: var(--accent); opacity: .28; }
.mv-gdot { fill: var(--label); stroke: var(--accent); stroke-width: 3; transition: cx var(--dur) var(--ease), cy var(--dur) var(--ease); }
/* altitude */
.mv-altbox { grid-template-columns: 1fr minmax(200px, 260px); }
.mv-alt { width: 100%; height: 170px; display: block; }
.mv-alt-area { fill: color-mix(in srgb, var(--accent) 30%, transparent); stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.mv-alt-cur { stroke: var(--label); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.chart.h260 { height: 260px; } .chart.h200 { height: 200px; }

/* ---------- conditions: the satellites ---------- */
.cond-gnss { display: grid; gap: 7px; }
.cond-gnss-row { display: grid; grid-template-columns: minmax(150px, 220px) 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.cond-gnss-row.navic .cond-gnss-k { font-weight: 650; }
.cond-gnss-lede, .cond-gnss-at { font-size: 13px; margin: 4px 0 10px; }

/* ---------- export dialog ---------- */
.xd { display: grid; gap: 14px; min-width: 0; }
.modal:has(.xd) .modal-foot { position: sticky; bottom: calc(-1 * var(--inset, 20px)); background: var(--surface); margin: 16px calc(-1 * var(--inset, 20px)) calc(-1 * var(--inset, 20px)); padding: 12px var(--inset, 20px); border-top: 1px solid var(--hairline-soft); }
.xd-sec { display: grid; gap: 8px; }
.xd-k { font-size: var(--t-subhead); color: var(--label); font-weight: 600; }
.xd-row { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 4px 0; }
.xd-drives, .xd-list { max-height: 180px; overflow: auto; border: 1px solid var(--hairline-soft); border-radius: 10px; padding: 4px 10px; }
.xd-filter { width: 100%; }
.xd-est { background: var(--surface2); border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.xd-warn { color: var(--red); margin-top: 6px; }
.xd-status { font-size: 14px; min-height: 1.2em; }
.xd-track { font-size: 12px; }
.xd-save { display: flex; gap: 8px; } .xd-name { flex: 1; }
.xd-presets { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.xd-preset { display: inline-flex; align-items: center; border: 1px solid var(--hairline); border-radius: 999px; padding-right: 4px; }
.xd-x { border: 0; background: none; color: var(--secondary); cursor: pointer; font-size: 14px; padding: 0 4px; }

/* ---------- compare ---------- */
.cmp-card { margin-bottom: 16px; }
.cmp-setup { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; }
@media (max-width: 760px) { .cmp-setup { grid-template-columns: 1fr; } .cmp-vs { justify-self: center; } }
.cmp-pick { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: var(--surface2); }
.cmp-pick-body { display: grid; gap: 8px; flex: 1; min-width: 0; }
.cmp-pick-body .input { width: 100%; }
.cmp-letter { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; flex: none; }
.cmp-a .cmp-letter { background: var(--cmp-a); } .cmp-b .cmp-letter { background: var(--cmp-b); }
.cmp-vs { color: var(--secondary); font-weight: 600; }
.cmp-dash { margin-top: 14px; display: grid; gap: 8px; }
.cmp-dash-k { font-size: var(--t-subhead); color: var(--label); font-weight: 600; }
.cmp-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.cmp-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 10px; border-radius: 999px; background: var(--surface2); font-size: 13px; }
.cmp-chip-x { border: 0; background: none; color: var(--secondary); cursor: pointer; font-size: 14px; padding: 0 6px; }
.cmp-add { width: auto; height: 30px; }
.cmp-prices { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--secondary); }
.cmp-price-l { display: inline-flex; align-items: center; gap: 6px; }
.cmp-price-box { position: relative; display: inline-flex; align-items: center; }
.cmp-price { width: 128px; height: 32px; padding: 0 30px 0 24px; }
.cmp-price-pre, .cmp-price-post { position: absolute; color: var(--tertiary); pointer-events: none; font-size: var(--t-subhead); }
.cmp-price-pre { left: 10px; } .cmp-price-post { right: 10px; }
.cmp-tag { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; font-size: 11px; font-weight: 700; color: #fff; vertical-align: -3px; }
.cmp-tag.a { background: var(--cmp-a); } .cmp-tag.b { background: var(--cmp-b); }
.cmp-legend { display: flex; gap: 24px; flex-wrap: wrap; margin: 4px 0 12px; font-size: 15px; }
.cmp-simgrid { display: grid; grid-template-columns: 180px 1fr; gap: 24px; align-items: center; }
@media (max-width: 640px) { .cmp-simgrid { grid-template-columns: 1fr; } }
.cmp-ring { width: 170px; height: 170px; }
.cmp-profile { display: grid; gap: 7px; }
.cmp-prow { display: grid; grid-template-columns: minmax(130px, 200px) 1fr 44px 70px; gap: 10px; align-items: center; font-size: 13px; }
.cmp-ptrack { height: 10px; border-radius: 5px; background: var(--surface2); overflow: hidden; }
.cmp-ptrack i { display: block; height: 100%; border-radius: 5px; }
.cmp-ptrack i.good { background: var(--green); } .cmp-ptrack i.info { background: var(--blue, #0A84FF); } .cmp-ptrack i.warn { background: var(--orange, #FF9F0A); }
.cmp-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.cmp-kpi { background: var(--surface2); border-radius: 14px; padding: 12px 14px; display: grid; gap: 6px; }
.cmp-kpi-k { font-size: 12px; color: var(--secondary); }
.cmp-kpi-ab { display: grid; gap: 3px; font-size: 16px; }
.cmp-delta { font-size: 13px; color: var(--secondary); }
.cmp-delta.good { color: var(--green); } .cmp-delta.bad { color: var(--red); }
.cmp-hl { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 760px) { .cmp-hl { grid-template-columns: 1fr; } }
.cmp-h { font-size: 15px; margin: 0 0 8px; display: flex; align-items: center; gap: 6px; }
.cmp-ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; }
.cmp-gears { display: grid; gap: 10px; }
.cmp-grow { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: center; }
.cmp-gk { font-size: 13px; color: var(--secondary); }
.cmp-gbars { display: grid; gap: 4px; }
.cmp-gbar { display: grid; grid-template-columns: 18px 1fr 44px; gap: 8px; align-items: center; }
.cmp-gtrack { height: 10px; background: var(--surface2); border-radius: 5px; overflow: hidden; }
.cmp-gfill { display: block; height: 100%; border-radius: 5px; } .cmp-gfill.a { background: var(--cmp-a); } .cmp-gfill.b { background: var(--cmp-b); }
.cmp-gv { font-size: 12px; text-align: right; }
.cmp-acc { width: 100%; height: auto; display: block; }
.cmp-accbar.a { fill: var(--cmp-a); } .cmp-accbar.b { fill: var(--cmp-b); }
.cmp-zero { stroke: var(--secondary); stroke-dasharray: 3 3; }
.cmp-axis { fill: var(--secondary); font-size: 10px; text-anchor: middle; font-family: inherit; } .cmp-axis.l { text-anchor: start; } .cmp-axis.r { text-anchor: end; }
.cmp-accrow { font-size: 13px; margin-top: 6px; }
.cmp-mets { display: grid; gap: 4px; }
.cmp-mrow { display: grid; grid-template-columns: minmax(150px, 1.2fr) minmax(120px, 1fr) 60px minmax(140px, 1.3fr) 120px; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--hairline-soft); font-size: 14px; }
.cmp-mab { display: grid; gap: 2px; font-size: 13px; }
.cmp-shape { width: 100%; height: 44px; }
.cmp-line { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; } .cmp-line.a { stroke: var(--cmp-a); } .cmp-line.b { stroke: var(--cmp-b); }
@media (max-width: 760px) { .cmp-mrow { grid-template-columns: 1fr 1fr; } }
.cmp-foot { margin-top: 12px; }
.dd-prov .mv-facts { grid-template-columns: 1fr; gap: 10px; }
.dd-prov .mv-fact { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: baseline; }
.dd-prov .mv-fact dd { font-size: 15px; line-height: 1.45; }
@media (max-width: 640px) { .dd-prov .mv-fact { grid-template-columns: 1fr; gap: 2px; } }
/* the fleet card's link line is a quiet row that opens the sync details (2026-10-24) */
a.map-info-link { color: inherit; text-decoration: none; border-radius: 8px; padding: 6px 8px; margin: 6px -8px 0; }
a.map-info-link:hover { background: var(--surface2); }
.map-info-week { font-size: var(--t-subhead); margin-top: 10px; }
/* a term in the deep dive's facts, a tap from its plain meaning */
.dd-term-wrap { position: relative; display: inline; }
.dd-term { font: inherit; color: inherit; background: none; border: 0; padding: 0; text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }
.dd-term-pop { position: absolute; left: 0; top: calc(100% + 6px); z-index: 4; width: min(300px, 70vw); padding: 10px 12px; border-radius: 12px; background: var(--surface); color: var(--label); box-shadow: var(--shadow), 0 0 0 0.5px var(--hairline); font-size: var(--t-subhead); line-height: 1.4; }
.dd-term-pop[hidden] { display: none; }

/* ---------- our own chooser (picker.js): a searchable popover, a drawer on a phone ---------- */
.pk { position: relative; min-width: 0; }
.pk-btn { width: 100%; min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: var(--r-btn); border: 1px solid var(--hairline); background: var(--surface); color: var(--label); font: inherit; text-align: left; cursor: pointer; transition: border-color var(--dur-fast) var(--ease); }
.pk-btn:hover { border-color: var(--secondary); } .pk-btn[aria-expanded="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pk-face { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.pk-ph { color: var(--secondary); }
.pk-caret { width: 8px; height: 8px; border-right: 1.5px solid var(--secondary); border-bottom: 1.5px solid var(--secondary); transform: rotate(45deg) translateY(-2px); flex: none; }
.pk-glyph { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--surface2); display: grid; place-items: center; }
.pk-glyph .tg { width: 20px; height: 20px; }
.pk-text { min-width: 0; display: flex; flex-direction: column; }
.pk-title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-sub { font-size: var(--t-foot); color: var(--secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-meta { margin-left: auto; font-size: var(--t-subhead); color: var(--secondary); font-variant-numeric: tabular-nums; flex: none; }
.pk-pop { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: max(100%, 360px); max-height: min(60vh, 520px); display: flex; flex-direction: column; border-radius: 14px; background: var(--surface); box-shadow: 0 12px 40px rgba(0,0,0,.22), 0 0 0 0.5px var(--hairline); overflow: hidden; animation: pkIn var(--dur-fast) var(--ease) both; }
@keyframes pkIn { from { opacity: 0; transform: translateY(-4px); } }
.pk-search-wrap { padding: 10px; border-bottom: 1px solid var(--hairline-soft); }
.pk-search { width: 100%; height: 36px; border-radius: 10px; border: 0; background: var(--surface2); color: var(--label); padding: 0 12px; font: inherit; }
.pk-search:focus { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.pk-list { overflow: auto; padding: 4px 6px 8px; }
.pk-sec { font-size: var(--t-foot); color: var(--secondary); font-weight: 500; padding: 12px 10px 4px; }
.pk-row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 10px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.pk-row:hover, .pk-row.act { background: var(--surface2); }
.pk-row.on .pk-title { color: var(--accent); }
.pk-more { border: 0; background: none; color: var(--accent); font: inherit; font-size: var(--t-subhead); padding: 6px 10px; cursor: pointer; }
.pk-none { padding: 24px 12px; color: var(--secondary); text-align: center; }
.pk-back { position: fixed; inset: 0; background: rgba(0,0,0,.32); z-index: 60; }
.pk-pop.pk-sheet { position: fixed; z-index: 61; top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 82vh; border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom); animation: none; }
.cmp-pick-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
.cmp-add.pk { width: auto; } .cmp-add .pk-btn { min-height: 32px; border-style: dashed; padding: 4px 12px; } .cmp-add .pk-pop { width: 280px; }
.pk-glyph .tg .tg-body { fill: var(--secondary); } .pk-glyph .tg .tg-bar { stroke: var(--secondary); } .pk-glyph .tg .tg-glass { fill: var(--surface); }

/* the Reports collection card: a ring, one figure, five bars (2026-10-24) */
.cx { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 32px; align-items: center; padding: 4px 0; }
.cx-main { display: flex; align-items: center; gap: 20px; }
.cx-ring { width: 96px; height: 96px; flex: none; }
.cx-track { fill: none; stroke: var(--surface2); stroke-width: 9; }
.cx-arc { fill: none; stroke: var(--accent); stroke-width: 9; stroke-linecap: round; }
.cx-pct { fill: var(--label); font: 600 17px var(--font); }
.cx-big { font-size: 40px; font-weight: 600; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.cx-cap { color: var(--secondary); margin-top: 6px; }
.cx-foot { color: var(--tertiary); font-size: var(--t-foot); margin-top: 4px; }
.cx-few-h { font-size: var(--t-foot); color: var(--secondary); font-weight: 500; margin-bottom: 6px; }
.cx-row { display: grid; grid-template-columns: minmax(0, 46%) minmax(60px, 1fr) 72px; gap: 12px; align-items: center; padding: 5px 0; color: inherit; text-decoration: none; }
.cx-row:hover .cx-name { color: var(--accent); }
.cx-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-bar { height: 6px; border-radius: 3px; background: var(--surface2); overflow: hidden; }
.cx-bar-fill { display: block; height: 100%; border-radius: 3px; background: var(--secondary); }
.cx-bar-fill.low { background: var(--orange); }
.cx-n { text-align: right; font-size: var(--t-subhead); color: var(--secondary); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .cx { grid-template-columns: 1fr; gap: 20px; } }
/* one drive, its parts (session_groups): a quiet strip under the title */
.sx-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -4px 0 16px; }
.sx-strip[hidden] { display: none; }
.sx-strip-k { font-size: var(--t-foot); color: var(--secondary); margin-right: 4px; }
.sx-part { display: inline-flex; gap: 6px; align-items: baseline; padding: 5px 10px; border-radius: 999px; background: var(--surface2); color: inherit; text-decoration: none; font-size: var(--t-subhead); }
a.sx-part:hover { background: var(--hairline); }
.sx-part.on { box-shadow: inset 0 0 0 1.5px var(--accent); }
.sx-part-k { font-weight: 500; } .sx-part-v { color: var(--secondary); }
.sx-parts { font-size: var(--t-foot); }

/* Overview (2026-10-24): a short bar says how much of a drive's data points came in, or how many vehicles miss a point */
.ov-bar { flex: none; width: 72px; height: 6px; border-radius: 3px; background: var(--surface2); overflow: hidden; align-self: center; }
.ov-bar > i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--green); }
.ov-bar.warn > i { background: var(--orange); }
.ov-bar.none { opacity: .4; }
.sx-points { display: inline-flex; align-items: center; gap: 8px; }
.sx-evidence { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; }
.sx-evidence .sx-ok { color: var(--green); font-weight: 600; }
