:root {
    color-scheme: light;
    --bg: #f4efe4;
    --panel: rgba(255, 255, 255, 0.84);
    --ink: #13251e;
    --muted: #5c6a63;
    --line: rgba(19, 37, 30, 0.12);
    --accent: #087a52;
    --accent-dark: #075d40;
    --gold: #c99524;
    --danger: #a63d40;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    padding: 24px;
    display: grid;
    place-items: center;
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 8% 5%, rgba(201, 149, 36, 0.2), transparent 28%),
        radial-gradient(circle at 92% 48%, rgba(8, 122, 82, 0.16), transparent 34%),
        linear-gradient(150deg, #faf6ed 0%, var(--bg) 100%);
}

.shell {
    width: min(920px, 100%);
    padding: clamp(24px, 5vw, 52px);
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--panel);
    box-shadow: 0 24px 60px rgba(19, 37, 30, 0.1);
    backdrop-filter: blur(10px);
}

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

h1 {
    margin-bottom: 16px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.6rem, 7vw, 5.2rem);
    line-height: 0.94;
    letter-spacing: -0.045em;
}

h2 { margin-bottom: 6px; font-size: 1.08rem; }
p { margin-bottom: 0; color: var(--muted); line-height: 1.65; }
a { color: var(--ink); font-weight: 700; text-decoration: none; }
a:hover { color: var(--accent); }
code { font-family: "SFMono-Regular", Consolas, monospace; font-size: 0.9em; }

.eyebrow {
    margin-bottom: 14px;
    color: var(--accent-dark);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button {
    min-height: 46px;
    padding: 0 19px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 999px;
}
.button.primary { color: white; background: var(--accent); }
.button.primary:hover { color: white; background: var(--accent-dark); }
.button.secondary { border-color: rgba(201, 149, 36, 0.35); background: rgba(201, 149, 36, 0.12); }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 30px; }
.card { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 255, 255, 0.72); }
.status { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.status-line { display: flex; align-items: center; gap: 10px; }
.status-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 5px color-mix(in srgb, currentColor 12%, transparent); }

.health-shell { width: min(860px, 100%); }
.health-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; }
.health-heading h1 { font-size: clamp(2.7rem, 7vw, 4.8rem); }
.health-badge, .service-state { display: inline-flex; align-items: center; gap: 10px; border-radius: 999px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }
.health-badge { padding: 12px 16px; font-size: 0.75rem; }
.health-badge--ok { color: var(--accent-dark); background: rgba(8, 122, 82, 0.1); }
.health-badge--degraded { color: var(--danger); background: rgba(166, 61, 64, 0.1); }
.health-grid { display: grid; gap: 14px; margin-top: 36px; }
.health-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255, 255, 255, 0.74); }
.health-card h2 { font-size: 1.18rem; }
.health-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; color: white; background: var(--ink); font-size: 0.78rem; font-weight: 900; letter-spacing: 0.04em; }
.health-label { margin-bottom: 2px; color: var(--gold); font-size: 0.72rem; font-weight: 850; letter-spacing: 0.12em; text-transform: uppercase; }
.service-state { padding: 8px 11px; font-size: 0.68rem; }
.service-state--ok { color: var(--accent-dark); background: rgba(8, 122, 82, 0.1); }
.service-state--error { color: var(--danger); background: rgba(166, 61, 64, 0.1); }
.health-footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 0.9rem; }

@media (max-width: 620px) {
    body { padding: 12px; }
    .shell { border-radius: 20px; }
    .health-heading { display: grid; }
    .health-badge { justify-self: start; }
    .health-card { grid-template-columns: auto 1fr; }
    .service-state { grid-column: 2; justify-self: start; }
    .health-footer { flex-direction: column; }
}
