@font-face { font-family: "F1 Regular"; src: url("../fonts/f1-regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "F1 Bold"; src: url("../fonts/f1-bold.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "F1 Wide"; src: url("../fonts/f1-wide.ttf") format("truetype"); font-display: swap; }

:root {
  --bg: #08090b;
  --surface: #111318;
  --surface-2: #171a20;
  --surface-3: #20242c;
  --border: #2b3039;
  --border-strong: #424956;
  --text: #f4f5f7;
  --muted: #969da9;
  --soft: #c9ced6;
  --red: #e10600;
  --red-bright: #ff3b35;
  --cyan: #39d8c5;
  --amber: #f5bd4f;
  --danger: #ff6464;
  --radius: 7px;
  --team-row-height: 60px;
  --matrix-team-column: clamp(140px, 10vw, 160px);
  --driver-column: 150px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font-family: "F1 Regular", "PingFang SC", "Microsoft YaHei", sans-serif; letter-spacing: 0; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
button, input, select { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.skip-link { position: fixed; z-index: 100; left: 12px; top: 12px; transform: translateY(-80px); padding: 10px 14px; background: var(--text); color: var(--bg); border-radius: var(--radius); }
.skip-link:focus { transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.site-header { border-color: var(--border); background: rgba(8, 8, 8, 0.96); backdrop-filter: blur(14px); }
.desktop-nav a { position: relative; }
.desktop-nav a.is-active { color: var(--text); }
.desktop-nav a.is-active::after { content: ""; position: absolute; right: 0; bottom: -12px; left: 0; height: 2px; background: var(--red); }
.mobile-nav a[aria-current="page"] { color: var(--red-hover); }

.dashboard { width: min(1560px, 100%); margin: 0 auto; padding: var(--header-height) clamp(14px, 3vw, 42px) 64px; }
.section-code { margin: 0 0 9px; color: var(--red-bright); font: 11px/1.3 "F1 Bold", sans-serif; }
.document-link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: var(--radius); color: var(--soft); background: var(--surface); font-size: 12px; transition: border-color 160ms ease, background 160ms ease; }
.document-link:hover { border-color: var(--red-bright); background: var(--surface-2); }
.document-link:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--red-bright); outline-offset: 3px; }
.document-link svg { width: 15px; height: 15px; }

.view-tabs { height: 64px; display: flex; align-items: stretch; gap: 26px; border-bottom: 1px solid var(--border); }
.dataset-toolbar { min-height: 70px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--border); }
.dataset-toolbar label { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; }
.dataset-toolbar select { height: 38px; max-width: 290px; border: 1px solid var(--border); border-radius: 5px; padding: 0 32px 0 11px; background: var(--surface); color: var(--text); font-size: 12px; }
.dataset-toolbar select:focus, .dataset-toolbar select:focus-visible { outline: 0; border-color: var(--border-strong); box-shadow: none; }
.view-tab { position: relative; display: inline-flex; align-items: center; gap: 9px; border: 0; padding: 0 2px; background: transparent; color: var(--muted); cursor: pointer; font-family: "F1 Bold", sans-serif; font-size: 14px; }
.view-tab svg { width: 16px; height: 16px; }
.view-tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: transparent; }
.view-tab.is-active { color: var(--text); }
.view-tab.is-active::after { background: var(--red); }

