/* TFE operational interface. Shared visual language; sporting colors are unchanged. */
@font-face {
  font-family: 'Source Sans 3';
  src: url('fonts/SourceSans3VF-Upright.woff2') format('woff2');
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
}
:root {
  --paper: #f2f4f7;
  --white: #fff;
  --ink: #18212d;
  --muted: #5c6878;
  --line: #dce1e7;
  --dark: #15191f;
  --orange: #c92339;
  --orange-soft: #fff0f2;
  --green: #237146;
  --red: #ba2636;
  --blue: #075f9e;
  --surface-soft: #f7f8fa;
  --font: 'Source Sans 3', 'Segoe UI Variable', 'Segoe UI', system-ui, sans-serif;
  --display: var(--font);
  --sidebar-width: 248px;
}
html { scroll-padding-top: 24px; }
.league-sync-status { margin: 16px 32px 0; }
@media (max-width:800px) { .league-sync-status { margin: 12px 16px 0; } }
@media print { .league-sync-status { display: none !important; } }
body { font: 15px/1.5 var(--font); background: var(--paper); color: var(--ink); }
button, input, select, textarea { font-family: var(--font); }
button, a, input, select, textarea, summary { outline-offset: 3px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible { outline: 2px solid #0875be; outline-offset: 3px; }
::selection { background: #cee8fa; color: #152c41; }
input, textarea { caret-color: var(--blue); }
input::placeholder, textarea::placeholder { color: #667384; opacity: 1; }
svg:not(.pilot-tf-chart svg, .lmu-map) { flex-shrink: 0; }
.nav-icon, .icon-button svg, .button svg, .text-button svg,
#navigation-toggle svg, .paddock-tasks svg, .event-directory-search svg {
  width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
h1 { font: 650 clamp(30px, 2.5vw, 36px)/1.15 var(--font); letter-spacing: -.025em; text-wrap: balance; }
h2 { font-size: 20px; font-weight: 650; letter-spacing: -.02em; line-height: 1.35; }
h3 { font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.eyebrow { font-size: 12px; letter-spacing: 0; font-weight: 500; text-transform: none; }
.preview-environment { color: #895116 !important; margin: 0 0 10px !important; font-size: 12px !important; }
.sidebar {
  width: var(--sidebar-width); padding: 28px 16px 18px; background: var(--dark);
  color: #e7eaf0; overflow-y: auto; scrollbar-color: #4e5969 var(--dark);
}
.brand.brand-lockup { max-width: none; height: 48px; padding: 0 5px; margin: 0 0 26px; gap: 9px; }
.brand-title { font-size: 19px; letter-spacing: -.035em; }
.brand-signature { color: #bec5cf; font-size: 9px; }
.workspace { padding: 16px 8px 22px; margin: 0 0 14px; border: 0; border-bottom: 1px solid #343b46; border-radius: 0; gap: 12px; }
.workspace-initial { width: 36px; height: 36px; background: #2a313c; border: 1px solid #46505e; color: #f0f3f8; border-radius: 8px; font-size: 12px; }
#account-label { min-width: 0; overflow-wrap: anywhere; font-size: 14px; font-weight: 600; }
.workspace small { color: #b0bac8; font-size: 12px; margin-top: 2px; }
.nav-label { color: #a9b3c1; font-size: 11px; font-weight: 500; letter-spacing: .02em; padding: 0 12px 9px; text-transform: none; }
#primary-navigation { display: grid; gap: 3px; overflow: visible; }
#primary-navigation a { padding: 10px 12px; gap: 12px; min-height: 42px; color: #c0c8d3; font-size: 14px; border-radius: 7px; box-shadow: none; transition: color .12s; }
#primary-navigation a:hover { background: #252c36; color: #fff; }
#primary-navigation a[aria-current=page] { background: #303743; color: #fff; font-weight: 650; box-shadow: none; }
#primary-navigation a[aria-current=page] .nav-icon { color: #ff7182; }
.nav-group { margin: 22px 0 0; padding: 0 12px 7px; }
.sidebar-bottom { padding: 24px 8px 0; }
.sidebar-bottom a { display: flex; align-items: center; justify-content: flex-start; gap: 11px; color: #b4bfce; border-color: #343b46; padding-top: 16px; margin-top: 0; font-size: 12px; }
.sidebar-bottom a:hover { color: #fff; }
#navigation-toggle { display: none; }
.app-body { margin-left: var(--sidebar-width); min-width: 0; }
.topbar { height: 64px; padding: 0 32px; background: #fff; border-color: var(--line); gap: 18px; }
.breadcrumb { font-size: 12px; gap: 12px; min-width: 0; }
.breadcrumb strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.breadcrumb .breadcrumb-root { color: var(--muted); }
.topbar-actions { gap: 10px; flex-shrink: 0; }
.icon-button { display: inline-flex; justify-content: center; align-items: center; border: 1px solid transparent; border-radius: 7px; width: 36px; height: 36px; padding: 7px; color: var(--muted); background: transparent; }
.icon-button:hover { color: var(--ink); background: #edf0f4; }
.mode-badge { color: #80551f; background: #fff6e5; border-color: #e5d3b0; font-size: 10px; letter-spacing: 0; }
main { padding: 32px 32px 48px; max-width: 1536px; min-width: 0; }
main:focus { outline: none; }
.page-heading { gap: 24px; align-items: flex-start; margin: 0 0 30px; }
.page-heading>div:first-child { min-width: 0; }
.page-heading h1 { overflow-wrap: anywhere; }
.page-heading p { font-size: 15px; line-height: 1.6; max-width: 72ch; margin-top: 9px; color: var(--muted); }
.page-heading>.actions { flex-shrink: 0; padding-top: 3px; }
.button { min-height: 40px; padding: 9px 16px; gap: 9px; border-radius: 7px; border-color: var(--orange); background: var(--orange); font-size: 14px; font-weight: 600; transition: background .15s, border-color .15s, transform .12s cubic-bezier(.23,1,.32,1); }
.button:hover { transform: none; background: #a9182e; border-color: #a9182e; }
.button.secondary { background: #fff; border-color: #cbd2dc; color: #263342; }
.button.secondary:hover { background: #edf1f5; border-color: #a9b5c5; }
.button.dark { background: #26313f; border-color: #26313f; color: white; }
.button.dark:hover { background: #172330; }
.button.small { min-height: 34px; padding: 7px 12px; font-size: 13px; }
.button svg { width: 17px; height: 17px; }
.button:disabled { transform: none; }
.button:not(:disabled):active:not(:focus-visible), .icon-button:not(:disabled):active:not(:focus-visible) { transform: scale(.98); }
.button:focus-visible { transition: none; }
.button:disabled { cursor: not-allowed; }
.icon-button[aria-busy=true] { opacity: .8; cursor: progress; background: #eef2f7; }
.icon-button[aria-busy=true] svg { animation: tfe-refresh 900ms linear infinite; }
@keyframes tfe-refresh { to { transform: rotate(360deg); } }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.text-button { display: inline-flex; align-items: center; gap: 8px; color: var(--blue); font-size: 13px; }
.text-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.back-link { font-size: 13px; margin-bottom: 18px; color: var(--muted); }
.back-link:hover { color: var(--blue); text-underline-offset: 3px; }
.app-footer { padding: 18px 32px; font-size: 11px; letter-spacing: 0; color: var(--muted); }
.app-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Shared data and form components. */
.panel { border-color: var(--line); border-radius: 10px; background: #fff; }
.panel-head { padding: 20px 22px; }
.panel-head h2 { font-size: 17px; font-weight: 650; }
.panel-head p { font-size: 13px; }
.panel-copy { padding: 0 22px 24px; font-size: 14px; line-height: 1.7; }
.spaced { margin-bottom: 24px; }
.table-wrap { max-width: 100%; scrollbar-color: #aab4c0 #f2f4f7; }
table { font-variant-numeric: tabular-nums; }
th { padding: 12px 18px; font-size: 13px; text-transform: none; letter-spacing: 0; font-weight: 600; color: #5c6877; background: #f7f8fa; border-color: var(--line); }
td { padding: 14px 18px; border-color: #e7ebef; font-size: 14px; }
tbody tr:hover { background: #f6f8fb; }
td>a:not(.button), .name-button:hover, .evidence-link { color: var(--blue); }
td>a:not(.button):hover { text-decoration: underline; text-underline-offset: 3px; }
td .actions { gap: 6px; }
.name-button { font-size: 13px; line-height: 1.5; }
.driver-avatar, .avatar { background: #e9edf3; color: #41546c; border-color: #d6dfe9; }
.score { font: 650 18px/1.2 var(--font); }
.category { padding: 3px 7px; font-size: 11px; font-weight: 500; letter-spacing: 0; background: #f3f5f8; border-color: #d8dfe7; color: #536274; border-radius: 4px; }
.category.race-category { font-size: 11px; font-weight: 700; letter-spacing: .025em; padding: 4px 7px; }
.qualifications { align-items: center; gap: 6px; }
.qualifications>span:not(.category) { padding: 0; border: 0; background: transparent; color: var(--ink); }
.qualifications .category:not(.race-category) { padding: 3px 6px; }
.status-OPEN, .status-APPROVED, .status-GREEN, .status-PUBLISHED { background: #eaf5ee; color: #28613e; border-color: #c7e1d0; }
.status-PENDING, .status-WAITLIST, .status-PREVIEW, .status-DECISION_DRAFT { background: #fff4df; color: #80551d; border-color: #ead5ae; }
.status-REJECTED, .status-CANCELLED, .status-INTERRUPTED, .status-REVOKED { background: #fff0f1; color: #a5293a; border-color: #eac6cd; }
.status-ACTIVE, .status-RECORDING { background: #e9f2fb; color: #175b8e; border-color: #bfd7ee; }
.notice, .notice.info { background: #eef4fa; border: 1px solid #cfdeeb; color: #315774; font-size: 13px; padding: 14px 16px; border-radius: 8px; line-height: 1.65; }
.notice.error { background: #fff1f2; border-color: #e9c2ca; color: #942b3b; }
.warnings { background: #fff6e8; border-color: #e8d5b7; color: #795321; font-size: 13px; }
.subtle-note { border-style: solid; background: #f7f9fc; color: var(--muted); font-size: 12px; }
.subtle-note strong { color: var(--ink); }
.empty { padding: 32px 22px; color: var(--muted); font-size: 13px; text-align: left; line-height: 1.7; }
.search, .filter, .form-field input:not([type=checkbox]), .form-field select, .form-field textarea,
.login-panel input, .bulletin-toolbar input, .bulletin-toolbar select, .source-select select,
.incident-replay-fields select, .lmu-library-filters input, .lmu-library-filters select,
.setup-class input[type=number], .image-picker .form-field input, .image-picker .form-field select {
  min-height: 42px; border: 1px solid #bec8d4; border-radius: 7px; background: #fff; color: var(--ink); font-size: 14px; padding: 10px 12px;
}
.form-field { min-width: 0; gap: 8px; }
.form-field label, .login-panel label { font-size: 13px; }
.form-field small { font-size: 12px; line-height: 1.6; }
.form-grid { gap: 22px; }
input[type=checkbox], input[type=radio], .form-field input[type=checkbox], .setup-class input[type=checkbox] { accent-color: var(--blue); }
input:disabled, select:disabled { background: #f0f2f5; color: var(--muted); }
.toolbar { gap: 16px; margin-bottom: 22px; }
.result-count { font-size: 12px; }
.metrics { gap: 0; border-block: 1px solid var(--line); background: #fff; }
.metric { border: 0; border-right: 1px solid var(--line); border-radius: 0; padding: 18px 22px; background: transparent; }
.metric:last-child { border-right: 0; }
.metric-value { font-family: var(--font); font-size: 28px; font-weight: 650; letter-spacing: -.02em; }
.metric-label { font-size: 12px; }
.metric small { color: var(--muted); font-size: 12px; }

/* Event index: title first, compact pending work, then actual event records. */
.event-directory-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 20px; margin: 26px 0; }
.event-directory-search { display: flex; position: relative; flex: 1 1 240px; max-width: 390px; min-width: 0; align-items: center; }
.event-directory-search svg { position: absolute; left: 12px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.event-directory-search input { width: 100%; min-width: 0; min-height: 42px; border: 1px solid #bac5d2; border-radius: 7px; background: #fff; color: var(--ink); font: 14px var(--font); padding: 10px 12px 10px 39px; }
.event-directory-status { display: flex; gap: 3px; flex-wrap: wrap; align-items: center; }
.event-directory-status button { min-height: 38px; padding: 8px 11px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted); font: 500 13px var(--font); white-space: nowrap; }
.event-directory-status button:hover { background: #e5eaf0; color: var(--ink); }
.event-directory-status button[aria-pressed=true] { color: var(--ink); background: #fff; border-color: #c8d2dd; font-weight: 650; }
#event-directory-count { margin-left: auto; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.event-directory-empty { padding: 38px 24px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.event-directory-empty h2 { font-size: 22px; }
.event-directory-empty p { font-size: 14px; color: var(--muted); margin: 8px 0 22px; }
.events-section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin: 28px 0 16px; }
.events-section-heading h2 { font-size: 17px; display: flex; align-items: center; gap: 10px; }
.events-section-heading h2>span { font-size: 12px; font-weight: 500; color: var(--muted); }
.event-list { display: grid; gap: 16px; }
.event-record { display: grid; grid-template-columns: minmax(220px,1.4fr) minmax(140px,.85fr) 110px; gap: 20px 28px; padding: 24px; border: 1px solid var(--line); border-radius: 10px; background: #fff; align-items: start; }
.event-record-main { min-width: 0; }
.event-record-status { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 12px; margin-bottom: 12px; }
.event-record h2 { font-size: 25px; line-height: 1.2; margin: 0 0 12px; overflow-wrap: anywhere; }
.event-record h2 a:hover { color: var(--blue); }
.event-record-description { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0 0 16px; max-width: 65ch; overflow-wrap: anywhere; }
.event-record:hover { border-color: #b5c1ce; }
.event-record-main.has-art { display: grid; grid-template-columns: 110px minmax(0,1fr); gap: 18px; align-items: start; }
.event-record-art { display: block; border-radius: 7px; overflow: hidden; background: #e4e9f0; }
.event-record-art img { display: block; width: 100%; height: auto; aspect-ratio: 4/5; object-fit: cover; }
.event-record-copy { min-width: 0; }
.event-record-next, .event-record-entry { padding-top: 3px; min-width: 0; display: grid; gap: 6px; }
.event-record-next small, .event-record-entry small { font-size: 12px; color: var(--muted); }
.event-record-next strong { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.event-record-next>span { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.event-record-next>small:last-child { margin-top: 8px; }
.event-record-entry>strong { font-size: 24px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.event-record-entry>strong>span { font-size: 14px; color: var(--muted); font-weight: 400; }
.event-pending { color: #8c5420; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.event-record-actions { grid-column: 1/-1; display: flex; align-items: center; gap: 10px; padding-top: 16px; border-top: 1px solid #e7ebef; }
.event-record-actions .card-link { margin: 0; min-height: 34px; font-size: 12px; }
.paddock-tasks { display: flex; gap: 24px; align-items: baseline; padding: 16px 0; border-block: 1px solid var(--line); margin-bottom: 28px; }
.paddock-tasks h2 { font-size: 13px; flex-shrink: 0; }
.paddock-tasks>div { display: flex; gap: 8px 24px; flex-wrap: wrap; }
.paddock-tasks a { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; }
.paddock-tasks a:hover { color: var(--blue); }
.paddock-tasks strong { font-size: 12px; font-weight: 500; color: #855019; }
.paddock-tasks svg { width: 16px; height: 16px; color: var(--muted); }
.championship-empty { border: 1px solid var(--line); border-radius: 10px; padding: 28px; background: white; }
.championship-empty h2 { font-size: 22px; }
.championship-empty p { font-size: 14px; }
.championship-empty ol { font-size: 13px; gap: 18px 32px; }
.single-races { margin-top: 34px; }
.single-races>h2 { font-size: 20px; display: flex; align-items: center; gap: 10px; }
.single-races [data-event-group-count] { font-size: 12px; color: var(--muted); font-weight: 500; }
.pilot-next-race { display: grid; grid-template-columns: 180px minmax(0,1fr) auto; gap: 24px; align-items: center; padding: 22px 24px; margin-bottom: 22px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.pilot-next-identity { display: grid; gap: 6px; font-size: 13px; }
.pilot-next-identity>a { font-weight: 650; color: var(--blue); }
.pilot-next-identity>span { font-size: 12px; color: var(--muted); }
.pilot-next-identity strong { color: var(--ink); margin-left: 4px; font-variant-numeric: tabular-nums; }
.pilot-next-copy { min-width: 0; padding-left: 24px; border-left: 1px solid var(--line); }
.pilot-next-copy h2 { font-size: 18px; }
.pilot-next-copy p { font-size: 13px; color: var(--muted); margin-top: 6px; }
.paddock-rule-updates>div { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 14px 0; color: #8b5521; }
.paddock-reports { font-size: 13px; margin: 12px 0 22px; color: var(--blue); }

/* Championship console and round calendar. */
.competition-summary { gap: 12px 24px; margin: -8px 0 24px; font-size: 13px; }
.event-tabs { display: flex; gap: 4px; margin: 0 0 28px; padding: 0; border-color: #cfd6df; scrollbar-width: thin; }
.event-tabs a { padding: 12px 14px 14px; font-size: 13px; color: var(--muted); border-radius: 0; }
.event-tabs a:first-child { padding-left: 0; }
.event-tabs a:hover { background: transparent; color: var(--ink); }
.event-tabs a[aria-current=page] { box-shadow: inset 0 -2px var(--orange); color: var(--ink); background: transparent; }
.round-photo-grid { gap: 16px; margin: 0 0 24px; }
.panel:has(>.round-photo-grid) { border: 0; background: transparent; overflow: visible; }
.panel:has(>.round-photo-grid)>.panel-head { padding: 0 0 18px; }
.panel:has(>.round-photo-grid)>.table-wrap { border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.round-photo-card { border-radius: 10px; border-color: var(--line); }
.round-photo-card>img { aspect-ratio: 16/7; }
.round-photo-copy { padding: 20px; }
.round-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; font-size: 12px; color: var(--muted); }
.round-photo-copy h3 { font-size: 21px; margin: 0 0 8px; font-family: var(--font); letter-spacing: -.02em; }
.round-date { font-size: 13px; color: #2c4057; margin-bottom: 16px; }
.round-photo-copy p { font-size: 12px; color: var(--muted); }
.round-photo-copy .actions { border-top: 1px solid #e7ebef; margin-top: 20px; padding-top: 16px; gap: 6px; }
.round-photo-copy .button.small { font-size: 11px; padding-inline: 10px; }
.standings-switch, .rule-tabs { gap: 0; padding: 3px; background: #e6eaf0; border-radius: 8px; width: fit-content; }
.standings-switch .button, .rule-tab { border: 0; background: transparent; color: #526174; min-height: 34px; border-radius: 6px; padding: 8px 14px; }
.standings-switch .button[aria-pressed=true], .rule-tab[aria-pressed=true] { background: white; color: var(--ink); border: 0; }
.standings-switch .button[aria-pressed=true]:hover { background: white; color: var(--ink); }
.standings-categories .button { background: transparent; border-color: #cdd5df; border-radius: 7px; gap: 9px; }
.standings-categories .button[aria-pressed=true], .standings-categories .button[aria-pressed=true]:hover { background: #233244; color: white; border-color: #233244; }
.standings-panel .panel-head h2 { font-size: 18px; }
.standings-table>tbody>tr>th.standings-name { font-size: 14px; }
.standings-table .is-expanded { background: #edf3fa; }
.standings-table .standings-expanded>td { background: #f6f8fb; }
.standings-help { font-size: 13px; }
.standings-table .standings-rank { font-weight: 600; color: #526174; }
.standings-points strong { font-size: 15px; }
.standings-scroll { max-height: min(72dvh,760px); }
.standings-table>thead>tr>th { position: sticky; top: 0; z-index: 3; }
.standings-table>thead>tr>th:first-child, .standings-table>tbody>tr>.standings-rank { position: sticky; left: 0; width: 56px; min-width: 56px; max-width: 56px; padding-inline: 12px; }
.standings-table>thead>tr>th:first-child { z-index: 5; }
.standings-table>tbody>tr>.standings-rank { z-index: 2; background: #fff; font-size: 15px; font-weight: 600; }
.standings-table>thead>tr>th:nth-child(2) { left: 56px; z-index: 5; }
.standings-table>tbody>tr>th.standings-name { position: sticky; left: 56px; background: #fff; z-index: 2; font-size: 15px; min-width: 200px; }
.standings-table>tbody>tr:hover>.standings-rank, .standings-table>tbody>tr:hover>th.standings-name { background: #f6f8fb; }
.standings-table>tbody>tr.is-expanded>.standings-rank, .standings-table>tbody>tr.is-expanded>th.standings-name { background: #edf3fa; }
.standings-identity { display: flex; gap: 11px; align-items: center; min-width: 0; }
.standings-identity>span { display: flex; flex-shrink: 0; }
.standings-identity .pilot-portrait.is-small { width: 30px; font-size: 12px; border-radius: 6px; }
.standings-identity>a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.standings-identity>a:hover { color: var(--blue); text-decoration: underline; }

/* Guided setup: one quiet step rail, a spacious form and explicit saving state. */
.setup-steps { gap: 0; border-bottom: 1px solid #ccd5df; margin-bottom: 24px; background: transparent; }
.setup-step { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; padding: 14px 10px; gap: 9px; font-size: 12px; min-width: 0; }
.setup-step span { display: grid; place-items: center; border: 1px solid #b9c4d1; border-radius: 50%; width: 24px; height: 24px; flex-shrink: 0; font-size: 11px; background: transparent; color: #526174; }
.setup-step:hover { background: #e9edf3; }
.setup-step[aria-current=step] { background: transparent; color: var(--ink); border-color: var(--orange); font-weight: 650; }
.setup-step[aria-current=step] span { background: var(--orange); border-color: var(--orange); color: white; }
.setup-workspace { max-width: 1120px; border-radius: 10px; padding: 28px; border-color: var(--line); }
.setup-workspace h2 { font-size: 22px; margin-bottom: 26px; }
.setup-help { font-size: 13px; }
.setup-round, .setup-classes { border-color: #d1d9e3; border-radius: 8px; }
.setup-class input:disabled { background: #f1f3f6; }
.setup-controls { padding-top: 18px; padding-bottom: 6px; gap: 16px; background: #fff; border-color: var(--line); }
.setup-controls>span { font-size: 12px; }
.setup-summary { font-size: 14px; }

/* Library, announcements and the sporting driver card use the same surfaces. */
.race-card { border-radius: 10px; padding: 24px; border-color: var(--line); }
.race-card h2, .announcement-card h2 { font: 650 24px/1.3 var(--font); letter-spacing: -.02em; }
.race-card .race-meta { gap: 24px; }
.race-meta small { font-size: 12px; }
.race-meta strong { font-size: 17px; }
.card-copy { font-size: 14px; }
.announcement-card { border: 1px solid var(--line); border-radius: 10px; }
.announcement-event { color: var(--blue); font-size: 13px; }
.announcement-entry { border-color: var(--line); border-radius: 10px; }
.registration-facts small { font-size: 11px; letter-spacing: 0; }
.registration-facts strong { font-size: 13px; }
.bulletin-entry { background: white; border-color: var(--line); border-radius: 10px; }
.lmu-library-grid, .lmu-model-picker-grid { gap: 18px; }
.lmu-model-card, .lmu-brand-card { border-color: var(--line); border-radius: 10px; }
.lmu-car-photo, .lmu-livery-grid img, .personal-livery-preview { background: #e9edf2; }
.personal-livery-preview:hover { background: #e1e7ef; }
.lmu-model-card:has(input:checked) { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.lmu-model-copy h3, .personal-livery-card h3 { font-size: 18px; font-weight: 650; }
.lmu-model-copy p { font-size: 13px; }
.lmu-map { background: #edf1f6; color: #355571; }
.personal-livery-stage, .pilot-photo-preview { background: #e9edf2; }
.library-status { font-size: 13px; }
.pilot-card-masthead { background: #1e2937; color: #f8fafc; border-radius: 12px; gap: 26px; padding: 30px; }
.pilot-portrait { background: #e4eaf2; color: #384f6c; font-family: var(--font); border-radius: 10px; }
.pilot-card-name h1 { font: 650 clamp(28px,3vw,40px)/1.15 var(--font); letter-spacing: -.025em; }
.pilot-card-meta, .pilot-card-tf dt { color: #c2cddd; }
.pilot-card-tf { border-color: #526278; }
.pilot-card-tf dd { font-family: var(--font); letter-spacing: -.03em; }
.pilot-card-tf strong { color: #f8fafc; }
.pilot-team-availability { color: #d1e9db; border-color: #648b76; }
.pilot-card-tabs { border-color: #cfd6df; gap: 26px; margin: 18px 0 28px; }
.pilot-card-tabs button { font-size: 14px; }
.pilot-card-story, .pilot-private-grid>.pilot-card-section, .pilot-card-content>.pilot-card-section { border-radius: 10px; border-color: var(--line); }
.pilot-card-section h2 { font-size: 19px; }
.pilot-card-qualifications>span { font-size: 13px; }
.pilot-empty-copy, .pilot-biography.is-empty { font-size: 14px; }
.pilot-team-members button { color: var(--blue); }
.pilot-invite-code { background: #f1f4f8; }
.evidence-link { color: var(--blue); }
.dossier-raw { background: #f2f4f7; }
.dossier-plot { background: #f8fafc; }
.source-select select { border-color: #bec8d4; }
.dropzone { border-color: #b5c5d6; background: #f7f9fc; }
.dropzone.dragging { background: #e9f2fb; border-color: #377bad; }
.upload-mark, .process-step { color: #3d6284; background: #eaf0f7; border-color: #c7d6e6; }
.profile-option:has(input:checked) { background: #eff5fb; border-color: #6c95b9; }

/* Focused dialogs, sign-in and feedback. */
dialog { border: 0; border-radius: 12px; max-height: 88dvh; box-shadow: 0 24px 80px #111d3240; background: #fff; }
dialog::backdrop { background: #15203180; backdrop-filter: none; }
.dialog-head { align-items: center; padding: 20px 24px; background: white; }
.dialog-head h2 { font: 650 23px/1.3 var(--font); letter-spacing: -.02em; margin: 0; }
.dialog-head .icon-button { flex-shrink: 0; }
.dialog-body { padding: 24px; }
.dialog-body p { line-height: 1.7; }
.login-panel { max-width: 440px; padding: 28px; border-radius: 12px; }
.login-panel .button[type=submit] { min-width: 120px; }
.is-signed-out .sidebar { position: static; width: 100%; height: 84px; min-height: 84px; padding: 18px 32px; }
.is-signed-out .brand.brand-lockup { width: 216px; margin: 0; }
.is-signed-out .app-body { margin-left: 0; min-height: calc(100dvh - 84px); }
.is-signed-out .topbar { display: none; }
.is-signed-out main { max-width: 504px; padding-top: clamp(36px,7vh,72px); }
.is-signed-out .page-heading h1 { font-size: 30px; }
.is-signed-out .page-heading { margin-bottom: 24px; }
.is-signed-out .workspace, .is-signed-out .sidebar-bottom, .is-signed-out #navigation-toggle { display: none; }
.is-signed-out .sidebar { justify-content: flex-start; }
.connection-page main { padding: 28px 32px; }
.connection-page h1 { font-size: 28px; }
.connection-page .form-actions { display: flex; justify-content: flex-end; }
.loading-line { background: var(--orange); }
.spinner { border-color: #d8e0e9; border-top-color: var(--blue); }
#toast { left: calc(50% + 124px); background: #26384d; color: white; border-radius: 8px; font-size: 13px; max-width: calc(100% - 40px); box-shadow: 0 10px 30px #18253b26; }
#toast.error { background: #a3253b; }

@media (min-width:1280px) {
  .event-record { grid-template-columns: minmax(210px,1.6fr) minmax(140px,1fr) 100px 152px; align-items: center; gap: 24px; }
  .event-record:has(.has-art) { grid-template-columns: minmax(330px,1.6fr) minmax(140px,1fr) 92px 152px; }
  .event-record-actions { grid-column: auto; border: 0; padding: 0; flex-direction: column; align-items: stretch; }
}
@media (min-width:1600px) { main { padding-top: 40px; } }
@media (max-width:1200px) and (min-width:801px) {
  :root { --sidebar-width: 224px; }
  .sidebar { padding-inline: 12px; }
  .brand.brand-lockup { gap: 7px; padding-inline: 2px; }
  .brand-title { font-size: 17px; }
  main { padding: 28px 24px 40px; }
  .topbar { padding-inline: 24px; }
  .page-heading { flex-wrap: wrap; }
  .event-record { grid-template-columns: minmax(220px,1.4fr) minmax(160px,1fr); }
  .event-record-main { grid-column: 1/-1; }
  .event-record-next { grid-column: 1; }
  .event-record-entry { grid-column: 2; }
  .pilot-next-race { grid-template-columns: 160px minmax(0,1fr); }
  .pilot-next-race>.actions { grid-column: 2; }
}
@media (max-width:1000px) {
  .round-photo-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .paddock-tasks { align-items: flex-start; flex-direction: column; gap: 10px; }
  .setup-steps { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width:800px) {
  .sidebar { position: sticky; inset: 0 0 auto; width: 100%; min-height: 64px; padding: 12px 18px; display: flex; flex-direction: row; align-items: center; justify-content: space-between; overflow: visible; z-index: 10; }
  .brand.brand-lockup { display: flex; width: auto; max-width: 215px; height: 40px; padding: 0; margin: 0; gap: 8px; }
  .brand-title { font-size: 18px; }
  .brand-signature { font-size: 8px; }
  .brand-symbol { flex-basis: 42px; width: 42px; }
  #navigation-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 12px; border: 1px solid #536071; border-radius: 7px; color: #f0f4fa; background: transparent; font-size: 13px; }
  .sidebar>.workspace, .sidebar>.nav-label, .sidebar-bottom { display: none; }
  #primary-navigation { display: none; }
  .navigation-open #primary-navigation { display: grid; position: absolute; top: 100%; left: 0; right: 0; max-height: calc(100dvh - 64px); overflow-y: auto; padding: 12px 16px 22px; background: var(--dark); border-top: 1px solid #35404e; box-shadow: 0 14px 24px #101c2f26; }
  #primary-navigation a { min-height: 44px; font-size: 14px; padding: 10px 12px; }
  #primary-navigation .nav-group { display: block; margin-top: 14px; padding-top: 8px; }
  #primary-navigation .nav-icon { display: block; width: 20px; height: 20px; }
  .app-body { margin-left: 0; }
  .topbar { height: 56px; padding: 0 18px; }
  .breadcrumb { font-size: 12px; gap: 8px; }
  .breadcrumb .breadcrumb-root, .breadcrumb>span:not(.breadcrumb-root) { display: none; }
  .breadcrumb>strong { display: block; max-width: 45vw; }
  .topbar-actions { gap: 5px; }
  main { padding: 26px 18px 36px; }
  .page-heading { gap: 18px; margin-bottom: 24px; flex-wrap: wrap; }
  .page-heading h1 { font-size: 30px; }
  .page-heading p { font-size: 14px; }
  .page-heading>.actions { padding-top: 0; }
  .button.small { min-height: 38px; font-size: 12px; }
  .event-directory-toolbar { gap: 12px; }
  .event-directory-search { flex-basis: 100%; max-width: none; }
  .event-directory-status button { min-height: 44px; padding-inline: 10px; }
  .event-record { grid-template-columns: minmax(0,1fr) 110px; padding: 20px; gap: 20px; }
  .event-record-main { grid-column: 1/-1; }
  .event-record-next { grid-column: 1; }
  .event-record-entry { grid-column: 2; grid-row: auto; margin-top: 0; }
  .event-record h2 { font-size: 22px; }
  .event-record-main.has-art { grid-template-columns: 94px minmax(0,1fr); gap: 14px; }
  .event-record-actions { flex-wrap: wrap; }
  .event-record-actions .button { min-height: 40px; }
  .events-section-heading { margin-top: 24px; }
  .events-section-heading h2 { font-size: 17px; }
  .pilot-next-race { grid-template-columns: minmax(0,1fr); gap: 18px; padding: 20px; }
  .pilot-next-identity { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
  .pilot-next-copy { border-left: 0; padding: 0; }
  .pilot-next-race>.actions { grid-column: auto; }
  .competition-summary { gap: 10px 18px; margin-bottom: 20px; }
  .event-tabs { margin-bottom: 24px; padding-bottom: 0; }
  .event-tabs a { font-size: 13px; min-height: 44px; }
  .panel-head { padding: 18px 20px; flex-wrap: wrap; }
  .panel-copy { padding: 0 20px 22px; }
  .round-photo-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .round-photo-copy { padding: 18px; }
  .round-photo-copy h3 { font-size: 20px; }
  .setup-workspace { padding: 22px; }
  .setup-step { font-size: 12px; padding: 12px 6px; gap: 7px; }
  .setup-controls { flex-wrap: wrap; }
  .pilot-card-masthead { padding: 24px; }
  .pilot-card-tf { border-color: #526278; }
  .pilot-card-tabs { gap: 20px; }
  .pilot-card-tabs button { font-size: 13px; min-height: 44px; }
  .pilot-card-name h1 { font-size: 32px; }
  .app-footer { padding: 18px; font-size: 11px; }
  #toast { left: 50%; }
  .is-signed-out .sidebar { height: 72px; min-height: 72px; padding: 16px 18px; }
  .is-signed-out .app-body { min-height: calc(100dvh - 72px); }
  .is-signed-out main { padding-top: 32px; }
}
@media (max-width:520px) {
  .sidebar { padding-inline: 16px; }
  .brand-title { font-size: 17px; }
  .brand.brand-lockup { gap: 5px; }
  #navigation-toggle { padding-inline: 10px; }
  .topbar { padding-inline: 16px; }
  main { padding: 24px 16px 32px; }
  .page-heading h1 { font-size: 28px; }
  .events-section-heading { gap: 8px; }
  .events-section-heading .text-button { font-size: 12px; }
  .event-record { grid-template-columns: minmax(0,1fr) 100px; padding: 20px 18px; gap: 18px; }
  .event-record-status { font-size: 12px; }
  .event-record-next>small:last-child { margin-top: 4px; }
  .event-record h2 { font-size: 22px; }
  .paddock-tasks { margin-bottom: 22px; }
  .paddock-tasks a { flex-wrap: wrap; gap: 5px 10px; }
  .championship-empty { padding: 22px; }
  .championship-empty ol { flex-direction: column; gap: 10px; }
  .round-photo-grid { grid-template-columns: minmax(0,1fr); }
  .round-card-top { margin-bottom: 14px; }
  .round-photo-copy .button.small { font-size: 12px; }
  .round-photo-copy p { font-size: 13px; }
  .round-photo-copy .actions { margin-top: 18px; }
  .table-wrap { overflow-x: auto; }
  th, td { padding: 12px 14px; font-size: 12px; }
  .panel-head { padding: 18px; }
  .panel-head h2 { font-size: 17px; }
  .standings-table>tbody>tr>th.standings-name { min-width: 165px; padding-inline: 12px; font-size: 14px; }
  .standings-identity { gap: 8px; }
  .standings-identity .pilot-portrait.is-small { width: 26px; font-size: 11px; }
  .event-directory-status { gap: 0; width: 100%; justify-content: space-between; }
  .event-directory-status button { font-size: 12px; padding-inline: 8px; }
  #event-directory-count { margin-left: 0; }
  .setup-steps { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .setup-step { padding: 11px 8px; font-size: 12px; }
  .setup-workspace { padding: 20px 18px; }
  .setup-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-block: 14px 8px; }
  .setup-controls>span { grid-column: 1/-1; grid-row: 1; }
  .setup-controls>div:last-child { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
  .setup-controls .button { font-size: 12px; padding-inline: 10px; }
  .setup-round { padding: 18px 14px; }
  .setup-summary { grid-template-columns: 1fr; gap: 6px; }
  .setup-summary dd { margin-bottom: 14px; }
  .form-grid { gap: 20px; }
  dialog { width: calc(100% - 24px); max-height: 90dvh; }
  .dialog-head { padding: 18px; }
  .dialog-head h2 { font-size: 21px; }
  .dialog-body { padding: 20px 18px; }
  .pilot-card-masthead { padding: 22px 18px; gap: 18px 14px; }
  .pilot-card-name h1 { font-size: 27px; }
  .pilot-card-photo>.button { white-space: normal; line-height: 1.35; padding: 7px 6px; min-width: 0; width: 100%; font-size: 11px; }
  .pilot-card-tf dd { font-size: 28px; }
  .pilot-card-tabs { gap: 16px; }
  .pilot-card-tabs button { font-size: 12px; }
  .pilot-card-section { padding: 22px 18px; }
  .login-panel { padding: 24px 20px; }
  .metrics { gap: 0; }
  .metric { padding: 16px; border-bottom: 1px solid var(--line); }
  .metric:nth-child(even) { border-right: 0; }
}
@media (prefers-reduced-motion:reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media (max-width:880px), (pointer:coarse) {
  .button, .button.small, .icon-button, #navigation-toggle,
  .event-record-actions .card-link, .event-directory-status button,
  .text-button, .setup-step { min-height: 44px; }
  .icon-button { min-width: 44px; }
  input:not([type=checkbox]):not([type=radio]), select, textarea,
  .event-directory-search input { min-height: 44px; }
}
@media print {
  .sidebar, .topbar, .app-footer, #navigation-toggle, .event-record-actions, .paddock-tasks { display: none !important; }
  .app-body { margin: 0; }
  main { padding: 0; max-width: none; }
  body { background: #fff; color: #000; }
  .panel, .event-record { box-shadow: none; border-color: #ccc; }
  .table-wrap { overflow: visible; }
}
.activation-panel { max-width: 560px; }
.activation-panel h2 { margin: 28px 0 12px; font-size: 22px; }
.activation-panel form { display: grid; gap: 12px; }
.activation-panel form label { margin-top: 8px; }
.activation-panel .form-error:empty { display: none; }
.activation-panel>.text-button, .login-panel>.text-button { margin-top: 16px; display: block; }
.invite-delivery { display: grid; gap: 10px; margin-top: 24px; }
.invite-delivery label { font-size: 14px; font-weight: 600; }
.invite-delivery input { width: 100%; min-width: 0; font-size: 13px; }
.invite-delivery button { justify-self: start; margin-bottom: 12px; }
.pilot-setup-note { margin: 20px 0; }
.pilot-setup-note p { margin: 6px 0 0; }
.round-collection-label { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; white-space: normal; }
.collection-intro, .collection-help, .collection-provenance p { max-width: 70ch; line-height: 1.65; }
.collection-intro { margin: 0 0 20px; }
.collection-help { margin: 16px 0 24px; color: var(--muted); font-size: 13px; }
.collection-options { margin: 0; padding: 0; border: 0; min-width: 0; }
.collection-options legend { padding: 0; margin-bottom: 12px; font-size: 14px; font-weight: 600; }
.collection-option { display: flex; align-items: flex-start; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); cursor: pointer; }
.collection-option:last-child { border-bottom: 1px solid var(--line); }
.collection-option input { width: 18px; height: 18px; margin: 3px 0 0; flex: 0 0 auto; accent-color: var(--orange); }
.collection-option span { display: grid; gap: 6px; min-width: 0; }
.collection-option strong { font-size: 16px; }
.collection-option small { font-size: 14px; color: var(--muted); line-height: 1.55; }
.collection-options:disabled .collection-option { cursor: default; }
.collection-reason textarea { min-height: 100px; }
.collection-file-status { margin-top: 14px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.collection-filename { overflow-wrap: anywhere; }
.collection-source-label { margin-bottom: 20px; font-size: 13px; color: var(--muted); }
.race-context { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; margin: -12px 0 24px; font-size: 14px; color: var(--muted); }
.race-context strong { color: var(--ink); font-size: 16px; }
.race-next { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px; margin-bottom: 24px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
.race-next h2 { margin: 0 0 6px; font-size: 20px; }
.race-next p { margin: 0; max-width: 70ch; color: var(--muted); line-height: 1.55; }
.race-next>.button { flex: 0 0 auto; }
.race-operation-columns { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(290px, 1fr); gap: 24px; align-items: start; }
.race-operation-main, .race-operation-aside { min-width: 0; }
.race-operation-columns .spaced { margin-top: 0; margin-bottom: 24px; }
.race-section-intro { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px; flex-wrap: wrap; }
.race-section-intro p { margin: 0; }
.race-operation-main td>small { display: block; margin-top: 5px; color: var(--muted); white-space: normal; }
.race-operation-main td { vertical-align: top; }
.race-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 28px; padding: 24px; margin: 0; }
.race-facts+.actions { padding: 0 24px 24px; }
.race-facts dt, .race-server-facts dt, .race-live-state small { color: var(--muted); font-size: 13px; }
.race-facts dd, .race-server-facts dd { margin: 5px 0 0; overflow-wrap: anywhere; }
.race-server-facts { margin: 24px 0; display: grid; gap: 16px; }
.race-help { color: var(--muted); font-size: 13px; line-height: 1.6; max-width: 70ch; }
.race-live-state { display: grid; gap: 6px; margin-top: 0; }
.race-issues { padding-left: 20px; margin: 16px 0 20px; font-size: 14px; line-height: 1.65; }
.race-briefings { list-style: none; padding: 0 24px; margin: 0; }
.race-briefings li { display: grid; gap: 6px; padding: 18px 0; }
.race-briefings li+li { border-top: 1px solid var(--line); }
.race-briefings small { font-size: 12px; color: var(--muted); }
.race-control-sheet { width: 100%; min-height: 300px; margin-top: 12px; font-family: inherit; font-size: 14px; line-height: 1.6; }
@media (max-width: 1100px) {
 .race-operation-columns { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 650px) {
 .race-context { margin-top: -8px; gap: 10px 14px; }
 .race-next { flex-direction: column; align-items: stretch; padding: 20px; gap: 16px; }
 .race-next>.button { width: 100%; }
 .race-section-intro { padding: 16px 20px; }
 .race-facts { padding: 20px; gap: 18px; grid-template-columns: minmax(0, 1fr); }
 .race-facts+.actions { padding: 0 20px 20px; }
 .race-briefings { padding: 0 20px; }
}
.collection-provenance { margin-bottom: 24px; }
.collection-provenance h3 { margin-top: 0; }
.collection-provenance p { margin: 12px 0; }
.collection-metadata { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; margin: 20px 0; }
.collection-metadata>div { min-width: 0; }
.collection-metadata dt { color: var(--muted); font-size: 12px; }
.collection-metadata dd { margin: 4px 0 0; font-size: 14px; overflow-wrap: anywhere; }
#collection-import-form input[type=file] { max-width: 100%; min-width: 0; font-size: 14px; }
#collection-import-form input[type=file]::file-selector-button { margin-right: 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); color: var(--ink); font: inherit; cursor: pointer; }
@media (max-width: 650px) {
  .collection-metadata { grid-template-columns: 1fr; gap: 12px; }
  #collection-form .form-actions, #collection-import-form .form-actions { display: grid; grid-template-columns: 1fr; }
  #collection-form .form-actions .button, #collection-import-form .form-actions .button { width: 100%; }
}
