:root {
  --bg: #07111f;
  --bg-soft: #0e1b30;
  --card: rgba(17, 31, 54, 0.78);
  --card-strong: rgba(25, 45, 77, 0.92);
  --text: #f4f8ff;
  --muted: #aab8ce;
  --line: rgba(255, 255, 255, 0.12);
  --blue: #59a9ff;
  --cyan: #59f1ff;
  --green: #55e39b;
  --yellow: #ffd166;
  --red: #ff6b7d;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 18% 8%, rgba(89, 169, 255, 0.22), transparent 32rem),
    radial-gradient(circle at 80% 0%, rgba(89, 241, 255, 0.16), transparent 28rem),
    linear-gradient(135deg, #06101d 0%, var(--bg) 50%, #11172d 100%);
  color: var(--text);
}

body.modal-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }

button, textarea { font: inherit; }

.site-shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 24px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #03101d;
  box-shadow: 0 12px 30px rgba(89, 169, 255, 0.35);
}

.nav-links {
  display: flex;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-links a:hover { color: var(--text); }

.hero { padding-bottom: 56px; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 32px;
  align-items: stretch;
  padding: 48px 0 28px;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--cyan);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  max-width: 780px;
  margin-bottom: 1rem;
  font-size: clamp(2.7rem, 7vw, 5.9rem);
  line-height: 0.92;
  letter-spacing: -0.075em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1;
  letter-spacing: -0.055em;
  margin-bottom: 0.85rem;
}

.lede {
  max-width: 670px;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 48px;
  padding: 0.82rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-weight: 750;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
  border-color: rgba(89, 241, 255, 0.55);
  background: rgba(255, 255, 255, 0.1);
}

.button.primary {
  color: #03101d;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  border-color: transparent;
}

.button.ghost { color: var(--cyan); }

.hero-card,
.status-card,
.callout,
.link-card,
.modal-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--card);
  backdrop-filter: blur(18px);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero-card {
  min-height: 360px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.card-kicker {
  color: var(--muted);
  font-weight: 750;
  margin-bottom: 0.75rem;
}

#overall-status { font-size: 2.35rem; }
#overall-message { color: var(--muted); line-height: 1.5; }
.timestamp { color: var(--muted); font-size: 0.92rem; margin-bottom: 0; }

.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(2px);
  opacity: 0.82;
}

.orb-one {
  width: 180px;
  height: 180px;
  top: 22px;
  right: 34px;
  background: radial-gradient(circle, rgba(89, 241, 255, 0.78), rgba(89, 169, 255, 0.08) 64%, transparent 70%);
}

.orb-two {
  width: 120px;
  height: 120px;
  top: 120px;
  right: 150px;
  background: radial-gradient(circle, rgba(85, 227, 155, 0.62), transparent 68%);
}

.section {
  padding: 56px 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  max-width: 780px;
  margin-bottom: 24px;
}

.section-heading p,
.split-section p,
.callout li,
.modal-panel p { color: var(--muted); line-height: 1.65; }

.status-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.status-card {
  min-height: 205px;
  padding: 22px;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.status-card[href]:hover {
  transform: translateY(-3px);
  border-color: rgba(89, 241, 255, 0.5);
  background: var(--card-strong);
}

.indicator-card { cursor: default; }

.status-card h3 {
  margin: 1.15rem 0 0.45rem;
  font-size: 1.12rem;
  line-height: 1.15;
}

.status-card p { color: var(--muted); line-height: 1.45; margin-bottom: 0; }

.status-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.status-icon,
.link-icon {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 1.35rem;
}

.status-dot {
  display: inline-flex;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--muted);
  box-shadow: 0 0 0 6px rgba(170, 184, 206, 0.12);
}

.status-card.healthy .status-dot { background: var(--green); box-shadow: 0 0 0 6px rgba(85, 227, 155, 0.14); }
.status-card.degraded .status-dot { background: var(--yellow); box-shadow: 0 0 0 6px rgba(255, 209, 102, 0.14); }
.status-card.down .status-dot { background: var(--red); box-shadow: 0 0 0 6px rgba(255, 107, 125, 0.14); }
.status-card.protected .status-dot { background: var(--blue); box-shadow: 0 0 0 6px rgba(89, 169, 255, 0.14); }

.badge {
  display: inline-flex;
  margin-top: 1rem;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(300px, 0.65fr);
  gap: 24px;
  align-items: center;
}

.callout { padding: 24px; }
.callout ul { margin: 1rem 0 0; padding-left: 1.2rem; }
.callout li + li { margin-top: 0.5rem; }

.link-card {
  min-height: 180px;
  padding: 22px;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.link-card:hover {
  transform: translateY(-3px);
  border-color: rgba(89, 241, 255, 0.5);
  background: var(--card-strong);
}

.link-button {
  width: 100%;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.link-card strong { display: block; margin: 1rem 0 0.35rem; font-size: 1.08rem; }
.link-card small { color: var(--muted); line-height: 1.4; }

.footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 32px 0 48px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.footer p { margin-bottom: 0; }
.footer a { color: var(--cyan); font-weight: 750; }

.modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 20px;
  z-index: 20;
}

.modal[aria-hidden="false"] { display: grid; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 7, 15, 0.72);
}

.modal-panel {
  width: min(620px, 100%);
  padding: 26px;
  z-index: 1;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  font-size: 1.4rem;
}

.field-label {
  display: block;
  margin: 1rem 0 0.5rem;
  color: var(--text);
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  padding: 14px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus { border-color: rgba(89, 241, 255, 0.55); }

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
}

.form-note {
  margin: 1rem 0 0;
  font-size: 0.92rem;
}

@media (max-width: 1060px) {
  .status-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .hero-grid,
  .split-section { grid-template-columns: 1fr; }
  .links-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-links { display: none; }
}

@media (max-width: 620px) {
  .status-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .site-shell { width: min(100% - 22px, 1160px); }
  .hero { padding-bottom: 32px; }
  .hero-grid { padding-top: 24px; }
  .hero-actions { display: grid; }
  .button { width: 100%; }
  .links-grid { grid-template-columns: 1fr; }
  .hero-card,
  .status-card,
  .callout,
  .link-card,
  .modal-panel { border-radius: 22px; }
  .footer { flex-direction: column; }
  .modal-actions { display: grid; }
}
