/*
 * `/tracker` -- every Lattice pick and how it turned out. BET-4.
 *
 * The three scoreboard panels are the same size and the same weight -- the
 * record, the straight-up rate, and the break-even bar -- because the bar is
 * what makes the first of them readable and a design that shrank it would be
 * arguing for a conclusion BET-3 spends a page rejecting.
 *
 * The shell -- `.container` and `.footer-info` -- comes from layout.css, which
 * this page did not load until it turned out it had been rendering both of them
 * unstyled since BET-4 built it.
 *
 * `.better` and `.worse` are decided against break-even, never against half.
 * At -110 a hit rate of 51% is a losing strategy, and green on it would say
 * otherwise.
 *
 * Colours come from theme.css. This sheet writes no hex value -- WEB-13's rule,
 * enforced by `tests/test_theme.py`.
 */

.lede {
    max-width: 70ch;
    margin: 0 auto 26px;
    text-align: center;
    color: var(--text-muted);
    line-height: 1.6;
}

.empty-state {
    max-width: 62ch;
    margin: 30px auto;
    padding: 22px 26px;
    text-align: center;
    line-height: 1.7;
    color: var(--text-muted);
    background: var(--control-surface);
    border: 1px solid var(--control-border);
    border-radius: var(--radius-lg);
}

.empty-state strong {
    display: block;
    margin-bottom: 6px;
    color: var(--text-bright);
}

/* --- the scoreboard ---------------------------------------------------- */

.scoreboard {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
    margin: 0 auto 34px;
    max-width: 95vw;
}

.panel {
    flex: 1 1 240px;
    max-width: 320px;
    padding: 18px 22px;
    text-align: center;
    background: var(--control-surface);
    border: 1px solid var(--control-border);
    border-radius: var(--radius-lg);
}

/* The bar is not a result, so it does not get a result's border. */
.panel-bar {
    border-style: dashed;
}

.panel-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.panel-figure {
    margin: 10px 0 8px;
    font-size: 1.5em;
    /* Tabular figures, so three panels side by side line up on the decimal
       point rather than on whatever width the digits happen to be. */
    font-variant-numeric: tabular-nums;
}

.panel-note {
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-dim);
}

.tally {
    color: var(--text-bright);
    font-weight: 300;
}

.rate {
    margin-left: 8px;
    font-weight: 600;
}

.better { color: var(--positive-deep); }
.worse  { color: var(--negative-deep); }
.neutral { color: var(--neutral); }

/* --- tables ------------------------------------------------------------ */

h2 {
    margin: 34px 0 14px;
    text-align: center;
    font-size: 1.35em;
    font-weight: 300;
    letter-spacing: 1px;
    color: var(--text-bright);
}

.tracker-table {
    margin: 0 auto 10px;
    border-collapse: collapse;
    background: var(--control-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    font-variant-numeric: tabular-nums;
}

.tracker-table th,
.tracker-table td {
    padding: 9px 16px;
    text-align: right;
    white-space: nowrap;
    color: var(--text-soft);
}

.tracker-table thead th {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--control-border);
}

.tracker-table tbody th[scope="row"],
.tracker-table .matchup-cell,
.tracker-table .date-cell {
    text-align: left;
    font-weight: 400;
    color: var(--text-bright);
}

.qualifier {
    font-size: 12px;
    color: var(--text-dim);
}

.footnote {
    max-width: 74ch;
    margin: 0 auto 8px;
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
    color: var(--text-dim);
}

.pending {
    color: var(--amber);
}

.season-link {
    color: var(--accent);
    text-decoration: none;
}

.season-link:hover {
    text-decoration: underline;
}

/* --- every pick -------------------------------------------------------- */

/* Its own scroller, so a narrow window scrolls the table and not the page.
   Eight columns of nowrap text is wider than a phone and there is no honest
   way to make it narrower: every column is a number somebody would check. */
.table-scroll {
    overflow-x: auto;
    max-width: 95vw;
    margin: 0 auto 20px;
}

.game-table {
    margin-bottom: 0;
    font-size: 13px;
}

.numeric {
    font-family: var(--font-mono);
}

.versus {
    margin: 0 5px;
    font-size: 11px;
    color: var(--text-dim);
}

/* The picked side, and the only place on the page a team name is coloured. A
   row that named both teams and marked neither would not be a record of what
   the model said -- a pick is a side, not a game. */
.pick-team {
    color: var(--gold);
    font-weight: 600;
}

.outcome {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.outcome-win  { color: var(--positive-deep); }
.outcome-loss { color: var(--negative-deep); }
.outcome-push { color: var(--neutral); }

@media (max-width: 768px) {
    .panel {
        flex-basis: 100%;
    }

    .tracker-table th,
    .tracker-table td {
        padding: 8px 10px;
    }
}
