:root {
  --paper: #f5f3ee;
  --surface: #fffefa;
  --ink: #161514;
  --muted: #716e68;
  --rule: #d9d5cc;
  --soft-rule: #e9e6de;
  --red: #d62c34;
  --teal: #057b73;
  --yellow: #f2c74e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.35;
}

button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.topbar {
  min-height: 64px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 38px;
  border-bottom: 1px solid var(--rule);
  background: #f9f8f4;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 23px;
  font-weight: bold;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-mark { width: 58px; height: 32px; flex: 0 0 auto; object-fit: contain; }

nav { display: flex; gap: 22px; height: 64px; align-items: stretch; }
nav a {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: bold;
  border-bottom: 2px solid transparent;
}
nav a.active { color: var(--ink); border-color: var(--red); }

.topbar-meta {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: bold;
  white-space: nowrap;
}
.topbar-meta .topbar-separator { display: inline-block; width: 5px; height: 5px; margin: 0 8px 2px; border-radius: 50%; background: var(--teal); }
.mobile-actions, .mobile-team-summary { display: none; }

.workspace {
  width: min(1520px, 100%);
  min-height: calc(100vh - 64px);
  margin: 0 auto;
  padding: 25px 32px 38px;
  display: grid;
  grid-template-columns: 280px minmax(520px, 1fr) 290px;
  gap: 28px;
}
.site-footer { width: min(1520px, 100%); margin: 0 auto; padding: 20px 32px 32px; display: grid; grid-template-columns: minmax(190px, .6fr) minmax(0, 1.4fr); gap: 34px; border-top: 1px solid var(--rule); }
.site-footer .kicker { margin-bottom: 6px; }
.footer-author, .footer-copy { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.footer-author { color: var(--ink); font-family: Georgia, 'Times New Roman', serif; font-size: 15px; font-weight: bold; }
.footer-disclaimer { margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.site-footer a { color: var(--teal); font-family: Arial, Helvetica, sans-serif; font-size: 10px; font-weight: bold; text-decoration: none; }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.has-cookie-dialog > .topbar, .has-cookie-dialog > .workspace, .has-cookie-dialog > .site-footer { filter: blur(3px); pointer-events: none; user-select: none; }
.cookie-banner { position: fixed; z-index: 1000; top: 50%; left: 50%; width: min(410px, calc(100vw - 32px)); padding: 22px; display: grid; gap: 16px; border: 1px solid var(--ink); background: #fffdf9; box-shadow: 0 18px 44px rgba(22, 21, 20, .2), 4px 4px 0 rgba(22, 21, 20, .12); pointer-events: auto; transform: translate(-50%, -50%); }
.cookie-banner[hidden] { display: none; }
.cookie-copy .kicker { margin: 0 0 6px; }
.cookie-copy h2 { margin: 0 0 7px; font-size: 21px; line-height: 1; }
.cookie-banner p, .cookie-banner small { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.cookie-banner small { display: flex; gap: 7px; margin-top: 8px; }
.cookie-banner small a { color: var(--teal); font-weight: bold; }
.cookie-toggle { min-height: 46px; padding: 0 12px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--rule); background: #f4f2ed; color: var(--ink); cursor: pointer; }
.cookie-toggle input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
.cookie-toggle span { width: 30px; height: 17px; display: block; position: relative; flex: 0 0 auto; border-radius: 10px; background: #c8c4bb; transition: background .16s ease; }
.cookie-toggle span::after { content: ""; width: 13px; height: 13px; position: absolute; top: 2px; left: 2px; border-radius: 50%; background: var(--surface); transition: transform .16s ease; }
.cookie-toggle b { font-size: 11px; }
.cookie-toggle input:checked + span { background: var(--teal); }
.cookie-toggle input:checked + span::after { transform: translateX(13px); }
.cookie-toggle input:focus-visible + span { outline: 2px solid var(--yellow); outline-offset: 2px; }
.cookie-actions button { width: 100%; min-height: 39px; padding: 0 13px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font-size: 11px; font-weight: bold; text-align: center; }
.cookie-actions button span { margin-left: 7px; color: var(--yellow); }
.rating-prompt { position: fixed; z-index: 900; right: 24px; bottom: 24px; width: min(352px, calc(100vw - 32px)); padding: 18px; border: 1px solid var(--ink); background: #fffdf9; box-shadow: 0 14px 34px rgba(22, 21, 20, .16), 3px 3px 0 rgba(22, 21, 20, .1); }
.rating-prompt[hidden] { display: none; }
.rating-prompt header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.rating-prompt .kicker { margin-bottom: 5px; }
.rating-prompt h2 { margin: 0; font-size: 20px; line-height: 1.05; }
.rating-prompt > p { margin: 11px 0 14px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.rating-prompt .rating-status { margin: 11px 0 -2px; color: var(--teal); font-weight: bold; }
.rating-prompt .icon-button { flex: 0 0 auto; }
.rating-scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.rating-scale button { min-height: 37px; padding: 0; border: 1px solid var(--ink); background: var(--surface); color: var(--ink); font-size: 13px; font-weight: bold; }
.rating-scale button:hover, .rating-scale button:focus-visible, .rating-scale button[aria-pressed="true"] { border-color: var(--teal); background: var(--teal); color: #fff; outline: none; }
.rating-feedback { display: grid; gap: 6px; margin-top: 14px; color: var(--ink); font-size: 11px; font-weight: bold; }
.rating-feedback small { color: var(--muted); font-size: 10px; font-weight: normal; }
.rating-feedback textarea { width: 100%; min-height: 66px; padding: 9px; resize: vertical; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); font: inherit; font-size: 11px; line-height: 1.4; }
.rating-feedback textarea:focus { border-color: var(--teal); outline: 2px solid rgba(5, 123, 115, .15); outline-offset: 1px; }
.rating-submit { width: 100%; min-height: 38px; margin-top: 14px; padding: 0 13px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font-size: 11px; font-weight: bold; }
.rating-submit span { margin-left: 7px; color: var(--yellow); }
.rating-submit:disabled { cursor: not-allowed; opacity: .42; }

.team-panel, .context-panel { padding-top: 12px; }
.team-panel { border-right: 1px solid var(--rule); padding-right: 25px; }
.context-panel { border-left: 1px solid var(--rule); padding-left: 25px; }

.kicker {
  margin: 0 0 7px;
  color: var(--teal);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.55px;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: Georgia, 'Times New Roman', serif; letter-spacing: 0; }
.team-panel h1 { margin-bottom: 27px; font-size: 28px; line-height: 1.02; }
.context-panel h2 { margin-bottom: 8px; font-size: 25px; line-height: 1.05; }

.budget {
  margin: 0 0 24px;
  padding: 14px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
dt { color: var(--muted); font-size: 10px; font-weight: bold; text-transform: uppercase; }
dd { margin: 4px 0 0; font-size: 18px; font-family: Georgia, 'Times New Roman', serif; font-weight: bold; }

.team-settings { margin: 0 0 14px; padding: 13px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.team-settings label, .strategy-field, .audit-select-label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; font-weight: bold; letter-spacing: .5px; text-transform: uppercase; }
.team-settings input, .strategy-field select, .audit-select-label select { width: 100%; height: 35px; padding: 0 8px; border: 1px solid var(--rule); border-radius: 0; background: var(--surface); color: var(--ink); font-size: 13px; font-weight: bold; }
.budget-warning { margin: -5px 0 14px; padding: 8px 9px; border-left: 2px solid var(--red); background: #fbf0ed; color: #a72b24; font-size: 10px; font-weight: bold; line-height: 1.35; }
.strategy-field { margin-bottom: 24px; }
.strategy-field select { text-transform: none; letter-spacing: 0; }
.chip-settings { margin: -10px 0 24px; padding: 12px 0 8px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 13px; border: 0; border-top: 1px solid var(--soft-rule); }
.chip-settings legend { width: 100%; padding: 0 0 8px; display: flex; justify-content: space-between; grid-column: 1 / -1; color: var(--muted); font-size: 10px; font-weight: bold; letter-spacing: .5px; text-transform: uppercase; }
.chip-settings output { color: var(--teal); font-size: 9px; letter-spacing: 0; }
.chip-settings label { min-height: 33px; display: grid; grid-template-columns: 13px minmax(0, 1fr); position: relative; align-items: center; gap: 7px; border-top: 1px solid var(--soft-rule); color: var(--ink); font-size: 10px; font-weight: bold; cursor: pointer; }
.chip-settings input { width: 13px; height: 13px; margin: 0; accent-color: var(--teal); }
.chip-settings label:has(input:not(:checked)) { color: var(--muted); }
.chip-settings label::after { width: 205px; padding: 8px 9px; position: absolute; z-index: 5; top: calc(100% + 5px); left: 0; border: 1px solid #36332f; background: var(--ink); color: #fff; content: attr(data-tooltip); font-size: 10px; font-weight: normal; letter-spacing: 0; line-height: 1.35; opacity: 0; pointer-events: none; text-transform: none; transform: translateY(-3px); transition: opacity .14s ease, transform .14s ease; visibility: hidden; }
.chip-settings label:nth-of-type(even)::after { right: 0; left: auto; }
.chip-settings label:hover::after, .chip-settings label:focus-within::after { opacity: 1; transform: translateY(0); visibility: visible; }

.team-panel section { margin: 0 0 23px; }
.section-label { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 11px; font-weight: bold; text-transform: uppercase; }
.section-label b { color: var(--muted); font-size: 10px; }
.text-button { padding: 0; border: 0; background: none; color: var(--teal); font-size: 10px; font-weight: bold; text-transform: uppercase; }
.team-list, .shifts ol { margin: 0; padding: 0; list-style: none; }
.team-list li {
  min-height: 49px;
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: center;
  gap: 9px;
  border-top: 1px solid var(--soft-rule);
}
.team-list li:last-child { border-bottom: 1px solid var(--soft-rule); }
.team-list i { width: 8px; height: 29px; display: block; background: var(--ink); }
.team-list span, .shifts span { font-size: 12px; font-weight: bold; }
.team-list small, .shifts small, td small { display: block; margin-top: 1px; color: var(--muted); font-size: 10px; font-weight: normal; }
.team-list b { font-family: Georgia, 'Times New Roman', serif; font-size: 12px; }
.team-list .team-empty { min-height: 39px; display: flex; align-items: center; border-bottom: 1px solid var(--soft-rule); color: var(--muted); font-size: 11px; font-style: italic; }
.mercedes { background: #20a69b !important; }
.racing-bulls { background: #224caa !important; }
.audi { background: #d52d36 !important; }
.williams { background: #3277cc !important; }
.cadillac { background: #777 !important; }
.mclaren { background: #ee781d !important; }

.primary, .quiet {
  width: 100%;
  min-height: 43px;
  padding: 0 14px;
  border: 0;
  text-align: left;
  font-weight: bold;
}
.primary { display: flex; justify-content: space-between; align-items: center; background: var(--ink); color: #fff; }
.primary span { color: var(--yellow); font-size: 18px; }
.primary:disabled { cursor: wait; opacity: .72; }
.primary:disabled span { color: #fff; }
.quiet { margin-top: 8px; border: 1px solid var(--ink); background: transparent; color: var(--ink); }
.save-toggle { min-height: 43px; margin-top: 8px; padding: 0 13px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--ink); color: var(--ink); font-size: 12px; font-weight: bold; cursor: pointer; }
.save-toggle input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
.save-toggle span { width: 28px; height: 16px; display: block; position: relative; border-radius: 10px; background: #c8c4bb; transition: background .16s ease; }
.save-toggle span::after { content: ""; width: 12px; height: 12px; position: absolute; top: 2px; left: 2px; border-radius: 50%; background: var(--surface); transition: transform .16s ease; }
.save-toggle input:checked + span { background: var(--teal); }
.save-toggle input:checked + span::after { transform: translateX(12px); }
.save-toggle input:focus-visible + span { outline: 2px solid var(--yellow); outline-offset: 2px; }

.analysis-panel { min-width: 0; background: var(--surface); border: 1px solid var(--rule); }
.race-header { min-height: 172px; padding: 28px 27px 24px; display: grid; grid-template-columns: minmax(260px, 1.25fr) minmax(150px, .8fr) auto; align-items: center; gap: 26px; border-bottom: 1px solid var(--rule); }
.race-title { min-width: 0; }
.race-meta { display: flex; align-items: center; gap: 11px; }
.race-meta .kicker { margin: 0; }
.flag { width: 38px; height: 26px; flex: 0 0 auto; background: linear-gradient(to bottom, #bd1e2d 0 25%, #f1c94b 25% 75%, #bd1e2d 75%); }
.flag-azerbaijan { background: linear-gradient(to bottom, #00b5e2 0 33.333%, #ed2939 33.333% 66.666%, #009b48 66.666%); }
.audit-title { display: flex; align-items: center; gap: 10px; }
.audit-flag { width: 27px; height: 18px; display: inline-block; flex: 0 0 auto; background: linear-gradient(to bottom, #bd1e2d 0 25%, #f1c94b 25% 75%, #bd1e2d 75%); }
.audit-flag.flag-netherlands { background: linear-gradient(to bottom, #ae1c28 0 33.333%, #fff 33.333% 66.666%, #21468b 66.666%); }
.audit-flag.flag-italy { background: linear-gradient(to right, #009246 0 33.333%, #fff 33.333% 66.666%, #ce2b37 66.666%); }
.race-header h2 { margin: 9px 0 7px; font-size: 40px; line-height: .95; }
.race-header p:not(.kicker) { margin: 0; color: var(--muted); font-size: 12px; }
.divider { margin: 0 5px; color: var(--rule); }
.track-map { width: 100%; max-width: 142px; margin: 0; justify-self: center; }
.track-map img { width: 100%; display: block; opacity: .86; }
.track-facts { margin: 0; padding-left: 23px; display: grid; gap: 8px; border-left: 1px solid var(--rule); }
.track-facts div { display: grid; grid-template-columns: 86px auto; align-items: baseline; gap: 10px; }
.track-facts dd { margin: 0; font-size: 12px; white-space: nowrap; }

@media (max-width: 1350px) {
  .race-header { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .track-map { display: none; }
  .track-facts { padding: 12px 0 0; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; border-top: 1px solid var(--soft-rule); border-left: 0; }
  .track-facts div { display: block; }
  .track-facts dd { margin-top: 3px; }
}

.stage-strip { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); padding: 21px 34px 19px; border-bottom: 1px solid var(--rule); }
.stage-strip::before { display: none; }
.stage-strip .stage {
  min-height: 94px;
  padding: 0;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: 27px auto;
  justify-items: center;
  gap: 9px;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  font-weight: bold;
}
.stage-strip .stage.selected { color: var(--ink); }
.stage-strip .stage:not(.selected) { opacity: .55; }
.stage-strip .stage:not(:last-child)::after { content: ""; position: absolute; z-index: 0; top: 13px; left: calc(50% + 16px); width: calc(100% - 32px); height: 1px; background: #35322e; }
.stage-mark { width: 26px; height: 26px; position: relative; z-index: 2; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; box-shadow: 0 0 0 3px var(--surface); background: var(--surface); color: inherit; font-family: Georgia, 'Times New Roman', serif; font-size: 12px; font-style: normal; }
.stage-strip .stage.selected .stage-mark { border-color: var(--ink); background: var(--ink); color: #fff; }
.stage-strip .stage span { display: grid; gap: 2px; }
.stage-strip .stage b { font-family: Georgia, 'Times New Roman', serif; font-size: 14px; line-height: 1.05; }
.stage-strip .stage small { color: inherit; opacity: .72; font-size: 10px; font-weight: normal; }
.stage-strip .stage em { color: inherit; opacity: .58; font-family: Arial, Helvetica, sans-serif; font-size: 9px; font-style: normal; font-weight: normal; }

.lineup { padding: 27px; }
.section-heading { margin-bottom: 17px; display: flex; justify-content: space-between; gap: 24px; align-items: end; }
.section-heading h2 { margin: 0; font-size: 31px; line-height: 1; }
.section-heading > p { max-width: 240px; margin: 0; color: var(--muted); font-size: 11px; text-align: right; }
.recommendation-summary { margin: 0 0 16px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
.recommendation-summary[hidden] { display: none; }
.recommendation-summary > div { min-height: 69px; padding: 11px 9px; display: grid; align-content: start; gap: 3px; }
.recommendation-summary > div + div { border-left: 1px solid var(--rule); }
.recommendation-summary span, .recommendation-summary small { color: var(--muted); font-size: 9px; font-weight: bold; text-transform: uppercase; }
.recommendation-summary strong { color: var(--ink); font-family: Georgia, 'Times New Roman', serif; font-size: 15px; line-height: 1.05; overflow-wrap: normal; word-break: normal; }
.recommendation-summary > div:first-child strong { color: var(--teal); }
.recommendation-summary small { font-size: 8px; font-weight: normal; letter-spacing: 0; text-transform: none; }
.projected-value strong { white-space: nowrap; }
.projected-value strong i { font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-style: normal; }
.projected-value.up strong, .projected-value.up strong i { color: var(--teal); }
.projected-value.down strong, .projected-value.down strong i { color: var(--red); }
.lineup-views { width: min(250px, 100%); margin: 0 0 11px auto; display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--rule); }
.lineup-views button { min-height: 29px; padding: 0 7px; border: 0; border-right: 1px solid var(--rule); background: transparent; color: var(--muted); font-size: 9px; font-weight: bold; }
.lineup-views button:last-child { border-right: 0; }
.lineup-views button.selected { background: #eeece6; color: var(--ink); box-shadow: inset 0 -2px 0 var(--teal); }
.lineup-views button:disabled { cursor: default; opacity: .52; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th { padding: 0 6px 7px; color: var(--muted); font-size: 8px; font-weight: bold; letter-spacing: .55px; text-align: right; text-transform: uppercase; }
th:first-child, td:first-child { width: 5%; }
th:nth-child(2), td:nth-child(2) { width: 36%; text-align: left; }
th:nth-child(3), td:nth-child(3) { width: 17%; }
th:nth-child(4), td:nth-child(4) { width: 14%; }
th:nth-child(5), td:nth-child(5) { width: 13%; }
th:nth-child(6), td:nth-child(6) { width: 15%; }
td { padding: 7px 6px; border-top: 1px solid var(--rule); font-size: 10px; text-align: right; vertical-align: middle; }
td:nth-child(3) { font-family: Georgia, 'Times New Roman', serif; font-weight: bold; }
.position { color: var(--ink); text-align: left; font-family: Georgia, 'Times New Roman', serif; font-size: 15px; }
.asset-name { padding-left: 10px; }
.asset-name > i { width: 4px; height: 23px; display: inline-block; margin-right: 8px; vertical-align: middle; background: var(--team-color); }
.asset-name > span { display: inline-block; vertical-align: middle; }
.asset-name strong { display: block; color: #25211e; font-family: Georgia, 'Times New Roman', serif; font-size: 14px; line-height: 1.02; white-space: nowrap; }
.asset-name small { margin-top: 2px; font-size: 10px; }
td strong { font-size: 11px; }
.constructor td { background: #f7f5ef; }
.constructor.first-constructor td { border-top: 2px dotted #77726b; }
.lineup-empty td { padding: 22px 7px; color: var(--muted); font-size: 11px; font-style: italic; text-align: center; }
.points { color: var(--teal); }
.up { color: var(--teal) !important; }
.down { color: var(--red) !important; }
.trend-cell, .points-cell { position: relative; cursor: help; }
.trend-tooltip { width: 248px; padding: 10px; position: absolute; z-index: 12; top: calc(100% + 5px); right: 0; display: grid; gap: 5px; border: 1px solid #36332f; background: var(--ink); color: #fff; font-size: 10px; font-weight: normal; line-height: 1.25; text-align: left; opacity: 0; pointer-events: none; transform: translateY(-3px); transition: opacity .14s ease, transform .14s ease; visibility: hidden; }
.points-tooltip { width: 226px; padding: 10px; position: absolute; z-index: 12; top: calc(100% + 5px); left: 50%; display: grid; gap: 5px; border: 1px solid #36332f; background: var(--ink); color: #fff; font-size: 10px; font-weight: normal; line-height: 1.25; text-align: left; opacity: 0; pointer-events: none; transform: translate(-50%, -3px); transition: opacity .14s ease, transform .14s ease; visibility: hidden; }
.trend-tooltip > b, .points-tooltip > b { margin-bottom: 2px; color: var(--yellow); font-size: 9px; letter-spacing: .45px; text-transform: uppercase; }
.trend-tooltip > span, .points-tooltip > span { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.trend-tooltip em, .points-tooltip em { color: #fff; font-style: normal; font-weight: bold; }
.trend-tooltip i, .points-tooltip i { color: #e3e0d9; font-style: normal; }
.trend-cell:hover .trend-tooltip, .trend-cell:focus-visible .trend-tooltip, .trend-cell.show-table-tooltip .trend-tooltip { opacity: 1; transform: translateY(0); visibility: visible; }
.points-cell:hover .points-tooltip, .points-cell:focus-visible .points-tooltip, .points-cell.show-table-tooltip .points-tooltip { opacity: 1; transform: translate(-50%, 0); visibility: visible; }
.trend-cell:focus-visible, .points-cell:focus-visible { outline: 2px solid var(--yellow); outline-offset: -2px; }

.context-intro { margin: 0 0 19px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.context-list { margin: 0; border-top: 1px solid var(--rule); }
.context-list > div { padding: 13px 0 14px; border-bottom: 1px solid var(--rule); }
.context-list dt { color: var(--teal); font-size: 9px; letter-spacing: 1px; }
.context-list dd { margin: 5px 0 0; color: var(--ink); font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-weight: normal; line-height: 1.45; }
.transfer-detail { display: grid; gap: 5px; }
.transfer-detail span { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 7px; align-items: baseline; }
.transfer-detail b { font-size: 9px; letter-spacing: .7px; text-transform: uppercase; }
.transfer-out b { color: var(--red); }
.transfer-in b { color: var(--teal); }
.context-schedule { margin-top: 23px; }
.schedule { margin: 0; }
.schedule div { padding: 5px 0; display: flex; justify-content: space-between; border-bottom: 1px solid var(--rule); }
.schedule dd { margin: 0; font-family: Arial, Helvetica, sans-serif; font-size: 11px; }
.schedule time { font: inherit; }
.audit-teaser { margin-top: 24px; }
.audit-teaser p:not(.kicker) { margin: 0 0 12px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.audit-teaser button { width: 100%; min-height: 34px; padding: 0 9px; display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--ink); border-radius: 0; background: transparent; color: var(--ink); font-size: 10px; font-weight: bold; text-align: left; }
.audit-teaser button:hover, .audit-teaser button:focus-visible { background: #f0eee7; }
.audit-teaser button i { color: var(--teal); font-size: 16px; font-style: normal; }

.muted { margin-bottom: 24px; color: var(--muted); font-size: 12px; }
.metric-grid { margin-bottom: 28px; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.metric-grid > div { padding: 13px 10px 13px 0; }
.metric-grid > div + div { padding-left: 14px; border-left: 1px solid var(--rule); }
.metric-grid span, .metric-grid em { display: block; color: var(--muted); font-size: 10px; font-style: normal; font-weight: bold; text-transform: uppercase; }
.metric-grid strong { display: block; margin: 5px 0 2px; color: var(--teal); font-family: Georgia, 'Times New Roman', serif; font-size: 23px; line-height: 1; }
.metric-grid strong small { font-size: 11px; }
.shifts { padding-top: 1px; }
.shifts li { min-height: 51px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--soft-rule); }
.shifts li:last-child { border-bottom: 1px solid var(--soft-rule); }
.shifts b { font-family: Georgia, 'Times New Roman', serif; font-size: 14px; }
.audit-select-label { margin: 18px 0; }
.audit-select-label select { font-size: 11px; text-transform: none; letter-spacing: 0; }

.dialog { width: min(760px, calc(100vw - 32px)); max-height: min(760px, calc(100vh - 32px)); padding: 0; border: 1px solid var(--ink); border-radius: 0; color: var(--ink); background: var(--surface); box-shadow: 8px 8px 0 rgba(22, 21, 20, .14); }
.dialog::backdrop { background: rgba(25, 24, 22, .38); }
.dialog form { padding: 25px; }
.dialog header { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; padding-bottom: 16px; border-bottom: 1px solid var(--rule); }
.dialog h2 { margin: 0; font-size: 25px; }
.dialog footer { margin-top: 20px; display: flex; justify-content: flex-end; }
.dialog footer .primary { width: auto; min-width: 180px; }
.icon-button { width: 31px; height: 31px; display: grid; place-items: center; padding: 0; border: 1px solid var(--ink); border-radius: 0; background: transparent; font-size: 22px; line-height: 1; }
.picker-options { max-height: 480px; overflow: auto; padding-right: 8px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.picker-option { min-height: 56px; padding: 8px 10px; display: grid; grid-template-columns: 7px 1fr auto; align-items: center; gap: 9px; border: 1px solid var(--rule); border-radius: 0; background: transparent; color: var(--ink); text-align: left; }
.picker-option:hover, .picker-option.selected { border-color: var(--ink); background: #f1efe8; }
.picker-option .team-swatch { width: 6px; height: 30px; background: var(--team-color); }
.picker-option small { display: block; color: var(--muted); font-size: 10px; font-weight: normal; }
.picker-option b { color: var(--teal); font-family: Georgia, 'Times New Roman', serif; font-size: 12px; }
.audit-dialog { width: min(980px, calc(100vw - 32px)); }
.audit-tables { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.audit-tables h3 { margin: 4px 0 10px; font-size: 17px; }
.audit-tables table { table-layout: fixed; font-size: 10px; }
.audit-tables th { padding: 0 4px 6px; text-align: right; }
.audit-tables td { padding: 7px 4px; text-align: right; }
.audit-tables th:first-child, .audit-tables td:first-child { width: 50%; text-align: left; }
.audit-tables th:nth-child(2), .audit-tables td:nth-child(2) { width: 14%; text-align: right; }
.audit-tables th:nth-child(3), .audit-tables td:nth-child(3), .audit-tables th:nth-child(4), .audit-tables td:nth-child(4) { width: 18%; text-align: right; }
.audit-tables td:nth-child(3) { font-family: Georgia, 'Times New Roman', serif; font-weight: bold; }
.audit-tables td:first-child strong { display: block; font-size: 10px; white-space: nowrap; }
.audit-tables td:first-child small { margin-top: 1px; font-size: 9px; }
/* Use the available width on large desktop displays for a more readable workspace. */
@media (min-width: 1500px) {
  body { font-size: 15px; }

  .topbar { min-height: 72px; padding: 0 42px; gap: 46px; }
  .brand { font-size: 27px; }
  .brand-mark { width: 69px; height: 38px; }
  nav { height: 72px; gap: 28px; }
  nav a, .topbar-meta { font-size: 13px; }

  .workspace {
    width: min(1780px, 100%);
    min-height: calc(100vh - 72px);
    padding: 30px 42px 46px;
    grid-template-columns: minmax(270px, .9fr) minmax(0, 2.35fr) minmax(270px, .95fr);
    gap: 32px;
  }
  .site-footer { width: min(1780px, 100%); padding: 24px 42px 38px; }
  .team-panel { padding-right: 30px; }
  .context-panel { padding-left: 30px; }

  .kicker { font-size: 11px; }
  .team-panel h1 { font-size: 33px; }
  .context-panel h2 { font-size: 29px; }
  .team-settings label, .strategy-field, .audit-select-label { font-size: 11px; }
  .team-settings input, .strategy-field select, .audit-select-label select { height: 39px; font-size: 14px; }
  .chip-settings legend { font-size: 11px; }
  .chip-settings label { min-height: 37px; font-size: 11px; }
  .chip-settings input { width: 14px; height: 14px; }
  .section-label { font-size: 12px; }
  .section-label b, .text-button { font-size: 11px; }
  .team-list li { min-height: 55px; grid-template-columns: 11px 1fr auto; }
  .team-list i { width: 9px; height: 33px; }
  .team-list span { font-size: 14px; }
  .team-list small { font-size: 11px; }
  .team-list b { font-size: 14px; }
  .primary, .quiet, .save-toggle { min-height: 48px; font-size: 14px; }

  .race-header { min-height: 196px; padding: 32px 34px 28px; grid-template-columns: minmax(0, 1.35fr) minmax(118px, .5fr) minmax(150px, .65fr); gap: 22px; }
  .race-header h2 { font-size: 44px; }
  .race-header p:not(.kicker) { font-size: 14px; }
  .flag { width: 42px; height: 29px; }
  .track-map { max-width: 158px; }
  .track-facts { padding-left: 28px; gap: 10px; }
  .track-facts div { grid-template-columns: 96px auto; }
  .track-facts dt { font-size: 11px; }
  .track-facts dd { font-size: 14px; }

  .stage-strip { padding: 25px 40px 22px; }
  .stage-strip .stage { min-height: 102px; grid-template-rows: 30px auto; font-size: 13px; }
  .stage-mark { width: 29px; height: 29px; font-size: 13px; }
  .stage-strip .stage:not(:last-child)::after { top: 14px; left: calc(50% + 18px); width: calc(100% - 36px); }
  .stage-strip .stage b { font-size: 16px; }
  .stage-strip .stage small { font-size: 11px; }
  .stage-strip .stage em { font-size: 10px; }

  .lineup { padding: 32px 34px; }
  .section-heading { margin-bottom: 20px; }
  .section-heading h2 { font-size: 36px; }
  .section-heading > p { max-width: 280px; font-size: 12px; }
  .recommendation-summary { margin-bottom: 19px; }
  .recommendation-summary > div { min-height: 78px; padding: 13px 11px; gap: 4px; }
  .recommendation-summary span { font-size: 10px; }
  .recommendation-summary strong { font-size: 18px; }
  .recommendation-summary small { font-size: 9px; }
  .lineup-views { width: min(280px, 100%); margin-bottom: 13px; }
  .lineup-views button { min-height: 33px; font-size: 10px; }
  th { padding: 0 8px 9px; font-size: 9px; }
  td { padding: 9px 8px; font-size: 12px; }
  .position { font-size: 17px; }
  .asset-name > i { width: 5px; height: 27px; margin-right: 10px; }
  .asset-name strong { font-size: 16px; }
  .asset-name small { font-size: 11px; }
  td strong { font-size: 13px; }

  .context-intro { font-size: 13px; }
  .context-list > div { padding: 15px 0 16px; }
  .context-list dt { font-size: 10px; }
  .context-list dd, .schedule dd { font-size: 12px; }
  .transfer-detail b { font-size: 10px; }
  .audit-teaser p:not(.kicker) { font-size: 12px; }
  .audit-teaser button { min-height: 39px; font-size: 11px; }
}

/* High-density laptop displays need the large type, but not the full wide-screen grid. */
@media (min-width: 1500px) and (max-width: 1650px) {
  .workspace {
    padding-right: 30px;
    padding-left: 30px;
    grid-template-columns: minmax(240px, .75fr) minmax(0, 2.1fr) minmax(250px, .8fr);
    gap: 24px;
  }
  .site-footer { padding-right: 30px; padding-left: 30px; }
  .team-panel { padding-right: 24px; }
  .context-panel { padding-left: 24px; }

  .race-header { grid-template-columns: minmax(0, 1fr) minmax(160px, .58fr); }
  .track-map { display: none; }
  .track-facts { padding-left: 20px; }

  .recommendation-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .recommendation-summary > div:nth-child(n + 4) { border-top: 1px solid var(--rule); }
  .recommendation-summary > div:nth-child(4) { border-left: 0; }
}

@media (max-width: 1160px) {
  .workspace { padding: 18px 12px 28px; grid-template-columns: 190px minmax(0, 1fr) 195px; gap: 12px; }
  .site-footer { padding: 18px 12px 28px; }
  .team-panel { padding-right: 12px; }
  .context-panel { padding-left: 12px; }
  .team-panel h1 { font-size: 25px; }
  .context-panel h2 { font-size: 22px; }
  .context-intro { font-size: 11px; }
  .context-list dd { font-size: 10px; }
  .recommendation-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .recommendation-summary > div:nth-child(n + 4) { border-top: 1px solid var(--rule); }
  .recommendation-summary > div:nth-child(4) { border-left: 0; }
}

@media (max-width: 980px) {
  .workspace { grid-template-columns: 220px minmax(480px, 1fr); gap: 22px; padding: 22px 24px 32px; }
  .team-panel { padding-right: 22px; }
  .context-panel { grid-column: 2; padding: 24px 0 0; display: grid; grid-template-columns: minmax(160px, .8fr) minmax(220px, 1.2fr); column-gap: 28px; border-top: 1px solid var(--rule); border-left: 0; }
  .context-panel > .kicker, .context-panel > h2, .context-panel > .context-intro { grid-column: 1; }
  .context-list { grid-column: 2; grid-row: 1 / span 4; margin-top: 0; }
  .context-schedule { grid-column: 2; grid-row: 5; margin-top: 20px; }
}

@media (max-width: 820px) {
  .topbar { min-height: 58px; padding: 0 18px; gap: 12px; position: sticky; z-index: 20; top: 0; }
  .topbar-meta, nav a:not(.active) { display: none; }
  nav { margin-left: auto; }
  .brand { gap: 7px; font-size: 20px; }
  .brand-mark { width: 48px; height: 28px; }
  .mobile-actions { margin-left: auto; display: grid; grid-template-columns: auto auto; gap: 6px; }
  .mobile-actions button { min-width: 52px; min-height: 32px; padding: 0 9px; border: 1px solid var(--ink); background: var(--surface); color: var(--ink); font-size: 10px; font-weight: bold; }
  .mobile-actions button:last-child { background: var(--ink); color: #fff; }
  .mobile-actions button:disabled { border-color: var(--rule); background: #e5e2da; color: var(--muted); cursor: not-allowed; }
  .workspace { padding: 12px 18px 22px; display: flex; flex-direction: column; }
  .site-footer { padding: 18px; display: block; }
  .site-footer section + section { margin-top: 18px; }
  .team-panel, .context-panel { padding: 0; border: 0; }
  .team-panel { order: 2; margin: 16px 0 0; border-top: 1px solid var(--rule); }
  .analysis-panel { order: 1; margin: 0; overflow: hidden; }
  .context-panel { order: 3; display: block; margin-top: 22px; border-top: 1px solid var(--rule); padding-top: 22px; }
  .mobile-team-summary { min-height: 61px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; }
  .mobile-team-summary .kicker { margin-bottom: 3px; }
  .mobile-team-summary strong { display: block; font-size: 12px; line-height: 1.25; }
  .mobile-team-summary button { width: 30px; height: 30px; display: none; flex: 0 0 auto; padding: 0; border: 1px solid var(--ink); background: transparent; color: var(--ink); font-size: 21px; line-height: 1; }
  .team-panel:not(.mobile-team-expanded) > :not(.mobile-team-summary) { display: none; }
  .team-panel.mobile-team-expanded .mobile-team-summary { border-bottom: 1px solid var(--rule); }
  .team-panel.mobile-team-expanded .mobile-team-summary button { display: grid; place-items: center; }
  .team-panel.mobile-team-expanded > .kicker { margin-top: 18px; }
  .team-panel.mobile-team-expanded h1 { margin-bottom: 20px; font-size: 26px; }
  .team-panel.mobile-team-expanded section { margin-bottom: 18px; }
  .analysis-panel .race-header { min-height: 0; padding: 20px; }
  .race-header h2 { margin-top: 8px; font-size: 34px; }
  .race-header p:not(.kicker) { font-size: 11px; }
  .stage-strip { padding: 14px 12px 12px; }
  .stage-strip .stage { min-height: 53px; grid-template-rows: 25px auto; gap: 5px; }
  .stage-strip .stage:not(:last-child)::after { top: 12px; left: calc(50% + 14px); width: calc(100% - 28px); }
  .stage-mark { width: 24px; height: 24px; font-size: 11px; }
  .stage-strip .stage b { font-size: 0; line-height: 1.03; }
  .stage-strip .stage b::after { content: attr(data-mobile-label); font-size: 11px; }
  .stage-strip .stage small, .stage-strip .stage em { display: none; }
  .lineup { padding: 20px 16px 16px; }
  .section-heading { margin-bottom: 14px; display: block; }
  .section-heading h2 { font-size: 29px; }
  .section-heading > p { max-width: none; margin-top: 8px; font-size: 10px; text-align: left; }
  .recommendation-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 14px; }
  .recommendation-summary > div { min-height: 62px; padding: 9px; }
  .recommendation-summary > div:nth-child(odd) { border-left: 0; }
  .recommendation-summary > div:nth-child(n + 3) { border-top: 1px solid var(--rule); }
  .recommendation-summary strong { font-size: 16px; }
  .lineup-views { width: 100%; margin-bottom: 12px; }
  .lineup-views:has(button:disabled) { display: none; }
  .lineup table thead { display: none; }
  .lineup table, .lineup tbody { display: block; }
  .lineup table tr:not(.lineup-empty) { margin-top: 8px; padding: 10px 0; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; column-gap: 10px; border-top: 1px solid var(--rule); }
  .lineup table td { min-width: 0; padding: 0; border: 0; font-size: 11px; }
  .lineup table td:nth-child(1) { display: none; }
  .lineup table td:nth-child(2) { width: auto; grid-row: 1 / span 2; }
  .lineup table td:nth-child(3), .lineup table td:nth-child(6) { align-self: start; font-size: 14px; }
  .lineup table td:nth-child(3)::before { content: "Pts "; color: var(--muted); font-family: Arial, Helvetica, sans-serif; font-size: 9px; font-weight: bold; }
  .lineup table td:nth-child(4), .lineup table td:nth-child(5) { margin-top: 7px; color: var(--muted); font-size: 10px; }
  .lineup table td:nth-child(4)::before { content: "Price "; }
  .lineup table td:nth-child(5)::before { content: "Pts/$M "; }
  .lineup table .asset-name { padding-left: 0; }
  .lineup table .asset-name > i { height: 28px; margin-right: 7px; }
  .lineup table .asset-name strong { font-size: 15px; white-space: nowrap; }
  .lineup table .asset-name small { font-size: 10px; }
  .lineup-empty td { display: block; padding: 22px 7px !important; border-top: 1px solid var(--rule) !important; }
  .trend-tooltip { right: 0; width: min(248px, calc(100vw - 70px)); }
  .points-tooltip { left: auto; right: 0; width: min(226px, calc(100vw - 70px)); transform: translateY(-3px); }
  .points-cell:hover .points-tooltip, .points-cell:focus-visible .points-tooltip, .points-cell.show-table-tooltip .points-tooltip { transform: translateY(0); }
  .context-schedule { margin-top: 20px; }
  .track-facts { display: none; }
  .stage-strip, .lineup { min-width: 0; }
  .picker-options, .audit-tables { grid-template-columns: 1fr; }
  .dialog { width: calc(100vw - 28px); max-height: calc(100vh - 28px); }
  .dialog form { padding: 18px; }
  .picker-options { max-height: min(52vh, 430px); }
  .cookie-banner { width: calc(100vw - 28px); padding: 18px; display: grid; gap: 14px; }
  .rating-prompt { right: 14px; bottom: 14px; width: calc(100vw - 28px); }
}
