/* =========================================
   RESC ARCHIVES STYLESHEET
   Deep Blue Theme with Standard F1 Blue Accents
   (Gold Accents Reserved Exclusively for Champions)
   ========================================= */

:root {
    --arc-bg: #060b19;
    --arc-surface: #0a1329;
    --arc-card: #0f1c3d;
    --arc-card-hover: #14244e;
    --arc-border: rgba(255, 255, 255, 0.08);
    
    /* Standard F1 Blue Accents */
    --arc-blue: #2563eb;
    --arc-blue-light: #60a5fa;
    --arc-blue-dark: #1d4ed8;
    --arc-blue-glow: rgba(37, 99, 235, 0.25);
    --arc-border-blue: rgba(37, 99, 235, 0.35);

    /* Gold Accents - ONLY for Champion Section */
    --arc-gold: #f59e0b;
    --arc-gold-light: #fde047;
    --arc-gold-dark: #b45309;
    --arc-gold-gradient: linear-gradient(135deg, #fef08a 0%, #f59e0b 50%, #b45309 100%);
    --arc-gold-glow: rgba(245, 158, 11, 0.25);
    --arc-border-gold: rgba(245, 158, 11, 0.35);

    --text-white: #ffffff;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --text-danger: #ef4444;
}

body.archives-body {
    background-color: var(--arc-bg);
    color: var(--text-white);
    font-family: var(--font-body);
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Ensure navbar is pinned full-width */
#main-header {
    left: 0;
    right: 0;
}

/* --- Ambient Glow (Deep Blue) --- */
.bg-ambient-glow {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.orb-blue-1 {
    position: absolute;
    top: -10%;
    left: 20%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.16) 0%, transparent 70%);
    pointer-events: none;
}

.orb-blue-2 {
    position: absolute;
    top: 35%;
    right: -5%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(29, 78, 216, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

/* --- Main Layout Wrapper --- */
#resc_archives_content {
    position: relative;
    z-index: 1;
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    padding: 120px 2rem 5rem 2rem;
    box-sizing: border-box;
}

/* --- Season Transition Animation --- */
.archive-dashboard-layout {
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.archive-dashboard-layout.fade-out {
    opacity: 0;
    transform: scale(0.985);
    pointer-events: none;
}

.archive-dashboard-layout.fade-in {
    opacity: 1;
    transform: scale(1);
}

/* =========================================
   HERO HEADER & SEASON SWITCHER
   ========================================= */

.archives-hero-header {
    margin-bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    border-bottom: 1px solid var(--arc-border);
    padding-bottom: 2rem;
}

.heritage-tag {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--arc-blue-light);
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid var(--arc-border-blue);
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    margin-bottom: 0.75rem;
}

.archives-main-title {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-style: italic;
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1.1;
    margin: 0 0 0.5rem 0;
}

.accent-blue {
    color: var(--arc-blue);
    display: inline-block;
}

.accent-blue-text {
    color: var(--arc-blue-light);
}

.archives-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 720px;
    margin: 0;
    line-height: 1.5;
}

/* Season Switcher Bar */
.season-switcher-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    background: rgba(10, 19, 41, 0.75);
    backdrop-filter: blur(12px);
    border: 1px solid var(--arc-border);
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
}

.season-switcher-label {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.season-pills-list {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.season-pill-btn {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    text-transform: uppercase;
    padding: 0.5rem 1.1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--arc-border);
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.season-pill-btn:hover {
    background: rgba(37, 99, 235, 0.12);
    border-color: var(--arc-border-blue);
    color: var(--text-white);
}

.season-pill-btn.active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.25) 0%, rgba(29, 78, 216, 0.3) 100%);
    border-color: var(--arc-blue);
    color: var(--text-white);
    box-shadow: 0 0 16px var(--arc-blue-glow);
    font-weight: 700;
}

.season-mobile-select-wrap {
    display: none;
}

