:root {
  color-scheme: dark;
  --bg: #101412;
  --surface: #171d19;
  --surface-raised: #1d251f;
  --surface-hover: #232e25;
  --surface-soft: #131915;
  --text: #edf3e9;
  --muted: #a0ad9e;
  --subtle: #879683;
  --line: #2c362d;
  --line-soft: #232d25;
  --accent: #b5ef65;
  --accent-dim: #29391e;
  --accent-ink: #18270d;
  --zp2: #8ad69a;
  --zr2: #bf9aee;
  --zr3: #edac71;
  --danger: #ec9b92;
  --shadow: 0 16px 50px #0003;
  --radius: 15px;
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f1f4ee;
  --surface: #fff;
  --surface-raised: #f5f8f1;
  --surface-hover: #edf3e5;
  --surface-soft: #f7f9f4;
  --text: #202a20;
  --muted: #657160;
  --subtle: #7b8675;
  --line: #d7dfd0;
  --line-soft: #e8ede3;
  --accent: #4d761c;
  --accent-dim: #e8f1dc;
  --accent-ink: #fff;
  --zp2: #328147;
  --zr2: #8353b6;
  --zr3: #b96c27;
  --danger: #ad4c46;
  --shadow: 0 16px 50px #2030100a;
}
* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; }
button, input, select { touch-action: manipulation; }
button { border: 0; }
button:disabled { cursor: not-allowed; opacity: .42; }
a { color: inherit; text-decoration: none; }
svg { flex-shrink: 0; vertical-align: middle; }
button svg { pointer-events: none; }
h1, h2, h3, p { margin: 0; }
::selection { color: var(--accent-ink); background: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; width: auto; height: auto; padding: 10px 15px; clip: auto; z-index: 100; color: var(--accent-ink); background: var(--accent); border-radius: 6px; }
.muted { color: var(--muted); }
.tiny { font-size: 11px; }
.num, .clock-value, .metric-value, .position, .car-number, .drawer-number, .mobile-metric, .summary-card, .drawer-stat, .lap-history { font-variant-numeric: tabular-nums; }
.app-header { position: sticky; top: 0; z-index: 25; border-bottom: 1px solid var(--line); background: var(--bg); }
.header-inner { max-width: 1500px; min-height: 64px; padding: 0 36px; margin: 0 auto; display: flex; align-items: center; gap: 48px; }
.brand, .brand-link { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand-mark { width: 35px; height: 35px; color: var(--accent); display: grid; place-items: center; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-word { display: block; font-size: 17px; font-weight: 850; letter-spacing: .19em; line-height: 1.2; }
.brand-sub { display: block; color: var(--muted); font-size: 8px; font-weight: 650; letter-spacing: .25em; margin-top: 4px; text-transform: uppercase; }
.primary-nav { align-self: stretch; display: flex; align-items: stretch; gap: 26px; }
.nav-btn { position: relative; display: flex; align-items: center; gap: 8px; padding: 0 2px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 650; white-space: nowrap; }
.nav-btn:hover { color: var(--text); }
.nav-demo { align-self:center; color:var(--accent); background:var(--accent-dim); border:1px solid color-mix(in srgb,var(--accent) 25%,transparent); border-radius:4px; padding:3px 6px; font-size:9px; font-weight:750; letter-spacing:.08em; }
.nav-btn.active { color: var(--accent); }
.nav-btn.active::after { content: ""; position: absolute; bottom: -1px; left: 0; right: 0; height: 3px; background: var(--accent); border-radius: 3px 3px 0 0; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.unit-toggle { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; }
.unit-toggle button { background: transparent; color: var(--muted); font-size: 11px; font-weight: 700; padding: 6px 9px; border-radius: 5px; }
.unit-toggle button.active { background: var(--surface-hover); color: var(--text); }
.icon-button, .drawer-close { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--muted); }
.icon-button:hover, .drawer-close:hover { color: var(--text); background: var(--surface-hover); }
.shell { max-width: 1500px; margin: 0 auto; padding: 22px 36px 0; }
.session-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 19px; }
.eyebrow { color: var(--accent); font-size: 10px; letter-spacing: .17em; font-weight: 750; text-transform: uppercase; margin-bottom: 5px; }
.session-title { min-width: 0; }
.session-title h1 { font-size: clamp(25px, 2.5vw, 34px); line-height: 1.1; font-weight: 650; letter-spacing: -.04em; }
.session-subtitle { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 6px; color: var(--muted); font-size: 12px; }
.session-state { display: flex; align-items: center; gap: 28px; flex-shrink: 0; }
.flag-badge { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 6px; color: var(--zp2); background: color-mix(in srgb, var(--zp2) 10%, transparent); border: 1px solid color-mix(in srgb, var(--zp2) 20%, transparent); font-size: 10px; font-weight: 750; letter-spacing: .055em; text-transform: uppercase; }
.flag-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.clock-block { padding-left: 28px; border-left: 1px solid var(--line); text-align: right; }
.clock-value { font-size: 25px; font-weight: 550; line-height: 1.1; letter-spacing: -.02em; }
.clock-label { font-size: 9px; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; margin-top: 6px; }
.demo-banner { display: flex; align-items: center; gap: 14px; padding: 7px 13px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); }
.demo-badge { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); background: var(--accent-dim); padding: 4px 7px; border-radius: 4px; font-size: 9px; font-weight: 800; letter-spacing: .08em; white-space: nowrap; text-transform: uppercase; }
.demo-copy { color: var(--muted); font-size: 11px; flex: 1; }
.demo-copy strong { color: var(--text); font-weight: 550; }
.demo-controls { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.btn { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-raised); font-size: 12px; font-weight: 650; transition: background .15s, border-color .15s; }
.btn:hover:not(:disabled) { background: var(--surface-hover); border-color: var(--subtle); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 85%, white); border-color: var(--accent); }
.btn-ghost { background: transparent; }
.btn-small { min-height: 29px; padding: 5px 9px; font-size: 10px; border-radius: 6px; }
.metrics-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin-bottom: 22px; }
.metric-card { position: relative; min-width: 0; padding: 13px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.metric-label { color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
.metric-main { display: flex; align-items: baseline; gap: 9px; margin-top: 8px; }
.metric-value { font-size: 27px; font-weight: 600; line-height: 1.13; letter-spacing: -.035em; }
.metric-main small, .metric-value small { color: var(--muted); font-size: 12px; font-weight: 450; letter-spacing: 0; }
.metric-sub { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; margin-top: 7px; }
.metric-sub strong { color: var(--text); font-weight: 550; }
.metric-icon { position: absolute; top: 16px; right: 18px; width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; background: var(--surface-raised); color: var(--muted); }
.workspace { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.workspace-top { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 17px 23px 13px; }
.workspace-heading { display: flex; align-items: baseline; gap: 11px; }
.workspace-heading h2, .panel-header h2 { font-size: 17px; font-weight: 600; letter-spacing: -.025em; }
.workspace-heading .muted { font-size: 11px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 0 23px 16px; }
.class-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.filter-chip { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 33px; padding: 7px 11px; background: transparent; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); font-size: 11px; font-weight: 650; }
.filter-chip:hover { color: var(--text); background: var(--surface-hover); }
.filter-chip.active { color: var(--text); background: var(--surface-hover); border-color: var(--subtle); }
.filter-chip.active[data-class="all"] { background: var(--accent-dim); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); color: var(--accent); }
.class-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.class-dot.zp2, .class-dot.class-zp2 { color: var(--zp2); }
.class-dot.zr2, .class-dot.class-zr2 { color: var(--zr2); }
.class-dot.zr3, .class-dot.class-zr3 { color: var(--zr3); }
.toolbar-right { display: flex; align-items: center; gap: 9px; }
.search-wrap { display: flex; align-items: center; position: relative; width: 230px; min-width: 0; }
.search-wrap input { width: 100%; min-width: 0; height: 35px; padding: 8px 31px 8px 32px; color: var(--text); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 7px; font-size: 11px; outline-offset: 2px; }
.search-wrap input::placeholder { color: var(--subtle); }
.search-icon { position: absolute; left: 10px; color: var(--subtle); width: 14px; height: 14px; pointer-events: none; }
.clear-search { display: grid; place-items: center; position: absolute; right: 5px; width: 26px; height: 26px; background: transparent; color: var(--muted); border-radius: 4px; }
.clear-search:hover { background: var(--surface-hover); }
.follow-filter { display: inline-flex; align-items: center; gap: 6px; min-height: 35px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 600; white-space: nowrap; }
.follow-filter.active { color: var(--accent); background: var(--accent-dim); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.table-options { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 23px; border-top: 1px solid var(--line-soft); background: var(--surface-soft); }
.table-options > div { display: flex; align-items: center; gap: 10px; }
.option-label { color: var(--muted); font-size: 10px; }
.segmented { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }
.segmented button { padding: 4px 9px; font-size: 10px; font-weight: 650; background: transparent; color: var(--muted); border-radius: 3px; }
.segmented button.active { color: var(--text); background: var(--surface-hover); }
.legend { display: flex; align-items: center; gap: 14px; color: var(--subtle); font-size: 9px; }
.legend > span { display: inline-flex; align-items: center; gap: 5px; }
.legend-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.table-wrap { width: 100%; }
.timing-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
.timing-table th { height: 42px; padding: 10px 12px; background: var(--surface-soft); color: var(--subtle); font-size: 9px; font-weight: 650; letter-spacing: .075em; text-transform: uppercase; white-space: nowrap; border-bottom: 1px solid var(--line); }
.timing-table td { height: 61px; padding: 9px 12px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.timing-table th:first-child, .timing-table td:first-child { padding-left: 23px; }
.timing-table th:last-child, .timing-table td:last-child { padding-right: 21px; }
.timing-table tbody tr { cursor: pointer; transition: background .12s; }
.timing-table tbody tr:hover { background: var(--surface-hover); }
.timing-table tbody tr:last-child td { border-bottom: 0; }
.timing-table tbody tr.is-followed { background: color-mix(in srgb, var(--accent) 3%, var(--surface)); }
.timing-table .num { text-align: right; }
.pos-cell { min-width: 53px; }
.position { display: block; font-size: 15px; font-weight: 650; }
.position-secondary { display: block; margin-top: 2px; color: var(--subtle); font-size: 9px; font-weight: 450; }
.car-cell { display: flex; align-items: center; gap: 12px; min-width: 180px; }
.car-number { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 34px; border: 1px solid var(--line); background: var(--surface-soft); border-radius: 6px; font-size: 14px; font-weight: 750; }
.car-name { color: var(--text); font-size: 12px; font-weight: 600; line-height: 1.35; }
.driver-name { color: var(--muted); font-size: 11px; margin-top: 3px; line-height: 1.3; }
.class-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 6px; border-radius: 4px; font-size: 9px; font-weight: 750; letter-spacing: .035em; line-height: 1.2; }
.class-badge.class-zp2 { color: var(--zp2); background: color-mix(in srgb, var(--zp2) 10%, transparent); }
.class-badge.class-zr2 { color: var(--zr2); background: color-mix(in srgb, var(--zr2) 10%, transparent); }
.class-badge.class-zr3 { color: var(--zr3); background: color-mix(in srgb, var(--zr3) 10%, transparent); }
.best-time { color: var(--accent); font-weight: 550; }
.status-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 9px; white-space: nowrap; color: var(--muted); }
.status-badge::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.status-track { color: var(--zp2); }
.status-pit { color: var(--zr3); }
.status-out { color: var(--subtle); }
.status-stale { color: var(--danger); }
.favorite-btn { display: inline-flex; align-items: center; justify-content: center; width: 31px; height: 31px; border-radius: 6px; background: transparent; color: var(--subtle); }
.favorite-btn:hover { background: var(--surface-hover); color: var(--accent); }
.favorite-btn.active { color: var(--accent); }
.favorite-btn.active svg { fill: var(--accent); }
.mini-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; margin-left: 5px; }
.mini-bars span, .mini-bars i { display: block; width: 2px; min-height: 3px; border-radius: 1px; background: var(--accent); opacity: .65; }
.timing-mobile { display: none; }
.mobile-car { padding: 15px; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.mobile-car:last-child { border-bottom: 0; }
.mobile-car:hover { background: var(--surface-hover); }
.mobile-car-top { display: flex; align-items: center; gap: 11px; }
.mobile-car-top > .position { width: 20px; flex-shrink: 0; }
.mobile-car-title { flex: 1; min-width: 0; }
.mobile-car-title .car-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mobile-car-top .favorite-btn { margin-left: auto; flex-shrink: 0; }
.mobile-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; padding-left: 31px; }
.mobile-metric { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.mobile-metric span:first-child, .mobile-metric small { font-size: 9px; color: var(--subtle); text-transform: uppercase; letter-spacing: .04em; }
.mobile-metric strong { font-size: 13px; font-weight: 550; }
.table-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; padding: 12px 23px; border-top: 1px solid var(--line); color: var(--subtle); font-size: 10px; background: var(--surface-soft); }
.empty-state { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty-state h3, .empty-state strong { color: var(--text); font-size: 15px; font-weight: 550; }
.empty-state p { margin: 7px auto 15px; font-size: 12px; max-width: 340px; }
.follow-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 13px; margin: 0 23px 16px; }
.follow-card { display: block; padding: 10px 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); text-align: left; cursor: pointer; min-width: 0; }
.follow-card:hover { border-color: var(--subtle); background: var(--surface-raised); }
.follow-card-info { flex: 1; min-width: 95px; }
.follow-metrics { display: flex; gap: 15px; margin-left: auto; font-variant-numeric: tabular-nums; }
.follow-metrics > div { display: flex; flex-direction: column; gap: 3px; }
.follow-metrics strong { font-size: 13px; font-weight: 550; }
.follow-metrics span, .follow-metrics small { color: var(--muted); font-size: 9px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.speed-layout { min-width: 0; padding: 7px 23px 23px; scroll-margin-top: 84px; }
.speed-topline { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.speed-topline h2 { font-size: 20px; font-weight: 600; letter-spacing: -.025em; }
.speed-topline p { font-size: 12px; color: var(--muted); margin-top: 5px; }
.comparison-controls { display: flex; align-items: center; gap: 9px; }
.compare-pickers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-bottom: 17px; }
.compare-slot { padding: 14px 16px; border: 1px solid var(--line); border-top: 2px solid var(--accent); border-radius: 10px; background: var(--surface); min-width: 0; }
.compare-slot:nth-child(2) { border-top-color: var(--zr2); }
.compare-slot:nth-child(3) { border-top-color: var(--zr3); }
.compare-slot-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 9px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; margin-bottom: 8px; }
.compare-select, .lap-select { width: 100%; min-width: 0; color: var(--text); border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); padding: 8px 27px 8px 9px; font-size: 12px; }
.compare-select option, .lap-select option { background: var(--surface); color: var(--text); }
.lap-select { width: auto; max-width: 200px; font-size: 11px; }
.chart-panel, .panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px 22px 16px; }
.panel-header p { color: var(--muted); font-size: 11px; margin-top: 4px; }
.panel-header h3 { font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.chart-container { width: 100%; height: 315px; min-width: 0; position: relative; padding: 0 16px; }
.chart-container svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart-axis { fill: var(--subtle); color: var(--subtle); font-size: 10px; font-family: inherit; font-variant-numeric: tabular-nums; }
.chart-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 5; opacity: .65; }
.chart-line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart-tooltip { position: absolute; z-index: 3; pointer-events: none; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-raised); color: var(--text); padding: 9px 12px; box-shadow: var(--shadow); font-size: 11px; white-space: nowrap; }
.chart-scrubber { display: flex; align-items: center; gap: 12px; padding: 12px 22px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 11px; }
.chart-scrubber input { flex: 1; min-width: 0; width: 100%; height: 4px; accent-color: var(--accent); cursor: pointer; }
.chart-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 17px; padding: 5px 22px 17px; }
.legend-item { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.line-swatch { display: inline-block; width: 17px; height: 3px; border-radius: 2px; background: var(--accent); }
.chart-note { padding: 11px 22px; border-top: 1px solid var(--line-soft); background: var(--surface-soft); color: var(--subtle); font-size: 10px; line-height: 1.65; }
.comparison-summary { margin-top: 16px; }
.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-top: 16px; }
.summary-card { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.summary-card h3 { font-size: 12px; font-weight: 600; margin-bottom: 13px; }
.summary-card > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 8px; font-size: 11px; }
.summary-card > div > span:first-child { color: var(--muted); }
.summary-card strong { font-size: 12px; font-weight: 600; }
.speed-bottom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; margin-top: 19px; }
.speed-ranking { padding: 0 22px 18px; }
.speed-rank-row { display: grid; grid-template-columns: 18px minmax(0, 1fr) 40px 48px; width: 100%; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); background: transparent; text-align: left; font-size: 11px; font-variant-numeric: tabular-nums; }
.speed-rank-row:last-child { border-bottom: 0; }
.speed-rank-row > span:first-child { color: var(--subtle); }
.speed-rank-row strong { text-align: right; font-size: 12px; font-weight: 550; }
.rank-bar-track { display: block; height: 4px; margin-top: 6px; background: var(--surface-hover); border-radius: 3px; overflow: hidden; }
.rank-bar { display: block; height: 100%; border-radius: inherit; background: var(--accent); opacity: .75; }
.lap-chart { width: 100%; padding: 0 18px 20px; min-height: 200px; }
.lap-chart svg { display: block; width: 100%; height: auto; }
.drawer-backdrop { position: fixed; inset: 0; z-index: 50; background: #0009; backdrop-filter: blur(4px); }
.car-drawer { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(460px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; padding: 0; background: var(--bg); color: var(--text); border: 0; border-left: 1px solid var(--line); box-shadow: -20px 0 70px #0004; overflow: hidden; }
.car-drawer[open] { display: flex; flex-direction: column; }
.car-drawer::backdrop, .info-dialog::backdrop { background: #0009; backdrop-filter: blur(4px); }
.drawer-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 19px 23px; border-bottom: 1px solid var(--line); }
.drawer-header h2 { font-size: 12px; font-weight: 650; color: var(--muted); }
.drawer-body { flex: 1; overflow: auto; overscroll-behavior: contain; padding: 25px 23px; }
.drawer-topline { display: flex; align-items: center; gap: 15px; margin-bottom: 23px; }
.drawer-number { display: grid; place-items: center; width: 62px; height: 62px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--accent); font-size: 27px; font-weight: 700; flex-shrink: 0; }
.drawer-title { min-width: 0; }
.drawer-title h2, .drawer-title h3 { font-size: 20px; line-height: 1.2; font-weight: 600; letter-spacing: -.025em; }
.drawer-title p { color: var(--muted); font-size: 12px; margin: 5px 0 7px; }
.drawer-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 19px 0 24px; }
.drawer-stat { padding: 15px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.drawer-stat span, .drawer-stat small { display: block; color: var(--muted); font-size: 10px; }
.drawer-stat strong { display: block; margin-top: 6px; font-size: 22px; font-weight: 550; line-height: 1.15; }
.drawer-stat strong small { display: inline; font-size: 11px; }
.drawer-section { margin-top: 25px; }
.drawer-section h3 { font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.drawer-section p { font-size: 11px; color: var(--muted); line-height: 1.7; }
.drawer-section > .btn { width: 100%; }
.lap-history { width: 100%; border-collapse: collapse; font-size: 12px; }
.lap-history th { padding: 8px 0; text-align: left; font-weight: 450; color: var(--subtle); font-size: 10px; border-bottom: 1px solid var(--line); }
.lap-history td { padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.lap-history th:not(:first-child), .lap-history td:not(:first-child) { text-align: right; }
.sector-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sector-card { padding: 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.sector-card span { display: block; color: var(--subtle); font-size: 9px; }
.sector-card strong { display: block; margin-top: 5px; font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 550; }
.info-dialog { width: min(580px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 0; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.modal-header h2 { font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.modal-body { padding: 22px 24px 26px; font-size: 12px; line-height: 1.75; color: var(--muted); }
.modal-body p + p { margin-top: 13px; }
.modal-body strong { color: var(--text); font-weight: 600; }
.definition-list { margin: 16px 0 0; }
.definition-list dt { margin-top: 16px; color: var(--text); font-size: 12px; font-weight: 650; }
.definition-list dd { margin: 4px 0 0; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 25px; z-index: 100; transform: translateX(-50%); max-width: calc(100vw - 32px); padding: 12px 19px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-raised); color: var(--text); font-size: 12px; box-shadow: var(--shadow); }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--subtle); font-size: 10px; padding: 27px 0 29px; }
.site-footer button { background: transparent; color: var(--muted); font-size: inherit; padding: 4px 0; }
.site-footer button:hover, .site-footer a:hover { color: var(--text); }
.brand > span { display: block; }
.icon { width: 18px; height: 18px; }
[data-icon] { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.search-icon .icon { width: 15px; height: 15px; }
.clock-label, .clock-value { display: block; }
.clock-label { margin: 0 0 6px; }
.eyebrow-divider { margin: 0 7px; color: var(--subtle); }
.title-dot, .accent-text, .positive-text { color: var(--accent); }
.negative-text { color: var(--danger); }
.demo-copy { display: flex; align-items: center; gap: 10px; min-width: 0; }
.demo-controls .icon-button { width: 28px; height: 28px; border-color: transparent; }
.metric-number { color: var(--text); font-size: 27px; font-weight: 650; line-height: 1.13; font-variant-numeric: tabular-nums; letter-spacing: -.035em; }
.metric-team { font-size: 14px; font-weight: 550; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.metric-unit { font-size: 12px; color: var(--muted); }
.metric-lap { margin-left: auto; color: var(--subtle); font-size: 10px; }
.metric-sub .class-badge { padding-top: 3px; padding-bottom: 3px; }
.feed-status { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.feed-status i { width: 5px; height: 5px; background: var(--accent); border-radius: 50%; }
.feed-status.paused i { background: var(--subtle); }
.text-button { display: inline-flex; align-items: center; gap: 6px; padding: 2px 0; background: transparent; color: var(--muted); font-size: 10px; line-height: 1.5; }
.text-button:hover { color: var(--accent); }
.text-button .icon { width: 14px; height: 14px; }
.ranking-control { display: flex; align-items: center; gap: 10px; }
.filter-chip > span, .follow-filter > span:last-child:not([data-icon]) { font-size: 9px; opacity: .8; }
.class-dot.class-zp2, .rank-bar.class-zp2 { background: var(--zp2); }
.class-dot.class-zr2, .rank-bar.class-zr2 { background: var(--zr2); }
.class-dot.class-zr3, .rank-bar.class-zr3 { background: var(--zr3); }
.timing-table td.car-cell { display: table-cell; }
.car-button { display: flex; align-items: center; gap: 11px; width: 100%; padding: 0; background: transparent; text-align: left; }
.car-button > span:last-child { display: block; }
.car-button .car-name, .car-button .driver-name { display: block; }
.col-favorite { width: 50px; }
.timing-table th.col-favorite, .timing-table td.col-favorite { padding-left: 15px; padding-right: 0; }
.position-leader, .leader-gap { color: var(--accent); }
.th-hint { font-size: 9px; opacity: .7; }
.speed-cell { font-weight: 600; }
.lap-annotation { margin-left: 5px; color: var(--zr3); font-size: 8px; }
.mobile-car-title { background: transparent; padding: 0; text-align: left; }
.mobile-car-title > strong, .mobile-car-title > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mobile-car-title > strong { font-size: 12px; font-weight: 600; }
.mobile-car-title > span { color: var(--muted); font-size: 10px; margin-top: 3px; }
.mobile-car-number { color: var(--accent); margin-right: 3px; }
.mobile-car-meta { display: flex; align-items: center; gap: 11px; padding-left: 31px; margin-top: 10px; font-size: 10px; }
.mobile-metrics { width: 100%; background: transparent; padding-top: 0; padding-right: 0; padding-bottom: 0; text-align: left; }
.follow-card-info { display: flex; align-items: center; gap: 11px; }
.follow-card-info > div { flex: 1; min-width: 0; }
.follow-card-info strong { display: block; font-size: 12px; font-weight: 600; line-height: 1.3; }
.follow-card-info > div > span { display: block; color: var(--muted); font-size: 10px; margin-top: 1px; }
.follow-car-number { font-size: 20px; font-weight: 650; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.follow-star { color: var(--accent); margin-left: auto; }
.follow-star .icon { width: 14px; height: 14px; }
.follow-metrics { justify-content: space-between; margin: 6px 0 0; line-height: 1.4; }
.follow-metrics > span { display: flex; align-items: baseline; gap: 6px; color: var(--muted); font-size: 10px; }
.follow-metrics strong { color: var(--text); font-size: 12px; }
.small-separator { margin: 0 3px; color: var(--subtle); }
.series-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--series-color, var(--accent)); margin-right: 6px; vertical-align: 1px; flex-shrink: 0; }
.compare-pickers .compare-slot { border-top-color: var(--series-color, var(--accent)); }
.compare-slot-header > span { white-space: nowrap; }
.slot-actions { display: flex; align-items: center; gap: 7px; }
.slot-actions .text-button { font-size: 9px; text-transform: none; letter-spacing: 0; }
.slot-remove { width: 21px; height: 21px; border: 0; }
.slot-remove .icon { width: 14px; height: 14px; }
.compare-driver { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 9px; color: var(--muted); font-size: 10px; margin: 9px 0 12px; }
.compare-driver span { color: var(--subtle); }
.lap-choice { display: flex; align-items: center; gap: 9px; }
.lap-choice > span { font-size: 9px; color: var(--subtle); }
.lap-choice .lap-select { flex: 1; width: 100%; max-width: none; font-size: 10px; }
.empty-comparison-text { padding: 13px 0 5px; color: var(--subtle); font-size: 11px; }
.empty-slot { border-style: dashed; }
.chart-type-label, .unit-label { font-size: 9px; color: var(--subtle); letter-spacing: .05em; white-space: nowrap; }
.chart-scrubber { flex-wrap: wrap; }
.chart-scrubber > label { white-space: nowrap; font-size: 10px; }
.chart-scrubber > input { flex: 1 1 120px; }
.trace-readout { display: flex; gap: 14px; flex-wrap: wrap; margin-left: auto; font-size: 10px; font-variant-numeric: tabular-nums; }
.trace-readout > span { white-space: nowrap; }
.trace-readout strong { color: var(--text); font-weight: 550; margin-left: 3px; }
.summary-card .summary-card-title { margin: 0; align-items: center; }
.summary-card-title > strong { font-size: 12px; }
.summary-card .summary-lap { margin-top: 15px; align-items: baseline; }
.summary-card .summary-lap > strong { font-size: 25px; font-weight: 550; letter-spacing: -.025em; }
.summary-lap > span { font-size: 10px; }
.summary-card .summary-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.summary-stats > span { font-size: 10px; color: var(--muted); }
.summary-stats strong { display: block; margin-top: 4px; font-size: 15px; color: var(--text); }
.summary-stats small { color: var(--muted); font-size: 10px; font-weight: 450; }
.summary-card .summary-sectors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; border-top: 1px solid var(--line); padding-top: 11px; margin-top: 14px; }
.summary-sectors > span { display: flex; flex-direction: column; gap: 3px; }
.summary-sectors small { color: var(--subtle); font-size: 9px; }
.summary-sectors strong { color: var(--text); font-size: 12px; }
.summary-sectors em { font-size: 9px; font-style: normal; }
.summary-card .summary-footnote { display: block; color: var(--subtle); font-size: 9px; margin-top: 12px; }
.summary-footnote > span { margin: 0 4px; }
.speed-rank-row:hover { background: var(--surface-hover); }
.speed-rank-position { color: var(--subtle); }
.speed-rank-name { min-width: 0; }
.speed-rank-name > strong { display: block; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.speed-rank-class { justify-self: end; }
.pace-summary-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 11px 22px; border-top: 1px solid var(--line-soft); font-size: 10px; }
.pace-summary-row strong { color: var(--text); font-size: 11px; font-weight: 550; margin-left: 7px; }
.drawer-header { flex-shrink: 0; }
.drawer-header .eyebrow { margin: 0; }
.drawer-topline { margin-bottom: 17px; }
.drawer-topline .favorite-btn { margin-left: auto; }
.drawer-title { display: flex; align-items: center; gap: 15px; }
.drawer-stat strong > span { display: inline; color: inherit; font: inherit; }
.drawer-stint { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: -7px 0 20px; color: var(--muted); font-size: 10px; }
.drawer-compare { width: 100%; }
.drawer-compare .icon:last-child { margin-left: auto; }
.drawer-section .panel-header { padding: 0 0 12px; }
.drawer-section .panel-header h3 { margin: 0; }
.sector-card strong small { color: var(--muted); font-size: 10px; font-weight: 450; }
.lap-compare-button { padding: 4px 0; color: var(--text); background: transparent; font-size: 11px; font-variant-numeric: tabular-nums; }
.lap-compare-button:hover { color: var(--accent); }
.lap-status { font-size: 9px; color: var(--muted); }
.lap-status.clean { color: var(--zp2); }
.lap-status.compromised { color: var(--zr3); }
.drawer-note, .guide-footnote { margin-top: 23px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--subtle); font-size: 10px; line-height: 1.65; }
.footer-brand { color: var(--muted); font-weight: 750; letter-spacing: .13em; }
.footer-brand > span { margin-left: 5px; font-size: 8px; font-weight: 450; letter-spacing: .07em; }
.skip-link:focus { position: fixed; z-index: 100; top: 10px; left: 10px; width: auto; height: auto; margin: 0; padding: 10px 15px; clip: auto; background: var(--accent); color: var(--accent-ink); border-radius: 6px; }
@media (min-width: 1450px) {
  .timing-table td { height: 64px; }
  .timing-table th, .timing-table td { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 1190px) {
  .header-inner { padding: 0 24px; gap: 34px; }
  .shell { padding: 22px 24px 0; }
  .timing-table th, .timing-table td { padding-left: 9px; padding-right: 9px; }
  .car-cell { gap: 9px; min-width: 160px; }
  .timing-table { font-size: 11px; }
  .car-name { font-size: 11px; }
  .metric-value { font-size: 26px; }
  .toolbar { gap: 12px; }
  .search-wrap { width: 190px; }
}
@media (max-width: 1010px) {
  .table-wrap { display: none; }
  .timing-mobile { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mobile-car:nth-child(odd) { border-right: 1px solid var(--line-soft); }
  .mobile-car:nth-last-child(2) { border-bottom: 0; }
  .car-name { font-size: 12px; }
  .toolbar { flex-wrap: wrap; }
  .toolbar-right { flex: 1; justify-content: flex-end; }
  .search-wrap { width: 190px; }
  .header-inner { gap: 27px; }
  .session-state { gap: 18px; }
  .clock-block { padding-left: 18px; }
  .metric-card { padding: 16px; }
  .metric-icon { right: 13px; top: 13px; width: 27px; height: 27px; }
}
@media (max-width: 760px) {
  .header-inner { min-height: 73px; padding: 0 18px; gap: 25px; flex-wrap: wrap; }
  .brand-word { font-size: 15px; }
  .brand-sub { font-size: 7px; }
  .brand-mark { width: 31px; height: 31px; }
  .primary-nav { gap: 20px; }
  .nav-optional { display: none; }
  .nav-btn { font-size: 12px; min-height: 73px; }
  .nav-btn svg { width: 16px; height: 16px; }
  .header-actions { gap: 7px; }
  .unit-toggle button { padding: 5px 7px; font-size: 10px; }
  .icon-button { width: 31px; height: 31px; }
  .shell { padding: 24px 18px 0; }
  .session-header { align-items: flex-start; gap: 16px; margin-bottom: 20px; }
  .session-state { flex-direction: column-reverse; align-items: flex-end; gap: 9px; }
  .clock-block { border: 0; padding: 0; }
  .clock-value { font-size: 21px; }
  .clock-label { font-size: 8px; }
  .flag-badge { font-size: 8px; padding: 5px 7px; }
  .session-title h1 { font-size: 27px; }
  .session-subtitle { font-size: 11px; gap: 5px; max-width: 350px; }
  .demo-banner { flex-wrap: wrap; gap: 9px; margin-bottom: 19px; }
  .demo-copy { font-size: 10px; min-width: 200px; }
  .demo-controls { margin-left: auto; }
  .metrics-grid { gap: 10px; margin-bottom: 22px; }
  .metric-card { padding: 14px; border-radius: 11px; }
  .metric-icon { display: none; }
  .metric-label { font-size: 8px; letter-spacing: .055em; }
  .metric-value { font-size: 23px; }
  .metric-main { gap: 5px; }
  .metric-sub { font-size: 9px; gap: 5px; flex-wrap: wrap; }
  .workspace-top { padding: 19px 16px 15px; }
  .workspace-heading { gap: 8px; }
  .workspace-heading { min-width: 0; flex-wrap: wrap; gap: 3px 8px; }
  .workspace-heading .muted { flex-basis: 100%; font-size: 10px; }
  .feed-status { font-size: 9px; }
  .workspace-heading h2 { font-size: 16px; }
  .toolbar { padding: 0 16px 16px; flex-direction: column; align-items: stretch; gap: 12px; }
  .toolbar-right { justify-content: space-between; }
  .search-wrap { flex: 1; width: auto; }
  .table-options { padding: 10px 16px; }
  .table-options .legend { gap: 9px; font-size: 8px; }
  .table-footer { padding: 12px 16px; font-size: 9px; }
  .follow-strip { grid-template-columns: 1fr; margin: 0 16px 16px; }
  .follow-card { padding: 13px 16px; }
  .compare-pickers { gap: 9px; }
  .compare-slot-header { flex-wrap: wrap; gap: 6px; }
  .compare-slot { padding: 12px 10px; }
  .compare-select { font-size: 11px; padding-left: 7px; }
  .speed-topline { align-items: flex-start; }
  .speed-layout { padding: 6px 16px 16px; }
  .comparison-controls { flex-wrap: wrap; justify-content: flex-end; }
  .panel-header { padding: 17px 17px 13px; }
  .panel-header h2 { font-size: 15px; }
  .chart-container { height: 275px; padding: 0 8px; }
  .chart-legend { padding: 5px 17px 14px; gap: 12px; }
  .legend-item { font-size: 10px; }
  .chart-note { padding: 10px 17px; }
  .summary-grid { gap: 9px; }
  .summary-card { padding: 13px 11px; }
  .summary-card > div { gap: 5px; font-size: 10px; }
  .summary-card strong { font-size: 11px; }
  .speed-bottom-grid { grid-template-columns: minmax(0, 1fr); }
  .site-footer { font-size: 9px; gap: 10px; padding-top: 23px; }
}
@media (max-width: 560px) {
  .header-inner { padding: 15px 16px 0; gap: 0; min-height: 106px; }
  .header-actions { margin-left: auto; }
  .primary-nav { order: 3; width: 100%; height: 43px; gap: 25px; margin-top: 9px; }
  .nav-btn { min-height: 43px; }
  .shell { padding: 23px 14px 0; }
  .session-header { gap: 11px; }
  .session-title h1 { font-size: 25px; }
  .eyebrow { font-size: 8px; letter-spacing: .13em; }
  .session-subtitle { font-size: 10px; max-width: 215px; }
  .clock-value { font-size: 18px; }
  .session-state { gap: 10px; }
  .demo-banner { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: 8px 11px; gap: 5px 10px; }
  .demo-copy { display: contents; }
  .demo-copy .demo-badge { grid-column: 1; grid-row: 1; justify-self: start; }
  .demo-copy > span:last-child { grid-column: 1 / -1; grid-row: 2; font-size: 10px; line-height: 1.4; color: var(--muted); }
  .demo-controls { grid-column: 2; grid-row: 1; width: auto; margin: 0; padding: 0; gap: 5px; border: 0; }
  .metrics-grid { gap: 7px; }
  .metric-card { min-height: 88px; padding: 12px 10px; }
  .metric-label { min-height: 23px; font-size: 9px; line-height: 1.3; letter-spacing: .01em; }
  .metric-main { margin-top: 9px; gap: 4px; flex-wrap: nowrap; }
  .metric-value { font-size: 20px; }
  .metric-number { font-size: 20px; }
  .metric-team, .metric-sub { display: none; }
  .metric-unit { font-size: 9px; }
  .metric-lap { margin-left: 0; font-size: 8px; }
  .metric-main small, .metric-value small { font-size: 9px; }
  .workspace-heading .muted { display: none; }
  .workspace-heading h2 { white-space: nowrap; }
  .follow-strip { display: none; }
  .workspace-top > .tiny { max-width: 100px; text-align: right; font-size: 9px; }
  .class-filters { gap: 6px; }
  .filter-chip { flex: 1; padding: 7px 8px; font-size: 10px; min-height: 34px; }
  .table-options .legend { display: none; }
  #timing-help { font-size: 0; gap: 0; width: 28px; height: 28px; justify-content: center; }
  .timing-mobile { grid-template-columns: minmax(0, 1fr); }
  .mobile-car:nth-child(odd) { border-right: 0; }
  .mobile-car:nth-last-child(2) { border-bottom: 1px solid var(--line-soft); }
  .mobile-car { padding: 15px 16px; }
  .mobile-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .table-footer { align-items: flex-start; gap: 14px; line-height: 1.55; }
  .table-footer > :last-child { text-align: right; }
  .speed-topline { flex-direction: column; gap: 12px; }
  .comparison-controls { width: 100%; justify-content: space-between; }
  .compare-pickers { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .compare-pickers .compare-slot { display: block; padding: 11px 12px; border-top: 1px solid var(--line); border-left: 3px solid var(--series-color, var(--accent)); border-radius: 8px; }
  .compare-slot-header { margin: 0 0 7px; width: auto; flex-shrink: 0; font-size: 8px; }
  .compare-select { min-width: 0; }
  .compare-driver { margin: 7px 0 9px; }
  .panel-header { align-items: flex-start; flex-wrap: wrap; }
  .panel-header p { font-size: 10px; }
  .chart-container { height: 230px; }
  .chart-scrubber { padding: 12px 15px; font-size: 10px; gap: 8px; }
  .trace-readout { width: 100%; gap: 8px 12px; font-size: 9px; }
  .chart-legend { gap: 10px 15px; }
  .chart-note { font-size: 9px; }
  .summary-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .summary-card { display: block; padding: 14px; }
  .summary-card h3 { grid-column: 1 / -1; margin-bottom: 0; }
  .summary-card > div { gap: 7px; }
  .summary-card strong { font-size: 12px; }
  .drawer-header { padding: 16px 20px; }
  .drawer-body { padding: 23px 20px; }
  .info-dialog { width: calc(100vw - 24px); }
  .modal-header { padding: 17px 19px; }
  .modal-body { padding: 19px; }
  .site-footer { align-items: flex-start; flex-wrap: wrap; font-size: 9px; }
  .site-footer > :first-child { max-width: 230px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (max-width:560px) { .search-wrap input, .compare-select, .lap-select { font-size:16px; } .search-wrap input::placeholder { font-size:11px; } .compare-select, .lap-select { min-height:40px; } }
