:root {
    color-scheme: dark;
    font-family: BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --bg: #090c10;
    --surface: #0d1117;
    --surface-raised: #151b23;
    --border: #28313d;
    --text: #fff;
    --muted: #dce0e5;
    --green: #52c98b;
    --amber: #e8b66a;
    --red: #f17676;
    --unknown: #87919e;
    background: var(--bg);
    color: var(--text);
}
* { box-sizing: border-box; }
body { min-height: 100vh; margin: 0; color: var(--text); background: var(--bg); }
a { color: inherit; }
button { font: inherit; }
.container { width: min(calc(100% - 36px), 860px); margin-inline: auto; }

/* Compact Dockge-style header: same scale as a utility panel, not a landing page. */
.site-header { background: #0d1117; border-bottom: 1px solid var(--border); }
.header-content { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-size: 19px; font-weight: 730; letter-spacing: -.03em; white-space: nowrap; }
.brand-logo { width: 32px; height: 32px; flex: 0 0 32px; object-fit: contain; }
.header-nav { display: flex; align-items: center; gap: 6px; }
.header-nav a, .nav-current { display: inline-flex; align-items: center; gap: 6px; border-radius: 8px; padding: 8px 11px; text-decoration: none; font-size: 12px; font-weight: 600; }
.header-nav a { border: 1px solid transparent; }
.header-nav a:hover, .header-nav a:focus-visible { border-color: var(--border); background: var(--surface-raised); }
.nav-current { background: #222a35; }

/* The page fits comfortably on laptop viewports without giant gutters. */
.main-content { padding-top: 33px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; margin-bottom: 20px; }
.eyebrow { font-size: 10px; font-weight: 710; letter-spacing: .12em; margin-bottom: 8px; color: var(--muted); }
h1 { margin: 0; font-size: clamp(27px, 3vw, 32px); line-height: 1.14; letter-spacing: -.035em; font-weight: 730; }
.page-heading p { margin: 8px 0 0; line-height: 1.45; font-size: 13px; color: var(--muted); }
.btn-primary { display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 36px; padding: 8px 13px; border: 1px solid #fff; border-radius: 8px; background: #fff; color: #090c10; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.btn-primary:hover { background: #e5e5e5; border-color: #e5e5e5; }
.btn-primary:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.btn-primary:disabled { opacity: .65; cursor: wait; }
.btn-primary svg { height: 14px; width: 14px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.shadow-box { background: var(--surface); border: 1px solid var(--border); border-radius: 11px; }
.overall { display: flex; align-items: center; gap: 13px; min-height: 60px; padding: 12px 17px; }
.overall-text { display: flex; flex-direction: column; min-width: 0; gap: 3px; }
.overall strong { font-size: 14px; font-weight: 710; line-height: 1.35; }
.overall-text span { font-size: 12px; line-height: 1.4; color: var(--muted); }
.dot { display: inline-block; width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; background: var(--unknown); }
.overall .dot { width: 11px; height: 11px; flex-basis: 11px; }
.dot.operational { background: var(--green); }
.dot.degraded, .dot.partial { background: var(--amber); }
.dot.outage { background: var(--red); }
.dot.pending, .dot.unconfigured { background: var(--unknown); }

/* Exactly four functional rows. No empty sections or extra cards. */
.monitors { margin-top: 28px; }
.monitors-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 11px; }
.monitors h2 { margin: 0; font-size: 17px; font-weight: 710; letter-spacing: -.02em; }
#monitor-cycle { font-size: 11px; color: var(--muted); }
.monitor-list { overflow: hidden; }
.monitor { display: flex; align-items: center; gap: 12px; min-height: 96px; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.monitor:last-child { border-bottom: none; }
.monitor:hover { background: #101721; }
.monitor-icon { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; border-radius: 8px; border: 1px solid #303945; background: #19212b; color: #fff; }
.monitor-icon svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.monitor-content { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; gap: 11px; }
.monitor-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.monitor-top > div { min-width: 0; }
.monitor h3 { margin: 0 0 3px; font-size: 14px; font-weight: 700; line-height: 1.3; }
.monitor p { margin: 0; font-size: 11px; line-height: 1.4; color: var(--muted); }
.monitor-state { display: inline-flex; align-items: center; justify-content: flex-start; gap: 7px; flex: 0 0 auto; padding: 5px 8px; border: 1px solid #303a46; background: #171f28; border-radius: 7px; font-size: 11px; font-weight: 630; line-height: 1.35; white-space: nowrap; }
.monitor-state .dot { width: 8px; height: 8px; flex-basis: 8px; }
.monitor-bottom { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.history { display: flex; align-items: center; gap: 3px; width: min(100%, 285px); height: 13px; min-width: 0; }
.history-bar { height: 12px; flex: 1 1 0; min-width: 3px; background: #2e3743; border-radius: 2px; }
.history-bar.operational { background: #3baa77; }
.history-bar.degraded, .history-bar.partial { background: #d4a35c; }
.history-bar.outage { background: #db6c6c; }
.history-bar.unconfigured { background: #5c6672; }
.latency { font-size: 11px; white-space: nowrap; text-align: right; color: var(--muted); }
.under-list { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 7px 16px; padding: 11px 2px 0; font-size: 11px; line-height: 1.5; color: var(--muted); }
.footer { display: flex; justify-content: space-between; gap: 12px; margin: 38px 0 24px; padding-top: 17px; border-top: 1px solid var(--border); font-size: 11px; color: var(--muted); }
.footer a { text-decoration: none; }
.footer a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Preserve horizontal status alignment, including on phones. */
@media (max-width: 640px) {
    .container { width: calc(100% - 26px); }
    .header-content { min-height: 60px; gap: 8px; }
    .brand { font-size: 17px; gap: 6px; }
    .brand-logo { width: 28px; height: 28px; flex-basis: 28px; }
    .header-nav { gap: 2px; }
    .header-nav a, .nav-current { font-size: 11px; padding: 7px 6px; }
    .main-content { padding-top: 26px; }
    .page-heading { align-items: flex-start; }
    .page-heading p { font-size: 12px; }
    .eyebrow { font-size: 9px; }
    .btn-primary { padding: 8px 9px; font-size: 11px; }
    .monitors { margin-top: 25px; }
    .monitors-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
    .monitor { min-height: 91px; padding: 12px 10px; gap: 9px; }
    .monitor-icon { width: 28px; height: 28px; flex-basis: 28px; }
    .monitor-icon svg { height: 15px; width: 15px; }
    .monitor-top { gap: 6px; }
    .monitor h3 { font-size: 12px; }
    .monitor p { font-size: 10px; }
    .monitor-state { gap: 5px; padding: 4px 5px; font-size: 10px; }
    .monitor-bottom { gap: 8px; }
    .history { width: min(100%, 220px); gap: 2px; }
    .history-bar { min-width: 2px; height: 11px; }
    .latency { font-size: 10px; }
    .footer { flex-direction: column; gap: 7px; margin-top: 28px; }
}
@media (max-width: 400px) {
    .page-heading { flex-direction: column; gap: 12px; }
    .header-nav a span { display: none; }
    .monitor-icon { display: none; }
    .monitor-top { align-items: center; }
    .history { width: min(100%, 150px); }
    .monitor-state { max-width: 100px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
