:root {
  --bg: #06091a;
  --panel: #0c1430;
  --panel-2: #111c3d;
  --line: rgba(210, 172, 70, .18);
  --line-strong: rgba(226, 192, 80, .4);
  --text: #f0ead8;
  --muted: #b7aa88;
  --dim: #82765e;
  --gold: #e2c050;
  --green: #52c27a;
  --amber: #e0a331;
  --red: #e9685d;
  --shadow: 0 24px 70px rgba(0, 0, 0, .3);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); color-scheme: dark; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: radial-gradient(ellipse 90% 45% at 50% -10%, rgba(201, 168, 48, .13), transparent 65%), var(--bg);
  font-family: Arial, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

.shell { width: min(calc(100% - 32px), 1080px); margin: 0 auto; padding: 28px 0 52px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid var(--line-strong); border-radius: 14px; background: linear-gradient(145deg, #172554, #0e1736); color: var(--gold); font-size: 1.35rem; font-weight: 900; box-shadow: 0 0 22px rgba(201, 168, 48, .12); }
.brand-copy { min-width: 0; }
.brand-copy strong { display: block; color: var(--gold); font-size: 1rem; font-weight: 850; }
.brand-copy span { display: block; overflow: hidden; color: var(--muted); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.back-link { color: var(--muted); font-size: .82rem; text-decoration: none; white-space: nowrap; }
.back-link:hover, .footer a:hover { color: var(--gold); }

.hero { padding: 38px 0 24px; }
.eyebrow { margin: 0 0 7px; color: var(--gold); font-size: .76rem; font-weight: 800; letter-spacing: .04em; }
.hero h1 { margin: 0; color: var(--text); font-size: clamp(1.8rem, 4vw, 3rem); letter-spacing: -.03em; line-height: 1.15; }
.hero p { max-width: 680px; margin: 12px 0 0; color: var(--muted); font-size: 1rem; line-height: 1.8; }

.overall { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; padding: 22px 24px; border: 1px solid var(--line-strong); border-radius: 20px; background: linear-gradient(145deg, rgba(23, 35, 74, .96), rgba(12, 20, 48, .94)); box-shadow: var(--shadow); }
.overall-main { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }
.status-dot { width: 13px; height: 13px; flex: 0 0 13px; margin-top: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 6px rgba(82, 194, 122, .12), 0 0 18px rgba(82, 194, 122, .45); }
.status-dot.degraded, .status-dot.unknown { background: var(--amber); box-shadow: 0 0 0 6px rgba(224, 163, 49, .12), 0 0 18px rgba(224, 163, 49, .35); }
.status-dot.outage { background: var(--red); box-shadow: 0 0 0 6px rgba(233, 104, 93, .12), 0 0 18px rgba(233, 104, 93, .35); }
.overall h2 { margin: 0; color: var(--text); font-size: clamp(1.15rem, 2.6vw, 1.65rem); line-height: 1.3; }
.overall p { max-width: 680px; margin: 7px 0 0; color: var(--muted); font-size: .9rem; line-height: 1.7; }
.overall-meta { flex: 0 0 auto; color: var(--dim); font-size: .73rem; text-align: left; }
.overall-meta strong { display: block; margin-bottom: 3px; color: var(--gold); font-size: .78rem; }
.overall-meta time, .service-foot time { direction: ltr; display: inline-block; }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin: 34px 0 12px; }
.section-head h2 { margin: 0; color: var(--text); font-size: 1.15rem; }
.section-head p { margin: 3px 0 0; color: var(--dim); font-size: .76rem; }
.refresh-button { border: 1px solid var(--line-strong); border-radius: 10px; padding: 8px 13px; background: rgba(201, 168, 48, .1); color: var(--gold); font: inherit; font-size: .78rem; font-weight: 800; cursor: pointer; transition: background .15s, transform .15s; }
.refresh-button:hover, .refresh-button:focus-visible { outline: none; background: rgba(201, 168, 48, .18); transform: translateY(-1px); }
.refresh-button:focus-visible, .back-link:focus-visible, a:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.refresh-button:disabled { cursor: wait; opacity: .65; transform: none; }

.service-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.service-card { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(155deg, rgba(17, 28, 61, .95), rgba(12, 20, 48, .9)); transition: border-color .18s, transform .18s; }
.service-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.service-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.service-name { display: flex; align-items: center; gap: 9px; min-width: 0; }
.service-name h3 { margin: 0; color: var(--text); font-size: .98rem; }
.mini-dot { width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; background: var(--green); }
.mini-dot.degraded, .mini-dot.unknown { background: var(--amber); }
.mini-dot.outage { background: var(--red); }
.service-badge { flex: 0 0 auto; border: 1px solid rgba(82, 194, 122, .28); border-radius: 999px; padding: 4px 9px; background: rgba(82, 194, 122, .08); color: var(--green); font-size: .68rem; font-weight: 800; white-space: nowrap; }
.service-badge.degraded, .service-badge.unknown { border-color: rgba(224, 163, 49, .3); background: rgba(224, 163, 49, .08); color: var(--amber); }
.service-badge.outage { border-color: rgba(233, 104, 93, .3); background: rgba(233, 104, 93, .08); color: var(--red); }
.service-summary { margin: 13px 0 4px; color: var(--text); font-size: .86rem; font-weight: 750; }
.service-detail { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.7; }
.service-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 10px; border-top: 1px solid rgba(210, 172, 70, .11); color: var(--dim); font-size: .68rem; }
.service-latency { direction: ltr; white-space: nowrap; }

.issues { margin-top: 18px; padding: 18px 20px; border: 1px solid rgba(224, 163, 49, .3); border-radius: 16px; background: linear-gradient(145deg, rgba(224, 163, 49, .09), rgba(12, 20, 48, .72)); }
.issues[hidden] { display: none; }
.issues h2 { margin: 0 0 8px; color: var(--gold); font-size: 1rem; }
.issues-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.issues-list li { display: grid; grid-template-columns: auto 1fr; gap: 8px; color: var(--muted); font-size: .8rem; line-height: 1.65; }
.issues-list li::before { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(224, 163, 49, .16); color: var(--amber); content: '!'; font-weight: 900; }
.issues-list strong { color: var(--text); }

.how-it-works { display: flex; align-items: flex-start; gap: 13px; margin-top: 18px; padding: 17px 19px; border: 1px solid var(--line); border-radius: 16px; background: rgba(12, 20, 48, .65); }
.how-icon { display: grid; place-items: center; width: 29px; height: 29px; flex: 0 0 29px; border-radius: 50%; background: rgba(82, 194, 122, .13); color: var(--green); font-weight: 900; }
.how-it-works h2 { margin: 0; color: var(--text); font-size: .92rem; }
.how-it-works p { margin: 3px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.7; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 23px; color: var(--dim); font-size: .72rem; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.legend-dot.amber { background: var(--amber); }
.legend-dot.red { background: var(--red); }
.footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 44px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--dim); font-size: .72rem; }
.footer a { color: var(--muted); text-decoration: none; }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px; }
.skeleton { min-height: 116px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(90deg, rgba(17, 28, 61, .7), rgba(30, 45, 89, .7), rgba(17, 28, 61, .7)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.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; }

@media (max-width: 680px) {
  .shell { width: min(calc(100% - 22px), 1080px); padding-top: 17px; }
  .topbar { align-items: flex-start; padding-bottom: 16px; }
  .brand-copy span { white-space: normal; line-height: 1.3; }
  .back-link { font-size: 0; }
  .back-link::after { content: '↗'; font-size: 1.1rem; }
  .hero { padding-top: 26px; }
  .overall { flex-direction: column; gap: 14px; padding: 18px 16px; }
  .overall-meta { width: 100%; padding-top: 10px; border-top: 1px solid var(--line); text-align: right; }
  .service-grid { grid-template-columns: 1fr; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .refresh-button { align-self: stretch; }
  .footer { align-items: flex-start; flex-direction: column; }
  .footer-links { gap: 8px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .001ms !important; }
}
