/* The page kit: the parts a stats page is built from, shared by the team and
 * player pages and meant for the next ones. Markup lives in
 * templates/_page_kit.html; colours come from the palette variables, plus
 * --team and --team-accent set on .pg-page.
 *
 * No JavaScript: the season picker is a <details> of links, the Basic /
 * Advanced columns a radio pair and "Show all" a checkbox, all read by :has().
 */


/* Capped and centred like the game page. */
.pg-page { max-width: 1180px; margin-inline: auto; }

/* The banner: a wash of the team colour behind the logo and the readable
   accent down the left edge, both resolved server-side. */
.pg-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  padding: 28px 32px;
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--team-accent, var(--border-light));
  border-radius: 0 14px 14px 0;
  background:
    radial-gradient(ellipse 420px 240px at 90px 50%,
      color-mix(in srgb, var(--team) 30%, transparent), transparent 70%),
    var(--bg-dark);
}

.pg-banner-logo { width: 120px; height: 120px; object-fit: contain; }

.pg-kicker {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.pg-title { margin: 2px 0 0; font-size: 2.6rem; font-weight: 800; line-height: 1.05; }

.pg-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 10px 0 0;
  font-size: 0.92rem;
  color: var(--text-secondary);
}
.pg-meta b { color: var(--text-primary); font-weight: 600; }

/* The season picker: a disclosure of season links. */
.pg-picker { position: relative; display: inline-block; margin-top: 12px; }
.pg-picker > summary {
  padding: 6px 12px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: var(--bg-dark);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.pg-picker > summary::-webkit-details-marker { display: none; }
.pg-picker > summary::after { content: " ▾"; color: var(--text-muted); }
.pg-picker-list {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  display: grid;
  grid-template-columns: repeat(6, auto);
  gap: 2px;
  max-height: 260px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: var(--bg-card);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.pg-picker-list a {
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.pg-picker-list a:hover { background: var(--bg-hover); text-decoration: none; }
.pg-picker-list a[aria-current] { background: var(--accent-blue); }

.pg-banner-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.pg-banner-big { font-family: var(--font-mono); font-size: 3rem; font-weight: 800; line-height: 1; }
.pg-banner-sub { font-size: 0.9rem; color: var(--text-secondary); }

.pg-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-blue) 16%, transparent);
  color: var(--accent-blue);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}
.pg-pill.is-champ {
  background: color-mix(in srgb, var(--accent-gold) 16%, transparent);
  color: var(--accent-gold);
}

.pg-subline {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  margin: 14px 4px 24px;
  font-size: 0.86rem;
  color: var(--text-secondary);
}
.pg-subline b { color: var(--text-primary); font-family: var(--font-mono); }
/* Under the cards it reads as their footnote, not a section of its own. */
.pg-cards + .pg-subline { margin: -26px 4px 32px; }
/* Tabs straight under a banner still need air. */
.pg-banner + .pm-tabs { margin-top: 24px; }

/* A person's name: the first name small above the last. */
.pg-title-small {
  display: block;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* A cluster of pills on the banner's right. */
.pg-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: 320px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pg-status::before { content: "● "; color: var(--accent-green); }

/* A row of choices above a section, right-aligned. */
.pg-toolbar { display: flex; justify-content: flex-end; margin: -8px 0 18px; }

/* Two sections side by side, stacked when narrow. */
.pg-split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; }

/* Links to other pages as cards: a logo, a name and a line. */
.pg-stints {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pg-stint {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--text-primary);
  text-decoration: none;
}
.pg-stint:hover { background: var(--bg-hover); text-decoration: none; }
.pg-stint img { width: 34px; height: 34px; object-fit: contain; }
.pg-stint b { display: block; }
.pg-stint span span { font-size: 0.85rem; color: var(--text-secondary); }

/* Facts: a label, a value and a note, three to a row. */
.pg-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pg-fact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: var(--bg-card);
}
.pg-fact span { font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary); }
.pg-fact strong { font-size: 1.2rem; }
.pg-fact em { font-size: 0.85rem; font-style: normal; color: var(--text-secondary); }

