:root {
    --bg: #f6f7f9;
    --surface: #ffffff;
    --text: #14181f;
    --muted: #5d6675;
    --line: #e3e6eb;
    --ok: #16a34a;
    --ok-soft: #e8f6ed;
    --warn: #d97706;
    --warn-soft: #fdf3e3;
    --fail: #dc2626;
    --fail-soft: #fdecec;
    --none: #d5d9e0;
    --accent: #0b2f9f;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f1217;
        --surface: #171b22;
        --text: #e8ebf0;
        --muted: #98a1b0;
        --line: #272d37;
        --ok: #22c55e;
        --ok-soft: #12261a;
        --warn: #f59e0b;
        --warn-soft: #2b2112;
        --fail: #f05252;
        --fail-soft: #2d1416;
        --none: #343b47;
        --accent: #7c9cff;
    }
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }

.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: baseline; gap: 12px; padding-top: 16px; padding-bottom: 16px; }
.brand { color: var(--text); font-weight: 700; font-size: 18px; text-decoration: none; }
.brand-sub { color: var(--muted); }

.overall {
    display: flex; align-items: center; gap: 16px;
    margin: 28px 0 8px; padding: 20px 22px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
.overall h1 { margin: 0; font-size: 20px; line-height: 1.3; }
.overall p { margin: 2px 0 0; }
.overall-dot { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--none); }
.overall-ok { background: var(--ok-soft); border-color: transparent; }
.overall-ok .overall-dot { background: var(--ok); }
.overall-warn { background: var(--warn-soft); border-color: transparent; }
.overall-warn .overall-dot { background: var(--warn); }
.overall-fail { background: var(--fail-soft); border-color: transparent; }
.overall-fail .overall-dot { background: var(--fail); }

.group { margin-top: 28px; }
.group h2 { margin: 0 0 8px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }

.row { padding: 14px 18px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.name { font-weight: 600; overflow-wrap: anywhere; }
.name a { color: inherit; text-decoration: none; }
.name a:hover { color: var(--accent); text-decoration: underline; }

.pill { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill-ok { color: var(--ok); }
.pill-fail { color: var(--fail); }
.pill-none { color: var(--muted); }

.bars { display: flex; gap: 2px; height: 26px; margin-top: 10px; }
.bar { flex: 1 1 0; min-width: 2px; border-radius: 2px; background: var(--none); }
.bar-ok { background: var(--ok); }
.bar-fail { background: var(--fail); }

.meta { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 6px; font-size: 13px; color: var(--muted); }
.meta b { color: var(--text); font-weight: 600; }

.legend { margin: 20px 0 0; font-size: 13px; }
.legend-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 4px 0 10px; vertical-align: -1px; }
.legend-swatch:first-child { margin-left: 0; }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding-top: 24px; padding-bottom: 32px; font-size: 13px; }

.error { margin-top: 28px; padding: 16px 18px; border-radius: 12px; background: var(--warn-soft); }

@media (max-width: 520px) {
    .bars { height: 22px; gap: 1px; }
    .overall { padding: 16px; }
    .row { padding: 12px 14px; }
}
