:root{font-family:Inter,Arial,sans-serif;color:#f4f4f6;background:#101115;color-scheme:dark}*{box-sizing:border-box}body{margin:0}header{background:#1b1d23;border-bottom:3px solid #d82736;padding:20px 5%;display:flex;justify-content:space-between;align-items:center;gap:15px;flex-wrap:wrap}h1{margin:0;font-size:24px}h1 span{color:#e43442}header small,.muted{color:#a7aab3}main{max-width:1050px;margin:25px auto;padding:0 18px}.panel{background:#1c1e25;border:1px solid #383b46;border-radius:14px;padding:20px;margin-bottom:18px}nav{display:flex;gap:10px;margin-bottom:18px;flex-wrap:wrap}button{background:#d82736;color:#fff;border:0;padding:11px 16px;border-radius:8px;cursor:pointer;font-weight:600}button.secondary,.tab{background:#343741}.tab.active{background:#d82736}button:disabled{opacity:.45;cursor:not-allowed}input,select{width:100%;background:#12141a;border:1px solid #4b4f5d;border-radius:7px;color:white;padding:11px;font:inherit;margin-top:6px}label{display:block;font-size:13px;color:#bdc0ca;margin:12px 0 6px}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.item{padding:16px;border:1px solid #424651;border-radius:9px;margin:10px 0}.row{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}.badge{font-size:12px;padding:5px 8px;border-radius:5px;background:#4a3940}.badge.status-finalised{background:#194d35;color:#9ff0be}.badge.status-appealed{background:#704016;color:#ffcf8a}.badge.status-amended{background:#51366b;color:#e0c5ff}.badge.status-overturned{background:#6c2630;color:#ffc0c6}#notice{min-height:22px;margin-bottom:12px;color:#ff8993}pre{white-space:pre-wrap;font:inherit;overflow-wrap:anywhere}#auth{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:13px}#detail[hidden],section[hidden],button[hidden]{display:none!important}@media(max-width:620px){.grid{grid-template-columns:1fr}}

textarea{width:100%;background:#12141a;border:1px solid #4b4f5d;border-radius:7px;color:#fff;padding:11px;font:inherit;min-height:95px;margin-top:6px}small{display:block}#notice{white-space:pre-wrap}.item.is-internal{border-color:#b38b2e;background:#282418}.internal-warning{color:#ffda7e;font-weight:bold}.actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}button.danger{background:#74303b}#staffTools[hidden],#importTools[hidden],#editor[hidden]{display:none!important}#staffList .item{padding:12px}
.team-chip{display:inline-block;background:#343741;border-radius:6px;padding:7px 10px;margin:4px;font-size:13px}#rosterList .item p{margin:5px 0 0}#rosterList .item{gap:12px}#rosterForm hr{border-color:#383b46}#roster[hidden],#rosterTab[hidden]{display:none!important}

#reportFields[hidden],#targetWrap[hidden],#reportOtherSessionWrap[hidden],#incidentOtherSessionWrap[hidden],#customClassificationWrap[hidden],#ownerTools[hidden]{display:none!important}a{color:#ff9aa3}#submissionInbox label{min-width:180px}#submissionInbox select{margin-top:3px}

.inbox-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:14px 0 22px}.inbox-tab{background:#343741}.inbox-tab.active{background:#d82736}.portal-actions{justify-content:flex-start;margin:16px 0}.submission-driver{font-size:1.18rem;color:#fff}.submission-details{border-top:1px solid #424651;margin-top:12px;padding-top:10px}.submission-details[hidden]{display:none}.checkbox-label,.attach-option{display:flex;align-items:center;gap:10px}.checkbox-label input,.attach-option input{width:auto;margin:0;accent-color:#d82736}.attach-option{border:1px solid #424651;border-radius:8px;padding:12px;margin:8px 0}.linked-reports{border-top:1px solid #424651;margin-top:20px;padding-top:10px}#importTools{margin-top:60px;padding-top:20px;border-top:1px solid #424651}#importTools h3{font-size:14px;color:#a7aab3}@media(max-width:620px){.inbox-tabs{gap:5px}.inbox-tab{padding:9px 5px;font-size:12px}}
/* Milestone 4A.3 */
#staffNavCount{display:inline-block;margin-left:5px;font-weight:700;color:#ffcf68}
#staffNavCount[hidden]{display:none}
#submissionDetail pre{white-space:pre-wrap;overflow-wrap:anywhere;background:#151820;border:1px solid #373b45;border-radius:8px;padding:14px}
#submissionDetail .grid{margin:12px 0}
#submissionDetail .actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
#submissionDetail select{width:100%;margin:8px 0 12px}
#teamList .team-chip{display:inline-flex;align-items:center;gap:8px;margin:5px}
#teamList .team-chip button{font-size:12px;padding:4px 8px}
#refreshInbox{min-width:38px;font-size:20px;padding:5px 11px}

/* Milestone 4A.4 loading feedback and detail navigation */
button.is-loading{opacity:.55;cursor:wait;pointer-events:none}button:disabled{opacity:.45;cursor:not-allowed}
.button-spinner{display:inline-block;width:13px;height:13px;margin-right:8px;vertical-align:-2px;border:2px solid rgba(255,255,255,.35);border-top-color:#fff;border-radius:50%;animation:s1spin .7s linear infinite}
@keyframes s1spin{to{transform:rotate(360deg)}}
#incidentDetail pre{white-space:pre-wrap;overflow-wrap:anywhere;background:#151820;border:1px solid #373b45;border-radius:8px;padding:14px}
#showArchivedInbox{width:auto;margin:0;accent-color:#d82736}

/* Milestone 4A.5: compact, top-positioned report tool */
.copy-tool{border:1px solid #424651;border-radius:10px;padding:12px 14px;margin:12px 0 18px;background:#191b22}
.copy-tool h3{margin:0 0 4px;font-size:16px}
.copy-tool p.muted{font-size:12px;margin:3px 0 8px}
.copy-tool .filter-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.copy-tool .filter-grid label{margin:0;font-size:12px}
.copy-tool select{padding:7px 8px;margin-top:3px}
.copy-tool .checkbox-label{font-size:12px;margin:8px 0}
.copy-tool #copyCount{margin:6px 0;font-size:12px}
.copy-tool #copyAnnouncements{padding:8px 12px}
@media(max-width:620px){.copy-tool .filter-grid{grid-template-columns:1fr 1fr 1fr}}

/* 4A.6 */
.panel-feedback{margin-top:14px;padding:10px 12px;border-radius:7px;font-size:13px;min-height:0}.panel-feedback:empty{display:none}.feedback-success{background:#183c30;color:#a6f1c6;border:1px solid #367358}.feedback-error{background:#4a222b;color:#ffb2ba;border:1px solid #8d424c}#notice.feedback-success{color:#a6f1c6}#notice.feedback-error{color:#ff8993}.team-entry{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 12px;border-bottom:1px solid #393c45}.team-entry p{margin:4px 0;font-size:12px}.team-entry .actions{margin:0}.team-entry button{font-size:12px;padding:6px 10px}#rosterForm{margin-bottom:12px}#rosterSearch{max-width:100%}

/* 4A.7 */
#notice[hidden],#driversPane[hidden],#teamsPane[hidden]{display:none!important}
.roster-tabs{display:flex;gap:8px;margin:16px 0}.roster-tab{flex:1;background:#343741}.roster-tab.active{background:#d82736}
button.was-clicked:not(:disabled){filter:grayscale(.75);opacity:.48;transition:opacity .1s ease,filter .1s ease}
.copy-fallback{background:#1c1e25;color:#fff;border:1px solid #555b68;border-radius:12px;width:min(90vw,750px)}.copy-fallback::backdrop{background:#000a}.copy-fallback textarea{width:100%;height:280px}

button.was-clicked,button.is-loading,button:disabled{background:#555965!important;color:#d7d9df!important;opacity:.75!important;cursor:wait;filter:grayscale(.55)}
.copy-fallback{width:min(750px,94vw);max-height:85vh;background:#1c1e25;color:#fff;border:1px solid #5b606e;border-radius:12px;padding:20px}.copy-fallback::backdrop{background:rgba(0,0,0,.75)}.copy-fallback textarea{width:100%;height:45vh;min-height:200px;white-space:pre-wrap}.copy-result{color:#a6e5b7}

.team-details-panel{margin:14px 0;padding:16px}.team-details-panel h3{margin:0}.team-member{display:flex;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid #393c45}.team-member strong{flex:1}.team-member .muted{flex:1}.team-member button{font-size:12px}

/* 4A.8.3: dedicated team details view and collapsible recovery list */
#teamsOverview[hidden],#teamDetailsView[hidden],#deletedDriversList[hidden]{display:none!important}
#teamDetailsView{padding:8px 0 20px;min-height:260px}
#teamDetailsView>.row{margin-bottom:20px}
#teamDetailsView h3{font-size:22px;margin-bottom:8px}

.historical-import{margin-top:1.5rem;border-top:1px solid #777;padding-top:1rem}.historical-preview-scroll{max-height:360px;overflow:auto}.historical-preview-scroll table{border-collapse:collapse;width:100%;font-size:.85rem}.historical-preview-scroll th,.historical-preview-scroll td{padding:.4rem;border-bottom:1px solid #888;text-align:left}.historical-preview-scroll th{position:sticky;top:0;background:#252a31;color:white}

.historical-publish-control{margin:1.3rem 0;padding:1rem;border:1px solid #494d59;border-radius:10px;background:#22252e}.historical-publish-control h4{margin:0 0 .4rem}.historical-publish-control p{margin:.5rem 0 1rem}

/* Milestone 4B.5 — readable incident register, unobtrusive serial references */
#results .incident-register-card{padding:18px 20px}
.incident-register-top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}
.incident-register-heading h3{font-size:1.24rem;line-height:1.35;margin:0 0 6px;font-weight:750;color:#fff}
.incident-register-driver{font-size:1.12rem;font-weight:650;color:#f5f5f7;margin:0 0 6px}
.incident-register-context{font-size:.9rem;color:#c7cad2;margin:6px 0}
.incident-register-location{font-size:.88rem;color:#aeb4c0;margin:6px 0}
.incident-register-summary{font-size:.9rem;color:#c7cad2;margin:10px 0 5px}
.incident-register-penalties{font-size:.85rem;color:#aeb4c0;margin:5px 0 12px}
.incident-register-footer{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin-top:14px;flex-wrap:wrap}
.incident-register-ref,.incident-detail-reference{font-size:.71rem;font-weight:400;color:#898e9a;overflow-wrap:anywhere;max-width:100%}
.incident-register-ref{margin-left:auto;text-align:right}
.incident-detail-reference{margin:18px 0 12px;text-align:right}
@media(max-width:620px){.incident-register-heading h3{font-size:1.1rem}.incident-register-driver{font-size:1rem}}

/* Milestone 5A — results editor */
.race-session{border:1px solid #444957;border-radius:12px;padding:15px;margin:20px 0;background:#20232b}.race-table-wrap{overflow-x:auto}.race-table{width:100%;border-collapse:collapse;min-width:850px}.race-table th{text-align:left;color:#bfc4cf;font-size:12px;padding:8px;border-bottom:1px solid #444957}.race-table td{padding:6px;vertical-align:top;border-bottom:1px solid #343842}.race-table td:first-child{width:72px}.race-table input,.race-table select{margin:0;min-width:90px;font-size:13px;padding:9px}.race-table td:nth-child(2){min-width:210px}.race-table td:nth-child(3){min-width:160px}.race-table td:nth-child(2) select{width:100%}.race-table small{margin-top:4px}.race-joker{display:flex;align-items:center;gap:12px;border-bottom:1px solid #393d47;padding:9px 0;margin:0}.race-joker input{width:auto;margin:0}#raceEventFeedback:empty{display:none}#raceEventFeedback:not(:empty){padding:12px;margin:10px 0;border-radius:7px}#raceResultsList .item h3{margin:0 0 8px}#raceResultsList .item p{margin:0 0 8px}#raceEventEditor .grid{margin-bottom:22px}

/* Milestone 5A.1: finishing order is determined by row order */
.race-table td:first-child{width:126px;min-width:126px}.race-order{display:flex;align-items:center;gap:7px;white-space:nowrap}.race-rank{font-weight:700;min-width:28px;color:#f1f3f8}.race-grip{font-size:23px;cursor:grab;user-select:none;color:#aeb6c7;line-height:1}.race-arrows{display:flex;flex-direction:column;gap:3px}.race-arrows button{padding:2px 8px;font-size:10px;line-height:1.2;min-width:27px}.race-arrows button:disabled{opacity:.28;cursor:not-allowed}.race-table tbody tr[draggable=true]{cursor:grab}.race-table tbody tr.race-dragging{opacity:.35}.race-table tbody tr.race-drop-target{outline:2px dashed #8faaff;outline-offset:-2px;background:#2b3549}.race-table tbody input,.race-table tbody select{cursor:auto}

/* Milestone 5B OCR */
.race-ocr-panel{border:1px solid var(--border,#444);border-radius:12px;padding:16px;margin:18px 0;background:rgba(127,127,127,.06)}
.race-ocr-panel input[type=file]{max-width:100%;padding:9px}
.race-ocr-panel .race-table input{min-width:85px;max-width:190px}
.race-ocr-panel .race-table select{min-width:150px}
#raceOcrStatus{margin:8px 0}

/* 5B.2: room for an editable best-lap column in race classifications. */
.race-table{min-width:1050px}
.race-table input[data-race-field=bestLap]{min-width:105px}

/* 5B.4 — OCR driver-match review cues; no impact on official scoring yet. */
.race-table tbody tr.race-match-unmatched{background:rgba(255,207,62,.13)}
.race-table tbody tr.race-match-partial{background:rgba(255,151,45,.14)}
.race-table tbody tr.race-match-team-points{background:rgba(76,156,255,.16)}
.race-match-unmatched .race-match-cue{color:#ffe083}
.race-match-partial .race-match-cue{color:#ffb46e}
.race-match-team-points .race-match-cue{color:#9dc8ff}
.race-match-cue{display:block;font-size:11px;margin-top:5px;font-weight:650}
.race-team-points-label{display:flex;align-items:center;gap:5px;font-size:11px;margin:7px 0 0;white-space:nowrap;color:#aaccff}
.race-table .race-team-points-label input{min-width:0;width:14px;height:14px;margin:0}

/* 5B.5: compact, read-only OCR preview and duplicate highlighting */
.race-table{min-width:860px}
.race-table tbody tr.race-match-duplicate{background:rgba(255,66,79,.22);outline:1px solid rgba(255,66,79,.65)}
.race-match-duplicate .race-match-cue{color:#ff858e}
.race-ocr-summary{font-size:13px;margin:10px 0}
.race-ocr-list{max-height:225px;overflow:auto;border:1px solid #424753;border-radius:8px}
.race-ocr-line{display:grid;grid-template-columns:42px minmax(110px,1.3fr) minmax(75px,.7fr) minmax(75px,.7fr) minmax(130px,1.5fr);align-items:center;gap:8px;padding:6px 10px;font-size:12px;border-bottom:1px solid #343944}
.race-ocr-line:last-child{border-bottom:0}
.race-ocr-driver{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:720px){.race-ocr-line{grid-template-columns:36px 1fr 75px}.race-ocr-line>span:nth-of-type(3),.race-ocr-driver{display:none}}

/* Milestone 5C provisional points */
.race-scoring-panel{margin-top:18px;padding:16px;border:1px solid #4a4d59;border-radius:10px;background:#171920}.race-scoring-panel h3{margin:0}.race-score-table{min-width:600px}.race-score-table th,.race-score-table td{white-space:nowrap}.race-score-table td:first-child{white-space:normal}.race-score-warning{color:#f7c76c}.race-score-warnings{margin-top:12px;color:#f7c76c}.race-score-warnings li{margin:5px 0}.race-scoring-panel .muted{font-size:12px}

/* Milestone 5C.1 — compact, aligned provisional scoring table */
.race-scoring-panel .race-score-table{width:100%;min-width:570px;table-layout:fixed;border-collapse:collapse}
.race-scoring-panel .race-score-table th,.race-scoring-panel .race-score-table td{padding:9px 10px;text-align:right;vertical-align:middle;white-space:nowrap;font-size:12px;font-variant-numeric:tabular-nums}
.race-scoring-panel .race-score-table th:first-child,.race-scoring-panel .race-score-table td:first-child{width:40%;text-align:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.race-scoring-panel .race-score-table th:not(:first-child),.race-scoring-panel .race-score-table td:not(:first-child){width:12%}
.race-scoring-panel .race-score-driver-name{display:inline-block;max-width:calc(100% - 20px);overflow:hidden;text-overflow:ellipsis;vertical-align:middle;white-space:nowrap}
.race-scoring-panel .race-score-warning{display:inline-block;vertical-align:middle;font-size:12px}
.race-scoring-panel .race-score-table tbody tr:hover{background:rgba(255,255,255,.035)}
@media(max-width:680px){.race-scoring-panel .race-score-table{min-width:540px}.race-scoring-panel .race-score-table th,.race-scoring-panel .race-score-table td{padding:7px 6px;font-size:11px}}

/* Milestone 5D: official event archive */
.race-list-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.race-published-detail{margin-top:16px}
.race-published-session{margin:18px 0 24px}
.race-official-table th:not(:nth-child(2)),.race-official-table td:not(:nth-child(2)){text-align:right}
.race-official-table td:nth-child(2){min-width:180px}
.race-official-team{display:block;font-size:11px}
.race-published-detail .race-table-wrap{overflow-x:auto}

/* Milestone 5D.1 — compact official classifications */
.race-result-tabs{display:flex;gap:8px;margin:20px 0 10px;border-bottom:1px solid #484d58;padding-bottom:9px}
.race-result-tab{background:#292e39;color:#e0e4eb;border:1px solid #4a5060;border-radius:7px;padding:9px 16px}
.race-result-tab.active{background:#47617c;border-color:#9cb9dc;color:#fff}
.race-published-detail [hidden]{display:none!important}
.race-official-table{width:100%;min-width:690px;table-layout:auto}
.race-official-table th,.race-official-table td{padding:10px 9px;text-align:right!important;vertical-align:middle;white-space:nowrap;font-size:12px;font-variant-numeric:tabular-nums}
.race-official-table th:nth-child(2),.race-official-table td:nth-child(2){text-align:left!important;width:36%;min-width:190px}
.race-official-table th:first-child,.race-official-table td:first-child{width:58px;min-width:58px}
.race-official-table .race-driver-line{display:flex;gap:7px;align-items:center;white-space:nowrap;min-width:0}
.race-driver-line strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}
.race-number{font-family:Impact,'Arial Narrow',sans-serif;font-style:italic;letter-spacing:.4px;font-size:18px;color:#f2f5fa;flex-shrink:0}
.race-award{font-weight:800;font-size:10px;border-radius:4px;padding:3px 5px;line-height:1.2;flex-shrink:0}
.race-award-pole{background:#1f8c58;color:#fff}
.race-award-fast{background:#783dc4;color:#fff;font-size:14px}
.race-fastest-time{color:#c997ff;font-weight:800}
.race-gain{color:#64d5a1;font-weight:800}.race-loss{color:#f48b8b;font-weight:800}.race-neutral{color:#9ca6b5}
.race-official-table .race-official-team{display:block;color:#9ea8b8;margin-top:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.race-total-points strong{font-size:14px}.race-total-points small{display:block;font-size:10px;color:#e3ba7b}
.race-result-note{font-size:11px;margin-top:12px}
.race-table input[data-race-field=manualAdjust]{width:88px;min-width:75px}

/* Milestone 5D.2 */
.race-official-table .race-car-number{width:64px;min-width:64px;text-align:right!important}
.race-official-table .race-car-number .race-number{font-size:20px}
.roster-csv-import{border:1px solid #495261;border-radius:10px;padding:14px;margin:16px 0 22px}
.roster-csv-import .row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.roster-csv-import input[type=file]{max-width:340px}

/* Milestone 5D.3: consistent official classification columns */
.race-official-table th:nth-child(2),.race-official-table td:nth-child(2){text-align:center!important;width:48px;min-width:48px}
.race-official-table th:nth-child(3),.race-official-table td:nth-child(3){text-align:left!important;width:36%;min-width:190px}
.race-official-table .race-car-number{text-align:center!important;width:48px;min-width:48px}
.race-official-table .race-car-number .race-number{font-size:14px;letter-spacing:0}
.race-award-joker{background:#e98b23;color:#231307;border:1px solid #ffbd64;font-size:13px;font-weight:900}

/* Milestone 5D.4: compact team-points and joker awards */
.race-award-team{background:#1766c2;color:white;border:1px solid #5ca4ff;padding:2px 7px;font-size:10px;white-space:nowrap;border-radius:4px;font-weight:800;letter-spacing:.01em}
.race-award-joker{display:inline-flex;align-items:center;justify-content:center;background:#f59a27;color:#111;border:1px solid #ffc16a;padding:1px 4px;border-radius:4px}
.race-award-joker svg{display:block}
#raceTeamPoints{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 20px}

/* 5D.5: Team Points selectors use vertical rows like Joker. */
#raceTeamPoints{display:block;gap:0;margin:10px 0 20px}
#raceTeamPoints .race-joker{display:flex;width:100%;margin:0;padding:9px 0;flex-wrap:nowrap}

/* 5D.6 - exact black jester silhouette from approved design */
.race-award-joker img{display:block;width:19px;height:19px;object-fit:contain}

/* 5D.8: prominent but non-blocking timing validation beneath qualifying rows */
.race-qualifying-timing-warning:not([hidden]){display:block;margin:12px 0;padding:12px 15px;border:1px solid #e5a246;border-radius:8px;background:rgba(236,158,35,.12);color:inherit;font-size:.86rem}
.race-qualifying-timing-warning ul{margin:7px 0 0;padding-left:21px}
.race-qualifying-timing-warning li+li{margin-top:4px}

/* Milestone 5D.9 team logo system */
.team-entry-identity,.team-details-brand{display:flex;align-items:center;gap:12px;min-width:0}
.s1-team-logo{width:34px;height:34px;flex:none;display:inline-flex;align-items:center;justify-content:center;vertical-align:middle}
.s1-team-logo.is-horizontal{width:50px}
.s1-team-logo img{width:100%;height:100%;object-fit:contain}
.team-details-logo{width:100px;height:75px}.team-details-logo.is-horizontal{width:150px}
.race-driver-line .s1-team-logo{width:27px;height:27px;margin-right:5px}
.race-driver-line .s1-team-logo.is-horizontal{width:44px}
.team-logo-editor{margin:20px 0;padding:20px;border:1px solid var(--border,#465061);border-radius:12px}
.team-logo-editor[hidden]{display:none}
.team-logo-controls{display:flex;gap:16px;flex-wrap:wrap;align-items:end}
.team-logo-controls label{display:flex;flex-direction:column;gap:6px}
.team-logo-canvas-wrap{display:flex;align-items:center;justify-content:center;max-width:100%;margin:18px 0;min-height:185px;background:#121722;border-radius:8px;padding:12px}
#teamLogoCanvas{display:block;max-width:100%;height:auto;touch-action:none;cursor:grab}
#teamLogoCanvas:active{cursor:grabbing}

/* Milestone 5D.10 — editable team profiles */
.team-profile-form{display:grid;gap:14px;margin-top:16px;max-width:780px}
.team-profile-form>label{display:grid;gap:6px}
.team-profile-form input:not([type=checkbox]),.team-profile-form select{width:100%}
.team-profile-lineup{display:flex;flex-direction:column;max-height:360px;overflow-y:auto;border:1px solid var(--border,#3a3f48);border-radius:10px;padding:8px}
.team-profile-driver{display:flex;align-items:center;gap:10px;padding:8px;border-bottom:1px solid #343943}
.team-profile-driver:last-child{border-bottom:0}
.team-profile-driver input{flex-shrink:0}

/* 5D.11: simple roster list with confirmation before removal */
.team-roster-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:12px}
.team-roster-heading h4{margin:0}
.team-roster-list{display:flex;flex-direction:column;border:1px solid #3a3f48;border-radius:10px;overflow:hidden}
.team-roster-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 14px;border-bottom:1px solid #3a3f48}
.team-roster-row:last-child{border-bottom:0}
.team-roster-driver{display:flex;flex-direction:column;gap:4px;min-width:0}
.team-roster-driver strong,.team-roster-driver span{overflow-wrap:anywhere}
.team-remove-driver{flex-shrink:0}
@media(max-width:480px){.team-roster-row{gap:8px;padding:10px}.team-remove-driver{padding:8px}}

/* PSN-first driver identity: existing PSN and DriverName fields only */
.driver-identity{display:inline-flex;flex-direction:column;align-items:flex-start;gap:2px;vertical-align:middle;min-width:0}
.driver-identity strong{font-weight:700}
.driver-identity small,.driver-real-name{display:block;font-size:.76rem;font-weight:400;line-height:1.25}
.race-driver-line .driver-identity{flex:0 1 auto}

/* 5D.13 — driver identity and team logo share a two-column layout */
.race-official-table th:nth-child(2),.race-official-table td:nth-child(2){width:54px;min-width:54px;text-align:center!important}
.race-official-table th:nth-child(3),.race-official-table td:nth-child(3){text-align:left!important;min-width:240px;width:36%}
.race-official-table .race-driver-cell{text-align:left!important}
.race-driver-layout{display:grid;grid-template-columns:54px minmax(0,1fr);align-items:center;gap:9px;min-width:0}
.race-driver-layout:not(:has(.race-team-logo)){grid-template-columns:minmax(0,1fr)}
.race-driver-layout .race-team-logo{grid-column:1;grid-row:1;display:flex;width:54px;height:54px;margin:0;align-items:center;justify-content:center}
.race-driver-layout .race-team-logo.is-horizontal{width:54px;height:54px}
.race-driver-layout .race-team-logo img{width:100%;height:100%;object-fit:contain}
.race-driver-info{grid-column:2;grid-row:1;display:flex;flex-direction:column;justify-content:center;min-width:0;gap:3px}
.race-driver-layout:not(:has(.race-team-logo)) .race-driver-info{grid-column:1}
.race-driver-info .race-driver-line{display:flex;flex-wrap:wrap;align-items:center;gap:5px;min-width:0}
.race-driver-info .driver-identity{display:flex;flex-direction:column;min-width:0}
.race-driver-info .race-official-team{display:block;margin:0;text-align:left;line-height:1.25}
.incident-register-driver{display:flex;align-items:flex-start;gap:8px}
.incident-driver-number{flex:none;font-weight:700}
.incident-register-identity{display:flex;flex-direction:column;min-width:0;gap:2px}
.incident-register-identity .driver-identity{display:flex;flex-direction:column;align-items:flex-start}
.incident-team-subtext{display:block;font-size:.76rem;line-height:1.25}

/* Milestone 5D.14 — equal perceived logo size and dedicated awards alignment */
.race-official-table th:nth-child(3),.race-official-table td:nth-child(3){min-width:340px;width:44%}
.race-driver-layout{grid-template-columns:66px minmax(0,1fr) minmax(94px,auto);gap:10px;align-items:center}
.race-driver-layout:not(:has(.race-team-logo)){grid-template-columns:minmax(0,1fr) minmax(94px,auto)}
.race-driver-layout .race-team-logo{width:39px;height:39px;justify-self:center;align-self:center;grid-column:1}
.race-driver-layout .race-team-logo.is-horizontal{width:65px;height:39px}
.race-driver-info{grid-column:2;min-width:0}
.race-driver-layout:not(:has(.race-team-logo)) .race-driver-info{grid-column:1}
.race-awards-column{grid-column:3;grid-row:1;display:flex;justify-content:center;align-items:center;gap:5px;flex-wrap:wrap;min-width:94px;padding-left:8px}
.race-driver-layout:not(:has(.race-team-logo)) .race-awards-column{grid-column:2}
.race-driver-info .race-driver-line{display:flex;align-items:flex-start}
.race-driver-info .driver-identity{min-width:0}
.race-driver-info .race-official-team{margin:0}

/* 5E Championship standings */
.standings-filters{display:flex;flex-wrap:wrap;gap:14px;margin:16px 0}
.standings-filters label{display:flex;flex-direction:column;gap:5px;min-width:170px;font-size:.86rem}
.standings-table th:nth-child(n+3),.standings-table td:nth-child(n+3){text-align:right;white-space:nowrap}
.standings-identity{display:flex;align-items:center;gap:12px;min-width:200px}
.standings-identity>div:last-child{min-width:0}
.standings-identity small{display:block;margin-top:3px}
.standings-team-logo{width:62px;min-width:62px;height:40px;object-fit:contain}

/* Milestone 5E.1 standings presentation */
.standings-championship-title{font-size:clamp(1.45rem,2.5vw,2.1rem);font-weight:800;line-height:1.2;margin:18px 0 22px}
.standings-table th,.standings-table td{vertical-align:middle}
.standings-table th:nth-child(n+3),.standings-table td:nth-child(n+3){text-align:center}
.standings-table th:last-child,.standings-table td:last-child{text-align:right;font-weight:700}
.standings-table .standings-identity{min-width:240px}
.standings-table .standings-team-logo{width:72px;min-width:72px;height:44px;object-fit:contain}
.standings-joker{display:inline-flex;align-items:center;gap:3px;justify-content:center;white-space:nowrap}
.standings-joker img{object-fit:contain;vertical-align:middle}

.standings-joker-heading{width:24px;height:24px;object-fit:contain;vertical-align:middle;display:inline-block}

/* 5E.3: points remain the visual focus; supporting stats and gaps are quieter */
.standings-table tbody td:nth-child(n+3){font-size:.86rem;font-weight:400}
.standings-table tbody td.standings-points{font-size:1rem;font-weight:700;text-align:right}
.standings-table tbody td.standings-points strong{font-size:inherit;font-weight:750}
.standings-table th:last-child,.standings-table td:last-child{font-weight:400}
.standings-table tbody td:last-child:not(.standings-points){text-align:center}

/* 5E.4: race classification columns: position | team logo | number | driver */
.race-official-table th:nth-child(2),.race-official-table td:nth-child(2){width:78px;min-width:78px;text-align:left!important}
.race-official-table th:nth-child(3),.race-official-table td:nth-child(3){width:50px;min-width:50px;text-align:center!important}
.race-official-table th:nth-child(4),.race-official-table td:nth-child(4){width:44%;min-width:270px;text-align:left!important}
.race-official-table .race-logo-cell{padding-left:8px;padding-right:0}
.race-official-table .race-logo-cell .race-team-logo{display:flex;width:39px;height:39px;align-items:center;justify-content:flex-start;margin:0}
.race-official-table .race-logo-cell .race-team-logo.is-horizontal{width:65px;height:39px}
.race-official-table .race-logo-cell .race-team-logo img{display:block;width:100%;height:100%;object-fit:contain}
.race-official-table .race-car-number{text-align:center!important;width:50px;min-width:50px}
.race-driver-layout,.race-driver-layout:not(:has(.race-team-logo)){display:grid;grid-template-columns:minmax(0,1fr) minmax(94px,auto);gap:10px}
.race-driver-layout .race-driver-info,.race-driver-layout:not(:has(.race-team-logo)) .race-driver-info{grid-column:1}
.race-driver-layout .race-awards-column,.race-driver-layout:not(:has(.race-team-logo)) .race-awards-column{grid-column:2}
/* Driver standings mirror the published race ordering and dimensions. */
.standings-table .standings-team-cell{width:78px;min-width:78px;text-align:left!important;padding-left:8px}
.standings-table .standings-team-logo{display:flex;width:39px;height:39px;align-items:center;justify-content:flex-start;margin:0}
.standings-table .standings-team-logo.is-horizontal{width:65px;height:39px}
.standings-table .standings-team-logo img{display:block;width:100%;height:100%;object-fit:contain}
.standings-table .standings-number-cell{width:50px;min-width:50px;text-align:center!important}
.standings-table .standings-number-cell .race-number{font-size:14px;letter-spacing:0}
.standings-table .standings-driver-cell{text-align:left!important;min-width:185px}
.standings-table .standings-team-identity{display:flex;align-items:center;justify-content:flex-start;gap:12px;min-width:205px;text-align:left}
.standings-table .standings-team-identity strong{text-align:left}
.standings-table:has(.standings-team-identity) .standings-team-cell{width:auto;min-width:250px;text-align:left!important}

/* 5E.5: tightly packed standings, no horizontal scroll, logo and number in one identity cell */
.standings-table-container{width:100%;overflow-x:visible}
.standings-table{width:100%;table-layout:fixed;border-collapse:collapse;min-width:0}
.standings-table th,.standings-table td{padding:9px 4px;min-width:0!important;width:auto!important;white-space:nowrap;text-align:center;font-size:clamp(10px,.85vw,12px)}
.standings-table th.standings-position,.standings-table td.standings-position{width:5%!important}
.standings-table th.standings-name-heading,.standings-table td.standings-name-cell{text-align:left!important}
.standings-drivers th.standings-name-heading,.standings-drivers td.standings-name-cell{width:37%!important}
.standings-teams th.standings-name-heading,.standings-teams td.standings-name-cell{width:64%!important}
.standings-table .standings-points{font-size:clamp(12px,1.05vw,15px)!important;font-weight:750;text-align:right!important}
.standings-name-layout{display:flex;align-items:center;justify-content:flex-start;gap:7px;min-width:0;width:100%;text-align:left}
.standings-logo-slot{width:65px;min-width:65px;height:39px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.standings-logo-slot .standings-team-logo{width:39px;height:39px;display:flex;align-items:center;justify-content:center;margin:0}
.standings-logo-slot .standings-team-logo.is-horizontal{width:65px;height:39px}
.standings-logo-slot .standings-team-logo img{width:100%;height:100%;object-fit:contain}
.standings-number-slot{width:32px;min-width:32px;text-align:center;flex-shrink:0}
.standings-number-slot .race-number{font-size:15px}
.standings-name-text{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;min-width:0;overflow:hidden;text-align:left}
.standings-name-text strong,.standings-name-text small{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}
.standings-name-text strong{font-size:clamp(11px,.95vw,14px)}
.standings-name-text small{font-size:clamp(9px,.75vw,11px);margin-top:2px}
.standings-table tbody td:last-child:not(.standings-points){text-align:center}
/* Published results: fixed left edge for logo column, centered square within horizontal slot */
.race-official-table .race-logo-cell{padding-left:8px!important;padding-right:0!important}
.race-official-table .race-logo-cell .race-team-logo{width:65px!important;height:39px!important;display:flex;align-items:center;justify-content:center;margin:0}
.race-official-table .race-logo-cell .race-team-logo img{width:39px;height:39px;object-fit:contain}
.race-official-table .race-logo-cell .race-team-logo.is-horizontal img{width:65px;height:39px;object-fit:contain}
@media(max-width:900px){
 .standings-table th,.standings-table td{padding:8px 2px;font-size:10px}
 .standings-drivers th.standings-name-heading,.standings-drivers td.standings-name-cell{width:40%!important}
 .standings-logo-slot{width:48px;min-width:48px;height:30px}
 .standings-logo-slot .standings-team-logo{width:30px;height:30px}
 .standings-logo-slot .standings-team-logo.is-horizontal{width:48px;height:30px}
 .standings-number-slot{width:23px;min-width:23px}
 .standings-number-slot .race-number{font-size:12px}
 .standings-name-layout{gap:4px}
}
@media(max-width:580px){
 .standings-logo-slot{width:35px;min-width:35px;height:23px}
 .standings-logo-slot .standings-team-logo{width:23px;height:23px}
 .standings-logo-slot .standings-team-logo.is-horizontal{width:35px;height:23px}
 .standings-number-slot{width:17px;min-width:17px}
 .standings-number-slot .race-number{font-size:10px}
 .standings-name-layout{gap:2px}
 .standings-table th,.standings-table td{font-size:9px;padding:7px 1px}
}

/* 5E.6 — restore subtle horizontal row separators in both standings tables.
   Standings no longer use .race-table, so its border rules do not apply. */
.standings-table thead th{border-bottom:1px solid #444957}
.standings-table tbody td{border-bottom:1px solid #343842}
.standings-table tbody tr:last-child td{border-bottom:0}

/* 5G.16 — historical careers: read-only archive */
.hist-banner{border:1px solid #735f43;background:#30281f;color:#f1d2a5;padding:12px 14px;border-radius:9px;font-size:13px;margin:18px 0}
.hist-modes{display:flex;gap:9px;margin:16px 0}.hist-modes button{min-width:130px;background:#343741}.hist-modes button.active{background:#d82736}
.hist-layout{display:grid;grid-template-columns:minmax(210px,255px) minmax(0,1fr);gap:18px;align-items:start}
.hist-directory,.hist-details{border:1px solid #3d424d;border-radius:12px;background:#171920;padding:14px;min-width:0}
.hist-directory{max-height:80vh;overflow:auto;position:sticky;top:15px}.hist-directory input{margin-top:5px}.hist-person{background:transparent;color:#f2f2f3;border-radius:7px;border-bottom:1px solid #333740;width:100%;padding:11px 8px;display:flex;align-items:center;justify-content:space-between;text-align:left;gap:8px;font-weight:normal}.hist-person:hover,.hist-person.active{background:#39313a}.hist-person b{font-size:13px}.hist-person small{color:#a8aab3;font-size:11px;margin-top:4px;line-height:1.35}.hist-person-main{display:block;min-width:0;overflow-wrap:anywhere}.hist-person-main small{display:block}.hist-more{width:100%;margin-top:12px}
.hist-filters{display:flex;gap:12px;flex-wrap:wrap;border-bottom:1px solid #343941;padding-bottom:14px}.hist-filters label{flex:1;min-width:160px;margin:0}.hist-filters select{margin-top:5px}
.hist-profile-head{display:flex;align-items:start;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:20px 0}.hist-profile-head h2{font-size:25px;margin:5px 0;overflow-wrap:anywhere}.hist-profile-head p{margin:4px 0}.hist-eyebrow{text-transform:uppercase;letter-spacing:1px;color:#ee9299;font-size:11px;font-weight:700}.hist-profile-tags{display:flex;gap:7px;flex-wrap:wrap}
.hist-details h3{margin:26px 0 12px;font-size:17px;border-bottom:1px solid #333842;padding-bottom:8px}.hist-details h3 small{font-weight:normal;color:#aaa}
.hist-stat-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}.hist-stat{background:#262933;border:1px solid #404451;border-radius:10px;padding:13px 8px;text-align:center}.hist-stat strong{display:block;font-size:23px;color:#fff}.hist-stat span{font-size:11px;color:#b5b6c2}.hist-data-note{font-size:12px;line-height:1.5}.hist-divisions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.hist-breakdown{background:#252830;border:1px solid #3b404b;border-radius:8px;padding:10px;display:grid;grid-template-columns:1fr 1fr;gap:4px 8px;font-size:12px}.hist-breakdown b{color:#ffabb2;font-size:14px}.hist-breakdown span{color:#c4c6cb}
.hist-season-entry{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid #3b3f49;padding:12px 0}.hist-season-entry>div{flex:1;min-width:0}.hist-season-entry .muted{display:block;font-size:12px;margin-top:5px}.hist-inline-link{padding:0;background:none;color:#ff9da6;font-size:inherit;text-align:left;text-decoration:underline;text-decoration-style:dotted;border-radius:0}.hist-inline-link:hover{color:#ffcad0}
.hist-table-wrap{max-width:100%;overflow:auto;border:1px solid #41434e;border-radius:8px}.hist-table{border-collapse:collapse;font-size:12px;min-width:610px;width:100%;white-space:nowrap}.hist-table th,.hist-table td{padding:10px 9px;text-align:left;border-bottom:1px solid #373b46}.hist-table th{position:sticky;top:0;background:#292d35;color:#fff}.hist-table tbody tr:hover{background:#252b35}.hist-table small{display:block;color:#a6abb8;font-size:10px;margin-top:3px}.hist-roster{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.hist-roster-driver{background:#2e323c;text-align:left;overflow-wrap:anywhere}.hist-roster-driver small{display:block;color:#c0c4cd;font-weight:normal}.hist-empty{text-align:center;padding:65px 15px}
@media(max-width:800px){.hist-layout{grid-template-columns:1fr}.hist-directory{position:static;max-height:360px}.hist-stat-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.hist-roster{grid-template-columns:1fr}}
@media(max-width:510px){.hist-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.hist-divisions{grid-template-columns:1fr}.hist-season-entry{flex-direction:column;gap:7px}.hist-directory,.hist-details{padding:10px}}

.hist-filters[hidden]{display:none!important}.hist-summary-totals{display:flex;flex-wrap:wrap;gap:9px;margin:13px 0}.hist-summary-totals span{flex:1;min-width:90px;background:#262933;border:1px solid #424551;padding:10px;border-radius:8px;font-size:11px;color:#bcc0c9}.hist-summary-totals strong{display:block;color:#fff;font-size:18px}

/* 5G.17: full historical classifications and unified team leaderboards */
.hist-event-overlay[hidden]{display:none!important}
.hist-event-overlay{position:fixed;inset:0;z-index:300;background:rgba(7,9,14,.86);display:flex;align-items:center;justify-content:center;padding:20px}
.hist-event-dialog{width:min(1150px,100%);max-height:94vh;overflow:auto;background:#181b23;border:1px solid #515664;border-radius:13px;box-shadow:0 18px 65px #000a}
.hist-event-dialog-body{padding:22px}
.hist-event-top{display:flex;align-items:start;justify-content:space-between;gap:18px;margin-bottom:15px}
.hist-event-top h2{font-size:24px;margin:8px 0}
.hist-event-focus{background:#3c2d2c;color:#ffd6c9;border:1px solid #ad5b49;border-radius:9px;padding:12px 15px;margin-bottom:16px;font-weight:600}
.hist-highlight-row{background:#54343a!important}
.hist-view-result{white-space:nowrap;font-size:12px;padding:7px 10px}
.hist-result-warning{display:inline-grid;place-items:center;background:#da8a32;color:#15100b;border-radius:50%;font-weight:900;font-size:10px;width:15px;height:15px;margin-left:6px}
.hist-dialog-open{overflow:hidden}
.hist-description{white-space:pre-wrap;line-height:1.65;color:#ddd;background:#222630;border:1px solid #414858;border-radius:10px;padding:13px 15px}
.hist-career-season{margin:12px 0;border:1px solid #434752;border-radius:10px;padding:10px 14px;background:#20232c}
.hist-career-season-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;border-bottom:1px solid #454852;padding:8px 0 12px}
.hist-career-season .hist-season-entry:last-of-type{border-bottom:0}
.hist-season-champ{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 8px;background:#282d37;border-radius:7px;margin:8px 0;font-size:12px}
.hist-season-champ strong{color:#fff}
.hist-season-champ span{color:#c8ceda;text-align:right}
.hist-team-tabs{display:flex;gap:8px;margin:16px 0 20px;flex-wrap:wrap}
.hist-team-tabs button.active{background:#d82736;color:white}
.hist-team-metric-controls{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0 14px}
.hist-team-metric-controls label{flex:1;min-width:140px;font-size:12px;margin:0}
.hist-team-metric-controls select{width:100%;margin-top:6px}
.hist-team-stats .hist-stat-grid{grid-template-columns:repeat(3,minmax(0,1fr));margin:12px 0 22px}
.hist-leaderboard td:nth-child(3){font-variant-numeric:tabular-nums;font-size:15px}
.hist-admin-editor{border:1px solid #695f51;border-radius:10px;background:#2a2828;padding:13px 15px;margin:14px 0}
.hist-admin-editor summary{cursor:pointer;font-weight:700;color:#ffd1ad}
.hist-admin-editor form{display:grid;gap:10px;border-top:1px solid #534f4a;padding:15px 0 0;margin-top:15px}
.hist-admin-editor form label{display:block;font-size:13px}
.hist-admin-editor input,.hist-admin-editor textarea,.hist-admin-editor select{display:block;width:100%;margin-top:6px}
.hist-admin-editor form button{justify-self:start}
.hist-admin-editor .hist-merge-list{display:grid;gap:7px;margin:10px 0}
.hist-merge-list>div{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#363536;border-radius:7px;padding:7px 10px;font-size:13px}
.hist-merge-list button{font-size:12px;padding:6px 10px}
.hist-managed-team-stats{padding-top:10px}
@media(max-width:740px){.hist-event-overlay{padding:8px}.hist-event-dialog-body{padding:12px}.hist-event-top{flex-wrap:wrap}.hist-season-champ{flex-direction:column;align-items:flex-start}.hist-season-champ span{text-align:left}}

.hist-managed-team-bio{margin:0 0 14px}
.hist-managed-team-bio .hist-description{margin:10px 0}

.hist-timeline-races{margin:8px 0 4px;border-top:1px solid #424752;padding-top:12px}
.hist-timeline-races summary{cursor:pointer;color:#ffabb2;font-size:13px;font-weight:600}
.hist-timeline-race-list{margin-top:10px;max-height:380px;overflow:auto}
.hist-timeline-race-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 4px;border-bottom:1px solid #454954;font-size:12px}
.hist-timeline-race-row small{display:block;color:#aeb4bf;margin-top:4px}

/* 5G.18: compact career timeline, source-backed awards and searchable race archive */
.hist-career-compact{display:grid;grid-template-columns:minmax(95px,135px) minmax(0,1fr);gap:12px;align-items:start;padding:11px 13px;border:1px solid #3f4450;border-radius:9px;background:#21252e;margin:8px 0}
.hist-career-compact-season{display:grid;gap:4px}.hist-career-compact-season strong{color:#f4f4f6;font-size:14px}.hist-career-compact-season small{font-size:11px;color:#a8b0bc}
.hist-career-compact-teams{display:flex;flex-wrap:wrap;align-items:start;gap:7px 12px}
.hist-compact-affiliation{min-width:155px;display:flex;flex-direction:column;gap:2px;padding-right:10px}
.hist-compact-affiliation small{display:block;color:#b4bac6;font-size:11px;line-height:1.5}
.hist-former-team{display:block;color:#b3bac6;font-size:11px;margin-top:3px;font-style:italic}
.hist-official-drilldowns{margin:14px 0}
.hist-season-details{background:#222731;border:1px solid #424b58;border-radius:9px;margin:8px 0;padding:0 12px}
.hist-season-details>summary{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;cursor:pointer;padding:12px 4px;color:#f4d8dc;font-size:13px}
.hist-season-details>summary span{flex:1;color:#d6dae3}.hist-season-details>summary small{color:#aab4c3;font-size:11px}
.hist-season-details .hist-timeline-race-list{border-top:1px solid #454b59;margin:0 0 6px;max-height:420px}
.hist-race-awards{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}.hist-race-awards .race-award{display:inline-flex;align-items:center;justify-content:center;border-radius:5px;min-width:25px;padding:4px 5px;font-weight:800;font-size:11px}
.hist-race-awards .race-award-fast{font-size:16px}
.hist-correction-label{background:#39352a;color:#ffe5ab;border:1px solid #b28845;padding:10px 12px;border-radius:8px;font-size:12px;margin:0 0 12px}
.hist-merge-choices{border:1px solid #595b5f;border-radius:8px;padding:10px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;max-height:280px;overflow:auto}
.hist-merge-choices legend{font-size:12px;color:#e3dce0;padding:0 5px}
.hist-admin-editor .hist-merge-choice{display:flex;align-items:flex-start;gap:9px;background:#34343b;border-radius:6px;padding:9px;font-weight:normal}
.hist-admin-editor .hist-merge-choice[hidden]{display:none!important}
.hist-admin-editor .hist-merge-choice input[type=checkbox]{width:16px;height:16px;flex:none;display:inline;margin:0;accent-color:#d82736}
.hist-merge-choice span{line-height:1.35;overflow-wrap:anywhere}.hist-merge-choice small{display:block;color:#bbc0ce;margin-top:4px}
.race-archive-filters{display:flex;flex-wrap:wrap;align-items:end;gap:12px;padding:15px;margin:14px 0 8px;background:#242833;border:1px solid #465064;border-radius:12px}
.race-archive-filters label{font-size:12px;display:flex;flex-direction:column;gap:5px;flex:1;min-width:118px;margin:0}
.race-archive-filters select,.race-archive-filters input{width:100%;min-width:0}
.race-archive-filters .race-archive-driver-search{flex:1.8;min-width:185px}
.race-archive-filters button{margin:0;white-space:nowrap}
.race-archive-filters [hidden]{display:none!important}
.hist-archive-section-heading{display:flex;justify-content:space-between;gap:15px;align-items:center;margin:22px 0 9px}
.hist-archive-section-heading h3{margin:0}.hist-archive-event-list{display:grid;gap:7px}
.hist-archive-event{display:flex;gap:10px;align-items:center;justify-content:space-between;padding:13px 15px;background:#262a35;border:1px solid #454b59;border-radius:9px}
.hist-archive-event>div{min-width:0}.hist-archive-event strong{display:block;font-size:14px}.hist-archive-event small{display:block;color:#aeb7c7;margin-top:5px;font-size:12px}
.hist-archive-hit{color:#e9b8bd!important}.hist-archive-placeholder{padding:14px 0}.hist-archive-more{margin:12px 0 18px}
.race-archive-live-heading{margin:20px 0 9px;border-top:1px solid #484c58;padding-top:17px}
@media(max-width:650px){.hist-career-compact{grid-template-columns:1fr;gap:6px}.hist-merge-choices{grid-template-columns:1fr}.hist-archive-event{align-items:flex-start;flex-direction:column}.hist-archive-event button{align-self:flex-start}.race-archive-filters label{min-width:125px}}

/* 5G.19 — expanded metrics and historical career leaderboards */
.hist-stat-grid-expanded{display:grid;grid-template-columns:repeat(auto-fit,minmax(115px,1fr));gap:10px;margin:12px 0 18px}
.hist-stat-grid-expanded .hist-stat{min-width:0;padding:12px 10px}
.hist-stat-grid-expanded .hist-stat strong{font-size:clamp(1.05rem,2vw,1.3rem);font-variant-numeric:tabular-nums}
.hist-stat-grid-expanded .hist-stat span{line-height:1.25;overflow-wrap:anywhere}
.hist-record-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;margin:18px 0}
.hist-record-filters label{display:flex;flex-direction:column;gap:6px;font-size:.88rem}
.hist-record-filters :is(select,input){width:100%;min-width:0}
#allTime .hist-table-wrap{max-width:100%;overflow-x:auto}
#allTime .hist-table th,#allTime .hist-table td{white-space:nowrap}
@media(max-width:600px){.hist-stat-grid-expanded{grid-template-columns:repeat(2,minmax(0,1fr))}.hist-record-filters{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* 5G.21 — single source of titles, progressive stats and compact career overview */
.hist-title-summary{display:flex;flex-wrap:wrap;gap:8px 18px;align-items:center;margin:7px 0 2px!important;color:#c9ced9;font-size:12px}
.hist-title-summary span{display:inline-flex;gap:5px;align-items:baseline}.hist-title-summary strong{color:#f0d5d9}
.hist-stat-grid-main{margin:12px 0 8px}
.hist-extended-stats{margin:10px 0 12px;border:1px solid #434a58;background:#202530;border-radius:9px;padding:0 12px}
.hist-extended-stats>summary{padding:12px 4px;cursor:pointer;color:#ffabb2;font-size:13px;font-weight:700}
.hist-expand-hint{margin-left:12px;color:#afb8c8;font-size:11px;font-weight:400}
.hist-stat-grid-extended{grid-template-columns:repeat(3,minmax(0,1fr));margin:0 0 13px}
.hist-stat-grid-extended .hist-stat{padding:10px 7px}
.hist-stat-grid-extended .hist-stat strong{font-size:19px}
.hist-career-list{display:grid;gap:4px;margin:10px 0 16px}
.hist-career-list .hist-career-compact{padding:7px 10px;gap:8px;margin:0;border-radius:6px;grid-template-columns:minmax(82px,102px) minmax(0,1fr)}
.hist-career-list .hist-career-compact-season{gap:1px}
.hist-career-list .hist-career-compact-season strong{font-size:12px}
.hist-career-list .hist-career-compact-season small{font-size:10px}
.hist-career-list .hist-compact-affiliation{min-width:130px;gap:1px}
.hist-career-list .hist-compact-affiliation small{font-size:10px;line-height:1.35}
.hist-career-list .hist-former-team{display:inline;margin-left:4px}
.hist-show-all-results{margin:12px 0 2px;font-size:12px}
@media(max-width:700px){.hist-stat-grid-extended{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:510px){.hist-career-list .hist-career-compact{grid-template-columns:1fr}.hist-expand-hint{display:block;margin-left:0;margin-top:4px}}

/* Additional historical season overview in the managed (live) team profile */
.hist-managed-team-overview{margin-top:24px;padding-top:15px;border-top:1px solid #434955}
.hist-managed-team-overview h3{font-size:17px;margin:20px 0 10px}
.hist-managed-team-overview .hist-stat-grid-main{grid-template-columns:repeat(5,minmax(0,1fr))}
@media(max-width:800px){.hist-managed-team-overview .hist-stat-grid-main{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:510px){.hist-managed-team-overview .hist-stat-grid-main{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* 5G.22 — managed historical roster and logo-equipped history profiles */
.historical-roster-sync{border:1px solid #464b56;border-radius:10px;background:#252b35;padding:14px 16px;margin:15px 0}
.historical-roster-sync h3{margin:0 0 6px;font-size:16px}
.historical-roster-sync p{margin:5px 0;font-size:13px;line-height:1.5}
.historical-roster-sync .row{align-items:center;gap:16px}
.historical-roster-sync #syncHistoricalRoster{white-space:nowrap}
#rosterList .item .actions{display:flex;gap:6px;flex-wrap:wrap}
#rosterList .item .actions button{font-size:12px;padding:7px 10px}
.hist-header-logo{width:52px;height:44px;margin-right:12px;vertical-align:middle}
.hist-header-logo.is-horizontal{width:78px}
@media(max-width:650px){.historical-roster-sync .row{flex-direction:column;align-items:flex-start}.historical-roster-sync #syncHistoricalRoster{white-space:normal}}

/* 5G.23 — Grouped main navigation and contrasting team status controls */
.portal-main-nav {display:flex;gap:8px;margin:0 0 8px;flex-wrap:wrap;border-bottom:1px solid #464956;padding:0 0 10px;}
.portal-main-nav .main-nav-tab {flex:1 1 135px;max-width:250px;background:#292e39;border:1px solid #474c59;color:#d9dce3;padding:13px 16px;border-radius:9px;font-size:1rem;}
.portal-main-nav .main-nav-tab.active {background:#a91d2b;border-color:#f34b5b;color:#fff;}
.portal-main-nav .main-nav-tab:hover:not(.active){background:#3d4352;}
.portal-sub-nav{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin:0 0 20px;}
.portal-sub-nav .tab {padding:9px 13px;font-size:0.85rem;white-space:nowrap;border:1px solid #424652;}
.portal-sub-nav .tab.active{background:#d82736;border-color:#eb5868;}
.portal-sub-nav .tab[hidden],.portal-main-nav button[hidden],.nav-lock[hidden]{display:none!important;}
.portal-sub-nav .nav-lock{font-size:0.72rem;vertical-align:baseline;opacity:.8;}
.team-entry button.team-status-action.is-archive{background:#7d2937;border:1px solid #d96a76;color:#fff;}
.team-entry button.team-status-action.is-archive:hover{background:#ab384a;}
.team-entry button.team-status-action.is-activate{background:#166348;border:1px solid #43bc8c;color:#e6fff4;}
.team-entry button.team-status-action.is-activate:hover{background:#207f5c;}
@media (max-width:600px){.portal-main-nav .main-nav-tab{flex:1;min-width:0;padding:12px 8px}.portal-sub-nav .tab{flex:1 1 auto;text-align:center;white-space:normal}}

/* 5G.24 – season planning */
.season-stepbar{display:flex;gap:8px;flex-wrap:wrap;margin:18px 0}.season-stepbar button{background:#343741}.season-stepbar button.active{background:#b52b3a}.season-suggestions{display:flex;gap:7px;flex-wrap:wrap;margin:9px 0 15px}.season-suggestions button{font-size:12px;background:#343741}.season-driver-columns{display:grid;grid-template-columns:repeat(4,minmax(175px,1fr));gap:12px;margin:16px 0}.season-driver-col{background:#151820;border:1px solid #4b4e59;border-radius:9px;padding:9px;min-height:140px}.season-driver-col h4{margin:5px 5px 12px}.season-driver-card{background:#252934;border:1px solid #575a66;border-radius:7px;margin:8px 0;padding:9px;cursor:grab}.season-driver-card.dragging{opacity:.5}.season-driver-card.needs-confirm,.season-team-row.needs-confirm{border-color:#dbaa44;background:#392d19}.season-driver-card small{color:#bec1d0;display:block}.season-driver-card .actions button,.season-team-row button{padding:5px 8px;font-size:12px}.season-driver-card details{margin-top:7px}.season-driver-card details select{margin-top:4px;width:100%}.season-team-row{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid #404450;border-radius:8px;padding:10px;margin:6px 0}.season-team-row .actions{margin:0}.season-review-table{width:100%;border-collapse:collapse}.season-review-table td,.season-review-table th{border-bottom:1px solid #424651;padding:9px;text-align:left}.season-new-driver{padding:12px;border:1px solid #454956;border-radius:8px;margin:16px 0}.season-new-driver h4{margin-top:0}.season-start .grid{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}@media(max-width:1000px){.season-driver-columns{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:550px){.season-driver-columns{grid-template-columns:1fr}}

/* Website 6.0: legacy portal return link; all other styles are unchanged. */
.website-return{position:relative;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 18px;background:#30080c;color:#eee;font:700 12px Arial,sans-serif;letter-spacing:.05em}.website-return a{color:#fff;text-decoration:none}.website-return a:hover{text-decoration:underline}


/* ============================================================
   S1 WEBSITE 6.0.6 — visual theme for existing championship portal
   CSS-only; no form, Firestore, stewarding, or scoring code changed.
   ============================================================ */
:root{
 --s1-red:#d41419;--s1-crimson:#a50913;--s1-burgundy:#480609;
 --s1-surface:#20090c;--s1-surface-raised:#2b0c10;--s1-border:#65303a;
 --s1-text:#fff4f3;--s1-muted:#d2b2b4;
 --s1-display:"industry-inc-base","industry-inc",Impact,"Arial Narrow",sans-serif;
 --s1-body:"alternate-gothic-no-3-d","alternate-gothic-no3-d",Arial,sans-serif;
 --s1-numbers:"azo-sans-uber","azo-sans-web",Impact,sans-serif;
 color:var(--s1-text);background:#170508;
 font-family:var(--s1-body);
}
body{background:linear-gradient(150deg,#350407 0%,#220508 32%,#160507 100%) fixed;
 color:var(--s1-text);font-family:var(--s1-body);font-size:17px;line-height:1.45}
header{background:linear-gradient(110deg,#170609,#340609);border-bottom:2px solid #bc1822;
 padding:19px 5%;gap:18px}
header h1{font-family:var(--s1-display);font-size:clamp(26px,3vw,38px);
 font-weight:700;letter-spacing:.035em;text-transform:uppercase}
header h1 span{color:#ff4850}
header small,.muted{color:var(--s1-muted)}
.website-return{background:#130407;border-bottom:1px solid #6d222b;
 color:#f2d2d2;font-family:var(--s1-body);font-size:14px}
.website-return a{color:#fff}.website-return a:hover{color:#ff636b}
main{max-width:1330px;margin:24px auto;padding:0 clamp(15px,3vw,36px)}
.panel{background:linear-gradient(145deg,#260d11,#1c0a0e);
 border:1px solid var(--s1-border);border-radius:7px;padding:clamp(15px,2vw,25px);
 box-shadow:0 12px 35px #0002}
.panel h2,.panel h3{font-family:var(--s1-display);font-weight:700;
 letter-spacing:.03em;text-transform:uppercase}
.panel h2{font-size:clamp(24px,2.4vw,34px)}
.panel h3{font-size:clamp(19px,2vw,25px)}
button,.tab{background:#a8121b;color:#fff;border:1px solid #e4343c;
 border-radius:4px;font-family:var(--s1-body);font-weight:700;
 letter-spacing:.025em;transition:background .15s ease,border-color .15s ease}
button:hover:not(:disabled){background:#cd1a27}
button.secondary,.tab,.inbox-tab,.roster-tab{background:#35171c;border-color:#68323b}
button.secondary:hover:not(:disabled),.tab:hover:not(.active){background:#58212a}
.tab.active,.portal-sub-nav .tab.active,.inbox-tab.active,.roster-tab.active{
 background:#bc111f;border-color:#ef3e47;color:#fff}
.portal-main-nav{border-bottom:1px solid #6e333a}
.portal-main-nav .main-nav-tab{background:#2e1015;border-color:#71303a;
 color:#f0d9da;text-transform:uppercase;font-family:var(--s1-display);
 font-size:clamp(16px,1.6vw,21px);letter-spacing:.045em;border-radius:4px}
.portal-main-nav .main-nav-tab.active{background:#bc111f;border-color:#ff5961}
.portal-main-nav .main-nav-tab:hover:not(.active){background:#51202a}
.portal-sub-nav .tab{border-color:#64313a;text-transform:uppercase;letter-spacing:.04em}
input,select,textarea{background:#16080b;color:#fff;border:1px solid #714049;
 border-radius:4px;font-family:var(--s1-body);font-size:16px}
input:focus,select:focus,textarea:focus{outline:2px solid #e33240;outline-offset:1px;border-color:#e33240}
label{color:#edcccc;font-size:14px}
a{color:#ff9a9c}.item,.team-entry,.copy-tool,.race-ocr-panel{
 border-color:#66323b;background-color:#250d12}
.team-chip,.badge{background:#4a1c25;color:#ffe9e9}
/* Keep real status indicators (finalised, warnings, archives) semantically distinct. */
.badge.status-finalised{background:#194d35;color:#9ff0be}
.badge.status-appealed{background:#704016;color:#ffcf8a}
.badge.status-amended{background:#51366b;color:#e0c5ff}
.badge.status-overturned{background:#6c2630;color:#ffc0c6}
/* Tables adopt the website's dense motorsport classification look. */
table{border-color:#6a333b}
th{background:#320d14;color:#ffe8e8;letter-spacing:.035em}
td{border-color:#4f2930}
tr:hover td{background-color:#ffffff07}
/* Numerical classification cells inherit the separate number font only where
   the app explicitly supplies a numeric class, preserving editable data. */
.race-rank,.leader-pos,.hist-stat-value,.hist-rank,.standings-rank{
 font-family:var(--s1-numbers)}
@media(max-width:720px){header{padding:15px 4%}main{padding:0 12px}}


/* =============================================================
   Milestone 6.0.7 — shared website/portal navigation + square UI
   Appearance-only outside navigation: IDs, permissions, data preserved.
   ============================================================= */
:root{--s1-shared-edge:0px;}
body :is(.panel,.item,.team-entry,.badge,.team-chip,.copy-tool,.race-ocr-panel,
 .hist-card,.hist-stat,.hist-stat-grid,.hist-banner,.hist-directory,.hist-details,
 .hist-career-compact,.hist-career-list,.hist-extended-stats,
 .season-driver-col,.season-driver-card,.season-team-row,.season-new-driver,
 .historical-roster-sync,.portal-main-nav,.portal-sub-nav,.portal-sub-nav .tab,
 .portal-main-nav .main-nav-tab,.inbox-tab,.roster-tab,.race-archive-filters,
 .hist-record-filters,.row button,button,input:not([type=checkbox]):not([type=radio]),
 select,textarea,details,.website-return){border-radius:0!important;}
.s1-portal-bar{position:relative;z-index:105;background:#160609;border-bottom:2px solid #ad1018;color:#fff;font-family:var(--s1-body);}
.s1-portal-toprow{min-height:70px;display:flex;align-items:center;justify-content:space-between;gap:22px;padding:10px clamp(18px,5vw,80px)}
.s1-portal-brand{display:inline-flex;align-items:center;flex:none}.s1-portal-brand img{display:block;width:92px;height:auto;max-height:44px;object-fit:contain}
.s1-portal-primary{display:flex;align-items:center;gap:clamp(15px,2vw,36px);margin-left:auto;}
.s1-portal-primary a,.s1-portal-primary button{display:inline-block;appearance:none;min-width:0;background:transparent!important;border:0!important;padding:8px 0;color:#fff;font:700 17px var(--s1-body);letter-spacing:.025em;text-transform:uppercase;text-decoration:none;box-shadow:none;cursor:pointer}
.s1-portal-primary a:hover,.s1-portal-primary button:hover{color:#ff858a}
.s1-portal-primary .active{text-decoration:underline;text-decoration-color:#ef3038;text-decoration-thickness:3px;text-underline-offset:7px}
.s1-portal-primary [hidden]{display:none!important}
.s1-portal-subnav-mount{padding:0 clamp(18px,5vw,80px) 9px;min-height:37px}
.s1-portal-subnav-mount .portal-sub-nav{margin:0;gap:16px;border:0;background:none}
.s1-portal-subnav-mount .portal-sub-nav .tab{background:transparent!important;border:0!important;border-bottom:2px solid transparent!important;padding:4px 2px 7px;color:#e8cfd0;font:700 14px var(--s1-body);box-shadow:none}
.s1-portal-subnav-mount .portal-sub-nav .tab.active{color:#fff!important;border-bottom-color:#ed2831!important;text-decoration:none}
.s1-portal-subnav-mount .portal-sub-nav .tab:hover{color:#fff}
.portal-main-nav{display:none!important} .portal-legacy-header{padding:13px clamp(18px,5vw,80px)!important;background:#250a0d!important;border:0!important;border-bottom:1px solid #652d33!important;}
.portal-legacy-header>div:first-child{display:none} .portal-legacy-header #auth{margin-left:auto}
.s1-portal-hamburger{width:46px;height:44px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;background:#170508!important;border:1px solid #ffffff65!important;border-radius:0!important;color:#fff;cursor:pointer}
.s1-portal-hamburger span{display:block;width:24px;height:2px;background:#fff;transition:transform .18s,opacity .18s}
.s1-portal-hamburger[aria-expanded=true] span:first-child{transform:translateY(7px) rotate(45deg)}
.s1-portal-hamburger[aria-expanded=true] span:nth-child(2){opacity:0}
.s1-portal-hamburger[aria-expanded=true] span:last-child{transform:translateY(-7px) rotate(-45deg)}
#s1PortalTopToggle{display:none}
.s1-portal-float{position:fixed;z-index:200;top:15px;right:clamp(16px,3vw,48px);opacity:0;visibility:hidden;pointer-events:none;transform:translateY(-8px);transition:opacity .35s ease,transform .35s ease,visibility 0s linear .35s}
.s1-portal-float.is-visible{opacity:1;visibility:visible;pointer-events:auto;transform:none;transition:opacity .35s ease,transform .35s ease}
.s1-portal-dropdown{position:absolute;top:calc(100% + 9px);right:0;width:min(330px,calc(100vw - 34px));max-height:calc(100dvh - 90px);overflow:auto;background:#170508f7;border:1px solid #65303a;box-shadow:0 20px 40px #000a;padding:12px 16px;border-radius:0!important}
.s1-portal-dropdown[hidden]{display:none!important}
.s1-portal-dropdown a,.s1-portal-dropdown button{display:block;width:100%;text-align:left;background:transparent!important;color:#fff!important;border:0!important;border-bottom:1px solid #ffffff20!important;padding:11px 4px!important;font:700 16px var(--s1-body);text-decoration:none}
.s1-portal-dropdown .s1-nav-current{text-decoration:underline;text-decoration-color:#f12a32;text-decoration-thickness:3px;text-underline-offset:5px}
.s1-portal-dropdown .s1-menu-label{margin:12px 0 0;color:#fd9296;font-size:12px;font-weight:bold;letter-spacing:.1em}
@media(max-width:1120px){.s1-portal-primary{display:none}.s1-portal-subnav-mount{display:none}#s1PortalTopToggle{display:flex}.s1-portal-bar .s1-portal-dropdown{right:16px;top:65px}.s1-portal-toprow{min-height:68px}.s1-portal-toprow img{width:82px}}
@media(prefers-reduced-motion:reduce){.s1-portal-float,.s1-portal-float.is-visible{transition:none}}

.s1-portal-primary{gap:clamp(10px,1.5vw,25px)}
.s1-portal-primary a,.s1-portal-primary button{font-size:clamp(12px,1.1vw,16px)}

/* Milestone 6.0.8: shared website navigation and clean link styling */
.portal-main-nav{display:none!important;}
#s1PortalSubnavMount{display:flex;justify-content:flex-end;align-items:center;min-height:0;padding:0 clamp(18px,5vw,80px) 8px;}
#s1PortalSubnavMount[hidden]{display:none!important;}
#s1PortalSubnavMount .portal-sub-nav{display:flex;justify-content:flex-end;margin:0;gap:22px;width:100%;}
#s1PortalSubnavMount .portal-sub-nav .tab[data-nav-section="statistics"]{display:none!important;}
#s1PortalSubnavMount .portal-sub-nav .tab{flex:0 0 auto;max-width:none;}
/* Names remain interactive, without bordered red button outlines. */
.hist-inline-link,.hist-inline-link:focus,.hist-inline-link:hover,
.hist-leaderboard [data-records-open],.hist-table [data-hist-driver],
#standingsContent button[data-hist-driver],#standingsContent button[data-open-driver]{
 background:transparent!important;border:none!important;outline-offset:3px;box-shadow:none!important;
 border-radius:0!important;padding:0!important;text-decoration:none!important;
 color:inherit!important;font:inherit;letter-spacing:inherit;
}
.hist-inline-link:hover,.hist-leaderboard [data-records-open]:hover,
.hist-table [data-hist-driver]:hover,#standingsContent button:hover{
 color:#ffb7bb!important;text-decoration:underline!important;text-decoration-color:#d92530!important;
}
.s1-championship-hub{margin:0 0 32px;}
.s1-hub-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:16px;}
.s1-hub-heading h2{margin:4px 0;font-size:clamp(25px,3vw,42px);}
.s1-hub-heading p{margin:4px 0;color:#d4bfc1;}
.s1-hub-eyebrow{color:#ff6b73;font:700 13px var(--s1-body);letter-spacing:.16em;}
.s1-hub-leaders{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:18px 0;}
.s1-hub-card{background:#1b090c!important;border:1px solid #5d2930!important;color:#fff!important;padding:18px 14px!important;text-align:left!important;border-radius:0!important;min-width:0;}
.s1-hub-card>span{display:block;text-align:center;font:800 19px var(--s1-head,Impact,sans-serif);}
.s1-hub-card>small{display:block;text-align:center;color:#c6a8ad;font-size:10px;margin:6px 0 14px;}
.s1-hub-rank{display:grid;grid-template-columns:22px minmax(0,1fr) auto;align-items:center;gap:8px;padding:8px 0;border-top:1px solid #442329;}
.s1-hub-rank b{color:#f5b32a}.s1-hub-rank strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;}.s1-hub-rank em{font-style:normal;font-weight:bold;font-size:12px;}
.s1-hub-calendar{display:flex;align-items:center;justify-content:space-between;gap:18px;background:#29080c;border-left:3px solid #d7202a;padding:16px;margin:20px 0 28px;}
.s1-hub-calendar h3{margin:0 0 7px}.s1-hub-calendar p{margin:0}.s1-calendar-tag{white-space:nowrap;color:#fbbac0;font-size:11px;font-weight:bold;letter-spacing:.04em;}
@media(max-width:940px){.s1-hub-leaders{grid-template-columns:repeat(2,minmax(0,1fr));}.s1-hub-heading,.s1-hub-calendar{align-items:flex-start;flex-direction:column;}}
@media(max-width:560px){.s1-hub-leaders{grid-template-columns:1fr;}.s1-hub-card{padding:12px!important;}}

/* Milestone 6.0.8.2: identical desktop header typography and alignment */
.s1-portal-toprow{min-height:76px;padding:8px clamp(20px,5vw,80px);align-items:center;gap:30px}
.s1-portal-brand img{width:92px;max-height:43px}
.s1-portal-primary{align-items:center;gap:clamp(10px,1.7vw,34px);margin-left:auto}
.s1-portal-primary a,.s1-portal-primary button{font-family:var(--s1-body)!important;font-size:clamp(14px,1.3vw,18px)!important;font-weight:700!important;line-height:1.2!important;letter-spacing:.015em!important;white-space:nowrap;vertical-align:middle}
#s1PortalSubnavMount .portal-sub-nav{align-items:center}
@media(max-width:1120px){.s1-portal-toprow{min-height:70px;padding-block:8px}}
