body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: #fafafa;
    color: #1a1a1a;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

/* ---------- Layout primitives ---------- */

/* Any white rounded panel. Add .card to a new section and it just works. */
.card {
    width: 100%;
    max-width: fit-content;
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    padding: 24px;
}

/* Stacks cards automatically -- no manual margin-top needed per section */
.card + .card {
    margin-top: 16px;
}

/* ---------- Typography primitives ---------- */

/* Big title at the top of a card (matchup, upcoming-matchup, ...) */
.heading {
    margin: 0 0 4px;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Small uppercase eyebrow label above a heading */
.eyebrow {
    display: block;
    margin: 0 0 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #999;
}

/* Small muted metadata line: dates, venue, weather, broadcast info, etc. */
.meta {
    font-size: 0.85rem;
    color: #777;
}

/* Muted footnote-sized text (last-updated, disclaimers, ...) */
.fine-print {
    margin-top: 8px;
    font-size: 0.75rem;
    color: #999;
    text-align: center;
}

/* Large emphasized number/value (scores, big stats) */
.stat-value {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 4px;
}

/* label/value pair, stacked inline (used in the upcoming panel, reusable anywhere) */
.field-label {
    display: inline-block;
    min-width: 170px;
    max-width: fit-content;
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
}

.field-value {
    font-size: 0.85rem;
    color: #777;
}

/* ---------- Status badge ---------- */
/* Base .status class + a modifier decides color/behavior.
   New states (e.g. "postponed", "delayed") just need a new modifier rule. */
.status {
    margin-top: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
}

.status--live {
    color: #d64545;
}

.status--live::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border-radius: 50%;
    background: #d64545;
    animation: pulse 1.5s ease-in-out infinite;
}

.status--final {
    color: #999;
}

.status--scheduled {
    color: #b8860b;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ---------- Data table ---------- */
/* Any tabular data (not just the linescore) can reuse .data-table */
.data-table {
    width: 100%;
    margin-top: 16px;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.data-table th,
.data-table td {
    border: 1px solid #e2e2e2;
    padding: 4px 8px;
    text-align: center;
    min-width: 24px;
}

.data-table td:first-child {
    text-align: left;
    font-weight: 600;
    color: #999;
}

/* Row state modifiers -- reusable on any .data-table row */
.data-table tr.is-active {
    background-color: #fff8e1;
}
.data-table tr.is-active td:first-child::after {
    content: " ▲";
}

.data-table tr.is-winner td:first-child {
    color: #1a1a1a;
}
.data-table tr.is-winner td:first-child::after {
    content: " ✓";
    color: #2e7d32;
    font-weight: 700;
}

/* ---------- Accessibility utility ---------- */
/* Keeps content available to screen readers without showing it visually */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Bases diamond ---------- */
#bases rect.occupied {
    fill: #d4af37;
    stroke: #b8860b;
}