.loading-state, .error-state { min-height: 360px; display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--muted); }
.loading-state strong { font-size: 14px; }
.loader { width: 24px; height: 24px; border: 2px solid var(--border); border-top-color: var(--red); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-state { justify-content: flex-start; min-height: 160px; margin-top: 28px; padding: 20px; border: 1px solid rgba(255, 100, 100, 0.35); border-radius: var(--radius); background: rgba(255, 100, 100, 0.06); color: #ffc2c2; }
.error-state svg { width: 24px; height: 24px; }
.error-state strong, .error-state p { margin: 0; }
.error-state p { margin-top: 5px; font-size: 12px; color: #dca5a5; }

.view-panel { padding-top: 28px; }
.season-matrix-panel { margin-bottom: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.matrix-title-row { min-height: 86px; padding: 0 18px; border-bottom: 1px solid var(--border); }
.matrix-title-row h2 { font-size: 20px; }
.matrix-note { color: var(--muted); font-size: 11px; }
.season-matrix-scroll { max-width: 100%; overflow-x: auto; scrollbar-color: var(--border-strong) transparent; }
.matrix-grid { min-width: max-content; padding-bottom: 2px; }
.matrix-row { display: grid; min-height: 48px; border-bottom: 1px solid var(--border); }
.matrix-row:not(.matrix-header) { height: var(--team-row-height); min-height: var(--team-row-height); }
.matrix-row:last-child { border-bottom: 0; }
.matrix-row > * { min-width: 0; border: 0; border-right: 1px solid var(--border); }
.matrix-row > *:last-child { border-right: 0; }
.matrix-header { position: sticky; top: 0; z-index: 2; min-height: 50px; background: #0d0f13; color: var(--muted); font-size: 11px; }
.matrix-header > div { display: grid; place-items: center; }
.matrix-header > div:first-child { position: sticky; z-index: 5; left: 0; justify-items: start; padding-left: 14px; background: #0d0f13; box-shadow: 10px 0 14px -14px #000, 1px 0 0 var(--border); }
.matrix-round-label { min-width: 0; align-content: center; gap: 4px; padding-inline: 4px; }
.matrix-round-label strong { color: #707784; font: 10px "F1 Bold", sans-serif; }
.matrix-round-label span { width: 100%; overflow: hidden; color: var(--text); font-size: 11px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.matrix-team { position: sticky; z-index: 3; left: 0; display: grid; grid-template-columns: 3px 22px minmax(0, 1fr); align-items: center; gap: 8px; padding: 0 12px 0 0; background: var(--surface); color: var(--soft); cursor: pointer; text-align: left; box-shadow: 10px 0 14px -14px #000, 1px 0 0 var(--border); }
.matrix-team:hover { background: var(--surface-2); }
.matrix-team .team-color { align-self: stretch; background: var(--team-color); }
.matrix-team-copy { min-width: 0; display: grid; gap: 3px; }
.matrix-team-copy > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--soft); font-size: 12px; }
.matrix-team .matrix-team-copy > span { color: var(--text); }
.matrix-team-copy strong { color: #747b87; font: 10px "F1 Regular", "PingFang SC", sans-serif; white-space: nowrap; }
.team-logo, .team-logo-placeholder { width: 22px; height: 22px; display: block; flex: none; object-fit: contain; }
.team-logo-placeholder { opacity: 0; }
.matrix-slot { display: grid; padding: 6px; background: var(--surface); }
.matrix-cell { position: relative; width: 100%; height: 100%; display: grid; place-items: center; border: 1px solid rgba(var(--team-rgb, 45, 105, 190), var(--cell-border-alpha, 0.1)); border-radius: 5px; background: rgba(var(--team-rgb, 45, 105, 190), var(--cell-alpha, 0)); color: #fff; cursor: pointer; font: 11px "F1 Bold", sans-serif; transition: filter 120ms ease, background 120ms ease; }
.matrix-cell:hover:not(:disabled) { filter: brightness(1.16); }
.matrix-cell.is-selected { box-shadow: none; }
.matrix-cell:focus, .matrix-cell:focus-visible { outline: 0; }
.matrix-cell:focus-visible:not(:disabled) { filter: brightness(1.12); }
.matrix-cell.is-no_updates { border-color: var(--border); background: #12151a; }
.matrix-cell.is-unknown { background: repeating-linear-gradient(135deg, #171a20, #171a20 5px, #111318 5px, #111318 10px); }
.matrix-cell.is-unpublished { border-color: transparent; background: #0d0f13; cursor: default; }
.matrix-cell:disabled { cursor: default; }
.matrix-empty { min-height: 96px; display: grid; place-items: center; color: var(--muted); font-size: 10px; }

.section-title-row { min-height: 104px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.section-title-row h2 { margin: 0; font: clamp(20px, 2.4vw, 30px) "F1 Bold", "PingFang SC", sans-serif; }
.section-code { margin-bottom: 7px; }
.section-actions { display: flex; align-items: center; gap: 12px; }
.round-picker-control { min-width: 190px; }
.round-picker-control select { width: 100%; height: 40px; border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 0 30px 0 11px; background: var(--surface); color: var(--soft); font-size: 12px; }
.round-picker-control select:hover { border-color: var(--muted); }
.round-picker-control select:focus, .round-picker-control select:focus-visible { border-color: var(--muted); outline: 0; box-shadow: none; }
.round-picker-control select:disabled { cursor: wait; opacity: 0.65; }

.technical-grid { display: grid; grid-template-columns: var(--matrix-team-column) minmax(0, 1fr); gap: 16px; align-items: start; }
.team-index, .updates-panel { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.panel-heading { min-height: 43px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 11px; }
.team-button { width: 100%; height: var(--team-row-height); min-height: var(--team-row-height); display: grid; grid-template-columns: 3px 22px minmax(0, 1fr); align-items: center; gap: 8px; border: 0; border-bottom: 1px solid var(--border); padding: 0 12px 0 0; background: var(--surface); color: var(--soft); cursor: pointer; text-align: left; }
.team-button:hover { background: var(--surface-2); }
.team-button.is-active { background: var(--surface-3); color: var(--text); }
.team-button .matrix-team-copy > span { color: var(--text); }
.team-color { align-self: stretch; background: var(--team-color); }
.team-index-all-icon { width: 20px; height: 20px; color: var(--soft); }
.team-button-all.is-active .team-index-all-icon { color: var(--text); }

.toolbar { min-height: 58px; display: flex; align-items: center; gap: 9px; padding: 9px; border-bottom: 1px solid var(--border); }
.search-control { height: 40px; flex: 1; display: flex; align-items: center; gap: 9px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--radius); background: #0d0f13; }
.search-control:focus-within { border-color: var(--red); }
.search-control svg { width: 15px; height: 15px; color: var(--muted); }
.search-control input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 12px; }
.search-control input::placeholder { color: #656c77; }
.icon-button { width: 40px; height: 40px; display: grid; place-items: center; flex: none; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); color: var(--soft); cursor: pointer; }
.icon-button:hover { border-color: var(--border-strong); background: var(--surface-3); }
.icon-button svg { width: 17px; height: 17px; }

.updates-table-wrap { overflow-x: auto; }
.updates-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.updates-table th { height: 44px; padding: 0 13px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 11px; font-weight: 400; text-align: left; }
.updates-table th:nth-child(1) { width: 18%; }
.updates-table th:nth-child(2) { width: 17%; }
.updates-table th:nth-child(3) { width: 19%; }
.updates-table th:nth-child(4) { width: auto; }
.updates-table th:nth-child(5) { width: 48px; }
.updates-table td { min-height: 64px; padding: 14px 13px; border-bottom: 1px solid var(--border); color: var(--soft); font-size: 12px; line-height: 1.55; vertical-align: middle; overflow-wrap: anywhere; }
.updates-table tr:last-child td { border-bottom: 0; }
.updates-table tbody tr { cursor: pointer; transition: background 140ms ease; }
.updates-table tbody tr:hover { background: var(--surface-2); }
.updates-table tbody tr:focus, .updates-table tbody tr:focus-visible { outline: 0; }
.updates-table tbody tr:focus-visible { background: var(--surface-2); }
.team-cell { display: flex; align-items: center; gap: 9px; color: var(--text); }
.team-cell .team-color { width: 3px; height: 27px; flex: none; background: var(--team-color); }
.team-cell .team-logo { width: 24px; height: 24px; }
.component-name { color: var(--text); font-family: "F1 Bold", sans-serif; }
.reason-pair { display: grid; gap: 4px; }
.reason-pair span:first-child { color: var(--text); }
.reason-pair span:last-child { color: var(--muted); }
.row-action { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 5px; background: transparent; color: var(--muted); }
.row-action svg { width: 15px; height: 15px; }
.empty-state { min-height: 160px; display: grid; place-items: center; color: var(--muted); font-size: 11px; }

.mode-control { height: 38px; display: inline-grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 3px; background: var(--surface); }
.mode-control button { min-width: 72px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; }
.mode-control button.is-active { background: var(--text); color: var(--bg); }
.pu-table-head-shell { --pu-horizontal-offset: 0px; position: sticky; z-index: 25; top: var(--header-height); max-width: 100%; overflow-x: clip; overflow-y: visible; border: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; background: #0d0f13; box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28); }
.pu-table-head-shell .pu-table { transform: translateX(calc(-1 * var(--pu-horizontal-offset))); transform-origin: left top; }
.pu-table-wrap { max-width: 100%; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; overscroll-behavior-y: auto; border: 1px solid var(--border); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); background: var(--surface); -webkit-overflow-scrolling: touch; }
.pu-table { width: 100%; min-width: 1080px; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.pu-table th, .pu-table td { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.pu-table th:last-child, .pu-table td:last-child { border-right: 0; }
.pu-table tbody tr:last-child td { border-bottom: 0; }
.pu-table th { height: 60px; padding: 11px 8px 3px; background: #0d0f13; color: var(--muted); font-size: 11px; font-weight: 400; text-align: center; vertical-align: middle; }
.pu-table-head-shell th { box-shadow: 0 1px 0 var(--border); }
.pu-table tr > :first-child { width: var(--driver-column); min-width: var(--driver-column); }
.pu-table tr > :nth-child(2) { width: 112px; }
.pu-table tr > :not(:first-child):not(:nth-child(2)) { width: 118px; }
.pu-table-head-shell th:first-child { position: relative; z-index: 6; transform: translateX(var(--pu-horizontal-offset)); text-align: left; padding-left: 16px; background: #0d0f13; }
.pu-table th strong { display: block; margin-bottom: 4px; color: var(--text); font: 12px "F1 Bold", sans-serif; }
.pu-header-stack { height: 36px; display: grid; grid-template-rows: 16px 16px; align-content: center; gap: 4px; }
.pu-header-stack > strong { align-self: center; margin-bottom: 0; }
.pu-header-stack > span:last-child { align-self: center; line-height: 16px; }
.pu-header-stack-start { text-align: left; }
.pu-component-label { height: 16px; display: grid; place-items: center; margin-bottom: 0; line-height: 1; }
.pu-component-title { position: relative; height: 16px; display: flex; align-items: center; justify-content: center; }
.pu-component-title > strong { margin-bottom: 0; }
.pu-component-name { width: max-content; max-width: 100%; height: 16px; display: block; justify-self: center; overflow: hidden; color: var(--muted); font: 9px/16px "F1 Regular", "PingFang SC", sans-serif; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.pu-info-button { position: absolute; top: 50%; left: calc(100% + 3px); width: 16px; height: 16px; display: grid; place-items: center; border: 0; padding: 0; background: transparent; color: var(--muted); cursor: help; transform: translateY(-55%); }
.pu-info-button:hover, .pu-info-button:focus-visible, .pu-info-button[aria-expanded="true"] { color: var(--text); }
.pu-info-button svg { width: 13px; height: 13px; }
.pu-info-tooltip { position: absolute; z-index: 12; top: calc(100% + 7px); left: 50%; width: max-content; max-width: 230px; display: grid; gap: 4px; padding: 9px 10px; border: 1px solid var(--border-strong); border-radius: 5px; background: #171a20; color: var(--soft); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45); font: 10px/1.45 "F1 Regular", "PingFang SC", sans-serif; text-align: left; white-space: normal; opacity: 0; visibility: hidden; pointer-events: none; transform: translate(-50%, -3px); transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease; }
.pu-info-tooltip b { color: var(--text); font-family: "F1 Bold", sans-serif; }
.pu-info-button:hover .pu-info-tooltip, .pu-info-button:focus-visible .pu-info-tooltip, .pu-info-button[aria-expanded="true"] .pu-info-tooltip { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.pu-table th:last-child .pu-info-tooltip { right: 0; left: auto; transform: translateY(-3px); }
.pu-table th:last-child .pu-info-button:hover .pu-info-tooltip, .pu-table th:last-child .pu-info-button:focus-visible .pu-info-tooltip, .pu-table th:last-child .pu-info-button[aria-expanded="true"] .pu-info-tooltip { transform: translateY(0); }
.pu-table td { height: 66px; padding: 6px; text-align: center; background: var(--surface); }
.pu-table td:first-child { position: sticky; z-index: 3; left: 0; padding: 0 12px 0 0; background: var(--surface); text-align: left; }
.pu-table tbody tr:hover td { background: var(--surface-2); }
.pu-table tbody tr:hover td:first-child { background: var(--surface-2); }
.driver-cell { height: 65px; display: grid; grid-template-columns: 3px 42px minmax(0, 1fr); align-items: center; gap: 8px; }
.driver-line { width: 3px; height: 100%; background: var(--team-color); }
.driver-media { width: 42px; height: 58px; display: grid; place-items: end center; overflow: hidden; }
.driver-media > * { grid-area: 1 / 1; }
.driver-avatar { width: 48px; height: 58px; display: block; object-fit: contain; object-position: center bottom; }
.driver-number { align-self: center; color: var(--team-color, var(--soft)); font: 12px "F1 Wide", sans-serif; text-align: center; }
.driver-copy { min-width: 0; }
.driver-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.driver-copy strong { color: var(--text); font-size: 12px; }
.driver-team { min-width: 0; margin-top: 3px; display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; }
.driver-team .team-logo { width: 16px; height: 16px; }
.driver-team > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usage-cell { min-height: 48px; display: grid; align-content: center; gap: 3px; border: 1px solid rgba(var(--team-rgb, 111, 119, 131), var(--cell-border-alpha, 0.16)); border-radius: 5px; background: rgba(var(--team-rgb, 111, 119, 131), var(--cell-alpha, 0.1)); color: var(--cell-text, var(--text)); }
.usage-cell-button { width: 100%; padding: 0; font: inherit; cursor: pointer; transition: filter 120ms ease, background 120ms ease; }
.usage-cell-button:hover { filter: brightness(1.16); }
.usage-cell-button:active { filter: brightness(0.94); }
.usage-cell-button:focus-visible { outline-color: rgba(var(--team-rgb, 111, 119, 131), 0.9); outline-offset: 1px; }
.usage-cell strong { font: 13px "F1 Bold", sans-serif; }
.usage-cell span { font-size: 10px; opacity: 0.75; }
.usage-low { --cell-alpha: 0.08; --cell-border-alpha: 0.12; }
.usage-mid { --cell-alpha: 0.14; --cell-border-alpha: 0.2; }
.usage-high { --cell-alpha: 0.22; --cell-border-alpha: 0.3; }
.usage-full { --cell-alpha: 0.32; --cell-border-alpha: 0.42; }
.usage-over { border-color: rgba(245, 189, 79, 0.62); background: rgba(245, 189, 79, 0.18); --cell-text: #ffe6ad; }
.usage-total { --cell-alpha: 0.17; --cell-border-alpha: 0.24; }

.pu-history-dialog { width: min(420px, calc(100vw - 24px)); max-height: min(620px, calc(100dvh - 24px)); margin: auto; padding: 0; overflow: hidden; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: 0 28px 90px rgba(0, 0, 0, 0.62); }
.pu-history-dialog::backdrop { background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(4px); }
.pu-history-head { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.pu-history-head > div { min-width: 0; }
.pu-history-head span { display: block; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.pu-history-head h2 { margin: 7px 0 0; font: 18px "F1 Bold", "PingFang SC", sans-serif; }
.pu-history-body { max-height: min(500px, calc(100dvh - 126px)); padding: 8px 16px 16px; overflow-y: auto; }
.pu-history-loading, .pu-history-empty { min-height: 132px; display: flex; align-items: center; justify-content: center; gap: 11px; color: var(--muted); font-size: 11px; text-align: center; }
.pu-history-loading .loader { width: 20px; height: 20px; }
.pu-race-list { margin: 0; padding: 0; list-style: none; }
.pu-race-list li { min-height: 52px; display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: center; gap: 10px; border-bottom: 1px solid var(--border); }
.pu-race-list li:last-child { border-bottom: 0; }
.pu-race-list li > span { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-3); color: var(--muted); font: 9px "F1 Bold", sans-serif; }
.pu-race-list strong { font: 12px "F1 Regular", "PingFang SC", sans-serif; }

.detail-dialog { inset: 0 0 0 auto; width: min(760px, 100vw); height: 100dvh; max-width: 100vw; max-height: none; margin: 0; padding: 0; display: none; flex-direction: column; overflow: hidden; border: 0; border-left: 1px solid var(--border-strong); border-radius: 0; background: var(--surface); color: var(--text); box-shadow: -24px 0 90px rgba(0, 0, 0, 0.58); }
.detail-dialog[open] { display: flex; animation: detail-drawer-enter 220ms cubic-bezier(0.22, 1, 0.36, 1); }
.detail-dialog::backdrop { background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(4px); animation: detail-backdrop-enter 180ms ease-out; }
@keyframes detail-drawer-enter { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes detail-backdrop-enter { from { opacity: 0; } to { opacity: 1; } }
.dialog-head { min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.dialog-head span { color: var(--red-bright); font: 10px "F1 Bold", sans-serif; }
.dialog-head #dialogTeam,
.dialog-head #dialogTeam > span { color: var(--text); }
.dialog-head #dialogTeam { display: inline-flex; align-items: center; gap: 8px; }
.detail-dialog #closeTechnicalDialog:focus,
.detail-dialog #closeTechnicalDialog:focus-visible,
.pu-history-dialog #closePowerUnitHistoryDialog:focus,
.pu-history-dialog #closePowerUnitHistoryDialog:focus-visible { outline: 0; border-color: var(--border-strong); background: var(--surface-3); box-shadow: none; }
.dialog-team-logo { width: 24px; height: 24px; }
.dialog-head h2 { margin: 6px 0 0; font: 22px "F1 Bold", sans-serif; }
.dialog-body { min-height: 0; flex: 1; padding: 0 20px 20px; overflow-y: auto; overscroll-behavior: contain; }
.detail-meta { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border); border-radius: var(--radius); }
.detail-meta div { padding: 12px; border-right: 1px solid var(--border); }
.detail-meta div:last-child { border-right: 0; }
.detail-meta span, .detail-copy span { display: block; color: var(--muted); font-size: 10px; }
.detail-meta strong { display: block; margin-top: 7px; font-size: 12px; overflow-wrap: anywhere; }
.detail-copy { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.detail-copy strong { display: block; margin-top: 7px; color: var(--text); font-size: 13px; line-height: 1.6; }
.detail-copy p { margin: 8px 0 0; color: var(--soft); font-size: 12px; line-height: 1.75; }
.technical-car-visual { position: sticky; z-index: 3; top: 0; min-height: 220px; display: grid; place-items: center; margin-bottom: 18px; border-bottom: 1px solid var(--border); background: #0b0d11; overflow: hidden; box-shadow: 0 12px 20px rgba(0, 0, 0, 0.28); }
.technical-car-visual img { width: min(94%, 680px); height: 210px; object-fit: contain; }
.car-hotspot, .team-update-index span { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, 0.9); border-radius: 50%; background: rgba(8, 9, 11, 0.9); color: #fff; box-shadow: 0 0 0 2px rgba(var(--team-rgb), 0.72), 0 2px 7px rgba(0, 0, 0, 0.65); font: 700 9px/1 Arial, "Helvetica Neue", sans-serif; font-variant-numeric: tabular-nums; letter-spacing: 0; transition: border-color 140ms ease, background 140ms ease, color 140ms ease, box-shadow 140ms ease; }
.car-hotspot { position: absolute; transform: translate(-50%, -50%); cursor: pointer; transition: transform 140ms ease, background 140ms ease; }
.car-hotspot:hover { transform: translate(-50%, -50%) scale(1.1); background: #11141a; }
.car-hotspot:focus-visible { outline-color: rgb(var(--team-rgb)); }
.car-hotspot span { width: 100%; display: block; font: inherit; text-align: center; }
.car-hotspot.is-double-digit, .team-update-index span.is-double-digit { font-size: 8px; }
.car-hotspot.is-active, .team-update-detail.is-active .team-update-index span { border-color: #fff; background: #fff; color: #08090b; box-shadow: 0 0 0 2px rgb(var(--team-rgb)), 0 0 0 5px rgba(var(--team-rgb), 0.14), 0 3px 10px rgba(0, 0, 0, 0.72); }
.team-update-stack { display: grid; gap: 12px; }
.dialog-body > .team-update-stack:first-child { padding-top: 20px; }
.team-update-detail { padding: 15px; border: 1px solid var(--border); border-radius: var(--radius); background: #0d0f13; scroll-margin-top: 240px; }
.team-update-index { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--muted); }
.team-update-index span { flex: 0 0 22px; }
.team-update-index strong { font: 10px "F1 Bold", sans-serif; }
.team-update-detail.is-active .team-update-index strong { color: var(--text); }
.team-update-detail .detail-copy { margin-top: 12px; padding-top: 12px; }
.team-update-detail > small { display: block; margin-top: 13px; color: var(--muted); font-size: 10px; }
.pu-empty { height: 120px !important; color: var(--muted); font-size: 11px; }

@media (max-width: 900px) {
  .technical-grid { grid-template-columns: 1fr; }
  .team-index { display: none; }
  .updates-table { min-width: 760px; }
}

@media (max-width: 640px) {
  :root { --matrix-team-column: 132px; --driver-column: 144px; }
  .dashboard { padding-inline: 12px; }
  .view-tabs { height: 58px; gap: 18px; }
  .dataset-toolbar { align-items: stretch; flex-wrap: wrap; padding: 12px 0; }
  .dataset-toolbar label { flex: 1; align-items: stretch; flex-direction: column; }
  .dataset-toolbar select { width: 100%; max-width: none; }
  .view-tab { flex: 1; justify-content: center; font-size: 12px; }
  .view-panel { padding-top: 18px; }
  .season-matrix-panel { margin-inline: -12px; border-inline: 0; border-radius: 0; }
  .matrix-title-row { min-height: 80px; padding-inline: 14px; }
  .matrix-note { display: none; }
  .section-title-row { min-height: 112px; align-items: flex-start; padding-top: 22px; }
  .section-title-row h2 { font-size: 20px; }
  .section-actions { align-items: flex-end; flex-direction: column-reverse; }
  .round-picker-control { width: 100%; min-width: 0; }
  .document-link { min-height: 38px; padding-inline: 10px; }
  .updates-panel { border-inline: 0; border-radius: 0; margin-inline: -12px; }
  .updates-table-wrap { overflow: visible; }
  .updates-table, .updates-table tbody { display: block; min-width: 0; }
  .updates-table thead { display: none; }
  .updates-table tr { display: grid; grid-template-columns: 1fr auto; padding: 14px 14px 12px; border-bottom: 1px solid var(--border); }
  .updates-table tr:last-child { border-bottom: 0; }
  .updates-table td { display: block; min-height: 0; padding: 0; border: 0; }
  .updates-table td:nth-child(1) { grid-column: 1; margin-bottom: 12px; }
  .updates-table td:nth-child(2) { grid-column: 1; margin-bottom: 7px; }
  .updates-table td:nth-child(3) { grid-column: 1; margin-bottom: 8px; }
  .updates-table td:nth-child(4) { grid-column: 1 / -1; color: var(--muted); }
  .updates-table td:nth-child(5) { grid-column: 2; grid-row: 1 / 4; align-self: center; }
  .pu-table-head-shell, .pu-table-wrap { margin-inline: -12px; border-inline: 0; border-radius: 0; }
  .pu-info-tooltip, .pu-table th:last-child .pu-info-tooltip { right: 0; left: auto; max-width: min(220px, calc(100vw - 24px)); transform: translateY(-3px); }
  .pu-info-button:hover .pu-info-tooltip, .pu-info-button:focus-visible .pu-info-tooltip, .pu-info-button[aria-expanded="true"] .pu-info-tooltip, .pu-table th:last-child .pu-info-button:hover .pu-info-tooltip, .pu-table th:last-child .pu-info-button:focus-visible .pu-info-tooltip, .pu-table th:last-child .pu-info-button[aria-expanded="true"] .pu-info-tooltip { transform: translateY(0); }
  .detail-meta { grid-template-columns: 1fr; }
  .detail-meta div { border-right: 0; border-bottom: 1px solid var(--border); }
  .detail-meta div:last-child { border-bottom: 0; }
  .technical-car-visual { min-height: 160px; margin-inline: -20px; }
  .technical-car-visual img { height: 150px; }
  .team-update-detail { scroll-margin-top: 180px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
@media (hover: none) and (pointer: coarse) {
  :focus-visible { outline: 0; }
}
