.race-detail-wrap {
    width: min(100% - 24px, 1100px);
    margin: 0 auto;
    padding: 24px 0 48px;
    box-sizing: border-box;
    color: #111827;
}

/* ===== HOME-PAGE LAYOUT FOR PUBLIC RACE PAGES ===== */
.race-detail-wrap {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #ffffff;
    color: #071a2d;
}

.race-detail-breadcrumbs {
    width: min(calc(100% - 40px), 1180px);
    margin: 0 auto;
    padding: 20px 0 18px;
    box-sizing: border-box;
}

.race-detail-banner {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(460px, 1.15fr);
    gap: 0;
    align-items: stretch;
    width: 100%;
    max-width: 1600px;
    min-height: 520px;
    margin: 0 auto;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
    color: #071a2d;
}

.race-detail-hero-main {
    align-items: flex-start;
    align-self: center;
    gap: 20px;
    padding: clamp(42px, 6vw, 92px) clamp(30px, 5vw, 82px);
    box-sizing: border-box;
    position: relative;
    z-index: 2;
}

.race-detail-date-card {
    flex: 0 0 92px;
    border: 1px solid #d7dfe8;
    border-radius: 7px;
    box-shadow: 0 8px 20px rgba(7, 26, 45, .12);
}

.race-detail-date-month {
    background: #ed1c2e;
}

.race-detail-kicker {
    margin: 1px 0 14px;
    color: #ed1c2e;
    font-size: 13px;
    letter-spacing: .16em;
}

.race-detail-banner h1,
.race-detail-banner #race-detail-title {
    max-width: 690px;
    color: #071a2d;
    font-family: "Arial Narrow", Arial, Helvetica, sans-serif;
    font-size: clamp(42px, 4.7vw, 66px) !important;
    font-weight: 900;
    letter-spacing: -.035em;
    line-height: .99 !important;
}

.race-detail-summary,
p.race-detail-summary {
    max-width: 590px;
    margin: 24px 0 0;
    color: #435468;
    font-size: clamp(17px, 1.5vw, 20px) !important;
    line-height: 1.55 !important;
}

.race-detail-header-facts {
    flex-direction: row;
    align-items: center;
    margin-top: 20px;
}

.race-detail-chip {
    min-height: 30px;
    border: 1px solid #d7dfe8;
    border-radius: 5px;
    background: #f5f8fb;
    color: #173750;
    font-size: 13px;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.race-detail-title-block > .race-detail-button-primary {
    width: auto;
    min-height: 52px;
    margin-top: 26px;
    padding: 0 22px;
    border-color: #ed1c2e;
    border-radius: 6px;
    background: #ed1c2e;
    box-shadow: 0 10px 24px rgba(237, 28, 46, .24);
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 900;
    gap: 12px;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.race-detail-title-block > .race-detail-button-primary:hover,
.race-detail-title-block > .race-detail-button-primary:focus,
.race-detail-banner a.race-detail-button-primary.usrr-action-public:hover,
.race-detail-banner a.race-detail-button-primary.usrr-action-public:focus {
    border-color: #c91022 !important;
    background: #c91022 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.race-detail-banner a.race-detail-button-primary.usrr-action-public {
    border-color: #ed1c2e !important;
    background: #ed1c2e !important;
    color: #ffffff !important;
}

.race-detail-hero-side {
    position: relative;
    align-items: center;
    justify-content: center;
    min-height: 520px;
    padding: clamp(38px, 5vw, 72px);
    overflow: hidden;
    background: linear-gradient(135deg, #eef3f8 0%, #dce6ef 100%);
    box-sizing: border-box;
}

.race-detail-hero-side::before {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, #ffffff 0%, rgba(255, 255, 255, .88) 9%, rgba(255, 255, 255, 0) 38%);
    content: "";
    pointer-events: none;
}

.race-detail-logo-panel {
    z-index: 2;
    width: min(78%, 430px);
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.race-detail-logo-panel img {
    width: 100%;
    max-width: 430px;
    filter: drop-shadow(0 18px 28px rgba(7, 26, 45, .16));
}

.race-detail-home-quick-panel {
    width: min(calc(100% - 40px), 1180px);
    margin: 0 auto;
    padding: 0;
    background: #ffffff;
}

.race-detail-home-quick-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 18px;
    padding: 14px 0 20px;
}

.race-detail-home-quick-links a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 8px;
    color: #071a2d;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .02em;
    text-decoration: none;
    text-transform: uppercase;
}

.race-detail-home-quick-links a:hover,
.race-detail-home-quick-links a:focus {
    color: #ed1c2e;
}

.race-detail-home-quick-links svg {
    flex: 0 0 19px;
    width: 19px;
    height: 19px;
    color: #173750;
}

.race-detail-home-quick-links a:first-child svg {
    color: #ed1c2e;
}

.race-detail-home-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100vw;
    margin-left: calc(50% - 50vw);
    padding: 24px max(24px, calc((100vw - 1180px) / 2));
    border-bottom: 4px solid #ed1c2e;
    background: #061f37;
    color: #ffffff;
    box-sizing: border-box;
}

.race-detail-home-fact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-width: 0;
    min-height: 96px;
    padding: 14px 24px;
    text-align: left;
    box-sizing: border-box;
}

.race-detail-home-fact + .race-detail-home-fact {
    border-left: 1px solid rgba(255, 255, 255, .4);
}

.race-detail-home-fact svg {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    color: #ffffff;
}

