.driver-insights { margin-top: 0; }

.driver-insights__header,
.driver-rivals > header {
    margin-bottom: 20px;
}

.driver-insights__header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
}

.driver-insights__header h2,
.driver-rivals h2 {
    margin: 4px 0 6px;
    font-size: clamp(2rem, 4vw, 3.3rem);
    line-height: .95;
    text-transform: uppercase;
}

.driver-insights__header p,
.driver-rivals > header p {
    margin: 0;
    max-width: 760px;
}

.driver-insights__order {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 15px;
    border: 0;
    background: #3f4f2f;
    color: #fff;
    cursor: pointer;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.driver-insights__order:hover,
.driver-insights__order:focus-visible {
    background: #243619;
    outline: 3px solid rgba(231, 185, 91, .55);
    outline-offset: 2px;
}

.driver-insights__order i {
    color: #e7b95b;
    font-size: 1rem;
    font-style: normal;
}

.driver-insights__charts {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
}

.driver-insight-chart,
.driver-rivals {
    border-top: 4px solid #3f4f2f;
    background: #fbf7ee;
    box-shadow: 0 18px 42px rgba(23, 32, 40, .08);
}

.driver-insight-chart > header {
    padding: 22px 24px 4px;
}

.driver-insight-chart h3 {
    margin: 0;
    font-size: 1.3rem;
    text-transform: uppercase;
}

.driver-insight-chart header p {
    margin: 4px 0 0;
    color: #53606b;
    font-size: .85rem;
}

.driver-insight-chart__stage {
    min-height: 274px;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    overflow: hidden;
    padding: 0;
}

.driver-chart__fixed-axis {
    position: relative;
    z-index: 2;
    height: 274px;
    border-right: 1px solid #d9d0c0;
    background: #fbf7ee;
}

.driver-chart__fixed-axis span {
    position: absolute;
    right: 9px;
    color: #53606b;
    font: 12px/1.2 system-ui, sans-serif;
    transform: translateY(-50%);
}

.driver-chart__plot-scroll {
    min-width: 0;
    overflow-x: auto;
    padding-right: 12px;
    scrollbar-color: #3f4f2f #e8dfce;
}

.driver-chart__plot-scroll svg {
    display: block;
    min-width: 100%;
    height: 210px;
}

.driver-chart__championship-timeline {
    position: relative;
    height: 64px;
    border-top: 1px solid #d9d0c0;
    background: #f4eddd;
}

.driver-chart__championship-bar {
    position: absolute;
    display: block;
    height: 21px;
    overflow: hidden;
    padding: 3px 8px;
    border-left: 3px solid #e7b95b;
    background: #3f4f2f;
    color: #fff;
    font: 700 10px/15px system-ui, sans-serif;
    letter-spacing: .02em;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.driver-chart__championship-bar:hover,
.driver-chart__championship-bar:focus-visible {
    background: #243619;
    outline: 2px solid #e7b95b;
    outline-offset: 1px;
}

.driver-insight-chart__fallback {
    grid-column: 1 / -1;
    margin: 58px 24px;
    text-align: center;
}

.driver-insight-chart__stage.is-ready .driver-insight-chart__fallback {
    display: none;
}

.driver-chart__grid {
    stroke: #d9d0c0;
    stroke-width: 1;
}

.driver-chart__axis-label,
.driver-chart__date-label {
    fill: #53606b;
    font: 12px/1.2 system-ui, sans-serif;
}

.driver-chart__line {
    fill: none;
    stroke: #3f4f2f;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 4;
}

.driver-chart__point circle {
    fill: #e7b95b;
    stroke: #3f4f2f;
    stroke-width: 3;
    transition: r .15s ease, fill .15s ease;
}

.driver-chart__point--peak circle {
    fill: #b33b32;
    stroke: #7f1f1a;
    stroke-width: 4;
    r: 7px;
}

.driver-chart__point-link {
    cursor: pointer;
}

.driver-chart__point circle:hover,
.driver-chart__point-link:focus .driver-chart__point circle {
    r: 8px;
    fill: #fff4d4;
    outline: none;
}

.driver-rivals__method summary {
    padding: 14px 24px;
    cursor: pointer;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.driver-rivals__table-wrap {
    overflow-x: auto;
}

.driver-rivals__table {
    width: 100%;
    border-collapse: collapse;
}

.driver-rivals__table th,
.driver-rivals__table td {
    padding: 11px 14px;
    border-top: 1px solid #ded5c5;
    text-align: left;
    vertical-align: top;
}

.driver-rivals__table small {
    display: block;
    color: #53606b;
    font-weight: 400;
}

.driver-rivals {
    margin-top: 0;
    padding: 0;
    border-top: 0;
    background: transparent;
    box-shadow: none;
}

.driver-rivals__content {
    padding: 28px;
    border-top: 4px solid #3f4f2f;
    background: #fbf7ee;
    box-shadow: 0 18px 42px rgba(23, 32, 40, .08);
}

.driver-rivals__table thead {
    background: #e9dfcd;
}

.driver-rivals__table tbody tr:nth-child(even) {
    background: rgba(231, 185, 91, .08);
}

.driver-rivals__table a {
    color: #243619;
    font-weight: 700;
}

.driver-rivals__method {
    margin-top: 12px;
    border: 1px solid #d9d0c0;
}

.driver-rivals__method dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin: 0;
    padding: 0 1px 1px;
    background: #d9d0c0;
}

.driver-rivals__method dl > div {
    min-width: 0;
    padding: 16px 22px 18px;
    background: #fbf7ee;
}

.driver-rivals__method dt {
    color: #243619;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.driver-rivals__method dd {
    margin: 6px 0 0;
    color: #53606b;
    font-size: .86rem;
    line-height: 1.5;
}

.driver-insights__empty {
    margin: 0;
    padding: 26px;
    background: #eee6d7;
}

@media (max-width: 920px) {
    .driver-insights__charts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .driver-insights__header {
        align-items: stretch;
        flex-direction: column;
    }

    .driver-insights__order {
        align-self: flex-start;
    }

    .driver-insight-chart > header,
    .driver-rivals {
        padding-left: 16px;
        padding-right: 16px;
    }

    .driver-rivals__table th,
    .driver-rivals__table td {
        padding: 10px;
        font-size: .84rem;
    }

    .driver-rivals__method dl {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .driver-chart__point circle {
        transition: none;
    }
}
