/* ============================================================================
   Stints — runs of tyres, side by side

   A wide table of numbers, which is the honest shape for this: the page is
   read by scanning a column, not by looking at a picture. Everything here is
   in service of that - tabular figures, a monospace face for the pressures so
   the decimal points line up, and enough row height that a finger can find a
   checkbox.

   Colours come from palette.css. No hex here.
   ========================================================================= */

.stint-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 32px 20px 80px;
}

.stint-head {
    margin-bottom: 28px;
}

.stint-head .page-title {
    margin: 0 0 8px;
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -0.4px;
    color: var(--text-primary);
}

.stint-head .page-subtitle {
    margin: 0;
    max-width: 60ch;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
}

/* ── Filters ─────────────────────────────────────────────────────────────── */

.stint-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 22px;
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
}

.stint-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 150px;
}

.stint-field > span {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.stint-field select {
    padding: 8px 10px;
    font: inherit;
    font-size: 13px;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
}

.stint-field select:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* ── The table ───────────────────────────────────────────────────────────── */

/* Wide content scrolls inside its own box rather than pushing the page
   sideways: on a phone this table is much wider than the screen and always
   will be. */
.stint-scroll {
    overflow-x: auto;
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    background: var(--bg-secondary);
}

.stint-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    color: var(--text-secondary);
}

.stint-table th,
.stint-table td {
    padding: 11px 12px;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid var(--border-secondary);
}

.stint-table thead th {
    position: sticky;
    top: 0;
    background: var(--bg-tertiary);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-primary);
}

.stint-table tbody tr:last-child td { border-bottom: none; }
.stint-table tbody tr:hover { background: var(--bg-tertiary); }
.stint-table tbody tr.is-chosen { background: var(--accent-subtle); }

.stint-table .t { text-align: right; }
.stint-table .t.is-warn { color: var(--warning); }
.stint-table .st-quiet { color: var(--text-muted); }

.stint-table .mono {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 12px;
}

.st-pick { width: 34px; }

.st-pick input {
    width: 15px;
    height: 15px;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

/* ── Side by side ────────────────────────────────────────────────────────── */

.stint-compare {
    margin-top: 26px;
}

.stint-compare-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.stint-compare-head h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.stint-clear {
    padding: 6px 12px;
    font: inherit;
    font-size: 12px;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    cursor: pointer;
}

.stint-clear:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.stint-table.is-compare th[scope="row"] {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ── The quiet states ────────────────────────────────────────────────────── */

.stint-hint,
.stint-loading {
    margin: 16px 0 0;
    max-width: 64ch;
    font-size: 13px;
    line-height: 1.65;
    color: var(--text-muted);
}

.stint-empty {
    padding: 40px 24px;
    text-align: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
}

.stint-empty-title {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.stint-empty p {
    margin: 0 auto;
    max-width: 52ch;
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--text-muted);
}

@media (max-width: 700px) {
    .stint-page { padding: 22px 14px 60px; }
    .stint-head .page-title { font-size: 24px; }
    .stint-field { min-width: 0; flex: 1 1 140px; }
}