.race-detail-home-fact span {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.race-detail-home-fact small {
    color: #aebed0;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    line-height: 1.2;
    text-transform: uppercase;
}

.race-detail-home-fact strong {
    color: #ffffff;
    font-family: "Arial Narrow", Arial, Helvetica, sans-serif;
    font-size: clamp(18px, 1.55vw, 25px);
    line-height: 1.12;
    overflow-wrap: anywhere;
}

.race-detail-content {
    width: min(calc(100% - 40px), 1180px);
    margin: 0 auto;
    padding: 24px 0 64px;
    box-sizing: border-box;
}

.race-detail-content .race-detail-panel,
.race-detail-content .race-detail-header-note,
.race-detail-content .race-detail-header-note-editor {
    border-radius: 7px;
}

.race-detail-content .race-detail-panel {
    border-color: #d9e1e9;
    box-shadow: 0 5px 14px rgba(7, 26, 45, .045);
}

.race-detail-content .race-detail-panel h2,
.race-detail-content .race-detail-header-note h2 {
    color: #071a2d;
    font-family: "Arial Narrow", Arial, Helvetica, sans-serif;
    font-weight: 900;
}

.race-detail-content .race-detail-header-note h2 {
    color: #ffffff;
}

.race-detail-overview-grid {
    margin-top: 0;
}

#race-detail-highlights,
#race-detail-race-info,
#race-detail-course-information,
#race-detail-participants,
#race-detail-results,
#race-question-helper {
    scroll-margin-top: 110px;
}

@media (max-width: 980px) {
    .race-detail-banner {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .race-detail-hero-main {
        padding: 44px max(24px, 7vw);
    }

    .race-detail-hero-side {
        min-height: 350px;
        padding: 36px;
    }

    .race-detail-logo-panel {
        width: min(62%, 340px);
    }

    .race-detail-home-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .race-detail-home-fact:nth-child(3) {
        border-left: 0;
        border-top: 1px solid rgba(255, 255, 255, .4);
    }

    .race-detail-home-fact:nth-child(4) {
        border-top: 1px solid rgba(255, 255, 255, .4);
    }
}

@media (max-width: 620px) {
    .race-detail-breadcrumbs,
    .race-detail-home-quick-panel,
    .race-detail-content {
        width: min(calc(100% - 24px), 1180px);
    }

    .race-detail-breadcrumbs {
        padding: 14px 0;
    }

    .race-detail-hero-main {
        display: block;
        padding: 34px 24px 40px;
    }

    .race-detail-date-card {
        width: 86px;
        margin-bottom: 22px;
    }

    .race-detail-banner h1,
    .race-detail-banner #race-detail-title {
        font-size: clamp(38px, 12vw, 52px) !important;
    }

    .race-detail-title-block > .race-detail-button-primary {
        width: 100%;
    }

    .race-detail-hero-side {
        min-height: 280px;
        padding: 30px 24px;
    }

    .race-detail-logo-panel {
        width: min(70%, 260px);
    }

    .race-detail-home-quick-links {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0 8px;
        padding: 12px 0 18px;
    }

    .race-detail-home-quick-links a {
        justify-content: flex-start;
        padding: 9px 4px;
        font-size: 11px;
    }

    .race-detail-home-facts {
        padding: 14px 12px;
    }

    .race-detail-home-fact {
        min-height: 112px;
        padding: 14px 10px;
        gap: 9px;
    }

    .race-detail-home-fact svg {
        flex-basis: 25px;
        width: 25px;
        height: 25px;
    }

    .race-detail-home-fact strong {
        font-size: 17px;
    }

    .race-detail-content {
        padding-top: 14px;
    }
}

.race-detail-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0 0 18px;
    font-size: 14px;
}

.race-detail-breadcrumbs a {
    color: #003a70;
    font-weight: 700;
    text-decoration: none;
}

.race-detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 22px;
    align-items: stretch;
    padding: 22px;
    border: 1px solid #062f58;
    border-left: 8px solid #c8102e;
    border-radius: 8px;
    background: #003a70;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.14);
    color: #ffffff;
    box-sizing: border-box;
}

.race-detail-hero-main {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    min-width: 0;
}

