:root {
  --bg-primary: #0f172a;
  --bg-secondary: #121b2f;
  --card-bg: #1b273d;
  --card-border: #334862;
  --text-primary: #f6f8fc;
  --text-muted: #afbdd2;
  --ok: #29c179;
  --danger: #ff6b57;
  --cta: #ff6a00;
  --cta-hover: #ff7e25;
  --metric-bg: #16233a;
  --metric-value: #ffffff;
  --shadow: 0 24px 64px rgba(1, 9, 22, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100vh;
}

body {
  font-family: "Manrope", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-primary);
  background:
    radial-gradient(
      1200px 700px at 15% -10%,
      rgba(53, 89, 145, 0.45),
      transparent
    ),
    radial-gradient(
      900px 560px at 100% 100%,
      rgba(35, 66, 121, 0.38),
      transparent
    ),
    linear-gradient(140deg, var(--bg-primary), var(--bg-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 4vh, 40px) 20px;
}

.status-card {
  width: min(760px, 100%);
  background: linear-gradient(
    165deg,
    rgba(32, 47, 73, 0.94),
    rgba(26, 39, 63, 0.98)
  );
  border: 1px solid var(--card-border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 24px;
  text-align: center;
}

.topbar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 12px;
  background: linear-gradient(
    180deg,
    rgba(17, 27, 45, 0.9),
    rgba(12, 20, 34, 0.95)
  );
  border: 1px solid rgba(109, 133, 169, 0.28);
}

.brand-logo {
  width: 92px;
  height: 28px;
  object-fit: contain;
  object-position: center;
  border-radius: 6px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

.brand-name {
  color: #d9e4f6;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 66px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(41, 193, 121, 0.18);
  border: 1px solid rgba(41, 193, 121, 0.45);
  color: #95f3c5;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 8px;
  box-shadow: 0 0 8px currentColor;
}

.status-pill.is-error {
  background: rgba(255, 107, 87, 0.16);
  border-color: rgba(255, 107, 87, 0.45);
  color: #ffb7ab;
}

h1 {
  margin: 18px 0 8px;
  font-size: clamp(28px, 4vw, 36px);
  line-height: 1.1;
}

#serviceSubtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
}

.status-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.legacy-info {
  margin-top: 16px;
}

.legacy-info p {
  margin: 10px 0 0;
  font-size: 14px;
  color: #8fa5c3;
}

.legacy-info strong {
  color: #c7d6ea;
  font-weight: 700;
}

.extra-info {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(122, 148, 184, 0.25);
}

.extra-info p {
  margin: 8px 0 0;
  font-size: 14px;
  color: #8fa5c3;
}

.extra-info strong {
  color: #d6e3f3;
  font-weight: 700;
}

.metric-card {
  text-align: left;
  background: linear-gradient(
    180deg,
    rgba(22, 35, 58, 0.98),
    rgba(17, 28, 46, 0.95)
  );
  border-radius: 10px;
  border: 1px solid rgba(86, 116, 160, 0.25);
  padding: 14px;
}

.metric-card h2 {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ab0ce;
  font-weight: 700;
}

.metric-card p {
  margin: 8px 0 0;
  color: var(--metric-value);
  font-size: 19px;
  font-weight: 700;
}

.docs-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin-top: 22px;
  width: 100%;
  min-height: 46px;
  border-radius: 8px;
  background: linear-gradient(90deg, #ff6200, var(--cta));
  color: white;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition:
    transform 180ms ease,
    background 180ms ease;
}

.docs-button:hover {
  background: linear-gradient(90deg, #ff7f2d, var(--cta-hover));
  transform: translateY(-1px);
}

.docs-button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.is-hidden {
  display: none;
}

.fallback-text {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 13px;
}

@media (max-width: 680px) {
  .status-card {
    padding: 20px;
  }

  .topbar {
    flex-direction: column;
    gap: 8px;
  }

  .brand-logo {
    width: 84px;
    height: 26px;
  }

  .brand-name {
    font-size: 13px;
  }

  .status-grid {
    grid-template-columns: 1fr;
  }

  .metric-card p {
    font-size: 18px;
  }
}
