:root {
  --bg: #0d0f13;
  --bg2: #13161c;
  --card: #171a21;
  --line: #262a33;
  --text: #eef0f3;
  --muted: #a3a8b3;
  --dim: #6d7380;
  --accent: #3987e5;
  --accent2: #5aa2ff;
  --teal: #2cc3b0;
  --amber: #f0b44c;
  --red: #ef6461;
  --none: #2a2f39;
  --radius: 16px;
  --max: 1080px;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(1200px 500px at 50% -200px, rgba(57,135,229,.16), transparent 70%);
  background-repeat: no-repeat;
}
a { color: inherit; text-decoration: none; }
h1, h2 { margin: 0; letter-spacing: -.02em; line-height: 1.15; }
p { margin: 0; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); font-size: 14px; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px max(16px, calc((100vw - var(--max)) / 2));
  background: rgba(13, 15, 19, .75); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.brand .mark { width: 28px; height: 28px; color: var(--muted); }
.brand .sub { font-weight: 500; color: var(--muted); margin-left: 4px; }
.nav nav { display: flex; align-items: center; gap: 18px; }
.navlink { color: var(--muted); font-size: 15px; }
.navlink:hover, .foot-links a:hover { color: var(--text); }
.foot-links { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.net { border: 1px solid var(--line); padding: 5px 12px; border-radius: 999px; font-size: 14px; color: var(--muted); white-space: nowrap; }

main { max-width: var(--max); margin: 0 auto; padding: 36px 16px 10px; display: grid; gap: 20px; }

/* banner */
.banner {
  --c: var(--dim);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 26px 28px; border-radius: var(--radius);
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 16%, var(--card)), var(--card));
  border: 1px solid color-mix(in srgb, var(--c) 40%, var(--line));
}
.banner[data-state="operational"] { --c: var(--teal); }
.banner[data-state="degraded"] { --c: var(--amber); }
.banner[data-state="outage"] { --c: var(--red); }
.banner-main { display: flex; align-items: center; gap: 18px; }
.banner h1 { font-size: clamp(22px, 3.4vw, 32px); font-weight: 800; }
.since { color: var(--muted); font-size: 15px; margin-top: 4px; }
.updated { color: var(--dim); font-size: 13.5px; }
.sdot { flex: none; width: 16px; height: 16px; border-radius: 50%; background: var(--c); animation: ping 2s infinite; }
@keyframes ping {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 60%, transparent); }
  80%, 100% { box-shadow: 0 0 0 12px transparent; }
}

/* figures */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi {
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
  padding: 18px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 14px;
}
.k { color: var(--muted); font-size: 13.5px; font-weight: 500; }
.v { font-size: 26px; font-weight: 700; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v.mono { font-size: 24px; }
.h { color: var(--dim); font-size: 12.5px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; }
.h.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }

/* cards */
.card { padding: 22px 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.card h2 { font-size: 18px; font-weight: 700; }
.axis { display: flex; justify-content: space-between; color: var(--dim); font-size: 12px; margin-top: 8px; }

.bars { display: flex; align-items: flex-end; gap: 3px; height: 70px; }
.bars i { flex: 1; min-width: 2px; border-radius: 2px 2px 0 0; background: linear-gradient(to top, var(--accent), var(--accent2)); }
.bars i.empty { background: var(--none); height: 3px !important; }

.days { display: flex; gap: 2px; height: 38px; }
.days i { flex: 1; min-width: 2px; border-radius: 2px; background: var(--none); position: relative; }
.days i.ok { background: var(--teal); }
.days i.deg { background: var(--amber); }
.days i.out { background: var(--red); }
.pcts { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.pcts b { color: var(--text); font-weight: 600; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 14px; color: var(--muted); font-size: 13px; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 7px; vertical-align: -1px; }
.lg.ok { background: var(--teal); } .lg.deg { background: var(--amber); } .lg.out { background: var(--red); } .lg.none { background: var(--none); }

/* nodes */
.table-wrap { overflow-x: auto; }
.nodes { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.nodes th { text-align: left; color: var(--dim); font-weight: 500; font-size: 13px; padding: 0 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.nodes td { padding: 11px 10px; border-bottom: 1px solid rgba(255,255,255,.04); white-space: nowrap; }
.nodes tr:last-child td { border-bottom: 0; }
.nodes .r { text-align: right; }
.badge { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; }
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.badge.up::before { background: var(--teal); }
.badge.stale::before { background: var(--amber); }
.badge.down::before { background: var(--red); }

/* incidents */
.inc { padding: 14px 0; border-top: 1px solid var(--line); }
.inc:first-child { border-top: 0; padding-top: 0; }
.inc-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.inc-title { font-weight: 600; }
.tag { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; border: 1px solid; }
.tag.open { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 50%, transparent); }
.tag.done { color: var(--teal); border-color: color-mix(in srgb, var(--teal) 45%, transparent); }
.inc-when { color: var(--dim); font-size: 13px; margin-top: 2px; }
.inc ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 14.5px; }
.inc li span { color: var(--dim); font-size: 12.5px; margin-right: 6px; }
.empty-note { color: var(--muted); font-size: 15px; }

/* footer */
.foot { max-width: var(--max); margin: 0 auto; padding: 40px 16px 40px; }
.foot-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.brand.small .mark { width: 22px; height: 22px; }
.disc { color: var(--dim); font-size: 13.5px; margin-top: 18px; max-width: 760px; }
.copy { color: var(--dim); font-size: 13px; margin-top: 10px; }

@media (max-width: 860px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  main { padding-top: 22px; }
  .banner { padding: 20px; }
  .card { padding: 18px 16px; }
  .v { font-size: 22px; } .v.mono { font-size: 20px; }
  .days { gap: 1px; }
  .nav .net { display: none; }
}
@media (prefers-reduced-motion: reduce) { .sdot { animation: none; } }