.custom-blue-select {
    background: var(--arc-surface);
    border: 1px solid var(--arc-border-blue);
    color: var(--text-white);
    padding: 0.55rem 1rem;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

.custom-blue-select:focus {
    border-color: var(--arc-blue);
    box-shadow: 0 0 10px var(--arc-blue-glow);
}

.custom-blue-select.select-compact {
    padding: 0.45rem 0.85rem;
    font-size: 0.82rem;
}

.btn-return-home {
    margin-left: auto;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.5rem 0.9rem;
    border: 1px solid var(--arc-border);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-return-home:hover {
    color: var(--arc-blue-light);
    border-color: var(--arc-blue);
    background: rgba(37, 99, 235, 0.1);
}

/* =========================================
   NO ARCHIVES FALLBACK
   ========================================= */

.no-archive-card {
    text-align: center;
    padding: 5rem 2rem;
    background: var(--arc-surface);
    border: 1px solid var(--arc-border);
    border-radius: 16px;
    max-width: 600px;
    margin: 3rem auto;
}

.no-archive-logo {
    width: 130px;
    height: auto;
    margin-bottom: 1.5rem;
}

.no-archive-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.no-archive-desc {
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* =========================================
   CHAMPIONS SHOWCASE (PRESERVES GOLD ACCENTS)
   ========================================= */

.champions-showcase-section {
    margin-bottom: 2.5rem;
}

.section-gold-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.gold-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--arc-border-gold), transparent);
}

.section-gold-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--arc-gold-light);
    white-space: nowrap;
}

/* Champion Cards Fixed Uniform Format */
.champions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 360px));
    justify-content: center;
    gap: 1.5rem;
}

.champion-card {
    background: linear-gradient(135deg, rgba(15, 28, 61, 0.9) 0%, rgba(10, 19, 41, 0.95) 100%);
    border: 1px solid var(--arc-border-gold);
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(245, 158, 11, 0.08);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    min-height: 290px;
    animation: cardEntrance 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
    cursor: pointer;
}

.champion-card:hover {
    transform: translateY(-4px);
    border-color: var(--arc-gold);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 25px var(--arc-gold-glow);
}

.champion-card:hover .champ-driver-name {
    color: var(--arc-gold-light);
    text-decoration: underline;
}

.champ-card-banner {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.25) 0%, transparent 100%);
    border-bottom: 1px solid var(--arc-border-gold);
    padding: 0.6rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.champ-badge {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--arc-gold);
    font-weight: 800;
    letter-spacing: 1px;
}

.champ-cat-tag {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    color: var(--text-white);
}

.champ-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
}

.champ-visual-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: 95px;
}

.champ-car-wrapper {
    flex: 1;
    height: 95px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.champ-car-img {
    max-width: 100%;
    max-height: 90px;
    object-fit: contain;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.6));
}

.champ-number {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-style: italic;
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--arc-gold);
    opacity: 0.6;
    line-height: 1;
}

.champ-identity {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.champ-driver-name {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-style: italic;
    text-transform: uppercase;
    color: var(--text-white);
    margin: 0;
    text-decoration: none;
    transition: color 0.2s;
}

a.champ-driver-name:hover {
    color: var(--arc-gold);
}

.champ-team-name {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

.champ-stats-row {
    margin-top: auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.champ-stat-mini {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.champ-stat-lbl {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--text-dim);
    font-weight: 700;
}

.champ-stat-val {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-white);
}

.champ-stat-val.gold {
    color: var(--arc-gold);
}

/* Explicit Section Divider */
.champions-section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.4), var(--arc-border-gold), rgba(37, 99, 235, 0.4), transparent);
    margin-top: 2.5rem;
    box-shadow: 0 1px 8px var(--arc-blue-glow);
}

/* =========================================
   INTERACTIVE COCKPIT LAYOUT
   ========================================= */

.archive-cockpit-layout {
    display: grid;
    grid-template-columns: 315px 1fr;
    gap: 2rem;
    align-items: stretch;
    transition: all 0.25s ease;
}

.archive-cockpit-layout.mode-full {
    display: block;
    width: 100%;
}

.archive-cockpit-layout.mode-full #cockpit_rounds_column {
    display: none !important;
}

.archive-cockpit-layout.mode-full .cockpit-content-column {
    width: 100%;
    max-width: 100%;
}

/* --- Left Column: Rounds Timeline --- */
.cockpit-rounds-column {
    position: relative;
    transition: opacity 0.25s, transform 0.25s;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.column-sticky-box {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    height: 100%;
    min-height: 0;
}

.timeline-header {
    background: var(--arc-surface);
    border: 1px solid var(--arc-border);
    border-radius: 12px;
    padding: 1.2rem;
    flex-shrink: 0;
}

.timeline-heading {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    text-transform: uppercase;
    color: var(--text-white);
    margin: 0 0 0.35rem 0;
}

.timeline-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

.timeline-hint {
    font-size: 0.72rem;
    color: #60a5fa;
    margin: 0.4rem 0 0 0;
    line-height: 1.35;
    font-style: italic;
}

/* --- Ultra Sleek & Discreet Custom Scrollbars --- */
*::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background: rgba(37, 99, 235, 0.25);
    border-radius: 999px;
    transition: background-color 0.2s ease;
}

