:root {
  --bg: #050505;
  --panel: #0c0c0e;
  --panel-2: #121216;
  --line: #1e1e24;
  --text: #e8e8ea;
  --muted: #8a8a95;
  --cyan: #30d5c8;
  --green: #55d532;
  --amber: #e0a91b;
  --red: #e4564a;
  --violet: #8b7bf0;
  --blue: #4aa8e4;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 ui-sans-serif, -apple-system, "Segoe UI", Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #0a0a0c, #050505);
  position: sticky; top: 0; z-index: 5;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand h1 { font-size: 15px; font-weight: 600; margin: 0; letter-spacing: .2px; }
.dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  box-shadow: 0 0 12px rgba(48, 213, 200, .6);
}
.chip {
  font-size: 11px; color: var(--cyan);
  border: 1px solid rgba(48, 213, 200, .35);
  background: rgba(48, 213, 200, .08);
  padding: 2px 8px; border-radius: 999px;
}
.top__right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
select {
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 10px; font: inherit; font-size: 13px;
}
select:focus-visible, a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.health { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.health.ok { color: var(--green); }
.health.warn { color: var(--amber); }
.health.bad { color: var(--red); }

main { padding: 18px 20px 40px; max-width: 1500px; margin: 0 auto; }

.cards {
  display: grid; gap: 12px; margin-bottom: 18px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 16px;
}
.card h2 {
  margin: 0 0 6px; font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
}
.big { margin: 0; font-size: 26px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.4px; }
.sub { margin: 4px 0 0; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sub .up { color: var(--green); }
.sub .down { color: var(--red); }

.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 16px; margin-bottom: 16px;
}
.panel__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.panel__head h2 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .2px; }

.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }

.chartwrap { width: 100%; height: 320px; }
#chart { width: 100%; height: 100%; display: block; }
.hint { color: var(--muted); font-size: 12px; margin: 6px 0 0; }

.grid2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }

.tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { text-align: right; padding: 7px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th:first-child, .tbl td:first-child,
.tbl th:nth-child(2), .tbl td:nth-child(2) { text-align: left; }
.tbl th {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); font-weight: 500;
}
.tbl td { font-size: 13px; }
.tbl tbody tr:hover { background: rgba(255, 255, 255, .025); }
.tbl a { color: var(--cyan); text-decoration: none; }
.tbl a:hover { text-decoration: underline; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.tag {
  font-size: 10px; padding: 1px 6px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted);
}
.tag--legacy { color: var(--amber); border-color: rgba(224, 169, 27, .35); }

.foot { padding: 0 20px 30px; color: var(--muted); font-size: 12px; max-width: 1500px; margin: 0 auto; }

@media (max-width: 640px) {
  .grid2 { grid-template-columns: 1fr; }
  .chartwrap { height: 240px; }
}
