/* Formula 1 side — leans on the shared tokens from style.css
   (--ink, --dark, --cream, --gold, --brown, --card-border, --text-muted). */

/* ── Hero (next race) ─────────────────────────────────────────────── */
.f1-hero {
    background: linear-gradient(160deg, #1a1714 0%, var(--dark) 70%);
    border: 1px solid var(--card-border);
    border-left: 3px solid var(--gold);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
}
.f1-hero-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.f1-round {
    font: 600 11px/1 'Archivo', sans-serif; letter-spacing: .14em;
    text-transform: uppercase; color: var(--text-muted);
}
.f1-hero-name {
    font: 600 30px/1.05 'Bodoni Moda', serif; color: var(--cream);
    margin: 2px 0 4px;
}
.f1-hero-when { color: var(--gold); font: 500 14px/1.3 'Archivo', sans-serif; margin: 0 0 16px; }
.f1-hero-sessions { list-style: none; margin: 0 0 16px; padding: 0; }
.f1-hero-sessions li,
.f1-sessions li {
    display: flex; justify-content: space-between; align-items: center;
    padding: 9px 0; border-bottom: 1px solid var(--border-soft);
    font: 400 14px/1.2 'Archivo', sans-serif; color: var(--cream);
}
.f1-hero-sessions li:last-child, .f1-sessions li:last-child { border-bottom: 0; }
.f1-sess-label { font-weight: 500; display: flex; align-items: center; gap: 8px; }
.f1-sess-time { color: var(--text-muted); font-size: 13px; }
.f1-hero-sessions li.post, .f1-sessions li.post { opacity: .5; }
.f1-hero-sessions li.live .f1-sess-label, .f1-sessions li.live .f1-sess-label { color: var(--gold); }

.f1-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.f1-btn {
    flex: 1; min-width: 130px; text-align: center; text-decoration: none;
    padding: 11px 14px; border-radius: var(--radius);
    font: 600 13px/1 'Archivo', sans-serif; letter-spacing: .02em;
    background: rgba(236,231,221,.06); color: var(--cream);
    border: 1px solid var(--card-border); transition: background .15s;
}
.f1-btn:hover { background: rgba(236,231,221,.12); }
.f1-btn.dk { background: var(--gold); color: var(--on-gold); border-color: var(--gold); }
.f1-btn.dk:hover { background: var(--brown); }
.f1-btn.wide { display: block; width: 100%; }

/* ── Badges ───────────────────────────────────────────────────────── */
.f1-badge {
    font: 600 10px/1 'Archivo', sans-serif; letter-spacing: .1em;
    text-transform: uppercase; padding: 4px 8px; border-radius: 999px;
    background: rgba(236,231,221,.08); color: var(--text-muted);
    display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
}
.f1-badge.done { color: var(--text-dim); }
.f1-badge.live { background: rgba(216,179,90,.16); color: var(--gold); }
.f1-dot {
    width: 6px; height: 6px; border-radius: 50%; background: var(--gold);
    animation: f1pulse 1.4s infinite;
}
@keyframes f1pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

/* ── Leader cards ─────────────────────────────────────────────────── */
.f1-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.f1-card {
    background: var(--card-bg); border: 1px solid var(--card-border);
    border-radius: var(--radius-lg); padding: 14px 16px;
}
.f1-card-title {
    font: 600 10px/1 'Archivo', sans-serif; letter-spacing: .12em;
    text-transform: uppercase; color: var(--text-muted); margin: 0 0 10px;
}
.f1-leader { display: flex; align-items: center; gap: 9px; margin-bottom: 4px; }
.f1-leader-name { font: 600 16px/1.15 'Bodoni Moda', serif; color: var(--cream); }
.f1-leader-pts { font: 500 13px 'Archivo', sans-serif; color: var(--gold); }
@media (max-width: 460px) { .f1-cards { grid-template-columns: 1fr; } }

/* ── Sections ─────────────────────────────────────────────────────── */
.f1-section { margin-bottom: 22px; }
.f1-section-title {
    font: 600 11px/1 'Archivo', sans-serif; letter-spacing: .12em;
    text-transform: uppercase; color: var(--text-muted);
    margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border-soft);
}