/* Measurements: a value over its label, in a row. */
.pg-measures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  margin: 0;
}
.pg-measures div {
  padding: 12px 6px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: var(--bg-card);
  text-align: center;
}
.pg-measures dd { margin: 0 0 2px; font-family: var(--font-mono); font-size: 1.3rem; font-weight: 700; }
.pg-measures dt {
  order: 2;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.pg-measures div { display: flex; flex-direction: column-reverse; }

.pg-page .pm-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
  font-size: 1.3rem;
  font-weight: 700;
}
.pg-page .pm-heading::after { content: ""; flex: 1; height: 1px; background: var(--border-light); }

.pg-section { margin-bottom: 40px; min-width: 0; }

/* Season cards, each with its league rank. */
.pg-cards {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 40px;
}
.pg-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: var(--bg-card);
}
.pg-card strong { font-family: var(--font-mono); font-size: 1.7rem; font-weight: 800; }
.pg-card span { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary); }
.pg-card em { margin-top: auto; padding-top: 8px; font-size: 0.78rem; font-style: normal; font-weight: 700; color: var(--text-secondary); }
.pg-card em.is-high { color: var(--accent-green); }

/* Results: one tile per game, edged by the result, in two rows. --cols is
   half the tiles, so a playoff run narrows the tiles instead of starting a
   third row. */
.pg-tiles-wrap { container-type: inline-size; }
.pg-tiles {
  display: grid;
  grid-template-columns: repeat(var(--cols, 9), minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pg-tile-in {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  height: 100%;
  padding: 10px 2px;
  border: 1px solid var(--border-light);
  border-top: 3px solid var(--border-light);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.8rem;
  text-decoration: none;
}
a.pg-tile-in:hover { background: var(--bg-hover); text-decoration: none; }
.pg-tile.is-w .pg-tile-in { border-top-color: var(--accent-green); }
.pg-tile.is-l .pg-tile-in { border-top-color: var(--accent-red); }
.pg-tile.is-t .pg-tile-in { border-top-color: var(--text-muted); }
.pg-tile.is-post .pg-tile-in { background: color-mix(in srgb, var(--accent-blue) 10%, var(--bg-card)); }
.pg-tile.is-bye .pg-tile-in { justify-content: center; color: var(--text-muted); }
.pg-tile img { width: 34px; height: 34px; object-fit: contain; }
.pg-tile-wk { color: var(--text-secondary); white-space: nowrap; }
.pg-tile-res { font-weight: 800; font-size: 0.95rem; }
.pg-tile-score, .pg-tile-opp { font-family: var(--font-mono); color: var(--text-secondary); }
/* A player's stat line under the result. */
.pg-tile-line { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-secondary); text-align: center; }

/* Too narrow for two rows: wrap, at a size the scores still fit. */
@container (max-width: 520px) {
  .pg-tiles { grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); }
  .pg-tile-in { padding: 7px 1px; font-size: 0.72rem; }
  .pg-tile img { width: 24px; height: 24px; }
  .pg-tile-res { font-size: 0.85rem; }
  /* Tiles that carry a stat line need the width: two across. */
  .pg-tiles.is-lines { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.pg-accents { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.pg-accents.is-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pg-accent {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--team-accent, var(--accent-blue));
  background: var(--bg-card);
}
.pg-accent-k { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-secondary); }
.pg-accent-name { font-weight: 700; color: var(--text-primary); }
a.pg-accent-name:hover { color: var(--accent-blue); text-decoration: none; }
.pg-accent-line { font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-secondary); }
.pg-accent-line > span { white-space: nowrap; }

/* Margin by game: one bar per game, up for a win and down for a loss, in
   HTML so the numbers stay sharp at any width. --h is the margin as a share
   of the widest one; a bar's half of the plot keeps 20px clear for its
   number. */
