:root {
  color-scheme: dark;
  --bg: #07080c;
  --card: rgba(16, 19, 26, 0.78);
  --line: rgba(232, 184, 109, 0.14);
  --text: #f3efe6;
  --muted: #9aa39c;
  --teal: #5eead4;
  --copper: #e8b86d;
  --violet: #c4b5fd;
  --red: #fb7185;
  --ok: #5eead4;
  --pad: max(18px, env(safe-area-inset-left));
  --pad-r: max(18px, env(safe-area-inset-right));
  --pad-t: max(16px, env(safe-area-inset-top));
  --pad-b: max(18px, env(safe-area-inset-bottom));
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: "Syne", ui-sans-serif, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-bottom: calc(var(--pad-b) + 12px);
}
.fx {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(900px 500px at 110% -10%, rgba(232, 184, 109, 0.16), transparent 55%),
    radial-gradient(700px 420px at -20% 110%, rgba(94, 234, 212, 0.1), transparent 50%),
    linear-gradient(180deg, #0b0d12 0%, #07080c 40%);
}
.fx::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
header, nav, main, section, aside, .foot { position: relative; z-index: 1; }
.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: var(--pad-t) var(--pad-r) 8px var(--pad);
}
h1 {
  margin: 2px 0 0;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}
h2 {
  margin: 0 0 10px;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.eyebrow, .kind, .foot {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--copper);
  margin: 0;
}
.sub, .hero-sub, .foot { color: var(--muted); }
.foot { padding: 18px var(--pad) 0; letter-spacing: 0.08em; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
a.ghost { display: inline-flex; align-items: center; text-decoration: none; }
.ghost, .tab, .chip, button.power {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: inherit;
}
.ghost {
  background: rgba(255,255,255,0.03);
  color: var(--text);
  padding: 0 14px;
}
.live-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 rgba(94,234,212,.7);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(94,234,212,.55); }
  70% { box-shadow: 0 0 0 10px rgba(94,234,212,0); }
  100% { box-shadow: 0 0 0 0 rgba(94,234,212,0); }
}
.hero {
  padding: 8px var(--pad-r) 18px var(--pad);
}
.kwline {
  display: flex;
  align-items: baseline;
  gap: 10px;
  line-height: 0.9;
}
.kwline span {
  font-size: clamp(3.4rem, 16vw, 6.2rem);
  font-weight: 800;
  letter-spacing: -0.07em;
  font-variant-numeric: tabular-nums;
}
.kwline small {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  color: var(--muted);
  font-size: 1rem;
  letter-spacing: 0.18em;
}
.hero-sub { margin: 10px 0 0; font-size: 0.95rem; }
.live-now {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}
.live-now div {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.live-now b {
  display: block;
  margin-top: 4px;
  color: var(--teal);
  font-size: clamp(1.05rem, 3.6vw, 1.35rem);
  letter-spacing: -0.03em;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  text-transform: none;
  font-variant-numeric: tabular-nums;
}
.drawbar {
  margin-top: 14px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  overflow: hidden;
}
.drawbar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--copper));
  transition: width .45s ease;
  box-shadow: 0 0 18px rgba(94,234,212,.35);
}
.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
}
.hero-meta div {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  backdrop-filter: blur(12px);
}
.hero-meta b {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  text-transform: none;
}
.tabs {
  display: flex;
  gap: 6px;
  padding: 0 var(--pad) 14px;
  position: sticky;
  top: 0;
  z-index: 5;
  background: linear-gradient(var(--bg) 65%, transparent);
}
.tab {
  flex: 1;
  background: rgba(255,255,255,0.03);
  color: var(--muted);
}
.tab.on {
  background: rgba(232, 184, 109, 0.12);
  color: var(--copper);
  border-color: rgba(232, 184, 109, 0.35);
}
.pane { display: none; padding: 0 var(--pad-r) 24px var(--pad); }
.pane.on { display: block; }
.grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 860px) {
  .grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .pane, .top, .tabs, .hero, .alerts, .foot { max-width: 1180px; margin-left: auto; margin-right: auto; }
  .kwline span { font-size: 6.4rem; }
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px 16px 16px 18px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(16px);
}
.card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent, var(--copper));
}
.card.hot {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent), 0 18px 50px -28px var(--accent);
}
.name { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.03em; }
.row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}
.pill.on { background: rgba(94,234,212,.12); color: var(--teal); }
.pill.off { background: rgba(251,113,133,.1); color: var(--red); }
.pill.err { background: rgba(232,184,109,.12); color: var(--copper); }
.stats {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.stats b {
  display: block;
  color: #fff;
  font-size: 1.12rem;
  margin-top: 3px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  letter-spacing: -0.03em;
  text-transform: none;
  font-variant-numeric: tabular-nums;
}
.stats b.live-num { color: var(--teal); }
.kwline span, .hero-meta b { font-variant-numeric: tabular-nums; }
@keyframes tickflash {
  from { color: var(--copper); }
  to { color: var(--teal); }
}
.tickflash { animation: tickflash .5s ease; }
.spark { width: 100%; height: 42px; margin-top: 12px; display: block; }
.power {
  margin-top: 14px;
  width: 100%;
  background: linear-gradient(90deg, #1d4ed8, #2563eb);
  color: #fff;
  border: 0;
}
.power.off-action { background: linear-gradient(90deg, #7f1d1d, #b91c1c); }
.vac-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}
.vac-actions button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.vac-actions button.primary {
  background: linear-gradient(90deg, #1d4ed8, #2563eb);
  border: 0;
  color: #fff;
}
.vac-actions button.dock {
  background: linear-gradient(90deg, #5b21b6, #7c3aed);
  border: 0;
  color: #fff;
}
.suction-row {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.suction-row button {
  flex: 1;
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  font-weight: 700;
  font-family: inherit;
}
.suction-row button.on { color: var(--violet); border-color: rgba(196,181,253,.45); background: rgba(196,181,253,.12); }
.map-card { margin-top: 4px; }
.map-wrap {
  margin-top: 14px;
  min-height: 240px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(0,0,0,.35);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
}
.map-wrap img { width: 100%; height: auto; display: block; image-rendering: pixelated; }
.alerts { padding: 0 var(--pad-r) 10px var(--pad); display: grid; gap: 8px; }
.alert {
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 0.9rem;
  font-weight: 650;
}
.alert.alert { background: rgba(127,29,29,.55); color: #fecaca; }
.alert.warn { background: rgba(120,53,15,.45); color: #fde68a; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; align-items: center; }
.toolbar select {
  flex: 1;
  min-height: 44px;
  background: rgba(255,255,255,0.03);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  font-size: 1rem;
  font-family: inherit;
}
.ranges { display: flex; gap: 6px; }
.chip { background: rgba(255,255,255,0.03); color: var(--muted); padding: 0 12px; min-height: 40px; }
.chip.on { background: rgba(232,184,109,.14); color: var(--copper); }
.chart-card { margin-top: 12px; }
.chart-wrap { position: relative; height: 220px; }
.tape { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tape li {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}
.tape time {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  color: var(--copper);
  font-size: 0.78rem;
}
.tip {
  margin: 8px var(--pad) 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--muted);
}
.login-wrap { max-width: 420px; margin: 0 auto; padding: 64px var(--pad) 24px; }
.login-wrap .card { padding: 18px; display: grid; gap: 12px; }
input {
  width: 100%;
  margin-top: 6px;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #07080c;
  color: var(--text);
  padding: 0 12px;
  font-size: 16px;
  font-family: inherit;
}
@media (display-mode: standalone) { .tip { display: none !important; } }