.race-detail-date-card {
    flex: 0 0 92px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 8px;
    background: #ffffff;
    color: #003a70;
    text-align: center;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.race-detail-date-month {
    display: block;
    padding: 7px 6px;
    background: #c8102e;
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
}

.race-detail-date-card strong {
    display: block;
    margin: 10px 0 4px;
    font-size: 42px;
    line-height: 1;
}

.race-detail-date-year {
    display: block;
    padding: 0 8px 11px;
    font-size: 14px;
    font-weight: 800;
}

.race-detail-title-block {
    min-width: 0;
    text-align: left;
}

.race-detail-kicker {
    display: block;
    margin: 1px 0 8px;
    color: #dbeafe;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.race-detail-hero h1,
.race-detail-hero #race-detail-title {
    margin: 0;
    color: #ffffff;
    font-size: 38px !important;
    line-height: 1.12 !important;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.race-detail-summary,
p.race-detail-summary {
    max-width: 700px;
    margin: 12px 0 0;
    color: #f3f6fb;
    font-size: 16px !important;
    line-height: 1.45 !important;
}

.race-detail-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.race-detail-header-facts {
    flex-direction: column;
    align-items: flex-start;
}

.race-detail-chip {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 32px;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.25;
    text-align: left;
    box-sizing: border-box;
}

.race-detail-hero-side {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    min-width: 0;
}

.race-detail-hero-side .race-detail-button {
    width: 100%;
    justify-content: center;
    text-align: center;
}

.race-detail-header-note {
    margin: 16px 0 0;
    padding: 16px 18px;
    border: 1px solid #9f1026;
    border-left: 8px solid #6f0917;
    border-radius: 8px;
    background: #c8102e;
    box-shadow: 0 8px 18px rgba(153, 27, 27, 0.18);
    color: #ffffff;
}

.race-detail-header-note h2 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 21px;
    line-height: 1.2;
}

.race-detail-header-note-content {
    color: #ffffff;
    font-size: 16px;
    line-height: 1.5;
}

.race-detail-header-note-content p,
.race-detail-header-note-content ul,
.race-detail-header-note-content ol {
    margin: 0 0 10px;
}

.race-detail-header-note-content p:last-child,
.race-detail-header-note-content ul:last-child,
.race-detail-header-note-content ol:last-child {
    margin-bottom: 0;
}

.race-detail-header-note-content a {
    color: #ffffff;
    font-weight: 900;
    text-decoration: underline;
}

.race-detail-header-note-editor {
    margin: 12px 0 0;
    padding: 14px;
    border: 1px solid #d7dfe8;
    border-left: 8px solid #c8102e;
    border-radius: 8px;
    background: #ffffff;
    box-sizing: border-box;
}

.race-detail-header-note-editor summary {
    align-items: center;
    color: #003a70;
    cursor: pointer;
    display: flex;
    font-size: 17px;
    font-weight: 900;
    gap: 8px;
    line-height: 1.25;
}

.race-detail-header-note-editor-form {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.race-detail-header-note-editor label {
    color: #003a70;
    display: grid;
    font-size: 13px;
    font-weight: 800;
    gap: 6px;
}

.race-detail-header-note-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.race-detail-header-note-toolbar button {
    background: #f8fafc;
    border: 1px solid #b9c8da;
    border-radius: 6px;
    color: #003a70;
    cursor: pointer;
    font-size: 12px;
    font-weight: 900;
    min-height: 30px;
    padding: 5px 9px;
}

.race-detail-header-note-toolbar button:hover,
.race-detail-header-note-toolbar button:focus {
    background: #c8102e;
    border-color: #c8102e;
    color: #ffffff;
}

.race-detail-header-note-editor textarea {
    border: 1px solid #b9c8da;
    border-radius: 6px;
    box-sizing: border-box;
    color: #172033;
    font: inherit;
    min-height: 132px;
    padding: 8px;
    resize: vertical;
    width: 100%;
}

.race-detail-header-note-editor-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.race-detail-header-note-save {
    background: #c8102e;
    border: 1px solid #c8102e;
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 900;
    min-height: 38px;
    padding: 8px 12px;
}

.race-detail-header-note-status {
    border-radius: 6px;
    font-size: 13px;
    font-weight: 800;
    padding: 8px 10px;
}

.race-detail-header-note-status.is-success {
    background: #eef9f0;
    border: 1px solid #9fd2a7;
    color: #195a27;
}

.race-detail-header-note-status.is-error {
    background: #fff3f3;
    border: 1px solid #e5a4a4;
    color: #8a1d1d;
}

.race-detail-panel,
.race-detail-logo-panel {
    border: 1px solid #d9dee7;
    border-radius: 8px;
    background: #ffffff;
    box-sizing: border-box;
}

.race-detail-logo-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 214px;
    padding: 14px;
    text-align: center;
}

.race-detail-logo-panel img {
    width: 100%;
    max-width: 220px;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
}

.race-detail-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border: 1px solid #003a70;
    border-radius: 6px;
    background: #003a70;
    color: #ffffff !important;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
}

.race-detail-button:hover,
.race-detail-button:focus {
    border-color: #c8102e;
    background: #c8102e;
    color: #ffffff !important;
}

.race-detail-hero .race-detail-button-primary {
    border-color: #ffffff;
    background: #ffffff;
    color: #003a70 !important;
}

.race-detail-hero .race-detail-button-primary:hover,
.race-detail-hero .race-detail-button-primary:focus {
    border-color: #c8102e;
    background: #c8102e;
    color: #ffffff !important;
}

.race-detail-button-secondary {
    border-color: rgba(255, 255, 255, 0.65);
    background: transparent;
    color: #ffffff !important;
}

.race-detail-button-secondary:hover,
.race-detail-button-secondary:focus {
    border-color: #ffffff;
    background: #ffffff;
    color: #003a70 !important;
}

.race-detail-hero a.race-detail-button-primary.usrr-action-public {
    border-color: #ffffff !important;
    background: #ffffff !important;
    color: #003a70 !important;
}

.race-detail-hero a.race-detail-button-primary.usrr-action-public:hover,
.race-detail-hero a.race-detail-button-primary.usrr-action-public:focus {
    border-color: #c8102e !important;
    background: #c8102e !important;
    color: #ffffff !important;
}

.race-detail-hero a.race-detail-button-secondary.usrr-action-public {
    border-color: rgba(255, 255, 255, 0.65) !important;
    background: transparent !important;
    color: #ffffff !important;
}

.race-detail-hero a.race-detail-button-secondary.usrr-action-public:hover,
.race-detail-hero a.race-detail-button-secondary.usrr-action-public:focus {
    border-color: #ffffff !important;
    background: #ffffff !important;
    color: #003a70 !important;
}

.race-detail-overview-grid,
.race-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.race-detail-main-panel {
    grid-column: span 2;
}

.race-detail-grid-single .race-detail-main-panel {
    grid-column: 1 / -1;
}

.race-detail-panel {
    padding: 20px;
    text-align: left;
}

.race-detail-highlights-panel {
    grid-column: span 2;
}

.race-detail-directions-links {
    display: grid;
    gap: 10px;
}

.race-detail-directions-note {
    margin: 0 0 14px;
    line-height: 1.5;
}

.race-detail-directions-links .race-detail-button {
    width: 100%;
    padding: 0 14px;
}

.race-detail-panel h2,
.race-detail-panel h3 {
    margin: 0 0 12px;
    color: #003a70;
    font-size: 22px;
    line-height: 1.2;
    text-align: left;
}

.race-detail-list {
    margin: 0;
    padding-left: 20px;
}

.race-detail-list li {
    margin: 0 0 9px;
}

.race-detail-list a {
    color: #003a70;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.race-detail-links {
    display: grid;
    gap: 10px;
}