.pg-chart {
  margin: 0;
  padding: 14px 16px 10px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: var(--bg-card);
}
.pg-chart figcaption {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.pg-chart figcaption i { display: inline-block; width: 9px; height: 9px; margin-left: 8px; }
.pg-chart figcaption i.is-gold { border-radius: 50%; background: var(--accent-gold); }
.pg-chart figcaption i.is-blue { border-radius: 50%; background: var(--accent-blue); }
.pg-chart i.is-win { background: var(--accent-green); }
.pg-chart i.is-loss { background: var(--accent-red); }

.pg-bars {
  display: grid;
  grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}
.pg-bar.is-post-start { border-left: 1px dashed var(--border-light); }
.pg-bar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding-bottom: 4px;
  border-radius: 6px;
  color: var(--text-primary);
  text-decoration: none;
}
.pg-bar a:hover { background: var(--bg-hover); text-decoration: none; }

/* The hover card: what the bar is, over the top of the plot. Centred on its
   bar, but held inside the chart at either edge. Keyboard focus shows it too;
   a screen reader has the link's aria-label instead. */
.pg-bar a { position: relative; }
.pg-bar a[data-tip]:hover::after,
.pg-bar a[data-tip]:focus-visible::after {
  content: attr(data-tip);
  position: absolute;
  top: 4px;
  left: 50%;
  z-index: 10;
  padding: 6px 10px;
  border: 1px solid var(--border-medium);
  border-radius: 6px;
  background: var(--bg-card);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
  white-space: pre;
  transform: translateX(-50%);
  pointer-events: none;
}
.pg-bar:nth-child(-n + 2) a[data-tip]::after { left: 0; transform: none; }
.pg-bar:nth-last-child(-n + 2) a[data-tip]::after { left: auto; right: 0; transform: none; }

.pg-bar-plot { position: relative; width: 100%; height: 220px; }
/* The zero line, drawn by every column so it runs the full width. */
.pg-bar-plot::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  border-top: 1px solid var(--border-light);
}
.pg-bar-fill {
  position: absolute;
  left: 22%;
  right: 22%;
  height: calc((50% - 20px) * var(--h));
}
.pg-bar.is-w .pg-bar-fill { bottom: 50%; border-radius: 3px 3px 0 0; background: var(--accent-green); }
.pg-bar.is-l .pg-bar-fill { top: 50%; border-radius: 0 0 3px 3px; background: var(--accent-red); }
.pg-bar.is-t .pg-bar-fill { top: calc(50% - 1px); height: 3px; background: var(--text-muted); }

.pg-bar-num {
  position: absolute;
  left: 0;
  right: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}
.pg-bar.is-w .pg-bar-num { bottom: calc(50% + (50% - 20px) * var(--h) + 3px); color: var(--accent-green); }
.pg-bar.is-l .pg-bar-num { top: calc(50% + (50% - 20px) * var(--h) + 3px); color: var(--accent-red); }
.pg-bar.is-t .pg-bar-num { bottom: calc(50% + 6px); color: var(--text-secondary); }

.pg-bar img { width: 22px; height: 22px; object-fit: contain; }
.pg-bar-opp, .pg-bar-label { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-secondary); }
.pg-bar-label .is-short { display: none; }
.pg-bar-num .is-short { display: none; }

/* A rising chart: the zero line at the foot, bars up from it in the team's
   accent, a faded bar for a partial season, award dots over the number. */
.pg-bars.is-rising .pg-bar-plot::before { top: auto; bottom: 0; }
.pg-bars.is-rising .pg-bar-fill {
  bottom: 0;
  height: calc((100% - 40px) * var(--h));
  border-radius: 3px 3px 0 0;
  background: var(--team-accent, var(--accent-blue));
}
.pg-bars.is-rising .is-dim .pg-bar-fill { opacity: 0.45; }
.pg-bars.is-rising .pg-bar-num { bottom: calc((100% - 40px) * var(--h) + 3px); color: var(--text-primary); }
/* A chart with a switch: one list of bars per stat, the checked radio's
 * shown. Positional, so up to six stats. */
