/* Siesta AI Status. Plain CSS, no framework. Brand colors from Siesta.AI.Ops/brand/brand-manifest.json. */

@font-face {
    font-family: "DM Sans";
    font-style: normal;
    font-weight: 100 1000;
    font-display: swap;
    src: url("/fonts/dm-sans-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "DM Sans";
    font-style: normal;
    font-weight: 100 1000;
    font-display: swap;
    src: url("/fonts/dm-sans-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Plus Jakarta Sans";
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("/fonts/plus-jakarta-sans-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Plus Jakarta Sans";
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("/fonts/plus-jakarta-sans-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --navy: #060649;
    --purple: #30185e;
    --link: #3d6fe0;

    --bg: #f6f7fb;
    --surface: #ffffff;
    --surface-2: #f3f6ff;
    --border: #e2e5f1;
    --heading: #0b0f19;
    --text: #33354d;
    --muted: #6b6f80;
    --faint: #9397ad;
    --shadow: 0 1px 2px rgba(11, 15, 25, .04), 0 4px 16px rgba(11, 15, 25, .04);

    --operational: #22c55e;
    --operational-strong: #15803d;
    --degraded: #f5b400;
    --degraded-strong: #a16207;
    --partial: #f97316;
    --partial-strong: #c2410c;
    --major: #ef4444;
    --major-strong: #b91c1c;
    --maintenance: #4c82f7;
    --maintenance-strong: #1d4ed8;
    --nodata: #d9dce8;
    --nodata-strong: #6b6f80;

    --radius: 12px;
    --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-heading: "Plus Jakarta Sans", var(--font-body);
}

@media (prefers-color-scheme: dark) {
    :root {
        --link: #8aa9ff;
        --bg: #0b0d1c;
        --surface: #13162b;
        --surface-2: #1a1e38;
        --border: #262a47;
        --heading: #f2f3fa;
        --text: #c9cbdc;
        --muted: #9a9db5;
        --faint: #6f7290;
        --shadow: none;
        --nodata: #2c3050;
        --nodata-strong: #9a9db5;
        --operational-strong: #4ade80;
        --degraded-strong: #fcd34d;
        --partial-strong: #fb923c;
        --major-strong: #f87171;
        --maintenance-strong: #8aa9ff;
    }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 400 15px/1.55 var(--font-body);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    color: var(--heading);
    margin: 0;
    letter-spacing: -.01em;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--maintenance); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: 920px; margin: 0 auto; padding: 0 20px; }

.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip-link:focus { left: 8px; }

.muted { color: var(--muted); margin: 0; }

/* Header */

.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 14px; color: var(--heading); }
.brand:hover { text-decoration: none; }
.brand img { display: block; height: 30px; width: auto; }
.brand-divider { width: 1px; height: 24px; background: var(--border); }
.brand-label { font: 600 17px var(--font-heading); color: var(--muted); }
.header-nav { display: flex; gap: 8px; align-items: center; }
.header-nav a {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 12px; border-radius: 8px; color: var(--text); font-weight: 500; font-size: 14px;
}
.header-nav a:hover { background: var(--surface-2); text-decoration: none; }
.feed-link { border: 1px solid var(--border); }

main.container { padding-top: 36px; padding-bottom: 56px; }

/* Banner */

.banner {
    display: flex; align-items: center; gap: 14px;
    padding: 22px 26px; border-radius: var(--radius);
    color: #fff; box-shadow: var(--shadow);
}
.banner h1 { color: inherit; font-size: 22px; font-weight: 700; }
.banner .status-icon { width: 28px; height: 28px; flex: none; }
.banner .icon-bg { fill: rgba(255, 255, 255, .22); }
.banner .icon-fg { stroke: #fff; }
.banner .icon-fg-fill { fill: #fff; }
.banner.is-operational { background: linear-gradient(135deg, #15803d, #16a34a); }
.banner.is-degraded { background: linear-gradient(135deg, #b45309, #d97706); }
.banner.is-partial { background: linear-gradient(135deg, #c2410c, #ea580c); }
.banner.is-major { background: linear-gradient(135deg, #991b1b, #dc2626); }
.banner.is-maintenance { background: linear-gradient(135deg, #1e3a8a, #2563eb); }
.banner.is-nodata { background: linear-gradient(135deg, var(--navy), var(--purple)); }

/* Sections and cards */

.section { margin-top: 36px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-title { font-size: 18px; font-weight: 700; margin-bottom: 14px; }
.section-note { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.section-note span + span { margin-left: 6px; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }

/* Groups and services */

.group-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 24px; border-bottom: 1px solid var(--border);
    background: var(--surface-2); border-radius: var(--radius) var(--radius) 0 0;
}
.group-head h3 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.group-status { font-size: 13px; font-weight: 600; }

.service { padding: 20px 24px; }
.service + .service { border-top: 1px solid var(--border); }
.service-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.service-name { font-weight: 600; color: var(--heading); font-size: 15.5px; }

.info {
    display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%;
    border: 1px solid var(--border); color: var(--faint); font-size: 11px; font-weight: 700; cursor: help;
}

.service-status { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; }
.service-status .status-icon { width: 18px; height: 18px; }
.service-status.large { margin-left: 0; font-size: 16px; padding: 12px 16px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); }
.service-status.large .status-icon { width: 24px; height: 24px; }
.service-status small { display: block; color: var(--muted); font-weight: 400; font-size: 12.5px; }

/* Status colors shared by text, icons, bars and swatches */

.is-operational { --c: var(--operational); --c-strong: var(--operational-strong); }
.is-degraded { --c: var(--degraded); --c-strong: var(--degraded-strong); }
.is-partial { --c: var(--partial); --c-strong: var(--partial-strong); }
.is-major { --c: var(--major); --c-strong: var(--major-strong); }
.is-maintenance { --c: var(--maintenance); --c-strong: var(--maintenance-strong); }
.is-nodata { --c: var(--nodata); --c-strong: var(--nodata-strong); }

.service-status, .group-status { color: var(--c-strong); }
.status-icon .icon-bg { fill: var(--c); }
.status-icon .icon-fg { stroke: #fff; }
.status-icon .icon-fg-fill { fill: #fff; }
.status-icon.is-nodata .icon-fg { stroke: var(--nodata-strong); }

/* 90-day bars */

.bars { display: flex; gap: 2px; height: 34px; }
.bar {
    flex: 1 1 0; min-width: 2px; border-radius: 2px;
    background: var(--c); transition: opacity .12s, transform .12s;
}
.bar:hover, .bar.is-active { opacity: .7; transform: scaleY(1.06); }

.bars-legend { display: flex; align-items: center; gap: 10px; margin-top: 8px; color: var(--faint); font-size: 12px; }
.bars-rule { flex: 1; height: 1px; background: var(--border); }
.narrow-only { display: none; }

@media (max-width: 640px) {
    .bar:nth-child(-n+60) { display: none; }
    .wide-only { display: none; }
    .narrow-only { display: inline; }
}

.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0; margin: 14px 4px 0; color: var(--muted); font-size: 12.5px; }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }

/* Incidents */

.incident-card { padding: 20px 24px; border-left: 4px solid var(--c); }
.incident-card + .incident-card { margin-top: 16px; }
.incident-card { background: var(--surface); border-top: 1px solid var(--border); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.incident-card-header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.incident-card-header h3 { font-size: 17px; }
.incident-card-header h3 a { color: var(--heading); }
.incident-card-body { margin-top: 10px; }

.pill {
    display: inline-block; padding: 2px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 700; letter-spacing: .02em;
    background: var(--c); color: #fff;
}
.pill.is-degraded { color: #3d2a00; }
.pill-subtle { background: var(--surface-2); color: var(--c-strong); border: 1px solid var(--border); font-weight: 600; }

.incident-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 0; color: var(--muted); font-size: 13px; }

.past { padding: 6px 24px; }
.past-day { padding: 16px 0; }
.past-day + .past-day { border-top: 1px solid var(--border); }
.past-day h3 { font-size: 14.5px; margin-bottom: 6px; }
.incident-list { list-style: none; margin: 0; padding: 0; }
.incident-item { padding: 10px 0; }
.incident-item + .incident-item { border-top: 1px dashed var(--border); }
.incident-title { font-weight: 600; font-size: 15px; color: var(--c-strong); }
.past > .incident-list { padding: 8px 0; }
.past > .muted { padding: 16px 0; }
.more-link { margin: 12px 4px 0; font-size: 14px; font-weight: 500; }

/* Markdown content */

.prose { color: var(--text); }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p { margin: 0 0 10px; }
.prose h2, .prose h3, .prose h4 { font-size: 15px; margin: 18px 0 6px; }
.prose ul, .prose ol { padding-left: 20px; margin: 0 0 10px; }
.prose code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; font-size: 13px; }

/* Detail pages */

.breadcrumb { font-size: 14px; margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); }

.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.page-head.stacked { display: block; }
.page-head h1 { font-size: 28px; font-weight: 800; }
.eyebrow { margin: 0 0 4px; color: var(--muted); font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.lead { margin: 6px 0 0; color: var(--muted); font-size: 16px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.chart-card + .section-note { margin-top: 10px; }
.stat { padding: 16px 18px; }
.stats .card + .card { margin-top: 0; }
.stat-label { display: block; color: var(--muted); font-size: 12.5px; }
.stat-value { display: block; margin-top: 2px; font: 700 22px var(--font-heading); color: var(--heading); }

.card.service { padding: 22px 24px; }

.chart-card { padding: 16px 16px 8px; }
.chart-card > .muted { padding: 30px 8px; text-align: center; }
.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart-grid { stroke: var(--border); stroke-width: 1; }
.chart-label { fill: var(--faint); font: 11px var(--font-body); }
.chart-line { fill: none; stroke: var(--maintenance); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-area { fill: var(--maintenance); opacity: .1; }
.chart-point { fill: transparent; cursor: crosshair; }
.chart-point:hover, .chart-point.is-active { fill: var(--maintenance); }
.chart-point.is-failure { fill: var(--major); stroke: var(--surface); stroke-width: 2; }

.incident-detail { padding: 24px; margin-top: 20px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 0 0 22px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.facts dt { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.facts dd { margin: 3px 0 0; font-weight: 500; color: var(--heading); }
.tag { display: inline-block; margin: 0 6px 6px 0; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); font-size: 13px; color: var(--text); }

.error-page { padding: 60px 0; }

/* Footer */

.site-footer { border-top: 1px solid var(--border); background: var(--surface); }
.footer-inner { display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; padding-top: 20px; padding-bottom: 20px; font-size: 13px; color: var(--muted); }
.footer-inner p { margin: 0; }
.footer-inner a { color: var(--muted); }
.footer-dot { margin: 0 6px; }

/* Tooltip (positioned by status.js) */

.tooltip {
    position: fixed; z-index: 20; max-width: 260px; pointer-events: none;
    padding: 9px 12px; border-radius: 8px;
    background: var(--heading); color: var(--bg);
    font-size: 12.5px; line-height: 1.5; white-space: pre-line;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}

@media (max-width: 640px) {
    .container { padding: 0 16px; }
    main.container { padding-top: 24px; }
    .banner { padding: 18px; }
    .banner h1 { font-size: 18px; }
    .service, .card.service { padding: 16px; }
    .group-head { padding: 12px 16px; }
    .past { padding: 4px 16px; }
    .incident-card { padding: 16px; }
    .page-head h1 { font-size: 23px; }
    .brand-label { font-size: 15px; }
    .header-inner { padding-top: 12px; padding-bottom: 12px; min-height: 0; gap: 10px; }
    .header-nav { margin-left: -12px; }
    .brand img { height: 24px; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