/* ── Podium ───────────────────────────────────────────────────────── */
.f1-podium { list-style: none; margin: 0 0 10px; padding: 0; }
.f1-podium li {
    display: flex; align-items: center; gap: 10px; padding: 8px 0;
    font: 500 15px 'Archivo', sans-serif; color: var(--cream);
}
.f1-podium .f1-pos {
    width: 22px; height: 22px; border-radius: 50%; flex: none;
    display: grid; place-items: center; font: 700 12px 'Archivo', sans-serif;
    background: rgba(236,231,221,.08); color: var(--text-muted);
}
.f1-podium .pos1 .f1-pos { background: var(--gold); color: var(--on-gold); }
.f1-podium .pos2 .f1-pos { background: #c9c9c4; color: #14110c; }
.f1-podium .pos3 .f1-pos { background: #cd9b66; color: #14110c; }
.f1-podium.mini li { font-size: 13px; padding: 4px 0; }
.f1-podium.mini .f1-pos { width: 18px; height: 18px; font-size: 10px; }

/* ── Schedule ─────────────────────────────────────────────────────── */
.f1-schedule { display: flex; flex-direction: column; gap: 8px; }
.f1-race-row {
    background: var(--card-bg); border: 1px solid var(--card-border);
    border-radius: var(--radius-lg); overflow: hidden;
}
.f1-race-row.post { opacity: .62; }
.f1-race-row.live { border-color: var(--gold); }
.f1-race-row summary {
    display: flex; align-items: center; gap: 12px; padding: 13px 15px;
    cursor: pointer; list-style: none;
}
.f1-race-row summary::-webkit-details-marker { display: none; }
.f1-rnd {
    width: 26px; height: 26px; flex: none; border-radius: 50%;
    display: grid; place-items: center; background: rgba(236,231,221,.07);
    font: 700 12px 'Archivo', sans-serif; color: var(--gold);
}
.f1-race-main { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.f1-race-name { font: 600 15px/1.15 'Bodoni Moda', serif; color: var(--cream); }
.f1-race-when { font: 400 12px 'Archivo', sans-serif; color: var(--text-muted); }
.f1-sessions { list-style: none; margin: 0; padding: 0 15px 12px; }
.f1-sessions.detail { padding: 0; }
.f1-link {
    display: inline-block; margin: 0 15px 14px; font: 600 12px 'Archivo', sans-serif;
    color: var(--gold); text-decoration: none;
}
.f1-link:hover { text-decoration: underline; }

/* ── Tables (standings + classification) ──────────────────────────── */
.f1-table { width: 100%; border-collapse: collapse; }
.f1-table th {
    text-align: left; font: 600 10px/1 'Archivo', sans-serif; letter-spacing: .1em;
    text-transform: uppercase; color: var(--text-dim);
    padding: 8px 10px; border-bottom: 1px solid var(--card-border);
}
.f1-table th.num, .f1-table td.num { text-align: right; }
.f1-table td { padding: 11px 10px; border-bottom: 1px solid var(--border-soft);
    font: 400 14px 'Archivo', sans-serif; color: var(--cream); }
.f1-rank { color: var(--text-muted); font-weight: 600; width: 36px; }
.f1-driver { display: flex; align-items: center; gap: 10px; }
.f1-pts { font-weight: 600; color: var(--gold); }
.f1-table tr.f1-winner td { background: rgba(216,179,90,.08); }

/* shared flag / logo chips */
.f1-flag, .f1-logo { width: 22px; height: 16px; object-fit: cover; border-radius: 2px; flex: none; }
.f1-logo { object-fit: contain; background: transparent; }

/* ── Race detail: circuit, highlights, richer result table ─────────── */
.f1-circuit { margin: 4px 0 0; font: 400 13px 'Archivo', sans-serif; color: var(--text-muted); }

.f1-highlights {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
}
.f1-hl {
    display: flex; flex-direction: column; gap: 2px;
    background: var(--card-bg); border: 1px solid var(--border-soft);
    border-radius: 12px; padding: 10px 12px; min-width: 0;
}
.f1-hl-k { font: 600 9px/1 'Archivo', sans-serif; letter-spacing: .1em;
    text-transform: uppercase; color: var(--text-dim); }
.f1-hl-v { font: 600 14px 'Archivo', sans-serif; color: var(--cream);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f1-hl-sub { font-size: 11px; color: var(--gold); }

/* compact 6-column result table for narrow screens */
.f1-result td, .f1-result th { padding: 9px 6px; font-size: 13px; }
.f1-result td.num { font-variant-numeric: tabular-nums; }
.f1-result .f1-rank, .f1-qual .f1-rank { width: 30px; }
.f1-result .f1-driver { gap: 7px; min-width: 0; max-width: 150px; }
.f1-result .f1-driver span {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.f1-up { color: #3fae7a; font-weight: 600; }
.f1-down { color: #d06b6b; font-weight: 600; }
.f1-dim { color: var(--text-muted); }

/* ── Tabs ─────────────────────────────────────────────────────────── */
.f1-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.f1-tab {
    flex: 1; padding: 10px; background: var(--card-bg);
    border: 1px solid var(--card-border); border-radius: var(--radius);
    font: 600 13px 'Archivo', sans-serif; color: var(--text-muted); cursor: pointer;
    transition: all .15s;
}
.f1-tab.active { background: var(--gold); color: var(--on-gold); border-color: var(--gold); }

/* ── Results grid ─────────────────────────────────────────────────── */
.f1-results { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.f1-result-card {
    display: block; text-decoration: none; background: var(--card-bg);
    border: 1px solid var(--card-border); border-radius: var(--radius-lg);
    padding: 14px;
}
.f1-result-card:hover { border-color: var(--gold); }
.f1-result-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.f1-result-head .f1-race-name { font-size: 14px; flex: 1; }
.f1-result-head .f1-race-when { font-size: 11px; }
@media (max-width: 540px) { .f1-results { grid-template-columns: 1fr; } }

/* ── Sport switcher (in the sidebar + bottom bar) ─────────────────── */
.sport-switch { display: flex; gap: 4px; padding: 0 16px 14px; }
.sport-switch a {
    flex: 1; text-align: center; text-decoration: none; padding: 7px 0;
    border-radius: var(--radius); font: 600 12px 'Archivo', sans-serif;
    color: var(--text-muted); background: rgba(236,231,221,.05);
    border: 1px solid var(--card-border);
}
.sport-switch a.on { background: var(--gold); color: var(--on-gold); border-color: var(--gold); }
