/* Championship v2: podium with photos, drivers / constructors table, season picker */
#tab-standings {
  --h-card: #ffffff; --h-ink: #111317; --h-ink-2: #5d6470; --h-ink-3: #9aa1ab; --h-line: #e7e9ee;
  --h-red: #e10600; --h-seg: #eceef2;
}
[data-theme="dark"] #tab-standings {
  --h-card: #17191d; --h-ink: #f2f3f5; --h-ink-2: #a6acb6; --h-ink-3: #6f7680; --h-line: #262a31;
  --h-seg: #202329;
}
#tab-standings .s2 { font-family: Manrope, Inter, system-ui, sans-serif; color: var(--h-ink); padding-bottom: 8px; }
#tab-standings .num { font-variant-numeric: tabular-nums; font-family: "JetBrains Mono", ui-monospace, monospace; }
#tab-standings .s2 button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
#tab-standings .tab-header { display: flex; align-items: center; }
#tab-standings .s2-year, #tab-results .s2-year { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; background: var(--h-card);
  border: 1px solid var(--h-line); border-radius: 999px; padding: 7px 12px; font: 700 14px Manrope, Inter, sans-serif;
  color: var(--h-ink); cursor: pointer; }
#tab-standings .s2-year svg, #tab-results .s2-year svg { width: 14px; height: 14px; color: var(--h-red); }

#tab-standings .s2-seg { display: flex; background: var(--h-seg); border-radius: 14px; padding: 4px; gap: 4px; }
#tab-standings .s2-seg button { flex: 1; padding: 9px 0; border-radius: 10px; font-size: 14px; font-weight: 700; color: var(--h-ink-2); }
#tab-standings .s2-seg button.active { background: var(--h-card); color: var(--h-ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
#tab-standings .s2-sub { font-size: 13px; color: var(--h-ink-2); font-weight: 600; margin: 14px 2px 10px; }
#tab-standings .s2-empty { padding: 40px 0; text-align: center; color: var(--h-ink-2); font-weight: 600; font-family: Manrope, Inter, sans-serif; }

/* Avatar: photo on team-colour disc, or initials */
#tab-standings .s2-ava { width: 42px; height: 42px; border-radius: 50%; flex: 0 0 auto; overflow: hidden; position: relative;
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--tc) 55%, #fff) 0%, var(--tc) 75%);
  display: flex; align-items: center; justify-content: center; }
#tab-standings .s2-ava img { width: 100%; height: 100%; object-fit: cover; object-position: top; transform: scale(1.15) translateY(6%); }
#tab-standings .s2-ava span { color: #fff; font-weight: 800; font-size: 12px; letter-spacing: .03em; }
#tab-standings .s2-ava.lg { width: 78px; height: 78px; }
#tab-standings .s2-ava.lg span { font-size: 18px; }
#tab-standings .s2-ava.sm { width: 32px; height: 32px; box-shadow: 0 0 0 2px var(--h-card); }
#tab-standings .s2-ava.sm span { font-size: 9px; }

/* Podium */
#tab-standings .s2-podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 8px; align-items: end; margin-bottom: 14px; }
#tab-standings .s2-pod { background: var(--h-card); border: 1px solid var(--h-line); border-radius: 20px; padding: 14px 6px 12px;
  display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; overflow: hidden; cursor: pointer; }
#tab-standings .s2-pod::before { content: ""; position: absolute; inset: 0 0 auto; height: 58%;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tc) 28%, transparent), transparent); }
#tab-standings .s2-pod > * { position: relative; }
#tab-standings .s2-pod.p1 { padding-top: 20px; padding-bottom: 16px; }
#tab-standings .s2-pod.p1 .s2-ava.lg { width: 92px; height: 92px; }
#tab-standings .s2-pod .pos { position: absolute; top: 8px; left: 10px; font-size: 13px; font-weight: 700; color: var(--h-ink-2); }
#tab-standings .s2-pod.p1 .pos { color: var(--h-red); }
#tab-standings .s2-pod .nm { font-size: 14px; font-weight: 800; margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
#tab-standings .s2-pod .pt { font-size: 18px; font-weight: 700; margin-top: 2px; }
#tab-standings .s2-pod.p1 .pt { font-size: 22px; }

/* Rows */
#tab-standings .s2-list { display: flex; flex-direction: column; gap: 8px; }
#tab-standings .s2-row, #tab-standings .s2-team { background: var(--h-card); border: 1px solid var(--h-line); border-radius: 16px; }
#tab-standings .s2-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
#tab-standings .s2-row[data-code] { cursor: pointer; }
#tab-standings .s2-row .pos, #tab-standings .s2-team .pos { width: 22px; flex: 0 0 auto; font-size: 14px; font-weight: 700; color: var(--h-ink-2); text-align: center; }
#tab-standings .mid { flex: 1; min-width: 0; }
#tab-standings .mid .nm { font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#tab-standings .mid .tm { font-size: 12px; color: var(--h-ink-2); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#tab-standings .bar { height: 4px; background: var(--h-line); border-radius: 4px; margin-top: 6px; overflow: hidden; }
#tab-standings .bar i { display: block; height: 100%; background: var(--tc); border-radius: 4px; }
#tab-standings .pts { text-align: right; flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; }
#tab-standings .pts b { font-size: 17px; font-weight: 700; }
#tab-standings .pts span { font-size: 11px; color: var(--h-ink-3); font-weight: 600; }

#tab-standings .s2-team { padding: 12px; border-left: 4px solid var(--tc); }
#tab-standings .s2-team .top { display: flex; align-items: center; gap: 10px; }
#tab-standings .s2-team .faces { display: flex; }
#tab-standings .s2-team .faces .s2-ava + .s2-ava { margin-left: -10px; }
#tab-standings .s2-team .bar { margin-left: 32px; }
#tab-standings .s2-team .wins { margin: 6px 0 0 32px; font-size: 11px; font-weight: 700; color: var(--h-ink-2); }

/* Season picker sheet */
.s2-years-title { font: 800 20px Manrope, Inter, sans-serif; margin: 4px 0 12px; }
.s2-years { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.s2-years button { padding: 11px 0; border-radius: 12px; border: 1px solid var(--h-line, #e7e9ee); background: transparent;
  color: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.s2-years button.active { background: #e10600; border-color: #e10600; color: #fff; }

/* Wikipedia photos are ordinary pictures, not cut-out portraits: no zoom, keep the face */
.s2-ava img[src*="wikimedia.org"], .r2-face img[src*="wikimedia.org"] { transform: none; object-position: 50% 22%; }

/* team cards: the drivers line wraps instead of being cut (three-driver teams) */
#tab-standings .s2-team .mid .tm { white-space: normal; line-height: 1.35; }
