/* Shared design tokens and chrome (nav, footer, buttons) for every page.
   Two token vocabularies point at the same values: the long names are used
   by the older page styles, the short names by the newer ones. */

:root {
    /* Backgrounds */
    --bg: #0b0c0e;
    --surface: #131518;
    --surface-2: #191c20;
    --bg-primary: #0b0c0e;
    --bg-surface: #131518;
    --bg-surface-elevated: #191c20;
    --bg-hover: #1f2226;

    /* Text */
    --text: #f2f3f5;
    --text-2: #9aa1a9;
    --text-3: #686e76;
    --text-primary: #f2f3f5;
    --text-secondary: #9aa1a9;
    --text-tertiary: #686e76;

    /* Status (validated for contrast and CVD separation on the dark surface) */
    --ok: #0ca30c;
    --warn: #fab219;
    --serious: #ec835a;
    --crit: #d03b3b;
    --status-operational: #0ca30c;
    --status-degraded: #fab219;
    --status-partial: #ec835a;
    --status-major: #d03b3b;
    --status-maintenance: #97a1ff;
    --status-unknown: #686e76;

    /* Accent */
    --accent: #97a1ff;
    --accent-primary: #97a1ff;
    --accent-secondary: #7c87f0;
    --accent-tertiary: #6a75e0;

    /* Borders */
    --border: #24272c;
    --border-2: #363a40;
    --border-default: #24272c;
    --border-hover: #363a40;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md:
        0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg:
        0 10px 15px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.4);

    --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas,
        monospace;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Inter", sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Site chrome: the shared page shell */
.site-wrap {
    max-width: var(--wrap-max, 880px);
    margin: 0 auto;
    padding: 0 20px;
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    flex-wrap: wrap;
    padding: 22px 0;
}

.site-nav .brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 650;
    font-size: 16px;
    letter-spacing: -0.01em;
    text-decoration: none;
    color: var(--text);
}

.site-nav .brand .pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.site-nav .brand .pulse:not(.st-operational) {
    animation: sitepulse 2.4s ease-in-out infinite;
}

@keyframes sitepulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(250, 178, 25, 0.35); }
    50% { box-shadow: 0 0 0 5px rgba(250, 178, 25, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .site-nav .brand .pulse { animation: none !important; }
}

.site-nav .links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    font-size: 14px;
}

.site-nav .links a {
    color: var(--text-2);
    text-decoration: none;
}

.site-nav .links a:hover {
    color: var(--text);
}

.site-footer {
    margin-top: 64px;
    padding: 20px 0 40px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    gap: 10px 16px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text-3);
}

.site-footer .links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
}

.site-footer a {
    color: var(--text-3);
}

.site-footer a:hover {
    color: var(--text-2);
}

/* Status dot colors, shared everywhere */
.st-operational { background: var(--ok); }
.st-degraded { background: var(--warn); }
.st-partial_outage { background: var(--serious); }
.st-major_outage { background: var(--crit); }
.st-maintenance { background: var(--accent); }
.st-unknown { background: var(--text-3); }

/* Shared buttons */
.btn {
    display: inline-block;
    padding: 9px 16px;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 550;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
}

.btn.primary {
    background: var(--text);
    color: var(--bg);
}

.btn.primary:hover {
    background: #dfe1e5;
}

.btn.ghost {
    border-color: var(--border-2);
    color: var(--text);
}

.btn.ghost:hover {
    border-color: var(--text-3);
}

/* Long code lines must scroll or wrap, never widen the page */
pre {
    max-width: 100%;
    overflow-x: auto;
}

code {
    overflow-wrap: break-word;
}

/* Default content column, aligned with the nav/footer shell */
.wrap {
    max-width: var(--wrap-max, 880px);
    margin: 0 auto;
    padding: 0 20px;
}
