:root {
    color-scheme: light;
    --canvas: #f2f5f4;
    --surface: #ffffff;
    --ink: #1e2e32;
    --muted: #4c6266;
    --accent: #086b63;
    --border: #9badaa;
    --success: #12643d;
    --danger: #9e2929;
    --focus: #713e91;
}

html,
body {
    min-height: 100%;
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    line-height: 1.5;
}

:where(a, button):focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

a {
    color: var(--accent);
    text-underline-offset: 0.2em;
}

.app-shell {
    display: flex;
    min-height: 100vh;
    min-height: 100svh;
    flex-direction: column;
}

.skip-link {
    position: absolute;
    z-index: 10;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.6rem 0.9rem;
    transform: translateY(-160%);
    background: var(--ink);
    color: #ffffff;
}

.skip-link:focus {
    transform: translateY(0);
}

.masthead {
    display: flex;
    min-height: 4.75rem;
    align-items: center;
    gap: 2rem;
    padding: 0 5vw;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--ink);
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 2.25rem;
    aspect-ratio: 1;
    place-items: center;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-family: ui-monospace, "Cascadia Code", monospace;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.brand-name {
    font-weight: 650;
    letter-spacing: -0.02em;
}

.primary-navigation {
    display: flex;
    align-self: stretch;
    align-items: center;
}

.primary-navigation a {
    display: inline-flex;
    min-height: 100%;
    align-items: center;
    padding: 0 0.9rem;
    border-bottom: 3px solid transparent;
    color: var(--muted);
    text-decoration: none;
}

.primary-navigation a.active {
    border-bottom-color: var(--accent);
    color: var(--ink);
}

.environment-label {
    margin: 0 0 0 auto;
    color: var(--muted);
    font-family: ui-monospace, "Cascadia Code", monospace;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.page-content {
    width: min(58rem, 90vw);
    flex: 1;
    align-self: center;
    padding: clamp(3rem, 8vw, 6rem) 0;
}

.overview-heading {
    max-width: 42rem;
    margin-bottom: 3rem;
}

.eyebrow {
    margin: 0 0 0.65rem;
    color: var(--accent);
    font-family: ui-monospace, "Cascadia Code", monospace;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.overview-heading h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    font-weight: 500;
    letter-spacing: -0.045em;
    line-height: 1.05;
}

.overview-intro {
    max-width: 42rem;
    margin: 1rem 0 0;
    color: var(--muted);
    font-size: 1.125rem;
}

.status-card {
    position: relative;
    display: flex;
    min-height: 9rem;
    align-items: center;
    gap: 1.5rem;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface);
}

.status-rail {
    align-self: stretch;
    width: 0.35rem;
    background: var(--accent);
}

.status-card-content {
    flex: 1;
    padding: 1.5rem 0;
}

.status-card h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 620;
}

.health-result {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0.65rem 0 0;
    color: var(--muted);
}

.health-indicator {
    width: 0.65rem;
    height: 0.65rem;
    flex: 0 0 auto;
    border: 2px solid currentColor;
    border-radius: 50%;
}

.health-indicator--healthy {
    background: var(--success);
    color: var(--success);
}

.health-indicator--unavailable {
    background: var(--danger);
    color: var(--danger);
}

.status-protocol {
    margin: 0 1.5rem 0 0;
    padding: 0.35rem 0.55rem;
    border: 1px solid var(--border);
    color: var(--muted);
    font-family: ui-monospace, "Cascadia Code", monospace;
    font-size: 0.75rem;
}

.foundation-details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    margin: 2rem 0 0;
}

.foundation-details div {
    padding-top: 0.85rem;
    border-top: 1px solid var(--border);
}

.foundation-details dt {
    color: var(--muted);
    font-size: 0.875rem;
}

.foundation-details dd {
    margin: 0.3rem 0 0;
    font-weight: 600;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 5vw;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.8rem;
}

#blazor-error-ui {
    display: none;
    position: fixed;
    z-index: 20;
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid var(--danger);
    background: var(--surface);
    color: var(--ink);
}

#blazor-error-ui .dismiss {
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 1.25rem;
}

@media (max-width: 42rem) {
    .masthead {
        min-height: 4.25rem;
        gap: 1rem;
        padding-inline: 5vw;
    }

    .environment-label {
        display: none;
    }

    .foundation-details {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .site-footer {
        flex-direction: column;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --canvas: #172326;
        --surface: #202f32;
        --ink: #edf4f1;
        --muted: #bdcbc7;
        --accent: #8bd6ca;
        --border: #829594;
        --success: #8bdda9;
        --danger: #ffaaaa;
        --focus: #e2a9ff;
    }
}

@media (prefers-contrast: more) {
    :root {
        --border: #53676a;
        --muted: #34484c;
    }
}

@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
    :root {
        --border: #b8cbc8;
        --muted: #e2eeeb;
    }
}