:root {
    color-scheme: light;
    --status-bg: #f6f8fb;
    --status-surface: #ffffff;
    --status-text: #162033;
    --status-muted: #5d6b82;
    --status-border: #dbe3ef;
    --status-blue: #235d9f;
    --status-green: #167a5b;
    --status-amber: #a46313;
    --status-red: #b42318;
    --status-shadow: 0 16px 38px rgba(22, 32, 51, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--status-text);
    background: var(--status-bg);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

.status-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 48px;
}

.status-header,
.status-panel,
.metric-panel {
    background: var(--status-surface);
    border: 1px solid var(--status-border);
    border-radius: 8px;
    box-shadow: var(--status-shadow);
}

.status-header {
    display: grid;
    grid-template-columns: minmax(180px, auto) 1fr auto;
    gap: 28px;
    align-items: center;
    padding: 28px;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--status-text);
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
}

.brand-link img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.status-heading {
    min-width: 0;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--status-blue);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

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

h1 {
    margin-bottom: 8px;
    font-size: 34px;
    line-height: 1.15;
}

h2 {
    margin-bottom: 8px;
    font-size: 20px;
    line-height: 1.25;
}

.lede,
.health-state p,
.metric-note {
    color: var(--status-muted);
}

.lede {
    max-width: 680px;
    margin-bottom: 0;
    font-size: 16px;
}

.status-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.primary-action,
.secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 14px;
    border-radius: 6px;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
}

.primary-action {
    color: #ffffff;
    background: var(--status-blue);
    border: 1px solid var(--status-blue);
    cursor: pointer;
}

.primary-action:disabled {
    cursor: wait;
    opacity: 0.7;
}

.secondary-action {
    color: var(--status-blue);
    background: #eef5ff;
    border: 1px solid #b7d1f3;
}

.primary-action:focus,
.secondary-action:focus,
.brand-link:focus {
    outline: 3px solid rgba(35, 93, 159, 0.28);
    outline-offset: 3px;
}

.language-switcher {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    min-height: 40px;
    padding: 4px;
    background: #f8fafd;
    border: 1px solid var(--status-border);
    border-radius: 8px;
}

.language-switcher button {
    min-width: 42px;
    min-height: 30px;
    padding: 4px 8px;
    color: var(--status-muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
}

.language-switcher button:hover,
.language-switcher button:focus,
.language-switcher button.is-active {
    color: var(--status-blue);
    background: #eef5ff;
    border-color: #b7d1f3;
}

.status-panel {
    margin-top: 20px;
    padding: 24px;
}

.status-panel--primary {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(320px, 0.95fr);
    gap: 24px;
    align-items: center;
}

.health-state {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.health-state__dot {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 4px;
    background: var(--status-amber);
    border-radius: 50%;
    box-shadow: 0 0 0 7px rgba(164, 99, 19, 0.14);
}

.health-state[data-state="operational"] .health-state__dot {
    background: var(--status-green);
    box-shadow: 0 0 0 7px rgba(22, 122, 91, 0.14);
}

.health-state[data-state="degraded"] .health-state__dot {
    background: var(--status-amber);
    box-shadow: 0 0 0 7px rgba(164, 99, 19, 0.14);
}

.health-state[data-state="offline"] .health-state__dot {
    background: var(--status-red);
    box-shadow: 0 0 0 7px rgba(180, 35, 24, 0.14);
}

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

.status-facts div {
    min-width: 0;
    padding: 14px;
    background: #f8fafd;
    border: 1px solid #e4ebf5;
    border-radius: 8px;
}

.status-facts dt,
.metric-label {
    color: var(--status-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.status-facts dd {
    margin: 4px 0 0;
    font-size: 16px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

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

.metric-panel {
    min-width: 0;
    padding: 20px;
}

.metric-panel strong {
    display: block;
    margin: 8px 0 4px;
    font-size: 36px;
    line-height: 1;
}

.metric-note {
    display: block;
    font-size: 13px;
}

.check-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.check-list li {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    padding: 14px 0;
    border-bottom: 1px solid #e7edf6;
}

.check-list span,
.check-list strong {
    min-width: 0;
    overflow-wrap: anywhere;
}

.check-list strong {
    color: var(--status-text);
    text-align: right;
}

@media (max-width: 900px) {
    .status-header,
    .status-panel--primary,
    .status-grid,
    .check-list {
        grid-template-columns: 1fr;
    }

    .status-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .status-shell {
        width: min(100% - 20px, 1120px);
        padding: 16px 0 32px;
    }

    .status-header,
    .status-panel,
    .metric-panel {
        padding: 18px;
    }

    h1 {
        font-size: 28px;
    }

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

    .primary-action,
    .secondary-action,
    .language-switcher {
        width: 100%;
    }

    .language-switcher button {
        flex: 1 1 0;
    }
}