.race-detail-links a {
    color: #003a70;
    font-weight: 700;
    text-decoration: none;
}

.race-detail-information-cards {
    grid-column: 1 / -1;
    display: grid;
    gap: 16px;
}

.race-detail-usrr-intro p {
    margin: 0 0 12px;
    color: #374151;
    font-size: 17px;
    line-height: 1.55;
}

.race-detail-usrr-intro p:last-child {
    margin-bottom: 0;
}

.race-detail-feedback-panel {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.race-detail-feedback-panel p {
    margin: 0;
    color: #374151;
    font-size: 16px;
    line-height: 1.4;
}

.race-detail-feedback-panel .race-detail-button {
    flex: 0 0 auto;
}

.race-detail-collapsible {
    padding: 0;
}

.race-detail-collapsible > summary {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 58px;
    padding: 16px 48px 16px 20px;
    color: #003a70;
    cursor: pointer;
    font-weight: 800;
    list-style: none;
}

.race-detail-collapsible > summary::-webkit-details-marker {
    display: none;
}

.race-detail-collapsible > summary::after {
    position: absolute;
    top: 50%;
    right: 20px;
    width: 14px;
    height: 14px;
    border-right: 3px solid #003a70;
    border-bottom: 3px solid #003a70;
    content: "";
    transform: translateY(-64%) rotate(45deg);
    transition: transform 0.18s ease;
}

.race-detail-collapsible[open] > summary::after {
    transform: translateY(-36%) rotate(225deg);
}

.race-detail-collapsible > summary h2,
.race-detail-collapsible-title {
    margin: 0;
    color: #003a70;
    font-size: 22px;
    line-height: 1.2;
}

.race-detail-title-with-logo {
    align-items: center;
    display: inline-flex;
    gap: 8px;
}

.race-detail-title-logo {
    display: block;
    flex: 0 0 auto;
    height: 20px;
    object-fit: contain;
    width: 34px;
}

.race-detail-course-time-limit {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 4px 9px;
    border: 1px solid #d9dee7;
    border-radius: 6px;
    background: #f8fafc;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.race-detail-collapsible-body {
    padding: 0 20px 20px;
}

.race-detail-participants,
.race-detail-results {
    grid-column: 1 / -1;
}

.race-detail-results-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.race-detail-results-heading h2 {
    margin-bottom: 0;
}

.race-detail-results-count {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 4px 9px;
    border: 1px solid #d9dee7;
    border-radius: 6px;
    background: #f8fafc;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
}

.race-detail-results-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
    margin-bottom: 12px;
}

.race-detail-results-toolbar.has-result-date {
    grid-template-columns: minmax(170px, 220px) minmax(0, 1fr) auto;
}

.race-detail-results-date label {
    display: block;
    margin-bottom: 6px;
    color: #4b5563;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.race-detail-results-date select {
    width: 100%;
    min-height: 42px;
    border: 1px solid #bdc9d8;
    border-radius: 6px;
    padding: 8px 32px 8px 11px;
    background: #ffffff;
    color: #111827;
    font-size: 16px;
    line-height: 1.25;
    box-sizing: border-box;
}

.race-detail-results-search label {
    display: block;
    margin-bottom: 6px;
    color: #4b5563;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.race-detail-results-search input {
    width: 100%;
    min-height: 42px;
    border: 1px solid #bdc9d8;
    border-radius: 6px;
    padding: 8px 11px;
    color: #111827;
    font-size: 16px;
    line-height: 1.25;
    box-sizing: border-box;
}

.race-detail-results-search input:disabled {
    background: #f1f5f9;
    color: #64748b;
}

.race-detail-results-refresh {
    min-height: 42px;
    padding: 8px 14px;
    border: 1px solid #003a70;
    border-radius: 6px;
    background: #003a70;
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    cursor: pointer;
}

.race-detail-results-refresh:hover,
.race-detail-results-refresh:focus {
    border-color: #c8102e;
    background: #c8102e;
}

.race-detail-results-refresh:disabled {
    cursor: wait;
    opacity: 0.72;
}

.race-detail-results-note,
.race-detail-results-status,
.race-detail-results-empty {
    padding: 12px 14px;
    border: 1px solid #d9dee7;
    border-left: 5px solid #003a70;
    border-radius: 6px;
    background: #f8fafc;
    color: #334155;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

.race-detail-results-note {
    margin-bottom: 12px;
}

.race-detail-results-status.is-error {
    border-left-color: #c8102e;
}

.race-detail-results-table-wrap {
    overflow-x: auto;
}

.race-detail-results-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
}

.race-detail-results-table th,
.race-detail-results-table td {
    padding: 10px;
    border-bottom: 1px solid #eef2f6;
    text-align: left;
    font-size: 15px;
    overflow-wrap: anywhere;
}

.race-detail-results-table th {
    background: #003a70;
    color: #ffffff;
}

.race-detail-results-sort {
    width: 100%;
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 800;
    text-align: inherit;
    cursor: pointer;
}

.race-detail-results-sort:hover,
.race-detail-results-sort:focus {
    text-decoration: underline;
}

.race-detail-results-medal {
    display: inline-block;
    font-weight: 800;
    white-space: nowrap;
}

.race-detail-results-table th:nth-child(1),
.race-detail-results-table td:nth-child(1),
.race-detail-results-table th:nth-child(4),
.race-detail-results-table td:nth-child(4),
.race-detail-results-table th:nth-child(7),
.race-detail-results-table td:nth-child(7),
.race-detail-results-table th:nth-child(9),
.race-detail-results-table td:nth-child(9) {
    text-align: right;
}

.race-detail-results-table th:nth-child(5),
.race-detail-results-table td:nth-child(5),
.race-detail-results-table th:nth-child(8),
.race-detail-results-table td:nth-child(8),
.race-detail-results-table th:nth-child(10),
.race-detail-results-table td:nth-child(10) {
    text-align: center;
}

