:root {
  color-scheme: dark;
  --background: #06080d;
  --foreground: #f6f8fb;
  --border: rgba(255, 255, 255, 0.09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--background);
  color: var(--foreground);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
}
button, a { font: inherit; }
a { color: inherit; }

main {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: 0 max(24px, calc((100vw - 1200px) / 2));
  background:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 52px 52px;
}

.ambient { position: absolute; pointer-events: none; border-radius: 50%; }
.ambient-one { width: 560px; height: 560px; top: -300px; left: -180px; background: radial-gradient(circle, rgba(28,222,194,.13), transparent 68%); }
.ambient-two { width: 700px; height: 700px; top: 90px; right: -410px; background: radial-gradient(circle, rgba(111,76,255,.12), transparent 67%); }

.site-header {
  position: relative;
  z-index: 2;
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 760; letter-spacing: .13em; }
.brand strong { color: #7ce9d9; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(94,234,212,.28); border-radius: 12px; background: rgba(94,234,212,.08); color: #64e5d2; font-size: 1.5rem; }
.header-meta { display: flex; align-items: center; gap: 15px; color: #9aa5b6; font-size: .84rem; }
.live-indicator { color: #7df2c7; font-size: .72rem; font-weight: 780; letter-spacing: .16em; }
.live-indicator i { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #44e7a9; box-shadow: 0 0 0 5px rgba(68,231,169,.08), 0 0 14px rgba(68,231,169,.7); animation: breathe 2.4s ease-in-out infinite; }
.header-divider { width: 1px; height: 18px; background: var(--border); }

.status-hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 66px 0 42px;
}
.hero-orb { position: relative; width: 70px; height: 70px; display: grid; place-items: center; border-radius: 22px; color: #8b98ab; background: rgba(139,152,171,.08); border: 1px solid rgba(139,152,171,.2); font-size: 1.25rem; font-weight: 800; }
.hero-orb.operational { color: #74f0c5; background: linear-gradient(145deg, rgba(59,222,169,.17), rgba(25,122,104,.08)); border-color: rgba(94,234,179,.23); }
.hero-orb.degraded { color: #ffc45e; background: rgba(255,175,48,.1); border-color: rgba(255,175,48,.25); }
.hero-orb.outage { color: #ff6f79; background: rgba(255,73,86,.1); border-color: rgba(255,73,86,.25); }
.orb-pulse { position: absolute; inset: -9px; border: 1px solid currentColor; opacity: .12; border-radius: 29px; animation: orbit-pulse 2.6s ease-out infinite; }
.eyebrow { margin: 0 0 8px; color: #738095; font-size: .72rem; font-weight: 760; letter-spacing: .17em; text-transform: uppercase; }
.hero-copy h1 { margin: 0; font-size: clamp(1.75rem, 3.4vw, 3rem); line-height: 1.08; letter-spacing: -.045em; }
.hero-copy > p:last-child { margin: 10px 0 0; color: #9aa5b6; }
.refresh-button { display: flex; align-items: center; gap: 9px; padding: 12px 16px; color: #dfe5ee; background: rgba(255,255,255,.035); border: 1px solid var(--border); border-radius: 12px; cursor: pointer; transition: .2s ease; }
.refresh-button:hover { transform: translateY(-1px); border-color: rgba(94,234,212,.32); background: rgba(94,234,212,.06); }
.refresh-button:disabled { opacity: .62; cursor: wait; }
.refresh-button.loading .refresh-icon { display: inline-block; animation: spin .8s linear infinite; }

.summary-strip { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 22px; border: 1px solid var(--border); border-radius: 15px; background: rgba(9,13,20,.78); backdrop-filter: blur(18px); }
.summary-strip > div { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; min-height: 60px; padding: 0 18px; color: #778397; font-size: .82rem; }
.summary-strip > div + div { border-left: 1px solid var(--border); }
.summary-icon { color: #59667a; font-size: 1.1rem; }
.summary-strip strong { color: #c7cfda; font-size: .82rem; font-weight: 650; }

.domain-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.domain-card { --accent: #5eead4; position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 19px; background: linear-gradient(160deg, rgba(16,22,33,.96), rgba(8,12,19,.96)); box-shadow: 0 26px 70px rgba(0,0,0,.16); }
.domain-card.accent-violet { --accent: #a78bfa; }
.domain-card.accent-amber { --accent: #f9c66f; }
.card-topline { height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .55; }
.domain-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 23px 22px 19px; }
.domain-heading a { display: flex; align-items: center; gap: 5px; text-decoration: none; font-size: 1.19rem; font-weight: 720; letter-spacing: -.025em; }
.domain-heading a:hover { color: var(--accent); }
.status-chip { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; padding: 7px 9px; border-radius: 9px; font-size: .69rem; font-weight: 720; background: rgba(139,152,171,.08); color: #9da8b8; border: 1px solid rgba(139,152,171,.16); }
.status-chip.operational { background: rgba(62,221,168,.08); color: #77ecc3; border-color: rgba(62,221,168,.15); }
.status-chip.degraded { color: #ffc86c; background: rgba(255,174,43,.08); border-color: rgba(255,174,43,.17); }
.status-chip.outage { color: #ff7b85; background: rgba(255,70,83,.08); border-color: rgba(255,70,83,.17); }

.latency-block { position: relative; margin: 0 22px 20px; padding: 17px; overflow: hidden; border: 1px solid rgba(255,255,255,.055); border-radius: 13px; background: rgba(0,0,0,.16); }
.latency-block > span { color: #778397; font-size: .74rem; }
.latency-block > strong { display: block; margin-top: 1px; font-size: 1.85rem; line-height: 1.1; letter-spacing: -.04em; }
.latency-block small { color: #6f7b8d; font-size: .8rem; font-weight: 550; letter-spacing: 0; }
.signal-bars { position: absolute; right: 14px; bottom: 14px; width: 112px; height: 35px; display: flex; align-items: end; gap: 4px; }
.signal-bars i { width: 5px; min-height: 7px; border-radius: 3px; background: var(--accent); opacity: .34; animation: wave 2.8s ease-in-out infinite; }
.signal-bars i:nth-child(3n) { animation-delay: -.9s; }
.signal-bars i:nth-child(2n) { animation-delay: -.35s; }

.checks { border-top: 1px solid var(--border); }
.check-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; min-height: 62px; padding: 0 22px; }
.check-row + .check-row { border-top: 1px solid rgba(255,255,255,.055); }
.check-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; background: rgba(255,255,255,.035); color: #8793a5; }
.check-icon.is-failed { color: #ff7781; background: rgba(255,79,92,.08); }
.check-copy { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.check-copy span { color: #737f91; font-size: .69rem; }
.check-copy strong { overflow: hidden; color: #c6ced9; font-size: .8rem; font-weight: 590; text-overflow: ellipsis; white-space: nowrap; }
.mini-status { color: #5bd9ad; font-size: .67rem; font-weight: 740; letter-spacing: .06em; }
.mini-status.is-failed { color: #ff747f; }

.detail-panel { border-top: 1px solid var(--border); background: rgba(0,0,0,.11); }
.detail-panel summary { display: flex; align-items: center; justify-content: space-between; min-height: 54px; padding: 0 22px; color: #adb7c6; font-size: .78rem; font-weight: 650; cursor: pointer; list-style: none; }
.detail-panel summary::-webkit-details-marker { display: none; }
.summary-action { display: flex; align-items: center; gap: 7px; color: #6f7b8d; font-size: .7rem; font-weight: 560; }
.summary-action b { display: inline-block; font-size: 1rem; transition: transform .2s ease; }
.detail-panel[open] .summary-action b { transform: rotate(180deg); }
.detail-panel[open] summary { border-bottom: 1px solid rgba(255,255,255,.055); }
.detail-groups { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1px; background: rgba(255,255,255,.055); }
.detail-group { min-width: 0; padding: 17px 19px; background: #090e16; }
.detail-group h3 { margin: 0 0 11px; color: var(--accent); font-size: .67rem; font-weight: 760; letter-spacing: .12em; text-transform: uppercase; }
.detail-row { display: grid; grid-template-columns: minmax(82px,.85fr) minmax(0,1.4fr); gap: 10px; align-items: start; padding: 7px 0; border-top: 1px solid rgba(255,255,255,.04); }
.detail-row:first-of-type { border-top: 0; }
.detail-row > span { color: #687487; font-size: .68rem; }
.detail-row > strong { overflow-wrap: anywhere; color: #bac4d1; font-size: .7rem; font-weight: 590; line-height: 1.55; text-align: right; }
.detail-badge { display: inline-block; padding: 3px 7px; border-radius: 6px; font-size: .62rem; font-weight: 720; }
.detail-badge.good { color: #72e7bd; background: rgba(62,221,168,.08); border: 1px solid rgba(62,221,168,.13); }
.detail-badge.warn { color: #ffc36a; background: rgba(255,174,43,.08); border: 1px solid rgba(255,174,43,.13); }

.monitoring-note { position: relative; z-index: 1; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 15px; margin: 22px 0 36px; padding: 18px 20px; border: 1px solid var(--border); border-radius: 15px; background: rgba(11,16,25,.72); }
.note-icon { width: 42px; height: 42px; display: grid; place-items: center; color: #7be3d4; border-radius: 12px; background: rgba(94,234,212,.07); }
.monitoring-note strong { font-size: .88rem; }
.monitoring-note p { margin: 4px 0 0; color: #7f8a9c; font-size: .78rem; line-height: 1.5; }
.api-source { color: #8994a6; font-size: .74rem; white-space: nowrap; }
.api-source i { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #46dda7; box-shadow: 0 0 10px rgba(70,221,167,.55); }

footer { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 20px; padding: 26px 0 34px; border-top: 1px solid var(--border); color: #566174; font-size: .72rem; }
footer p { margin: 0; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 50% { opacity: .45; transform: scale(.86); } }
@keyframes orbit-pulse { 0% { transform: scale(.88); opacity: .24; } 70%,100% { transform: scale(1.16); opacity: 0; } }
@keyframes wave { 50% { opacity: .72; transform: scaleY(.72); } }

@media (max-width: 980px) {
  .domain-grid { grid-template-columns: 1fr; }
  .domain-card { display: grid; grid-template-columns: 1fr 1fr; }
  .card-topline, .domain-heading { grid-column: 1 / -1; }
  .checks { border-top: 0; border-left: 1px solid var(--border); }
  .latency-block { align-self: start; margin-bottom: 22px; }
}

@media (max-width: 680px) {
  main { padding: 0 18px; }
  .site-header { min-height: 72px; }
  .header-meta > span:last-child, .header-divider { display: none; }
  .status-hero { grid-template-columns: auto 1fr; gap: 16px; padding: 42px 0 30px; }
  .hero-orb { width: 54px; height: 54px; border-radius: 17px; }
  .hero-copy h1 { font-size: 1.62rem; }
  .refresh-button { grid-column: 1 / -1; justify-content: center; width: 100%; }
  .summary-strip { grid-template-columns: 1fr; }
  .summary-strip > div + div { border-left: 0; border-top: 1px solid var(--border); }
  .domain-card { display: block; }
  .checks { border-top: 1px solid var(--border); border-left: 0; }
  .detail-groups { grid-template-columns: 1fr; }
  .monitoring-note { grid-template-columns: auto 1fr; }
  .api-source { grid-column: 1 / -1; }
  footer { flex-direction: column; }
}

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