:root {
    --color-bg: #f7f8fa;
    --color-surface: #ffffff;
    --color-border: #dfe3e8;
    --color-text: #1a2733;
    --color-text-muted: #5c6b7a;
    --color-primary: #1a5fb4;
    --color-reliable: #1f8a4c;
    --color-degraded: #b8860b;
    --color-unreliable: #c0392b;
    --radius: 8px;
}

* { box-sizing: border-box; }

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

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.site-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-text);
    text-decoration: none;
}

.site-header nav a {
    margin-left: 1.25rem;
    color: var(--color-primary);
    text-decoration: none;
}

.site-header nav a:hover { text-decoration: underline; }

.content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem;
}

.site-footer {
    max-width: 1100px;
    margin: 2rem auto 0;
    padding: 1rem 1.5rem 2rem;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.site-footer .disclaimer { font-style: italic; }

.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.card h2, .card h3 { margin-top: 0; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--color-border); }
th { color: var(--color-text-muted); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; }
tr:hover td { background: var(--color-bg); }
a.row-link { color: var(--color-text); text-decoration: none; display: block; }

.search-form { margin-bottom: 1rem; }
.search-form input[type="text"] {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    width: 300px;
    max-width: 100%;
}
.search-form button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius);
    background: var(--color-primary);
    color: white;
    cursor: pointer;
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    color: white;
}
.badge-reliable { background: var(--color-reliable); }
.badge-degraded { background: var(--color-degraded); }
.badge-unreliable { background: var(--color-unreliable); }
.badge-unknown { background: var(--color-text-muted); }

.stat-row { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-bottom: 1rem; }
.stat { min-width: 140px; }
.stat .label { color: var(--color-text-muted); font-size: 0.8rem; text-transform: uppercase; }
.stat .value { font-size: 1.6rem; font-weight: 700; }

.caveat {
    background: #fff8e6;
    border: 1px solid #f0d999;
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: #6b5300;
    margin-bottom: 1rem;
}

.chart-wrap { position: relative; height: 320px; margin-bottom: 1rem; }
.chart-wrap.small { height: 220px; }

.empty-state { color: var(--color-text-muted); font-style: italic; padding: 1rem 0; }

.breadcrumb { margin-bottom: 1rem; font-size: 0.9rem; }
.breadcrumb a { color: var(--color-primary); text-decoration: none; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }

.heatmap-wrap { overflow-x: auto; }
.heatmap { border-collapse: collapse; font-size: 0.75rem; }
.heatmap th { padding: 0.2rem 0.35rem; font-weight: 500; color: var(--color-text-muted); }
.heatmap td {
    width: 28px;
    height: 24px;
    text-align: center;
    border: 1px solid var(--color-bg);
    background-color: rgba(26, 95, 180, var(--intensity, 0));
    color: var(--color-text-muted);
}
.heatmap td.empty { background: repeating-linear-gradient(45deg, #f0f0f0, #f0f0f0 4px, #f7f8fa 4px, #f7f8fa 8px); }
.heatmap .row-label { text-align: right; padding-right: 0.5rem; white-space: nowrap; }
