:root{
  color-scheme:dark;
  --bg:#060814;
  --bg2:#0b1022;
  --screen:#0b1020;
  --screen2:#101725;
  --panel:#141c2b;
  --panel-soft:#172031;
  --text:#f5f7fb;
  --muted:#9ea8bb;
  --muted2:#7f8796;
  --line:rgba(255,255,255,.08);
  --line-strong:rgba(255,255,255,.13);
  --ok:#21d38d;
  --warn:#f0bd67;
  --bad:#ff6d7a;
  --chip:#1a2233;
  --shadow:0 24px 120px rgba(0,0,0,.38);
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  min-width:320px;
  overflow:hidden;
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:
    radial-gradient(80% 120% at 70% 16%, rgba(98,120,255,.34) 0%, rgba(98,120,255,.09) 30%, transparent 60%),
    radial-gradient(55% 90% at 28% 78%, rgba(35,68,255,.18) 0%, transparent 62%),
    linear-gradient(180deg,var(--bg) 0%,var(--bg2) 100%);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
}
body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background-image:radial-gradient(rgba(255,255,255,.09) 1px, transparent 1px);
  background-size:3px 3px;
  opacity:.06;
}
.bg-glow{
  position:fixed;
  inset:auto 8% -18% auto;
  width:44vw;
  min-width:360px;
  aspect-ratio:1/1;
  background:radial-gradient(circle, rgba(94,115,255,.34) 0%, rgba(94,115,255,.12) 34%, transparent 67%);
  filter:blur(28px);
  pointer-events:none;
}
.viewport{
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}
.shell{
  width:min(1120px,100%);
  height:min(92vh,760px);
  border-radius:34px;
  border:1px solid rgba(255,255,255,.08);
  background:linear-gradient(180deg,rgba(6,10,22,.94) 0%, rgba(13,18,33,.96) 100%);
  box-shadow:var(--shadow);
  padding:28px 28px 24px;
  display:grid;
  grid-template-rows:auto minmax(150px, 0.9fr) minmax(250px,1.1fr);
  gap:18px;
  position:relative;
  overflow:hidden;
}
.shell::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
  pointer-events:none;
}
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  min-height:36px;
}
.brand{display:inline-flex;align-items:center;gap:10px;color:var(--text);text-decoration:none;font-weight:650;font-size:14px;letter-spacing:-.02em}
.brand-mark{width:18px;height:18px;color:#f7f9fe;display:grid;place-items:center}.brand-mark svg{width:100%;height:100%}
.tabs{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.tab{height:30px;padding:0 12px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;font-size:12px;color:var(--muted);background:transparent;border:1px solid transparent}
.tab.is-active{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.06);color:var(--text)}
.hero{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:6px 20px 2px;
}
.hero-icon{
  width:54px;height:54px;border-radius:50%;display:grid;place-items:center;
  color:#06110c;background:linear-gradient(180deg,#28d48e,#1fc57f); box-shadow:0 0 0 7px rgba(40,212,142,.12),0 10px 24px rgba(0,0,0,.28)
}
.hero-icon svg{width:28px;height:28px}
.hero-icon.is-warn{background:linear-gradient(180deg,#f1c56f,#dfa741);color:#241603;box-shadow:0 0 0 7px rgba(241,197,111,.14),0 10px 24px rgba(0,0,0,.28)}
.hero-icon.is-bad{background:linear-gradient(180deg,#ff7f89,#f75967);color:#260a0f;box-shadow:0 0 0 7px rgba(255,109,122,.16),0 10px 24px rgba(0,0,0,.28)}
.hero h1{margin:20px 0 8px;font-size:clamp(34px,5vw,54px);line-height:1.02;letter-spacing:-.05em;font-weight:630}
.hero-updated{margin:0;color:var(--muted);font-size:13px}
.board{
  min-height:0;
  border-radius:24px;
  background:linear-gradient(180deg,rgba(255,255,255,.04),rgba(255,255,255,.025));
  border:1px solid var(--line);
  overflow:hidden;
  display:grid;
  grid-template-rows:auto 1fr;
}
.board-head{
  display:flex;
  justify-content:space-between;
  align-items:end;
  gap:16px;
  padding:20px 22px 16px;
  border-bottom:1px solid var(--line);
}
.board-kicker{margin:0 0 6px;font-size:11px;color:var(--muted2);letter-spacing:.03em}
.board-head h2{margin:0;font-size:15px;font-weight:600;letter-spacing:-.02em}
.board-meta{margin:0;color:var(--muted2);font-size:12px;text-align:right}
.service-list{
  min-height:0;
  overflow:auto;
  padding:0 0 2px;
  scrollbar-width:thin;
  scrollbar-color:rgba(255,255,255,.16) transparent;
}
.service-list::-webkit-scrollbar{width:8px}
.service-list::-webkit-scrollbar-thumb{background:rgba(255,255,255,.14);border-radius:20px}
.service-row{
  display:grid;
  grid-template-columns:minmax(150px,200px) minmax(0,1fr) 90px;
  align-items:center;
  gap:18px;
  min-height:64px;
  padding:0 22px;
  border-bottom:1px solid var(--line);
}
.service-row:last-child{border-bottom:0}
.service-main{min-width:0;display:flex;align-items:center;gap:10px}
.service-main strong{font-size:14px;font-weight:600;letter-spacing:-.015em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.service-label{font-size:12px;color:var(--muted2)}
.service-main-meta{display:flex;flex-direction:column;gap:3px;min-width:0}
.service-dot{width:9px;height:9px;border-radius:50%;flex:0 0 auto;background:var(--muted2);box-shadow:0 0 0 4px rgba(255,255,255,.03)}
.service-dot.up{background:var(--ok)}
.service-dot.degraded,.service-dot.stale{background:var(--warn)}
.service-dot.down,.service-dot.partial{background:var(--bad)}
.service-dot.waiting{background:#6d7483}
.service-bars{display:grid;grid-template-columns:repeat(48,minmax(0,1fr));gap:2px;min-width:0}
.service-bars span{display:block;height:16px;border-radius:2px;background:#202839}
.service-bars span.up{background:var(--ok)}
.service-bars span.degraded{background:var(--warn)}
.service-bars span.down{background:var(--bad)}
.service-side{text-align:right;display:flex;flex-direction:column;gap:4px;align-items:flex-end}
.service-side strong{font-size:12px;color:#37dc96;font-weight:700}
.service-side span{font-size:12px;color:var(--muted2)}
.service-side strong.degraded{color:var(--warn)}
.service-side strong.down{color:var(--bad)}
.service-row.is-loading .service-bars{height:16px;border-radius:4px;background:rgba(255,255,255,.04)}
.incident-box{
  display:none;
}
.incident-box.is-visible{
  display:grid;
  gap:10px;
  align-content:start;
  min-height:0;
}
.incident-box h2{margin:0;font-size:13px;font-weight:600;color:var(--muted)}
.incident-list{
  border:1px solid var(--line);
  border-radius:16px;
  background:rgba(255,255,255,.02);
  overflow:auto;
}
.incident-item{display:flex;justify-content:space-between;gap:16px;padding:12px 14px;border-bottom:1px solid var(--line);font-size:12px}
.incident-item:last-child{border-bottom:0}
.incident-item strong{display:block;font-size:12px}
.incident-item span{color:var(--muted2)}
.incident-state{white-space:nowrap;color:var(--bad)}
@media (max-width: 900px){
  .viewport{padding:12px}
  .shell{height:min(96vh,860px);padding:20px 18px 18px;grid-template-rows:auto auto minmax(260px,1fr);gap:14px}
  .hero{padding-top:0}
  .hero h1{font-size:clamp(28px,8vw,40px)}
  .service-row{grid-template-columns:1fr;gap:10px;padding:14px 16px;min-height:unset}
  .service-side{align-items:flex-start;text-align:left}
  .service-bars span{height:12px}
}
@media (max-width: 560px){
  body{overflow:hidden}
  .shell{height:100vh;width:100%;border-radius:0;padding:16px 14px 14px;border:0}
  .topbar{gap:10px}
  .tabs{gap:6px}
  .tab{height:28px;padding:0 10px;font-size:11px}
  .hero-icon{width:42px;height:42px}.hero-icon svg{width:22px;height:22px}
  .hero h1{margin-top:16px;font-size:30px}
  .board-head{padding:15px 14px 12px}
  .board-meta{display:none}
  .service-main strong{font-size:13px}
}
@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Tabs swap the third screen row; incidents never create page overflow. */
.tab{appearance:none;font:inherit;cursor:pointer}
.tab:focus-visible{outline:2px solid #77aaff;outline-offset:3px}
.board[hidden],.incident-box[hidden]{display:none!important}
.incident-box.is-visible{
 display:grid;grid-template-rows:auto minmax(0,1fr);gap:14px;min-height:0;
 background:linear-gradient(180deg,rgba(255,255,255,.04),rgba(255,255,255,.025));
 border:1px solid var(--line);border-radius:24px;padding:20px 22px;
}
.incident-list{min-height:0;overflow:auto;align-self:stretch}
.incident-item{min-height:60px;align-items:center}
@media(max-width:560px){.incident-box.is-visible{padding:14px}}
/* Compact location and platform symbols; all icons use the same outline weight. */
.service-row{min-height:94px;grid-template-columns:minmax(185px,240px) minmax(0,1fr) 100px;gap:15px}
.service-main-meta{gap:4px}
.service-location{font-size:11px;color:var(--muted2)}
.platforms{display:flex;align-items:center;gap:7px;min-height:23px;margin-top:2px}
.platform-icon{display:inline-grid;place-items:center;position:relative;width:25px;height:25px;border-radius:7px;border:1px solid rgba(176,195,225,.14);background:rgba(176,195,225,.065);color:#a6b4ca;cursor:help;flex-shrink:0}
.platform-icon svg{width:17px;height:17px;display:block}
.platform-icon:is(:hover,:focus-visible){color:#d1dff6;border-color:rgba(90,175,255,.48);background:rgba(41,151,255,.13);outline:none}
.platform-icon:is(:hover,:focus-visible)::after{content:attr(data-tip);position:absolute;z-index:10;top:calc(100% + 7px);left:0;min-width:max-content;max-width:220px;white-space:nowrap;padding:6px 9px;border:1px solid var(--line-strong);border-radius:8px;background:#232d41;color:var(--text);font-size:11px;font-weight:500;box-shadow:0 8px 25px #0008}
.service-side strong.stale,.service-side strong.unknown{color:var(--muted)}
.service-side strong.partial{color:var(--bad)}
.empty-service{padding:30px;text-align:center;color:var(--muted);font-size:13px}
.api-offline .hero-icon{background:var(--warn);color:#20160b;box-shadow:0 0 0 7px rgba(241,197,111,.12)}
.api-offline .hero-updated{color:var(--warn)}
@media(max-width:900px){
 .service-row{display:grid;grid-template-columns:minmax(0,1fr) 90px;grid-template-areas:'name side' 'bars bars';min-height:105px;gap:11px;padding:13px 16px}
 .service-main{grid-area:name}
 .service-bars{grid-area:bars}
 .service-side{grid-area:side;align-items:flex-end;text-align:right}
 .service-bars span{height:13px}
 .platforms{gap:6px}
}
@media(max-width:560px){
 .shell{height:100dvh}
 .hero{padding:0 12px}
 .hero h1{font-size:clamp(26px,7.5vw,34px)}
 .service-row{min-height:108px;padding:12px 14px;gap:8px}
 .service-location{font-size:11px}
 .platform-icon{width:24px;height:24px}
 .service-side{gap:3px}
 .service-bars{gap:1.5px}
 .service-bars span{height:12px}
}
/* Keep mobile cards content-sized; do not create a huge empty status panel. */
@media(max-width:560px){
 .shell{grid-template-rows:auto auto auto;align-content:start}
 .board{height:auto;max-height:calc(100dvh - 225px)}
 .service-list{max-height:calc(100dvh - 295px)}
 .incident-box.is-visible{max-height:calc(100dvh - 225px)}
}

/* Single floating node tooltip (no new panels, no page scroll). */
.service-row{cursor:help}
.service-row:is(:hover,:focus-visible){background:rgba(84,114,162,.045)}
.service-row:focus-visible{outline:1px solid rgba(41,151,255,.42);outline-offset:-2px}
.node-tooltip{position:fixed;z-index:90;left:0;top:0;width:min(294px,calc(100vw - 20px));padding:15px 16px 13px;border:1px solid rgba(183,203,230,.19);border-radius:15px;background:#1a2335;box-shadow:0 20px 55px #000a;color:var(--text);pointer-events:none}
.node-tooltip[hidden]{display:none!important}
.node-tip-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px}
.node-tip-head strong{font-size:13px;max-width:175px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.node-tip-live{font-size:10px;white-space:nowrap;color:var(--ok)}
.node-tip-live.is-stale{color:var(--warn)}
.node-tip-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px 16px}
.node-tip-grid>div{display:flex;flex-direction:column;gap:5px}
.node-tip-grid span{font-size:11px;color:var(--muted2)}
.node-tip-grid strong{font-size:17px;font-weight:620;letter-spacing:-.03em}
.node-tip-foot{font-size:10px;line-height:1.4;color:var(--muted2);margin:13px 0 0;padding-top:10px;border-top:1px solid var(--line)}