.race-detail-result-time-stack {
    display: grid;
    gap: 3px;
    line-height: 1.15;
}

.race-detail-result-time-line {
    display: grid;
    gap: 1px;
}

.race-detail-result-time-label {
    color: #64748b;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.race-detail-result-time-value {
    color: #1f2933;
    font-size: 12px;
    font-weight: 900;
}

.race-detail-result-photo-button,
.race-detail-result-laps-button {
    align-items: center;
    background: #003a70;
    border: 0;
    border-radius: 8px;
    box-sizing: border-box;
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    font-size: 12px;
    font-weight: 900;
    height: 34px;
    justify-content: center;
    line-height: 1.1;
    min-height: 0;
    padding: 0 10px;
    text-decoration: none;
    vertical-align: middle;
}

.race-detail-result-photo-button:hover,
.race-detail-result-photo-button:focus,
.race-detail-result-laps-button:hover,
.race-detail-result-laps-button:focus {
    background: #c8102e;
}

.result-laps-modal[hidden],
.result-photo-modal[hidden],
.result-laps-start-card[hidden],
.result-photo-modal-empty[hidden] {
    display: none;
}

.result-laps-modal,
.result-photo-modal {
    align-items: center;
    background: rgba(15, 23, 42, 0.72);
    bottom: 0;
    display: flex;
    justify-content: center;
    left: 0;
    padding: 18px;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 10000;
}

.result-laps-modal-panel,
.result-photo-modal-panel {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.24);
    max-height: min(720px, 92vh);
    max-width: 640px;
    overflow: auto;
    padding: 18px;
    width: min(100%, 640px);
}

.result-photo-modal-panel {
    max-width: 860px;
    width: min(100%, 860px);
}

.result-laps-modal-header,
.result-photo-modal-header {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 12px;
}

.result-laps-modal-title,
.result-photo-modal-title {
    color: #003a70;
    font-size: 20px;
    margin: 0;
}

.result-laps-modal-close,
.result-photo-modal-close {
    align-items: center;
    background: #c8102e;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    font-size: 24px;
    font-weight: 900;
    height: 36px;
    justify-content: center;
    line-height: 1;
    width: 36px;
}

.result-photo-modal-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.result-photo-modal-photo {
    border: 1px solid #d9dee7;
    border-radius: 8px;
    color: #1f2933;
    display: grid;
    font-size: 12px;
    font-weight: 800;
    gap: 6px;
    padding: 8px;
    text-decoration: none;
}

.result-photo-modal-photo img {
    aspect-ratio: 4 / 5;
    background: #f8fafc;
    border-radius: 6px;
    display: block;
    object-fit: cover;
    width: 100%;
}

.result-laps-start-card {
    border: 1px solid #d9dee7;
    border-radius: 8px;
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
    padding: 12px;
}

.result-laps-start-item,
.result-laps-row {
    border: 1px solid #d9dee7;
    border-radius: 8px;
    padding: 10px 12px;
}

.result-laps-start-label,
.result-laps-row-title {
    color: #003a70;
    font-weight: 900;
}

.result-laps-start-value,
.result-laps-row-meta {
    color: #1f2933;
    font-size: 14px;
    font-weight: 800;
    margin-top: 3px;
}

.result-laps-start-note,
.result-laps-row-note,
.result-photo-modal-empty {
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
    margin-top: 5px;
}

.result-laps-list {
    display: grid;
    gap: 10px;
}

.race-detail-results-table.race-detail-participants-table th,
.race-detail-results-table.race-detail-participants-table td {
    text-align: left;
}

.race-detail-results-table.race-detail-participants-table th:nth-child(3),
.race-detail-results-table.race-detail-participants-table td:nth-child(3),
.race-detail-results-table.race-detail-participants-table th:nth-child(5),
.race-detail-results-table.race-detail-participants-table td:nth-child(5) {
    text-align: right;
}

.race-detail-results-table.race-detail-participants-table th:nth-child(4),
.race-detail-results-table.race-detail-participants-table td:nth-child(4) {
    text-align: center;
}

.race-detail-results-row[hidden],
.race-detail-participants-row[hidden],
.race-detail-results-empty[hidden],
.race-detail-results-table-wrap[hidden],
.race-detail-results-note[hidden],
.race-detail-results-status[hidden] {
    display: none;
}

.race-detail-course-maps {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.race-detail-course-status {
    padding: 12px 14px;
    border: 1px solid #d9dee7;
    border-left: 5px solid #003a70;
    border-radius: 6px;
    background: #f8fafc;
    color: #334155;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

.race-detail-course-status.is-error {
    border-left-color: #c8102e;
}

.race-detail-course-list {
    display: grid;
    gap: 14px;
}

.race-detail-course-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid #d9dee7;
    border-radius: 8px;
    background: #ffffff;
}

.race-detail-course-title {
    display: block;
    color: #003a70;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.3;
}

.race-detail-course-meta,
.race-detail-course-note {
    display: block;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.4;
}

.race-detail-course-links {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.race-detail-course-links a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid #003a70;
    border-radius: 6px;
    color: #003a70;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
}

.race-detail-course-links a:hover,
.race-detail-course-links a:focus {
    border-color: #c8102e;
    background: #c8102e;
    color: #ffffff;
}

.race-detail-course-map {
    min-height: 310px;
    height: 34vw;
    max-height: 390px;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #e5e7eb;
}

.race-detail-course-map-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    padding: 18px;
    color: #475569;
    font-weight: 700;
    text-align: center;
    box-sizing: border-box;
}

.race-detail-course-tooltip {
    font-weight: 800;
}

