/*
 * Live timing page (Views/LiveTiming/Index.cshtml)
 * Extracted verbatim from the view's inline <style> block.
 */
        .organization-header-meta-slot {
            margin-top: 0;
            display: flex;
            align-items: center;
            min-width: 0;
            justify-content: flex-start;
        }

        .organization-header-copy {
            display: flex !important;
            flex-direction: row !important;
            flex-wrap: wrap;
            align-items: center;
            justify-content: flex-start !important;
            align-content: flex-start;
            gap: 0.2rem 0.5rem;
            width: 100%;
            font-size: clamp(1rem, 0.94rem + 0.32vw, 1.18rem);
            font-weight: 600;
            line-height: 1.12;
            color: var(--color-navy);
            text-align: left;
        }

        .organization-header-title {
            margin: 0;
        }

        .results-header-meta,
        .results-header-trail {
            display: flex;
            align-items: center;
            justify-content: flex-start;
            min-width: 0;
        }

        .results-header-trail {
            flex-wrap: wrap;
            gap: 0.2rem 0.5rem;
        }

        .results-header-trail-item {
            margin: 0;
            font-size: inherit;
            font-weight: inherit;
            line-height: inherit;
            color: inherit;
            white-space: nowrap;
        }

        .results-header-trail-item--separated::before {
            content: "|";
            margin-right: 0.5rem;
            color: #a1a5b7;
        }

        #kt_body {
            --kt-toolbar-height: 0px !important;
            --kt-toolbar-height-tablet-and-mobile: 0px !important;
        }

        #kt_toolbar {
            display: none !important;
        }

        #kt_content {
            --results-accent: #009ef7;
            --results-accent-surface: #eef8ff;
            --results-content-inline-pad: 1.75rem;
        }

        #kt_content .text-muted,
        #kt_content .text-gray-600,
        #kt_content .text-gray-700,
        #kt_content .text-gray-800 {
            color: #000 !important;
        }

        .live-timing-table .symbol-label.racer-num-badge {
            background-color: #ffffff !important;
            border: 1.5px solid #000 !important;
            box-sizing: border-box;
        }

        .live-timing-table .symbol.racer-num-symbol {
            height: 30px !important;
        }

        .live-timing-table .symbol.racer-num-symbol .symbol-label {
            width: 45px !important;
            height: 30px !important;
            min-height: 0 !important;
            padding: 0 2px !important;
            box-sizing: border-box;
        }

        .live-timing-table .results-accent-text {
            color: #000 !important;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            height: 100%;
            text-align: center;
            line-height: 1;
            font-family: "Orbitron", sans-serif !important;
            font-weight: 700;
            letter-spacing: 0.06em;
            transform: skewX(-8deg);
            font-variant-numeric: tabular-nums;
            -webkit-font-smoothing: antialiased;
        }

        .live-timing-table .racer-cell-outer {
            display: flex;
            justify-content: center;
            width: 100%;
        }

        /* Fixed max width keeps the number plates aligned row-to-row while the
           name stays centered in the remaining space (matches Race Results).
           Capped tighter than RR because Live Timing's neighbour columns are
           empty before the session starts, which would otherwise let the racer
           column sprawl and push the name far from the plate. */
        .live-timing-table .racer-cell-inner {
            display: flex;
            align-items: center;
            justify-content: flex-start;
            width: min(15rem, 100%);
        }

        .live-timing-table thead {
            position: sticky;
            top: 0;
            z-index: 10;
        }

        .live-timing-table thead th {
            background-color: var(--results-accent-surface);
            color: #000 !important;
        }

        .results-layout {
            display: flex;
            flex-direction: column;
            gap: 1.75rem;
        }

        .results-surface {
            border: 1px solid var(--border-subtle);
            border-radius: 1.5rem;
            background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
            box-shadow: var(--shadow-card);
        }

        .results-hero-card {
            overflow: hidden;
        }

        .results-hero-frame {
            position: relative;
            padding: 0;
            background: transparent;
        }

        .results-hero-image {
            min-height: 220px;
            border-radius: calc(1.5rem - 1px);
        }

        .results-hero-copy {
            position: absolute;
            inset: auto var(--results-content-inline-pad) 2rem var(--results-content-inline-pad);
            z-index: 2;
            max-width: min(38rem, calc(100% - (var(--results-content-inline-pad) * 2)));
        }

        /* Subtle divider between "Live Timing" and the org name on the same line. */
        .lt-hero-sep {
            opacity: 0.55;
            font-weight: 400;
        }

        .results-table-card .card-header,
        .results-table-card .card-body {
            padding-left: var(--results-content-inline-pad);
            padding-right: var(--results-content-inline-pad);
        }

        .results-toolbar-shell {
            display: grid;
            grid-template-columns: minmax(0, 1fr);
            gap: 1rem;
            align-items: end;
            width: 100%;
        }

        .results-summary-inline {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 0.85rem 1.25rem;
        }

        .results-summary-primary {
            display: flex;
            flex-direction: column;
            gap: 0.35rem;
            min-width: 0;
        }

        .results-summary-meta {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 0.75rem;
        }

        .results-live-pill {
            display: inline-flex;
            align-items: center;
            gap: 0.45rem;
            padding: 0.35rem 0.8rem;
            border-radius: 999px;
            font-size: 0.85rem;
            font-weight: 700;
            letter-spacing: 0.03em;
            text-transform: uppercase;
        }

        .results-live-pill--active {
            background: #ecfdf3;
            color: #067647;
        }

        .results-live-pill--idle {
            background: rgba(255, 255, 255, 0.15);
            color: rgba(255, 255, 255, 0.7);
        }

        .results-live-dot {
            width: 0.55rem;
            height: 0.55rem;
            border-radius: 999px;
        }

        .results-live-dot--active {
            background: #17b26a;
            box-shadow: 0 0 0 0.22rem rgba(23, 178, 106, 0.2);
            animation: live-pulse 2s ease-in-out infinite;
        }

        .results-live-dot--idle {
            background: rgba(255, 255, 255, 0.5);
            box-shadow: 0 0 0 0.22rem rgba(255, 255, 255, 0.1);
        }

        @keyframes live-pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.4; }
        }

        .results-metric-grid {
            display: grid;
            grid-template-columns: repeat(6, minmax(0, 1fr));
            gap: 0.9rem;
        }

        .results-metric-card {
            border: 1px solid var(--border-subtle);
            border-radius: 1rem;
            background: #fff;
            padding: 1rem 1.1rem;
        }

        .results-metric-label {
            display: block;
            font-size: 0.85rem;
            font-weight: 700;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: #7e8299;
            margin-bottom: 0.35rem;
        }

        .results-metric-value {
            font-size: 1.15rem;
            font-weight: 700;
            color: var(--color-navy);
            line-height: 1.2;
            word-break: break-word;
        }

        .live-timing-table {
            width: 100% !important;
        }

        .live-timing-table thead th {
            background-color: var(--results-accent-surface);
            color: #000 !important;
        }

        .results-accent-text {
            color: var(--results-accent) !important;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            height: 100%;
            text-align: center;
            line-height: 1;
            font-weight: 500;
            font-variant-numeric: tabular-nums;
        }

        .results-empty {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0.9rem;
            padding: 2.25rem 1rem;
            text-align: center;
        }

        .results-empty-copy {
            max-width: 34rem;
        }

        .results-empty-link {
            min-height: 48px;
            padding: 0.75rem 1.35rem !important;
            border-radius: 0.75rem !important;
        }

        @media (max-width: 991.98px) {
            #kt_content {
                --results-content-inline-pad: 1.1rem;
            }

            .live-timing-table {
                min-width: 720px;
            }

            .results-metric-grid {
                grid-template-columns: repeat(3, minmax(0, 1fr));
            }

            .results-hero-image {
                min-height: 160px !important;
            }

            .results-hero-copy {
                inset: auto var(--results-content-inline-pad) 1.35rem var(--results-content-inline-pad);
                max-width: calc(100% - (var(--results-content-inline-pad) * 2));
            }
        }

        @media (max-width: 575.98px) {
            .results-layout {
                padding-top: 0.55rem;
                gap: 1.05rem;
            }

            .results-hero-image {
                min-height: 132px !important;
            }

            .results-hero-copy {
                inset: auto var(--results-content-inline-pad) 1rem var(--results-content-inline-pad);
            }

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

        /* Flag card */
        .flag-indicator {
            display: flex;
            align-items: center;
            gap: 0.6rem;
        }

        .flag-icon {
            position: relative;
            width: 28px;
            height: 20px;
            border-radius: 2px;
            flex-shrink: 0;
            border: 1px solid rgba(0,0,0,0.08);
            overflow: hidden;
        }

        .flag-icon--green { background: #17b26a; }
        .flag-icon--yellow { background: #f5b731; }
        .flag-icon--red { background: #e5342b; }
        .flag-icon--white { background: #fff; border-color: #ccc; }
        .flag-icon--warmup { background: #8b5cf6; }
        .flag-icon--none { background: #c4c8d4; }

        .flag-icon--checkered {
            background: repeating-conic-gradient(#000 0% 25%, #fff 0% 50%) 0 0 / 8px 8px;
            border-color: #888;
        }

        .flag-icon-wave {
            position: absolute;
            inset: 0;
            background: linear-gradient(
                120deg,
                transparent 0%,
                rgba(255,255,255,0.35) 30%,
                transparent 50%,
                rgba(0,0,0,0.06) 70%,
                transparent 100%
            );
        }

        .flag-icon--checkered .flag-icon-wave {
            display: none;
        }

        .flag-label {
            font-size: 1.15rem;
            font-weight: 700;
            color: var(--color-navy);
            line-height: 1.2;
        }

        /* Row change flash */
        @keyframes row-flash {
            0%   { background-color: rgba(23, 178, 106, 0.18); }
            100% { background-color: transparent; }
        }

        .live-timing-table tbody tr.row-changed {
            animation: row-flash 1.5s ease-out forwards;
        }

        /* ---- View tabs + filter chips ---- */
        .lt-controls {
            display: flex;
            flex-direction: column;
            gap: 0.85rem;
            margin-bottom: 1.1rem;
        }

        .lt-tabs {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
        }

        .lt-tab {
            border: 1px solid var(--border-subtle);
            background: var(--surface-tint);
            color: var(--color-navy);
            font-family: inherit;
            font-weight: 700;
            font-size: 1rem;
            padding: 0.5rem 1.15rem;
            border-radius: 999px;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .lt-tab:hover {
            transform: translateY(-2px);
            border-color: #000;
            box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
        }

        .lt-tab--active {
            background: var(--color-navy);
            border-color: var(--color-navy);
            color: #fff;
        }

        .lt-class-chips {
            display: flex;
            flex-wrap: wrap;
            gap: 0.4rem;
        }

        .lt-chip {
            border: 1px solid var(--border-subtle);
            background: var(--surface-tint);
            color: var(--color-navy);
            font-family: inherit;
            font-weight: 600;
            font-size: 1rem;
            padding: 0.35rem 0.9rem;
            border-radius: 999px;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .lt-chip:hover {
            transform: translateY(-2px);
            border-color: #000;
        }

        .lt-chip--active {
            background: var(--color-navy);
            border-color: var(--color-navy);
            color: #fff;
        }

        .lt-chip--legend {
            display: inline-flex;
            align-items: center;
            gap: 0.45rem;
        }

        .lt-legend-num {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 30px;
            height: 22px;
            padding: 0 4px;
            background: #fff;
            border: 1.5px solid #000;
            border-radius: 0.35rem;
            color: var(--color-navy);
            font-weight: 800;
            font-variant-numeric: tabular-nums;
            font-size: 0.85rem;
        }

        /* ---- Leaderboard extras ---- */
        .lt-pos-cell {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 2px;
        }

        .lt-pos-num {
            font-weight: 800;
        }

        .lt-move {
            font-size: 0.9rem;
            font-weight: 700;
            letter-spacing: 0.02em;
        }

        .lt-move--up { color: #067647; }
        .lt-move--down { color: #e5342b; }

        .lt-board-row { cursor: pointer; }

        .lt-best-sb {
            color: var(--color-bronze);
            font-weight: 800;
            white-space: nowrap;
        }

        .lt-sb-chip,
        .lt-pb-chip {
            display: inline-block;
            margin-left: 0.4rem;
            padding: 0.1rem 0.5rem;
            border-radius: 999px;
            font-size: 0.85rem;
            font-weight: 800;
            letter-spacing: 0.06em;
            text-transform: uppercase;
        }

        .lt-sb-chip { background: var(--color-bronze); color: #fff; }
        .lt-pb-chip { background: var(--color-blue); color: #fff; }

        .lt-lap-row--sb td { background: rgba(184, 134, 11, 0.07); }
        .lt-lap-row--pb td { background: rgba(0, 105, 180, 0.06); }

        .lt-empty {
            padding: 2rem 1rem;
            text-align: center;
            color: var(--color-navy);
            font-weight: 600;
            font-size: 1.05rem;
        }

        /* ---- Lap chart ---- */
        /* Centre analysis content so a short race fills space deliberately
           rather than clinging to the left with a wide empty margin. */
        .lt-analysis-wrap {
            max-width: 1320px;
            margin: 0 auto;
        }

        .lt-chart-layout {
            display: flex;
            align-items: flex-start;
            justify-content: center;
            gap: 1.5rem;
        }

        .lt-chart-main {
            flex: 0 1 auto;
            min-width: 0;
        }

        .lt-chart-side {
            flex: 0 0 300px;
        }

        .lt-legend-title {
            font-size: 0.85rem;
            font-weight: 700;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            color: var(--color-navy);
            margin-bottom: 0.6rem;
        }

        .lt-chart-wrap {
            overflow-x: auto;
            border: 1px solid var(--border-subtle);
            border-radius: 1rem;
            background: #fff;
            padding: 0.75rem;
        }

        .lt-chart-grid { stroke: var(--border-subtle); stroke-width: 1; }
        .lt-chart-grid--h { stroke: #f0f4f8; }

        .lt-chart-axis {
            fill: var(--color-navy);
            font-size: 15px;
            font-weight: 600;
            font-family: Poppins, sans-serif;
        }

        .lt-chart-axis--pos { font-weight: 700; }

        .lt-chart-series { cursor: pointer; }

        .lt-chart-hit {
            fill: none;
            stroke: #000;
            stroke-opacity: 0;
            stroke-width: 14;
        }

        .lt-chart-line {
            fill: none;
            stroke: var(--color-navy);
            stroke-width: 2.5;
            stroke-opacity: 0.5;
            transition: stroke-opacity 0.15s ease;
        }

        .lt-chart-line--focus {
            stroke: var(--color-blue);
            stroke-width: 3.5;
            stroke-opacity: 1;
        }

        .lt-chart-line--dim { stroke-opacity: 0.12; }

        .lt-chart-dot {
            fill: #fff;
            stroke: var(--color-navy);
            stroke-width: 1.5;
        }

        .lt-chart-dot--focus { stroke: var(--color-blue); stroke-width: 2; }
        .lt-chart-dot--dim { opacity: 0.15; }

        .lt-chart-plate {
            fill: #fff;
            stroke: #000;
            stroke-width: 1.5;
        }

        .lt-chart-plate--focus { stroke: var(--color-blue); stroke-width: 2.5; }
        .lt-chart-plate--dim { opacity: 0.2; }

        .lt-chart-plate-num {
            fill: var(--color-navy);
            font-weight: 800;
            font-size: 15px;
            font-family: Poppins, sans-serif;
        }

        .lt-chart-plate-num--dim { opacity: 0.25; }

        .lt-legend {
            display: flex;
            flex-direction: column;
            gap: 0.35rem;
        }

        .lt-legend-row {
            display: flex;
            align-items: center;
            gap: 0.55rem;
            width: 100%;
            text-align: left;
            border: 1px solid var(--border-subtle);
            background: var(--surface-tint);
            border-radius: 0.75rem;
            padding: 0.4rem 0.6rem;
            cursor: pointer;
            font-family: inherit;
            font-weight: 600;
            color: var(--color-navy);
            transition: all 0.15s ease;
        }

        .lt-legend-row:hover {
            transform: translateY(-1px);
            border-color: #000;
        }

        .lt-legend-row--active {
            background: var(--color-navy);
            border-color: var(--color-navy);
            color: #fff;
        }

        .lt-legend-pos {
            flex: 0 0 2.1rem;
            font-weight: 800;
            font-variant-numeric: tabular-nums;
            font-size: 0.9rem;
        }

        .lt-legend-name {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        /* ---- Lap times ---- */
        .lt-rider-chips {
            display: flex;
            gap: 0.4rem;
            overflow-x: auto;
            padding-bottom: 0.35rem;
            margin-bottom: 1rem;
        }

        .lt-rider-chips .lt-chip { flex-shrink: 0; }

        .lt-stats-grid {
            display: grid;
            grid-template-columns: repeat(6, minmax(0, 1fr));
            gap: 0.9rem;
            margin-bottom: 1.1rem;
        }

        .lt-stat-sub {
            font-size: 0.9rem;
            font-weight: 600;
            color: var(--color-navy);
            opacity: 0.75;
        }

        /* Lap pace chart sits beside the lap table to use the width instead of
           floating in the top-left corner above a full-width table. */
        .lt-laps-body {
            display: grid;
            grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
            gap: 1.5rem;
            align-items: start;
        }

        .lt-pace-card {
            border: 1px solid var(--border-subtle);
            border-radius: 1rem;
            background: #fff;
            padding: 1.1rem 1.2rem 1.25rem;
        }

        .lt-pace-title {
            font-size: 0.85rem;
            font-weight: 700;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            color: var(--color-navy);
            margin-bottom: 0.85rem;
        }

        .lt-pace-empty {
            color: var(--color-navy);
            font-weight: 600;
            padding: 1.5rem 0;
            text-align: center;
        }

        .lt-pace-bars {
            display: flex;
            align-items: flex-end;
            justify-content: center;
            gap: 8px;
            height: 178px;
            padding: 0.5rem 0.1rem 0;
        }

        .lt-pace-slot {
            flex: 1 1 0;
            min-width: 14px;
            max-width: 96px;
            height: 100%;
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            align-items: center;
            gap: 6px;
        }

        .lt-pace-time {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            font-size: 0.9rem;
            font-weight: 700;
            color: var(--color-navy);
            font-variant-numeric: tabular-nums;
            white-space: nowrap;
        }

        .lt-pace-best {
            font-size: 0.85rem;
            font-weight: 800;
            letter-spacing: 0.04em;
            color: #fff;
            padding: 0.1rem 0.45rem;
            border-radius: 999px;
        }

        .lt-pace-best--pb { background: var(--color-blue); }
        .lt-pace-best--sb { background: var(--color-bronze); }

        .lt-pace-axis {
            display: flex;
            justify-content: center;
            gap: 8px;
            margin-top: 0.5rem;
        }

        .lt-pace-axis-cell {
            flex: 1 1 0;
            min-width: 14px;
            max-width: 96px;
            text-align: center;
            font-size: 0.95rem;
            font-weight: 600;
            color: var(--color-navy);
        }

        .lt-pace-bar {
            width: 100%;
            background: var(--color-navy);
            border-radius: 4px 4px 0 0;
            position: relative;
            min-height: 6px;
        }

        .lt-pace-bar--pb { background: var(--color-blue); }
        .lt-pace-bar--sb { background: var(--color-bronze); }

        .lt-pace-bar:hover .lt-pace-tip { display: block; }

        .lt-pace-tip {
            display: none;
            position: absolute;
            bottom: calc(100% + 6px);
            left: 50%;
            transform: translateX(-50%);
            background: var(--color-navy);
            color: #fff;
            font-size: 0.9rem;
            font-weight: 600;
            padding: 0.25rem 0.6rem;
            border-radius: 0.5rem;
            white-space: nowrap;
            z-index: 20;
        }

        /* ---- Past sessions: one card per race ---- */
        .lt-history-title {
            font-size: 1.35rem;
            font-weight: 700;
            color: var(--color-navy);
            margin: 0 0 1.25rem;
        }

        /* Live scoreboard title + subtitle, matched to the "Provisional Results"
           and "Sunday, May 31" treatments in the history below. !important beats
           Metronic's .card-title/.card-label weight so it renders a true 700. */
        .card-title .live-board-title {
            font-size: 1.35rem !important;
            font-weight: 700 !important;
            color: var(--color-navy) !important;
        }

        .live-board-subtitle {
            font-size: 0.95rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: var(--color-navy);
            opacity: 0.85;
        }

        /* Loading skeleton while the provisional history fetch is in flight */
        .lt-skeleton {
            display: flex;
            flex-direction: column;
            gap: 0.85rem;
        }

        .lt-skeleton-card {
            height: 64px;
            border-radius: 1rem;
            background: linear-gradient(90deg, #f0f4f8 25%, var(--border-subtle) 37%, #f0f4f8 63%);
            background-size: 400% 100%;
            animation: lt-shimmer 1.4s ease infinite;
        }

        @keyframes lt-shimmer {
            0% { background-position: 100% 0; }
            100% { background-position: 0 0; }
        }

        @media (prefers-reduced-motion: reduce) {
            .lt-skeleton-card { animation: none; }
        }

        .lt-load-more {
            display: block;
            margin: 0.25rem auto 0;
            padding: 0.65rem 1.5rem;
            border: 1px solid var(--border-subtle);
            background: var(--surface-tint);
            border-radius: 999px;
            font-family: inherit;
            font-size: 1rem;
            font-weight: 700;
            color: var(--color-navy);
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .lt-load-more:hover {
            transform: translateY(-2px);
            border-color: #000;
            box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
        }

        .lt-load-more:disabled {
            opacity: 0.6;
            cursor: default;
            transform: none;
            box-shadow: none;
        }

        .lt-day {
            margin-bottom: 1.75rem;
        }

        .lt-day-title {
            font-size: 0.95rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: var(--color-navy);
            opacity: 0.85;
            margin: 0 0 0.75rem;
        }

        .lt-session-card {
            border: 1px solid var(--border-subtle);
            border-radius: 1rem;
            background: #fff;
            margin-bottom: 0.85rem;
            overflow: hidden;
            transition: border-color 0.15s ease, box-shadow 0.15s ease;
        }

        .lt-session-card:hover {
            border-color: #cfd9e4;
            box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
        }

        .lt-session-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 1rem;
            padding: 0.95rem 1.15rem;
            cursor: pointer;
            user-select: none;
        }

        .lt-session-head[aria-expanded="true"] {
            border-bottom: 1px solid #eef2f6;
        }

        .lt-session-headline {
            display: flex;
            flex-direction: column;
            gap: 0.2rem;
            min-width: 0;
        }

        .lt-session-classes {
            font-weight: 700;
            font-size: 1.2rem;
            color: var(--color-navy);
        }

        .lt-session-sub {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 1.05rem;
        }

        .lt-session-type {
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            font-size: 1rem;
            color: var(--color-blue);
        }

        .lt-session-time {
            color: var(--color-navy);
            font-weight: 600;
            opacity: 0.85;
        }

        .lt-session-head-right {
            display: flex;
            align-items: center;
            gap: 0.7rem;
            flex-shrink: 0;
        }

        .lt-session-count {
            font-size: 1rem;
            font-weight: 700;
            color: var(--color-navy);
            white-space: nowrap;
        }

        .lt-official-flag {
            display: inline-flex;
            align-items: center;
            gap: 0.3rem;
            font-size: 0.9rem;
            font-weight: 700;
            color: var(--color-blue);
            background: #eef6fc;
            border: 1px solid #d6e8f5;
            border-radius: 999px;
            padding: 0.25rem 0.65rem;
            white-space: nowrap;
        }

        .lt-chevron {
            font-size: 0.95rem;
            color: var(--color-navy);
            opacity: 0.55;
            transition: transform 0.2s ease;
        }

        .lt-session-head[aria-expanded="true"] .lt-chevron {
            transform: rotate(180deg);
        }

        .lt-session-body {
            padding: 1rem 1.15rem 1.2rem;
        }

        /* Official-results links — a labelled sub-panel at the top of the expanded card */
        .lt-official-bar {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 0.5rem;
            padding: 0.7rem 0.85rem;
            margin-bottom: 1rem;
            background: var(--surface-tint);
            border: 1px solid var(--border-subtle);
            border-radius: 0.75rem;
        }

        .lt-official-label {
            font-size: 0.9rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: var(--color-navy);
            opacity: 0.7;
        }

        .lt-official-link {
            display: inline-flex;
            align-items: center;
            gap: 0.3rem;
            border: 1px solid var(--border-subtle);
            background: #fff;
            border-radius: 999px;
            padding: 0.35rem 0.9rem;
            font-size: 1rem;
            font-weight: 600;
            color: var(--color-blue);
            text-decoration: none;
            transition: all 0.15s ease;
        }

        .lt-official-link:hover {
            transform: translateY(-2px);
            border-color: #000;
            color: var(--color-blue);
            box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
        }

        .lt-official-arrow {
            font-weight: 800;
            font-size: 0.95rem;
        }

        .lt-plate--sm .symbol-label {
            width: 34px !important;
            height: 24px !important;
            min-height: 0 !important;
        }

        @media (max-width: 991.98px) {
            .lt-stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

            /* Stack the lap chart above its legend and the pace chart above the table.
               Stretch the chart column to the viewport (not the SVG's intrinsic width)
               and let the chart scroll inside its box, so it never overflows the page. */
            .lt-chart-layout { flex-direction: column; align-items: stretch; }
            .lt-chart-main { width: 100%; min-width: 0; }
            .lt-chart-wrap { max-width: 100%; }
            /* Scale the SVG to the screen width (viewBox keeps it proportional) so the
               lap chart fits without a horizontal scroll on phones. */
            .lt-chart-wrap svg { max-width: 100%; height: auto; }
            .lt-chart-side { flex: 1 1 auto; width: 100%; }
            .lt-legend {
                flex-direction: row;
                flex-wrap: wrap;
            }
            .lt-legend-row { width: auto; flex: 1 1 12rem; }
            /* minmax(0, 1fr) — not "1fr" (= minmax(auto,1fr)) — so the column can shrink
               below its content and the pace bars flex down to fit instead of overflowing. */
            .lt-laps-body { grid-template-columns: minmax(0, 1fr); }
        }

        @media (max-width: 767.98px) {
            .lt-col-optional { display: none; }

            /* Compact the session card header so long class names have room on phones. */
            .lt-session-head { padding: 0.8rem 0.95rem; gap: 0.6rem; }
            .lt-session-head-right { gap: 0.5rem; }
            .lt-session-classes { font-size: 1rem; }
            .lt-session-body { padding: 0.85rem 0.95rem 1rem; }
            .lt-official-bar { padding: 0.6rem 0.7rem; }
        }

        @media (max-width: 575.98px) {
            .lt-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
            /* Drop the "Official" word, keep the check, to save header width. */
            .lt-official-flag { font-size: 0; gap: 0; padding: 0.25rem 0.4rem; }
            .lt-official-flag::before { content: "\2713"; font-size: 0.85rem; }
            /* Narrow bars can't fit the nowrap per-lap time labels — the table below
               has exact times; bar colour still marks the PB/SB lap. */
            .lt-pace-time { display: none; }
            .lt-pace-bars { height: 150px; }
        }

/* Hero image + dim overlay (former inline background-image / opacity). The overlay
   selector matches Metronic's .overlay.overlay-show .overlay-layer (0,3,0) and wins
   on load order so the image shows through. */
.lt-hero-image { background-image: url('/media/images/brian-childree.jpg'); }
.overlay.overlay-show .lt-hero-overlay { opacity: 0.4; }
