:root {
    --black: #050505;
    --ink: #111111;
    --muted: #626262;
    --line: #dedede;
    --soft: #f5f5f3;
    --white: #ffffff;
    --gold: #d4af37;
    --gold-dark: #8c6800;
    --green: #17833d;
    --blue: #175aa8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding-top: 69px;
    color: var(--ink);
    background: var(--white);
    font-family: Arial, Helvetica, sans-serif;
}

a { color: inherit; }

.navbar {
    position: fixed;
    inset: 0 0 auto;
    z-index: 1000;
    min-height: 69px;
    padding: 16px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
}

.navbar-title {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 1px;
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav-links a {
    padding: 5px 0;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
    color: var(--gold-dark);
}

.nav-links a[aria-current="page"] {
    border-bottom: 2px solid var(--gold);
}

.page-width {
    width: min(1180px, 86%);
    margin-inline: auto;
}

.hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background:
        radial-gradient(circle at 82% 12%, rgba(212, 175, 55, 0.38), transparent 26%),
        linear-gradient(120deg, #050505 0%, #101010 66%, #231b05 100%);
    border-bottom: 5px solid var(--gold);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.48;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 42px 42px;
}

.hero-inner {
    position: relative;
    width: min(1180px, 86%);
    min-height: 450px;
    margin-inline: auto;
    padding: 80px 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 60px;
    align-items: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 20px;
    color: var(--gold);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.live-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #39d46d;
    box-shadow: 0 0 0 5px rgba(57, 212, 109, 0.14);
}

.hero h1 {
    max-width: 850px;
    margin: 0 0 22px;
    font-size: clamp(44px, 6vw, 78px);
    line-height: 0.96;
    letter-spacing: -2.5px;
}

.hero p {
    max-width: 760px;
    margin: 0;
    color: #d4d4d4;
    font-size: 19px;
    line-height: 1.65;
}

.hero-mark {
    aspect-ratio: 1;
    display: grid;
    place-content: center;
    border: 1px solid rgba(212, 175, 55, 0.5);
    border-radius: 50%;
    text-align: center;
    background: rgba(212, 175, 55, 0.08);
}

.hero-mark span {
    font-size: 76px;
    font-weight: 900;
    line-height: 0.8;
}

.hero-mark strong {
    margin-top: 15px;
    color: var(--gold);
    font-size: 14px;
    letter-spacing: 5px;
}

.championship-switcher {
    border-bottom: 1px solid var(--line);
    background: var(--black);
}

.championship-switcher-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.championship-switcher-inner > label {
    color: #bdbdbd;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.3px;
    text-transform: uppercase;
}

.championship-select-control {
    position: relative;
    width: min(100%, 360px);
}

.championship-select-control::after {
    position: absolute;
    top: 50%;
    right: 18px;
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--gold);
    border-bottom: 2px solid var(--gold);
    content: "";
    pointer-events: none;
    transform: translateY(-70%) rotate(45deg);
}

#championship-select {
    width: 100%;
    min-height: 48px;
    padding: 11px 48px 11px 16px;
    appearance: none;
    border: 1px solid #555;
    border-radius: 8px;
    color-scheme: dark;
    background: #171717;
    color: var(--white);
    cursor: pointer;
    font-size: 14px;
    font-weight: 900;
}

#championship-select:hover,
#championship-select:focus-visible {
    border-color: var(--gold);
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18);
}

.source-bar {
    border-bottom: 1px solid var(--line);
    background: #fff9e8;
}