.race-detail-faq-chat-grid {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.race-detail-chatbot {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.race-detail-chatbot h2 {
    margin-bottom: 0;
}

.race-detail-chat-log {
    display: flex;
    flex-direction: column;
    gap: 9px;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 3px;
}

.race-detail-chat-message {
    border-radius: 8px;
    padding: 10px 12px;
    line-height: 1.45;
}

.race-detail-chat-message-user {
    align-self: flex-end;
    max-width: 88%;
    background: #c8102e;
    color: #ffffff;
    font-weight: 700;
}

.race-detail-chat-message-bot {
    align-self: flex-start;
    max-width: 94%;
    background: #f1f5f9;
    color: #1f2937;
}

.race-detail-chat-message-bot a {
    color: #9f1239;
    font-weight: 800;
}

.race-detail-chat-form {
    display: grid;
    gap: 8px;
}

.race-detail-chat-form textarea {
    width: 100%;
    min-height: 88px;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 12px;
    font: inherit;
    resize: vertical;
}

.race-detail-chat-form button {
    width: 100%;
}

.race-detail-chat-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
}

.race-detail-chat-small-button {
    min-height: 34px;
    padding: 6px 9px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    color: #003a70;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
}

.race-detail-chat-small-button:hover,
.race-detail-chat-small-button:focus {
    border-color: #003a70;
    background: #003a70;
    color: #ffffff;
}

.race-detail-chat-followup {
    display: grid;
    gap: 9px;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
}

.race-detail-chat-followup[hidden] {
    display: none;
}

.race-detail-chat-followup-title {
    margin: 0;
    color: #003a70;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.25;
}

.race-detail-chat-followup label {
    display: grid;
    gap: 4px;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.race-detail-chat-followup input {
    width: 100%;
    min-height: 38px;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 8px 9px;
    font: inherit;
}

.race-detail-chat-status {
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
    min-height: 18px;
}

@media (max-width: 820px) {
    .race-detail-hero,
    .race-detail-overview-grid,
    .race-detail-grid,
    .race-detail-faq-chat-grid {
        grid-template-columns: 1fr;
    }

    .race-detail-feedback-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .race-detail-feedback-panel .race-detail-button {
        width: 100%;
    }

    .race-detail-main-panel,
    .race-detail-highlights-panel,
    .race-detail-grid-single .race-detail-main-panel {
        grid-column: auto;
    }

    .race-detail-panel {
        padding: 16px;
    }

    .race-detail-panel h2,
    .race-detail-panel h3 {
        font-size: 22px !important;
        line-height: 1.2 !important;
    }

    .race-detail-usrr-intro p,
    .race-detail-feedback-panel p,
    .race-detail-list li,
    .race-detail-links a {
        font-size: 15px !important;
        line-height: 1.45 !important;
    }

    .race-detail-feedback-panel .race-detail-button {
        font-size: 15px !important;
        min-height: 42px;
    }

    .race-detail-hero h1,
    .race-detail-hero #race-detail-title {
        font-size: 30px !important;
    }
}

@media (max-width: 520px) {
    .race-detail-hero {
        padding: 16px;
    }

    .race-detail-hero-main {
        flex-direction: column;
        gap: 14px;
    }

    .race-detail-date-card {
        width: 96px;
        flex-basis: auto;
    }

    .race-detail-hero h1,
    .race-detail-hero #race-detail-title {
        font-size: 27px !important;
    }

    .race-detail-summary,
    p.race-detail-summary {
        font-size: 15px !important;
        line-height: 1.4 !important;
    }

    .race-detail-logo-panel {
        min-height: 176px;
    }

    .race-detail-logo-panel img {
        max-width: 170px;
    }

    .race-detail-results-heading {
        flex-direction: column;
    }

    .race-detail-collapsible > summary.race-detail-course-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .race-detail-course-time-limit {
        white-space: normal;
    }

    .race-detail-results-toolbar {
        grid-template-columns: 1fr;
    }

    .race-detail-results-toolbar.has-result-date {
        grid-template-columns: 1fr;
    }

    .race-detail-results-refresh {
        width: 100%;
    }

    .race-detail-results-table-wrap {
        overflow: visible;
    }

    .race-detail-results-table,
    .race-detail-results-table thead,
    .race-detail-results-table tbody,
    .race-detail-results-table tr,
    .race-detail-results-table td {
        display: block;
        width: 100%;
    }

    .race-detail-results-table thead {
        display: none;
    }

    .race-detail-results-table tr {
        border: 1px solid #d9dee7;
        border-radius: 8px;
        margin-bottom: 12px;
        overflow: hidden;
    }

    .race-detail-results-table td {
        border-bottom: 0;
        border-top: 1px solid #eef2f6;
        text-align: left !important;
    }

    .race-detail-results-table td:first-child {
        border-top: 0;
    }

    .race-detail-results-table td::before {
        display: block;
        margin-bottom: 3px;
        color: #64748b;
        content: attr(data-label);
        font-size: 12px;
        font-weight: 800;
        text-transform: uppercase;
    }

    .race-detail-course-map {
        min-height: 250px;
        height: 68vw;
    }
}

/* Keep the home-layout rules authoritative over the legacy race-card rules above. */
.race-detail-wrap {
    width: 100%;
    margin: 0;
    padding: 0;
}

.race-detail-breadcrumbs {
    width: min(calc(100% - 40px), 1180px);
    margin: 0 auto;
    padding: 20px 0 18px;
}

.race-detail-banner {
    grid-template-columns: minmax(0, .95fr) minmax(460px, 1.15fr);
    gap: 0;
    width: 100%;
    max-width: 1600px;
    min-height: 520px;
    margin: 0 auto;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
    color: #071a2d;
}

.race-detail-hero-main {
    align-items: flex-start;
    align-self: center;
    gap: 20px;
    padding: clamp(42px, 6vw, 92px) clamp(30px, 5vw, 82px);
}

