:root {
  color-scheme: light;
  --surface-0:#f5f5f3; --surface-1:#fcfcfb; --surface-2:#eeeeeb;
  --border:#dedcd6; --border-strong:#c3c2b7;
  --text-primary:#0b0b0b; --text-secondary:#52514e; --text-muted:#78766f;
  --series-1:#2a78d6; --series-2:#eb6834; --series-3:#1baf7a; --series-4:#eda100;
  --good:#1a7f4b; --warn:#b06a00; --critical:#c0392b;
  --plan:#c3c2b7;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --surface-0:#111110; --surface-1:#1a1a19; --surface-2:#232322;
    --border:#33332f; --border-strong:#4a4a45;
    --text-primary:#ffffff; --text-secondary:#c3c2b7; --text-muted:#8e8d84;
    --series-1:#3987e5; --series-2:#d95926; --series-3:#199e70; --series-4:#c98500;
    --good:#3fa96b; --warn:#d99400; --critical:#e0685a;
    --plan:#55554e;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --surface-0:#111110; --surface-1:#1a1a19; --surface-2:#232322;
  --border:#33332f; --border-strong:#4a4a45;
  --text-primary:#ffffff; --text-secondary:#c3c2b7; --text-muted:#8e8d84;
  --series-1:#3987e5; --series-2:#d95926; --series-3:#199e70; --series-4:#c98500;
  --good:#3fa96b; --warn:#d99400; --critical:#e0685a;
  --plan:#55554e;
}
* { box-sizing:border-box; }
body {
  margin:0; background:var(--surface-0); color:var(--text-primary);
  font:15px/1.5 ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  -webkit-font-smoothing:antialiased;
}
header.top {
  display:flex; align-items:center; gap:16px; padding:14px 24px;
  background:var(--surface-1); border-bottom:1px solid var(--border); flex-wrap:wrap;
}
.brand { font-weight:700; letter-spacing:-.01em; font-size:17px; }
.brand span { color:var(--text-muted); font-weight:500; }
.spacer { flex:1; }
.who { color:var(--text-secondary); font-size:13px; }
button {
  font:inherit; font-size:13px; padding:7px 13px; border-radius:8px;
  border:1px solid var(--border-strong); background:var(--surface-2);
  color:var(--text-primary); cursor:pointer;
}
button:hover { border-color:var(--text-muted); }
button.primary { background:var(--series-1); border-color:var(--series-1); color:#fff; }
main { padding:24px; max-width:1400px; margin:0 auto; }
.filters { display:flex; gap:8px; align-items:center; margin-bottom:20px; flex-wrap:wrap; }
.filters .lab { color:var(--text-muted); font-size:13px; margin-right:4px; }
.seg { display:inline-flex; border:1px solid var(--border-strong); border-radius:8px; overflow:hidden; }
.seg button { border:0; border-radius:0; background:var(--surface-1); }
.seg button[aria-pressed="true"] { background:var(--series-1); color:#fff; }
.tiles { display:grid; grid-template-columns:repeat(auto-fit,minmax(215px,1fr)); gap:14px; margin-bottom:22px; }
.tile { background:var(--surface-1); border:1px solid var(--border); border-radius:12px; padding:16px 18px; }
.tile .k { color:var(--text-secondary); font-size:12.5px; font-weight:500; text-transform:uppercase; letter-spacing:.04em; }
.tile .v { font-size:31px; font-weight:680; letter-spacing:-.02em; margin:7px 0 3px; font-variant-numeric:tabular-nums; }
.tile .sub { font-size:12.5px; color:var(--text-muted); font-variant-numeric:tabular-nums; }
.pill { display:inline-block; padding:1px 7px; border-radius:999px; font-size:11.5px; font-weight:600; border:1px solid; }
.pill.good{color:var(--good);border-color:var(--good)} .pill.warn{color:var(--warn);border-color:var(--warn)}
.pill.bad{color:var(--critical);border-color:var(--critical)} .pill.flat{color:var(--text-muted);border-color:var(--border-strong)}
.grid2 { display:grid; grid-template-columns:repeat(auto-fit,minmax(430px,1fr)); gap:16px; }
.card { background:var(--surface-1); border:1px solid var(--border); border-radius:12px; padding:18px; min-width:0; }
.card h2 { margin:0 0 3px; font-size:15px; font-weight:640; }
.card .cap { margin:0 0 14px; font-size:12.5px; color:var(--text-muted); }
.legend { display:flex; gap:14px; flex-wrap:wrap; margin-bottom:10px; font-size:12.5px; color:var(--text-secondary); }
.legend i { width:11px; height:11px; border-radius:3px; display:inline-block; margin-right:5px; vertical-align:-1px; }
.chart-scroll { overflow-x:auto; }
svg { display:block; max-width:100%; }
svg text { fill:var(--text-secondary); font-size:11px; }
svg .axis line, svg .axis path { stroke:var(--border); }
svg .grid line { stroke:var(--border); stroke-dasharray:2 3; }
table { width:100%; border-collapse:collapse; font-size:13px; font-variant-numeric:tabular-nums; }
th,td { text-align:left; padding:8px 10px; border-bottom:1px solid var(--border); }
th { color:var(--text-muted); font-weight:600; font-size:11.5px; text-transform:uppercase; letter-spacing:.04em; }
td.num,th.num { text-align:right; }
details.tableview { margin-top:12px; }
details.tableview summary { cursor:pointer; color:var(--text-secondary); font-size:12.5px; }
.tip {
  position:fixed; pointer-events:none; z-index:50; background:var(--surface-1);
  border:1px solid var(--border-strong); border-radius:8px; padding:8px 10px;
  font-size:12.5px; box-shadow:0 6px 20px rgba(0,0,0,.18); opacity:0; transition:opacity .1s;
}
.tip .t { font-weight:640; margin-bottom:4px; }
.tip .r { display:flex; gap:10px; justify-content:space-between; }
.tip .r span:last-child { font-variant-numeric:tabular-nums; }
.gate { max-width:430px; margin:14vh auto; background:var(--surface-1); border:1px solid var(--border);
        border-radius:14px; padding:34px; text-align:center; }
.gate h1 { font-size:20px; margin:0 0 8px; }
.gate p { color:var(--text-secondary); font-size:14px; margin:0 0 22px; }
.note { background:var(--surface-2); border:1px solid var(--border); border-radius:10px;
        padding:11px 14px; font-size:12.5px; color:var(--text-secondary); margin-bottom:18px; }
.fobgrid { display:flex; gap:14px; align-items:flex-end; flex-wrap:wrap; }
.fobgrid label { display:flex; flex-direction:column; gap:5px; font-size:12.5px;
                 color:var(--text-secondary); min-width:230px; }
.fobgrid select { font:inherit; font-size:13px; padding:7px 9px; border-radius:8px;
                  border:1px solid var(--border-strong); background:var(--surface-2);
                  color:var(--text-primary); }
.fobbtns { display:flex; gap:8px; flex-wrap:wrap; }
button:disabled { opacity:.45; cursor:not-allowed; }
/* Operational status - read across a desk, not squinted at. */
#fob-status .pill { font-size:17px; font-weight:640; padding:9px 16px; line-height:1.3; }
#fob-captured { font-size:15px; }

#fob-status .pill.warn { font-size:21px; font-weight:700; padding:12px 20px; }
