:root {
  --bg: #f7fafc;
  --surface: #ffffff;
  --surface-soft: #fbfdff;
  --text: #0f172a;
  --muted: #5b667a;
  --line: #e7ecf5;
  --line-strong: #d8e1ef;
  --ok: #2f6e52;
  --err: #b42318;
  --max-width: 1140px;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Manrope", "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 480px at 0% -10%, rgba(47, 110, 82, 0.08), transparent 65%),
    radial-gradient(760px 420px at 100% 0%, rgba(47, 110, 82, 0.05), transparent 62%),
    var(--bg);
}

.container {
  width: min(var(--max-width), 100% - 2rem);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 250, 252, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-mark img {
  width: 100%;
  height: 100%;
}

.brand-text {
  font-weight: 750;
  letter-spacing: -0.01em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.62rem 1rem;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.health-main {
  padding: 2rem 0 2.4rem;
}

h1 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 0.4rem 0 1.2rem;
  color: var(--muted);
}

.status-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.status-table th,
.status-table td {
  text-align: left;
  padding: 0.82rem 0.9rem;
  border-bottom: 1px solid var(--line);
}

.status-table th {
  width: 180px;
  color: var(--muted);
  font-weight: 600;
  background: var(--surface-soft);
}

.status-table tr:last-child th,
.status-table tr:last-child td {
  border-bottom: none;
}

.status {
  display: inline-flex;
  padding: 0.24rem 0.6rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}

.status.ok { color: #155239; background: #eaf5ef; }
.status.err { color: #7a1f1a; background: #fdecec; }

.json-link {
  margin-top: 0.9rem;
}

.json-link a {
  color: #1e4f98;
  text-decoration: none;
}

@media (max-width: 640px) {
  .container {
    width: min(var(--max-width), 100% - 1rem);
  }

  .status-table th,
  .status-table td {
    padding: 0.68rem 0.6rem;
  }

  .status-table th {
    width: 120px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0b1117;
    --surface: #111a23;
    --surface-soft: #151f2a;
    --text: #e6edf5;
    --muted: #9fb0c3;
    --line: #243244;
    --line-strong: #2f4157;
    --ok: #67b58d;
    --err: #f4a7a2;
  }

  body {
    background:
      radial-gradient(900px 480px at 0% -10%, rgba(91, 180, 135, 0.14), transparent 65%),
      radial-gradient(760px 420px at 100% 0%, rgba(91, 180, 135, 0.1), transparent 62%),
      var(--bg);
  }

  .site-header { background: rgba(11, 17, 23, 0.84); }
  .btn, .btn-ghost { background: var(--surface); border-color: var(--line-strong); }
  .status-table { border-color: var(--line); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32); }
  .status-table th { background: var(--surface-soft); }
  .json-link a { color: #9ec5ff; }
  .status.ok { color: #d8f9e7; background: #1d3a2d; }
  .status.err { color: #ffe4e1; background: #4a2525; }
}