.race-detail-date-card {
    flex-basis: 92px;
    border-color: #d7dfe8;
    border-radius: 7px;
    box-shadow: 0 8px 20px rgba(7, 26, 45, .12);
}

.race-detail-date-month {
    background: #ed1c2e;
}

.race-detail-kicker {
    margin: 1px 0 14px;
    color: #ed1c2e;
    letter-spacing: .16em;
}

.race-detail-banner h1,
.race-detail-banner #race-detail-title {
    max-width: 690px;
    color: #071a2d;
    font-family: "Arial Narrow", Arial, Helvetica, sans-serif;
    font-size: clamp(42px, 4.7vw, 66px) !important;
    letter-spacing: -.035em;
    line-height: .99 !important;
}

.race-detail-summary,
p.race-detail-summary {
    max-width: 590px;
    margin: 24px 0 0;
    color: #435468;
    font-size: clamp(17px, 1.5vw, 20px) !important;
    line-height: 1.55 !important;
}

.race-detail-header-facts {
    flex-direction: row;
    align-items: center;
    margin-top: 20px;
}

.race-detail-chip {
    min-height: 30px;
    border-color: #d7dfe8;
    border-radius: 5px;
    background: #f5f8fb;
    color: #173750;
    font-size: 13px;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.race-detail-hero-side {
    position: relative;
    align-items: center;
    justify-content: center;
    min-height: 520px;
    padding: clamp(38px, 5vw, 72px);
    overflow: hidden;
    background: linear-gradient(135deg, #eef3f8 0%, #dce6ef 100%);
}

.race-detail-logo-panel {
    z-index: 2;
    width: min(78%, 430px);
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.race-detail-logo-panel img {
    width: 100%;
    max-width: 430px;
}

.race-detail-overview-grid {
    margin-top: 0;
}

@media (max-width: 980px) {
    .race-detail-banner {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .race-detail-hero-main {
        padding: 44px max(24px, 7vw);
    }

    .race-detail-hero-side {
        min-height: 350px;
        padding: 36px;
    }

    .race-detail-logo-panel,
    .race-detail-logo-panel img {
        width: min(62%, 340px);
        max-width: 340px;
    }
}

@media (max-width: 620px) {
    .race-detail-breadcrumbs,
    .race-detail-home-quick-panel,
    .race-detail-content {
        width: min(calc(100% - 24px), 1180px);
    }

    .race-detail-breadcrumbs {
        padding: 14px 0;
    }

    .race-detail-hero-main {
        display: block;
        padding: 34px 24px 40px;
    }

    .race-detail-date-card {
        width: 86px;
        margin-bottom: 22px;
    }

    .race-detail-banner h1,
    .race-detail-banner #race-detail-title {
        font-size: clamp(38px, 12vw, 52px) !important;
    }

    .race-detail-hero-side {
        min-height: 280px;
        padding: 30px 24px;
    }

    .race-detail-logo-panel,
    .race-detail-logo-panel img {
        width: min(70%, 260px);
        max-width: 260px;
    }
}

/* ===== WIDE, COMPACT HOME-LAYOUT REFINEMENT ===== */
.race-detail-breadcrumbs,
.race-detail-home-quick-panel,
.race-detail-content {
    width: min(calc(100% - 48px), 1600px);
}

.race-detail-breadcrumbs {
    padding: 14px 0;
}

.race-detail-banner {
    grid-template-columns: minmax(0, 1.22fr) minmax(380px, .78fr);
    min-height: 430px;
}

.race-detail-hero-main {
    gap: 18px;
    padding: 34px clamp(28px, 3.2vw, 54px);
}

.race-detail-date-card {
    flex-basis: 78px;
}

.race-detail-date-month {
    padding: 5px;
    font-size: 13px;
}

.race-detail-date-card strong {
    margin: 8px 0 3px;
    font-size: 34px;
}

.race-detail-date-year {
    padding-bottom: 9px;
    font-size: 12px;
}

.race-detail-kicker {
    margin-bottom: 10px;
}

.race-detail-banner h1,
.race-detail-banner #race-detail-title {
    max-width: 820px;
    font-size: clamp(38px, 3.2vw, 54px) !important;
    line-height: 1.02 !important;
}

.race-detail-summary,
p.race-detail-summary {
    max-width: 760px;
    margin-top: 16px;
    font-size: 17px !important;
    line-height: 1.45 !important;
}

.race-detail-header-facts {
    margin-top: 14px;
}

.race-detail-title-block > .race-detail-button-primary {
    min-height: 46px;
    margin-top: 18px;
}

.race-detail-hero-side {
    min-height: 430px;
    padding: 28px;
}

.race-detail-logo-panel,
.race-detail-logo-panel img {
    width: min(76%, 320px);
    max-width: 320px;
}

.race-detail-home-quick-links {
    padding: 8px 0 14px;
}

.race-detail-home-facts {
    padding: 16px max(24px, calc((100vw - 1600px) / 2));
}

.race-detail-home-fact {
    min-height: 82px;
    padding: 10px 28px;
}

.race-detail-content {
    padding: 32px 0 68px;
}

.race-detail-content .race-detail-panel,
.race-detail-content .race-detail-header-note,
.race-detail-content .race-detail-header-note-editor {
    border-radius: 0;
    box-shadow: none;
}

.race-detail-content .race-detail-panel {
    border: 0;
}

.race-detail-overview-grid,
.race-detail-grid {
    gap: 0;
    border-top: 1px solid #d9e1e9;
    border-bottom: 1px solid #d9e1e9;
}

.race-detail-overview-grid {
    margin-top: 0;
}

.race-detail-grid {
    margin-top: 30px;
}

.race-detail-panel {
    padding: clamp(28px, 3vw, 44px);
}

.race-detail-highlights-panel,
.race-detail-main-panel {
    border-right: 1px solid #d9e1e9 !important;
}

.race-detail-related-panel,
.race-detail-directions-panel {
    background: #f7f9fc;
}

.race-detail-content .race-detail-panel h2,
.race-detail-content .race-detail-header-note h2 {
    font-size: clamp(24px, 2vw, 32px);
}

.race-detail-content .race-detail-panel > h2::before {
    display: block;
    width: 42px;
    height: 3px;
    margin-bottom: 13px;
    background: #ed1c2e;
    content: "";
}

.race-detail-highlights-panel .race-detail-list {
    columns: 2;
    column-gap: 42px;
}

.race-detail-highlights-panel .race-detail-list li {
    break-inside: avoid;
}

#race-detail-race-info > .race-detail-main-panel .race-detail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 38px;
}

.race-detail-information-cards {
    gap: 0;
    border-top: 1px solid #d9e1e9;
}

.race-detail-information-cards > .race-detail-panel {
    border-bottom: 1px solid #d9e1e9;
}

.race-detail-usrr-intro {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    background: #f7f9fc !important;
}

.race-detail-usrr-intro h2 {
    grid-column: 1 / -1;
}

.race-detail-usrr-intro p {
    margin: 0;
    padding: 0 30px;
}

.race-detail-usrr-intro p:first-of-type {
    padding-left: 0;
}

.race-detail-usrr-intro p + p {
    border-left: 1px solid #d9e1e9;
}

.race-detail-collapsible {
    border-bottom: 1px solid #d9e1e9 !important;
}

.race-detail-collapsible > summary {
    min-height: 72px;
    padding: 20px 64px 20px 34px;
}

.race-detail-collapsible > summary::before {
    position: absolute;
    top: 50%;
    left: 0;
    width: 4px;
    height: 34px;
    background: #ed1c2e;
    content: "";
    transform: translateY(-50%);
}

.race-detail-collapsible > summary::after {
    right: 34px;
}

.race-detail-collapsible-body {
    padding: 0 34px 32px;
}

.race-detail-faq-chat-grid {
    margin-top: 34px;
    padding: clamp(34px, 4vw, 56px);
    background: #061f37;
}

.race-detail-faq-chat-grid .race-detail-chatbot {
    width: min(100%, 1240px);
    margin: 0 auto;
    padding: 0;
    background: transparent;
}

.race-detail-faq-chat-grid .race-detail-chatbot h2 {
    color: #ffffff;
}

.race-detail-faq-chat-grid .race-detail-chatbot h2::before {
    background: #ed1c2e;
}

.race-detail-faq-chat-grid .race-detail-chat-status {
    color: #d2ddea;
}

@media (max-width: 1100px) {
    .race-detail-banner {
        grid-template-columns: minmax(0, 1fr) minmax(340px, .72fr);
    }

    .race-detail-banner h1,
    .race-detail-banner #race-detail-title {
        font-size: clamp(36px, 4.5vw, 48px) !important;
    }

    .race-detail-home-fact {
        padding-inline: 18px;
    }
}

