/* Fleet: a cool "survey paper" palette in light mode, deep slate at night.
   One bold element (the world map); everything else stays quiet. */
:root {
  --font: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans", sans-serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;

  --bg: #e8edef;
  --surface: #f5f7f8;
  --raised: #ffffff;
  --ink: #13212e;
  --ink2: #34475a;
  --muted: #627485;
  --line: #c9d3da;
  --line2: #dce3e8;
  --accent: #2747c7;
  --accent-soft: #dfe5fa;

  --ok: #13836a;
  --warn: #b5760a;
  --bad: #c23a2b;
  --off: #8f9ca8;

  --s1: #2f55d4;
  --s2: #0e8a88;
  --s3: #8a55c9;
  --s4: #d0602a;
  --s5: #5c8a1e;
  --s6: #b8467d;
  --s7: #7b6a2e;
  --s8: #3c8fd6;

  --land: #8798a6;
  --land-night: #a8b6c1;
  --night: rgba(31, 52, 77, 0.13);

  --r-s: 6px;
  --r-m: 10px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1821;
    --surface: #13202b;
    --raised: #182836;
    --ink: #e3eaef;
    --ink2: #bac7d1;
    --muted: #8496a5;
    --line: #2a3b4a;
    --line2: #1f2f3c;
    --accent: #86a2ff;
    --accent-soft: #1f2d52;

    --ok: #3cc29a;
    --warn: #e6aa3c;
    --bad: #f07360;
    --off: #5d6d7a;

    --s1: #7f9dff;
    --s2: #3cc7c2;
    --s3: #b98bf0;
    --s4: #f08f5c;
    --s5: #9ccd5a;
    --s6: #ec7fb0;
    --s7: #d4bf73;
    --s8: #66b5f5;

    --land: #5a7283;
    --land-night: #34495a;
    --night: rgba(0, 0, 0, 0.32);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 var(--font);
  font-feature-settings: "tnum" 1, "cv11" 1;
  -webkit-font-smoothing: antialiased;
}
body.stale main { opacity: 0.6; transition: opacity 0.4s; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -0.01em; }
h1 { font-size: 26px; line-height: 1.2; }
h2 { font-size: 16px; }
h3 { font-size: 14px; margin: 18px 0 8px; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: 0.92em; font-feature-settings: normal; }
code { background: var(--line2); padding: 1px 5px; border-radius: 4px; word-break: break-all; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--raised); padding: 6px 10px; z-index: 50; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 13px; margin-top: 10px; max-width: 75ch; }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 28px; }
.wrap.narrow { max-width: 820px; }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 28px;
  height: 56px; padding: 0 28px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line2);
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand svg { color: var(--accent); }
.top nav { display: flex; gap: 4px; }
.top nav a { color: var(--ink2); padding: 6px 11px; border-radius: var(--r-s); font-weight: 500; }
.top nav a:hover { background: var(--line2); text-decoration: none; }
.top nav a[aria-current="page"] { color: var(--ink); background: var(--raised); box-shadow: inset 0 0 0 1px var(--line); }
.top-status { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--ink2); font-size: 13px; }
.top-status:hover { text-decoration: none; color: var(--ink); }

