:root {
  --bg: #0a0a0b;
  --panel: #111113;
  --panel-hi: #17171a;
  --line: #1f2024;
  --line-hi: #2a2b31;
  --text: #ededef;
  --text-2: #b4b4b8;
  --dim: #6c6d75;
  --dim-hi: #8c8d96;
  --green: #3fd68a;
  --red: #f46b6b;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  font-feature-settings: "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
}

::selection { background: #2a2b31; }

header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 32px 32px;
}
header h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
}
header .sub {
  margin: 4px 0 0;
  color: var(--dim-hi);
  font-size: 13px;
  font-weight: 400;
}

.chart-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 32px 12px;
}

.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 8px;
}

.ranges {
  display: inline-flex;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}
.ranges button {
  background: transparent;
  color: var(--dim-hi);
  border: 0;
  padding: 5px 12px;
  border-radius: 5px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.12s, background 0.12s;
}
.ranges button:hover { color: var(--text); }
.ranges button.active {
  background: var(--panel-hi);
  color: var(--text);
  box-shadow: 0 0 0 1px var(--line-hi);
}

.chart-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 20px 20px;
  height: 460px;
}

.cards {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  padding: 12px 32px 48px;
}

.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 22px;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.12s, background 0.12s;
}
.card:hover {
  border-color: var(--line-hi);
  background: var(--panel-hi);
}
.card.hidden { opacity: 0.4; }
.card.hidden .count { color: var(--dim); }

.card .row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.card .meta { min-width: 0; }
.card .name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card .name::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--card-accent, var(--text));
  flex-shrink: 0;
}
.card .host {
  color: var(--dim);
  font-size: 12px;
  margin-top: 3px;
  margin-left: 15px;
  font-variant-numeric: tabular-nums;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--dim-hi);
  flex-shrink: 0;
}
.status::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--red);
}
.card.online .status { color: var(--text-2); }
.card.online .status::before { background: var(--green); }

.card .count {
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--text);
  margin-top: 22px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.card .ratio {
  color: var(--dim);
  font-size: 14px;
  font-weight: 500;
}
.card .ratio::before { content: "· "; }

.card .label {
  font-size: 12px;
  color: var(--dim-hi);
  margin-top: 6px;
  font-weight: 400;
}
