/* Pitch Geek app: the few rules the design standard does not yet carry. */
html, body { height: 100%; margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-sans); -webkit-text-size-adjust: 100%; }
* { box-sizing: border-box; }
a { color: inherit; }
.pg-app { min-height: 100vh; min-height: 100dvh; }
.pg-app > .pg-screen { flex: 1; }
.pg-nav { position: sticky; bottom: 0; z-index: 5; }
.pg-topbar { position: sticky; top: 0; z-index: 5; }

/* controls row: a native select next to the search field */
.pg-controls { display: grid; grid-template-columns: 1fr; gap: var(--space-2); padding: var(--space-3) 0; }
@media (min-width: 520px) { .pg-controls { grid-template-columns: 220px 1fr; } }
.pg-select { height: var(--tap-min); padding: 0 var(--space-3); border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); background: var(--sheet); color: var(--ink); font: inherit; }
.pg-select:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* team cell with a second line */
.pg-teamcell a { text-decoration: none; display: grid; min-width: 0; }
.pg-teamcell a > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-teamcell a:hover > span:first-child { text-decoration: underline; }
.pg-range { white-space: nowrap; color: var(--ink-soft); }
.pg-up { color: var(--signal); }
.pg-table td, .pg-table th { vertical-align: middle; }
.pg-rowlink { text-decoration: none; }
.pg-subhead { padding: var(--space-5) 0 var(--space-2); }
.pg-follow[aria-pressed="true"] { background: var(--mark); border-color: var(--signal); color: var(--on-mark); }
.pg-list--plain { display: grid; gap: var(--space-2); padding: 0; margin: 0; list-style: none; }
.pg-prose { display: grid; gap: var(--space-3); max-width: 62ch; }
.pg-prose p { margin: 0; }
.pg-spark { display: flex; align-items: center; gap: var(--space-3); }
.pg-foot button { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; min-height: var(--tap-min); }
.pg-note > p { margin: 0; }
a.pg-chip, a.pg-btn, a.pg-nav__item, .pg-topnav a { text-decoration: none; }
.pg-head + p { margin: 0; }

/* girls and boys switch */
.pg-seg { display: grid; grid-template-columns: 1fr 1fr; max-width: 280px; margin-bottom: var(--space-3); border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); overflow: hidden; }
.pg-seg__item { display: grid; place-items: center; height: var(--tap-min); background: var(--sheet); color: var(--ink); text-decoration: none; }
.pg-seg__item + .pg-seg__item { border-left: 1px solid var(--rule-strong); }
.pg-seg__item[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.pg-seg__item:focus-visible { outline: 2px solid var(--focus); outline-offset: -3px; }
/* tier tag: filled for ECNL, outlined for the Regional League */
.pg-lg { display: inline-flex; align-items: center; flex: none; height: 18px; padding: 0 5px; border-radius: var(--radius-xs); font-family: var(--font-sans); font-size: 11px; line-height: 1; font-weight: 600; letter-spacing: 0.03em; white-space: nowrap; }
.pg-lg--ecnl { background: var(--ink); color: var(--paper); }
.pg-lg--rl { box-shadow: inset 0 0 0 1px var(--rule-strong); color: var(--ink-soft); }
/* MLS NEXT: filled for Homegrown, outlined for the Academy Division. The words "MLS HD" and "MLS AD" tell them from ECNL and RL. */
.pg-lg--hd { background: var(--ink); color: var(--paper); }
.pg-lg--ad { box-shadow: inset 0 0 0 1px var(--rule-strong); color: var(--ink-soft); }
.pg-chart__name { fill: var(--ink); font-family: var(--font-sans); font-size: 14px; font-weight: 600; }
.pg-teamrow__fig .caption { white-space: nowrap; }
.pg-sub { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }
.pg-sub > span:last-child { min-width: 0; }
.pg-teamcell .pg-sub > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-teamcell a > span + span { display: block; min-width: 0; }
.pg-teamcell .pg-sub { display: flex; }
/* label and value rows in a list */
.pg-kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: var(--space-3); min-height: calc(var(--tap-min) + var(--space-4)); padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4); color: var(--ink); text-decoration: none; }
.pg-kv > span { grid-column: 1; min-width: 0; overflow-wrap: anywhere; }
.pg-kv > .pg-icon { grid-column: 2; grid-row: 1 / span 2; color: var(--ink-soft); }
.pg-teamrow--club { grid-template-columns: minmax(0, 1fr) auto auto; }
.pg-teamrow--club .pg-teamrow__main > span:first-child { overflow-wrap: anywhere; }
.pg-subhead { display: flex; align-items: baseline; gap: var(--space-2); }
.pg-section > .pg-list + p { margin: 0; }
/* match rows: the figure column never squeezes the team names */
.pg-match { grid-template-columns: var(--space-7) minmax(0, 1fr) auto; }
.pg-match__fig .caption { white-space: nowrap; }