/* ---------- buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: var(--r-s);
  border: 1px solid var(--line); background: var(--raised); color: var(--ink);
  font: 500 13px var(--font); cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--muted); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .btn.primary { color: #0e1821; } }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink2); }
.btn.ghost:hover { background: var(--line2); }
.btn.small { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn.wide { width: 100%; height: 40px; }
.icon-btn { border: 0; background: none; color: var(--muted); font-size: 16px; cursor: pointer; width: 32px; height: 32px; border-radius: var(--r-s); }
.icon-btn:hover { background: var(--line2); color: var(--ink); }

input, select, textarea {
  font: 14px var(--font); color: var(--ink);
  background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-s);
  padding: 7px 10px; min-height: 36px; width: 100%;
}
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 0; border-color: var(--accent); }
input.tiny { width: 76px; display: inline-block; margin: 0 4px; }

.form { display: grid; gap: 14px; max-width: 880px; }
.form label { display: grid; gap: 5px; font-weight: 550; font-size: 13px; color: var(--ink2); }
.form label.check { display: flex; align-items: center; gap: 9px; font-weight: 500; color: var(--ink); font-size: 14px; }
.form label.check input[type="checkbox"] { width: 17px; height: 17px; min-height: 0; accent-color: var(--accent); }
.form h3 { margin: 14px 0 0; font-size: 15px; color: var(--ink); }
.form fieldset { border: 0; padding: 0; margin: 0; }
.form details summary { cursor: pointer; color: var(--ink2); font-weight: 550; font-size: 13px; }
.form details[open] summary { margin-bottom: 10px; }
.help { font-weight: 400; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.suffix { position: relative; display: flex; align-items: center; }
.suffix input { padding-right: 70px; }
.suffix i { position: absolute; right: 10px; font-style: normal; color: var(--muted); font-weight: 400; font-size: 12.5px; pointer-events: none; }
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.form-actions.left { justify-content: flex-start; }
.form-actions .spacer { flex: 1; }
.form-error { color: var(--bad); font-size: 13px; }
.estimate { background: var(--surface); border: 1px solid var(--line2); border-radius: var(--r-s); padding: 10px 12px; font-size: 13px; color: var(--ink2); }
.lede { color: var(--ink2); max-width: 72ch; margin-top: 6px; }

.switch { position: relative; display: inline-block; width: 34px; height: 20px; }
.switch input { opacity: 0; width: 0; height: 0; min-height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 20px; cursor: pointer; transition: background 0.15s; }
.switch span::before { content: ""; position: absolute; width: 14px; height: 14px; left: 3px; top: 3px; background: var(--raised); border-radius: 50%; transition: transform 0.15s; }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::before { transform: translateX(14px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.seg { display: inline-flex; background: var(--line2); border-radius: var(--r-s); padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; font: 500 12.5px var(--font); color: var(--ink2); padding: 5px 11px; border-radius: 4px; cursor: pointer; }
.seg button[aria-selected="true"] { background: var(--raised); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), inset 0 0 0 1px var(--line); }

/* ---------- status marks ---------- */
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); flex: none; }
.dot[data-state="warn"] { background: var(--warn); }
.dot[data-state="bad"] { background: var(--bad); }
.dot[data-state="off"] { background: transparent; box-shadow: inset 0 0 0 2px var(--off); }
[data-level="ok"] { --lv: var(--ok); }
[data-level="warn"] { --lv: var(--warn); }
[data-level="bad"] { --lv: var(--bad); }
.v[data-level="warn"], .v[data-level="bad"], .big[data-level="warn"], .big[data-level="bad"], td[data-level="warn"], td[data-level="bad"] { color: var(--lv); }
.warn-text { color: var(--warn) !important; }
.bad-text { color: var(--bad); }

.meter { display: block; height: 4px; background: var(--line2); border-radius: 4px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--lv, var(--ok)); border-radius: 4px; transition: width 0.6s ease; }
.meter.none { background: transparent; }
.tag { font-style: normal; font-size: 11.5px; font-weight: 600; color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); padding: 0 6px; border-radius: 4px; margin-left: 6px; }

/* ---------- map ---------- */
.map-band { position: relative; border-bottom: 1px solid var(--line2); background: var(--bg); }
.worldmap { position: relative; width: 100%; }
.worldmap canvas { display: block; }
.map-caption { position: absolute; left: 20px; bottom: 10px; font-size: 12px; color: var(--ink2); pointer-events: none; background: color-mix(in srgb, var(--bg) 82%, transparent); padding: 2px 8px; border-radius: 4px; }
.map-tip, .chart-tip {
  position: absolute; z-index: 5; pointer-events: none;
  background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-s);
  box-shadow: 0 6px 20px rgba(10, 25, 40, 0.14);
  padding: 8px 10px; font-size: 12.5px; white-space: nowrap;
}
.map-tip { display: grid; gap: 1px; }
.map-tip b { font-size: 13px; }
.map-tip span { color: var(--ink2); }

