:root {
  color-scheme: dark;
  --bg: #101119;
  --panel: #1b1d29;
  --panel-2: #25283a;
  --line: rgba(255,255,255,.10);
  --text: #f8fafc;
  --muted: #9ca3b7;
  --accent-a: #1498ff;
  --accent-b: #7c32ff;
  --accent-c: #ff3e98;
  --cyan: #50c5d2;
  --green: #16a34a;
  --danger: #dc2626;
  --shadow: 0 18px 50px rgba(0,0,0,.30);
  --radius: 22px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { min-height: 100dvh; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
#appShell { min-height: 100dvh; padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
.topbar { position: sticky; top: 0; z-index: 1000; display: flex; align-items: center; justify-content: space-between; padding: calc(16px + env(safe-area-inset-top)) 18px 14px; background: rgba(16,17,25,.91); backdrop-filter: blur(20px); border-bottom: 1px solid var(--line); }
.topbar h1 { margin: 2px 0 0; font-size: 24px; line-height: 1.1; }
.eyebrow { font-size: 10px; letter-spacing: .18em; color: #9ba7c4; font-weight: 800; }
.badge { border: 1px solid rgba(80,197,210,.45); background: rgba(80,197,210,.12); color: #93eaf1; border-radius: 999px; padding: 7px 10px; font-size: 11px; font-weight: 800; }
main { width: min(100%, 900px); margin: 0 auto; }
.view { display: none; padding: 18px; animation: viewIn .18s ease-out; }
.view.active { display: block; }
.map-view.active { display: block; padding: 0; }
@keyframes viewIn { from { opacity: .5; transform: translateY(4px);} to { opacity: 1; transform: none;} }
.profile-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 14px; scrollbar-width: none; }
.profile-row::-webkit-scrollbar { display: none; }
.profile-chip { flex: 0 0 auto; border: 1px solid var(--line); background: var(--panel); padding: 10px 13px; border-radius: 999px; font-weight: 700; }
.dot { width: 8px; height: 8px; display: inline-block; border-radius: 50%; margin-right: 6px; }
.carrier-dot { background: #ef4444; box-shadow: 0 0 0 4px rgba(239,68,68,.12); }
.hero-card, .drive-card, .form-card, .info-card, .last-result, .result-row, .metric-card { border: 1px solid var(--line); background: linear-gradient(180deg, rgba(37,40,58,.94), rgba(25,27,39,.96)); box-shadow: var(--shadow); }
.hero-card { border-radius: 30px; padding: 18px; }
.hero-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.small-label { font-size: 10px; letter-spacing: .13em; color: var(--muted); text-transform: uppercase; font-weight: 800; margin-bottom: 5px; }
.location-box { text-align: right; color: #dbeafe; font-size: 13px; }
.select { border: 1px solid var(--line); background: #202335; color: var(--text); padding: 9px 12px; border-radius: 12px; min-height: 42px; max-width: 100%; }
.select.minimal { padding-left: 0; background: transparent; border: 0; font-weight: 800; }
.select.full { width: 100%; }
.start-button { width: min(68vw, 280px); aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 18px auto; border: 0; border-radius: 50%; background: linear-gradient(105deg, var(--accent-a), var(--accent-b) 50%, var(--accent-c)); color: white; box-shadow: 0 22px 50px rgba(98,62,255,.34), inset 0 0 0 1px rgba(255,255,255,.16); font-weight: 900; cursor: pointer; }
.start-button:active { transform: scale(.985); }
.start-button.running { animation: pulse 1.4s infinite; }
.start-button #startButtonText { font-size: clamp(27px, 8vw, 42px); }
.start-button small { max-width: 70%; margin-top: 7px; opacity: .78; font-size: 11px; font-weight: 700; }
@keyframes pulse { 0%,100% { box-shadow: 0 20px 50px rgba(98,62,255,.25); } 50% { box-shadow: 0 20px 70px rgba(255,62,152,.48); } }
.phase-text { text-align: center; color: #c8d1e6; font-size: 13px; min-height: 20px; }
.progress-track { height: 7px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,.08); margin-top: 9px; }
.progress-bar { width: 0%; height: 100%; background: linear-gradient(90deg, var(--accent-a), var(--accent-c)); transition: width .2s ease; }
.metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin-top: 12px; }
.metric-card { border-radius: 18px; padding: 15px; min-height: 118px; display: flex; flex-direction: column; justify-content: center; }
.metric-card span { color: var(--muted); font-size: 12px; font-weight: 700; }
.metric-card strong { display: block; font-size: clamp(28px,8vw,40px); margin-top: 4px; letter-spacing: -.03em; }
.metric-card small { color: #b9c1d4; }
.drive-card { display: flex; gap: 16px; align-items: center; justify-content: space-between; margin-top: 12px; border-radius: 18px; padding: 16px; }
.drive-card p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.card-title { font-weight: 900; }
.primary-button, .secondary-button, .icon-button, .link-button { border-radius: 13px; border: 0; padding: 11px 15px; min-height: 44px; font-weight: 800; cursor: pointer; }
.primary-button { background: var(--cyan); color: #071215; }
.secondary-button { background: #30344a; color: white; border: 1px solid var(--line); }
.secondary-button.danger { background: rgba(220,38,38,.17); color: #fecaca; border-color: rgba(220,38,38,.35); }
.icon-button { width: 48px; padding: 0; background: linear-gradient(135deg,var(--accent-a),var(--accent-c)); color: white; font-size: 11px; }
.link-button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.last-result { margin-top: 12px; border-radius: 18px; padding: 16px; }
.last-result h3 { margin: 0 0 8px; }
.last-result .result-numbers { display: grid; grid-template-columns: repeat(4,1fr); gap: 6px; text-align: center; }
.last-result .result-numbers strong { display: block; font-size: 18px; }
.hidden { display: none !important; }
.map-toolbar { position: absolute; top: calc(84px + env(safe-area-inset-top)); left: 12px; right: 12px; z-index: 700; display: grid; grid-template-columns: 1.3fr 1fr 1fr auto; gap: 7px; padding: 10px; background: rgba(26,29,43,.92); border: 1px solid var(--line); backdrop-filter: blur(16px); border-radius: 20px; box-shadow: var(--shadow); }
.map-toolbar .select { min-width: 0; width: 100%; font-size: 12px; padding: 8px; }
#map { height: calc(100dvh - 72px - env(safe-area-inset-bottom)); min-height: 520px; background: #090b12; }
.leaflet-container { font-family: inherit; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: #191c28; color: white; }
.legend-card { position: absolute; left: 16px; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 650; width: min(360px,calc(100% - 32px)); padding: 10px 12px; border-radius: 14px; background: rgba(16,17,25,.88); border: 1px solid var(--line); backdrop-filter: blur(12px); }
.legend-title { font-size: 11px; font-weight: 900; margin-bottom: 7px; }
.legend-scale { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); overflow: hidden; border-radius: 8px; font-size: 9px; font-weight: 900; text-align: center; }
.legend-scale span { padding: 6px 2px; color: white; }
.legend-scale .bad { background: #dc2626; }.legend-scale .poor { background:#ea580c; }.legend-scale .fair { background:#ca8a04; }.legend-scale .good { background:#65a30d; }.legend-scale .excellent { background:#16a34a; }
.map-sheet { position: absolute; left: 12px; right: 12px; bottom: calc(145px + env(safe-area-inset-bottom)); z-index: 680; border-radius: 18px; padding: 14px; background: rgba(24,27,39,.96); border: 1px solid var(--line); box-shadow: var(--shadow); }
.map-sheet strong { font-size: 22px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { margin: 2px 0 0; font-size: 32px; }
.results-list { display: grid; gap: 10px; margin-top: 14px; }
.result-row { border-radius: 18px; padding: 14px; }
.result-row-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.result-row h3 { margin: 0; font-size: 16px; }
.result-row p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.result-values { display: grid; grid-template-columns: repeat(4,1fr); gap: 7px; margin-top: 12px; }
.result-values div { background: rgba(255,255,255,.045); border-radius: 12px; padding: 9px 5px; text-align: center; }
.result-values strong { display: block; font-size: 16px; }.result-values small { color: var(--muted); font-size: 9px; }
.segmented { display: grid; grid-template-columns: repeat(3,1fr); gap: 2px; border-radius: 14px; padding: 3px; background: #2b2e3d; margin-bottom: 14px; }
.segmented button { border: 0; border-radius: 11px; background: transparent; color: #cbd5e1; padding: 10px; font-weight: 800; }
.segmented button.active { background: #f8fafc; color: #111827; }
.tool-panel { display: none; }.tool-panel.active { display: block; }
.form-card { border-radius: 20px; padding: 16px; }
.form-card label { display: block; font-weight: 800; margin-bottom: 13px; }
.form-card input { width: 100%; margin-top: 7px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: #10131c; color: white; outline: none; }
.form-card input:focus, .select:focus { border-color: rgba(80,197,210,.65); box-shadow: 0 0 0 3px rgba(80,197,210,.12); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.button-row { display: flex; gap: 8px; }
.console-output { min-height: 140px; max-height: 420px; overflow: auto; white-space: pre-wrap; border: 1px solid var(--line); background: #0b0d13; color: #d6e5ef; border-radius: 18px; padding: 15px; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.settings-card .select { margin-top: 7px; }
.settings-card input[type=range] { padding: 0; accent-color: var(--cyan); }
.info-card { margin-top: 12px; border-radius: 18px; padding: 16px; }
.info-card p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.bottom-nav { position: fixed; z-index: 1100; left: 10px; right: 10px; bottom: calc(8px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); width: min(720px,calc(100% - 20px)); margin: auto; padding: 7px; border-radius: 25px; background: rgba(27,29,41,.91); border: 1px solid var(--line); box-shadow: 0 12px 40px rgba(0,0,0,.45); backdrop-filter: blur(20px); }
.nav-item { border: 0; border-radius: 18px; background: transparent; color: #8f96a8; min-height: 55px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; }
.nav-item span { font-size: 11px; font-weight: 950; letter-spacing: .07em; }.nav-item small { font-size: 10px; }
.nav-item.active { background: rgba(255,255,255,.10); color: white; }
.toast { position: fixed; left: 50%; bottom: calc(98px + env(safe-area-inset-bottom)); z-index: 2000; transform: translate(-50%,15px); opacity: 0; pointer-events: none; background: #f8fafc; color: #111827; border-radius: 999px; padding: 10px 15px; font-weight: 800; font-size: 12px; transition: .2s; box-shadow: var(--shadow); max-width: calc(100% - 30px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
@media (max-width: 660px) {
  .map-toolbar { grid-template-columns: 1fr 1fr 1fr; top: calc(80px + env(safe-area-inset-top)); }
  .map-toolbar .icon-button { grid-column: 3; grid-row: 2; justify-self: end; }
  .map-toolbar #mapMetric { grid-column: 1 / 4; }
  .drive-card { align-items: stretch; flex-direction: column; }
  .last-result .result-numbers { grid-template-columns: repeat(2,1fr); }
}
@media (min-width: 700px) {
  .metric-grid { grid-template-columns: repeat(4,1fr); }
  .view { padding: 28px; }
}

/* v0.2.0 provider + web updater */
.provider-card { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-top:12px; border-radius:18px; padding:15px; background:rgba(32,35,53,.9); border:1px solid var(--line); }
.provider-card strong { display:block; font-size:17px; }
.provider-card p { margin:5px 0 0; color:var(--muted); font-size:11px; line-height:1.4; word-break:break-word; }
.result-provider { margin-top:12px; padding-top:10px; border-top:1px solid var(--line); color:#c7d2fe; font-size:12px; word-break:break-word; }
.update-entry-card { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.update-status-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-bottom:12px; }
.update-status-grid .info-card { margin-top:0; }
.update-status-grid strong { display:block; font-size:22px; }
.update-message { margin-top:12px; text-transform:none; letter-spacing:0; line-height:1.4; }
.inline-check { display:flex !important; gap:9px; align-items:center; font-weight:700 !important; }
.inline-check input { width:auto !important; margin:0 !important; }
.release-list { display:grid; gap:8px; margin-top:12px; }
.release-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 12px; border-radius:13px; background:rgba(255,255,255,.045); border:1px solid var(--line); }
.release-row strong { display:block; }
.release-row small { display:block; margin-top:2px; color:var(--muted); }
.badge-mini { padding:6px 9px; border-radius:999px; background:rgba(34,197,94,.14); color:#86efac; font-size:10px; font-weight:900; }
#stagedUpdateCard h3 { margin:5px 0 8px; font-size:24px; }
#stagedUpdateCard .primary-button { margin-top:10px; }
#uploadUpdateBtn:disabled { opacity:.45; cursor:not-allowed; }
@media (max-width:660px) {
  .provider-card, .update-entry-card { align-items:stretch; flex-direction:column; }
  .update-status-grid { grid-template-columns:1fr 1fr; }
}

/* v0.2.1 Speedtest.net import */
.result-actions { justify-content:flex-end; flex-wrap:wrap; }
.result-source { margin-top:5px; color:var(--muted); font-size:11px; }
.result-source a { color:#72d7e2; text-decoration:none; font-weight:800; }
.import-note, .import-help { color:var(--muted); line-height:1.5; }
.import-note { margin:5px 0 14px; font-size:12px; }
.import-help { margin-top:-4px; margin-bottom:8px; }
#view-import .button-row { flex-wrap:wrap; }
@media (max-width: 640px) { .result-actions { width:100%; justify-content:stretch; } .result-actions > * { flex:1; } }

/* Coverage Lab v0.2.3 map detail layout + admin controls */
.map-view.active { width:100vw; margin-left:calc(50% - 50vw); }
.map-layout { height:calc(100dvh - 72px - env(safe-area-inset-bottom)); min-height:520px; display:grid; grid-template-columns:minmax(0,1fr); background:#161923; overflow:hidden; }
.map-layout.details-open { grid-template-columns:minmax(0,1fr) minmax(330px,390px); }
.map-stage { position:relative; min-width:0; min-height:0; height:100%; overflow:hidden; }
.map-stage #map { height:100%; min-height:0; width:100%; }
.map-stage .map-toolbar { top:12px; left:12px; right:12px; }
.map-stage .legend-card { bottom:calc(96px + env(safe-area-inset-bottom)); }
.map-sheet { position:relative; inset:auto; width:auto; height:100%; max-height:none; overflow:auto; border-radius:0; padding:18px 18px calc(105px + env(safe-area-inset-bottom)); background:#171a26; border-width:0 0 0 1px; box-shadow:-18px 0 45px rgba(0,0,0,.2); }
.map-sheet-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; padding-bottom:14px; border-bottom:1px solid var(--line); }
.map-sheet-head h3 { margin:3px 0 4px; font-size:25px; }
.map-sheet-head p, .grid-detail-section p { margin:0; color:var(--muted); font-size:12px; line-height:1.5; }
.map-sheet-close { min-width:72px; }
.grid-detail-metrics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:14px; }
.grid-detail-metrics > div { border:1px solid var(--line); background:rgba(255,255,255,.04); border-radius:14px; padding:11px; }
.grid-detail-metrics span, .grid-detail-metrics small { display:block; color:var(--muted); font-size:10px; }
.grid-detail-metrics strong { display:block; margin:3px 0 1px; font-size:20px; }
.grid-range { display:grid; gap:4px; margin-top:10px; padding:12px; border-radius:14px; background:rgba(255,255,255,.035); color:#cbd5e1; font-size:11px; }
.grid-range strong { color:white; font-size:12px; }
.grid-detail-section { margin-top:15px; padding-top:13px; border-top:1px solid var(--line); }
.breakdown-row { display:flex; flex-wrap:wrap; gap:6px; }
.breakdown-chip { padding:7px 9px; border-radius:999px; background:#292d40; color:#dbeafe; border:1px solid var(--line); font-size:10px; }
.breakdown-chip strong { font-size:10px; }
.grid-sample-list { display:grid; gap:8px; }
.grid-sample { border:1px solid var(--line); border-radius:13px; padding:10px; background:rgba(255,255,255,.035); }
.grid-sample > div { display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.grid-sample span, .grid-sample small { color:var(--muted); font-size:10px; }
.grid-sample small { display:block; margin-top:6px; }
.muted { color:var(--muted); }

.admin-access-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
.admin-password-form { margin-top:14px; padding-top:14px; border-top:1px solid var(--line); }
.admin-password-form label, .modal-card label { display:block; font-weight:800; margin:10px 0; }
.admin-password-form input, .modal-card input { width:100%; margin-top:7px; padding:12px; border-radius:12px; border:1px solid var(--line); background:#10131c; color:white; }
.admin-help { border-top:1px solid var(--line); padding-top:11px; }
.modal-backdrop { position:fixed; inset:0; z-index:4000; display:flex; align-items:center; justify-content:center; padding:20px; background:rgba(3,5,12,.72); backdrop-filter:blur(12px); }
.modal-card { width:min(480px,100%); border:1px solid var(--line); background:#1b1e2b; border-radius:22px; padding:20px; box-shadow:0 25px 80px rgba(0,0,0,.55); }
.modal-card p { color:var(--muted); line-height:1.5; font-size:13px; }
.modal-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.modal-head h2 { margin:2px 0 0; }
.modal-close { min-width:70px; }

@media (max-width:799px) {
  .map-layout.details-open { grid-template-columns:1fr; grid-template-rows:minmax(46dvh,1fr) minmax(0,38dvh); overflow:hidden; }
  .map-layout.details-open .map-stage { grid-row:1; }
  .map-layout.details-open .map-sheet { grid-row:2; border-width:1px 0 0; border-radius:20px 20px 0 0; padding:15px 15px calc(100px + env(safe-area-inset-bottom)); box-shadow:0 -18px 45px rgba(0,0,0,.28); }
  .map-stage .map-toolbar { top:10px; }
  .map-stage .legend-card { bottom:calc(88px + env(safe-area-inset-bottom)); }
  .admin-access-head { flex-direction:column; }
}

/* Coverage Lab v0.3.0 CoverageMap-inspired speed workflow */
.live-test-strip {
  margin-top: 11px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(47, 50, 69, .88);
  color: #d7d9e7;
  font-size: 12px;
}
.live-test-strip strong { color: #fff; }
.multi-run-status {
  margin-top: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(40,43,60,.92);
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: #e9eaf2;
}
.admin-update-note {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(80,197,210,.09);
  border: 1px solid rgba(80,197,210,.18);
  color: #b8f2f6;
  font-size: 12px;
  line-height: 1.45;
}

.multi-test-card { width: min(620px, 100%); max-height: calc(100dvh - 28px); overflow: auto; }
.multi-settings-group {
  margin-top: 14px;
  padding: 16px;
  border-radius: 20px;
  background: #2b2d40;
  border: 1px solid rgba(255,255,255,.07);
}
.setting-line { display:flex; align-items:center; justify-content:space-between; gap:12px; margin: 3px 0 9px; }
.setting-line span { font-size: 15px; }
.setting-line strong { min-width: 66px; text-align:center; border-radius:999px; background:#4a4d66; padding:8px 12px; }
.multi-settings-group input[type=range] { width:100%; accent-color:#4a8cff; margin:0 0 14px; }
.multi-settings-group input[type=range]:last-child { margin-bottom:0; }
.multi-presets { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:14px; }
.multi-preset {
  min-height: 132px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 22px;
  background: #2a2c3e;
  color: white;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:5px;
  padding:12px 8px;
}
.multi-preset > span { font-size:26px; }
.multi-preset strong { font-size:17px; }
.multi-preset small { color:#c1c4d3; text-align:center; line-height:1.35; }
.multi-preset.active { background: linear-gradient(115deg,#278cff,#7b37ff 52%,#ff526e); box-shadow:0 16px 38px rgba(83,68,255,.25); }
.multi-plan-card { margin:14px 0; padding:14px 16px; border-radius:18px; background:#242637; border:1px solid rgba(255,255,255,.08); }
.multi-plan-card strong { display:block; font-size:14px; }
.multi-plan-card small { display:block; margin-top:6px; color:#aeb4c6; line-height:1.45; }
.gradient-action {
  width:100%;
  min-height:58px;
  border:0;
  border-radius:22px;
  background: linear-gradient(105deg,#278cff,#7938ff 48%,#ff586d);
  color:white;
  font-weight:900;
  font-size:17px;
  box-shadow:0 14px 38px rgba(93,64,255,.25);
}

/* Make the main speed view read more like a mobile network-testing app. */
#view-test .hero-card { overflow:hidden; position:relative; }
#view-test .hero-card::before {
  content:"";
  position:absolute;
  width:240px; height:240px;
  left:50%; top:38%; transform:translate(-50%,-50%);
  background:radial-gradient(circle,rgba(98,62,255,.18),transparent 68%);
  pointer-events:none;
}
#view-test .metric-grid { gap:8px; }
#view-test .metric-card { box-shadow:none; background:#222536; }
#view-test .metric-card:nth-child(1) { background:linear-gradient(145deg,rgba(20,152,255,.25),rgba(69,64,210,.23)); }
#view-test .metric-card:nth-child(2) { background:linear-gradient(145deg,rgba(124,50,255,.22),rgba(255,62,152,.23)); }

@media (max-width:660px) {
  .topbar { padding-top:calc(10px + env(safe-area-inset-top)); padding-bottom:10px; }
  .topbar h1 { font-size:21px; }
  #view-test { padding-top:10px; }
  #view-test .hero-card { border-radius:26px; }
  #view-test .start-button { width:min(62vw,250px); }
  #view-test .metric-card { min-height:96px; padding:12px; }
  #view-test .metric-card strong { font-size:30px; }
  .multi-test-modal { align-items:flex-end; padding:0; }
  .multi-test-card { width:100%; max-height:94dvh; border-radius:28px 28px 0 0; padding:18px 18px calc(24px + env(safe-area-inset-bottom)); }
  .multi-presets { gap:7px; }
  .multi-preset { min-height:120px; padding:9px 5px; }
  .multi-preset strong { font-size:15px; }
  .multi-preset small { font-size:10px; }
  .result-row { border-radius:24px; }
  .result-values { grid-template-columns:repeat(3,1fr); }
  .result-values > div:nth-child(4) { display:none; }
}


/* Coverage Lab v0.3.1 privacy, server-select, and zoom-aware grid polish */
.select, .select option { color-scheme: dark; }
.select option { background:#171a26 !important; color:#f8fafc !important; }
.select.minimal {
  padding:9px 34px 9px 11px;
  background:#202335;
  border:1px solid #3a4058;
  color:#fff;
  border-radius:12px;
  min-width:190px;
}
.select.minimal:focus { border-color:#50c5d2; box-shadow:0 0 0 3px rgba(80,197,210,.16); }
.leaflet-interactive { transition:fill-opacity .12s ease, stroke-width .12s ease; }
.leaflet-tooltip { background:#10131c; color:#fff; border:1px solid #475569; box-shadow:0 8px 22px rgba(0,0,0,.35); font-weight:800; }
.legend-title { font-weight:900; }
.admin-locked-view { min-height:55vh; }
@media (max-width:640px) {
  .select.minimal { min-width:0; width:100%; }
}

/* Coverage Lab v0.4.0 field-testing platform */
:root { --carrier-verizon:#f45f67; --carrier-tmobile:#df5bd7; --carrier-att:#4c83e6; --carrier-boost:#f59a45; --carrier-other:#68c9b4; }
body { overscroll-behavior-y:none; }
.multi-session-controls { display:flex; gap:8px; justify-content:center; margin-top:8px; }
.multi-session-controls .secondary-button { min-width:110px; }

.map-toolbar-v4 { display:grid !important; grid-template-columns:minmax(150px,1fr) minmax(150px,1fr) minmax(120px,.8fr) auto; gap:8px; align-items:center; }
.map-options { grid-column:1/-1; border:1px solid rgba(255,255,255,.08); border-radius:14px; background:rgba(17,19,28,.88); backdrop-filter:blur(12px); }
.map-options summary { cursor:pointer; padding:9px 12px; font-weight:800; color:#dbeafe; }
.map-option-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; padding:0 12px 12px; }
.map-option-grid label { color:var(--muted); font-size:11px; display:grid; gap:5px; }
.map-option-grid input[type=range] { width:100%; accent-color:#8b5cf6; }
.map-stage .leaflet-interactive { stroke-linejoin:round; }

.result-filter-card { display:grid; grid-template-columns:2fr repeat(4,minmax(120px,1fr)) auto; gap:8px; margin-bottom:12px; padding:12px; background:#1d2030; border:1px solid var(--line); border-radius:18px; }
.result-filter-card input,.result-filter-card select { min-width:0; }
.results-toolbar { display:flex; gap:10px; align-items:center; justify-content:flex-end; margin:8px 0 10px; }
.compact-results { display:grid; gap:10px; }
.compact-result-card { position:relative; display:grid; grid-template-columns:28px 50px minmax(0,1fr) auto; align-items:center; gap:12px; min-height:104px; padding:14px 18px; border:1px solid rgba(255,255,255,.08); border-radius:24px; background:#25283a; cursor:pointer; overflow:hidden; }
.compact-result-card::before { content:""; position:absolute; inset:0 auto 0 0; width:5px; background:var(--carrier-other); }
.compact-result-card.carrier-verizon::before{background:var(--carrier-verizon)} .compact-result-card.carrier-tmobile::before{background:var(--carrier-tmobile)} .compact-result-card.carrier-att::before{background:var(--carrier-att)} .compact-result-card.carrier-boost::before{background:var(--carrier-boost)}
.compact-result-card.failed { opacity:.82; border-color:rgba(239,68,68,.32); }
.result-check { display:flex; justify-content:center; }
.result-icon { width:48px; height:48px; border-radius:14px; background:rgba(255,255,255,.07); display:grid; place-items:center; font-size:25px; }
.result-main { display:grid; gap:3px; min-width:0; } .result-main strong { font-size:18px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; } .result-main span { color:#aeb4c6; font-size:12px; }
.result-speeds { display:grid; text-align:right; gap:3px; font-variant-numeric:tabular-nums; } .result-speeds span,.result-speeds strong { font-size:14px; } .result-speeds small { max-width:180px; color:#fca5a5; }
.result-detail-card { width:min(720px,100%); max-height:90dvh; overflow:auto; }
.detail-score-row { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin:12px 0; }.detail-score-row span { padding:10px; border-radius:14px; background:#242737; text-align:center; color:#aeb4c6; font-size:11px; }.detail-score-row b { display:block; color:#fff; font-size:22px; margin-top:2px; }
.detail-list { margin-top:12px; padding:12px; border-radius:14px; background:rgba(255,255,255,.035); }.detail-list p { margin:6px 0; }

.analytics-panel { margin-top:22px; padding:14px; border-radius:22px; background:#171a26; border:1px solid var(--line); }
.section-head.compact { margin-bottom:10px; }
.analytics-filters { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-bottom:10px; }
.carrier-comparison { display:grid; gap:10px; margin-top:12px; }
.carrier-compare-card { padding:14px; border-radius:20px; background:#232637; border:1px solid rgba(255,255,255,.07); }
.carrier-compare-card > div:first-child { display:grid; grid-template-columns:1fr auto auto; align-items:baseline; gap:8px; }.carrier-compare-card strong{font-size:17px}.carrier-compare-card span,.carrier-compare-card small{color:#aeb4c6}.carrier-compare-card b{font-size:22px}
.carrier-compare-card.carrier-verizon{background:rgba(120,35,45,.24)} .carrier-compare-card.carrier-tmobile{background:rgba(100,35,105,.24)} .carrier-compare-card.carrier-att{background:rgba(38,60,110,.24)} .carrier-compare-card.carrier-boost{background:rgba(106,68,35,.24)}
.compare-track { position:relative; height:12px; margin:12px 0 8px; border-radius:999px; background:linear-gradient(90deg,#ef3f3f,#ff8a00,#ffd000,#a9e12d,#13a85d); }.compare-track i{position:absolute;top:50%;width:24px;height:24px;border-radius:50%;background:#fff;border:4px solid #91e629;transform:translate(-50%,-50%);box-shadow:0 2px 8px rgba(0,0,0,.3)}
.session-list { display:grid; gap:9px; }.session-card { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:12px; border-radius:16px; background:#222536; border:1px solid var(--line); }.session-card>div:first-child{display:grid;gap:4px}.session-card span{color:#aeb4c6;font-size:12px}

.admin-command { margin-top:16px; }.admin-grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:10px 0; }.mini-stat{display:flex;justify-content:space-between;gap:10px;padding:8px 0;border-bottom:1px solid rgba(255,255,255,.06)}.mini-stat:last-child{border:0}.mini-stat .ok{color:#86efac}.mini-stat .bad{color:#fca5a5}
.release-row { display:flex; justify-content:space-between; gap:12px; align-items:center; padding:10px 0; border-bottom:1px solid rgba(255,255,255,.06); }.release-row small{display:block;color:#aeb4c6;margin-top:3px}

body.standalone .topbar { padding-top:calc(8px + env(safe-area-inset-top)); }
@media (orientation:landscape) and (max-height:600px){ #view-test .hero-card{display:grid;grid-template-columns:1fr 1.2fr;gap:10px;align-items:center}.hero-meta,.live-test-strip,.multi-run-status,.multi-session-controls{grid-column:1}.start-button{grid-column:2;grid-row:1/5}.metric-grid{grid-template-columns:repeat(4,1fr)} }
@media(max-width:900px){ .result-filter-card{grid-template-columns:1fr 1fr}.result-filter-card input{grid-column:1/-1}.map-toolbar-v4{grid-template-columns:1fr 1fr}.map-option-grid{grid-template-columns:1fr 1fr}.admin-grid-2{grid-template-columns:1fr} }
@media(max-width:620px){ .compact-result-card{grid-template-columns:24px 42px minmax(0,1fr);padding:13px 12px}.result-speeds{grid-column:3;text-align:left;grid-template-columns:repeat(3,auto);gap:8px}.result-main strong{font-size:16px}.result-icon{width:40px;height:40px}.analytics-filters,.map-option-grid{grid-template-columns:1fr}.detail-score-row{grid-template-columns:1fr 1fr}.session-card{align-items:flex-start;flex-direction:column}.result-filter-card{grid-template-columns:1fr}.map-toolbar-v4{grid-template-columns:1fr 1fr}.map-options{grid-column:1/-1}.map-stage .map-toolbar{max-height:42dvh;overflow:auto}.result-detail-card{width:100%;max-height:92dvh;border-radius:26px 26px 0 0}.modal-backdrop:has(.result-detail-card){align-items:flex-end;padding:0}.results-toolbar{justify-content:space-between} }
body.focus-speed .topbar, body.focus-speed #providerCard, body.focus-speed .drive-card, body.focus-speed .bottom-nav { display:none !important; }
body.focus-speed #view-test { display:block !important; min-height:100dvh; padding:calc(10px + env(safe-area-inset-top)) 14px calc(10px + env(safe-area-inset-bottom)); }
body.focus-speed #view-test .hero-card { min-height:58dvh; display:flex; flex-direction:column; justify-content:center; }
body.focus-speed #view-test .profile-row { position:sticky; top:env(safe-area-inset-top); z-index:5; }

/* Coverage Lab v0.5.1 analytics + recovery polish */
.v5-filter-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:12px}.timeline-chart{min-height:250px;border:1px solid rgba(255,255,255,.07);border-radius:18px;background:linear-gradient(180deg,rgba(124,92,255,.08),rgba(255,255,255,.015));overflow:hidden;padding:6px}.trend-svg{display:block;width:100%;height:250px}.trend-svg line{stroke:#45506a;stroke-width:1}.trend-svg polyline{fill:none;stroke:#8b7cff;stroke-width:4;stroke-linecap:round;stroke-linejoin:round}.trend-svg circle{fill:#c4b5fd;stroke:#171a26;stroke-width:2}.trend-svg text{fill:#8f9ab2;font-size:11px}.empty-analytics{min-height:120px;display:grid;place-items:center;color:#9ca7bb;text-align:center;padding:20px}
.scorecard-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.scorecard{position:relative;padding:14px;border-radius:20px;background:#222638;border:1px solid rgba(255,255,255,.08);overflow:hidden}.scorecard:before{content:"";position:absolute;inset:0 auto 0 0;width:5px;background:var(--carrier-other)}.scorecard.carrier-verizon:before{background:var(--carrier-verizon)}.scorecard.carrier-tmobile:before{background:var(--carrier-tmobile)}.scorecard.carrier-att:before{background:var(--carrier-att)}.scorecard.carrier-boost:before{background:var(--carrier-boost)}.scorecard-head{display:flex;justify-content:space-between;gap:10px;align-items:center}.scorecard-head strong{display:block;font-size:18px}.scorecard-head small,.scorecard>small{display:block;color:#aeb4c6;margin-top:4px}.score-ring{width:58px;height:58px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(#7c5cff calc(var(--score-pct,80)*1%),#32384a 0);border:4px solid #3c4357;font-size:19px;font-weight:900}.scorecard-bars{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin:12px 0}.scorecard-bars span{background:#191d2a;border-radius:12px;padding:8px;text-align:center;color:#9ea8bd;font-size:11px}.scorecard-bars b{display:block;color:white;font-size:17px}.scorecard-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.scorecard-stats span{font-variant-numeric:tabular-nums;font-weight:800;text-align:center;padding:8px;border-radius:11px;background:rgba(255,255,255,.035)}
.region-dashboard{display:grid;gap:8px}.region-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px;border-radius:15px;background:#222638;border:1px solid rgba(255,255,255,.06)}.region-row>div:first-child{min-width:0}.region-row strong,.region-row small{display:block}.region-row small{color:#aeb4c6;margin-top:3px}.region-metrics{display:grid;grid-template-columns:repeat(4,minmax(54px,auto));gap:7px;align-items:center;text-align:center}.region-metrics span,.region-metrics b{padding:7px 8px;border-radius:10px;background:#181c29}.region-metrics b{min-width:46px}.grade-excellent{color:#86efac}.grade-good{color:#bef264}.grade-fair{color:#fde047}.grade-poor{color:#fdba74}.grade-bad{color:#fca5a5}
.dead-zone-list{display:grid;gap:8px}.dead-zone{display:grid;grid-template-columns:38px minmax(0,1fr) auto;gap:10px;align-items:center;padding:11px 12px;border-radius:16px;background:#242331;border:1px solid rgba(255,255,255,.07)}.dead-zone.critical{border-color:rgba(239,68,68,.55);background:rgba(90,32,44,.28)}.dead-zone.high{border-color:rgba(249,115,22,.38)}.dead-icon{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;font-weight:950;background:#5a2630;color:#fecaca}.dead-zone strong,.dead-zone span,.dead-zone small{display:block}.dead-zone span,.dead-zone small{color:#aeb4c6;font-size:12px}.dead-zone small{margin-top:3px}
.playback-hud{position:absolute;z-index:700;left:50%;top:14px;transform:translateX(-50%);display:flex;align-items:center;gap:14px;justify-content:space-between;min-width:min(520px,calc(100% - 24px));padding:10px 12px;border-radius:16px;background:rgba(17,20,31,.92);border:1px solid #4c5270;box-shadow:0 12px 28px rgba(0,0,0,.35);backdrop-filter:blur(12px)}.playback-hud strong,.playback-hud small{display:block}.playback-hud small{color:#aeb4c6;margin-top:2px}
.health-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0}.health-grid>div{padding:10px;border-radius:13px;background:#191d2a}.health-grid span,.health-grid b{display:block}.health-grid span{color:#9da8bc;font-size:11px}.health-grid b{margin-top:3px;font-size:15px}.audit-list{max-height:320px;overflow:auto;margin-top:8px}.audit-row{display:grid;grid-template-columns:minmax(180px,.8fr) minmax(0,1.2fr);gap:12px;padding:9px 0;border-bottom:1px solid rgba(255,255,255,.06)}.audit-row:last-child{border-bottom:0}.audit-row strong,.audit-row small{display:block}.audit-row small,.audit-row>span{color:#aeb4c6;font-size:11px;overflow-wrap:anywhere}.audit-row>span{text-align:right}.v5-analytics{background:linear-gradient(160deg,rgba(49,46,129,.18),#171a26 46%)}
@media(max-width:820px){.v5-filter-row{grid-template-columns:1fr 1fr}.scorecard-grid{grid-template-columns:1fr}.health-grid{grid-template-columns:1fr 1fr}.region-row{align-items:flex-start;flex-direction:column}.region-metrics{width:100%;grid-template-columns:repeat(4,1fr)}}
@media(max-width:560px){.v5-filter-row{grid-template-columns:1fr}.region-metrics{grid-template-columns:1fr 1fr}.dead-zone{grid-template-columns:34px 1fr}.dead-zone .dead-zone-map{grid-column:2;width:100%}.health-grid{grid-template-columns:1fr 1fr}.audit-row{grid-template-columns:1fr}.audit-row>span{text-align:left}.playback-hud{top:8px;align-items:flex-start;flex-direction:column}.playback-hud .button-row{width:100%}.playback-hud .button-row button{flex:1}.trend-svg{height:220px}.timeline-chart{min-height:220px}}

/* Coverage Lab v0.5.2 server health reliability polish */
.preview-file-block + .preview-file-block{border-top:1px solid rgba(255,255,255,.09);margin-top:14px;padding-top:14px}.preview-table-wrap{overflow:auto;margin-top:10px;border:1px solid rgba(255,255,255,.08);border-radius:12px}.preview-table{width:100%;border-collapse:collapse;min-width:720px;font-size:.82rem}.preview-table th,.preview-table td{padding:8px 10px;text-align:left;border-bottom:1px solid rgba(255,255,255,.06);white-space:nowrap}.preview-table th{position:sticky;top:0;background:#171a23;color:#cfd5e6}.preview-table td{color:#f4f6fb}.ok{color:#7fe0a5!important}.bad{color:#ff9c9c!important}

/* v0.5.2 direct server health */
.server-admin-row{align-items:center;gap:12px}
.server-admin-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.server-probe-status{display:inline-block;margin-top:6px;font-size:.8rem;font-weight:800}
.server-probe-status.ok{color:#70e7b7}.server-probe-status.bad{color:#ff8d98}.server-probe-status.muted{color:var(--muted)}

/* Coverage Lab v0.5.4 fixed five-tab navigation + Stats */
.bottom-nav {
  grid-template-columns:repeat(5,minmax(0,1fr)) !important;
  min-height:70px;
  align-items:stretch;
}
.bottom-nav .nav-item {
  width:100%;
  min-width:0;
  min-height:56px;
  padding:7px 4px;
  line-height:1;
  white-space:nowrap;
}
.bottom-nav .nav-item span { min-height:13px; display:flex; align-items:center; justify-content:center; }
.bottom-nav .nav-item small { min-height:12px; display:flex; align-items:center; justify-content:center; }
.stats-entry-card { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.stats-entry-card > div { min-width:0; }
.stats-entry-card p { margin-bottom:0; }
#view-results .section-head { align-items:flex-start; }
@media(max-width:620px){
  .bottom-nav{left:8px;right:8px;width:calc(100% - 16px);padding:6px;border-radius:22px;}
  .bottom-nav .nav-item{min-height:54px;border-radius:16px;}
  .stats-entry-card{align-items:stretch;flex-direction:column;}
  #view-results .result-actions{width:100%;display:grid;grid-template-columns:1fr 1fr;}
  #view-results .result-actions .secondary-button:first-child{grid-column:1/-1;}
}

/* v0.5.4: Stats always occupies a fixed nav slot; locked state never changes layout. */
.bottom-nav .nav-item[data-admin-nav="stats"].locked { opacity:.58; }
.bottom-nav .nav-item[data-admin-nav="stats"].locked small::after { content:" · Lock"; font-size:8px; opacity:.78; }
@media(max-width:420px){
  .bottom-nav .nav-item{padding:6px 2px;}
  .bottom-nav .nav-item span{font-size:10px;}
  .bottom-nav .nav-item small{font-size:9px;}
}


/* Coverage Lab v0.5.5: dedicated Stats and Logs tabs with a stable six-slot bar. */
.bottom-nav { grid-template-columns:repeat(6,minmax(0,1fr)) !important; }
.bottom-nav .nav-item[data-admin-nav="logs"].locked { opacity:.58; }
.bottom-nav .nav-item[data-admin-nav="logs"].locked small::after { content:" · Lock"; font-size:8px; opacity:.78; }
#view-results .section-head, #view-logs .section-head { align-items:flex-start; }
@media(max-width:620px){
  #view-logs .result-actions{width:auto;display:flex;grid-template-columns:none;}
}
@media(max-width:420px){
  .bottom-nav .nav-item{padding:5px 1px;}
  .bottom-nav .nav-item span{font-size:9px;}
  .bottom-nav .nav-item small{font-size:8px;}
  .bottom-nav .nav-item[data-admin-nav].locked small::after{display:none;}
}


/* Coverage Lab v0.5.6: logical five-slot primary nav + Stats/Logs secondary tabs. */
.bottom-nav { grid-template-columns:repeat(5,minmax(0,1fr)) !important; }
.stats-subnav{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:5px;margin:0 0 14px;border-radius:16px;background:rgba(255,255,255,.045);border:1px solid rgba(255,255,255,.07)}
.stats-subnav-item{min-height:42px;border:0;border-radius:12px;background:transparent;color:#9ea6ba;font-weight:850;letter-spacing:.01em}
.stats-subnav-item.active{background:rgba(255,255,255,.10);color:#fff;box-shadow:inset 0 0 0 1px rgba(255,255,255,.06)}
@media(max-width:520px){.bottom-nav .nav-item{padding:6px 2px}.bottom-nav .nav-item span{font-size:10px}.bottom-nav .nav-item small{font-size:9px}.stats-subnav{margin-bottom:12px}}


/* Coverage Lab v0.5.6: carrier comparison bars use one shared, visible scale. */
.compare-scale{display:grid;grid-template-columns:auto 1fr auto;gap:8px;align-items:center;margin:-1px 0 7px;color:#8993aa;font-size:9px;font-weight:700;letter-spacing:.02em}.compare-scale span:nth-child(2){text-align:center;opacity:.72}.carrier-compare-card>small{display:block;margin-top:2px}


/* Coverage Lab v0.5.7: compact Stats + five-place primary navigation. */
.bottom-nav{grid-template-columns:repeat(5,minmax(0,1fr))!important;max-width:720px}
.bottom-nav .nav-item{min-width:0}
.stats-page-head{margin-bottom:10px}
.stats-page-subtitle{margin:3px 0 0;color:var(--muted);font-size:.86rem;line-height:1.35}
.stats-leader-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:0 0 10px}
.stats-leader-card{display:flex;flex-direction:column;gap:3px;padding:11px 12px;border:1px solid var(--line);border-radius:15px;background:rgba(255,255,255,.045);min-width:0}
.stats-leader-card small{color:#99a2b8;text-transform:uppercase;font-size:.63rem;font-weight:850;letter-spacing:.06em}
.stats-leader-card strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.96rem}
.stats-leader-card span{color:#cbd2e3;font-size:.72rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.stats-primary-panel{margin-bottom:10px!important;padding:12px!important}
.stats-primary-panel .section-head{margin-bottom:8px}
.stats-primary-panel .analytics-filters{margin-bottom:8px}
.stats-primary-panel .comparison-tabs{margin-bottom:8px}
.compact-carrier-comparison{gap:7px}
.compact-carrier-comparison .carrier-compare-card{padding:10px 12px;border-radius:15px}
.compact-carrier-comparison .carrier-compare-card>div:first-child{margin-bottom:5px}
.compact-carrier-comparison .compare-scale{margin-bottom:4px}
.analytics-collapse{margin:8px 0;border:1px solid var(--line);border-radius:16px;background:rgba(255,255,255,.035);overflow:hidden}
.analytics-collapse>summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:13px 14px;user-select:none}
.analytics-collapse>summary::-webkit-details-marker{display:none}
.analytics-collapse>summary span{display:flex;flex-direction:column;gap:2px;min-width:0}
.analytics-collapse>summary b{font-size:.9rem}
.analytics-collapse>summary small{font-size:.72rem;color:var(--muted);font-weight:600}
.analytics-collapse>summary i{font-style:normal;color:#aab3c8;font-size:.72rem;font-weight:800}
.analytics-collapse[open]>summary{border-bottom:1px solid var(--line)}
.analytics-collapse[open]>summary i{font-size:0}
.analytics-collapse[open]>summary i::after{content:"Close";font-size:.72rem}
.analytics-collapse .embedded-panel{margin:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
.more-grid{display:grid;grid-template-columns:1fr;gap:10px}
.more-card{display:grid;grid-template-columns:48px 1fr auto;align-items:center;gap:12px;width:100%;padding:15px;border-radius:18px;border:1px solid var(--line);background:rgba(255,255,255,.045);color:var(--text);text-align:left}
.more-card:hover{background:rgba(255,255,255,.075)}
.more-card .more-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:14px;background:rgba(255,255,255,.08);font-size:.7rem;font-weight:900;letter-spacing:.06em}
.more-card>span:nth-child(2){display:flex;flex-direction:column;gap:3px;min-width:0}
.more-card strong{font-size:.98rem}.more-card small{color:var(--muted);line-height:1.3}.more-card>b{font-size:1.5rem;color:#9ba5bc}
@media(max-width:760px){.stats-leader-grid{grid-template-columns:1fr 1fr}}
@media(max-width:430px){.stats-leader-grid{grid-template-columns:1fr 1fr;gap:6px}.stats-leader-card{padding:9px 10px}.bottom-nav .nav-item span{font-size:9px}.bottom-nav .nav-item small{font-size:9px}.analytics-collapse>summary{padding:12px}.stats-primary-panel{padding:10px!important}}


/* Coverage Lab v0.5.8 Field Intelligence */
.server-intel-card{margin:12px 0;padding:14px;border:1px solid rgba(255,255,255,.08);border-radius:18px;background:rgba(24,27,42,.82)}
.server-intel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.server-intel-head strong{display:block;font-size:1rem}
.server-intel-list{display:grid;gap:7px}.server-intel-row{display:grid;grid-template-columns:30px 1fr auto;align-items:center;gap:9px;padding:9px 10px;border-radius:13px;background:rgba(255,255,255,.035);border:1px solid transparent}.server-intel-row strong,.server-intel-row small{display:block}.server-intel-row small{opacity:.68;margin-top:2px}.server-intel-row b{font-size:.95rem}.server-rank{display:grid;place-items:center;width:26px;height:26px;border-radius:9px;background:rgba(255,255,255,.07);font-weight:800}.server-intel-row.healthy{border-color:rgba(34,197,94,.22)}.server-intel-row.slow{border-color:rgba(250,204,21,.22)}.server-intel-row.poor,.server-intel-row.offline{border-color:rgba(248,113,113,.22)}
.drive-live-hud{margin:10px 0 14px;padding:14px;border-radius:18px;background:linear-gradient(145deg,rgba(42,46,72,.95),rgba(24,26,39,.95));border:1px solid rgba(124,92,255,.32)}.drive-live-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.drive-live-head>span{font-variant-numeric:tabular-nums;font-weight:800;font-size:1.15rem}.drive-live-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.drive-live-grid>div{background:rgba(255,255,255,.045);padding:9px;border-radius:12px;min-width:0}.drive-live-grid small,.drive-live-grid strong{display:block}.drive-live-grid small{opacity:.58;font-size:.68rem}.drive-live-grid strong{font-size:.86rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}
.stats-range-bar{display:flex;align-items:center;gap:6px;margin:8px 0 12px;padding:5px;border-radius:14px;background:rgba(255,255,255,.035);width:max-content;max-width:100%}.stats-range-bar>span{padding:0 7px;font-size:.72rem;opacity:.58}.stats-range-btn{border:0;border-radius:10px;padding:8px 11px;background:transparent;color:inherit;font-weight:700}.stats-range-btn.active{background:#f5f7fb;color:#111525}
.stats-ranking-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0 0 12px}.ranking-card{padding:12px;border-radius:16px;background:rgba(31,34,51,.92);border:1px solid rgba(255,255,255,.07)}.ranking-card>div:first-child{margin-bottom:7px}.ranking-card>div:first-child strong,.ranking-card>div:first-child small{display:block}.ranking-card>div:first-child small{opacity:.55;font-size:.68rem;margin-top:2px}.ranking-row{display:grid;grid-template-columns:22px 1fr auto;align-items:center;gap:6px;padding:7px 0;border-top:1px solid rgba(255,255,255,.055)}.ranking-row>span{opacity:.5;font-weight:800}.ranking-row>b{font-size:.78rem;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ranking-row>em{font-style:normal;text-align:right;font-size:.78rem;font-weight:800}.ranking-row>em small{display:block;font-size:.6rem;opacity:.48;font-weight:600}
.logs-pager{display:flex;align-items:center;justify-content:center;gap:12px;padding:14px 0 4px}.logs-pager button:disabled{opacity:.35}.more-group{margin-bottom:16px}.more-group>.small-label{margin:0 0 7px 4px}
@media(max-width:760px){.stats-ranking-grid{grid-template-columns:1fr}.drive-live-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.server-intel-row{grid-template-columns:28px 1fr auto}}

/* Coverage Lab v0.5.9 Result Priority */
#view-test > #providerCard { margin-top: 8px; }
#view-test > .metric-grid { margin-top: 8px; margin-bottom: 12px; }
#view-test > .hero-card { margin-top: 0; }
#view-test > .server-intel-card { margin-top: 12px; }


/* Coverage Lab v0.6.1 Browser Navigation */
.multi-launch-row{display:flex;align-items:center;justify-content:center;gap:9px;margin:4px auto 10px;min-height:34px}
.multi-launch-label{color:#9fa8be;font-size:10px;font-weight:800;letter-spacing:.06em;text-transform:uppercase}
.compact-multi-button{min-width:0!important;padding:7px 12px!important;border-radius:999px!important;font-size:11px!important;line-height:1!important;box-shadow:none!important}
.compact-multi-button.danger{background:rgba(239,68,68,.16)!important;border-color:rgba(239,68,68,.35)!important;color:#fecaca!important}
#view-test>.drive-live-hud{margin-top:10px;margin-bottom:12px}
@media(max-width:520px){.multi-launch-row{margin-top:2px;margin-bottom:8px}.multi-launch-label{font-size:9px}.compact-multi-button{padding:6px 10px!important;font-size:10px!important}}

/* v0.6.3 dark coverage map */
.map-stage .leaflet-tile-pane { background:#090b12; }
.map-stage .leaflet-tile { filter:saturate(.78) brightness(.82) contrast(1.08); }
.map-stage .leaflet-control-zoom a { background:#171a26; color:#f8fafc; border-color:#34394d; }
.map-stage .leaflet-control-zoom a:hover { background:#242839; color:#fff; }
.map-stage .leaflet-control-attribution { background:rgba(10,12,18,.78); color:#b8bfd2; }
.map-stage .leaflet-control-attribution a { color:#8fd3ff; }


/* Coverage Lab v0.6.4 Map + Mobile Polish */
.map-toolbar-v4{grid-template-columns:minmax(210px,1.25fr) minmax(155px,.8fr) auto!important;gap:8px!important}
.map-quick-row{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) auto;gap:6px;padding:5px;border-radius:14px;background:rgba(12,15,24,.9);border:1px solid rgba(255,255,255,.09);backdrop-filter:blur(14px)}
.map-quick-metric,.map-fit-button,.map-provider-chip{border:0;color:#aeb7ca;background:transparent;font-weight:850}
.map-quick-metric{min-height:34px;border-radius:10px;font-size:11px}
.map-quick-metric.active{background:#f5f7fb;color:#111525;box-shadow:0 3px 16px rgba(0,0,0,.22)}
.map-fit-button{min-height:34px;padding:0 12px;border-radius:10px;background:rgba(124,92,255,.17);color:#e9e4ff;border:1px solid rgba(124,92,255,.28)}
.map-locate-button{min-width:54px!important;width:auto!important;padding:0 11px!important;font-size:10px!important;letter-spacing:.05em}
.map-provider-chips{grid-column:1/-1;display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;padding:1px 1px 0}
.map-provider-chips::-webkit-scrollbar{display:none}
.map-provider-chip{flex:0 0 auto;min-height:30px;padding:0 11px;border-radius:999px;background:rgba(255,255,255,.055);border:1px solid rgba(255,255,255,.075);font-size:10px;white-space:nowrap}
.map-provider-chip.active{background:rgba(56,189,248,.16);border-color:rgba(56,189,248,.42);color:#dff7ff}
.map-options{grid-column:1/-1!important}
.map-stage .legend-card{width:auto!important;max-width:min(420px,calc(100% - 24px));padding:8px 10px!important;border-radius:12px!important;background:rgba(9,11,18,.9)!important}
.map-stage .legend-title{margin-bottom:5px!important;font-size:9px!important;letter-spacing:.03em}
.map-stage .legend-scale{grid-template-columns:repeat(5,minmax(50px,1fr))!important;font-size:8px!important}
.map-stage .legend-scale span{padding:4px 5px!important}
.map-stage .leaflet-interactive{paint-order:stroke;filter:drop-shadow(0 0 1px rgba(0,0,0,.75))}
@media(max-width:900px){
  .map-toolbar-v4{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto!important}
  .map-quick-row{grid-column:1/-1!important;grid-row:auto!important}
  .map-toolbar-v4 #mapProvider{grid-column:1!important;grid-row:auto!important}
  .map-toolbar-v4 #mapNetworkGroup{grid-column:2!important;grid-row:auto!important}
  .map-toolbar-v4 .map-locate-button{grid-column:3!important;grid-row:auto!important;justify-self:stretch!important}
  .map-provider-chips{grid-column:1/-1!important}
}
@media(max-width:620px){
  .map-stage .map-toolbar{top:6px!important;left:6px!important;right:6px!important;max-height:36dvh!important;overflow:auto!important}
  .map-toolbar-v4{grid-template-columns:minmax(0,1fr) auto!important;gap:6px!important}
  .map-quick-row{grid-template-columns:repeat(3,minmax(0,1fr)) auto;padding:4px;gap:4px}
  .map-quick-metric{min-height:31px;font-size:10px}.map-fit-button{min-height:31px;padding:0 9px;font-size:10px}
  .map-toolbar-v4 #mapProvider{grid-column:1!important}.map-toolbar-v4 #mapNetworkGroup{grid-column:1!important}.map-toolbar-v4 .map-locate-button{grid-column:2!important;grid-row:2/4!important;min-height:100%!important}
  .map-provider-chips{grid-column:1/-1!important}
  .map-provider-chip{min-height:28px;padding:0 9px;font-size:9px}
  .map-options summary{padding:7px 10px!important;font-size:11px}.map-option-grid{padding:0 9px 9px!important;gap:7px!important}
  .map-stage .legend-card{left:7px!important;bottom:calc(78px + env(safe-area-inset-bottom))!important;max-width:calc(100% - 14px)!important;padding:7px 8px!important}
  .map-stage .legend-scale{grid-template-columns:repeat(5,minmax(44px,1fr))!important}
}

/* v0.6.5 Stats + Logs Performance */
.result-filter-card{grid-template-columns:minmax(190px,1.45fr) repeat(8,minmax(120px,1fr));gap:7px;align-items:center}
.compact-results{gap:6px}
.compact-result-card.log-row{display:block;padding:0;overflow:hidden}
.compact-result-card.log-row>summary{display:grid;grid-template-columns:30px 30px minmax(190px,1fr) auto 22px;gap:8px;align-items:center;padding:9px 11px;cursor:pointer;list-style:none}
.compact-result-card.log-row>summary::-webkit-details-marker{display:none}
.compact-result-card.log-row[open]>summary{background:rgba(255,255,255,.025)}
.log-expand{opacity:.5;font-size:1rem;transition:transform .16s ease}.compact-result-card[open] .log-expand{transform:rotate(180deg)}
.log-row-details{display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) auto;gap:8px;align-items:center;padding:8px 12px 10px 78px;border-top:1px solid rgba(255,255,255,.055);background:rgba(0,0,0,.12)}
.log-row-details span{font-size:.72rem;color:#cbd2e3;min-width:0}.log-row-details b{display:block;color:#8f98ad;font-size:.58rem;text-transform:uppercase;letter-spacing:.06em;margin-bottom:2px}
.log-detail-btn{padding:7px 10px!important;min-height:32px!important}
.stats-leader-card span{white-space:normal;line-height:1.25}
@media(max-width:1180px){.result-filter-card{grid-template-columns:repeat(4,minmax(0,1fr))}.result-filter-card input{grid-column:span 2}}
@media(max-width:760px){.result-filter-card{grid-template-columns:1fr 1fr}.result-filter-card input{grid-column:1/-1}.compact-result-card.log-row>summary{grid-template-columns:28px 26px minmax(0,1fr) 22px}.result-speeds{grid-column:3/5;display:flex!important;gap:10px!important;justify-content:flex-start!important}.log-expand{grid-column:4;grid-row:1}.log-row-details{grid-template-columns:1fr 1fr;padding:8px 10px}.log-detail-btn{grid-column:1/-1}}

/* v0.6.7 Multi-Gig speed engine */
.speed-engine-profile {
  margin-top: 3px;
  opacity: .78;
}


/* Coverage Lab v0.8.6 — mobile native polish + corrected PWA presentation */
.brand-lockup{display:flex;align-items:center;gap:10px;min-width:0}.brand-icon{width:34px;height:34px;display:block;border-radius:50%;box-shadow:0 5px 18px rgba(88,75,255,.28)}.brand-copy{min-width:0}.mobile-network-line,.mobile-environment-bar{display:none}.nav-icon{display:grid!important;place-items:center}.nav-icon svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}.nav-icon svg circle{fill:currentColor;stroke:none}

@media(max-width:620px){
  :root{--bg:#0f1018;--panel:#1c1e2a;--panel-2:#252737;--line:rgba(255,255,255,.085);--shadow:0 14px 38px rgba(0,0,0,.28)}
  html,body{background:#0f1018}
  #appShell{padding-bottom:calc(78px + env(safe-area-inset-bottom))}
  main{width:100%;max-width:520px}

  .topbar{position:relative;top:auto;z-index:900;justify-content:center;padding:calc(10px + env(safe-area-inset-top)) 14px 7px;background:#0f1018;border-bottom:0;backdrop-filter:none}
  .topbar .brand-lockup{gap:9px}.topbar .brand-icon{width:32px;height:32px}.topbar h1{font-size:20px;letter-spacing:-.02em}.topbar .eyebrow{display:none}.topbar .badge{position:absolute;right:12px;top:calc(14px + env(safe-area-inset-top));padding:5px 7px;font-size:8px;letter-spacing:.04em;background:rgba(80,197,210,.09);border-color:rgba(80,197,210,.26)}

  #view-test.view.active{display:flex;flex-direction:column;padding:4px 16px 20px}
  #view-test>.profile-row{order:1;display:flex;justify-content:center;overflow:visible;padding:4px 0 0;gap:0}
  #view-test .profile-chip{border:0;background:transparent;box-shadow:none;padding:3px 8px;min-height:26px;color:#aeb5c5}
  #view-test .provider-chip{font-size:19px;font-weight:850;color:#f7f8fc}
  #view-test .profile-chip[data-open-settings="network"],#view-test .profile-chip[data-open-settings="environment"],#focusSpeedBtn{display:none!important}
  #view-test .provider-chip .dot{width:7px;height:7px;margin-right:7px}
  .mobile-network-line{order:2;display:flex;align-items:center;justify-content:center;gap:7px;margin:0 0 13px;color:#8e95a7;font-size:12px;font-weight:650}.mobile-device-dot{color:#278cff;font-size:9px}.mobile-network-sep{opacity:.42}
  #view-test>#providerCard{display:none!important}

  #view-test>.hero-card{order:3;margin:0;padding:0 0 10px;border:0;background:transparent;box-shadow:none;border-radius:0;overflow:visible}
  #view-test>.hero-card::before{width:330px;height:330px;top:44%;opacity:.8}
  #view-test .hero-meta{justify-content:center;align-items:center;gap:8px;margin:0 auto 6px;position:relative;z-index:1}
  #view-test .hero-meta>.location-box,#view-test .hero-meta>div:first-child{display:flex;align-items:center;justify-content:center;min-height:34px;padding:0 10px;border:1px solid rgba(255,255,255,.07);border-radius:999px;background:rgba(34,36,51,.72);backdrop-filter:blur(12px)}
  #view-test .hero-meta>div:first-child>.small-label,#view-test .serverAutoStatus,#view-test .speed-engine-profile,#view-test .location-box>.small-label{display:none!important}
  #view-test .select.minimal{min-width:0;width:auto;max-width:210px;min-height:32px;padding:0 18px 0 4px;border:0;background:transparent;font-size:10px;color:#b9c0d0}
  #view-test .location-box{font-size:10px;color:#b9c0d0;text-align:center}
  #view-test .start-button{width:min(62vw,258px);margin:9px auto 18px;box-shadow:0 24px 58px rgba(98,62,255,.27),inset 0 0 0 1px rgba(255,255,255,.14)}
  #view-test .start-button #startButtonText{font-size:clamp(28px,8vw,36px);letter-spacing:-.02em}
  #view-test .start-button small{display:none}
  #view-test .multi-launch-row{width:min(82%,360px);margin:0 auto 6px;display:block;position:relative;z-index:1}
  #view-test .multi-launch-label{display:none}
  #view-test .compact-multi-button{width:100%!important;min-height:50px!important;padding:0 18px!important;border-radius:999px!important;background:#2a2c3e!important;border:1px solid rgba(255,255,255,.055)!important;font-size:15px!important;font-weight:780!important;box-shadow:none!important}
  #view-test .compact-multi-button.danger{background:rgba(177,45,57,.25)!important;color:#ffd6d9!important}

  #view-test .phase-text,#view-test .progress-track,#view-test .live-test-strip{display:none}
  #view-test .hero-card:has(#startTestBtn.running) .phase-text{display:block;margin-top:8px}
  #view-test .hero-card:has(#startTestBtn.running) .progress-track{display:block;margin:8px auto 0;width:min(82%,360px)}
  #view-test .hero-card:has(#startTestBtn.running) .live-test-strip{display:flex;margin:8px auto 0;width:min(92%,400px)}
  #view-test #multiRunStatus:not(.hidden){margin:8px auto 0;width:min(92%,400px)}

  .mobile-environment-bar{order:4;display:grid;grid-template-columns:repeat(4,1fr);gap:3px;margin:7px 0 10px;padding:4px;border-radius:18px;background:#242635;border:1px solid rgba(255,255,255,.055)}
  .mobile-environment-bar button{min-height:41px;border:0;border-radius:14px;background:transparent;color:#c4c8d4;font-size:12px;font-weight:760;padding:0 4px}
  .mobile-environment-bar button.active{color:#fff;background:linear-gradient(105deg,#278cff,#7238ff 52%,#ff4f87);box-shadow:0 6px 18px rgba(79,63,222,.22)}

  #view-test>.metric-grid{order:5;display:none;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:3px 0 9px}
  body.has-test-result #view-test>.metric-grid,body:has(#startTestBtn.running) #view-test>.metric-grid{display:grid}
  #view-test .metric-card{min-height:90px;padding:11px 13px;border-radius:17px;box-shadow:none;background:#202230}
  #view-test .metric-card strong{font-size:29px}.metric-card span{font-size:10px}.metric-card small{font-size:10px}
  #view-test>.drive-live-hud{order:6;margin:5px 0 10px;padding:11px;border-radius:17px}
  #view-test>.last-result{order:7;margin:4px 0 10px;box-shadow:none;border-radius:18px}
  #view-test>.info-card{order:8}
  #view-test>.server-intel-card{display:none!important}

  .bottom-nav{left:0!important;right:0!important;bottom:0!important;width:100%!important;max-width:none!important;min-height:calc(66px + env(safe-area-inset-bottom));margin:0!important;padding:5px 8px calc(5px + env(safe-area-inset-bottom))!important;border-radius:0!important;border:0!important;border-top:1px solid rgba(255,255,255,.07)!important;background:rgba(15,16,24,.96)!important;box-shadow:0 -10px 28px rgba(0,0,0,.20)!important;backdrop-filter:blur(24px)!important}
  .bottom-nav .nav-item{min-height:54px!important;padding:4px 2px!important;border-radius:14px!important;color:#73798a!important;gap:2px!important}
  .bottom-nav .nav-item.active{background:transparent!important;color:#f8fafc!important}
  .bottom-nav .nav-item small{font-size:9px!important;font-weight:700!important}.bottom-nav .nav-item span{font-size:inherit!important;min-height:26px!important}.nav-icon svg{width:24px;height:24px}.bottom-nav .nav-item.active .nav-icon{filter:drop-shadow(0 3px 8px rgba(90,75,255,.35))}
  .bottom-nav .nav-item[data-admin-nav].locked small::after{display:none!important}

  body[data-view="map"] #appShell{padding-bottom:0}
  body[data-view="map"] .topbar{display:none!important}
  body[data-view="map"] main{max-width:none;width:100%}
  body[data-view="map"] .map-view.active{padding:0;margin-left:0;width:100vw}
  body[data-view="map"] .map-layout{height:100dvh!important;min-height:100dvh!important}
  body[data-view="map"] .map-stage,body[data-view="map"] #map{height:100dvh!important;min-height:100dvh!important}
  body[data-view="map"] .map-stage .map-toolbar{top:calc(8px + env(safe-area-inset-top))!important;left:8px!important;right:8px!important;max-height:55dvh!important;overflow:auto!important;padding:8px!important;border-radius:21px!important;background:rgba(26,28,42,.94)!important;box-shadow:0 14px 40px rgba(0,0,0,.33)!important}
  body[data-view="map"] .map-toolbar-v4{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto!important;gap:7px!important}
  body[data-view="map"] .map-quick-row{grid-column:1/-1!important;grid-template-columns:repeat(3,minmax(0,1fr)) auto!important;gap:4px!important;padding:4px!important;border-radius:15px!important}
  body[data-view="map"] .map-toolbar-v4 #mapProvider{grid-column:1!important;grid-row:auto!important}
  body[data-view="map"] .map-toolbar-v4 #mapNetworkGroup{grid-column:2!important;grid-row:auto!important}
  body[data-view="map"] .map-toolbar-v4 .map-locate-button{grid-column:3!important;grid-row:auto!important;min-width:48px!important;min-height:42px!important;border-radius:14px!important;padding:0 9px!important}
  body[data-view="map"] .map-toolbar .select{min-height:42px!important;font-size:11px!important;border-radius:14px!important}
  body[data-view="map"] .map-provider-chips{display:none!important}
  body[data-view="map"] .map-options{grid-column:1/-1!important;border-radius:15px!important}
  body[data-view="map"] .map-options summary{padding:8px 10px!important;font-size:11px!important}
  body[data-view="map"] .map-stage .legend-card{left:8px!important;bottom:calc(74px + env(safe-area-inset-bottom))!important;max-width:calc(100% - 16px)!important;padding:8px 9px!important;border-radius:14px!important}
  body[data-view="map"] .leaflet-control-zoom{margin-top:calc(10px + env(safe-area-inset-top))!important}
  body[data-view="map"] .leaflet-control-attribution{margin-bottom:calc(66px + env(safe-area-inset-bottom))!important}

  .section-head h2{font-size:28px}.view:not(#view-test):not(#view-map){padding:14px 14px 24px}.form-card,.info-card,.compact-result-card,.analytics-panel{box-shadow:none}
}

/* Coverage Lab v0.8.7 — brand, navigation, and map filtering cleanup */
.brand-mark{width:38px;height:38px;display:grid;place-items:center;flex:0 0 38px;filter:drop-shadow(0 8px 18px rgba(74,75,255,.22))}
.brand-mark svg{display:block;width:100%;height:100%}
.brand-lockup{gap:11px}
.topbar h1{letter-spacing:-.025em}

/* Dedicated desktop navigation: centered, five equal buttons, no clipping. */
@media(min-width:621px){
  .bottom-nav{left:50%!important;right:auto!important;transform:translateX(-50%);bottom:18px;width:auto!important;max-width:none!important;grid-template-columns:repeat(5,88px)!important;gap:4px;padding:7px!important;border-radius:24px!important}
  .bottom-nav .nav-item{width:88px;min-width:88px;min-height:60px;padding:7px 4px!important;gap:4px!important}
  .bottom-nav .nav-item span{font-size:inherit!important;min-height:26px!important}
  .bottom-nav .nav-item small{font-size:11px!important;font-weight:800!important;letter-spacing:0!important}
  .nav-icon svg{width:25px;height:25px}
  .bottom-nav .nav-item.active{background:rgba(255,255,255,.105);box-shadow:inset 0 0 0 1px rgba(255,255,255,.055)}
}

/* Map filtering + date/aggregation controls */
.map-date-range,.map-aggregate{min-width:0}
.map-toolbar-v4 .map-date-range,.map-toolbar-v4 .map-aggregate{grid-column:auto}
.map-options .select{width:100%}

@media(max-width:620px){
  .topbar .brand-mark{width:32px;height:32px;flex-basis:32px}
  .bottom-nav{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;overflow:visible!important}
  .bottom-nav .nav-item{display:flex!important;width:auto!important;min-width:0!important;overflow:visible!important}
  .bottom-nav .nav-item .nav-icon{height:27px;min-height:27px;width:100%;display:grid!important;place-items:center!important}
  .bottom-nav .nav-item small{display:block!important;line-height:1.1;white-space:nowrap}
  body[data-view="map"] .map-toolbar-v4{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 50px!important}
  body[data-view="map"] .map-toolbar-v4 #mapProvider{grid-column:1!important}
  body[data-view="map"] .map-toolbar-v4 #mapNetworkGroup{grid-column:2!important}
  body[data-view="map"] .map-toolbar-v4 .map-locate-button{grid-column:3!important;grid-row:2/4!important}
  body[data-view="map"] .map-toolbar-v4 .map-date-range{grid-column:1!important}
  body[data-view="map"] .map-toolbar-v4 .map-aggregate{grid-column:2!important}
  body[data-view="map"] .map-toolbar .select{padding-left:10px!important;padding-right:26px!important}
}


/* Coverage Lab v0.8.8 — viewport, icon and navigation hardening */
html,body{width:100%;max-width:100%;overflow-x:hidden}
#appShell{width:100%;max-width:100%;overflow-x:clip}
main{width:100%;max-width:900px;margin-inline:auto;min-width:0}
.view{width:100%;max-width:100%;min-width:0}
.topbar{width:100%;max-width:100%}
.brand-mark{width:38px;height:38px;flex:0 0 38px;filter:drop-shadow(0 7px 16px rgba(80,75,255,.24))}
.brand-mark svg{width:38px;height:38px;overflow:visible}

/* Keep the primary navigation inside the viewport at tablet/laptop widths. */
@media(max-width:1100px){
  .bottom-nav{
    left:0!important;right:0!important;bottom:0!important;transform:none!important;
    width:100%!important;max-width:100%!important;margin:0!important;
    display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;
    gap:2px!important;padding:6px 10px calc(6px + env(safe-area-inset-bottom))!important;
    border-radius:0!important;border-left:0!important;border-right:0!important;border-bottom:0!important;
    background:rgba(15,16,24,.97)!important;backdrop-filter:blur(22px)!important;
  }
  .bottom-nav .nav-item{
    display:flex!important;width:auto!important;min-width:0!important;max-width:none!important;
    min-height:58px!important;padding:5px 2px!important;overflow:visible!important;
    align-items:center!important;justify-content:center!important;
  }
  .bottom-nav .nav-item .nav-icon{display:grid!important;place-items:center!important;width:100%!important;height:28px!important;min-height:28px!important}
  .bottom-nav .nav-item .nav-icon svg{width:24px!important;height:24px!important;display:block!important}
  .bottom-nav .nav-item small{display:block!important;font-size:10px!important;line-height:1.1!important;white-space:nowrap!important;overflow:visible!important}
  #appShell{padding-bottom:calc(76px + env(safe-area-inset-bottom))!important}
}

/* Desktop gets the compact centered dock only when there is genuinely enough room. */
@media(min-width:1101px){
  .bottom-nav{left:50%!important;right:auto!important;transform:translateX(-50%)!important;width:auto!important;grid-template-columns:repeat(5,92px)!important;gap:4px!important}
  .bottom-nav .nav-item{width:92px!important;min-width:92px!important}
}

/* Prevent admin/update forms and long status strings from forcing horizontal layout. */
#view-update,#view-settings,#view-results,#view-logs,#view-more{min-width:0;overflow-wrap:anywhere}
#view-update .form-card,#view-update .info-card,#view-update .update-status-grid{min-width:0;max-width:100%}
#view-update input[type=file]{display:block;width:100%;max-width:100%;min-width:0}
#stagedUpdateCard,#installedReleases{max-width:100%;overflow-wrap:anywhere}

@media(max-width:620px){
  main{max-width:520px}
  .brand-mark{width:32px;height:32px;flex-basis:32px}
  .brand-mark svg{width:32px;height:32px}
}


/* Coverage Lab v0.8.9 — original gauge identity refresh (no generated artwork) */
.brand-mark{
  width:44px;height:44px;flex:0 0 44px;padding:6px;
  border-radius:13px;background:linear-gradient(145deg,#1a1e31,#0b0e17);
  border:1px solid rgba(255,255,255,.10);
  box-shadow:0 10px 26px rgba(0,0,0,.28),inset 0 1px 0 rgba(255,255,255,.07);
  filter:none!important
}
.brand-mark svg{width:100%;height:100%;overflow:visible}
.brand-copy .eyebrow{color:#9aa4bd}
.topbar h1{font-weight:850}

/* Make the primary test action feel like a real network instrument instead of a flat gradient disc. */
.start-button{
  position:relative;overflow:hidden;isolation:isolate;
  background:radial-gradient(circle at 50% 45%,#1d2235 0 52%,#111522 53% 100%)!important;
  border:1px solid rgba(255,255,255,.10)!important;
  box-shadow:0 24px 70px rgba(32,102,255,.18),inset 0 0 0 1px rgba(255,255,255,.035)!important;
}
.start-button::before{
  content:"";position:absolute;inset:7%;border-radius:50%;z-index:-2;
  background:conic-gradient(from 222deg,#20d8ff 0deg,#318fff 78deg,#665cff 145deg,#a14fff 205deg,#ff4f98 255deg,rgba(255,79,152,0) 256deg 360deg);
  opacity:.72;
}
.start-button::after{
  content:"";position:absolute;inset:15%;border-radius:50%;z-index:-1;
  background:radial-gradient(circle at 45% 35%,#1d2233,#10131f 72%);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.055)
}
.start-gauge-icon{display:block!important;width:39%!important;height:auto!important;margin:0 0 3px;line-height:0;font-size:0!important;filter:drop-shadow(0 8px 18px rgba(68,108,255,.24))}
.start-gauge-icon svg{display:block;width:100%;height:auto}
.start-button #startButtonText{position:relative;z-index:2;font-weight:880;text-shadow:0 2px 12px rgba(0,0,0,.28)}
.start-button small{position:relative;z-index:2}
.start-button.running .start-gauge-icon{animation:gaugeFloat 1.1s ease-in-out infinite alternate}
@keyframes gaugeFloat{from{transform:translateY(0) scale(1)}to{transform:translateY(-2px) scale(1.025)}}

/* Navigation uses one consistent optical weight. */
.nav-icon{display:grid;place-items:center;width:30px;height:28px}
.nav-icon svg{fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.nav-speed-gauge svg{stroke-width:2.05}
.bottom-nav .nav-item.active .nav-speed-gauge{
  color:#fff;filter:drop-shadow(0 4px 9px rgba(88,104,255,.36))
}

@media(max-width:620px){
  .topbar .brand-mark{width:38px;height:38px;flex-basis:38px;padding:5px;border-radius:11px}
  #view-test .start-gauge-icon{width:35%!important;margin-bottom:2px}
}


/* Coverage Lab v0.8.10 — restore clean test control + scroll recovery */
html,body{
  height:auto!important;
  min-height:100%!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior-y:auto!important;
  -webkit-overflow-scrolling:touch;
}
body{touch-action:pan-y pinch-zoom}
#appShell{
  min-height:100dvh!important;
  height:auto!important;
  overflow-x:clip!important;
  overflow-y:visible!important;
}
main,.view{overflow-y:visible}

/* Put the primary speed action back to the clean Coverage Lab control. */
.start-button{
  width:min(68vw,280px)!important;
  aspect-ratio:1!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  margin:18px auto!important;
  border:0!important;
  border-radius:50%!important;
  overflow:visible!important;
  isolation:auto!important;
  background:linear-gradient(105deg,var(--accent-a),var(--accent-b) 50%,var(--accent-c))!important;
  color:#fff!important;
  box-shadow:0 22px 50px rgba(98,62,255,.34),inset 0 0 0 1px rgba(255,255,255,.16)!important;
}
.start-button::before,.start-button::after{content:none!important;display:none!important}
.start-gauge-icon{display:none!important}
.start-button #startButtonText{
  position:static!important;
  z-index:auto!important;
  font-size:clamp(27px,8vw,42px)!important;
  font-weight:900!important;
  text-shadow:none!important;
}
.start-button small{
  position:static!important;
  z-index:auto!important;
  max-width:70%!important;
  margin-top:7px!important;
  opacity:.78!important;
  font-size:11px!important;
  font-weight:700!important;
}
.start-button.running{animation:pulse 1.4s infinite!important}

/* Focus remains available, but never enters browser fullscreen or locks scroll. */
body.focus-speed{
  height:auto!important;
  min-height:100dvh!important;
  overflow-y:auto!important;
  overscroll-behavior-y:auto!important;
}
body.focus-speed #view-test{
  min-height:auto!important;
  height:auto!important;
  overflow:visible!important;
  padding-bottom:calc(92px + env(safe-area-inset-bottom))!important;
}
body.focus-speed #view-test .hero-card{
  min-height:0!important;
  justify-content:flex-start!important;
}
body.focus-speed #view-test .profile-row{
  display:flex!important;
  position:sticky!important;
  top:calc(8px + env(safe-area-inset-top))!important;
  z-index:2000!important;
}
body.focus-speed #focusSpeedBtn{
  display:inline-flex!important;
  position:fixed!important;
  top:calc(10px + env(safe-area-inset-top))!important;
  right:10px!important;
  z-index:5000!important;
  background:#30344a!important;
  border:1px solid rgba(255,255,255,.14)!important;
  box-shadow:0 8px 26px rgba(0,0,0,.30)!important;
}

@media(max-width:620px){
  .start-button{width:min(70vw,270px)!important;margin:14px auto!important}
  body.focus-speed #focusSpeedBtn{display:inline-flex!important}
}

/* Coverage Lab v0.8.11 — dedicated app-shell scroller.
   Some desktop/PWA combinations refuse to scroll the document reliably when
   the fixed navigation and sticky header are active.  Make the application
   shell itself the single vertical scrolling surface instead of relying on
   html/body document scrolling. */
html,body{
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  overflow:hidden!important;
}
body{
  overscroll-behavior:none!important;
  touch-action:auto!important;
}
#appShell{
  width:100%!important;
  height:100dvh!important;
  min-height:0!important;
  max-height:100dvh!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior-y:contain!important;
  -webkit-overflow-scrolling:touch!important;
  scroll-behavior:auto!important;
  padding-bottom:calc(112px + env(safe-area-inset-bottom))!important;
}
main{
  min-height:calc(100dvh - 72px)!important;
  padding-bottom:calc(118px + env(safe-area-inset-bottom))!important;
}
#view-test.view.active{
  padding-bottom:calc(128px + env(safe-area-inset-bottom))!important;
}
/* Fixed dock must never cover the final card/action when the user reaches
   the bottom of a view. */
.view:not(#view-map){
  scroll-margin-bottom:120px;
}
/* Keep the full-screen map as the one view that intentionally does not
   vertically scroll. */
body[data-view="map"] #appShell{
  overflow:hidden!important;
  padding-bottom:0!important;
}
body[data-view="map"] main{
  min-height:0!important;
  height:100dvh!important;
  padding-bottom:0!important;
}
/* Focus mode uses the same reliable shell scroller rather than document
   scrolling. */
body.focus-speed #appShell{
  overflow-y:auto!important;
}
body.focus-speed #view-test{
  padding-bottom:calc(130px + env(safe-area-inset-bottom))!important;
}
@media(max-width:620px){
  #appShell{padding-bottom:calc(92px + env(safe-area-inset-bottom))!important}
  main{padding-bottom:calc(96px + env(safe-area-inset-bottom))!important}
  #view-test.view.active{padding-bottom:calc(108px + env(safe-area-inset-bottom))!important}
}

/* Coverage Lab v0.8.12 — final scroll surface hardening */
#appShell{
  position:relative!important;
  display:block!important;
  box-sizing:border-box!important;
  width:100%!important;
  height:100dvh!important;
  max-height:100dvh!important;
  overflow-x:hidden!important;
  overflow-y:scroll!important;
  scrollbar-gutter:stable;
  overscroll-behavior-y:auto!important;
  touch-action:pan-y!important;
}
#appShell::-webkit-scrollbar{width:10px}
#appShell::-webkit-scrollbar-thumb{background:rgba(151,161,184,.34);border:3px solid transparent;background-clip:padding-box;border-radius:999px}
#appShell::-webkit-scrollbar-track{background:transparent}
main{display:block!important;min-height:auto!important;padding-bottom:150px!important}
#view-test.view.active{min-height:auto!important;height:auto!important;padding-bottom:150px!important}
#view-test .hero-card{height:auto!important;max-height:none!important}
body:not([data-view="map"]) #appShell{overflow-y:scroll!important}
body[data-view="map"] #appShell{overflow:hidden!important;padding-bottom:0!important}
body.focus-speed #appShell{overflow-y:scroll!important}
body.focus-speed #view-test{height:auto!important;min-height:auto!important;overflow:visible!important;padding-bottom:150px!important}
@media(max-width:620px){
  #appShell{overflow-y:scroll!important}
  main,#view-test.view.active{padding-bottom:calc(128px + env(safe-area-inset-bottom))!important}
}

/* Coverage Lab v0.8.13 — cumulative UI recovery.
   This release is intentionally built to install directly over the active
   0.8.7 release and restores all later UI fixes without the oversized gauge
   Start Test experiment. */

/* One explicit scrolling surface. This avoids Chrome/iOS/PWA disagreements
   over body scrolling when the bottom dock is fixed. */
html,body{
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  margin:0!important;
  overflow:hidden!important;
}
#appShell{
  position:fixed!important;
  inset:0!important;
  width:auto!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  box-sizing:border-box!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  -webkit-overflow-scrolling:touch!important;
  overscroll-behavior-y:auto!important;
  touch-action:pan-y!important;
  padding-bottom:calc(112px + env(safe-area-inset-bottom))!important;
}
#appShell::-webkit-scrollbar{width:9px}
#appShell::-webkit-scrollbar-thumb{background:rgba(151,161,184,.32);border:3px solid transparent;background-clip:padding-box;border-radius:999px}
#appShell::-webkit-scrollbar-track{background:transparent}
main{
  display:block!important;
  width:min(100%,940px)!important;
  max-width:940px!important;
  min-height:auto!important;
  margin:0 auto!important;
  padding-bottom:150px!important;
}
.view.active{height:auto!important;min-height:auto!important;overflow:visible!important}
#view-test.view.active{height:auto!important;min-height:auto!important;padding-bottom:150px!important}
#view-test .hero-card{height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important}

/* Keep the clean Start Test control. The gauge identity remains in the app
   icon/header/nav, not inside the primary action. */
.start-button,
#view-test .start-button{
  width:min(52vw,230px)!important;
  max-width:230px!important;
  aspect-ratio:1!important;
  margin:20px auto 18px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  border:0!important;
  border-radius:50%!important;
  overflow:visible!important;
  background:linear-gradient(115deg,#2e8dff 0%,#654cff 52%,#ee3aa9 100%)!important;
  color:#fff!important;
  box-shadow:0 18px 42px rgba(89,70,255,.28),inset 0 0 0 1px rgba(255,255,255,.14)!important;
}
.start-button::before,.start-button::after{content:none!important;display:none!important}
.start-gauge-icon{display:none!important}
.start-button #startButtonText{position:static!important;font-size:clamp(28px,4vw,38px)!important;line-height:1!important;font-weight:900!important;text-shadow:none!important}
.start-button small{position:static!important;display:block!important;max-width:76%!important;margin-top:8px!important;font-size:10px!important;font-weight:750!important;line-height:1.25!important;opacity:.78!important}

/* Focus is a compact layout, never a trap. Keep the header and dock visible,
   and use the same app-shell scroller. */
body.focus-speed #appShell{overflow-y:auto!important}
body.focus-speed .topbar{display:flex!important}
body.focus-speed .bottom-nav{display:grid!important}
body.focus-speed #view-test{height:auto!important;min-height:auto!important;overflow:visible!important;padding:18px 18px 150px!important}
body.focus-speed #view-test .hero-card{height:auto!important;min-height:0!important;justify-content:flex-start!important}
body.focus-speed #view-test .profile-row{display:flex!important;position:static!important}
body.focus-speed #focusSpeedBtn{position:static!important;display:inline-flex!important}

/* Restore the five-slot navigation at every width and keep it out of the
   content flow so it cannot squeeze/shift the main view. */
.bottom-nav{
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:4px!important;
  overflow:visible!important;
}
.bottom-nav .nav-item{min-width:0!important;overflow:visible!important}
.bottom-nav .nav-item .nav-icon{display:grid!important;place-items:center!important;width:100%!important;height:27px!important;min-height:27px!important}
.bottom-nav .nav-item .nav-icon svg{display:block!important;width:24px!important;height:24px!important}
.bottom-nav .nav-item small{display:block!important;white-space:nowrap!important;line-height:1.05!important}

/* Map intentionally owns the viewport and does not document-scroll. */
body[data-view="map"] #appShell{overflow:hidden!important;padding-bottom:0!important}
body[data-view="map"] main{width:100%!important;max-width:none!important;height:100dvh!important;min-height:0!important;padding-bottom:0!important}

@media(min-width:761px){
  .bottom-nav{
    left:50%!important;
    right:auto!important;
    transform:translateX(-50%)!important;
    bottom:18px!important;
    width:468px!important;
    max-width:calc(100vw - 28px)!important;
    padding:7px!important;
    border-radius:24px!important;
  }
  .bottom-nav .nav-item{width:auto!important;min-height:58px!important;padding:6px 3px!important;border-radius:17px!important}
  .bottom-nav .nav-item small{font-size:10px!important;font-weight:800!important}
}
@media(max-width:760px){
  #appShell{padding-bottom:calc(92px + env(safe-area-inset-bottom))!important}
  main,#view-test.view.active{padding-bottom:calc(116px + env(safe-area-inset-bottom))!important}
  .bottom-nav{
    left:0!important;right:0!important;bottom:0!important;
    width:100%!important;max-width:none!important;
    transform:none!important;
    padding:5px 8px calc(5px + env(safe-area-inset-bottom))!important;
    border-radius:0!important;border:0!important;border-top:1px solid rgba(255,255,255,.08)!important;
  }
  .bottom-nav .nav-item{min-height:54px!important;padding:4px 2px!important;border-radius:14px!important}
  .bottom-nav .nav-item small{font-size:9px!important}
  .start-button,#view-test .start-button{width:min(62vw,230px)!important;max-width:230px!important;margin:15px auto!important}
  body.focus-speed #view-test{padding:14px 14px calc(116px + env(safe-area-inset-bottom))!important}
}

/* Coverage Lab v0.9.0 — cumulative updater recovery.
   UI/scrolling baseline is v0.8.13. The version jump to 0.9.0 is intentional:
   the v0.8.7 updater sorted staged directory names as plain text, which made
   0.8.9 appear newer than 0.8.13. 0.9.0 sorts ahead even in the old UI, then
   fixes staged sorting semantically for all future updates. */

/* Coverage Lab v0.9.2 — document scroll + grid drill-down. 
   Use the browser document as the scroll surface on every normal view.
   Earlier shell-scroller experiments could leave Chrome/iOS with a fixed
   viewport that accepted no wheel/touch scrolling. The map remains the only
   intentionally viewport-locked screen. */
html{
  width:100%!important;
  height:auto!important;
  min-height:100%!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior-y:auto!important;
}
body{
  width:100%!important;
  height:auto!important;
  min-height:100dvh!important;
  max-height:none!important;
  margin:0!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior-y:auto!important;
  touch-action:pan-y pinch-zoom!important;
  -webkit-overflow-scrolling:touch!important;
}
#appShell{
  position:relative!important;
  inset:auto!important;
  display:block!important;
  width:100%!important;
  height:auto!important;
  min-height:100dvh!important;
  max-height:none!important;
  overflow:visible!important;
  overscroll-behavior:initial!important;
  touch-action:auto!important;
  padding-bottom:calc(126px + env(safe-area-inset-bottom))!important;
}
main{
  display:block!important;
  width:min(100%,940px)!important;
  max-width:940px!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  margin:0 auto!important;
  overflow:visible!important;
  padding-bottom:calc(150px + env(safe-area-inset-bottom))!important;
}
.view,.view.active{
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:visible!important;
}
#view-test.view.active,
#view-test .hero-card{
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:visible!important;
}
body.focus-speed{
  height:auto!important;
  max-height:none!important;
  overflow-y:auto!important;
}
body.focus-speed #appShell{
  position:relative!important;
  inset:auto!important;
  height:auto!important;
  min-height:100dvh!important;
  max-height:none!important;
  overflow:visible!important;
}
body.focus-speed #view-test{
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:visible!important;
  padding-bottom:calc(150px + env(safe-area-inset-bottom))!important;
}
/* Keep enough real document space below all cards so the fixed dock never
   obscures the final controls. */
body:not([data-view="map"]) main::after{
  content:"";
  display:block;
  width:1px;
  height:80px;
  pointer-events:none;
}
/* Map remains an app-style full viewport and deliberately does not scroll. */
body[data-view="map"]{
  height:100dvh!important;
  min-height:100dvh!important;
  max-height:100dvh!important;
  overflow:hidden!important;
}
body[data-view="map"] #appShell{
  position:fixed!important;
  inset:0!important;
  width:auto!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:hidden!important;
  padding-bottom:0!important;
}
body[data-view="map"] main{
  width:100%!important;
  max-width:none!important;
  height:100dvh!important;
  min-height:0!important;
  max-height:100dvh!important;
  padding-bottom:0!important;
  overflow:hidden!important;
}
body[data-view="map"] main::after{display:none!important}
@media(max-width:760px){
  #appShell{padding-bottom:calc(98px + env(safe-area-inset-bottom))!important}
  main,#view-test.view.active{padding-bottom:calc(126px + env(safe-area-inset-bottom))!important}
  body:not([data-view="map"]) main::after{height:56px}
}


/* Coverage Lab v0.9.2 — full grid test drill-down */
.grid-test-list-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:9px}.grid-test-list-head strong{font-size:13px;color:#f7f8fc}.grid-sample.failed{border-color:rgba(255,90,103,.32);background:rgba(255,90,103,.07)}.grid-sample-head{align-items:center!important;justify-content:flex-start!important;gap:7px!important}.grid-sample-head strong{font-size:12px}.grid-sample-head>span:last-child{margin-left:auto}.grid-sample-number{display:grid;place-items:center;min-width:20px;height:20px;border-radius:999px;background:rgba(255,255,255,.075);color:#f7f8fc!important;font-weight:800}.grid-sample-speeds{justify-content:flex-start!important;align-items:baseline;margin-top:7px}.grid-sample-speeds strong{font-size:14px}.grid-sample-meta{margin-top:5px}.grid-sample-meta span{font-size:10px}
@media(max-width:620px){#view-test .select.minimal{font-size:11px;max-width:220px}.grid-sample{padding:11px}.grid-sample-speeds{gap:7px!important}.grid-sample-meta{display:grid!important;grid-template-columns:1fr auto;gap:8px!important}}

/* Coverage Lab v0.9.5 baseline — mobile Speed fit + larger map drill-down.
   Only the main Speed view is viewport-fitted on phones. Every other normal
   page keeps v0.9.2 document scrolling; Map remains its own viewport. */
.map-sheet-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}
.map-sheet-expand{display:none}

@media(max-width:760px){
  /* Speed is the one mobile screen that should behave like an instrument
     panel: the entire active test UI stays between the header and dock. */
  body[data-view="test"]{
    width:100%!important;
    height:100dvh!important;
    min-height:100dvh!important;
    max-height:100dvh!important;
    overflow:hidden!important;
    overscroll-behavior:none!important;
    touch-action:manipulation!important;
  }
  body[data-view="test"] #appShell{
    position:relative!important;
    inset:auto!important;
    display:flex!important;
    flex-direction:column!important;
    width:100%!important;
    height:100dvh!important;
    min-height:100dvh!important;
    max-height:100dvh!important;
    overflow:hidden!important;
    padding-bottom:0!important;
  }
  body[data-view="test"] .topbar{
    flex:0 0 auto!important;
    min-height:0!important;
    padding:calc(5px + env(safe-area-inset-top)) 12px 3px!important;
  }
  body[data-view="test"] .topbar .brand-mark{width:30px!important;height:30px!important;flex-basis:30px!important;padding:5px!important}
  body[data-view="test"] .topbar h1{font-size:18px!important}
  body[data-view="test"] .topbar .badge{top:calc(9px + env(safe-area-inset-top))!important;right:10px!important;padding:4px 7px!important;font-size:7px!important}
  body[data-view="test"] main{
    flex:1 1 auto!important;
    width:100%!important;
    max-width:520px!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    margin:0 auto!important;
    padding:0!important;
    overflow:hidden!important;
  }
  body[data-view="test"] main::after{display:none!important}
  body[data-view="test"] #view-test.view.active{
    display:flex!important;
    flex-direction:column!important;
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    max-height:100%!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
    padding:0 14px calc(68px + env(safe-area-inset-bottom))!important;
  }

  body[data-view="test"] #view-test>.profile-row{
    flex:0 0 auto!important;
    min-height:24px!important;
    padding:0!important;
  }
  body[data-view="test"] #view-test .profile-chip{min-height:22px!important;padding:1px 6px!important}
  body[data-view="test"] #view-test .provider-chip{font-size:17px!important;line-height:1.05!important}
  body[data-view="test"] #view-test .provider-chip .dot{width:6px!important;height:6px!important;margin-right:6px!important}
  body[data-view="test"] .mobile-network-line{
    flex:0 0 auto!important;
    margin:0 0 5px!important;
    gap:6px!important;
    font-size:10px!important;
    line-height:1.15!important;
  }

  body[data-view="test"] #view-test>.hero-card{
    flex:0 0 auto!important;
    margin:0!important;
    padding:0 0 4px!important;
    min-height:0!important;
    max-height:none!important;
    overflow:visible!important;
  }
  body[data-view="test"] #view-test>.hero-card::before{width:260px!important;height:260px!important;top:42%!important}
  body[data-view="test"] #view-test .hero-meta{
    min-height:30px!important;
    margin:0 auto 2px!important;
    gap:6px!important;
  }
  body[data-view="test"] #view-test .hero-meta>.location-box,
  body[data-view="test"] #view-test .hero-meta>div:first-child{
    min-height:30px!important;
    padding:0 8px!important;
  }
  body[data-view="test"] #view-test .hero-meta>div:first-child{min-width:0!important;max-width:60%!important}
  body[data-view="test"] #view-test .location-box{max-width:40%!important;font-size:9px!important;line-height:1.1!important}
  body[data-view="test"] #view-test .select.minimal{
    max-width:100%!important;
    min-height:28px!important;
    padding:0 16px 0 2px!important;
    font-size:10px!important;
    text-overflow:ellipsis!important;
  }

  body[data-view="test"] #view-test .start-button{
    flex:0 0 auto!important;
    width:min(44vw,21dvh,185px)!important;
    max-width:185px!important;
    margin:3px auto 5px!important;
    box-shadow:0 15px 34px rgba(89,70,255,.25),inset 0 0 0 1px rgba(255,255,255,.14)!important;
  }
  body[data-view="test"] #view-test .start-button #startButtonText{font-size:clamp(26px,7vw,32px)!important}
  body[data-view="test"] #view-test .start-button small{display:block!important;margin-top:5px!important;font-size:9px!important;line-height:1.1!important}
  body[data-view="test"] #view-test .phase-text{min-height:16px!important;font-size:11px!important;line-height:16px!important;margin:0!important}

  body[data-view="test"] #view-test .multi-launch-row{width:min(88%,370px)!important;margin:2px auto 3px!important}
  body[data-view="test"] #view-test .compact-multi-button{
    min-height:38px!important;
    height:38px!important;
    padding:0 14px!important;
    font-size:13px!important;
  }
  body[data-view="test"] #view-test .progress-track{height:5px!important;margin:4px auto 0!important;width:min(88%,370px)!important}
  body[data-view="test"] #view-test .live-test-strip{
    min-height:34px!important;
    margin:4px auto 0!important;
    width:min(94%,400px)!important;
    padding:6px 10px!important;
    border-radius:12px!important;
    font-size:10px!important;
    align-items:center!important;
  }
  body[data-view="test"] #view-test #multiRunStatus:not(.hidden){margin:4px auto 0!important;padding:5px 10px!important;font-size:9px!important}
  body[data-view="test"] #view-test .multi-session-controls{margin-top:4px!important;gap:6px!important}
  body[data-view="test"] #view-test .multi-session-controls .secondary-button{min-height:34px!important;padding:5px 10px!important;font-size:10px!important}

  body[data-view="test"] .mobile-environment-bar{
    flex:0 0 auto!important;
    margin:3px 0 5px!important;
    padding:3px!important;
    border-radius:15px!important;
  }
  body[data-view="test"] .mobile-environment-bar button{
    min-height:34px!important;
    border-radius:12px!important;
    font-size:10px!important;
  }

  body[data-view="test"] #view-test>.metric-grid{
    flex:0 0 auto!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:5px!important;
    margin:0!important;
  }
  body[data-view="test"] #view-test .metric-card{
    min-height:61px!important;
    padding:6px 10px!important;
    border-radius:14px!important;
  }
  body[data-view="test"] #view-test .metric-card strong{font-size:22px!important;line-height:1!important;margin-top:2px!important}
  body[data-view="test"] #view-test .metric-card span,
  body[data-view="test"] #view-test .metric-card small{font-size:9px!important;line-height:1.05!important}

  /* Secondary result/session cards are still available when needed, but they
     may not force the fixed Speed dashboard itself to grow beyond the phone. */
  body[data-view="test"] #view-test>.last-result,
  body[data-view="test"] #view-test>.info-card{max-height:72px!important;overflow:auto!important;margin:3px 0!important;padding:8px!important}
  body[data-view="test"] #view-test>.drive-live-hud:not(.hidden){max-height:88px!important;overflow:auto!important;margin:3px 0!important;padding:7px!important}

  /* The selected-grid sheet now defaults to the majority of the screen. */
  body[data-view="map"] .map-layout.details-open{
    grid-template-columns:1fr!important;
    grid-template-rows:40dvh 60dvh!important;
    height:100dvh!important;
    overflow:hidden!important;
  }
  body[data-view="map"] .map-layout.details-open .map-stage{grid-row:1!important;min-height:0!important;height:100%!important}
  body[data-view="map"] .map-layout.details-open .map-stage #map{height:100%!important;min-height:0!important}
  body[data-view="map"] .map-layout.details-open .map-sheet{
    grid-row:2!important;
    height:100%!important;
    min-height:0!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch!important;
    border-radius:24px 24px 0 0!important;
    padding:12px 14px calc(78px + env(safe-area-inset-bottom))!important;
  }
  body[data-view="map"] .map-sheet-head{
    position:sticky!important;
    top:-12px!important;
    z-index:4!important;
    margin:-12px -14px 8px!important;
    padding:12px 14px 10px!important;
    background:rgba(23,26,38,.98)!important;
    backdrop-filter:blur(18px)!important;
  }
  body[data-view="map"] .map-sheet-head h3{font-size:21px!important;margin:2px 0!important}
  body[data-view="map"] .map-sheet-head p{font-size:10px!important}
  body[data-view="map"] .map-sheet-actions{gap:6px!important}
  body[data-view="map"] .map-sheet-expand{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-width:68px!important;padding:7px 9px!important;min-height:36px!important}
  body[data-view="map"] .map-sheet-close{min-width:58px!important;min-height:36px!important;padding:7px 9px!important}
  body[data-view="map"] .grid-detail-metrics{gap:6px!important;margin-top:8px!important}
  body[data-view="map"] .grid-detail-metrics>div{padding:8px!important;border-radius:12px!important}
  body[data-view="map"] .grid-detail-metrics strong{font-size:17px!important}
  body[data-view="map"] .grid-range{margin-top:7px!important;padding:9px!important}
  body[data-view="map"] .grid-detail-section{margin-top:9px!important;padding-top:8px!important}
  body[data-view="map"] .grid-sample-list{gap:7px!important}
  body[data-view="map"] .grid-sample{padding:9px 10px!important;border-radius:12px!important}

  /* Expand gives the test list almost the full screen; Map returns to the
     normal 60/40 split without closing the selected grid. */
  body[data-view="map"] .map-layout.details-open.details-expanded{
    grid-template-rows:18dvh 82dvh!important;
  }
  body[data-view="map"] .map-layout.details-open.details-expanded .map-stage .map-toolbar{
    opacity:.24!important;
    pointer-events:none!important;
  }
}

/* Very short phones get another small compression step instead of scrolling. */
@media(max-width:760px) and (max-height:700px){
  body[data-view="test"] .topbar{padding-top:calc(3px + env(safe-area-inset-top))!important;padding-bottom:1px!important}
  body[data-view="test"] #view-test .provider-chip{font-size:15px!important}
  body[data-view="test"] .mobile-network-line{margin-bottom:2px!important;font-size:9px!important}
  body[data-view="test"] #view-test .hero-meta{min-height:27px!important;margin-bottom:0!important}
  body[data-view="test"] #view-test .hero-meta>.location-box,
  body[data-view="test"] #view-test .hero-meta>div:first-child{min-height:27px!important}
  body[data-view="test"] #view-test .start-button{width:min(42vw,18.5dvh,150px)!important;max-width:150px!important;margin:2px auto 3px!important}
  body[data-view="test"] #view-test .start-button #startButtonText{font-size:25px!important}
  body[data-view="test"] #view-test .start-button small{font-size:8px!important;margin-top:3px!important}
  body[data-view="test"] #view-test .compact-multi-button{height:34px!important;min-height:34px!important;font-size:11px!important}
  body[data-view="test"] #view-test .live-test-strip{min-height:30px!important;padding:4px 8px!important;margin-top:3px!important}
  body[data-view="test"] .mobile-environment-bar button{min-height:30px!important;font-size:9px!important}
  body[data-view="test"] #view-test .metric-card{min-height:52px!important;padding:4px 8px!important}
  body[data-view="test"] #view-test .metric-card strong{font-size:19px!important}
}


/* Coverage Lab v0.9.4 — mobile Speed session fit.
   Map is intentionally unchanged from v0.9.3. On phones the redundant full
   Field Session card is folded into the compact live session status row, and
   the duplicate large Stop Session launcher disappears while a multi-test
   session is active. This keeps the complete primary Speed dashboard above
   the fixed navigation without enabling page scrolling. */
@media(max-width:760px){
  /* The large field-session detail card duplicates data already visible in
     the live strip/status on a phone. Desktop keeps the full HUD. */
  body[data-view="test"] #view-test>.drive-live-hud,
  body[data-view="test"] #view-test>#multiSessionSummary,
  body[data-view="test"] #view-test>.last-result{
    display:none!important;
  }

  /* Once Multiple Tests is running, Pause/Stop are the controls. Remove the
     second, oversized Stop Session button that was consuming a whole row. */
  body[data-view="test"].multi-session-active #view-test .multi-launch-row{
    display:none!important;
  }

  body[data-view="test"].multi-session-active #view-test .start-button{
    width:min(41vw,19dvh,168px)!important;
    max-width:168px!important;
    margin:2px auto 3px!important;
  }
  body[data-view="test"].multi-session-active #view-test .start-button #startButtonText{
    font-size:clamp(25px,6.6vw,30px)!important;
  }
  body[data-view="test"].multi-session-active #view-test .start-button small{
    margin-top:3px!important;
    font-size:8px!important;
  }
  body[data-view="test"].multi-session-active #view-test .phase-text{
    min-height:14px!important;
    line-height:14px!important;
    font-size:10px!important;
  }
  body[data-view="test"].multi-session-active #view-test .progress-track{
    margin-top:2px!important;
  }
  body[data-view="test"].multi-session-active #view-test .live-test-strip{
    min-height:31px!important;
    margin-top:3px!important;
    padding:4px 9px!important;
  }

  body[data-view="test"] #view-test #multiRunStatus:not(.hidden){
    width:min(94%,400px)!important;
    min-height:27px!important;
    margin:3px auto 0!important;
    padding:4px 9px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    font-size:8.5px!important;
    line-height:1.1!important;
  }
  body[data-view="test"] #view-test .multi-session-controls:not(.hidden){
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    width:min(78%,330px)!important;
    gap:6px!important;
    margin:3px auto 0!important;
  }
  body[data-view="test"] #view-test .multi-session-controls .secondary-button{
    width:100%!important;
    min-width:0!important;
    min-height:31px!important;
    height:31px!important;
    padding:3px 8px!important;
    border-radius:12px!important;
    font-size:9.5px!important;
  }

  body[data-view="test"].multi-session-active .mobile-environment-bar{
    margin-top:3px!important;
    margin-bottom:4px!important;
  }
  body[data-view="test"].multi-session-active .mobile-environment-bar button{
    min-height:32px!important;
  }
  body[data-view="test"].multi-session-active #view-test>.metric-grid{
    gap:4px!important;
  }
  body[data-view="test"].multi-session-active #view-test .metric-card{
    min-height:56px!important;
    padding:5px 9px!important;
  }
  body[data-view="test"].multi-session-active #view-test .metric-card strong{
    font-size:20px!important;
  }
}

@media(max-width:760px) and (max-height:780px){
  body[data-view="test"].multi-session-active #view-test .start-button{
    width:min(39vw,17dvh,145px)!important;
    max-width:145px!important;
  }
  body[data-view="test"].multi-session-active #view-test .hero-meta{
    min-height:26px!important;
  }
  body[data-view="test"].multi-session-active #view-test .hero-meta>.location-box,
  body[data-view="test"].multi-session-active #view-test .hero-meta>div:first-child{
    min-height:26px!important;
  }
  body[data-view="test"].multi-session-active #view-test .live-test-strip{
    min-height:28px!important;
  }
  body[data-view="test"].multi-session-active #view-test .mobile-environment-bar button{
    min-height:29px!important;
  }
  body[data-view="test"].multi-session-active #view-test .metric-card{
    min-height:50px!important;
  }
}


/* Coverage Lab v0.9.5 — roomy mobile Speed fit.
   v0.9.4 proved the fixed/non-scrolling Speed dashboard fits, but left too
   much unused vertical space on tall phones. This override spends that room
   on larger primary controls and metrics while preserving the same hard
   no-scroll behavior. Map and all other views are intentionally unchanged. */
@media(max-width:760px) and (min-height:820px){
  body[data-view="test"] .topbar{
    padding:calc(7px + env(safe-area-inset-top)) 14px 5px!important;
  }
  body[data-view="test"] .topbar .brand-mark{
    width:34px!important;height:34px!important;flex-basis:34px!important;padding:5px!important;
  }
  body[data-view="test"] .topbar h1{font-size:20px!important}
  body[data-view="test"] .topbar .badge{
    top:calc(12px + env(safe-area-inset-top))!important;
    right:12px!important;
    padding:5px 8px!important;
    font-size:8px!important;
  }

  body[data-view="test"] #view-test.view.active{
    padding-left:15px!important;
    padding-right:15px!important;
  }
  body[data-view="test"] #view-test>.profile-row{min-height:27px!important}
  body[data-view="test"] #view-test .profile-chip{min-height:25px!important;padding:2px 7px!important}
  body[data-view="test"] #view-test .provider-chip{font-size:18px!important}
  body[data-view="test"] .mobile-network-line{
    margin-bottom:7px!important;
    font-size:11px!important;
  }

  body[data-view="test"] #view-test .hero-meta{
    min-height:34px!important;
    margin-bottom:4px!important;
    gap:7px!important;
  }
  body[data-view="test"] #view-test .hero-meta>.location-box,
  body[data-view="test"] #view-test .hero-meta>div:first-child{
    min-height:34px!important;
    padding:0 10px!important;
  }
  body[data-view="test"] #view-test .location-box{font-size:10px!important}
  body[data-view="test"] #view-test .select.minimal{
    min-height:31px!important;
    font-size:11px!important;
  }

  body[data-view="test"] #view-test .start-button{
    width:min(47vw,22.5dvh,202px)!important;
    max-width:202px!important;
    margin:4px auto 6px!important;
  }
  body[data-view="test"] #view-test .start-button #startButtonText{
    font-size:clamp(29px,7.7vw,36px)!important;
  }
  body[data-view="test"] #view-test .start-button small{
    margin-top:6px!important;
    font-size:10px!important;
  }
  body[data-view="test"] #view-test .phase-text{
    min-height:18px!important;
    line-height:18px!important;
    font-size:12px!important;
  }

  body[data-view="test"] #view-test .progress-track{
    height:6px!important;
    margin-top:5px!important;
    width:min(91%,390px)!important;
  }
  body[data-view="test"] #view-test .live-test-strip{
    min-height:38px!important;
    width:min(96%,410px)!important;
    margin-top:5px!important;
    padding:7px 11px!important;
    border-radius:14px!important;
    font-size:11px!important;
  }

  body[data-view="test"] #view-test #multiRunStatus:not(.hidden){
    width:min(96%,410px)!important;
    min-height:31px!important;
    margin-top:4px!important;
    padding:5px 10px!important;
    font-size:9.5px!important;
  }
  body[data-view="test"] #view-test .multi-session-controls:not(.hidden){
    width:min(82%,350px)!important;
    gap:8px!important;
    margin-top:5px!important;
  }
  body[data-view="test"] #view-test .multi-session-controls .secondary-button{
    min-height:37px!important;
    height:37px!important;
    border-radius:14px!important;
    font-size:11px!important;
  }

  body[data-view="test"] .mobile-environment-bar{
    margin-top:5px!important;
    margin-bottom:7px!important;
    padding:4px!important;
    border-radius:17px!important;
  }
  body[data-view="test"] .mobile-environment-bar button{
    min-height:39px!important;
    border-radius:14px!important;
    font-size:11.5px!important;
  }

  body[data-view="test"] #view-test>.metric-grid{
    gap:7px!important;
  }
  body[data-view="test"] #view-test .metric-card{
    min-height:69px!important;
    padding:8px 11px!important;
    border-radius:16px!important;
  }
  body[data-view="test"] #view-test .metric-card strong{
    font-size:25px!important;
    margin-top:3px!important;
  }
  body[data-view="test"] #view-test .metric-card span,
  body[data-view="test"] #view-test .metric-card small{
    font-size:10px!important;
  }

  /* During Multiple Tests use nearly the same roomy scale. The redundant
     launcher/HUD remain hidden exactly as in v0.9.4. */
  body[data-view="test"].multi-session-active #view-test .start-button{
    width:min(45vw,21.5dvh,194px)!important;
    max-width:194px!important;
    margin:3px auto 5px!important;
  }
  body[data-view="test"].multi-session-active #view-test .start-button #startButtonText{
    font-size:clamp(28px,7.4vw,34px)!important;
  }
  body[data-view="test"].multi-session-active #view-test .start-button small{
    margin-top:5px!important;
    font-size:9px!important;
  }
  body[data-view="test"].multi-session-active #view-test .phase-text{
    min-height:17px!important;
    line-height:17px!important;
    font-size:11px!important;
  }
  body[data-view="test"].multi-session-active #view-test .live-test-strip{
    min-height:37px!important;
    margin-top:4px!important;
    padding:6px 10px!important;
  }
  body[data-view="test"].multi-session-active .mobile-environment-bar{
    margin-top:5px!important;
    margin-bottom:7px!important;
  }
  body[data-view="test"].multi-session-active .mobile-environment-bar button{
    min-height:38px!important;
  }
  body[data-view="test"].multi-session-active #view-test>.metric-grid{gap:7px!important}
  body[data-view="test"].multi-session-active #view-test .metric-card{
    min-height:68px!important;
    padding:8px 11px!important;
  }
  body[data-view="test"].multi-session-active #view-test .metric-card strong{
    font-size:25px!important;
  }
}