/* ---------- v3: one standard team page, conferences ---------- */
/* five tabs: the labels stay on one line on the narrowest phones */
.pg-nav__item .nav-label { white-space: nowrap; }
@media (max-width: 359px) { .pg-nav__item .nav-label { font-size: 11px; letter-spacing: -0.01em; } }
/* four facts as two rows of two */
.pg-facts--four { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--space-4); }
.pg-facts__item { align-content: start; }
/* a team's movement in the rankings, drawn large */
.pg-climb { display: grid; gap: var(--space-3); padding: var(--space-4); background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-md); }
.pg-climb__lead { display: flex; align-items: center; gap: var(--space-3); }
.pg-climb__arrow { flex: none; width: 48px; height: 48px; fill: none; stroke: var(--signal); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.pg-climb__arrow--flat { stroke: var(--ink-soft); }
.pg-climb__arrow--down { stroke: var(--ink); }
.pg-climb__words { display: grid; min-width: 0; }
.pg-chart__rank { fill: var(--ink); font-family: var(--font-data); font-size: 13px; font-weight: 600; }
.pg-form { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--rule); }
.pg-form__cells { display: flex; gap: var(--space-1); }
.pg-form__cells > i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--radius-xs); font-style: normal; font-family: var(--font-data); font-size: 13px; line-height: 1; font-weight: 600; }
.pg-form__cells > .is-w { background: var(--signal); color: var(--on-signal); }
.pg-form__cells > .is-d { box-shadow: inset 0 0 0 1px var(--rule-strong); color: var(--ink); }
.pg-form__cells > .is-l { background: var(--band-strong); color: var(--ink); }
/* what kind of game it was, when it was not a conference game */
.pg-event { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; min-width: 0; color: var(--ink-soft); }
.pg-event > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.pg-event__tag { flex: none; display: inline-flex; align-items: center; height: 18px; padding: 0 5px; border-radius: var(--radius-xs); box-shadow: inset 0 0 0 1px var(--signal); color: var(--signal); font-family: var(--font-sans); font-size: 11px; line-height: 1; font-weight: 600; letter-spacing: 0.03em; white-space: nowrap; }
/* a conference as a card: its rating, then its record and efficiency outside the conference */
.pg-conf { display: grid; gap: var(--space-3); padding: var(--space-3) var(--space-4); color: var(--ink); text-decoration: none; }
.pg-conf__top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-3); }
.pg-conf__top--go { grid-template-columns: minmax(0, 1fr) auto auto; }
.pg-conf__top--go > .pg-icon { color: var(--ink-soft); }
.pg-conf__rank { min-width: 2ch; text-align: right; color: var(--ink-soft); }
.pg-conf__name { display: grid; min-width: 0; }
.pg-conf__name > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-conf__fig { display: grid; justify-items: end; text-align: right; }
.pg-conf__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); padding-top: var(--space-2); border-top: 1px solid var(--rule); }
.pg-conf__stats > span { display: grid; align-content: start; }
.pg-conf__open { color: var(--signal); text-decoration: underline; text-underline-offset: 3px; }
a.pg-conf:hover .pg-conf__name > span:first-child { text-decoration: underline; }
.pg-gap { margin: 0; padding: var(--space-3) var(--space-4); text-align: center; color: var(--ink-soft); }
/* a conference against the others in its league: one dot each on a scale of rating */
.pg-strip { display: block; width: 100%; max-width: 420px; height: auto; overflow: visible; }
.pg-strip__dot { fill: var(--band-strong); stroke: var(--rule-strong); stroke-width: 1; }
.pg-climb .pg-chart { max-width: 420px; }
.pg-oddsblock > p { margin: 0; }

