[hidden] {
  display: none !important;
}

@font-face {
  font-family: Geist;
  src: url("fonts/Geist-Variable-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("fonts/GeistMono-Variable-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --canvas: #0a0b0e;
  --surface: #111318;
  --surface-2: #16181f;
  --surface-3: #1c1f26;
  --hairline: #2b2f38;
  --hairline-soft: #22252c;
  --ink: #edeef2;
  --muted: #a3a7b0;
  --subtle: #7c828e;
  --faint: #5b616c;
  --accent: #8c90f4;
  --accent-soft: rgba(140, 144, 244, 0.14);
  --teal: #7dbfa9;
  --gold: #f7c065;
  --rose: #f38ba8;
  --green: #a6e3a1;
  --p1: #7dbfa9;
  --p2: #f7c065;
  --p3: #8c90f4;
  --p4: #d3c2f8;
  --p5: #9c8bd6;
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar: 248px;
  --font: Geist, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.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;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 20;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--accent);
  color: #09090f;
  font-weight: 600;
  font-size: 12px;
}

.skip:focus {
  top: 12px;
}

/* ---------- shell ---------- */

.shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 20px 14px;
  border-right: 1px solid var(--hairline);
  background: var(--canvas);
  overflow: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 8px;
}

.mark {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 16px;
}

.mark i {
  display: block;
  width: 3px;
  border-radius: 1px;
}

.mark i:nth-child(1) {
  height: 10px;
  background: var(--p1);
}

.mark i:nth-child(2) {
  height: 16px;
  background: var(--p2);
}

.mark i:nth-child(3) {
  height: 13px;
  background: var(--p3);
}

.mark i:nth-child(4) {
  height: 7px;
  background: var(--p4);
}

.brand-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-sub {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--subtle);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 13px;
}

.nav a:hover {
  background: var(--surface);
  color: var(--ink);
}

.nav a[aria-current="page"] {
  background: var(--surface);
  color: var(--ink);
  font-weight: 500;
}

.nav svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  opacity: 0.85;
}

.rail-label {
  margin: 2px 0 -14px;
  padding: 0 10px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.site-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.site-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 12.5px;
}

.site-link:hover {
  background: var(--surface);
  color: var(--ink);
}

.site-link[aria-current="page"] {
  background: var(--surface-2);
  color: var(--ink);
}

.site-link .tag {
  margin-left: auto;
  padding: 1px 5px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.04em;
  color: var(--subtle);
  text-transform: uppercase;
}

.dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--subtle);
}

.p1 {
  background: var(--p1);
}

.p2 {
  background: var(--p2);
}

.p3 {
  background: var(--p3);
}

.p4 {
  background: var(--p4);
}

.p5 {
  background: var(--p5);
}

.rail-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 8px 0;
  border-top: 1px solid var(--hairline-soft);
}

.user {
  display: flex;
  align-items: center;
  gap: 9px;
}

.avatar {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
}

.user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}

.user-meta strong {
  font-size: 12px;
  font-weight: 500;
}

.user-meta span {
  font-size: 10px;
  color: var(--subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.source-note {
  margin: 0;
  font-size: 10.5px;
  line-height: 1.55;
  color: var(--subtle);
}

/* ---------- main ---------- */

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 28px;
  border-bottom: 1px solid var(--hairline);
  background: var(--canvas);
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--subtle);
  min-width: 0;
}

.crumbs a:hover {
  color: var(--ink);
}

.crumbs .sep {
  color: var(--faint);
}

.crumbs .current {
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
}

.updated {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--subtle);
  white-space: nowrap;
}

.seg {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.seg a {
  padding: 5px 9px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}

.seg a:hover {
  color: var(--ink);
}

.seg a[aria-current="true"] {
  background: var(--surface-3);
  color: var(--ink);
}

.icon-btn {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
}

.icon-btn:hover {
  color: var(--ink);
  border-color: var(--hairline);
  background: var(--surface-2);
}

.icon-btn svg {
  width: 15px;
  height: 15px;
}

.content {
  flex: 1;
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 28px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--subtle);
}

h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.page-head p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.chips {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.chip .dot {
  width: 5px;
  height: 5px;
}

/* ---------- kpis ---------- */

.kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.kpi {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 14px 15px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--surface);
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.kpi-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--subtle);
}

.kpi-value {
  font-size: 26px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.kpi-value small {
  margin-left: 2px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
}

.kpi-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  color: var(--subtle);
}

.delta {
  padding: 2px 5px;
  border-radius: 5px;
  background: var(--surface-3);
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--muted);
}

.delta.up {
  background: rgba(166, 227, 161, 0.08);
  color: var(--green);
}

.delta.down {
  background: rgba(243, 139, 168, 0.08);
  color: var(--rose);
}

.spark {
  width: 62px;
  height: 22px;
  margin-left: auto;
  color: var(--accent);
  opacity: 0.9;
}

.spark.down {
  color: var(--rose);
}

/* ---------- cards ---------- */

.card {
  padding: 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--surface);
  min-width: 0;
}

