/* The archiver's own small additions to the template's baseline: the
   coverage state labels, tabular numbers, and compact option buttons.
   The state colour tokens live here (not in theme.css, which this app
   leaves untouched) and carry their own dark values. */
:root {
    --state-green: #19703f;
    --state-green-bg: #e7f4ec;
    --state-amber: #7a4f00;
    --state-amber-bg: #fff1cc;
    --state-grey: #4d5560;
    --state-grey-bg: #ebedf0;
    --state-red: #b42318;
    --state-red-bg: #fbe9e7;
}

@media (prefers-color-scheme: dark) {
    :root {
        --state-green: #8fd6ab;
        --state-green-bg: #143d26;
        --state-amber: #f0c464;
        --state-amber-bg: #4a3600;
        --state-grey: #c2c8d0;
        --state-grey-bg: #2b2f36;
        --state-red: #f3a19a;
        --state-red-bg: #4a1712;
    }
}

.state {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 4px;
    font-size: 0.85rem;
    line-height: 1.4;
    white-space: nowrap;
}

.state-green { color: var(--state-green); background: var(--state-green-bg); }
.state-amber { color: var(--state-amber); background: var(--state-amber-bg); }
.state-grey  { color: var(--state-grey);  background: var(--state-grey-bg); }
.state-red   { color: var(--state-red);   background: var(--state-red-bg); }

a.state:hover,
a.state:focus-visible {
    text-decoration: underline;
}

.dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 6px;
    border-radius: 50%;
    vertical-align: middle;
}

.dot-green { background: var(--state-green); }
.dot-amber { background: var(--state-amber); }
.dot-grey  { background: var(--state-grey); }
.dot-red   { background: var(--state-red); }

.table-wrap {
    max-width: 100%;
    overflow-x: auto;
}

table.data {
    font-variant-numeric: tabular-nums;
    margin: var(--space-3) 0;
}

table.data th,
table.data td {
    padding: 5px 9px;
    font-size: 0.95rem;
}

table.data td.num,
table.data th.num {
    text-align: right;
    white-space: nowrap;
}

table.grid th,
table.grid td {
    padding: 3px 7px;
    font-size: 0.9rem;
    white-space: nowrap;
}

table.grid tbody th {
    font-weight: 700;
    background: transparent;
}

.ref {
    display: block;
    font-size: 0.8rem;
    color: var(--muted);
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.85rem;
}

.muted {
    color: var(--muted);
}

.quiet {
    opacity: 0.85;
}

.headline {
    font-size: 1.05rem;
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    font-size: 0.9rem;
    color: var(--muted);
}

ul.lanes {
    padding-left: 0;
    list-style: none;
}

ul.lanes li {
    margin: 0 0 var(--space-1);
}

.item {
    padding: var(--space-3) 0;
    border-top: 1px solid var(--border);
}

.item p {
    margin-bottom: var(--space-2);
}

.options {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: 0;
}

.options button {
    min-width: 0;
    min-height: 34px;
    padding: 5px 12px;
    font-weight: 600;
}

tr.week td {
    font-weight: 700;
}

@media (max-width: 720px) {
    .options button {
        width: auto;
    }
}