.source-inner {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.source-inner p {
    margin: 0;
    color: #4e3b00;
    font-size: 14px;
}

.source-inner a {
    font-weight: 800;
    text-underline-offset: 3px;
}

.section {
    padding-block: 78px;
}

.section-heading {
    margin-bottom: 34px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 28px;
}

.section-heading small,
.official-cta small {
    display: block;
    margin-bottom: 10px;
    color: var(--gold-dark);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.section-heading h2,
.official-cta h2 {
    margin: 0;
    font-size: clamp(32px, 4vw, 52px);
    letter-spacing: -1.4px;
}

.section-heading p {
    max-width: 740px;
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.55;
}

.data-badge {
    flex: none;
    padding: 9px 12px;
    border: 1px solid #c9a333;
    border-radius: 999px;
    color: #604800;
    background: #fff7dc;
    font-size: 12px;
    font-weight: 900;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.metric-card {
    min-height: 138px;
    padding: 23px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--soft);
}

.metric-card span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.metric-card strong {
    font-size: clamp(22px, 2.4vw, 32px);
    line-height: 1.05;
}

.metric-card em {
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.loading-card {
    opacity: 0.72;
}

.section-dark {
    color: var(--white);
    background: var(--black);
}

.section-dark .section-heading small {
    color: var(--gold);
}

.highlight-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.highlight-card {
    padding: 30px;
    border: 1px solid #303030;
    border-radius: 22px;
    background: linear-gradient(145deg, #141414, #0a0a0a);
}

.highlight-card.upcoming {
    border-color: rgba(212, 175, 55, 0.5);
    background: linear-gradient(145deg, #1b170c, #0a0a0a);
}

.panel-label {
    display: block;
    margin-bottom: 16px;
    color: var(--gold);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.7px;
    text-transform: uppercase;
}

.highlight-card h3 {
    margin: 0 0 10px;
    font-size: clamp(27px, 3vw, 40px);
}

.highlight-card p {
    margin: 7px 0;
    color: #c9c9c9;
    line-height: 1.5;
}

.podium-list {
    margin: 24px 0 0;
    padding: 0;
    display: grid;
    gap: 8px;
    list-style: none;
}

.podium-list li {
    padding: 11px 13px;
    display: grid;
    grid-template-columns: 32px 1fr auto;
    gap: 10px;
    align-items: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
}

.podium-list b {
    color: var(--gold);
}

.podium-list time {
    color: #bdbdbd;
    font-family: "Courier New", monospace;
    font-size: 13px;
}

.text-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--gold);
    font-weight: 900;
    text-underline-offset: 4px;
}

.table-shell {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
}

.leaderboard {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard th,
.leaderboard td {
    padding: 17px 18px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

.leaderboard th {
    color: #ffffff;
    background: var(--black);
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.leaderboard tbody tr:last-child td {
    border-bottom: 0;
}

.leaderboard tbody tr:nth-child(even) {
    background: #fafafa;
}

.leaderboard td:first-child,
.leaderboard td:nth-child(n + 4) {
    font-variant-numeric: tabular-nums;
}

.driver-name {
    font-weight: 900;
}

.driver-number {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.rank-badge {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    font-weight: 900;
    background: #ececec;
}

.rank-badge.top-three {
    color: #322400;
    background: var(--gold);
}

.points-value {
    font-size: 18px;
    font-weight: 900;
}

.loading-row td,
.error-row td {
    padding: 34px;
    color: var(--muted);
    text-align: center;
}

.schedule-section {
    background: var(--soft);
}

.schedule-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.event-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--white);
}

.event-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
}

.round-label {
    display: block;
    margin-bottom: 6px;
    color: var(--gold-dark);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.1px;
    text-transform: uppercase;
}

.event-card h3 {
    margin: 0;
    font-size: 24px;
}

.status {
    flex: none;
    padding: 7px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.7px;
    text-transform: uppercase;
}

.status-completed {
    color: #145c2c;
    background: #dff6e6;
}

.status-live {
    color: #ffffff;
    background: var(--green);
}

.status-upcoming {
    color: #694e00;
    background: #fff2bf;
}

.event-meta {
    margin: 20px 0 0;
    padding: 0;
    display: grid;
    gap: 10px;
    list-style: none;
}

.event-meta li {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 12px;
    color: var(--muted);
    line-height: 1.4;
}

.event-meta strong {
    color: var(--ink);
}

.event-card .text-link {
    color: var(--gold-dark);
}

.official-cta {
    padding-block: 70px;
    color: var(--white);
    background:
        radial-gradient(circle at 90% 0%, rgba(212, 175, 55, 0.25), transparent 28%),
        #111111;
}

.official-cta small {
    color: var(--gold);
}

.official-cta h2 {
    max-width: 820px;
    font-size: clamp(30px, 4vw, 48px);
}

.official-cta p {
    max-width: 760px;
    margin: 16px 0 0;
    color: #d0d0d0;
    font-size: 16px;
    line-height: 1.7;
}

.official-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 42px;
    align-items: center;
}

.button {
    padding: 14px 18px;
    border: 2px solid var(--gold);
    border-radius: 8px;
    color: var(--black);
    background: var(--gold);
    font-weight: 900;
    text-align: center;
    text-decoration: none;
}

.footer {
    padding: 42px 7%;
    text-align: center;
    background: var(--white);
}

.footer p {
    margin: 6px 0;
    color: var(--muted);
}

.noscript {
    padding: 20px;
    color: #6c0000;
    background: #ffe6e6;
    text-align: center;
}

@media (max-width: 900px) {
    .hero-inner {
        grid-template-columns: 1fr;
    }

    .hero-mark {
        display: none;
    }

    .overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nav-links {
        gap: 14px;
    }
}

@media (max-width: 700px) {
    body {
        padding-top: 118px;
    }

    .navbar {
        min-height: 118px;
        padding: 13px 14px;
        flex-direction: column;
        justify-content: center;
        gap: 9px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 7px 13px;
    }

    .nav-links a {
        font-size: 13px;
    }

    .page-width,
    .hero-inner {
        width: min(100% - 30px, 1180px);
    }

    .hero-inner {
        min-height: 250px;
        padding: 42px 0 38px;
    }

    .hero h1 {
        font-size: 46px;
        letter-spacing: -1.7px;
    }

    .hero p {
        font-size: 17px;
    }

    .source-inner,
    .championship-switcher-inner,
    .section-heading,
    .official-inner {
        align-items: flex-start;
        flex-direction: column;
        display: flex;
    }

    .source-inner {
        padding-block: 10px;
        gap: 6px;
    }

    .championship-switcher-inner {
        min-height: 0;
        padding-block: 12px;
        gap: 8px;
    }

    .championship-select-control {
        width: 100%;
    }

    .section {
        padding-block: 42px;
    }

    .section-heading {
        margin-bottom: 22px;
        gap: 16px;
    }

    .section-heading h2,
    .official-cta h2 {
        font-size: 34px;
        line-height: 1.08;
        letter-spacing: -1px;
    }

    .section-heading p {
        margin-top: 9px;
    }

    .overview-grid,
    .highlight-grid,
    .schedule-grid {
        grid-template-columns: 1fr;
    }

    .metric-card {
        min-height: 104px;
        padding: 20px;
    }

    .highlight-card,
    .event-card {
        padding: 20px;
    }

    .official-cta {
        padding-block: 46px;
    }

    .footer {
        padding-block: 26px;
    }

    .table-shell {
        overflow: visible;
        border: 0;
    }

    .leaderboard,
    .leaderboard tbody,
    .leaderboard tr,
    .leaderboard td {
        display: block;
        width: 100%;
    }

    .leaderboard thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .leaderboard tbody {
        display: grid;
        gap: 13px;
    }

    .leaderboard tbody tr {
        padding: 10px 16px;
        border: 1px solid var(--line);
        border-radius: 16px;
        background: var(--white);
    }

    .leaderboard tbody tr:nth-child(even) {
        background: #fafafa;
    }

    .leaderboard td {
        min-height: 45px;
        padding: 10px 0;
        display: grid;
        grid-template-columns: 108px minmax(0, 1fr);
        gap: 14px;
        align-items: center;
        border-bottom: 1px solid var(--line);
    }

    .leaderboard td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 11px;
        font-weight: 900;
        letter-spacing: 0.8px;
        text-transform: uppercase;
    }

    .leaderboard tr td:last-child {
        border-bottom: 0;
    }

    .loading-row td,
    .error-row td {
        display: block;
        text-align: left;
    }

    .loading-row td::before,
    .error-row td::before {
        content: none;
    }

    .podium-list li {
        grid-template-columns: 28px 1fr;
    }

    .podium-list time {
        grid-column: 2;
    }

    .event-meta li {
        grid-template-columns: 92px 1fr;
    }

    .button {
        width: 100%;
    }
}

@media (max-width: 390px) {
    body {
        padding-top: 132px;
    }

    .navbar {
        min-height: 132px;
    }

    .hero h1 {
        font-size: 40px;
    }

    .overview-grid {
        grid-template-columns: 1fr;
    }
}