.card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.card-title {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.card-sub {
  margin: 3px 0 0;
  font-size: 11px;
  color: var(--subtle);
}

.card-sub code {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
}

.card-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.legend {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 10.5px;
  color: var(--muted);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend i {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.legend b {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  color: var(--subtle);
}

/* ---------- chart ---------- */

.chart-wrap {
  width: 100%;
  overflow: hidden;
}

.chart {
  display: block;
  width: 100%;
  height: auto;
}

.chart text {
  font-family: var(--mono);
  font-size: 9.5px;
  fill: var(--subtle);
}

.chart .grid {
  stroke: var(--hairline-soft);
  stroke-width: 1;
}

.chart .axis {
  stroke: var(--hairline);
  stroke-width: 1;
}

.chart .line {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart .dot {
  stroke: var(--surface);
  stroke-width: 2;
}

.chart .bar {
  transition: opacity 0.15s ease;
}

.chart .bar:hover {
  opacity: 0.78;
}

/* ---------- grids ---------- */

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

/* ---------- tables ---------- */

.table-wrap {
  overflow-x: auto;
  margin: 0 -4px;
}

table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 12.5px;
}

th {
  padding: 0 8px 8px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.09em;
  text-align: left;
  text-transform: uppercase;
  color: var(--subtle);
  white-space: nowrap;
}

td {
  padding: 9px 8px;
  border-top: 1px solid var(--hairline-soft);
  vertical-align: middle;
  white-space: nowrap;
}

tbody tr {
  transition: background-color 0.15s ease;
}

tbody tr:hover {
  background: var(--surface-2);
}

th.num,
td.num {
  text-align: right;
  font-family: var(--mono);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

td.num strong {
  font-weight: 500;
  color: var(--ink);
}

.host {
  display: flex;
  align-items: center;
  gap: 7px;
}

.host .dot {
  width: 6px;
  height: 6px;
}

.path {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
}

.mini-bar {
  display: block;
  width: 52px;
  height: 4px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}

.mini-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
}

.mini-bar.teal i {
  background: var(--teal);
}

/* ---------- countries ---------- */

.country-list {
  display: flex;
  flex-direction: column;
}

.country {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid var(--hairline-soft);
}

.country:first-child {
  border-top: 0;
}

.country-code {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
}

.country-name {
  margin-bottom: 4px;
  font-size: 11.5px;
  color: var(--ink);
}

.country-track {
  height: 4px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}

.country-track i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--teal);
}

.country-pct {
  font-family: var(--mono);
  font-size: 9.5px;
  text-align: right;
  color: var(--muted);
}

/* ---------- status / cache / bots ---------- */

.stack {
  display: flex;
  height: 8px;
  margin: 6px 0 14px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-3);
}

.stack i {
  display: block;
  height: 100%;
}

.s200 {
  background: var(--green);
}

.s304 {
  background: var(--teal);
}

.s404 {
  background: var(--gold);
}

.s5xx {
  background: var(--rose);
}

.status-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}

.status-row .dot {
  width: 6px;
  height: 6px;
}

.status-row .pct {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink);
}

.big {
  font-size: 34px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}

.big small {
  margin-left: 2px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
}

.meter {
  height: 6px;
  margin: 14px 0 8px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}

.meter i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
}

.meter-legend {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--subtle);
}

.bot-list {
  display: flex;
  flex-direction: column;
}

.bot-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid var(--hairline-soft);
  font-size: 11px;
  color: var(--muted);
}

.bot-row:first-child {
  border-top: 0;
}

.bot-row .name {
  min-width: 78px;
  color: var(--ink);
}

.bot-row .track {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}

.bot-row .track i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--subtle);
}

.bot-row .pct {
  width: 36px;
  text-align: right;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--muted);
}

.note {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--hairline-soft);
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--subtle);
}

/* ---------- page detail ---------- */

.detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 18px;
  align-items: start;
}

.detail-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.stat {
  padding: 9px 10px;
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.stat span {
  display: block;
  margin-bottom: 4px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--subtle);
}

.stat strong {
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.mini-chart {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- footer ---------- */

.foot {
  margin-top: auto;
  padding: 18px 28px 26px;
  border-top: 1px solid var(--hairline-soft);
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--faint);
}

.foot p {
  margin: 0;
  max-width: 980px;
}

.foot code {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--subtle);
}

/* ---------- responsive ---------- */

@media (max-width: 1180px) {
  .kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--hairline);
    overflow-x: auto;
    scrollbar-width: none;
  }

  .sidebar::-webkit-scrollbar {
    display: none;
  }

  .brand-sub,
  .rail-label,
  .site-list,
  .rail-foot {
    display: none;
  }

  .nav {
    flex-direction: row;
    gap: 2px;
  }

  .nav a {
    padding: 7px 9px;
    white-space: nowrap;
  }

  .nav a span {
    display: none;
  }

  .nav svg {
    width: 18px;
    height: 18px;
  }

  .topbar {
    padding: 12px 18px;
  }

  .content {
    padding: 20px 18px;
  }

  .foot {
    padding: 16px 18px 22px;
  }
}

@media (max-width: 700px) {
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-head .chips {
    margin-left: 0;
  }

  .updated {
    display: none;
  }

  .topbar {
    flex-wrap: wrap;
  }

  .top-actions {
    width: 100%;
    justify-content: space-between;
  }

  .detail {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 440px) {
  .kpis {
    grid-template-columns: minmax(0, 1fr);
  }

  .detail-stats {
    grid-template-columns: minmax(0, 1fr);
  }

  h1 {
    font-size: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