.pg-chart.is-switched .pg-bars { display: none; }
.pg-chart.is-switched:has(.pg-chart-switch input:nth-of-type(1):checked) .pg-bars:nth-of-type(1) { display: grid; }
.pg-chart.is-switched:has(.pg-chart-switch input:nth-of-type(2):checked) .pg-bars:nth-of-type(2) { display: grid; }
.pg-chart.is-switched:has(.pg-chart-switch input:nth-of-type(3):checked) .pg-bars:nth-of-type(3) { display: grid; }
.pg-chart.is-switched:has(.pg-chart-switch input:nth-of-type(4):checked) .pg-bars:nth-of-type(4) { display: grid; }
.pg-chart.is-switched:has(.pg-chart-switch input:nth-of-type(5):checked) .pg-bars:nth-of-type(5) { display: grid; }
.pg-chart.is-switched:has(.pg-chart-switch input:nth-of-type(6):checked) .pg-bars:nth-of-type(6) { display: grid; }
.pg-chart .pg-chart-switch { flex-wrap: wrap; margin: -3px 0 0; }
.pg-chart .pg-chart-switch label { text-transform: none; letter-spacing: 0; }
.pg-chart figcaption:has(.pg-chart-switch) { align-items: center; gap: 12px; }

.pg-bar-marks { display: flex; justify-content: center; gap: 3px; margin-bottom: 3px; }
.pg-bar-marks i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-gold); }
.pg-bar-marks i.is-blue { background: var(--accent-blue); }

/* Tables: the shared sr-table, with plain-text headers. */
.pg-table th { padding: 8px 10px; font-size: 0.75rem; color: var(--text-secondary); text-align: right; }
.pg-table th:first-child { text-align: left; }
.pg-table tfoot th, .pg-table tfoot td {
  border-top: 2px solid color-mix(in srgb, var(--accent-blue) 35%, transparent);
  font-weight: 700;
  color: var(--text-primary);
}
.pg-table tfoot th { font-size: 0.85rem; text-align: left; }
.pg-table td { font-variant-numeric: tabular-nums; }
.pg-table a { color: var(--text-primary); }
.pg-table a:hover { color: var(--accent-blue); text-decoration: none; }