/* ---------- overview ---------- */
.fleet { padding-top: 26px; padding-bottom: 60px; }
.fleet-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 14px; flex-wrap: wrap; }
.fleet-sum { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-top: 6px; color: var(--ink2); }
.fleet-sum b { color: var(--ink); font-weight: 650; }
.fleet-sum .attn b, .fleet-sum .attn { color: var(--warn); }
.fleet-tools { display: flex; gap: 8px; }
.fleet-tools input { width: 220px; }
.fleet-tools select { width: auto; max-width: 45%; }

.rows { border-top: 1px solid var(--line); }
.row-head, .row {
  display: grid;
  grid-template-columns: minmax(200px, 1.7fr) repeat(3, minmax(110px, 1fr)) minmax(170px, 1.25fr) minmax(130px, 1fr) minmax(90px, 0.7fr);
  gap: 22px; align-items: center; padding: 13px 10px;
}
.row-head { font-size: 12px; color: var(--muted); padding-top: 9px; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.row { color: var(--ink); border-bottom: 1px solid var(--line2); border-radius: 0; }
.row:hover { text-decoration: none; background: var(--surface); }
.row[data-state="off"] { color: var(--muted); }
.c-name { display: flex; gap: 11px; align-items: flex-start; min-width: 0; }
.c-name .dot { margin-top: 6px; }
.c-name strong { display: block; font-size: 15px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-name > div { min-width: 0; }
.sub { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clock { margin-left: 8px; color: var(--ink2); }
.c-metric { display: grid; gap: 4px; min-width: 0; }
.c-metric .v, .c-up .v { font-weight: 600; font-size: 14px; }
.c-net { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.c-net > div { display: grid; font-weight: 600; font-size: 13.5px; line-height: 1.35; white-space: nowrap; }
.c-net > div .v:last-child { color: var(--ink2); font-weight: 500; }
.spark { flex: none; }
.spark polyline { fill: none; stroke: var(--s1); stroke-width: 1.4; stroke-linejoin: round; }
.c-up { display: grid; gap: 2px; }
.c-offline { grid-column: 2 / -1; color: var(--muted); }
.none { padding: 18px 10px; }

.empty { text-align: center; padding: 56px 20px; border: 1px dashed var(--line); border-radius: var(--r-m); margin-top: 18px; }
.empty h2 { font-size: 18px; margin-bottom: 6px; }
.empty p { color: var(--ink2); margin: 0 auto 16px; max-width: 52ch; }

/* ---------- detail ---------- */
.detail { padding-top: 22px; padding-bottom: 70px; }
.back { display: inline-block; font-size: 13px; margin-bottom: 14px; }
.back::before { content: "‹ "; }
.srv-title { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.srv-title h1 { font-size: 30px; }
.srv-title .btn { margin-left: auto; }
.pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; padding: 3px 10px 3px 8px; border-radius: 20px; background: var(--raised); box-shadow: inset 0 0 0 1px var(--line); }
.srv-meta, .srv-specs { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 8px; color: var(--ink2); }
.srv-specs { color: var(--muted); font-size: 13px; margin-top: 4px; }
.srv-note { margin-top: 10px; color: var(--ink2); max-width: 75ch; white-space: pre-wrap; }

.readouts {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)) minmax(0, 1.6fr);
  margin: 24px 0 8px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.readout { padding: 16px 18px 16px 0; display: grid; gap: 3px; align-content: start; min-width: 0; }
.readout + .readout { padding-left: 18px; border-left: 1px solid var(--line2); }
.readout .label { font-size: 12.5px; color: var(--muted); }
.readout .big { font-size: 24px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.15; white-space: nowrap; }
.readout .big small { font-size: 14px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.readout .sub { white-space: normal; }
.readout .meter { margin: 4px 0 2px; height: 5px; }
.readout.wide { grid-column: 1 / -1; }

.block { margin-top: 38px; }
.block-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 28px; }
.charts figure { margin: 0; min-width: 0; }
figcaption { font-size: 13px; color: var(--ink2); font-weight: 550; margin-bottom: 6px; display: flex; justify-content: space-between; gap: 10px; }
.key { font-weight: 400; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.key i, .swatch { display: inline-block; width: 10px; height: 3px; border-radius: 2px; vertical-align: middle; }
.key i + * { margin-right: 6px; }
.swatch { margin-right: 8px; width: 12px; }
.chart { position: relative; }
.chart canvas { display: block; touch-action: pan-y; }
.chart-tip time { display: block; color: var(--muted); margin-bottom: 4px; font-size: 12px; }
.chart-tip div { display: flex; align-items: center; gap: 7px; }
.chart-tip i { width: 8px; height: 8px; border-radius: 2px; }
.chart-tip b { margin-left: auto; padding-left: 14px; font-weight: 650; }

table.data { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 13.5px; }
table.data th { text-align: left; font-weight: 550; font-size: 12.5px; color: var(--muted); padding: 7px 10px; border-bottom: 1px solid var(--line); }
table.data td { padding: 9px 10px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data .r { text-align: right; white-space: nowrap; }
table.data td.actions { display: flex; gap: 6px; justify-content: flex-end; }

/* ---------- network ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; padding: 28px 0 18px; flex-wrap: wrap; }
.run { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.matrix-wrap { overflow-x: auto; margin-top: 16px; padding-bottom: 4px; }
table.matrix { border-collapse: separate; border-spacing: 3px; font-size: 13.5px; }
table.matrix th { font-weight: 550; color: var(--ink2); padding: 6px 10px; text-align: left; white-space: nowrap; }
table.matrix thead th { vertical-align: bottom; font-size: 12.5px; }
table.matrix th.corner { color: var(--muted); font-weight: 400; font-size: 12px; }
table.matrix tbody th small { display: block; color: var(--muted); font-weight: 400; }
table.matrix td {
  min-width: 112px; padding: 9px 12px; border-radius: var(--r-s); text-align: right; font-weight: 600; white-space: nowrap;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line2);
}
table.matrix td small { display: block; font-weight: 450; font-size: 12px; color: var(--muted); }
table.matrix td[data-level] { background: color-mix(in srgb, var(--lv) 10%, var(--surface)); box-shadow: inset 3px 0 0 var(--lv); color: var(--ink); }
table.matrix td[data-level="bad"] { color: var(--bad); }
table.matrix td.self { background: repeating-linear-gradient(135deg, var(--line2) 0 2px, transparent 2px 7px); box-shadow: none; }
table.matrix td.na { color: var(--muted); font-weight: 400; }

/* ---------- events ---------- */
.events { list-style: none; padding: 0; margin: 4px 0 0; }
.events li { display: grid; grid-template-columns: 14px 150px 1fr auto; gap: 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line2); }
.ev-mark { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); transform: translateY(-1px); }
.events li[data-level="ok"] .ev-mark { background: var(--ok); }
.events li[data-level="info"] .ev-mark { background: var(--accent); }
.events time { color: var(--muted); font-size: 13px; }

/* ---------- settings ---------- */
.settings { padding-top: 28px; padding-bottom: 70px; }
.tabs { display: flex; gap: 2px; margin: 18px 0 24px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { padding: 9px 14px; color: var(--ink2); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.pane-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.pane-head p { color: var(--ink2); max-width: 70ch; }
.inline-form { margin-top: 26px; padding-top: 4px; border-top: 1px solid var(--line2); }
.steps { padding-left: 20px; display: grid; gap: 12px; margin: 0 0 6px; }
.steps p { color: var(--ink2); }
.cmd { display: flex; gap: 8px; align-items: center; margin-top: 8px; background: var(--ink); color: var(--bg); border-radius: var(--r-s); padding: 10px 10px 10px 14px; }
.cmd code { background: none; color: inherit; padding: 0; flex: 1; font-size: 12.5px; line-height: 1.5; }
.cmd .btn { flex: none; }

/* ---------- dialogs, toast, login ---------- */
dialog.modal {
  border: 1px solid var(--line); border-radius: var(--r-m); background: var(--raised); color: var(--ink);
  padding: 0; width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 40px);
  box-shadow: 0 24px 70px rgba(10, 25, 40, 0.3);
}
dialog.modal.wide { width: min(780px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(14, 24, 33, 0.45); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 6px 22px; margin: 0; }
.modal-head h2 { font-size: 17px; }
.modal-body { padding: 8px 22px 22px; }
.modal-body > p { color: var(--ink2); }
@media (prefers-reduced-motion: no-preference) {
  dialog.modal[open] { animation: rise 0.16s ease-out; }
  @keyframes rise { from { opacity: 0; transform: translateY(6px); } }
}

#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--r-s);
  font-size: 13.5px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); max-width: calc(100vw - 32px);
}
#toast[data-kind="error"] { background: var(--bad); color: #fff; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login form { width: min(360px, 100%); display: grid; gap: 14px; }
.login h1 { font-size: 28px; }
.login p { color: var(--ink2); }
.login label { display: grid; gap: 6px; font-weight: 550; font-size: 13px; color: var(--ink2); }
.back-link { text-align: center; font-size: 13px; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .row-head, .row { grid-template-columns: minmax(180px, 1.5fr) repeat(3, minmax(90px, 1fr)) minmax(150px, 1.2fr) minmax(110px, 1fr); }
  .row-head span:last-child, .row .c-up { display: none; }
  .readouts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .readout { border-bottom: 1px solid var(--line2); }
  .readout:nth-child(3n + 1) { padding-left: 0; border-left: 0; }
  .readout.traffic { grid-column: span 3; padding-left: 0; border-left: 0; }
}
@media (max-width: 860px) {
  .wrap { padding: 0 16px; }
  .top { gap: 12px; padding: 0 16px; }
  .top nav a { padding: 6px 8px; }
  .top-status { display: none; }
  .map-caption { left: 16px; }
  .fleet-tools { width: 100%; }
  .fleet-tools input { flex: 1; width: auto; }
  .row-head { display: none; }
  .row { grid-template-columns: 1fr 1fr 1fr; gap: 12px 16px; padding: 14px 4px; }
  .row .c-name { grid-column: 1 / -1; }
  .row .c-net { grid-column: span 2; }
  .row .c-up { display: grid; }
  .c-offline { grid-column: 1 / -1; }
  .charts { grid-template-columns: 1fr; }
  .readouts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .readout, .readout + .readout { padding-left: 0; border-left: 0; }
  .readout:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line2); }
  .readout.traffic { grid-column: 1 / -1; padding-left: 0; border-left: 0; }
  .events li { grid-template-columns: 14px 1fr; }
  .events li time { grid-column: 2; }
  .events li .ev-msg, .events li a { grid-column: 2; }
  table.data { font-size: 13px; }
  .settings table.data th:nth-child(4), .settings table.data td:nth-child(4) { display: none; }
}
@media (max-width: 860px) {
  .row [data-label]::before { content: attr(data-label); display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 1px; }
  .row .c-net { flex-wrap: wrap; }
  .row .c-net::before { flex-basis: 100%; }
}
@media (max-width: 520px) {
  .brand span { display: none; }
  .top { gap: 6px; padding: 0 10px; }
  .top nav { gap: 0; }
  .top nav a { padding: 6px 7px; font-size: 13.5px; }
  .top .btn.small { padding: 0 6px; }
  .map-caption { display: none; }
  .row { grid-template-columns: 1fr 1fr; }
  .row .c-net { grid-column: 1 / -1; }
  h1 { font-size: 22px; }
  .srv-title h1 { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
