:root {
    color-scheme: light;
    --border: #e5e7eb;
    --header-bg: #f9fafb;
    --row-alt: #fafafa;
    --link: #2563eb;
    --muted: #6b7280;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    color: #111;
    background: #fff;
}

header {
    display: flex;
    align-items: baseline;
    gap: 24px;
    padding: 12px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--header-bg);
}

header h1 { margin: 0; font-size: 18px; font-weight: 600; }
header h1 a { color: inherit; text-decoration: none; }
header nav a { margin-right: 16px; color: var(--link); text-decoration: none; font-size: 14px; }
header nav a:hover { text-decoration: underline; }

main { padding: 16px 24px 48px; max-width: 100%; }
h2 { margin: 0 0 12px; font-size: 22px; }
h3 { margin: 0 0 8px; font-size: 16px; }
section { margin-bottom: 32px; }

.table-wrap { overflow-x: auto; max-width: 100%; }
table {
    border-collapse: collapse;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
    width: 100%;
}
th, td {
    padding: 4px 8px;
    border: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
    max-width: 480px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
thead th {
    background: var(--header-bg);
    position: sticky;
    top: 0;
    z-index: 1;
}
tbody tr:nth-child(even) { background: var(--row-alt); }

tr.bucket-success    td:first-child { border-left: 4px solid #10b981; }
tr.bucket-missed     td:first-child { border-left: 4px solid #f59e0b; }
tr.bucket-failed     td:first-child { border-left: 4px solid #ef4444; }
tr.bucket-unexpected td:first-child { border-left: 4px solid #8b5cf6; }

details summary { cursor: pointer; }
details pre {
    margin: 4px 0 0;
    white-space: pre-wrap;
    word-break: break-word;
    max-width: 600px;
}

.empty { color: var(--muted); font-style: italic; }
.counts { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; margin-bottom: 16px; }
.counts span { color: var(--muted); }
.counts strong { color: #111; }

.tab-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
}
.tab-btn {
    appearance: none;
    background: transparent;
    border: 1px solid transparent;
    border-bottom: none;
    padding: 8px 14px;
    font: inherit;
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
    border-radius: 4px 4px 0 0;
    margin-bottom: -1px;
}
.tab-btn:hover { color: #111; }
.tab-btn.active {
    color: #111;
    background: #fff;
    border-color: var(--border);
    font-weight: 600;
}
.tab-panel { display: none; margin-bottom: 0; }
.tab-panel.active { display: block; }