@media (max-width: 980px) {
    .race-detail-breadcrumbs,
    .race-detail-home-quick-panel,
    .race-detail-content {
        width: min(calc(100% - 32px), 1600px);
    }

    .race-detail-banner {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .race-detail-hero-main {
        padding: 36px max(24px, 6vw);
    }

    .race-detail-hero-side {
        min-height: 260px;
        padding: 24px;
    }

    .race-detail-logo-panel,
    .race-detail-logo-panel img {
        width: min(60%, 250px);
        max-width: 250px;
    }

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

    .race-detail-main-panel,
    .race-detail-highlights-panel,
    .race-detail-grid-single .race-detail-main-panel {
        grid-column: auto;
        border-right: 0 !important;
    }

    .race-detail-related-panel,
    .race-detail-directions-panel {
        border-top: 1px solid #d9e1e9 !important;
    }

    .race-detail-information-cards,
    .race-detail-faq-chat-grid {
        grid-column: auto;
    }

    .race-detail-usrr-intro {
        grid-template-columns: 1fr;
    }

    .race-detail-usrr-intro h2 {
        grid-column: auto;
    }

    .race-detail-usrr-intro p,
    .race-detail-usrr-intro p:first-of-type {
        padding: 16px 0;
    }

    .race-detail-usrr-intro p + p {
        border-top: 1px solid #d9e1e9;
        border-left: 0;
    }
}

@media (max-width: 620px) {
    .race-detail-breadcrumbs,
    .race-detail-home-quick-panel,
    .race-detail-content {
        width: min(calc(100% - 24px), 1600px);
    }

    .race-detail-hero-main {
        padding: 28px 22px 32px;
    }

    .race-detail-banner h1,
    .race-detail-banner #race-detail-title {
        font-size: clamp(34px, 10.5vw, 46px) !important;
    }

    .race-detail-hero-side {
        min-height: 220px;
    }

    .race-detail-logo-panel,
    .race-detail-logo-panel img {
        width: min(66%, 210px);
        max-width: 210px;
    }

    .race-detail-home-fact {
        min-height: 100px;
        padding: 12px 10px;
    }

    .race-detail-panel {
        padding: 24px 18px;
    }

    .race-detail-highlights-panel .race-detail-list {
        columns: 1;
    }

    #race-detail-race-info > .race-detail-main-panel .race-detail-list {
        grid-template-columns: 1fr;
    }

    .race-detail-collapsible > summary {
        min-height: 64px;
        padding: 16px 48px 16px 18px;
    }

    .race-detail-collapsible > summary::after {
        right: 18px;
    }

    .race-detail-collapsible-body {
        padding: 0 18px 24px;
    }

    .race-detail-faq-chat-grid {
        margin-top: 24px;
        padding: 28px 18px;
    }
}