/* ---------- v4: clubs ---------- */
/* a search box on its own row */
.pg-controls--one { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 520px) { .pg-controls--one { grid-template-columns: minmax(0, 420px); } }
/* a club's teams past the best three at an age: one tap opens them */
.pg-fold { display: grid; gap: var(--space-2); }
.pg-fold > summary { display: inline-flex; align-items: center; min-height: var(--tap-min); padding: 0 var(--space-1); cursor: pointer; list-style: none; }
.pg-fold > summary::-webkit-details-marker { display: none; }
.pg-fold[open] > summary { display: none; }
/* three lines in a row's figure: place, what it is out of, playoff chance */
.pg-teamrow--club .pg-teamrow__fig { align-content: center; }
/* on the Clubs tab the club's name is the point: it wraps and is never cut short */
.pg-clublist .pg-teamcell a > span:first-child { white-space: normal; overflow-wrap: anywhere; }
.pg-clublist .pg-teamcell .pg-sub { align-items: flex-start; }
.pg-clublist .pg-teamcell .pg-sub > span:last-child { white-space: normal; }
/* ---------- v5: a club's trend ---------- */
/* a club's place after each week, small, in a list row: a line that rises is a club moving up */
.pg-run { display: inline-grid; justify-items: end; gap: 2px; vertical-align: middle; }
.pg-run__line { display: block; width: 56px; height: 22px; overflow: visible; }
.pg-run__line polyline { fill: none; stroke: var(--ink-soft); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.pg-run__line circle { fill: var(--ink-soft); }
.pg-run__line--up polyline { stroke: var(--signal); }
.pg-run__line--up circle { fill: var(--signal); }
.pg-run__line--down polyline { stroke: var(--ink); }
.pg-run__line--down circle { fill: var(--ink); }
.pg-run__n { line-height: 14px; }
.pg-run__n--up { color: var(--signal); font-weight: 600; }
/* the foot of a movement block when it holds words, not result cells: it may run to a second line */
.pg-form--wrap { flex-wrap: wrap; row-gap: 2px; }
/* ---------- v6: club logos ---------- */
/* a club's logo where its initials were. The tile is white in day and night colors alike: the logos are drawn for a
   white ground, and many have no edge of their own. */
.pg-crest { display: inline-grid; place-items: center; flex: none; width: var(--space-6); height: var(--space-6); border-radius: var(--radius-sm); background: #fff; overflow: hidden; }
.pg-crest img { display: block; width: calc(100% - 4px); height: calc(100% - 4px); object-fit: contain; }
.pg-crest--lg { width: var(--space-7); height: var(--space-7); }
.pg-crest--you { box-shadow: inset 0 0 0 2px var(--signal); }
/* in a list row the logo shows at every width; a club with no logo keeps its initials there, so the names stay in line */
.pg-teamcell .pg-mono { display: inline-grid; }
/* a conference table has four columns on a phone: there the team's name needs the room, as it did before the logos */
.pg-teamcell--tight .pg-crest, .pg-teamcell--tight .pg-mono { display: none; }
@container (min-width: 420px) { .pg-teamcell--tight .pg-crest, .pg-teamcell--tight .pg-mono { display: inline-grid; } }
/* the Clubs tab has three columns: on a small phone the logo is smaller, and on the smallest it gives way to the name */
@container (max-width: 339px) { .pg-clublist .pg-teamcell .pg-crest, .pg-clublist .pg-teamcell .pg-mono { width: var(--space-5); height: var(--space-5); } }
@container (max-width: 299px) { .pg-clublist .pg-teamcell .pg-crest, .pg-clublist .pg-teamcell .pg-mono { display: none; } }
/* v7: the actions under a team's or a club's head, one under the other: Follow, then Share on Facebook */
.pg-acts { display: grid; gap: var(--space-2); justify-items: start; }
.pg-acts--club { margin-bottom: var(--space-4); }
