:root {
    color-scheme: light dark;
    --bg: #f7f7f8;
    --fg: #1a1a1a;
    --card-bg: #fff;
    --border: #e0e0e0;
    --muted: #666;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #16171a;
        --fg: #e8e8e8;
        --card-bg: #202226;
        --border: #33353a;
        --muted: #9a9a9a;
    }
}

* { box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--fg);
    margin: 0;
    padding: 24px 32px 64px;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}
h1 { font-size: 1.3rem; margin: 0; }

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 6px;
}
.swipe-link {
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--fg);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 14px;
}
.badge.priority { background: #d6f5df; color: #106b2c; }
.badge.watch { background: #fff3cd; color: #8a6100; }
.badge.exclude { background: #f1f1f1; color: #888; }
.badge.unclassified, .badge.None { background: #e6e9ff; color: #3341a8; }
@media (prefers-color-scheme: dark) {
    .badge.priority { background: #0f3d1e; color: #7be79a; }
    .badge.watch { background: #4a3a00; color: #ffd876; }
    .badge.exclude { background: #2b2b2b; color: #999; }
    .badge.unclassified, .badge.None { background: #232759; color: #aab2ff; }
}

nav.filters form {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
nav.filters label {
    display: flex;
    flex-direction: column;
    font-size: 0.75rem;
    color: var(--muted);
    gap: 4px;
}
select, button {
    font-size: 0.9rem;
    padding: 4px 6px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}
.btn-archive {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--muted);
    cursor: pointer;
    white-space: nowrap;
}
.btn-archive:hover { color: var(--fg); border-color: var(--fg); }

.sort-link {
    text-decoration: none;
    color: inherit;
    white-space: nowrap;
}
.sort-link:hover { text-decoration: underline; }
.sort-link.active { color: var(--fg); font-weight: 700; }

th, td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
    vertical-align: top;
}
th { color: var(--muted); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; }
tr.decision-exclude { opacity: 0.55; }
.reason { color: var(--muted); font-size: 0.75rem; margin-top: 4px; max-width: 320px; }
a { color: inherit; }
