/* pace.css — "Change or keep?" on Race › Tires (pace-view.js). v2 tokens; series
 * colors are the dataviz reference palette's first three categorical slots (dark
 * steps; light steps under the Daylight theme). */
.pace {
    --pace-c1: #3987e5;
    --pace-c2: #d95926;
    --pace-c3: #199e70;
    display: block;
    padding: var(--s3, 12px);
    color: var(--text);
    font: var(--v2-fs-md, 15px)/1.45 var(--v2-font-ui);
    min-width: 0;
}
[data-theme="daylight"] .pace { --pace-c1: #2a78d6; --pace-c2: #eb6834; --pace-c3: #1baf7a; }

.pace-h { margin: 0 0 6px; font: 600 var(--v2-fs-xs, 11px)/1.3 var(--v2-font-ui); letter-spacing: var(--v2-track-caps, .08em); text-transform: uppercase; color: var(--text-3); }
.pace-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 4px 0 12px; }
.pace-field { display: inline-flex; align-items: center; gap: 8px; font-size: var(--v2-fs-sm, 13px); color: var(--text-3); }
.pace-field select {
    min-height: var(--v2-h-sm, 30px); max-width: 220px; padding: 0 8px;
    background: var(--v2-inset); color: var(--text); border: 1px solid var(--v2-line-2); border-radius: var(--v2-r-sm, 3px); font: inherit;
}
.pace-seg { display: inline-flex; border: 1px solid var(--v2-line-2); border-radius: var(--v2-r-sm, 3px); overflow: hidden; }
.pace-seg button {
    min-height: var(--v2-h-sm, 30px); min-width: 56px; padding: 0 12px; border: 0; background: transparent; color: var(--text-2);
    font: 600 var(--v2-fs-sm, 13px)/1 var(--v2-font-ui); cursor: pointer;
}
.pace-seg button + button { border-left: 1px solid var(--v2-line-2); }
.pace-seg button[aria-pressed="true"] { background: var(--v2-wash); color: var(--text); }
.pace-seg button:hover { background: var(--v2-hover); }
.pace select:focus-visible, .pace button:focus-visible, .pace summary:focus-visible, .pace-scroll:focus-visible { outline: none; box-shadow: var(--v2-focus); }
/* "Lap time by condition" overview and the band picker (pace-view.js renderConds). */
.pace-over { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin: 4px 0 8px; font-size: var(--v2-fs-sm, 13px); color: var(--text-2); font-variant-numeric: tabular-nums; }
.pace-over:empty, .pace-conds:empty { display: none; }
.pace-over-h { font: 600 var(--v2-fs-xs, 11px)/1.3 var(--v2-font-ui); letter-spacing: var(--v2-track-caps, .08em); text-transform: uppercase; color: var(--text-3); margin-right: 4px; }
.pace-cell b { font-weight: 600; color: var(--text); }
.pace-cell small { color: var(--text-3); font-size: inherit; }
.pace-sep { color: var(--text-4); }
.pace-cross { flex-basis: 100%; color: var(--text-3); }
.pace-conds { display: flex; flex-wrap: wrap; gap: 8px; }
.pace-conds .pace-seg { flex-wrap: wrap; }
.pace-top { padding-top: 0; }
.pace-src-top { padding: 0 0 8px; }
.pace-src-top:empty { display: none; }
.pace-odd { color: var(--text-3); }
.pace-odd > span { margin-left: 2px; color: var(--warn, var(--text-3)); font-weight: 600; }
html.race-adv .pace-opts { display: none; }   /* Advanced: its controls sit in the top row */
.pace-source { margin: 0 0 8px; font-size: var(--v2-fs-sm, 13px); color: var(--text-3); overflow-wrap: anywhere; }
.pace-source a { color: var(--accent); }

.pace-sub, .pace-fig figcaption {
    margin: 0 0 8px; font: 600 var(--v2-fs-xs, 11px)/1.3 var(--v2-font-ui); letter-spacing: var(--v2-track-caps, .08em); text-transform: uppercase; color: var(--text-3);
}
.pace-fig figcaption span { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--text-4); margin-left: 6px; }
.pace-sub { margin-top: var(--s3, 12px); }
.pace-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pace-line { display: grid; gap: 2px; }
.pace-big { margin: 0; font-size: var(--v2-fs-md, 15px); font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.pace-detail { margin: 0 0 8px; font-size: var(--v2-fs-sm, 13px); color: var(--text-3); font-variant-numeric: tabular-nums; }
.pace-muted { margin: 0; font-size: var(--v2-fs-sm, 13px); color: var(--text-3); }
.pace-duct { margin: 0 0 6px; font-size: var(--v2-fs-md, 15px); color: var(--text); }
.pace-ducts { margin: 0 0 6px; padding-left: 18px; }
.pace-ducts li { margin: 2px 0; }

.pace-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3, 12px); margin: var(--s3, 12px) 0; }
.pace-fig { margin: 0; min-width: 0; }
.pace-fig[hidden] { display: none; }
.pace-svg { display: block; width: 100%; height: auto; overflow: visible; }
.pace-grid { stroke: var(--v2-line); stroke-width: 1; }
.pace-axis { stroke: var(--v2-line-2); stroke-width: 1; }
.pace-tick { fill: var(--text-3); font: 11px var(--v2-font-ui); font-variant-numeric: tabular-nums; }
.pace-label { fill: var(--text-3); font: 12px var(--v2-font-ui); }
.pace-dot { stroke: var(--v2-panel); stroke-width: 2; opacity: .9; }
.pace-dot:hover { opacity: 1; stroke: var(--text); }
.pace-fit { fill: none; stroke-width: 2; stroke-linecap: round; }
.pace-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 6px; padding: 0; font-size: var(--v2-fs-sm, 13px); color: var(--text-2); }
.pace-legend li { display: inline-flex; align-items: center; gap: 6px; }
.pace-key { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }

.pace table { min-width: 0; }   /* live.html gives tables a 560px floor */
.pace-scroll { max-height: 420px; overflow: auto; margin-top: 8px; }
.pace .pace-scroll table { min-width: 100%; }
.pace-scroll table { width: 100%; border-collapse: collapse; font-size: var(--v2-fs-sm, 13px); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pace-scroll th, .pace-scroll td { text-align: left; padding: 4px 10px 4px 0; border-bottom: 1px solid var(--v2-line); }
.pace-scroll th { position: sticky; top: 0; background: var(--v2-panel); color: var(--text-3); }

@media (max-width: 760px) {
    .pace { padding: 12px 16px; }
    .pace-charts { grid-template-columns: minmax(0, 1fr); }
    .pace-field select { max-width: 160px; }
    .pace-seg button { min-height: 40px; }
    .pace-field select { min-height: 40px; }
}
