/*
 * Racer profile page (Views/Racers/Index.cshtml)
 * Class names use the semantic `profile-` namespace (renamed from the former
 * v3-/v4-/v5- redesign-iteration prefixes).
 */
        #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;
        }

        /* Header meta trail */
        .organization-header-meta-slot {
            margin-top: 0;
            display: flex;
            align-items: center;
            min-width: 0;
            justify-content: flex-start;
        }
        .results-header-meta {
            display: flex;
            align-items: center;
            min-width: 0;
            justify-content: flex-start;
        }
        .results-header-trail {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: flex-start;
            gap: 0.2rem 0.5rem;
            min-width: 0;
        }
        .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;
        }
        @media (min-width: 992px) {
            .organization-header-primary--with-meta {
                flex: 1 1 auto !important;
                min-width: 0;
                justify-content: flex-start;
            }
            .organization-header-secondary--with-meta {
                flex: 0 0 auto !important;
            }
            .organization-header-meta-slot {
                width: auto;
                flex: 0 1 auto;
                margin-top: 0;
            }
            .results-header-trail {
                flex-wrap: nowrap;
            }
        }
        @media (max-width: 991.98px) {
            .organization-header-meta-slot {
                flex-basis: 100%;
            }
        }

        /* Page layout / surface chrome */
        .results-layout {
            display: flex;
            flex-direction: column;
            gap: 0.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-surface .card-header {
            padding-left: var(--results-content-inline-pad);
            padding-right: var(--results-content-inline-pad);
        }
        .results-surface .card-body {
            padding-left: var(--results-content-inline-pad);
            padding-right: var(--results-content-inline-pad);
        }

        /* V5 hero — V1 reference banner inside a results-surface card */
        .profile-hero-card {
            padding: 1rem;
        }
        .profile-hero {
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #f8f9fa 100%);
            border: 1px solid #dee2e6;
            border-radius: 0.475rem;
            padding: 2rem;
            position: relative;
            overflow: hidden;
        }
        .profile-hero::before {
            content: '';
            position: absolute;
            top: -40%;
            right: -5%;
            width: 500px;
            height: 500px;
            background: radial-gradient(circle, rgba(0,0,0,0.03) 0%, transparent 65%);
            pointer-events: none;
        }
        .profile-hero::after {
            content: attr(data-watermark);
            position: absolute;
            right: 30px;
            bottom: -15px;
            font-weight: 800;
            font-size: 8rem;
            text-transform: uppercase;
            color: rgba(0,0,0,0.03);
            pointer-events: none;
            line-height: 1;
            white-space: nowrap;
        }
        /* Banner image variant — dark gradient overlay over uploaded photo */
        .profile-hero--has-banner {
            background-color: var(--color-navy);
            /* Banner URL supplied inline as --profile-hero-banner (server data / JS upload). */
            background-image: linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.55)), var(--profile-hero-banner);
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
        }
        .profile-hero--has-banner::before { display: none; }
        .profile-hero--has-banner::after { color: rgba(255,255,255,0.08); }
        .profile-hero--has-banner .profile-name-first,
        .profile-hero--has-banner .profile-name-last { color: #ffffff; }
        .profile-hero--has-banner .profile-rank-badge {
            background-color: rgba(255,255,255,0.95);
            border-color: #ffffff;
        }
        .profile-hero--has-banner .profile-info-card {
            background: rgba(0,0,0,0.45);
            border-color: rgba(255,255,255,0.18);
            backdrop-filter: blur(10px);
        }
        .profile-hero--has-banner .profile-info-label,
        .profile-hero--has-banner .profile-info-value { color: #ffffff; }
        .profile-hero--has-banner .profile-info-row { border-bottom-color: rgba(255,255,255,0.12); }
        .profile-hero-banner-actions {
            position: absolute;
            /* Desktop: align top with the top of the headshot (= hero top padding),
               and sit further to the left of the headshot. */
            top: 2rem;
            right: calc(180px + 4rem);
            z-index: 2;
            display: inline-flex;
            align-items: center;
            gap: 0.4rem;
        }
        .profile-hero-edit-banner-btn,
        .profile-hero-remove-banner-btn {
            display: inline-flex;
            align-items: center;
            gap: 0.4rem;
            padding: 0.35rem 0.7rem;
            background: rgba(0,0,0,0.55);
            color: #fff;
            border: 1px solid rgba(255,255,255,0.25);
            border-radius: 0.4rem;
            font-size: 0.85rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            cursor: pointer;
            transition: background 0.15s;
        }
        .profile-hero-edit-banner-btn:hover { background: rgba(0,0,0,0.75); }
        .profile-hero-remove-banner-btn { padding: 0.35rem 0.5rem; }
        .profile-hero-remove-banner-btn:hover {
            background: rgba(220, 53, 69, 0.85);
            border-color: rgba(255,255,255,0.4);
        }
        .profile-headshot-remove-btn {
            position: absolute;
            top: 0.35rem;
            right: 0.35rem;
            z-index: 3;
            padding: 0.35rem 0.5rem;
            border-radius: 0.4rem;
            border: 1px solid rgba(255,255,255,0.25);
            background: rgba(0,0,0,0.55);
            color: #fff;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            opacity: 0;
            transition: opacity 0.2s, background 0.15s, border-color 0.15s;
        }
        .profile-headshot:hover .profile-headshot-remove-btn { opacity: 1; }
        .profile-headshot-remove-btn:hover {
            background: rgba(220, 53, 69, 0.85);
            border-color: rgba(255,255,255,0.4);
        }
        .profile-hero-outer {
            display: grid;
            grid-template-columns: 1fr auto;
            gap: 1rem;
            position: relative;
            z-index: 1;
        }
        .profile-hero-grid {
            display: grid;
            grid-template-columns: 1fr auto;
            grid-template-rows: auto auto;
            gap: 1rem;
            position: relative;
            z-index: 1;
        }
        .profile-name-block { grid-column: 1; grid-row: 1; }
        .profile-hero-grid > .profile-headshot { grid-column: 2; grid-row: 1 / 3; align-self: start; }
        .profile-hero-grid > .profile-info-card { grid-column: 1; grid-row: 2; }
        /* Racer-number badge — white fill, black border; digit uses Career Highlights typography (Poppins 800) */
        .profile-rank-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 3.4rem;
            height: 3.25rem;
            padding: 0 0.55rem;
            background-color: #ffffff;
            border: 2px solid #000;
            border-radius: 0.475rem;
            box-sizing: border-box;
            width: fit-content;
        }
        .profile-rank-badge .profile-rank-text {
            color: var(--color-navy);
            font-weight: 800;
            font-size: 2.2rem;
            line-height: 1;
            font-variant-numeric: tabular-nums;
        }
        .profile-name-first {
            font-size: 0.95rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--color-navy);
            line-height: 1.3;
        }
        .profile-name-last {
            font-size: 3rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: -0.005em;
            line-height: 1.05;
            color: var(--color-navy);
        }
        .profile-info-card {
            background: rgba(255,255,255,0.92);
            backdrop-filter: blur(12px);
            border: 1px solid var(--border-subtle);
            border-radius: 0.5rem;
            max-width: 340px;
            overflow: hidden;
        }
        .profile-info-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 1rem;
            padding: 0.55rem 1rem;
            border-bottom: 1px solid var(--border-subtle);
        }
        .profile-info-row:last-child { border-bottom: none; }
        .profile-info-value.profile-license-value {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            justify-content: flex-end;
            flex-wrap: wrap;
        }
        .profile-license-pending {
            font-size: 0.85rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            padding: 0.15rem 0.45rem;
            border-radius: 0.3rem;
            background: #fff8e1;
            color: #8a6d00;
            border: 1px solid #f1d57b;
        }
        .profile-hero--has-banner .profile-license-pending {
            background: rgba(255, 209, 102, 0.18);
            color: #fff3c4;
            border-color: rgba(255, 209, 102, 0.45);
        }
        .profile-license-request-link {
            font-size: 0.85rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: var(--results-accent, #009ef7);
            text-decoration: none;
        }
        .profile-license-request-link:hover { text-decoration: underline; }
        .profile-hero--has-banner .profile-license-request-link { color: #c8e7ff; }
        .profile-info-label {
            font-size: 0.9rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: var(--color-navy);
        }
        .profile-info-value {
            font-size: 0.95rem;
            font-weight: 700;
            color: var(--color-navy);
            text-align: right;
        }
        .profile-headshot {
            width: 180px;
            height: 230px;
            background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
            border: 1px solid #dee2e6;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            overflow: hidden;
        }
        .profile-headshot img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .profile-headshot-initials {
            font-weight: 700;
            font-size: 3.5rem;
            color: #adb5bd;
            opacity: 0.5;
        }
        .profile-headshot-overlay {
            position: absolute;
            inset: 0;
            background: rgba(0,0,0,0.45);
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transition: opacity 0.2s;
            cursor: pointer;
            border-radius: 6px;
        }
        .profile-headshot:hover .profile-headshot-overlay { opacity: 1; }
        .profile-headshot-overlay i { font-size: 1.8rem; color: #fff; }
        @media (max-width: 900px) {
            .profile-hero-card { padding: 0.75rem; }
            .profile-hero { padding: 1.5rem; }
            .profile-hero-outer { grid-template-columns: 1fr; }
            .profile-hero-grid {
                grid-template-columns: auto 1fr;
                grid-template-rows: auto auto;
            }
            .profile-hero-grid > .profile-headshot { grid-column: 1; grid-row: 1; align-self: center; width: 120px; height: 155px; }
            .profile-name-block { grid-column: 2; grid-row: 1; align-self: center; }
            .profile-hero-grid > .profile-info-card { grid-column: 1 / -1; grid-row: 2; max-width: 100%; }
            .profile-headshot-initials { font-size: 2.5rem; }
            .profile-name-last { font-size: 2.25rem; }
            .profile-rank-badge { min-width: 2.85rem; height: 2.75rem; }
            .profile-rank-badge .profile-rank-text { font-size: 1.85rem; }
            /* Mobile: headshot moves to the left, so pin the banner-actions group back to the top-right corner. */
            .profile-hero-banner-actions { top: 0.85rem; right: 0.85rem; }
            /* Mobile: hover isn't reliable on touch, so keep the headshot remove button always visible. */
            .profile-headshot-remove-btn { opacity: 1; }
        }
        @media (max-width: 600px) {
            .profile-hero::after { display: none; }
            .profile-hero-grid > .profile-headshot { width: 100px; height: 130px; }
            .profile-headshot-initials { font-size: 2rem; }
            .profile-name-last { font-size: 1.85rem; }
            .profile-name-first { font-size: 0.85rem; }
        }

        /* Tab-bar trailing actions (version selector + claim) */
        .profile-tab-actions {
            margin-left: auto;
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 0.85rem;
            padding: 0.35rem 0;
        }


        /* Section headers */
        .profile-section-title {
            font-size: 1.35rem;
            font-weight: 700;
            color: var(--color-navy);
            margin: 0;
            line-height: 1.2;
            letter-spacing: -0.005em;
        }
        .profile-section-subtitle {
            color: var(--color-navy);
            font-size: 1rem;
            font-weight: 500;
            margin: 0.3rem 0 0 0;
        }

        /* Career highlight stat tiles */
        .profile-stats-grid {
            display: grid;
            grid-template-columns: repeat(6, minmax(0, 1fr));
            gap: 1px;
            background-color: var(--border-subtle);
            border-radius: 1rem;
            overflow: hidden;
        }
        .profile-stat-tile {
            background: #ffffff;
            padding: 1.5rem 1rem;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 0.35rem;
        }
        .profile-stat-number {
            font-weight: 800;
            font-size: 2rem;
            color: var(--color-navy);
            line-height: 1;
        }
        .profile-stat-label {
            font-size: 0.95rem;
            font-weight: 700;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: var(--color-navy);
            text-align: center;
        }
        @media (max-width: 991.98px) {
            .profile-stats-grid {
                grid-template-columns: repeat(3, minmax(0, 1fr));
            }
            .profile-stat-number {
                font-size: 1.65rem;
            }
        }
        @media (max-width: 575.98px) {
            .profile-stats-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
        }

        /* ─── Profile analytics: rates, trend, donut, milestones, numbers ─── */
        .profile-rates-grid {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 1px;
            background-color: var(--border-subtle);
            border-radius: 1rem;
            overflow: hidden;
            margin-bottom: 0;
        }
        .profile-rate-tile {
            background: #ffffff;
            padding: 1.25rem 0.75rem;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 0.3rem;
            text-align: center;
        }
        .profile-rate-number {
            font-family: 'Poppins', sans-serif;
            font-weight: 800;
            font-size: 1.85rem;
            color: var(--color-navy);
            line-height: 1;
        }
        .profile-rate-label {
            font-family: 'Poppins', sans-serif;
            font-size: 0.95rem;
            font-weight: 700;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: var(--color-navy);
        }
        @media (max-width: 767.98px) {
            .profile-rates-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
            .profile-rate-number { font-size: 1.5rem; }
        }

        /* Finish-position distribution bar chart — buckets racer's finishes
           by position group (P1, P2, P3, P4-5, P6-10, P11+) with bar heights
           relative to the most-frequent bucket. Far clearer than a per-race line
           when a racer is dominant or has many results. */
        .profile-dist-row {
            display: grid;
            grid-template-columns: repeat(6, minmax(0, 1fr));
            gap: 0.5rem;
            align-items: end;
            min-height: 170px;
        }
        .profile-dist-col {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0.4rem;
            min-width: 0;
        }
        .profile-dist-bar-wrap {
            position: relative;
            width: 100%;
            height: 130px;
            display: flex;
            align-items: flex-end;
            justify-content: center;
            background: var(--surface-tint);
            border-radius: 0.5rem;
            padding: 0.35rem;
        }
        .profile-dist-bar {
            width: 100%;
            border-radius: 0.35rem;
            min-height: 4px;
            transition: height 0.2s ease;
            /* Per-bar values supplied inline as custom properties (server data). */
            height: var(--bar-height, 0);
            background: var(--bar-color, var(--color-navy));
        }
        .profile-dist-count {
            position: absolute;
            top: 0.3rem;
            left: 0;
            right: 0;
            text-align: center;
            font-family: 'Poppins', sans-serif;
            font-weight: 800;
            font-size: 1.05rem;
            color: var(--color-navy);
        }
        .profile-dist-bucket {
            font-family: 'Poppins', sans-serif;
            font-weight: 700;
            font-size: 0.95rem;
            color: var(--color-navy);
            letter-spacing: 0.04em;
        }
        .profile-dist-share {
            font-family: 'Poppins', sans-serif;
            font-weight: 500;
            font-size: 0.9rem;
            color: var(--color-navy);
        }
        @media (max-width: 575.98px) {
            .profile-dist-row {
                grid-template-columns: repeat(3, minmax(0, 1fr));
                row-gap: 1rem;
            }
            .profile-dist-bar-wrap {
                height: 110px;
            }
        }

        /* Class participation donut */
        .profile-donut-row {
            display: grid;
            grid-template-columns: minmax(0, 200px) minmax(0, 1fr);
            gap: 1.5rem;
            align-items: center;
        }
        .profile-donut-svg {
            width: 100%;
            max-width: 200px;
            height: auto;
            display: block;
        }
        .profile-donut-center {
            font-family: 'Poppins', sans-serif;
            font-weight: 800;
            fill: var(--color-navy);
        }
        .profile-donut-legend {
            list-style: none;
            padding: 0;
            margin: 0;
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }
        .profile-donut-legend li {
            display: flex;
            align-items: center;
            gap: 0.6rem;
            font-family: 'Poppins', sans-serif;
            font-size: 1rem;
            font-weight: 500;
            color: var(--color-navy);
        }
        /* Empty-state / caption text — navy, above the sub-floor (was repeated inline). */
        .profile-note {
            color: var(--color-navy);
            font-size: 1rem;
            font-weight: 500;
        }
        .profile-note--total {
            font-size: 0.95rem;
            margin-top: 0.75rem;
        }

        .profile-donut-legend-dot {
            width: 0.85rem;
            height: 0.85rem;
            border-radius: 0.25rem;
            flex-shrink: 0;
            /* Slice colour supplied inline as a custom property (server data). */
            background: var(--dot-color, var(--color-navy));
        }
        .profile-donut-legend-name {
            flex: 1 1 0;
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .profile-donut-legend-pct {
            font-weight: 700;
            color: var(--color-navy);
        }
        @media (max-width: 767.98px) {
            .profile-donut-row {
                grid-template-columns: 1fr;
                gap: 1rem;
                justify-items: center;
                text-align: left;
            }
            .profile-donut-legend {
                width: 100%;
            }
        }

        /* Footer disclaimer about data sources */
        .profile-data-note {
            font-family: 'Poppins', sans-serif;
            font-size: 1.05rem;
            font-weight: 500;
            color: var(--color-navy);
            line-height: 1.5;
            margin: 0.5rem 0 0;
            padding: 0.9rem 1.25rem;
            background: var(--surface-tint);
            border-radius: 0.75rem;
            text-align: center;
        }

        /* Number history timeline */
        .profile-numbers-timeline {
            display: flex;
            flex-wrap: wrap;
            gap: 0.6rem;
            margin-top: 1rem;
        }
        .profile-numbers-timeline--flush { margin-top: 0; }
        .profile-number-pill {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.4rem 0.85rem;
            background: #ffffff;
            border: 1.5px solid var(--border-subtle);
            border-radius: 999px;
        }
        .profile-number-pill.is-current {
            border-color: #000;
        }
        .profile-number-pill-num {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 2.5rem;
            height: 2rem;
            padding: 0 0.45rem;
            font-family: 'Poppins', sans-serif;
            font-weight: 800;
            font-size: 1.15rem;
            color: var(--color-navy);
            background: #ffffff;
            border: 2px solid #000;
            border-radius: 0.375rem;
            font-variant-numeric: tabular-nums;
        }
        .profile-number-pill-range {
            font-family: 'Poppins', sans-serif;
            font-size: 0.95rem;
            font-weight: 500;
            color: var(--color-navy);
        }

        /* Two-up row: places two adjacent <section class="card results-surface">
           cards side-by-side at half/half on desktop, stacked on mobile.
           Each child stretches to equal height via grid's default align-items: stretch. */
        .profile-side-by-side {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 0.75rem;
        }
        .profile-side-by-side > .card {
            margin: 0;
            height: 100%;
        }
        @media (max-width: 991.98px) {
            .profile-side-by-side {
                grid-template-columns: 1fr;
            }
        }

        /* Podium colors */
        .racer-podium-1 { color: var(--color-bronze); }
        .racer-podium-2 { color: #6c757d; }
        .racer-podium-3 { color: #8B5E3C; }

        /* ═══ V1-style Racer Stats table (ported from IndexV1) ═══ */
        .profile-stats-wrap {
            border-radius: 8px;
            overflow: hidden;
            border: 1px solid #dee2e6;
        }
        table.profile-stats-table { width: 100%; border-collapse: collapse; font-family: 'Poppins', sans-serif; }
        table.profile-detail-table { font-family: 'Poppins', sans-serif; }
        table.profile-stats-table thead th {
            background: #f8f9fa;
            font-weight: 700;
            font-size: 0.9rem;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: var(--color-navy);
            padding: 0.75rem 0.65rem;
            text-align: center;
            border-bottom: 1px solid #dee2e6;
            white-space: nowrap;
        }
        table.profile-stats-table thead th:nth-child(1) { width: 36px; }
        table.profile-stats-table thead th:nth-child(2),
        table.profile-stats-table thead th:nth-child(3),
        table.profile-stats-table thead th:nth-child(4) { text-align: center; }
        table.profile-stats-table tbody tr { border-bottom: 1px solid #e9ecef; transition: background 0.12s; }
        table.profile-stats-table tbody tr:last-child { border-bottom: none; }
        table.profile-stats-table tbody tr.profile-parent-row { cursor: pointer; }
        table.profile-stats-table tbody tr.profile-parent-row:hover { background: #f8f9fa; }
        table.profile-stats-table tbody tr.profile-parent-row.open { background: #f1f3f5; }
        table.profile-stats-table td {
            padding: 0.75rem 0.65rem;
            font-family: 'Poppins', sans-serif;
            font-size: 1rem;
            font-weight: 500;
            text-align: center;
            white-space: nowrap;
            color: var(--color-navy);
        }
        table.profile-stats-table td:nth-child(2),
        table.profile-stats-table td:nth-child(3),
        table.profile-stats-table td:nth-child(4) { text-align: center; }

        td.profile-dt-control {
            cursor: pointer;
            width: 36px;
            text-align: center;
        }
        .profile-dt-chevron {
            color: #adb5bd;
            display: inline-block;
            vertical-align: middle;
            transition: transform 0.18s ease-in-out, color 0.15s;
        }
        table.profile-stats-table tbody tr.profile-parent-row:hover .profile-dt-chevron { color: #6c757d; }
        table.profile-stats-table tbody tr.profile-parent-row.open .profile-dt-chevron {
            transform: rotate(90deg);
            color: var(--color-navy);
        }
        .profile-cell-year { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 1rem; color: var(--color-navy); }

        .profile-series-badge {
            display: inline-block;
            font-family: 'Poppins', sans-serif;
            font-weight: 500;
            font-size: 1rem;
            padding: 0.2rem 0.55rem;
            color: var(--color-navy);
            background: transparent;
        }
        .profile-series-utahsbk,
        .profile-series-cvma,
        .profile-series-afm,
        .profile-series-mra,
        .profile-series-mastersofthemountains {
            background: transparent;
            color: var(--color-navy);
        }

        .profile-cell-rds { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 1rem; color: var(--color-navy); }

        .profile-fg { color: var(--color-bronze); font-weight: 600; }
        .profile-fs { color: #6c757d; font-weight: 600; }
        .profile-fb { color: #8B5E3C; font-weight: 600; }

        tr.profile-child-row { display: none; }
        tr.profile-child-row.visible { display: table-row; }
        tr.profile-child-row > td { padding: 0 !important; background: #fafbfc; border-bottom: 2px solid #dee2e6; }

        .profile-child-wrap { padding: 0.5rem 0 1rem 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }

        table.profile-detail-table { width: 100%; min-width: 700px; border-collapse: collapse; table-layout: fixed; }
        table.profile-detail-table col.col-class { width: 22%; }
        table.profile-detail-table col.col-standing { width: 11%; }
        table.profile-detail-table thead th {
            font-weight: 700;
            font-size: 0.9rem;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: var(--color-navy);
            text-align: center;
            vertical-align: middle;
            background: transparent;
            white-space: nowrap;
        }
        table.profile-detail-table thead th:first-child { text-align: left; padding-left: 1rem; }
        table.profile-detail-table thead th.th-st { text-align: right; padding-right: 0.75rem; }
        table.profile-detail-table thead .rd-row th { padding: 0.5rem 0.25rem; border-bottom: 2px solid #dee2e6; }
        table.profile-detail-table thead .rd-row th:first-child { padding-left: 1rem; }
        table.profile-detail-table thead .rd-row th.th-st { padding-right: 0.75rem; }
        table.profile-detail-table thead .rd-row th:first-child,
        table.profile-detail-table thead .rd-row th.th-st { border-bottom: 1px solid #e9ecef; }
        table.profile-detail-table thead .rd-row th.th-rd { border-left: 1px solid #dee2e6; }
        table.profile-detail-table thead .rd-row th.th-rd-last { border-right: 1px solid #dee2e6; }
        table.profile-detail-table thead .sub-row th {
            font-size: 0.9rem;
            letter-spacing: 0.06em;
            color: var(--color-navy);
            font-weight: 700;
            padding: 0.25rem 0.2rem 0.4rem;
            border-bottom: 1px solid #e9ecef;
        }
        table.profile-detail-table thead .sub-row th.sub-l { border-left: 1px solid #dee2e6; }
        table.profile-detail-table thead .sub-row th.sub-r { border-right: 1px solid #dee2e6; }
        table.profile-detail-table thead .sub-row th.sub-empty { padding: 0; height: 0; font-size: 0; line-height: 0; border-bottom: 1px solid #e9ecef; }
        table.profile-detail-table tbody td {
            font-size: 1rem;
            font-weight: 500;
            padding: 0.55rem 0.25rem;
            text-align: center;
            vertical-align: middle;
            color: var(--color-navy);
            border-bottom: 1px solid #e9ecef;
            white-space: nowrap;
        }
        table.profile-detail-table tbody tr:last-child td { border-bottom: none; }
        table.profile-detail-table tbody td:first-child {
            text-align: left;
            padding-left: 1rem;
            padding-right: 0.5rem;
            font-weight: 600;
            font-size: 1rem;
            color: var(--color-navy);
            white-space: normal;
            overflow-wrap: break-word;
            word-break: break-word;
            vertical-align: middle;
            min-width: 7.5rem;
        }
        table.profile-detail-table tbody td.td-st { text-align: right; padding-right: 0.75rem; }
        table.profile-detail-table tbody td.td-l { border-left: 1px solid #dee2e6; }
        table.profile-detail-table tbody td.td-r { border-right: 1px solid #dee2e6; }

        .profile-pos {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 1rem;
            line-height: 1.2;
        }
        .profile-pos.c1 { color: var(--color-bronze); }
        .profile-pos.c2 { color: #6c757d; }
        .profile-pos.c3 { color: #8B5E3C; }
        .profile-pos.c-top { color: var(--color-navy); }
        .profile-pos.c-mid { color: #6c757d; }
        .profile-pos.c-dnf { color: #dc3545; font-weight: 700; }
        .profile-pos.c-dns { color: #6c757d; font-weight: 700; }
        .profile-pos-pts { font-size: 1rem; font-weight: 500; color: var(--color-navy); margin-top: 1px; }
        .profile-pos-link { text-decoration: none; color: inherit; display: flex; align-items: center; justify-content: center; }
        .profile-pos-link:hover { opacity: 0.7; }
        .profile-pos-dash { font-weight: 400; font-size: 1rem; color: var(--color-navy); }
        .profile-standing { display: inline-block; font-weight: 700; font-size: 1rem; color: var(--color-navy); text-align: right; }
        .profile-standing.st-1 { color: var(--color-bronze); }
        .profile-standing.st-2 { color: #6c757d; }
        .profile-standing.st-3 { color: #8B5E3C; }
        .profile-st-pts { font-weight: 500; font-size: 1rem; color: var(--color-navy); margin-left: 0.25rem; }

        @media (max-width: 900px) {
            .profile-stats-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
            table.profile-stats-table { min-width: 600px; }
        }

        /* Recent Best Results cards */
        .profile-best-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
            gap: 1rem;
        }
        .profile-best-card {
            display: flex;
            align-items: center;
            gap: 1rem;
            padding: 1rem 1.15rem;
            border: 1px solid var(--border-subtle);
            border-radius: 1rem;
            background: #ffffff;
            text-decoration: none;
            color: inherit;
            transition: border-color 0.2s;
        }
        .profile-best-card:hover,
        .profile-best-card:focus {
            text-decoration: none;
            color: inherit;
            border-color: #000;
        }
        .profile-best-card:hover .profile-best-class,
        .profile-best-card:focus .profile-best-class { color: var(--color-navy); }
        .profile-best-card .profile-best-meta,
        .profile-best-card:hover .profile-best-meta,
        .profile-best-card:focus .profile-best-meta { color: var(--color-navy); }
        .profile-best-position {
            font-family: 'Poppins', sans-serif;
            font-weight: 800;
            font-size: 1.5rem;
            min-width: 4rem;
            flex: 0 0 auto;
            text-align: center;
            line-height: 1;
            white-space: nowrap;
        }
        .profile-best-class {
            font-size: 1.05rem;
            font-weight: 700;
            color: var(--color-navy);
            transition: color 0.2s;
        }
        .profile-best-meta {
            font-size: 0.95rem;
            font-weight: 500;
            color: var(--color-navy);
        }

        /* Garage — mirrors the Recent Best Results card pattern for visual consistency. */
        .profile-garage-list {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
            gap: 1rem;
        }
        .profile-garage-item {
            display: flex;
            align-items: center;
            gap: 1rem;
            padding: 1rem 1.15rem;
            border: 1px solid var(--border-subtle);
            border-radius: 1rem;
            background: #ffffff;
            transition: border-color 0.2s;
        }
        .profile-garage-item:hover {
            border-color: #000;
        }
        .profile-garage-icon {
            flex: 0 0 auto;
            min-width: 4rem;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 2.5rem;
            color: var(--color-navy);
        }
        .profile-garage-icon i,
        .profile-garage-icon .fas,
        .profile-garage-icon .fa-motorcycle {
            font-size: 2rem !important;
            line-height: 1;
        }
        .profile-garage-body {
            flex: 1 1 auto;
            display: flex;
            flex-direction: column;
            gap: 0.15rem;
            min-width: 0;
        }
        .profile-garage-name {
            font-size: 1.05rem;
            font-weight: 700;
            color: var(--color-navy);
        }
        .profile-garage-meta {
            font-size: 0.95rem;
            font-weight: 500;
            color: var(--color-navy);
        }

/* Claim modal — licence dropzone + preview (former inline styles in _ClaimModal) */
.claim-dropzone {
    border: 2px dashed #009ef7;
    border-radius: 0.475rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s;
}
.claim-preview-img { max-width: 100%; max-height: 200px; border-radius: 0.475rem; }