.pg-opp { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.pg-opp img { width: 22px; height: 22px; object-fit: contain; }
.pg-at { width: 18px; color: var(--text-muted); font-weight: 400; }
.pg-res { font-weight: 800; }
.pg-res.is-w { color: var(--accent-green); }
.pg-res.is-l { color: var(--accent-red); }
.pg-res.is-t { color: var(--text-secondary); }
.pg-table a.pg-box { color: var(--accent-blue); font-size: 0.85rem; white-space: nowrap; }
.pg-sep th {
  padding: 6px 10px;
  background: color-mix(in srgb, var(--accent-blue) 8%, transparent);
  color: var(--accent-blue);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}

/* Sort buttons that read as the header text. The arrow sits outside the
   label's flow, so a right-aligned header does not shift when it appears. */
.pg-sort {
  position: relative;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}

.pg-sort:hover { color: var(--text-primary); }

.pg-sort:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

[aria-sort="ascending"] > .pg-sort,
[aria-sort="descending"] > .pg-sort { color: var(--text-primary); }

[aria-sort="ascending"] > .pg-sort::after,
[aria-sort="descending"] > .pg-sort::after {
  position: absolute;
  top: 50%;
  left: -0.9em;
  font-size: 0.75em;
  color: var(--accent-blue);
  transform: translateY(-50%);
}
[aria-sort="ascending"] > .pg-sort::after { content: "▲"; }
[aria-sort="descending"] > .pg-sort::after { content: "▼"; }
th:first-child[aria-sort] > .pg-sort::after { left: auto; right: -1.1em; }

/* In an .sr-table the table's own header buttons rule: the button carries the
   padding and the arrow follows the label inline. */
.sr-table th:has(> .pg-sort) { padding: 0; }
.sr-table .pg-sort::after {
  position: static;
  font-size: inherit;
  color: inherit;
  transform: none;
}

/* Basic / Advanced: a radio pair, read by :has. */
.pg-seg {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 14px;
  padding: 3px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
}
.pg-seg input { position: absolute; opacity: 0; pointer-events: none; }
.pg-seg label { padding: 5px 14px; border-radius: 4px; color: var(--text-secondary); font-size: 0.9rem; cursor: pointer; }
.pg-seg input:checked + label { background: color-mix(in srgb, var(--accent-blue) 18%, transparent); color: var(--text-primary); }
.pg-seg input:focus-visible + label { outline: 2px solid var(--accent-blue); }
.pg-seg a { padding: 5px 14px; border-radius: 4px; color: var(--text-secondary); font-size: 0.9rem; text-decoration: none; }
.pg-seg a:hover { color: var(--text-primary); text-decoration: none; }
.pg-seg a.is-active { background: color-mix(in srgb, var(--accent-blue) 18%, transparent); color: var(--text-primary); }
.pg-cols .is-adv { display: none; }
.pg-cols:has(.pg-adv-toggle:checked) .is-adv { display: table-cell; }

/* Players: one table per position group, the rest behind "Show all". */
.pg-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.pg-group { min-width: 0; }
.pg-group-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.pg-group-head h3 {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.pg-more-toggle { position: absolute; opacity: 0; pointer-events: none; }
.pg-more-toggle + label { color: var(--accent-blue); font-size: 0.85rem; cursor: pointer; }
.pg-more-toggle:focus-visible + label { outline: 2px solid var(--accent-blue); }
.pg-more-toggle + label .is-open,
.pg-more-toggle:checked + label .is-closed { display: none; }
.pg-more-toggle:checked + label .is-open { display: inline; }
.pg-group tbody.pg-more { display: none; }
.pg-group:has(.pg-more-toggle:checked) tbody.pg-more { display: table-row-group; }
.pg-players td:first-child { font-weight: 600; }

@media (max-width: 1000px) {
  .pg-split { grid-template-columns: minmax(0, 1fr); }
  .pg-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pg-groups { grid-template-columns: minmax(0, 1fr); }
  .pg-accents { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .pg-facts { grid-template-columns: minmax(0, 1fr); }
  .pg-pills { justify-content: flex-start; max-width: none; }
  .pg-toolbar { justify-content: flex-start; margin-top: 0; }
  .pg-banner { grid-template-columns: auto minmax(0, 1fr); gap: 16px; padding: 18px; }
  .pg-banner-logo { width: 72px; height: 72px; }
  .pg-title { font-size: 1.9rem; }
  .pg-banner-right {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 12px;
    text-align: left;
  }
  .pg-banner-big { font-size: 2rem; }
  .pg-accents { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pg-picker-list { grid-template-columns: repeat(4, auto); }
}

@media (max-width: 600px) {
  .pg-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pg-card strong { font-size: 1.4rem; }
  /* Too narrow for every label: the bar's direction carries the sign, logos
     shrink, and the weeks show every other one and a round's initial. */
  .pg-bar-plot { height: 170px; }
  .pg-bar-num { font-size: 0.68rem; }
  .pg-bar-sign { display: none; }
  .pg-bar img { width: 14px; height: 14px; }
  .pg-bar.is-reg:nth-child(even) .pg-bar-label { visibility: hidden; }
  .pg-bar-label .is-full { display: none; }
  .pg-bar-label .is-short { display: inline; }
  .pg-bar-num .is-full { display: none; }
  .pg-bar-num .is-short { display: inline; }
  .pg-chart figcaption:has(.pg-chart-switch) { flex-direction: column; align-items: flex-start; }
  .pg-chart { padding-inline: 8px; }
  .pg-table th { padding: 6px 7px; font-size: 0.7rem; }
}

