/* f1gures - page styles, stage 3 group b) Standings (Sharp).
   Layout only: every surface, row, table, chart frame and control is a library
   component (src/components/sharp/, styled in css/sharp.css). This file places
   them on the two standings pages and the shared ChampSection block. Tokens
   only, no hex. Only the owning group edits this file (docs/redesign/inventory.md
   section 4). */

.std-page { display: grid; gap: 16px; min-width: 0; }
.std-page > * { min-width: 0; }
.std-page .s-sh { margin-top: 12px; }

/* Full table: LeaderList rows on phones, the DataTable (mobile="rows" hides it
   under 720px) on desktop. CSS-gated so SSR and hydration agree. */
.std-rows { display: none; }
@media (max-width: 720px) { .std-rows { display: block; } }

.std-cell { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
.std-cell:hover b { text-decoration: underline; text-underline-offset: 3px; }
.std-cell-first { color: var(--fg-2); }
.std-cell-flag { width: 18px; height: 12px; object-fit: cover; flex: none; }
.std-cell-code { font-family: var(--f-mono); font-size: 11.5px; color: var(--fg-3); }
.std-cell-link { color: inherit; text-decoration: none; }
.std-cell-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.std-cell-drivers { display: inline-flex; gap: 10px; font-family: var(--f-mono); font-size: 12.5px; }

.std-table-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: -8px; }

/* Championship leaders (ChampSection, also used on home): LeaderHero takes two
   of three columns on desktop, the P2/P3 Podium the third. On phones the full
   list sits right below, so the Podium rows are left out there. */
.champ-s { display: grid; gap: 12px; min-width: 0; }
.champ-s-grid { align-items: start; }
@media (min-width: 721px) { .champ-s-hero { grid-column: span 2; } }
@media (max-width: 720px) { .std-page .champ-s-rest { display: none; } }
/* The P2 to P5 rows fill the hero's height beside it on desktop. */
@media (min-width: 721px) {
  .std-page .champ-s-grid { align-items: stretch; }
  .std-page .champ-s-rest { display: grid; grid-auto-rows: 1fr; align-content: stretch; }
}

/* Phone (app layout): a compact leader card, then the full table straight
   away. The big hero is desktop only; the trivia board and the rest of the
   page follow the table. CSS-gated so SSR and hydration agree. */
.std-page .std-lead { display: none; }
.std-trivia { min-width: 0; }
/* The board spans the content width, aligned with the table (app.css insets
   it by 36px each side for the old layout). */
.std-trivia .trivia { margin: 0; max-width: none; }
.std-rest { display: grid; gap: 16px; min-width: 0; }
.std-rest > * { min-width: 0; }
@media (max-width: 720px) {
  /* Tabs first, straight under the toolbar; the sub line and the "All
     drivers" button follow them. */
  .std-page > .s-tabs { order: -1; }
  .std-page .std-hero { display: none; }
  .std-page .std-lead { display: block; }
  .std-trivia { order: 1; }
  .std-rest { order: 2; }
}

/* Points progression: the scrub hit area sits exactly over the Recharts plot
   (left/right/top set inline from the chart margins). */
.std-chart-plot { position: relative; width: 100%; }
.std-chart-scrub { position: absolute; bottom: 0; touch-action: pan-y; cursor: crosshair; }
.std-chart-scrub:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.std-chart-foot { display: flex; justify-content: flex-end; padding: 0 14px 10px; }
.std-chart .s-tbl-wrap { margin: 0 14px 14px; }

/* Head to head */
.std-h2h .s-card-body { display: grid; gap: 16px; }
.std-h2h-pickers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.std-h2h-head { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: center; }
.std-h2h-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.std-h2h-who--b { flex-direction: row-reverse; text-align: right; }
.std-h2h-name { display: grid; gap: 2px; min-width: 0; }
.std-h2h-name .s-eyebrow { display: inline-flex; align-items: center; gap: 6px; }
.std-h2h-who--b .std-h2h-name .s-eyebrow { justify-content: flex-end; }
.std-h2h-name b { font-family: var(--f-display); font-weight: 800; font-size: 26px; line-height: 0.95; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.std-h2h-name small { font-size: 12.5px; color: var(--fg-3); }
.std-h2h-vs { font-family: var(--f-display); font-weight: 800; font-size: 22px; color: var(--fg-3); }
.std-h2h-duels { display: grid; gap: 12px; }
@media (max-width: 720px) {
  .std-h2h-pickers { grid-template-columns: 1fr; }
  .std-h2h-name b { font-size: 20px; }
  .std-h2h-who .s-face { display: none; }
}
