:root {
  --bg: #070807;
  --panel: #0e100f;
  --panel-2: #131614;
  --line: #1f2421;
  --line-2: #2a302c;
  --text: #f1f4f2;
  --muted: #8a938e;
  --faint: #5d6661;
  --ok: #2fd36b;
  --ok-dim: rgba(47, 211, 107, .14);
  --down: #f25555;
  --down-dim: rgba(242, 85, 85, .14);
  --pending: #e8a93a;
  --pending-dim: rgba(232, 169, 58, .14);
  --maint: #5aa7f5;
  --maint-dim: rgba(90, 167, 245, .14);
  --empty: #1d221f;
  --off: #3d4440;
  --off-text: #9aa39e;
  --radius: 16px;
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 20; background: rgba(7, 8, 7, .82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1240px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-mark { width: 22px; height: 22px; color: var(--ok); flex: none; }
.top-right { display: flex; align-items: center; gap: 12px; }
.live { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(47, 211, 107, .6); animation: live 2.4s infinite; }
.live.stale i { background: var(--pending); animation: none; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(47, 211, 107, .55); } 70% { box-shadow: 0 0 0 8px rgba(47, 211, 107, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 211, 107, 0); } }
.lang { display: inline-flex; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.lang button { background: none; border: 0; padding: 6px 10px; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--panel-2); color: var(--text); }

.wrap { max-width: 1240px; margin: 0 auto; padding: 28px 24px 48px; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 24px;
  align-items: center;
  padding: 44px 44px 40px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(60% 80% at 75% 50%, rgba(47, 211, 107, .10), transparent 70%),
    linear-gradient(180deg, #0d100e, #0a0c0b);
  overflow: hidden;
}
.hero.is-down { background: radial-gradient(60% 80% at 75% 50%, rgba(242, 85, 85, .10), transparent 70%), linear-gradient(180deg, #100d0d, #0b0a0a); }
.hero.is-pending { background: radial-gradient(60% 80% at 75% 50%, rgba(232, 169, 58, .09), transparent 70%), linear-gradient(180deg, #100f0c, #0b0a09); }
.hero h1 { margin: 0 0 10px; font-size: clamp(34px, 5vw, 54px); line-height: 1.04; font-weight: 800; letter-spacing: -.03em; }
.lead { margin: 0 0 20px; color: var(--muted); max-width: 440px; }
.overall { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--ok); background: var(--ok-dim); border: 1px solid rgba(47, 211, 107, .35); }
.overall i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.overall.down { color: var(--down); background: var(--down-dim); border-color: rgba(242, 85, 85, .35); }
.overall.pending { color: var(--pending); background: var(--pending-dim); border-color: rgba(232, 169, 58, .35); }
.overall.maint { color: var(--maint); background: var(--maint-dim); border-color: rgba(90, 167, 245, .35); }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 28px; max-width: 560px; }
.kpi { padding: 16px; border: 1px solid var(--line-2); border-radius: 14px; background: rgba(14, 16, 15, .7); min-width: 0; }
.kpi > span { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.3; min-height: 2.6em; }
.kpi b { display: block; margin-top: 6px; font-size: clamp(20px, 2.4vw, 27px); color: var(--ok); white-space: nowrap; }
.kpi b.warn { color: var(--pending); }
.kpi b.bad { color: var(--down); }
.kpi b em { font-style: normal; color: var(--faint); }
.kpi small { display: block; margin-top: 6px; font-size: 11.5px; color: var(--ok); line-height: 1.3; }
.kpi small.bad { color: var(--down); }
.hero-ring { display: flex; justify-content: center; }
#ring { width: 100%; max-width: 420px; height: auto; overflow: visible; }
#ring .lbl { fill: #9aa39e; font: 600 10.5px var(--font); letter-spacing: .16em; text-transform: uppercase; }
#ring .dot { transition: fill .3s; }
#ring .core-pulse { transform-origin: 220px 220px; animation: core 3.2s ease-in-out infinite; }
@keyframes core { 0%, 100% { opacity: .55; transform: scale(1); } 50% { opacity: .15; transform: scale(1.18); } }

/* ---------- services ---------- */
.services { margin-top: 40px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.sec-head h2 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 7px; font-size: 13px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg button[aria-selected="true"] { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }

.group { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); margin-bottom: 14px; overflow: hidden; }
.g-head { width: 100%; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 18px 20px; background: none; border: 0; text-align: left; cursor: pointer; }
.g-head:hover { background: rgba(255, 255, 255, .015); }
.g-head:focus-visible, .seg button:focus-visible, .lang button:focus-visible { outline: 2px solid var(--ok); outline-offset: 2px; }
.chev { width: 18px; height: 18px; color: var(--muted); transition: transform .2s; transform: rotate(-90deg); }
.group.open .chev { transform: none; }
.g-name { font-size: 17px; font-weight: 700; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-sub { display: flex; align-items: center; gap: 7px; margin-top: 2px; color: var(--muted); font-size: 13px; }
.g-up { text-align: right; }
.g-up b { display: block; font-size: 17px; color: var(--ok); }
.g-up b.w { color: var(--pending); }
.g-up b.r { color: var(--down); }
.g-up span { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.sdot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; }
.s0 .sdot, .sdot.s0 { background: var(--down); }
.sdot.s2 { background: var(--pending); }
.sdot.s3 { background: var(--maint); }
.g-mini { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 20px 18px 56px; }
.g-mini i { width: 14px; height: 14px; border-radius: 3px; background: var(--ok); opacity: .9; }
.g-mini i.s0 { background: var(--down); }
.g-mini i.s2 { background: var(--pending); }
.g-mini i.s3 { background: var(--maint); }
.group.open .g-mini { display: none; }
.g-body { display: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 16px 16px; }
.group.open .g-body { display: grid; }

.mon { border: 1px solid var(--line); border-radius: 12px; background: var(--bg); padding: 14px 16px 12px; min-width: 0; }
.mon.s0 { border-color: rgba(242, 85, 85, .45); }
.m-top { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.m-ico { width: 18px; height: 18px; margin-top: 2px; color: var(--ok); }
.s0 .m-ico { color: var(--down); }
.s2 .m-ico { color: var(--pending); }
.s3 .m-ico { color: var(--maint); }
.m-title b { display: block; font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-title small { display: block; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: #f1f4f2; color: #0b0d0c; white-space: nowrap; }
.s0 .badge { background: var(--down); color: #fff; }
.s2 .badge { background: var(--pending); color: #1a1205; }
.s3 .badge { background: var(--maint); color: #06121f; }
.m-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 16px; margin: 10px 0 8px; font-size: 13px; color: var(--muted); }
.m-meta span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.m-meta svg { width: 14px; height: 14px; }
.m-meta b { color: var(--text); font-family: var(--mono); font-size: 12.5px; }
.m-meta b.g { color: var(--ok); }
.m-meta b.w { color: var(--pending); }
.m-meta b.r { color: var(--down); }
.tag { margin-left: auto; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line-2); font: 700 10px var(--mono); letter-spacing: .06em; color: var(--muted); }
.beats { display: flex; gap: 2px; height: 26px; align-items: stretch; }
.beats i { flex: 1 1 0; min-width: 1px; border-radius: 2px; background: var(--ok); }
.beats i.s0 { background: var(--down); }
.beats i.s2 { background: var(--pending); }
.beats i.s3 { background: var(--maint); }
.beats i.e { background: var(--empty); }
/* device that is switched off: grey, not an outage */
.beats i.s4, .g-mini i.s4, .sdot.s4 { background: var(--off); }
.s4 .m-ico { color: var(--off-text); }
.s4 .badge { background: #2a302c; color: var(--off-text); }
.beats i:not(.e):hover { filter: brightness(1.35); }
.m-foot { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; color: var(--faint); }

.tip { position: fixed; z-index: 50; pointer-events: none; padding: 7px 10px; border-radius: 8px; background: #1a1e1c; border: 1px solid var(--line-2); font-size: 12px; color: var(--text); white-space: nowrap; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); }
.tip b { font-family: var(--mono); font-weight: 700; }

.foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--faint); font-size: 12.5px; }
.empty-state { padding: 40px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius); }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding: 32px 24px; }
  .hero-ring { order: -1; }
  #ring { max-width: 320px; }
  .kpis { max-width: none; }
}
@media (max-width: 760px) {
  .g-body { grid-template-columns: 1fr; }
  .beats i:nth-child(-n+40) { display: none; }
}
@media (max-width: 560px) {
  .top-in { padding: 12px 16px; }
  .wrap { padding: 16px 16px 40px; }
  .hero { padding: 24px 16px; border-radius: 18px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpis .kpi:last-child { grid-column: 1 / -1; }
  .live #live-text { display: none; }
  .g-head { padding: 16px 14px; gap: 10px; }
  .g-mini { padding: 0 14px 16px 46px; }
  .g-body { padding: 0 10px 10px; }
  .seg button { padding: 6px 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .live i, #ring .core-pulse { animation: none; }
}
