/* GPS Leaders Operations Workspace: the Amber visual system on a full-bleed map. Daylight surfaces, navy brand, amber only
   as line, dot, focus, selected edge or primary button. Fonts are served from this origin (Jost and Public Sans, SIL
   Open Font License, the published variable woff2 files copied into web/fonts once); nothing is fetched elsewhere. */
@font-face { font-family: Jost; font-style: normal; font-weight: 100 900; font-display: swap; src: local("Jost"), url("fonts/jost.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 100 900; font-display: swap; src: local("Public Sans"), url("fonts/public-sans.woff2") format("woff2"); }
/* Shared semantic colours. Raw palette values are used only by token definitions. */
:root {
  --navy-0: #0B1220; --navy-1: #0F1A2E; --navy-2: #16233B; --navy-3: #22304A;
  --bone-0: #F4EFE4; --bone-1: #EAE3D4; --white: #FFFFFF;
  --ink-0: #1A2230; --ink-1: #5B6472; --ink-2: #626D7C;
  --amber: #F2A900; --amber-aa: #FFC44D; --amber-ink: #6E4B00;
  --focus: var(--amber); --focus-halo: var(--amber-tint); --signature: var(--amber);
  --accent-hover: var(--amber); --accent-pressed: #E6A800;
  color-scheme: light; --segment-selected: var(--surface);
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg' viewBox='0 0 24 24' fill='none' stroke='%235B6472' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --bg: #F4F5F7; --surface: var(--white); --surface-2: #F7F8FA; --surface-3: #EDF0F3; --field: var(--surface);
  --line: #E3E6EB; --line-strong: #C9CFD8; --control-line: #7D8795;
  --text: var(--ink-0); --text-2: var(--ink-1); --text-3: var(--ink-2); --amber-tint: #FFF3D3;
  --brand: var(--navy-1); --on-brand: var(--text); --on-brand-2: var(--text-2);
  --accent: var(--amber-aa); --on-accent: var(--amber-ink);
  --risk: #B42323; --risk-tint: #FDECEC; --warn-tint: #FFF4D6; --ok: #236548; --ok-tint: #E9F5EF;
  --map-land: #F5F6F7; --selected-edge: var(--amber); --map-line: var(--brand); --map-zone: var(--ok);
  --map-trail: var(--brand); --map-halo: var(--surface); --map-label: var(--text);
  --header-bg: var(--bg);
  --glass: rgba(255,255,255,.78); --glass-strong: rgba(255,255,255,.92); --glass-line: rgba(15,26,46,.10);
  --shadow-float: 0 10px 34px rgba(15,26,46,.14),0 2px 6px rgba(15,26,46,.06);
  --control-filter: invert(0);
  --shadow-card: 0 1px 2px rgba(15,26,46,.05),0 8px 24px rgba(15,26,46,.08); --shadow-pill: 0 4px 12px var(--shadow-color);
  --shadow-color: rgba(15,26,46,.10); --shadow-marker: 0 3px 9px var(--shadow-color);
  --shadow-login: 0 16px 48px rgba(15,26,46,.12); --shadow-sheet: 0 -12px 40px var(--shadow-color);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
  color-scheme: dark; --segment-selected: var(--surface-2);
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg' viewBox='0 0 24 24' fill='none' stroke='%23AEB8C6' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --bg: #0D0F12; --surface: #16191E; --surface-2: #1C2026; --surface-3: #262A31; --field: #1C2026;
  --line: #262B33; --line-strong: #39404A; --control-line: #78818D;
  --text: #EEF1F5; --text-2: #AEB8C6; --text-3: #9AA5B4; --amber-tint: #3A2E10;
  --brand: var(--navy-1); --on-brand: var(--text); --on-brand-2: var(--text-2);
  --accent: var(--amber-aa); --on-accent: var(--amber-ink);
  --risk: #FF8A8A; --risk-tint: #351E29; --warn-tint: #3A2E10; --ok: #7FD1A9; --ok-tint: #142F2A;
  --map-land: #14171B; --selected-edge: var(--accent); --map-line: var(--accent); --map-zone: var(--ok);
  --map-trail: var(--accent); --map-halo: var(--bg); --map-label: var(--text);
  --header-bg: var(--bg);
  --glass: rgba(26,29,34,.72); --glass-strong: rgba(32,36,42,.92); --glass-line: rgba(238,241,245,.10);
  --shadow-float: 0 12px 40px rgba(0,0,0,.45),0 2px 6px rgba(0,0,0,.3);
  --control-filter: invert(.9); --shadow-color: rgba(0,0,0,.45);
  --shadow-card: 0 1px 2px rgba(0,0,0,.4),0 8px 24px rgba(0,0,0,.35);
  --shadow-login: 0 16px 48px rgba(0,0,0,.5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark; --segment-selected: var(--surface-2);
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg' viewBox='0 0 24 24' fill='none' stroke='%23AEB8C6' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --bg: #0D0F12; --surface: #16191E; --surface-2: #1C2026; --surface-3: #262A31; --field: #1C2026;
  --line: #262B33; --line-strong: #39404A; --control-line: #78818D;
  --text: #EEF1F5; --text-2: #AEB8C6; --text-3: #9AA5B4; --amber-tint: #3A2E10;
  --brand: var(--navy-1); --on-brand: var(--text); --on-brand-2: var(--text-2);
  --accent: var(--amber-aa); --on-accent: var(--amber-ink);
  --risk: #FF8A8A; --risk-tint: #351E29; --warn-tint: #3A2E10; --ok: #7FD1A9; --ok-tint: #142F2A;
  --map-land: #14171B; --selected-edge: var(--accent); --map-line: var(--accent); --map-zone: var(--ok);
  --map-trail: var(--accent); --map-halo: var(--bg); --map-label: var(--text);
  --header-bg: var(--bg);
  --glass: rgba(26,29,34,.72); --glass-strong: rgba(32,36,42,.92); --glass-line: rgba(238,241,245,.10);
  --shadow-float: 0 12px 40px rgba(0,0,0,.45),0 2px 6px rgba(0,0,0,.3);
  --control-filter: invert(.9); --shadow-color: rgba(0,0,0,.45);
  --shadow-card: 0 1px 2px rgba(0,0,0,.4),0 8px 24px rgba(0,0,0,.35);
  --shadow-login: 0 16px 48px rgba(0,0,0,.5);
}
/* Explicit Light wins even on a device requesting dark. */
:root[data-theme="light"] {
  color-scheme: light; --segment-selected: var(--surface);
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg' viewBox='0 0 24 24' fill='none' stroke='%235B6472' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --bg: #F4F5F7; --surface: var(--white); --surface-2: #F7F8FA; --surface-3: #EDF0F3; --field: var(--surface);
  --line: #E3E6EB; --line-strong: #C9CFD8; --control-line: #7D8795;
  --text: var(--ink-0); --text-2: var(--ink-1); --text-3: var(--ink-2); --amber-tint: #FFF3D3;
  --brand: var(--navy-1); --on-brand: var(--text); --on-brand-2: var(--text-2);
  --accent: var(--amber-aa); --on-accent: var(--amber-ink);
  --risk: #B42323; --risk-tint: #FDECEC; --warn-tint: #FFF4D6; --ok: #236548; --ok-tint: #E9F5EF;
  --map-land: #F5F6F7; --selected-edge: var(--amber); --map-line: var(--brand); --map-zone: var(--ok);
  --map-trail: var(--brand); --map-halo: var(--surface); --map-label: var(--text);
  --header-bg: var(--bg);
  --glass: rgba(255,255,255,.78); --glass-strong: rgba(255,255,255,.92); --glass-line: rgba(15,26,46,.10);
  --shadow-float: 0 10px 34px rgba(15,26,46,.14),0 2px 6px rgba(15,26,46,.06);
  --control-filter: invert(0);
  --shadow-card: 0 1px 2px rgba(15,26,46,.05),0 8px 24px rgba(15,26,46,.08); --shadow-pill: 0 4px 12px var(--shadow-color);
  --shadow-color: rgba(15,26,46,.10); --shadow-marker: 0 3px 9px var(--shadow-color);
  --shadow-login: 0 16px 48px rgba(15,26,46,.12); --shadow-sheet: 0 -12px 40px var(--shadow-color);
}
:root {
  --font-head: Jost, "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --head-h: 60px; --tab-bar-h: 0px; --gap: 12px; --cluster-w: 380px; --rail-w: 64px; --card-w: 400px; --card-x-w: 460px;
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px; --radius: var(--r-lg);
  --sheet-h: 50vh;
  --t-fast: 120ms; --t-layout: 160ms; --t-enter: 220ms cubic-bezier(.2,.8,.2,1);
  --fs-display: 28px; --fs-title: 22px; --fs-heading: 17px; --fs-lead: 17px; --fs-body: 15px;
  --fs-row: 15px; --fs-secondary: 13px; --fs-meta: 12px; --fs-micro: 11px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; display: flex; flex-direction: column; background: var(--bg); color: var(--text); font: 15px/1.45 var(--font-body); overflow: hidden; }
h1, h2, h3, .brand h1, .login-brand b, .login-card h2, .insp-title, .status-line, .arow b, .panel-title, .count-strip, .card-state { font-family: var(--font-head); }
button, select, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
:focus-visible { outline: 2px solid var(--focus); box-shadow: 0 0 0 4px var(--focus-halo); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.mute { color: var(--text-2); }
.small { font-size: 13px; }
.warn { color: var(--text); }
.bad { color: var(--risk); }
.ok { color: var(--ok); }
code { font-size: 13px; color: var(--text-2); font-family: ui-monospace, Consolas, monospace; }
.grow { flex: 1; }
.num { font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } .mk:hover { transform: none !important; } }

/* ---- header: one quiet line ---- */
header.top { color: var(--on-brand); flex: none; height: var(--head-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 6px 16px; border-bottom: 1px solid var(--line); background: var(--header-bg); z-index: 9; }
.brand { display: flex; flex: 1; align-items: center; gap: 10px; min-width: 0; }
.brand > div { flex: 1; min-width: 0; }
.brand-mark { display: block; flex: none; width: 28px; height: 28px; color: inherit; --gl-sig: var(--signature); }
.mark-signature { fill: var(--signature); }
.gl-mark { display: block; width: 100%; height: 100%; flex: none; }
.symbol-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.gl { width: 20px; height: 20px; display: block; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.gl .fill { fill: currentColor; stroke: none; }
.brand h1 { font-size: 17px; margin: 0; font-weight: 600; line-height: 1.2; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand .sub { color: var(--text-3); font-weight: 500; font-size: 11px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status { display: flex; flex: none; gap: 8px; align-items: center; flex-wrap: nowrap; justify-content: flex-end; font-size: 12px; }
.live { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 12px; white-space: nowrap; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-tint); }
.live.reconnecting::before { background: transparent; border: 1.5px solid var(--accent); box-shadow: none; }
.tag { font-size: 11px; color: var(--text-2); border: 1px solid var(--signature); border-radius: 8px; padding: 3px 8px; white-space: nowrap; }
#synthetic-tag { letter-spacing: 0; text-transform: none; }
.link { background: none; border: 0; color: var(--text-2); text-decoration: none; min-height: 44px; padding: 0 6px; border-radius: var(--r-md); }

/* ---- controls: compact visuals retain the existing 44 px target floor ---- */
.tab { padding: 0 12px; min-height: 44px; border-radius: 999px; border: 1px solid var(--control-line); background: transparent; color: var(--text-2); font-size: 13px; font-weight: 500; white-space: nowrap; }
.tab.sel, .tab[aria-pressed="true"] { color: var(--text); border-color: var(--text); background: var(--surface-3); box-shadow: inset 0 -2px 0 var(--signature); }
.seg { display: inline-flex; background: var(--surface-3); border-radius: var(--r-md); padding: 3px; }
.seg button { min-height: 44px; padding: 0 14px; border: 0; border-radius: 10px; background: none; color: var(--text-2); }
.seg button[aria-pressed="true"] { background: var(--segment-selected); color: var(--text); font-weight: 600; box-shadow: var(--shadow-pill); }
.search { width: 100%; min-height: 44px; padding: 0 14px; background: var(--field); border: 1px solid var(--control-line); border-radius: 10px; margin: 8px 0; color: var(--text); }
.search::placeholder { color: var(--text-3); }
select { min-height: 44px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--control-line); background: var(--field); color: var(--text); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; max-width: 100%; padding: 10px 16px; border-radius: var(--r-md); border: 0; background: var(--surface-3); color: var(--text); text-align: center; font-size: 15px; font-weight: 600; text-decoration: none; transition: background var(--t-fast); }
.btn:hover:not(:disabled), .btn-tonal:hover:not(:disabled) { background: var(--line); }
.act { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: auto; min-width: 120px; min-height: 44px; padding: 10px 16px; border: 0; border-radius: var(--r-md); background: var(--surface-3); color: var(--text); text-align: center; font-size: 15px; font-weight: 600; margin: 8px 8px 0 0; transition: background var(--t-fast); }
.btn-tonal { background: var(--surface-3); color: var(--text); }
.btn-primary, .act.go { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover:not(:disabled), .act.go:hover:not(:disabled), .recovery-create:hover:not(:disabled), .command-button.go:hover:not(:disabled) { background: var(--accent-hover); }
.btn-primary:active:not(:disabled), .act.go:not(:disabled):active, .recovery-create:active:not(:disabled) { background: var(--accent-pressed); }
.btn-ghost, .link { background: transparent; color: var(--text-2); }
.btn-ghost:hover:not(:disabled), .link:hover:not(:disabled) { background: var(--surface-2); }
.btn-danger, .act.stop { background: transparent; border: 1px solid color-mix(in srgb, var(--risk) 40%, transparent); color: var(--risk); }
.btn.sm { min-height: 44px; padding: 6px 12px; font-size: 13px; }
.btn.pill { border-radius: 999px; }
.act.big { min-width: 44%; min-height: 60px; font-size: 18px; }
.btn[aria-busy="true"] { font-size: 0; }
.btn[aria-busy="true"]::after { content: "…"; font-size: 15px; animation: control-pulse 1s ease-in-out infinite; }
@keyframes control-pulse { 50% { opacity: .4; } }
.icon-btn { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--control-line); background: var(--surface-3); color: var(--text); font-size: 18px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn .gl { width: 18px; height: 18px; }
.icon-btn:hover { background: var(--surface-3); }
.pill { font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-2); white-space: nowrap; line-height: 1.5; }
.pill.fresh, .pill.available, .pill.connected, .pill.active, .pill.on { color: var(--ok); border-color: var(--line); background: var(--ok-tint); }
.pill.aging, .pill.busy, .pill.ringing, .pill.connecting { color: var(--text); border-color: var(--text-2); }
.pill.silent, .pill.dark, .pill.offline, .pill.unbound, .pill.off { color: var(--risk); border-color: var(--risk); }
.pill.never, .pill.ended { color: var(--text-2); }
.pill.unresolved { color: var(--text); border-color: var(--text); }
.pill.assigned { color: var(--ok); }
.pill.notice { color: var(--text-2); border-color: var(--text-2); }
.pill.warning { border-color: var(--on-accent); background: var(--accent); color: var(--on-accent); }
.pill.suspended, .pill.critical { color: var(--risk); border-color: var(--risk); background: var(--risk-tint); }
.pills { display: flex; gap: 4px; flex-wrap: wrap; }
.row { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 15px; }
.kv .sub { grid-column: 1 / -1; color: var(--text-2); font-size: 13px; margin-top: -4px; overflow-wrap: anywhere; }
.ev { font-size: 14px; padding: 8px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.ev:first-of-type { border-top: none; }
.ev b { color: var(--text); }
.flags span { margin-left: 6px; color: var(--text); font-size: 12px; }
.status-line { font-size: 22px; font-weight: 600; margin: 4px 0; }
.center { max-width: 560px; margin: 24px auto; padding: 0 16px; }
.card-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 20px; margin-top: 10px; }
.card-block h3 { margin: 0 0 12px; font: 600 17px/1.3 var(--font-head); color: var(--text); }
.empty { padding: 16px 8px; color: var(--text-2); }
.banner { border: 0; border-left: 3px solid var(--risk); color: var(--text); background: var(--risk-tint); border-radius: 12px; padding: 10px 12px; margin: 8px 0; font-size: 14px; }
.banner button { margin-left: 8px; }
.meter { display: inline-block; width: 120px; height: 10px; border: 1px solid var(--control-line); border-radius: 6px; vertical-align: middle; overflow: hidden; background: var(--surface); }
.meter i { display: block; height: 100%; background: var(--ok); width: 0; }
.callbar { position: fixed; left: 0; right: 0; bottom: var(--tab-bar-h); background: var(--surface); border-top: 2px solid var(--accent); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; z-index: 8; }
details > summary { cursor: pointer; color: var(--text-2); font-size: 13px; min-height: 44px; display: flex; align-items: center; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "▸"; display: inline-block; width: 14px; color: var(--text); }
details[open] > summary::before { content: "▾"; }

/* ---- login: one shared column, a floating card only on desktop ---- */
#login, .password-page main { flex: 1; min-height: 0; overflow: auto; display: grid; place-items: center; padding: 24px max(16px, env(safe-area-inset-right)) 24px max(16px, env(safe-area-inset-left)); background: var(--bg); }
.login-card { width: 100%; max-width: 400px; margin: auto; display: grid; gap: 16px; background: var(--surface); color: var(--text); border: 0; border-radius: var(--r-xl); padding: 32px; box-shadow: var(--shadow-login); overflow-wrap: anywhere; }
.login-card .login-brand { display: flex; align-items: center; gap: 12px; }
.login-card .brand-mark { width: 44px; height: 44px; color: inherit; --gl-sig: var(--signature); }
.login-card .login-brand b { font: 600 17px/1.2 var(--font-head); color: var(--text); }
.login-card h2 { margin: 0; font: 600 28px/1.15 var(--font-head); }
.login-card p { margin: 0; color: var(--text-2); font-size: 15px; }
.login-card code { color: var(--text); background: var(--surface-3); padding: 1px 5px; border-radius: 4px; }
.login-card form { display: grid; gap: 16px; min-width: 0; }
.login-card .primary { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; padding: 10px 12px; border-radius: var(--r-md); border: 0; background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: 15px; }
.login-card .primary:hover:not(:disabled) { background: var(--accent-hover); }
.login-card .primary:active:not(:disabled) { background: var(--accent-pressed); }
.login-links { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--text-2); }
.login-card .login-links a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.login-card .login-links .link { font-size: inherit; }
.login-card .login-foot, .login-card .foot { display: grid; gap: 4px; margin-top: 8px; font-size: 12px; color: var(--text-3); }
.login-card .login-foot p { font-size: inherit; color: inherit; }
.login-card .login-foot a, .login-card .signin-staff { color: inherit; }
.login-card .warn { color: var(--risk); }
#terminal { flex: 1; overflow: auto; }

/* ---- Windshield: a docked instrument cluster beside a full-bleed map ---- */
main#workspace { flex: 1; position: relative; min-height: 0; overflow: hidden; background: var(--surface); }
.map-canvas { position: absolute; inset: 0; }
.map-canvas .maplibregl-canvas:focus-visible { outline-offset: -3px; }
.map-notice { position: absolute; left: 50%; transform: translateX(-50%); bottom: 68px; max-width: min(520px, calc(100% - 24px)); background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--r-md); padding: 10px 14px; font-size: 13px; color: var(--text-2); z-index: 3; box-shadow: var(--shadow-card); }
.map-tools { position: absolute; left: calc(var(--rail-w) + 16px); bottom: 16px; display: flex; gap: 6px; z-index: 5; transition: left var(--t-layout) ease-out; }
body[data-list="open"] .map-tools { left: calc(var(--cluster-w) + 16px); }
.tool { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; box-shadow: var(--shadow-pill); }
.tool:hover:not(:disabled) { border-color: var(--text-2); }
.tool[aria-pressed="true"], .tool[aria-expanded="true"] { border-color: var(--text); }
.tool .gl { width: 18px; height: 18px; color: var(--text-2); }
.key-pop { position: absolute; left: 0; bottom: 52px; width: 280px; max-height: calc(100dvh - var(--head-h) - var(--tab-bar-h) - 100px); overflow-y: auto; padding: 10px 12px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); box-shadow: var(--shadow-card); color: var(--text); }
.key-row { display: grid; grid-template-columns: 76px 1fr; align-items: center; min-height: 84px; gap: 10px; font-size: 13px; }
.key-row .mk { pointer-events: none; justify-self: center; }
.key-row .stack-count { display: block; }
.key-row .att::after { display: none; }
.key-foot { margin: 8px 0 0; padding-top: 9px; border-top: 1px solid var(--line); color: var(--text-2); font-size: 12px; line-height: 1.4; }

/* MapLibre geometry stays vendor-owned; only its surfaces use the Platform palette. */
.map-canvas .maplibregl-ctrl-group { background: var(--surface); border: 1px solid var(--control-line); border-radius: var(--r-md); box-shadow: var(--shadow-pill); }
.map-canvas .maplibregl-ctrl-group button { width: 44px; height: 44px; }
.map-canvas .maplibregl-ctrl-group button + button { border-top-color: var(--control-line); }
.map-canvas .maplibregl-ctrl button .maplibregl-ctrl-icon { filter: var(--control-filter); }
.map-canvas .maplibregl-ctrl-attrib { background: var(--surface); color: var(--text-2); font: 11px/1.4 var(--font-body); }
.map-canvas .maplibregl-ctrl-attrib a { color: var(--text-2); }
.map-canvas .maplibregl-ctrl-scale { background: var(--surface); color: var(--text-2); border-color: var(--text-2); font: 11px/1.3 var(--font-body); }

/* One tile language carries kind, position freshness, attention and capability across every surface. */
.tile { position: relative; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-3); color: var(--text); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.tile .gl { width: 20px; height: 20px; }
.tile.severity-urgent { background: var(--risk-tint); color: var(--risk); }
.tile.severity-attention { background: var(--warn-tint); color: var(--text); }
.tile.severity-calm { background: var(--surface-3); color: var(--text-2); }
.tile[data-state="fresh"] { border: 2px solid var(--ok); }
.tile[data-state="aging"] { border: 2px solid var(--text); }
.tile[data-state="silent"] { border: 2px dashed var(--risk); }
.tile[data-state="dark"] { border: 2px dotted var(--risk); opacity: .72; }
.tile[data-state="never"] { opacity: .62; }
.tile .att { display: none; position: absolute; right: -4px; top: -4px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); border: 1.5px solid var(--surface); }
.tile.attn .att { display: block; }
.tile .cap { position: absolute; right: -4px; bottom: -4px; width: 15px; height: 15px; border-radius: 5px; background: var(--surface); color: var(--text); display: flex; align-items: center; justify-content: center; border: 1px solid var(--control-line); }
.tile .cap .gl { width: 10px; height: 10px; }
.stack-count { display: none; position: absolute; right: -5px; bottom: -5px; min-width: 22px; height: 22px; padding: 0 4px; border-radius: 11px; background: var(--surface-3); color: var(--text); border: 1px solid var(--surface); font: 700 13px/20px var(--font-body); text-align: center; }

/* The measured-position puck is the tile translated onto the map. */
.mk { --label-clearance: 26px; width: 30px; height: 30px; border: 0; background: none; padding: 0; margin: 0; cursor: pointer; border-radius: 50%; }
.mk .puck { width: 30px; height: 30px; border-radius: 50%; background: var(--surface); border: 2px solid var(--text); color: var(--text); box-shadow: var(--shadow-marker); display: flex; align-items: center; justify-content: center; position: relative; transition: transform var(--t-fast) ease-out; }
.mk .puck .gl { width: 16px; height: 16px; }
.mk[data-state="fresh"] .puck { border-color: var(--ok); }
.mk[data-state="aging"] .puck { border-color: var(--text); }
.mk[data-state="silent"] .puck { border-style: dashed; border-color: var(--risk); }
.mk[data-state="dark"] .puck { border-style: dotted; border-color: var(--risk); opacity: .72; }
.mk:hover .puck { transform: scale(1.1); }
.mk .att { display: none; position: absolute; right: -4px; top: -4px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); border: 1.5px solid var(--surface); }
.mk.attn .att { display: block; }
.mk.attn:not(.sel) .att::after { content: ""; position: absolute; inset: -3px; border: 1px solid var(--accent); border-radius: 50%; pointer-events: none; animation: attention-ping 2s ease-out infinite; }
@keyframes attention-ping { from { transform: scale(1); opacity: .35; } to { transform: scale(3); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .mk .att::after { animation: none; display: none; } }
.mk .hd { position: absolute; inset: -7px; pointer-events: none; transform-origin: center; }
.mk .hd::before { content: ""; position: absolute; left: 50%; top: 0; width: 0; height: 0; margin-left: -3px; border-left: 3px solid transparent; border-right: 3px solid transparent; border-bottom: 6px solid var(--text); }
.mk::before { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2.5px solid var(--accent); opacity: 0; }
.mk.sel { width: 36px; height: 36px; }
.mk.sel .puck { width: 36px; height: 36px; margin: -3px; }
.mk.sel::before, .mk:focus-visible::before { opacity: 1; }
.mk:focus-visible { outline: none; }
.mk.stack .stack-count { display: block; }
.mk.stack { --label-clearance: 42px; width: 44px; height: 44px; }
.mk.stack .puck { width: 36px; height: 36px; margin: 4px; }
.marker-label { position: absolute; left: calc(50% + var(--label-clearance)); top: 50%; transform: translateY(-50%); display: block; width: max-content; max-width: 180px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; pointer-events: none; color: var(--map-label); font: 500 13px/18px var(--font-body); text-shadow: 0 0 2px var(--map-halo), 0 0 4px var(--map-halo), 0 0 6px var(--map-halo); }
.mk.label-below .marker-label { left: 50%; top: calc(50% + var(--label-clearance)); transform: translateX(-50%); }

/* Enlarged art, halo and ping share the measured anchor; labels follow their marker outside the rotated body. */
.mk:has(.vehicle-puck) { --vehicle-size: 76px; --label-clearance: 50px; width: var(--vehicle-size); height: var(--vehicle-size); }
.mk .puck.vehicle-puck { border: 0; background: none; box-shadow: none; opacity: 1; width: var(--vehicle-size); height: var(--vehicle-size); margin: 0; }
.vehicle-top { flex: none; width: var(--vehicle-size); height: var(--vehicle-size); overflow: visible; }
.vehicle-puck .att { width: 14px; height: 14px; right: calc(50% - 7px); top: 2px; border-width: 2px; }
.vehicle-puck .att::after { inset: -5px; border-width: 1.6px; }
.vehicle-shadow { fill: var(--shadow-color); filter: blur(2.5px); }
.vehicle-body { opacity: 1; filter: none; }
.vehicle-halo { fill: none; stroke: none; stroke-width: 2; }
.vehicle-top.attention .vehicle-halo { fill: var(--accent); fill-opacity: .18; stroke: var(--accent); }
.vehicle-top.urgent .vehicle-halo { fill: var(--risk); fill-opacity: .16; stroke: var(--risk); }
.vehicle-top.silent .vehicle-halo, .vehicle-top.dark .vehicle-halo { fill: none; stroke: var(--text-2); stroke-dasharray: 4 4; }
.vehicle-top.silent .vehicle-body { opacity: .8; filter: grayscale(.5); }
.vehicle-top.dark .vehicle-body { opacity: .6; filter: grayscale(.8); }
.mk.stack.with-vehicle { --label-clearance: 50px; }
.mk.stack.with-vehicle .puck { border: 0; background: none; box-shadow: none; opacity: 1; }
.mk.stack.with-vehicle .gl, .mk.stack.with-vehicle .att { display: none; }
.mk.stack.with-vehicle .stack-count { right: -20px; bottom: -20px; }
.mk .att.urgent { background: var(--risk); }
.mk .att.urgent::after { border-color: var(--risk); }
@media (max-width: 899px) {
  .mk:has(.vehicle-puck) { --vehicle-size: 64px; --label-clearance: 44px; }
  .mk.stack.with-vehicle { --label-clearance: 44px; }
  .key-row { grid-template-columns: 64px 1fr; min-height: 72px; }
}

/* Fixed instrument cluster. */
.sheet { display: contents; }
.sheet-handle, .sheet-peek { display: none; }
.panel { position: absolute; inset: 0 auto 0 0; width: var(--cluster-w); max-width: calc(100% - 88px); background: var(--surface); border: 0; border-right: 1px solid var(--line); border-radius: 0; box-shadow: none; display: flex; flex-direction: column; z-index: 4; transition: width var(--t-layout) ease-out; }
body[data-list="closed"] .panel { display: none; }
.panel-head { padding: 16px 16px 12px; border-bottom: 1px solid var(--line); }
.panel-title-row { display: flex; align-items: center; gap: 8px; }
.panel-title { font-size: 20px; line-height: 1.2; font-weight: 600; margin: 0; flex: none; }
#list-count { flex: 1; min-width: 0; font: 500 20px/1.2 var(--font-head); color: var(--text-2); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 10px; }
.chips button { font-weight: 500; min-height: 44px; padding: 0 11px; border: 1px solid var(--control-line); border-radius: 999px; background: transparent; color: var(--text-2); display: inline-flex; align-items: center; gap: 5px; font-size: 13px; }
.chips button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); border-color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.chips button i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.chips .n { font-weight: 500; font-variant-numeric: tabular-nums; }
.search-wrap { position: relative; display: block; }
.search-wrap > .gl { position: absolute; left: 12px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: var(--text-2); pointer-events: none; }
.search-wrap .search { margin: 0; padding-left: 39px; border-radius: var(--r-sm); }
.panel-body { flex: 1; min-height: 0; overflow: auto; padding: 0 8px 8px; scrollbar-color: var(--line) transparent; }
.panel-foot { padding: 10px 16px 12px; min-height: 40px; border-top: 1px solid var(--line); color: var(--text-2); font-size: 12px; display: flex; align-items: center; gap: 7px; }
.panel-foot .feed-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; }
.panel-foot.stale .feed-dot { background: transparent; border: 1.5px solid var(--accent); }
.group-head { position: sticky; top: 0; z-index: 2; width: 100%; min-height: 44px; padding: 0 8px; border: 0; border-bottom: 1px solid var(--line); background: var(--glass-strong); color: var(--text-2); display: flex; align-items: center; gap: 7px; text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.group-head .signal { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.group-head .gl { width: 15px; height: 15px; margin-left: auto; transition: transform var(--t-fast); }
.group-head[aria-expanded="false"] .gl { transform: rotate(-90deg); }
.arow { position: relative; width: 100%; min-height: 64px; margin-top: 4px; padding: 10px 12px; border: 0; border-radius: var(--r-md); background: transparent; color: var(--text); display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-rows: auto auto auto; column-gap: 12px; row-gap: 2px; text-align: left; }
.arow:hover { background: var(--surface-3); }
.arow[aria-pressed="true"] { background: var(--surface-3); }
.arow[aria-pressed="true"]::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--selected-edge); }
.arow .tile { grid-row: 1 / 4; grid-column: 1; align-self: start; }
.arow .asset-name { grid-column: 2; font-family: var(--font-body); font-size: 15px; font-weight: 600; line-height: 1.25; color: var(--text); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.arow .stamp { grid-column: 3; grid-row: 1; color: var(--text-2); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.arow .m { grid-column: 2 / 4; color: var(--text-2); font-size: 13px; line-height: 1.35; }
.reason-label { display: inline-flex; align-items: center; gap: 4px; }
.reason-label .gl { width: 14px; height: 14px; }
.arow .look { grid-column: 2 / 4; color: var(--text); font-size: 13px; font-weight: 500; line-height: 1.35; }
.card-look li::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 1px; }
.skeleton-row { min-height: 64px; margin-top: 4px; border-radius: var(--r-md); background: linear-gradient(90deg, var(--surface), var(--surface-3), var(--surface)); background-size: 200% 100%; animation: skeleton 1.2s ease-in-out infinite; opacity: .7; }
@keyframes skeleton { 50% { background-position: -100% 0; opacity: .9; } }

/* The collapsed cluster is still the same instruments, folded to a 64 px rail. */
.rail { position: absolute; inset: 0 auto 0 0; width: var(--rail-w); background: var(--surface); border-right: 1px solid var(--line); z-index: 4; display: flex; flex-direction: column; align-items: center; }
.rail-open { width: 64px; min-height: 68px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--text); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.rail-open .gl { color: var(--text); }
.rail-open b { color: var(--text-2); font: 500 11px/1 var(--font-body); }
.rail-list { width: 100%; flex: 1; min-height: 0; padding: 10px 0; overflow: auto; display: flex; flex-direction: column; align-items: center; gap: 8px; scrollbar-width: none; }
.rail-list::-webkit-scrollbar { display: none; }
.rail-item { width: 44px; height: 44px; padding: 4px; border: 0; background: none; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; }
.rail-item[aria-pressed="true"] .tile { outline: 2px solid var(--accent); box-shadow: 0 0 0 4px var(--on-accent); outline-offset: 2px; }
.rail-break { width: 36px; border-top: 1px solid var(--line); margin: 2px 0; }

/* Heads-up asset card: one card, four non-modal states. */
.card { position: absolute; top: var(--gap); right: var(--gap); width: var(--card-w); max-width: calc(100% - var(--gap) * 2); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-card); z-index: 6; display: flex; flex-direction: column; overflow: hidden; transition: width var(--t-layout) ease-out, height var(--t-layout) ease-out, opacity var(--t-fast); }
.card[data-card="min"] { height: 56px; }
.card[data-card="compact"] { max-height: min(380px, calc(100% - var(--gap) * 2)); }
.card[data-card="expanded"] { width: var(--card-x-w); max-width: calc(100% - var(--gap) * 2); bottom: var(--gap); }
#inspector { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; min-height: 60px; flex: none; }
.card-head .back { display: none; }
.card-head > .tile { width: 40px; height: 40px; }
.card-head > .tile .gl { width: 22px; height: 22px; }
.card-head .titles { flex: 1; min-width: 0; }
.insp-title { font-size: 18px; font-weight: 600; margin: 0; line-height: 1.2; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-head .kind { color: var(--text-2); font-size: 12px; line-height: 1.3; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-head .brief { color: var(--text-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: none; }
.card[data-card="min"] .card-head { min-height: 56px; padding-top: 6px; padding-bottom: 6px; }
.card[data-card="min"] .card-head > .tile { width: 28px; height: 28px; border-radius: 8px; }
.card[data-card="min"] .card-head > .tile .gl { width: 16px; height: 16px; }
.card[data-card="min"] .insp-title { white-space: nowrap; display: block; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
.card[data-card="min"] .kind { display: none; }
.card[data-card="min"] .brief { display: block; }
.card-actions { display: flex; gap: 4px; flex: none; }
.card-body { flex: 1; min-height: 0; overflow: auto; padding: 2px 16px 16px; }
.card[data-card="min"] .card-body { display: none; }
/* The selected vehicle leads with a quiet summary; detailed reports stay below its action row. */
.vehicle-summary { flex: none; background: transparent; padding-bottom: 12px; }
.vehicle-summary .card-head { gap: 8px; padding-top: 12px; }
.vehicle-summary .card-head .back, .vehicle-summary .kind, .vehicle-summary .brief { display: none; }
.vehicle-summary .card-head .titles { order: 0; }
.vehicle-silhouette { order: 1; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; color: var(--text-2); flex: none; }
.vehicle-silhouette .gl { width: 28px; height: 28px; }
.vehicle-summary .card-actions { order: 2; }
.vehicle-summary .card-actions [aria-label="Expand"], .vehicle-summary .card-actions [aria-label="Shrink"] { display: none; }
.vehicle-summary .insp-title { font-size: 28px; font-weight: 500; }
.vehicle-overview { padding: 0 16px; }
.vehicle-headline { margin: 0; font-size: 16px; line-height: 1.35; }
.vehicle-last-seen { margin: 4px 0 12px; color: var(--text-2); font-size: 14px; }
.summary-actions { display: flex; justify-content: space-between; gap: 4px; }
.summary-action { flex: 1; min-width: 0; min-height: 48px; border: 0; padding: 0; background: none; color: var(--text); text-decoration: none; font-size: 12px; line-height: 1.3; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.action-puck { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: var(--surface-3); color: var(--text); flex: none; }
.action-puck .gl { width: 22px; height: 22px; }
.summary-action .action-qualifier { margin-top: -2px; color: var(--text-3); font-size: 11px; }
.summary-action:hover .action-puck { outline: 1px solid var(--text-2); }
.card[data-card="min"] .vehicle-overview { display: none; }
.card-state { font-size: 22px; font-weight: 600; margin: 0 0 2px; line-height: 1.2; }
.card-where { color: var(--text-2); font-size: 14px; margin: 0 0 8px; }
.card-look { margin: 0 0 4px; padding: 0; list-style: none; font-size: 14px; }
.card-look li { margin: 3px 0; }
.card-look.none { color: var(--text-2); }
.readouts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.readout { min-width: 0; }
.readout small { display: block; color: var(--text-2); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.readout b { display: block; margin-top: 2px; color: var(--text); font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.readout-lone { margin: 12px 0 2px; color: var(--text-2); font-size: 13px; }
.card-cta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.card-cta .act { margin: 0; min-width: auto; flex: 1 1 auto; text-align: center; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.card-cta .act .gl { width: 16px; height: 16px; }
.sections { margin-top: 16px; border-top: 1px solid var(--line); }
.sections > details { border-bottom: 1px solid var(--line); }
.sections > details > summary { min-height: 48px; padding: 0 2px; font-family: var(--font-head); font-size: 15px; font-weight: 500; color: var(--text); display: flex; align-items: center; gap: 10px; }
.sections > details > summary::before { display: none; }
.sections > details > summary .section-icon { width: 18px; height: 18px; color: var(--text-2); }
.sections > details > summary .section-label { flex: 1; }
.sections > details > summary .section-chevron { width: 16px; height: 16px; color: var(--text-2); transition: transform var(--t-fast); }
.sections > details[open] > summary .section-chevron { transform: rotate(180deg); }
.sections > details > .body { padding: 2px 0 14px; }
.window-chips { display: inline-flex; flex: none; gap: 2px; padding: 2px; border-radius: 999px; background: var(--surface-3); }
.window-chips button { min-width: 44px; min-height: 44px; padding: 0 9px; border: 0; border-radius: 999px; background: transparent; color: var(--text-2); font-size: 12px; font-weight: 600; }
.window-chips button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.journey-item { border-top: 1px solid var(--line); }
.journey-item:first-of-type { border-top: 0; }
.journey-row { width: 100%; min-height: 44px; padding: 10px 2px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--text); display: flex; align-items: center; gap: 8px; text-align: left; }
.journey-row:hover, .journey-row[aria-pressed="true"] { background: var(--surface-3); }
.journey-row[aria-pressed="true"] { box-shadow: inset 3px 0 0 var(--accent); }
.journey-copy { flex: 1; min-width: 0; display: grid; gap: 2px; }
.journey-copy b { font-weight: 600; }
.journey-copy > span, .journey-suffix, .journey-note { color: var(--text-2); font-size: 12px; }
.journey-note { display: block; }
.journey-suffix { flex: none; white-space: nowrap; }
.conflict-chip { flex: none; max-width: 120px; padding: 2px 7px; border: 1px solid var(--accent); border-radius: 999px; color: var(--text); font-size: 11px; line-height: 1.25; text-align: center; }
.event-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; }
.event-row time { color: var(--text-2); font-size: 12px; white-space: nowrap; }
.event-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-2); }
.event-dot.risk { background: var(--risk); }
.event-dot.ok { background: var(--ok); }
.journey-evidence { margin: 0 2px 6px 20px; }
.journey-evidence > summary { min-height: 44px; font-size: 12px; }
.journey-evidence-body { padding: 0 0 10px 14px; color: var(--text-2); font-size: 12px; overflow-wrap: anywhere; }
.health-distinction { margin: 0 0 12px; color: var(--text-2); font-size: 13px; }
.health-block + .health-block { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.health-block h4 { margin: 0 0 7px; font: 600 13px/1.3 var(--font-head); color: var(--text); }
.health-device { display: grid; gap: 5px; padding: 10px 0; border-top: 1px solid var(--line); color: var(--text-2); font-size: 13px; }
.health-device:first-of-type { border-top: 0; }
.health-device-head { display: flex; align-items: center; gap: 8px; color: var(--text); overflow-wrap: anywhere; }
.health-device-head .gl { width: 20px; height: 20px; color: var(--text); }
.vehicle-health { display: grid; gap: 7px; color: var(--text-2); font-size: 13px; }
.attn-item { display: grid; grid-template-columns: 1fr; gap: 3px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 15px; }
.attn-item:first-of-type { border-top: none; }
.attn-item .m { color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.attn-item .journey-evidence { margin: 0; }
.attn-item .journey-evidence-body { padding-left: 0; }
.device-head { display: flex; gap: 9px; align-items: center; }
.device-head .gl { width: 20px; height: 20px; color: var(--text); }
.trail-list { max-height: 180px; overflow: auto; font-size: 13px; color: var(--text-2); border-top: 1px solid var(--line); margin-top: 8px; padding-top: 6px; }
.tabs { display: flex; gap: 6px; margin: 8px 0; flex-wrap: wrap; align-items: center; }

/* ---- Today: the same surfaces, one scrolling page and server-filed queues ---- */
.view-nav { flex: none; }
.view-nav .gl { display: none; }
main#morning { flex: 1; min-height: 0; min-width: 0; overflow: auto; overflow-x: hidden; scrollbar-color: var(--line) transparent; }
.morning-shell { overflow-wrap: anywhere; }
.morning-head p { margin: 8px 0; }
.morning-tenant { margin-top: 20px; scroll-margin-top: 16px; }
.morning-tenant h3 { margin: 0 0 8px; font: 600 20px/1.2 var(--font-head); }
.morning-tenant > p { margin: 0 0 12px; }
.morning-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
.morning-card { min-width: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.morning-card > summary { min-height: 48px; padding: 16px 20px; gap: 8px; color: var(--text); font: 600 17px/1.3 var(--font-head); }
.morning-card > summary > span { flex: 1; min-width: 0; }
.morning-card > summary > b { font: 600 17px/1.3 var(--font-head); font-variant-numeric: tabular-nums; }
.morning-card > summary > small { color: var(--text-2); font: 13px/1.3 var(--font-body); }
.morning-card-body { padding: 0 20px 16px; }
.morning-card-body > p { margin: 8px 2px; }
.morning-unit { display: flex; align-items: flex-start; gap: 10px; width: 100%; min-width: 0; min-height: 44px; padding: 12px 2px; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--text); text-align: left; }
button.morning-unit:hover { background: var(--surface-3); }
.morning-copy { display: grid; flex: 1; min-width: 0; gap: 4px; font-size: 14px; }
.morning-copy b { font-weight: 600; }
.morning-copy > span, .morning-copy > small { color: var(--text-2); }
.morning-copy > small { font-size: inherit; line-height: inherit; display: block; }
.morning-chevron { flex: none; color: var(--text); font-size: 24px; line-height: 1.2; }
.morning-transfer { position: relative; font-size: 14px; }
.morning-transfer + .morning-transfer::before,
.morning-row + .morning-transfer::before,
.morning-transfer + .morning-row::before { content: ""; position: absolute; top: 0; left: 64px; right: 0; height: 1px; background: var(--line); }
.morning-title-link { min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--text); text-align: left; font-weight: 600; }
.morning-title-link > span { color: var(--text); }
.morning-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.morning-actions .act { min-width: 44px; min-height: 44px; margin: 0; }
.morning-field { display: grid; min-width: 0; gap: 6px; margin: 12px 0; color: var(--text-2); font-size: 13px; }
.morning-request { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.morning-request h4, .morning-history-side h4, .ownership-facts h4 { margin: 6px 0; font: 600 15px/1.3 var(--font-head); }
.morning-checkbox { display: flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 8px; }
.morning-checkbox input { flex: none; width: 22px; height: 22px; accent-color: var(--text); }
.morning-match { margin-top: 12px; padding: 10px; border-radius: var(--r-sm); background: var(--surface-3); font-size: 14px; }
.morning-history { margin-top: 16px; }
.morning-history-side + .morning-history-side { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.morning-chips { margin: 16px 0; }
.morning-foot { margin-top: 20px; padding-left: 0; padding-right: 0; }
.morning-empty { margin: 16px 0; color: var(--text-2); }
.today-summary { font-size: var(--fs-lead); line-height: 1.45; }
.today-section { margin-top: 24px; }
.today-section .group-title .row-meta { display: inline; margin-left: 4px; font: 400 var(--fs-secondary)/1.4 var(--font-body); }
/* A stretched primary button keeps the row clickable without nesting interactive controls. */
.morning-row.row-item { align-items: start; }
.morning-row > .morning-unit { position: absolute; inset: 0; width: 100%; height: 100%; min-width: 0; min-height: 44px; padding: 0; border: 0; border-radius: 0; background: transparent; }
.morning-row > .morning-unit:hover { background: transparent; }
.morning-row > .morning-unit:focus-visible { outline-offset: -3px; }
.morning-row:has(> .morning-unit:active) { background: var(--surface-3); box-shadow: inset 3px 0 0 var(--selected-edge); }
.morning-row > .tile, .morning-row > .row-copy, .morning-row > .row-end { position: relative; pointer-events: none; }
.morning-row .morning-copy { gap: 2px; }
.morning-vin { font: inherit; white-space: nowrap; }
.morning-vin:empty { display: none; }
.morning-details { position: relative; margin: 0; font-size: 13px; color: var(--text-2); pointer-events: auto; }
.morning-details > summary { min-height: 44px; width: fit-content; max-width: 100%; justify-content: flex-start; }
.morning-details > summary::before { display: none; }
.morning-details .chip { display: inline-flex; align-items: center; gap: 4px; }
.morning-details .chip .gl { width: 12px; height: 12px; }
.morning-details[open] > summary .gl { transform: rotate(180deg); }
.morning-detail-body { padding: 4px 0 8px; overflow-wrap: anywhere; }
.morning-detail-body > span, .morning-detail-body > small { display: block; margin: 4px 0 8px; }
.morning-detail-body > small { font-size: 12px; }
.morning-request-disclosure > summary, .today-settings > summary { min-height: 44px; }
.morning-request-disclosure, .today-settings { margin-top: 24px; }
.morning-history.card-block { padding: 0; }
.today-clear, .morning-unknown { color: var(--text-2); font-size: 13px; line-height: 1.6; }
.morning-unknown { margin: 8px 16px 16px; }
.dealer-facts p { margin: 8px 0; font-size: 14px; }
.ownership-facts { overflow-wrap: anywhere; }
@media (min-width: 761px) {
  .morning-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Rental additions are scoped so existing dealer, lender and staff surfaces retain their layout. */
.rental-help { display: inline-flex; align-items: center; min-height: 44px; padding: 4px 0; color: var(--text-2); text-underline-offset: 3px; }
.rental-card > summary { flex-wrap: wrap; }
.rental-card > summary > small { flex: 1 1 100%; padding-left: 22px; }
.rental-rule-state { font-weight: 600; }
.rental-unit[data-rule-state="unknown"] .rental-rule-state { color: var(--text); }
.rental-pending-fact { display: grid; gap: 4px; padding: 8px 0; font-size: 14px; overflow-wrap: anywhere; }
.rental-pending-fact + .rental-pending-fact { border-top: 1px solid var(--line); }
.rental-pending-fact > span, .rental-pending-fact > small { color: var(--text-2); }
.rental-pending-fact > small { font-size: 12px; }
.rental-hosts-group { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.rental-hosts-group > h2 { margin: 0; font: 600 24px/1.2 var(--font-head); }
.rental-stale { color: var(--text); }
.host-facts { overflow-wrap: anywhere; }
.host-facts p { margin: 8px 0; font-size: 14px; }
.host-facts h4 { margin: 16px 0 6px; color: var(--text-3); font: 600 13px/1.3 var(--font-head); text-transform: uppercase; letter-spacing: .06em; }
.host-facts .kv { min-height: 32px; align-items: center; padding: 4px 0; }
.host-facts .kv > :only-child { grid-column: 1 / -1; }
.host-facts .kv .sub { margin-top: 0; color: var(--text-3); font-size: 12px; }
.rental-host-rule { padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.rental-host-rule > small { color: var(--text-2); font-size: 12px; }
.rental-email-section { min-width: 0; margin-top: 16px; border-top: 1px solid var(--line); }
.rental-email-section > summary { min-height: 44px; font: 600 16px/1.3 var(--font-head); color: var(--text); }
.rental-email-body { min-width: 0; padding: 0 0 8px; overflow-wrap: anywhere; }
.rental-email-recipients { margin: 8px 0; padding-left: 20px; color: var(--text-2); font-size: 14px; }
.rental-email-recipients li { padding: 4px 0; }
.rental-email-deliveries { display: grid; grid-template-columns: minmax(0, 1fr); list-style: none; margin: 8px 0; padding: 0; }
.rental-email-delivery { min-width: 0; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px; }
.rental-email-delivery p { margin: 6px 0; }
.rental-email-state { color: var(--text); font-weight: 600; }
.rental-email-delivery[data-delivery-state="pending"] .rental-email-state,
.rental-email-delivery[data-delivery-state="accepted"] .rental-email-state,
.rental-email-delivery[data-delivery-state="delayed"] .rental-email-state,
.rental-email-delivery[data-delivery-state="unknown"] .rental-email-state,
.rental-email-delivery[data-delivery-state="unknown_after_retention"] .rental-email-state { color: var(--text); }
.rental-email-delivery[data-delivery-state="delivered"] .rental-email-state { color: var(--ok); }
.rental-email-delivery[data-delivery-state="bounced"] .rental-email-state,
.rental-email-delivery[data-delivery-state="complained"] .rental-email-state,
.rental-email-delivery[data-delivery-state="failed"] .rental-email-state { color: var(--risk); }
.rental-email-times { display: grid; gap: 4px; color: var(--text-2); font-size: 12px; }
.rental-email-times small { font-size: inherit; }
.rental-email-controls { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.rental-email-controls .btn { flex: 1 1 140px; width: auto; min-width: 44px; min-height: 44px; margin: 0; text-align: center; white-space: normal; }

.rental-recovery-section { min-width: 0; margin-top: 16px; border-top: 1px solid var(--line); }
.rental-recovery-section > summary { min-height: 44px; font: 600 16px/1.3 var(--font-head); color: var(--text); }
.rental-recovery-body { min-width: 0; overflow-wrap: anywhere; padding-bottom: 12px; }
.recovery-field { display: grid; min-width: 0; gap: 6px; margin: 12px 0; font-size: 14px; color: var(--text-2); }
.recovery-check { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 8px 0; font-size: 14px; }
.recovery-check input { flex: none; width: 22px; height: 22px; accent-color: var(--text); }
.recovery-preview, .recovery-disclosure { padding: 10px; background: var(--surface-3); border-radius: var(--r-sm); white-space: pre-wrap; }
.recovery-create { text-align: center; background: var(--accent); border-color: var(--on-accent); color: var(--on-accent); font-weight: 600; }
.recovery-link { margin-top: 16px; padding: 10px; border: 1px solid var(--accent); border-radius: var(--r-sm); }
.recovery-ended, .recovery-block { color: var(--text); }
.rental-recovery-receipts { display: grid; grid-template-columns: minmax(0, 1fr); list-style: none; margin: 12px 0; padding: 0; }
.rental-recovery-receipt { min-width: 0; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px; }
.rental-recovery-receipt ul { padding-left: 20px; color: var(--text-2); font-size: 12px; }
.recovery-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.recovery-controls .btn { flex: 1 1 140px; width: auto; min-width: 44px; min-height: 44px; margin: 0; text-align: center; white-space: normal; }

/* ---- Commands: persisted facts, deliberate confirmation and phone-sized controls ---- */
.help-link { display: inline-flex; align-items: center; }
.command-panel { overflow-wrap: anywhere; }
.command-panel h4 { margin: 12px 0 6px; font: 600 16px/1.3 var(--font-head); }
.command-panel p { margin: 8px 0; }
.command-help { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: var(--fs-meta); }
.command-help .mute { margin-left: auto; }
.command-help a { color: var(--text-2); display: inline-flex; align-items: center; min-height: 44px; }
.command-button { width: 100%; min-height: 44px; text-align: center; font-weight: 600; }
.command-panel .command-button + .command-button, .command-panel .btn + .command-button, .command-panel .plan-panel + .command-button { margin-top: 8px; }
.command-panel > .btn-ghost[data-command-act="optionalWarnings"] { display: block; margin-top: 8px; }
.command-button.go { background: var(--accent); border-color: var(--on-accent); color: var(--on-accent); }
.command-button.go:not(:disabled):active { background: var(--accent-pressed); }
.command-button.danger { background: transparent; border: 1px solid color-mix(in srgb, var(--risk) 40%, transparent); color: var(--risk); }
.command-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.command-actions .command-button { flex: 1 1 120px; width: auto; margin-right: 0; }
.command-form fieldset { min-width: 0; margin: 12px 0; padding: 8px 10px; border: 1px solid var(--control-line); border-radius: var(--r-sm); }
.command-reason { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 0; }
.command-reason input { flex: none; width: 22px; height: 22px; accent-color: var(--text); }
.command-reason:has(input[type="checkbox"]) { align-items: flex-start; }
.command-reason input[type="checkbox"] { margin-top: 2px; }
.command-note { display: grid; gap: 6px; color: var(--text-2); }
.command-note textarea { width: 100%; min-width: 0; min-height: 100px; padding: 10px; resize: vertical; border: 1px solid var(--control-line); border-radius: var(--r-sm); background: var(--surface-3); color: var(--text); font: inherit; }
.command-note textarea[readonly] { color: var(--text-2); }
.command-state { font-weight: 600; }
.command-notice, .command-record-note { font-size: 13px; color: var(--text-2); }
.command-notice { padding-left: 10px; border-left: 2px solid var(--risk); }
.command-history { list-style: none; margin: 0; padding: 0; }
.command-history li { padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-2); }
.command-pending { width: 100%; min-height: 44px; margin-top: 12px; padding: 10px; text-align: left; border: 1px solid var(--accent); border-radius: var(--r-sm); background: var(--surface-3); color: var(--text); font: inherit; }
/* Glass floats over the map; panel geometry and sheet detents stay unchanged. */
.panel, .card, .tool, .key-pop {
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid var(--glass-line);
  border-radius: 20px;
  box-shadow: var(--shadow-float);
}
@supports not (backdrop-filter: blur(1px)) {
  .panel, .card, .tool, .key-pop { background: var(--surface); }
}

/* ---- phone: the windshield leads; one sheet carries roster or selected asset ---- */
@media (max-width: 899px) {
  :root { --head-h: 56px; }
  body[data-navigation="true"] { --tab-bar-h: calc(56px + env(safe-area-inset-bottom)); }
  header.top { padding: 5px 12px; gap: 8px; flex-wrap: nowrap; }
  .brand { gap: 6px; }
  .brand-mark { width: 28px; height: 28px; }
  .brand h1 { font-size: 17px; }
  .brand .sub { font-size: 11px; }
  .status { gap: 6px; }
  .status .tag { padding: 3px 6px; letter-spacing: 0; text-transform: none; }
  .status .live { font-size: 0; gap: 0; }
  /* The whole map, including its sheet and fit calculations, ends above the tabs. */
  main#workspace { margin-bottom: var(--tab-bar-h); }
  header.top .view-nav { position: fixed; left: 0; right: 0; bottom: 0; height: var(--tab-bar-h); min-height: 56px; padding: 0 12px env(safe-area-inset-bottom); border-top: 1px solid var(--line); border-radius: 0; background: var(--glass-strong); justify-content: space-around; }
  header.top .view-nav button { position: relative; display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 56px; padding: 5px 12px; border-radius: 0; color: var(--text-2); font-size: 11px; line-height: 1.2; }
  header.top .view-nav .gl { display: block; width: 22px; height: 22px; }
  header.top .view-nav button[aria-current="page"] { color: var(--text); background: transparent; box-shadow: none; }
  .view-nav button[aria-current="page"]::after { content: ""; position: absolute; bottom: 2px; width: 24px; height: 3px; border-radius: 2px; background: var(--accent); }
  .view-nav button:focus-visible { outline-offset: -5px; }
  .map-tools, body[data-list="open"] .map-tools { left: auto; right: var(--gap); top: var(--gap); bottom: auto; }
  .map-tools .tool { width: 44px; padding: 0; justify-content: center; }
  .map-tools .tool > span { display: none; }
  .key-pop { left: auto; right: 0; top: 52px; bottom: auto; }
  .map-notice { bottom: calc(var(--sheet-h) + 12px); }
  .map-canvas .maplibregl-ctrl-bottom-left, .map-canvas .maplibregl-ctrl-bottom-right { bottom: var(--sheet-h); }
  .rail { display: none !important; }
  .sheet { display: flex; flex-direction: column; position: absolute; left: 0; right: 0; bottom: 0; height: var(--sheet-h); background: var(--surface); border-top: 1px solid var(--line); border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: var(--shadow-sheet); z-index: 7; transition: height var(--t-layout) ease-out; touch-action: none; }
  .sheet-handle { display: flex; align-items: center; justify-content: center; flex: none; height: 44px; width: 100%; border: 0; background: none; padding: 0; }
  .sheet-handle i { width: 44px; height: 5px; border-radius: 3px; background: var(--surface-3); }
  .sheet-handle:focus-visible { outline-offset: -3px; }
  .sheet-peek { display: none; flex: 1; min-height: 0; }
  .sheet[data-detent="peek"] .sheet-peek { display: flex; }
  /* An unresolved selection has no summary yet. Keep only the resize handle over the map. */
  .sheet[data-detent="peek"]:has(.sheet-peek[hidden]) { height: 44px; background: transparent; border: 0; border-top: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .sheet[data-detent="peek"] .panel, .sheet[data-detent="peek"] .card { display: none !important; }
  .peek-button { width: 100%; min-height: 52px; padding: 0 16px; border: 0; background: none; color: var(--text); display: flex; align-items: center; gap: 11px; text-align: left; }
  .peek-stack { display: flex; width: 68px; flex: none; }
  .peek-stack .tile { width: 28px; height: 28px; margin-left: -8px; border-radius: 8px; }
  .peek-stack .tile:first-child { margin-left: 0; }
  .peek-stack .tile .gl { width: 15px; height: 15px; }
  .peek-copy { flex: 1; min-width: 0; }
  .peek-copy b { display: block; font: 600 17px/1.2 var(--font-head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .peek-copy span { display: block; color: var(--text-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .peek-button > .gl { width: 17px; height: 17px; color: var(--text-2); transform: rotate(180deg); }
  .panel, .card { position: static; width: auto; max-width: none; height: auto; max-height: none; border: 0; border-radius: 0; box-shadow: none; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; flex: 1; min-height: 0; touch-action: auto; }
  #inspector { overflow-y: auto; overscroll-behavior: contain; }
  #inspector > .card-body { flex: none; overflow: visible; }
  .panel { display: flex; }
  .card[data-card="min"], .card[data-card="compact"], .card[data-card="expanded"] { width: auto; max-width: none; height: auto; max-height: none; }
  .card[data-card="min"] .card-body { display: block; }
  .card[data-card="min"] .insp-title { white-space: normal; font-size: 18px; }
  .card[data-card="min"] .brief { display: none; }
  body[data-list="closed"] .panel { display: flex; }
  body[data-selected="true"] .panel { display: none; }
  .panel-head { padding: 0 16px 12px; }
  .card-head .back { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px 0 0; border: 0; background: none; color: var(--text); font-weight: 600; }
  .card-head { padding: 2px 12px 8px; }
  .card-actions, #list-collapse { display: none; }
  .vehicle-summary .card-head { padding: 0 12px 8px 16px; }
  .vehicle-summary .card-actions { display: flex; }
  .vehicle-summary .card-actions button:not(.close) { display: none; }
  .card[data-card="min"] .vehicle-overview { display: block; }
  .card[data-card="min"] .vehicle-summary .insp-title { font-size: 28px; white-space: normal; }
  .card-body { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .sheet, header.top .view-nav {
    background: var(--glass);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    backdrop-filter: blur(18px) saturate(1.4);
    border: 1px solid var(--glass-line);
    box-shadow: var(--shadow-float);
  }
  @supports not (backdrop-filter: blur(1px)) {
    .sheet, header.top .view-nav { background: var(--surface); }
  }
}

/* Password access and Partners use the same palette, fonts and phone-sized controls. */
/* Time is a map dimension. Live lists and Today keep their own clocks. */
:root { --replay-h: 112px; }
.replay-toggle { display: none; }
.replay-bar, .replay-chip {
  position: absolute; z-index: 8; color: var(--text); background: var(--glass-strong);
  border: 1px solid var(--glass-line); border-radius: var(--r-md); box-shadow: var(--shadow-float);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
}
.replay-bar { left: calc(var(--rail-w) + 16px); right: 16px; bottom: 12px; padding: 10px 14px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0 14px; }
body[data-list="open"] .replay-bar { left: calc(var(--cluster-w) + 16px); }
.replay-live, .replay-chip button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 12px; background: transparent; color: var(--text); border: 1px solid var(--control-line); border-radius: 999px; font: inherit; }
.replay-live[aria-pressed="true"] { border-color: var(--ok); }
.replay-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-2); }
.replay-live[aria-pressed="true"] i { background: var(--ok); animation: replay-pulse 2s ease-in-out infinite; }
@keyframes replay-pulse { 50% { opacity: .35; } }
.replay-track { min-width: 0; padding-top: 16px; }
.replay-track input { display: block; width: 100%; height: 28px; margin: 0; padding: 0; accent-color: var(--accent); cursor: ew-resize; }
.replay-hours { position: relative; height: 16px; color: var(--text-2); font-size: 11px; font-variant-numeric: tabular-nums; }
.replay-hours span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.replay-hours span:first-child { transform: none; }
.replay-hours span:last-child { transform: translateX(-100%); }
.replay-clock { max-width: 150px; font-size: 13px; font-variant-numeric: tabular-nums; }
.replay-message { grid-column: 1 / -1; margin: 6px 0 0; color: var(--text-2); font-size: 12px; }
.replay-chip { top: 12px; left: calc(var(--rail-w) + 16px); padding: 3px 4px 3px 12px; display: flex; align-items: center; gap: 10px; font-size: 13px; }
body[data-list="open"] .replay-chip { left: calc(var(--cluster-w) + 16px); }
.replay-ticks { position: relative; height: 0; margin: 0 8px; }
.replay-tick { position: absolute; bottom: 0; transform: translateX(-50%); width: 12px; height: 16px; padding: 0; background: transparent; border: 0; border-radius: 3px; }
.replay-tick::before { content: ""; display: block; width: 3px; height: 12px; margin: auto; border-radius: 2px; background: var(--text-2); }
.replay-tick[data-severity="critical"]::before { background: var(--risk); }
.replay-tick[data-severity="warning"]::before { background: var(--accent); }
.replay-tick:focus-visible::after { content: attr(aria-label); position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); width: max-content; max-width: 220px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--text); font-size: 12px; z-index: 2; }
.mk[data-replay="true"][data-state="silent"] .puck:not(.vehicle-puck),
.mk[data-replay="true"][data-state="dark"] .puck:not(.vehicle-puck) { border: 2px dashed var(--text-2); filter: grayscale(1); opacity: .55; }
.map-tools, body[data-list="open"] .map-tools { bottom: var(--replay-h); }
.map-notice { bottom: calc(var(--replay-h) + 52px); }
.card[data-card="expanded"] { bottom: var(--replay-h); }
@supports not (backdrop-filter: blur(1px)) { .replay-bar, .replay-chip { background: var(--surface); } }
@media (prefers-reduced-motion: reduce) { .replay-live[aria-pressed="true"] i { animation: none; } }
@media (max-width: 899px) {
  :root { --replay-h: 0px; }
  .replay-bar:has(.replay-live[aria-pressed="true"]) { display: none; }
  .map-tools .replay-toggle { display: inline-flex; width: auto; min-width: 44px; min-height: 44px; padding: 0 12px; }
  .map-tools .replay-toggle > span { display: inline; }
  .replay-bar, body[data-list="open"] .replay-bar { left: 8px; right: 8px; bottom: 8px; padding: 8px 10px; column-gap: 8px; }
  .replay-clock { grid-column: 2 / -1; grid-row: 2; text-align: right; max-width: none; }
  .replay-live { grid-row: 1 / 3; }
  .replay-track { grid-column: 2 / -1; }
  .replay-hours span:not(:first-child):not(:last-child) { display: none; }
  .replay-chip, body[data-list="open"] .replay-chip { left: 12px; max-width: calc(100% - 176px); flex-wrap: wrap; gap: 0; }
  .replay-chip button { border: 0; padding: 0 8px; }
  .sheet { bottom: var(--replay-h); max-height: calc(100% - var(--replay-h) - 12px); }
  .card[data-card="expanded"] { bottom: auto; }
  .map-tools, body[data-list="open"] .map-tools { bottom: auto; }
  .map-notice { bottom: calc(var(--sheet-h) + var(--replay-h) + 12px); }
  .map-canvas .maplibregl-ctrl-bottom-left, .map-canvas .maplibregl-ctrl-bottom-right { bottom: calc(var(--sheet-h) + var(--replay-h)); }
}

.login-card .signin-field { margin: 0; }
.login-card .signin-staff { text-align: left; padding-left: 0; font-size: 12px; }
.login-card .password-toggle { display: flex; gap: 10px; align-items: center; min-height: 44px; font-size: 15px; }
.login-card .password-toggle input { width: 22px; height: 22px; margin: 0; accent-color: var(--text); }
main#partners { flex: 1; min-height: 0; min-width: 0; overflow: auto; scrollbar-color: var(--line) transparent; }
.partner-shell { width: 100%; max-width: 760px; margin: 0 auto; padding: 20px 16px calc(28px + var(--tab-bar-h) + env(safe-area-inset-bottom)); overflow-wrap: anywhere; }
.partner-top, .partner-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.partner-top h1 { margin: 0; font: 600 28px/1.2 var(--font-head); }
.partner-shell h2 { margin: 20px 0 12px; font: 600 22px/1.2 var(--font-head); }
.partner-shell h3 { margin: 0 0 12px; font: 600 17px/1.3 var(--font-head); }
.partner-shell h4 { margin: 0 0 8px; font: 600 17px/1.3 var(--font-head); }
.partner-card { min-width: 0; margin: 16px 0; padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.partner-card > summary { color: var(--text); font: 600 17px/1.3 var(--font-head); }
.partner-field { display: grid; gap: 6px; min-width: 0; margin: 16px 0; font-size: 14px; color: var(--text-2); }
.partner-shell fieldset { min-width: 0; margin: 20px 0; padding: 4px 12px; border: 1px solid var(--control-line); border-radius: var(--r-sm); }
.partner-shell legend { font-family: var(--font-head); padding: 0 6px; }
.partner-open:hover { background: var(--surface-2); }
.partner-open { border-radius: var(--r-md); display: block; min-height: 44px; padding: 0; background: none; color: var(--text); border: 0; font: inherit; text-align: left; text-decoration: none; overflow-wrap: anywhere; }
.partner-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; font-size: 13px; }
.partner-facts dt { color: var(--text-2); }
.partner-facts dd { margin: 0; }
.partner-status { font-size: 13px; color: var(--text); }
.partner-user { padding: 16px 0; border-top: 1px solid var(--line); }
.partner-user p { margin: 6px 0; font-size: 14px; }
.partner-user:first-of-type { border-top: 0; }
.partner-checklist, .partner-notice { padding: 12px; margin: 16px 0; border-left: 3px solid var(--accent); background: var(--surface-3); }
.partner-confirm { margin-top: 12px; padding: 12px; border: 1px solid var(--risk); border-radius: var(--r-sm); }
.partner-preview { max-height: 60vh; overflow: auto; margin-top: 12px; }
.partner-preview ol { padding-left: 24px; }
.partner-preview li { padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; }
@media (max-width: 760px) {
  .login-card { margin: auto; padding: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .partner-shell .act { width: 100%; margin-right: 0; }
  .partner-facts { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .partner-facts dd { margin-bottom: 8px; }
}

/* Tracker intake and installation share the single-column partner forms. */
.partner-unit { min-width: 0; padding: 16px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.partner-unit h4 { margin: 0 0 8px; font: 600 18px/1.3 var(--font-head); }
.partner-trackers textarea { min-height: 144px; }

/* Service/support identity remains visible above every workspace screen, including on phones. */
#host-view-banner {
  position: sticky; top: 0; z-index: 1000; padding: 10px 14px; flex: none;
  background: var(--surface-3); color: var(--text); border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere; font-size: 14px;
}
#host-view-banner[hidden] { display: none; }
#host-view-banner a { color: inherit; }
.partner-check { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; min-height: 44px; }
.partner-check input { flex: 0 0 22px; width: 22px; height: 22px; }
.partner-card ul { padding-left: 20px; }

/* Desktop tabs and the account menu share the semantic surface palette. */
header.top .live { color: var(--text-2); }
header.top .tag { color: var(--text-2); }
@media (min-width: 900px) {
  header.top .view-nav { background: transparent; padding: 0; gap: 4px; }
  header.top .view-nav button { position: relative; min-height: 44px; padding: 0 12px; font-size: 15px; font-weight: 500; color: var(--text-2); }
  header.top .view-nav button[aria-pressed="true"] { color: var(--text); background: transparent; box-shadow: none; }
  header.top .view-nav button[aria-current="page"]::after { content: ""; position: absolute; left: calc(50% - 12px); bottom: 4px; width: 24px; height: 2px; border-radius: 2px; background: var(--signature); }
}
body[data-view="map"] header.top { background: var(--glass); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); border-color: var(--glass-line); }
/* A backdrop-filter makes the header the containing block for its fixed phone tabs. */
@media (max-width: 899px) {
  body[data-view="map"] header.top { -webkit-backdrop-filter: none; backdrop-filter: none; }
}
body[data-view="signin"] header.top .status, body[data-view="signin"] header.top .view-nav { display: none; }
body[data-view="signin"] header.top .brand h1 { display: none; }
body[data-view="signin"] header.top .brand .sub { color: var(--text); font: 600 17px/1.2 var(--font-head); }
.account-button { position: relative; isolation: isolate; width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 0; background: transparent; color: var(--text); border: 0; }
.account-button::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--surface-3); z-index: -1; }
.account-button:hover, .account-button[aria-expanded="true"] { background: transparent; }
.account-button:hover::before { background: var(--line); }
.account-layer { position: fixed; inset: 0; z-index: 1001; }
.account-menu { animation: account-enter var(--t-enter); position: absolute; top: var(--account-top, calc(var(--head-h) + 8px)); right: 16px; width: 300px; max-width: calc(100% - 24px); max-height: calc(100dvh - var(--head-h) - 24px); overflow: auto; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--text); box-shadow: var(--shadow-card); }
.account-identity { margin: 0; }
.account-identity .kv { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 32px; align-items: baseline; padding: 6px 0; }
.account-identity dt { color: var(--text-2); font-size: 13px; }
.account-identity dd { margin: 0; text-align: right; font-size: 13px; overflow-wrap: anywhere; }
.account-handle { display: none; }
.account-appearance { margin-bottom: 12px; }
.account-appearance .seg { display: flex; margin-top: 6px; }
.account-appearance button { flex: 1; min-width: 44px; padding: 0 10px; }
.account-menu > .link:hover { background: var(--surface-2); }
.account-menu > .link { display: flex; width: 100%; align-items: center; justify-content: flex-start; padding: 0 8px; color: var(--text-2); text-align: left; }
@media (max-width: 899px) {
  .account-layer { background: var(--shadow-color); }
  .account-menu { top: auto; bottom: 0; left: 0; right: 0; width: 100%; max-width: none; max-height: calc(100dvh - 16px); padding: 24px 24px calc(24px + env(safe-area-inset-bottom)); border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: var(--shadow-sheet); }
  .account-handle { display: block; width: 36px; height: 4px; margin: -12px auto 16px; border-radius: 999px; background: var(--line-strong); }
}
a { color: var(--text); text-underline-offset: 3px; }
.position-links a { display: inline-flex; align-items: center; min-height: 44px; margin-right: 16px; }
header.top .live::before { background: var(--ok); }
.mk.sel::before, .mk:focus-visible::before { box-shadow: 0 0 0 1px var(--on-accent); }
.tile .att, .mk .att, .chips button i { box-shadow: 0 0 0 1px var(--on-accent); }

/* ---- v3 shared page and form components ---- */
h1, h2 { text-wrap: balance; letter-spacing: 0; }
.page { width: 100%; max-width: 820px; margin: 0 auto; padding: 24px max(16px, env(safe-area-inset-right)) calc(32px + var(--tab-bar-h) + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.page-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: start; }
.page-head h1 { margin: 0; font: 600 var(--fs-display)/1.15 var(--font-head); }
.page-lead { margin: 4px 0 0; font: 400 var(--fs-lead)/1.45 var(--font-body); }
.page-meta, .row-meta { font-size: var(--fs-meta); font-weight: 500; color: var(--text-3); font-variant-numeric: tabular-nums; }
.page-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.page-tools .field { flex: 1 1 200px; }
.group { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.group-title { margin: 0; padding: 16px 16px 8px; font: 600 var(--fs-heading)/1.3 var(--font-head); }
.row-item { position: relative; width: 100%; min-width: 0; min-height: 64px; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; column-gap: 12px; padding: 12px 16px; border: 0; background: transparent; color: var(--text); text-decoration: none; text-align: left; }
.row-item + .row-item::before { content: ""; position: absolute; top: 0; left: 64px; right: 0; height: 1px; background: var(--line); }
.row-item:hover { background: var(--surface-2); }
.row-item[aria-pressed="true"], .row-item[aria-selected="true"] { background: var(--surface-3); box-shadow: inset 3px 0 0 var(--selected-edge); }
.row-copy { min-width: 0; display: grid; gap: 2px; overflow-wrap: anywhere; }
.row-title, .row-copy > b { font: 600 var(--fs-row)/1.25 var(--font-body); }
.row-copy > span:not(.row-meta) { font-size: var(--fs-secondary); color: var(--text-2); }
.row-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.row-end { display: flex; align-items: center; gap: 10px; color: var(--text-3); }
.row-end .gl { width: 16px; height: 16px; }
.row-item.compact { min-height: 56px; }
.row-item.plain { grid-template-columns: minmax(0, 1fr) auto; }
.row-item.plain + .row-item::before { left: 16px; }
.field, .partner-field, .morning-field, .recovery-field, .signin-field { display: grid; gap: 6px; min-width: 0; color: var(--text-2); font-size: 13px; font-weight: 600; }
.field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea,
.partner-field input, .partner-field select, .partner-field textarea,
.morning-field input, .morning-field select, .recovery-field input, .recovery-field select, .recovery-field textarea,
.login-card .signin-field input, .login-card > input[type="password"] { width: 100%; min-width: 0; min-height: 44px; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--field); color: var(--text); font: 400 16px/1.4 var(--font-body); }
.login-card .signin-field input, .login-card > input[type="password"] { min-height: 48px; }
:is(.field, .partner-field, .morning-field, .recovery-field, .signin-field) :is(input, textarea)::placeholder { color: var(--text-3); opacity: 1; }
:is(.field, .partner-field, .morning-field, .recovery-field, .signin-field) :is(input, select, textarea):focus, .login-card > input[type="password"]:focus { outline: 2px solid var(--focus); outline-offset: 2px; border-color: var(--focus); box-shadow: 0 0 0 4px var(--focus-halo); }
:is(.field, .partner-field, .morning-field, .recovery-field, .signin-field) [aria-invalid="true"] { border-color: var(--risk); }
.field-error { font-size: 13px; font-weight: 400; color: var(--risk); }
.field-error::before { content: "! "; font-weight: 600; }
.field-help, .login-card .field-help { font-size: 13px; font-weight: 400; color: var(--text-3); }
:is(.field, .partner-field, .morning-field, .recovery-field) select { appearance: none; padding-right: 36px; background-image: var(--select-chevron); background-position: right 10px center; background-size: 18px; background-repeat: no-repeat; }
:is(.field, .partner-field, .recovery-field) textarea { min-height: 96px; resize: vertical; }
.field textarea.buyer-link-url { min-height: 0; overflow-wrap: anywhere; font: 400 13px/1.4 monospace; }
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 12px 16px; }
.field-grid .full { grid-column: 1 / -1; }
.form-section { min-width: 0; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 20px; }
.form-section h3 { margin: 0 0 12px; font: 600 17px/1.3 var(--font-head); }
.form-section > p { color: var(--text-2); font-size: 13px; }
.switch { position: relative; flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 13px; background: transparent; }
.switch::before { content: ""; position: absolute; inset: 9px 0; border-radius: 13px; background: var(--surface-3); transition: background var(--t-fast); }
.switch::after { content: ""; position: absolute; top: 11px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-pill); transition: transform var(--t-fast); }
.switch[aria-checked="true"]::before { background: var(--ok); }
.switch[aria-checked="true"]::after { transform: translateX(18px); }
.pill.module { color: var(--text-2); background: transparent; border-color: var(--line); }
.table-wrap { max-width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { font-size: var(--fs-micro); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); padding: 10px 12px; border-bottom: 1px solid var(--line-strong); text-align: left; }
.table td { height: 44px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.table .num { text-align: right; }
.state { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 40px 20px; overflow-wrap: anywhere; }
.state .tile { width: 48px; height: 48px; border-radius: 14px; }
.state .tile .gl { width: 24px; height: 24px; }
.state h1, .state h2 { margin: 0; font: 600 17px/1.3 var(--font-head); }
.state p { margin: 0; max-width: 40ch; font-size: 13px; color: var(--text-2); }
.partner-notice, .partner-checklist, .signin-status, .notice:not(.pill) { background: var(--surface-3); border: 0; border-left: 3px solid var(--signature); border-radius: var(--r-md); padding: 10px 14px; color: var(--text); }
.partner-notice:empty, .partner-checklist:empty, .map-notice:empty, .signin-status:empty, .notice:not(.pill):empty { display: none; }
.login-card p.signin-status { color: var(--text); }
.steps { display: flex; align-items: center; gap: 0; }
.step { display: grid; justify-items: center; gap: 6px; width: 72px; font-size: 12px; color: var(--text-3); }
.step i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); font: 600 13px/1 var(--font-head); }
.step.done i { color: var(--ok); background: var(--ok-tint); }
.step.cur i { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 2px var(--signature); }
.steps hr { flex: 1; height: 1px; margin: 0 -14px 18px; border: 0; background: var(--line); }
.preset-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.preset-card { position: relative; min-width: 0; display: grid; gap: 10px; text-align: left; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--text); }
.preset-card:hover { background: var(--surface-2); }
.preset-card[aria-checked="true"] { box-shadow: inset 0 0 0 2px var(--signature); }
.preset-card .badge { display: none; position: absolute; top: 12px; right: 12px; width: 24px; height: 24px; place-items: center; border-radius: 50%; background: var(--focus-halo); color: var(--text); }
.preset-card[aria-checked="true"] .badge { display: grid; }
.preset-card b { font: 600 17px/1.3 var(--font-head); }
.preset-card p { margin: 0; font-size: 13px; color: var(--text-2); }
.review { padding: 12px; border-radius: var(--r-md); background: var(--surface-3); font-size: 13px; color: var(--text-2); }
.pub-header { flex: none; width: 100%; min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left)); border-bottom: 1px solid var(--line); background: var(--header-bg); }
.pub-header .brand { flex: 0 1 auto; flex-wrap: wrap; }
.pub-header .brand-mark { flex: none; width: 28px; height: 28px; }
.pub-header .pub-name { margin: 0; font: 600 15px/1.2 var(--font-head); }
.pub-header .crumb { color: var(--text-2); font-size: 13px; }
.pub-header > .btn { flex: none; }
.toc { display: grid; gap: 4px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.toc a { display: flex; align-items: center; min-height: 44px; font-size: 13px; }
@media (min-width: 761px) { .page { padding-left: max(24px, env(safe-area-inset-left)); padding-right: max(24px, env(safe-area-inset-right)); } }
@media (max-width: 760px) { .preset-grid { grid-template-columns: minmax(0, 1fr); } .page-head { grid-template-columns: minmax(0, 1fr); } .step:not(.cur) .step-label { display: none; } }

@keyframes account-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Accounts use the v3 page, row and field components. */
.partner-shell.page { max-width: 1040px; display: grid; gap: 20px; }
.partner-shell .page-head h1, .partner-flow h1 { margin: 0; font: 600 var(--fs-display)/1.15 var(--font-head); }
.partner-shell .partner-card { margin: 0; padding: 20px; }
.partner-shell .partner-field { margin: 0; }
form[data-partner-form="compliance"] { display: grid; gap: 14px; }
form[data-partner-form="compliance"] > .partner-field, form[data-partner-form="compliance"] > .field-help { margin: 0; }
.partner-shell .field-grid { margin: 16px 0; }
.partner-shell > .btn-ghost, .partner-flow > .btn-ghost { justify-self: start; }
.partner-shell .partner-checklist { margin: 0; }
.partner-detail-lead { margin: 6px 0 0; font-size: 15px; color: var(--text-2); }
.partner-head-actions, .partner-report-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.partner-report-links { margin-left: auto; }
.partner-search { flex: 1 1 240px; min-width: 0; }
.partner-search .search { margin: 0; }
.partner-accounts .tile, .partner-user .tile, .preset-card .tile { width: 40px; height: 40px; border: 0; border-radius: 12px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); }
.partner-shell .tile .gl { width: 20px; height: 20px; }
.partner-shell .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.partner-shell .chips button { margin: 0; }
.partner-shell .chips .num { margin-left: 4px; color: var(--text-3); }
.partner-shell .partner-user { padding: 0; }
.partner-user .row-item { padding-left: 0; padding-right: 0; }
.partner-user .row-end { flex-wrap: wrap; justify-content: end; }
.partner-user-menu { position: relative; font-size: 13px; }
.partner-user-menu[open] > button { display: flex; }
.partner-flow, .partner-flow form { display: grid; gap: 20px; }
.partner-flow { max-width: 680px; width: 100%; margin: 0 auto; }
.partner-flow .form-section { margin: 0; }
.partner-flow .form-section .field-grid { margin: 0; }
.partner-flow .partner-field { margin: 0; }
.partner-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.partner-shell .partner-dirty, .flow-foot { display: flex; align-items: center; justify-content: end; gap: 8px; padding-top: 12px; }
.partner-dirty { border-top: 1px solid var(--line); }
.partner-dirty > span, .flow-foot > .btn-ghost { margin-right: auto; }
.partner-dirty > span { font-size: 13px; color: var(--text-2); }
.partner-shell .review { display: grid; gap: 6px; }
.partner-more { text-align: center; }
.partner-report-filter { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.partner-report-filter .partner-field { flex: 1; }
.partner-report-filter > button { margin: 0; }
.partner-shell summary { min-width: 44px; min-height: 44px; align-content: center; cursor: pointer; }
.partner-shell .banner .btn { margin-left: auto; flex: none; }
#host-view-banner { background: var(--warn-tint); }
@media (max-width: 760px) {
  .partner-shell .partner-card { padding: 16px; }
  .partner-user .row-item { grid-template-columns: 40px minmax(0, 1fr); }
  .partner-user .row-end { grid-column: 2; justify-content: start; }
  .partner-shell .partner-dirty { flex-wrap: wrap; }
  .partner-flow h1 { font-size: 24px; }
  .flow-foot > .btn-primary { flex: 1; }
  .partner-report .table, .partner-report tbody { display: block; }
  .partner-report thead { display: none; }
  .partner-report tr { display: grid; gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .partner-report td[data-label]::before { content: attr(data-label) " "; color: var(--text-3); }
  .partner-report td { display: block; height: auto; min-height: 24px; padding: 0; border: 0; overflow-wrap: anywhere; }
}

/* Recovery map presentation, preserved from the public page stylesheet. */
:where(.share-page) .mk { --label-clearance: 26px; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: transparent; }
:where(.share-page) .marker-label { position: absolute; left: calc(50% + var(--label-clearance)); top: 50%; transform: translateY(-50%); display: block; width: max-content; max-width: 180px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; pointer-events: none; color: var(--map-label); font-size: 13px; line-height: 18px; text-shadow: 0 0 2px var(--map-halo), 0 0 4px var(--map-halo), 0 0 6px var(--map-halo); }
:where(.share-page) .mk.label-below .marker-label { left: 50%; top: calc(50% + var(--label-clearance)); transform: translateX(-50%); }
:where(.share-page) .mk .puck { display: grid; place-items: center; width: 30px; height: 30px; border: 2px solid var(--text); border-radius: 50%; background: var(--surface); }
:where(.share-page) .mk .puck::after { content: ""; width: 8px; height: 8px; background: var(--accent); border-radius: 50%; }
:where(.share-page) .mk .gl, :where(.share-page) .mk .hd, :where(.share-page) .mk .att { display: none; }
:where(.share-page) .mk[data-state="fresh"] .puck { border-color: var(--ok); }
:where(.share-page) .mk[data-state="silent"] .puck { border-color: var(--risk); border-style: dashed; }
:where(.share-page) .mk[data-state="dark"] .puck { border-color: var(--risk); border-style: dotted; }
:where(.share-page) .mk.sel .puck { box-shadow: 0 0 0 3px var(--accent), 0 0 0 4px var(--on-accent); }
:where(.share-page) .map-canvas .maplibregl-ctrl-group { background: var(--surface-2); }
:where(.share-page) .map-canvas .maplibregl-ctrl-group button { width: 44px; height: 44px; }
:where(.share-page) .map-canvas .maplibregl-ctrl-icon { filter: var(--control-filter); }
:where(.share-page) .map-canvas .maplibregl-ctrl-scale { background: var(--surface-2); color: var(--text); border-color: var(--text-2); }

/* California sold-car disable plan. Server supplies every step and legal clock. */
.plan-panel { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; margin: 8px 0 16px; }
.plan-eyebrow { font: 600 var(--fs-meta)/1.4 var(--font-body); color: var(--text-2); }
.command-panel .plan-hero { margin: 2px 0 4px; font: 600 var(--fs-title)/1.25 var(--font-head); }
.plan-steps { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 10px; }
.plan-steps.past { color: var(--text-2); }
.plan-steps.past .plan-marker.done { background: var(--line-strong); border-color: var(--line-strong); }
.plan-steps li { display: grid; grid-template-columns: 12px minmax(0, 1fr); column-gap: 10px; font-size: var(--fs-secondary); }
.plan-steps small { display: block; }
.plan-marker { width: 10px; height: 10px; margin-top: 5px; border: 1.5px solid var(--line-strong); border-radius: 50%; }
.plan-marker.done { background: var(--ok); border-color: var(--ok); }
.plan-marker.next { background: var(--signature); border-color: var(--signature); }
.plan-panel > .btn, .plan-panel > .command-button { margin-top: 12px; }
.plan-panel.command-form > fieldset { border: 0; padding: 0; margin: 0; }
.plan-panel.command-form .field { margin-top: 14px; }
.plan-panel.command-form .field-help { margin: 6px 0 0; }
.plan-panel.command-form .command-actions { margin-top: 16px; }
.plan-panel .command-actions > .btn-ghost:first-child { margin-left: -16px; }
.plan-panel a[href^="tel:"] { color: var(--text); text-decoration: underline; }
.plan-panel button { min-height: 44px; }
.plan-panel .notice { border-left: 3px solid var(--signature); padding-left: 12px; }

/* Ask shares the workspace's glass controls and Today typography. */
#map-ask {
  position: absolute;
  z-index: 7;
  inset: var(--gap) calc(var(--ask-right, 0px) + var(--gap)) auto calc(var(--ask-left, var(--rail-w)) + var(--gap));
  height: calc(100% - 2 * var(--gap));
  pointer-events: none;
}
#map-ask:has(.short-space) { right: var(--gap); top: calc(56px + 2 * var(--gap)); }
#map-ask .ask {
  position: relative;
  width: 100%;
  max-width: 560px;
  height: 100%;
  margin-inline: auto;
  pointer-events: none;
}
#map-ask .ask > * { pointer-events: auto; }
.ask-pill {
  display: flex;
  align-items: center;
  position: relative;
  min-height: 44px;
  isolation: isolate;
}
.ask-pill .search { width: 100%; min-width: 0; min-height: 44px; padding: 0 48px 0 12px; }
.ask-pill .icon-btn {
  position: absolute; top: 0; right: 0; width: 44px; height: 44px;
  border: 0; background: transparent; color: var(--text-2);
}
.ask-pill .icon-btn:hover { background: transparent; color: var(--text); }
#map-ask .ask-pill .icon-btn:focus-visible { outline-offset: -3px; }
.ask-icon { display: inline-flex; align-items: center; }
#map-ask .ask-pill, #map-ask .ask-answer, #map-ask .ask-suggestions {
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid var(--glass-line);
  box-shadow: var(--shadow-float);
}
#map-ask .ask-pill { border-radius: 999px; overflow: hidden; }
#map-ask .ask-pill .search { border: 0; border-radius: inherit; background: transparent; outline-offset: -3px; }
.ask-narrow { width: 44px; min-width: 44px; padding: 0; justify-content: center; }
.ask-answer { display: flex; flex-direction: column; margin-top: 8px; padding: 12px 16px; overflow-wrap: anywhere; }
#map-ask .ask-answer { max-height: min(420px, 60%); border-radius: var(--r-xl); }
.ask-answer:focus, .ask-answer:focus-visible { outline: none; box-shadow: none; }
#map-ask .ask-answer:focus-visible { box-shadow: var(--shadow-float); }
.ask-answer-body { flex: 1; min-height: 0; overflow: auto; padding: 6px; margin: -6px -6px 0; }
.ask-answer-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ask-echo { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); font-size: var(--fs-secondary); }
button.ask-echo { flex: 1; min-height: 44px; text-align: left; border: 0; background: transparent; }
.ask-answer p, .today-ai p { margin: 8px 0; }
.ask-prose, .ask-status { font-size: var(--fs-body); line-height: 1.5; }
.ask-prose { white-space: pre-line; color: var(--text); }
.ask-status, .ask-meta, .ask-evidence-time { color: var(--text-2); }
.ask-meta, .ask-footer { font-size: var(--fs-meta); }
.ask-answer .ask-meta { margin: 16px 0 6px; }
.ask-unknowns ul { margin: 0; padding: 0; list-style: none; }
.ask-unknowns li { position: relative; padding-left: 18px; }
.ask-unknowns li::before { position: absolute; left: 0; top: .55em; margin: 0; }
.ask-footer { flex: none; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; color: var(--text-3); border-top: 1px solid var(--line); margin-top: 12px; padding-top: 8px; }
.ask-footer a { color: inherit; }
.ask-citations { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ask-citation { display: inline-flex; align-items: center; min-height: 44px; gap: 6px; max-width: 100%; padding: 0 8px; color: var(--text); font: inherit; font-size: var(--fs-meta); }
button.ask-citation { border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
button.ask-citation:hover { border-color: var(--text-2); }
button.ask-citation.selected { box-shadow: inset 0 -2px 0 var(--accent); }
.ask-citation b { font-weight: 600; }
.ask-citation .tile { width: 28px; height: 28px; flex: 0 0 28px; }
.ask-citation .tile .gl { width: 16px; height: 16px; }
.ask-suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; padding: 8px; border-radius: var(--r-lg); }
#map-ask .ask-suggestions { position: absolute; inset: 44px 0 auto; z-index: 1; }
.ask.thinking .ask-pill::after {
  content: ""; position: absolute; inset: auto auto 0 0; width: 32%; height: 2px;
  background: var(--signature); animation: ask-sweep 1.4s ease-in-out infinite alternate;
}
@keyframes ask-sweep { to { transform: translateX(212%); } }
.morning-head:has([data-ask-slot] .ask) { grid-template-columns: minmax(0, 1fr); }
.today-ai-slot { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--t-layout) ease; }
.today-ai-slot.shown { grid-template-rows: 1fr; }
.today-ai { min-height: 0; overflow: hidden; padding-left: 12px; border-left: 2px solid var(--signature); }
.today-ai.loading .skeleton-row { min-height: 14px; max-width: 100%; background-image: linear-gradient(90deg, var(--surface-3), var(--line), var(--surface-3)); }
.today-ai.loading .skeleton-row:last-child { width: 70%; margin-bottom: 8px; }
.today-ai-slot.shown .today-ai.loading { min-height: 72px; }
.today-ai-title { font-weight: 600; }
.today-ai-time { color: var(--text-3); }
.morning-row.ask-hit { background: var(--focus-halo); }
@supports not (backdrop-filter: blur(1px)) {
  #map-ask .ask-pill, #map-ask .ask-answer, #map-ask .ask-suggestions { background: var(--surface); }
}
@media (max-width: 899px) {
  #map-ask, #map-ask:has(.short-space) { inset: var(--gap) var(--gap) auto; }
  #map-ask .ask { max-width: none; }
  #map-ask:has(.ask) ~ .map-tools { top: calc(var(--gap) + 44px + 8px); }
  #map-ask:has(.ask-suggestions:not([hidden]), .ask-answer:not([hidden])) ~ .map-tools { visibility: hidden; }
  #map-ask .ask-answer { max-height: 60dvh; }
}
@media (prefers-reduced-motion: reduce) {
  .ask.thinking .ask-pill::after, .today-ai .skeleton-row { animation: none; }
  .today-ai-slot { transition: none; }
}