*::-webkit-scrollbar-thumb:hover {
    background: rgba(96, 165, 250, 0.6);
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(37, 99, 235, 0.25) transparent;
}

/* Rounds Cards List - Expands down to bottom of graph */
.rounds-cards-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.35rem;
}

.rounds-cards-list::-webkit-scrollbar {
    width: 4px;
}
.rounds-cards-list::-webkit-scrollbar-thumb {
    background: var(--arc-border-blue);
    border-radius: 4px;
}

.round-card-item {
    background: var(--arc-surface);
    border: 1px solid var(--arc-border);
    border-radius: 10px;
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.round-card-item:hover {
    border-color: rgba(37, 99, 235, 0.5);
    background: var(--arc-card);
}

.round-card-item.selected-round {
    border-color: var(--arc-blue);
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.18) 0%, var(--arc-card) 100%);
    box-shadow: 0 0 14px var(--arc-blue-glow);
}

.round-card-item.dimmed-round {
    opacity: 0.45;
}

.round-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.round-tag-badge {
    font-family: var(--font-heading);
    font-size: 0.72rem;
    background: rgba(37, 99, 235, 0.2);
    border: 1px solid rgba(37, 99, 235, 0.4);
    color: #93c5fd;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-weight: 800;
}

.round-date {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.round-name-row {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.round-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: var(--text-white);
    margin: 0;
    line-height: 1.25;
}

.round-circuit {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

.round-winners-stack {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.2rem;
}

.round-winners-stack .round-winner-pill {
    margin-top: 0;
}

.round-winner-pill {
    font-size: 0.72rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.35);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.2rem;
}

.round-winner-pill strong {
    color: var(--arc-blue-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.round-winner-cat-badge {
    font-size: 0.62rem;
    padding: 0.12rem 0.45rem;
    font-weight: 800;
    line-height: 1.15;
    border-radius: 3px;
    text-transform: uppercase;
    font-family: var(--font-heading);
    letter-spacing: 0.4px;
    flex-shrink: 0;
}

.round-card-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.2rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-open-results {
    font-size: 0.72rem;
    font-weight: 700;
    color: #93c5fd;
    background: rgba(37, 99, 235, 0.12);
    border: 1px solid rgba(37, 99, 235, 0.3);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
}

.btn-open-results:hover {
    color: #ffffff;
    background: rgba(37, 99, 235, 0.3);
    border-color: var(--arc-blue);
}

/* --- Right Column: Content Toolbar & Panes --- */
.cockpit-content-column {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    min-width: 0;
}

/* Full Width Panel Selection & Category Toolbar */
.fullwidth-toolbar-container {
    width: 100%;
    height: 64px;
    min-height: 64px;
    max-height: 64px;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 1.25rem;
    background: rgba(10, 19, 41, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid var(--arc-border);
    border-radius: 14px;
    padding: 0 1.4rem;
    margin-bottom: 1.75rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.view-tabs-group {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: nowrap;
    flex: 1;
}

.view-tab-btn {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.55rem 1.25rem;
    background: transparent;
    border: 1.5px solid transparent;
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.view-tab-btn:hover {
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.05);
}

.view-tab-btn.active {
    background: rgba(37, 99, 235, 0.15);
    border-color: var(--arc-blue-light);
    color: #93c5fd;
    font-weight: 700;
    box-shadow: 0 0 16px rgba(37, 99, 235, 0.25);
}

.category-filter-group {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 290px;
    min-width: 290px;
    max-width: 290px;
    justify-content: flex-end;
    flex-shrink: 0;
    box-sizing: border-box;
}

.category-filter-group .custom-blue-select {
    width: 200px;
    min-width: 200px;
    max-width: 200px;
    height: 38px;
    box-sizing: border-box;
}

.filter-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Scrubber Notice Banner */
.scrubber-notice-banner {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.18) 0%, rgba(10, 19, 41, 0.9) 100%);
    border: 1px solid var(--arc-border-blue);
    border-radius: 10px;
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    animation: dashboardFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.notice-text {
    flex: 1;
    color: var(--text-white);
    line-height: 1.4;
}

.btn-banner-reset {
    background: var(--arc-blue);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    border: none;
    border-radius: 6px;
    padding: 0.45rem 0.9rem;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.15s, background-color 0.2s;
}

.btn-banner-reset:hover {
    transform: scale(1.04);
    background: var(--arc-blue-light);
}

/* Keyframes for Component Entrance Animations */
@keyframes dashboardFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Panes Animated Smooth Transitions */
.cockpit-pane {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.22s cubic-bezier(0.4, 0, 0.2, 1), transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.cockpit-pane.fade-switching {
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
}

/* =========================================
   PANE 1: STANDINGS TABLES PER CATEGORY
   ========================================= */

.standings-tables-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.category-standing-block {
    background: var(--arc-surface);
    border: 1px solid var(--arc-border);
    border-radius: 12px;
    overflow: hidden;
}

.category-block-header {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.15) 0%, transparent 100%);
    border-bottom: 1px solid var(--arc-border);
    padding: 0.85rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cat-block-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    text-transform: uppercase;
    color: var(--text-white);
    margin: 0;
    letter-spacing: 0.5px;
}

.cat-block-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.table-responsive-wrapper {
    width: 100%;
    overflow-x: auto;
}

.f1-archive-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.f1-archive-table th {
    background: rgba(0, 0, 0, 0.35);
    font-family: var(--font-heading);
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--arc-border);
    white-space: nowrap;
}

.f1-archive-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.9rem;
    vertical-align: middle;
}

.f1-archive-table tr:hover td {
    background: rgba(255, 255, 255, 0.025);
}

.clickable-driver-row {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.clickable-driver-row:hover td {
    background: rgba(37, 99, 235, 0.12) !important;
}

.clickable-driver-row:hover .driver-name-link {
    color: var(--arc-blue-light) !important;
    text-decoration: underline !important;
}

/* Table Columns */
.td-pos {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-style: italic;
    font-weight: 800;
    color: var(--text-muted);
    width: 50px;
}

.td-pos.pos-1 { color: #f59e0b; }
.td-pos.pos-2 { color: #cbd5e1; }
.td-pos.pos-3 { color: #d97706; }

.td-num {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-style: italic;
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 1px #fff;
    width: 50px;
}

/* Full Car Image In Standings Table */
.table-car-img {
    width: 72px;
    height: 36px;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    padding: 2px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.driver-cell-wrap {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.driver-name-link {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-white);
    text-decoration: none;
    transition: color 0.2s;
}

.driver-name-link:hover {
    color: var(--arc-blue-light);
    text-decoration: underline;
}

.team-cell-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.team-title {
    font-size: 0.88rem;
    color: var(--text-white);
    font-weight: 600;
}

.car-model-name {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.cat-pill {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-weight: 800;
    display: inline-block;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cat-Hypercar { background: rgba(239, 68, 68, 0.15); border-color: rgba(239, 68, 68, 0.4); color: #fca5a5; }
.cat-LMGT3 { background: rgba(59, 130, 246, 0.15); border-color: rgba(59, 130, 246, 0.4); color: #93c5fd; }
.cat-LMP2 { background: rgba(16, 185, 129, 0.15); border-color: rgba(16, 185, 129, 0.4); color: #6ee7b7; }

.td-pts {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 900;
    font-style: italic;
    color: var(--arc-blue-light);
    transition: color 0.25s ease, transform 0.25s ease;
}

.td-stat-num {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-white);
    transition: color 0.25s ease;
}

.td-license-badge {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 800;
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.td-license-badge.dsq {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
}

/* =========================================
   PROGRESSION EVOLUTION CHART CARD
   ========================================= */

.progression-chart-card {
    background: var(--arc-surface);
    border: 1px solid var(--arc-border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    overflow: hidden;
}

.chart-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.chart-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    text-transform: uppercase;
    color: var(--text-white);
    margin: 0 0 0.25rem 0;
}

.chart-subtitle {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0;
}

.chart-legend-badge {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    background: rgba(37, 99, 235, 0.15);
    border: 1px solid var(--arc-border-blue);
    color: #93c5fd;
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    text-transform: uppercase;
}

.chart-interactive-hint {
    font-size: 0.75rem;
    color: var(--arc-blue-light);
    font-style: italic;
    margin-top: 0.35rem;
    display: inline-block;
}

.chart-canvas-wrapper {
    position: relative;
    width: 100%;
    height: 340px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.5rem;
    cursor: pointer;
}

#progression_chart_canvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: pointer;
}

.chart-interactive-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.chart-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.chart-legend-item:hover,
.chart-legend-item.highlighted {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-white);
    border-color: rgba(255, 255, 255, 0.25);
}

.legend-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* =========================================
   PANE 2: DRIVERS GRID PER CATEGORY
   ========================================= */

.archive-drivers-container {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.category-drivers-section {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.category-drivers-heading {
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--arc-border);
    padding-bottom: 0.75rem;
}

.cat-sec-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    text-transform: uppercase;
    color: var(--text-white);
    margin: 0;
}

.archive-drivers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.driver-archive-card {
    background: var(--arc-surface);
    border: 1px solid var(--arc-border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.driver-archive-card:hover {
    transform: translateY(-4px);
    border-color: var(--arc-border-blue);
    background: var(--arc-card);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.drv-card-visual {
    height: 135px;
    background: linear-gradient(180deg, rgba(15, 28, 61, 0.6) 0%, rgba(10, 19, 41, 0.9) 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.drv-bg-number {
    position: absolute;
    top: 5px;
    left: 12px;
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-style: italic;
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.1);
    line-height: 1;
    pointer-events: none;
}

.drv-car-img {
    max-width: 90%;
    max-height: 95px;
    object-fit: contain;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.5));
}

.drv-cat-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
}

.drv-card-info {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.drv-name {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-style: italic;
    text-transform: uppercase;
    color: var(--text-white);
    margin: 0;
}

.drv-team {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

.drv-stats-mini-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 6px;
    padding: 0.5rem;
    text-align: center;
    margin-top: auto;
}

.btn-driver-profile {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--arc-border);
    padding: 0.6rem;
    border-radius: 6px;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s;
    margin-top: 0.5rem;
}

.btn-driver-profile:hover {
    background: var(--arc-blue);
    color: #fff;
    border-color: var(--arc-blue);
    font-weight: 700;
}

/* =========================================
   PANE 3: SEASON STATISTICS DASHBOARD
   ========================================= */

.season-analytics-dashboard {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.stats-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
}

.kpi-card {
    background: var(--arc-surface);
    border: 1px solid var(--arc-border);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    border-top: 3px solid var(--arc-blue);
    animation: cardEntrance 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.kpi-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.kpi-value {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-style: italic;
    font-weight: 900;
    line-height: 1.1;
}

.stats-records-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.record-card {
    background: linear-gradient(135deg, rgba(15, 28, 61, 0.6) 0%, rgba(10, 19, 41, 0.9) 100%);
    border: 1px solid var(--arc-border-blue);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    animation: cardEntrance 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.rec-card-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.rec-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
}

.rec-number {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-style: italic;
    font-weight: 900;
    color: var(--arc-blue-light);
}

.rec-holder {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    color: var(--text-white);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rec-caption {
    font-size: 0.72rem;
    color: var(--text-dim);
    margin-top: 0.25rem;
}

.stats-insights-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.insight-panel {
    background: var(--arc-surface);
    border: 1px solid var(--arc-border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    animation: cardEntrance 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.insight-panel-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    text-transform: uppercase;
    color: var(--text-white);
    margin: 0;
    border-bottom: 1px solid var(--arc-border);
    padding-bottom: 0.75rem;
}

.insight-metrics-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.insight-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    padding-bottom: 0.65rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.insight-row strong {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--text-white);
}

.text-danger {
    color: var(--text-danger) !important;
}

.constructors-stats-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.constructor-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.25);
    padding: 0.65rem 0.9rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.const-name {
    font-weight: 700;
    color: var(--text-white);
}

.const-counts {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* =========================================
   RACE RESULTS & PENALTIES MODAL
   ========================================= */

.results-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: dashboardFadeIn 0.25s ease;
}

.results-modal-container {
    background: var(--arc-surface);
    border: 1px solid var(--arc-border-blue);
    border-radius: 16px;
    max-width: 980px;
    width: 100%;
    height: 75vh;
    min-height: 520px;
    max-height: 85vh;
    overflow: hidden;
    position: relative;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px var(--arc-blue-glow);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    box-sizing: border-box;
}

.modal-close-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--arc-border);
    color: var(--text-white);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.modal-close-btn:hover {
    background: #ef4444;
    border-color: #ef4444;
}

.modal-header {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    border-bottom: 1px solid var(--arc-border);
    padding-bottom: 1rem;
}

.modal-badge-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.modal-round-tag {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    background: var(--arc-blue);
    color: #fff;
    font-weight: 800;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.modal-date-tag {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.modal-event-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    text-transform: uppercase;
    font-style: italic;
    margin: 0;
}

.modal-circuit-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
}

.modal-subtabs {
    flex-shrink: 0;
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--arc-border);
    padding-bottom: 0.5rem;
}

.modal-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    text-transform: uppercase;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-tab-btn:hover {
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.04);
}

.modal-tab-btn.active {
    background: var(--arc-card);
    border: 1px solid var(--arc-border-blue);
    color: var(--arc-blue-light);
    font-weight: 700;
}

.modal-tab-pane {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.modal-tab-pane.hidden {
    display: none !important;
}

/* Category separator row inside the modal results table */
.modal-cat-divider-row td {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.18) 0%, rgba(10, 19, 41, 0.8) 100%) !important;
    border-top: 1px solid var(--arc-border-blue) !important;
    border-bottom: 1px solid var(--arc-border-blue) !important;
    padding: 0.65rem 1rem !important;
}

.modal-cat-divider-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-cat-divider-title {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--arc-blue-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-cat-divider-count {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.f1-modal-table {
    width: 100%;
    border-collapse: collapse;
}

.f1-modal-table th {
    background: rgba(0, 0, 0, 0.4);
    font-family: var(--font-heading);
    font-size: 0.72rem;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0.75rem 0.85rem;
    border-bottom: 1px solid var(--arc-border);
}

.f1-modal-table td {
    padding: 0.75rem 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.85rem;
}

.modal-empty-note {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-dim);
    font-size: 0.95rem;
}

.penalties-cards-container {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.penalty-card {
    background: rgba(0, 0, 0, 0.3);
    border-left: 4px solid #ef4444;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.penalty-header-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.penalty-resp-name {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: #ef4444;
    text-transform: uppercase;
}

.penalty-timecode {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
}

.penalty-reason {
    font-size: 0.9rem;
    color: var(--text-white);
    line-height: 1.4;
}

.penalty-points-line {
    display: flex;
    gap: 1.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.pen-val {
    color: #ef4444;
    font-weight: 700;
}

/* =========================================
   MOBILE PC-ONLY FALLBACK NOTICE & RESPONSIVENESS
   ========================================= */

.mobile-pc-only-notice {
    display: none;
    background: linear-gradient(135deg, rgba(15, 28, 61, 0.95) 0%, rgba(10, 19, 41, 0.98) 100%);
    border: 1px solid var(--arc-border-blue);
    border-radius: 16px;
    padding: 3rem 1.75rem;
    text-align: center;
    margin: 2.5rem auto;
    max-width: 480px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(37, 99, 235, 0.15);
}

.mobile-notice-icon {
    color: var(--arc-blue-light);
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: center;
}

.mobile-notice-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    text-transform: uppercase;
    color: var(--text-white);
    margin: 0 0 0.85rem 0;
    letter-spacing: 0.5px;
}

.mobile-notice-desc {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.6;
    margin: 0 0 1.75rem 0;
}

.btn-mobile-return {
    display: inline-block;
    background: linear-gradient(135deg, var(--arc-blue) 0%, #1d4ed8 100%);
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    text-transform: uppercase;
    padding: 0.75rem 1.4rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    transition: all 0.2s;
}

.btn-mobile-return:hover {
    background: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.5);
}

@media (max-width: 1100px) {
    .archive-cockpit-layout {
        grid-template-columns: 1fr;
    }

    .column-sticky-box {
        position: static;
    }

    .rounds-cards-list {
        max-height: 380px;
    }
}

@media (max-width: 820px) {
    #resc_archives_content {
        padding: 1.25rem 0.85rem 4rem 0.85rem;
    }

    .archives-main-title {
        font-size: 2rem;
    }

    .season-pills-list {
        display: none;
    }

    .season-mobile-select-wrap {
        display: block;
        width: 100%;
    }

    .btn-return-home {
        width: 100%;
        justify-content: center;
        margin-left: 0;
    }

    /* Display graceful notice on mobile and hide full dashboard */
    .mobile-pc-only-notice {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .champions-showcase-section,
    .fullwidth-toolbar-container,
    .scrubber-notice-banner,
    .archive-cockpit-layout {
        display: none !important;
    }
}
