/* ------------------------------------------------------------------
   STATS PAGES: League Finishes (finishes.php) and Cup Results (cupresults.php).
   Every rule sits under .p-stats, uses the tokens from sfp.css, starts with the phone layout and adds the desktop
   layout at 1000px. The two tints below are the gold and cyan tokens made see-through, for the champion and PB rows.
------------------------------------------------------------------- */
.p-stats { --st-gold-tint: rgba(255,213,74,.2); --st-pb-tint: rgba(102,229,246,.12); --st-field: rgba(0,0,40,.4); }
.p-stats .vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.p-stats [hidden] { display: none !important; }

.p-stats .st-intro h1 { margin: 0 4px; font-size: 26px; font-weight: 600; letter-spacing: .01em; }
.p-stats .st-intro .sub { margin: 0 4px; font-size: 14px; color: var(--ink-faint); line-height: 1.45; }
.p-stats .st-label { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.p-stats .st-key { margin: 0; font-size: 12px; line-height: 1.45; color: var(--ink-faint); }
.p-stats .st-hint { margin: 0 4px; font-size: 15px; color: var(--ink-soft); }
.p-stats .page > .card, .p-stats .page > .section { margin-top: var(--gap); }

/* ---------- fields and chips ---------- */
.p-stats input[type="text"], .p-stats input[type="search"], .p-stats select {
  font: inherit; font-size: 16px; color: var(--ink); background: var(--st-field); border: 1px solid var(--card-border);
  border-radius: 10px; padding: 0 12px; min-height: 44px; max-width: 100%;
}
.p-stats select option { color: #000; }
.p-stats input:focus-visible, .p-stats select:focus-visible, .p-stats button:focus-visible, .p-stats a:focus-visible,
.p-stats .st-chip:focus-within { outline: 2px solid #fff; outline-offset: 2px; }
.p-stats .btn { min-height: 44px; }
.p-stats button.btn.ghost:disabled { opacity: .4; cursor: default; }
.p-stats .st-chip {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; font: inherit; font-size: 14px; color: var(--ink);
  background: var(--card-fill); border: 1px solid var(--card-border); border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.p-stats .st-chip[aria-pressed="true"] { background: var(--royal); border-color: var(--accent-2); }
.p-stats .st-cupradio .st-chip:has(input:checked) { background: var(--royal); border-color: var(--accent-2); }
.p-stats .st-cupradio .st-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.p-stats .st-cupradio .st-chip input:checked + span { font-weight: 600; }
.p-stats .st-cupradio .st-chip:focus-within { outline: 2px solid #fff; outline-offset: 2px; }

/* ---------- Ask me to find a stat ---------- */
.p-stats .st-ask { display: flex; flex-direction: column; gap: 10px; }
.p-stats .st-askform { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.p-stats .st-askform input[type="text"] { min-height: 48px; font-size: 17px; }
.p-stats .st-try { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; font-size: 13px; color: var(--ink-faint); }
.p-stats .st-try a { color: var(--accent-2); text-decoration: none; padding: 5px 10px; border: 1px solid var(--hair); border-radius: 999px; }
.p-stats .st-try a:hover { border-color: var(--accent-2); }
.p-stats .st-answer { display: flex; gap: 14px; align-items: center; border-top: 1px solid var(--hair); padding-top: 12px; }
.p-stats .st-head { font-size: 40px; font-weight: 700; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; min-width: 1.2em; }
.p-stats .st-atitle { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.25; }
.p-stats .st-adetail { margin: 3px 0 0; font-size: 13px; color: var(--ink-faint); line-height: 1.4; }
.p-stats .st-adetail a, .p-stats .st-last a { color: var(--accent-2); }
.p-stats .st-answer-no { margin: 0; border-top: 1px solid var(--hair); padding-top: 12px; font-size: 15px; color: var(--ink-soft); line-height: 1.45; }

/* ---------- the table card ---------- */
.p-stats .st-tablecard { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.p-stats .st-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.p-stats .st-bar .st-q { flex: 1 1 100%; }
.p-stats .st-bar select { flex: 1 1 140px; min-width: 0; }
.p-stats .st-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 100%; }
.p-stats .st-count { flex: 1 1 100%; font-size: 12px; color: var(--ink-faint); }
.p-stats .st-scroll { overflow-x: auto; }
.p-stats .st-table { width: 100%; border-collapse: collapse; }
.p-stats .st-table th { padding: 4px 6px; text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); white-space: nowrap; border-bottom: 1px solid var(--card-border); }
.p-stats .st-table th.num, .p-stats .st-table td.num { text-align: right; }
.p-stats .st-table th.mid, .p-stats .st-table td.mid { text-align: center; }
.p-stats .st-sort { font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; background: none; border: 0; padding: 0; min-height: 40px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.p-stats .st-sort .arr::after { content: "↕"; opacity: .45; }
.p-stats th[aria-sort="ascending"] .arr::after { content: "▲"; opacity: 1; color: var(--accent); }
.p-stats th[aria-sort="descending"] .arr::after { content: "▼"; opacity: 1; color: var(--accent); }
.p-stats .st-table td { padding: 7px 6px; font-size: 14px; font-variant-numeric: tabular-nums; vertical-align: middle; border-bottom: 1px solid var(--hair); }
.p-stats .st-table tr.is-pb td { background: var(--st-pb-tint); }
.p-stats .st-table tr.is-champ td, .p-stats .st-table tr.is-final td { background: var(--st-gold-tint); }

.p-stats .st-pb { width: 28px; height: 28px; display: inline-block; vertical-align: middle; margin: -6px 0 -6px 2px; flex: none; }
.p-stats .st-mgr .st-pb { margin-left: 6px; }
.p-stats .st-mini .st-pb { width: 22px; height: 22px; margin: -4px 5px -4px 0; }
.p-stats .st-pb { --pb-fill: var(--accent-2); --pb-line: var(--ink); --pb-ink: var(--sky-top); }
.p-stats .st-trophy { height: 28px; width: auto; }
.p-stats .st-tline { display: block; }
.p-stats .st-tline .st-trophy { display: inline-block; vertical-align: middle; margin: -5px 0 -5px 6px; }

/* League Finishes: phone layout (Pos, Team, Points; the rest opens under the team) */
.p-stats .st-fin .c-opt { display: none; }
.p-stats .st-fin .st-pos { width: 40px; font-size: 19px; font-weight: 700; color: var(--accent); }
.p-stats .st-fin .st-tn { font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; line-height: 1.15; }
.p-stats .st-fin .st-mini { display: block; font-size: 13px; color: var(--ink-soft); margin-top: 1px; line-height: 1.3; }
.p-stats .st-fin .st-det { display: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--st-field); }
.p-stats .st-fin tr.open .st-det { display: grid; }
.p-stats .st-fin .st-det span { display: block; }
.p-stats .st-fin .st-det i { display: block; font-style: normal; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.p-stats .st-fin .st-det b { font-size: 16px; font-weight: 600; }
.p-stats .st-fin .st-pts { width: 70px; font-size: 18px; font-weight: 700; color: var(--accent-2); white-space: nowrap; }
.p-stats .st-more { background: none; border: 0; color: var(--ink-soft); width: 32px; height: 32px; padding: 0; margin-left: 4px; vertical-align: middle; cursor: pointer; }
.p-stats .st-more svg { width: 12px; height: 12px; transition: transform .15s; }
.p-stats .st-fin tr.open .st-more svg { transform: rotate(180deg); }
.p-stats .st-fin tbody tr { cursor: pointer; }

/* Cup Results: phone layout (a small card per match) */
.p-stats .st-cups, .p-stats .st-cups tbody { display: block; }
.p-stats .st-cups thead { display: none; }
.p-stats .st-cups tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr); gap: 4px 8px; padding: 10px 6px; border-bottom: 1px solid var(--hair); }
.p-stats .st-cups td { border: 0; padding: 0; }
.p-stats .st-cups .c-opt { display: none; }
.p-stats .st-cups .st-meta { grid-column: 1 / -1; grid-row: 1; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); }
.p-stats .st-cups .st-meta b { color: var(--accent-2); font-weight: 600; }
.p-stats .st-cups .st-home { grid-row: 2; text-align: right; font-size: 16px; line-height: 1.15; }
.p-stats .st-cups .st-score { grid-row: 2; text-align: center; font-size: 21px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.p-stats .st-cups .st-away { grid-row: 2; font-size: 16px; line-height: 1.15; }
.p-stats .st-cups .st-tot { grid-column: 1 / -1; grid-row: 3; text-align: center; font-size: 17px; font-weight: 700; color: var(--accent-2); }
.p-stats .st-cups .st-tot::before { content: "Total goals "; font-size: 11px; font-weight: 400; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); }
.p-stats .st-cups .st-tot.pts { color: var(--ink-faint); font-style: italic; }
.p-stats .st-cups .win { font-weight: 700; }
.p-stats .st-cups td.st-tot { text-align: center; }
.p-stats .st-cups td:not(.win).st-home, .p-stats .st-cups td:not(.win).st-away { color: var(--ink-soft); }
.p-stats .st-cups tr.is-final { background: var(--st-gold-tint); }
.p-stats .st-cups tr.is-final td { background: none; }

.p-stats .st-empty { margin: 4px; font-size: 14px; color: var(--ink-soft); }
.p-stats .st-foot { display: flex; flex-direction: column; gap: 10px; }
.p-stats .st-pager { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-faint); }

/* ---------- Head to Head ---------- */
.p-stats .st-h2hform { display: flex; flex-direction: column; gap: 10px; }
.p-stats .st-picks { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: center; }
.p-stats .st-vs { font-weight: 700; color: var(--accent); letter-spacing: .1em; }
.p-stats .st-cupradio { display: flex; flex-wrap: wrap; gap: 6px; border: 0; margin: 0; padding: 0; min-width: 0; max-width: 100%; }
.p-stats .st-h2h-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "a b" "mid mid"; gap: var(--gap); }
.p-stats .st-area-a { grid-area: a; }
.p-stats .st-area-b { grid-area: b; }
.p-stats .st-area-mid { grid-area: mid; }
.p-stats .st-area-mid .st-label { text-align: center; margin-bottom: 4px; }
.p-stats .st-pcard { height: 100%; display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 20px; border: 2px solid var(--accent); background: linear-gradient(165deg, var(--card-border), var(--card-fill)); box-shadow: 0 0 26px var(--card-fill); }
.p-stats .st-pcard.b { border-color: var(--accent-2); }
.p-stats .st-ptop { display: flex; justify-content: space-between; font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.p-stats .st-ptop span:last-child { color: var(--ink-soft); }
.p-stats .st-photo { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 12px; border: 1px solid var(--card-border); }
.p-stats .st-nophoto { display: flex; align-items: center; justify-content: center; background: var(--st-field); }
.p-stats .st-nophoto span { font-size: 60px; font-weight: 700; color: var(--accent); }
.p-stats .st-pcard.b .st-nophoto span { color: var(--accent-2); }
.p-stats .st-pname { font-size: 22px; font-weight: 700; line-height: 1.1; }
.p-stats .st-pteam { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); line-height: 1.2; }

.p-stats .st-stat { display: grid; grid-template-columns: minmax(0, 1fr) 104px minmax(0, 1fr); align-items: center; gap: 6px; padding: 9px 4px; border-bottom: 1px solid var(--hair); }
.p-stats .st-sv { font-size: 28px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.p-stats .st-sv.a { text-align: right; }
.p-stats .st-sv.b { text-align: left; }
.p-stats .st-sv.lead { color: var(--accent); font-weight: 700; }
.p-stats .st-sv.b.lead { color: var(--accent-2); }
.p-stats .st-sl { text-align: center; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); line-height: 1.2; }
.p-stats .st-area-mid .st-key { margin-top: 10px; text-align: center; }
.p-stats .st-meet, .p-stats .st-overall { display: flex; flex-direction: column; gap: 10px; }
.p-stats .st-overall .st-label { text-align: center; }
.p-stats .st-bar-wl { display: flex; height: 34px; border-radius: 10px; overflow: hidden; font-weight: 700; font-size: 14px; }
.p-stats .st-bar-wl > div { display: flex; align-items: center; justify-content: center; min-width: 28px; color: var(--sky-top); }
.p-stats .st-bar-wl .a { background: var(--accent); }
.p-stats .st-bar-wl .d { background: var(--ink-faint); }
.p-stats .st-bar-wl .b { background: var(--accent-2); }
.p-stats .st-lg::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; background: var(--ink-faint); }
.p-stats .st-lg.a::before { background: var(--accent); }
.p-stats .st-lg.b::before { background: var(--accent-2); }
.p-stats .st-lg { margin-right: 12px; }
.p-stats .st-last { margin: 0; font-size: 14px; color: var(--ink-soft); }

@media (min-width: 640px) {
  .p-stats .st-askform { grid-template-columns: minmax(0, 1fr) auto; }
  .p-stats .st-bar .st-q { flex: 1 1 260px; }
  .p-stats .st-bar select { flex: 0 1 auto; }
  .p-stats .st-chips { flex: 0 0 auto; }
  .p-stats .st-count { flex: 1 1 auto; text-align: right; }
}

@media (min-width: 1000px) {
  /* sfp.css gives every page a narrow column. The Stats pages are wide tables, so widen it. */
  .p-stats .page { max-width: 1180px; padding: 28px var(--page-pad) 64px; }
  .p-stats .st-intro h1 { font-size: 32px; }
  .p-stats .st-tablecard { padding: 16px; }
  .p-stats .st-sortsel { display: none; }
  .p-stats .st-bar .st-chips { order: -1; }

  /* League Finishes: every column, squeezed to fit */
  .p-stats .st-fin .c-opt { display: table-cell; }
  .p-stats .st-fin .st-pos { width: 48px; }
  .p-stats .st-fin .st-mini, .p-stats .st-fin .st-more, .p-stats .st-fin .st-det, .p-stats .st-fin tr.open .st-det { display: none; }
  .p-stats .st-fin tbody tr { cursor: default; }
  .p-stats .st-table th { padding: 4px 8px; font-size: 12px; }
  .p-stats .st-fin td { padding: 6px 8px; }
  .p-stats .st-fin .st-tn { font-size: 14px; }
  .p-stats .st-fin .st-pts { width: auto; font-size: 16px; }
  .p-stats .st-fin .st-mgr { white-space: nowrap; }

  /* Cup Results: a real table */
  .p-stats .st-cups { display: table; }
  .p-stats .st-cups tbody { display: table-row-group; }
  .p-stats .st-cups thead { display: table-header-group; }
  .p-stats .st-cups tbody tr { display: table-row; padding: 0; }
  .p-stats .st-cups td { display: table-cell; padding: 7px 8px; border-bottom: 1px solid var(--hair); }
  .p-stats .st-cups .c-opt { display: table-cell; }
  .p-stats .st-cups .st-meta { display: none; }
  .p-stats .st-cups .st-tot::before { content: none; }
  .p-stats .st-cups .st-home, .p-stats .st-cups .st-away { font-size: 15px; }
  .p-stats .st-cups .st-score { font-size: 18px; width: 90px; }
  .p-stats .st-cups td.st-tot { font-size: 18px; text-align: right; }
  .p-stats .st-cups tr.is-final td { background: var(--st-gold-tint); }
  .p-stats .st-cups .st-cupname { color: var(--accent-2); font-weight: 600; white-space: nowrap; }

  .p-stats .st-foot { flex-direction: row; justify-content: space-between; align-items: center; gap: 24px; }
  .p-stats .st-foot .st-key { flex: 1 1 auto; max-width: 760px; }
  .p-stats .st-pager { flex: none; gap: 12px; }

  /* Head to Head: card, stats, card */
  .p-stats .st-h2hform { flex-direction: row; align-items: center; flex-wrap: wrap; justify-content: space-between; }
  .p-stats .st-picks { flex: 1 1 420px; max-width: 560px; }
  .p-stats .st-h2h-grid { grid-template-columns: minmax(0, 340px) minmax(0, 1fr) minmax(0, 340px); grid-template-areas: "a mid b"; gap: 24px; align-items: stretch; }
  .p-stats .st-area-mid { display: flex; flex-direction: column; justify-content: center; }
  .p-stats .st-pcard { padding: 14px; box-shadow: 0 0 34px var(--card-fill); }
  .p-stats .st-pname { font-size: 30px; }
  .p-stats .st-pteam { font-size: 14px; }
  .p-stats .st-ptop { font-size: 12px; }
  .p-stats .st-nophoto span { font-size: 96px; }
  .p-stats .st-stat { grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1fr); padding: 10px 8px; }
  .p-stats .st-sv { font-size: 30px; }
  .p-stats .st-sl { font-size: 12px; letter-spacing: .14em; }
  .p-stats .st-overall .st-stat { max-width: 620px; width: 100%; margin: 0 auto; }
}
@media (min-width: 1500px) {
  .p-stats .page { max-width: 1320px; }
}

/* ---------- draft two: cup trophies, answer tiles, scrolling pills, Ask Review ---------- */
.p-stats .st-cupicon { height: 24px; width: auto; vertical-align: middle; }
.p-stats .st-chip .st-cupicon { height: 22px; margin-right: 8px; }
.p-stats td .st-cupicon { height: 26px; margin: -6px 0 -6px 8px; }
.p-stats .st-answer { flex-direction: column; align-items: stretch; gap: 12px; }
.p-stats .st-arow { display: flex; gap: 14px; align-items: center; }
.p-stats .st-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.p-stats .st-tile { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px; border: 1px solid var(--card-border); border-radius: 12px; background: var(--card-fill); }
.p-stats .st-tile.hot { border-color: var(--accent); }
.p-stats .st-tile.hot b { color: var(--accent); }
.p-stats .st-tl { font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.p-stats .st-tile b { font-size: 26px; font-weight: 700; line-height: 1.15; }
.p-stats .st-ts { font-size: 11px; color: var(--ink-soft); }
.p-stats .st-pills { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.p-stats .st-pills span { border: 1px solid var(--card-border); border-radius: 999px; padding: 4px 10px; font-size: 13px; background: var(--card-fill); }

@media (max-width: 999px) {
  .p-stats .st-tablecard .st-chips, .p-stats .st-h2hform .st-cupradio { flex-wrap: nowrap; overflow-x: auto; position: relative; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
  .p-stats .st-tablecard .st-chips { flex: 1 1 100%; min-width: 0; margin: 0 -12px; padding: 0 12px; }
  .p-stats .st-h2hform .st-cupradio { margin: 0 calc(-1 * var(--card-pad)); padding: 0 var(--card-pad); max-width: none; width: auto; }
  .p-stats .st-chips::-webkit-scrollbar, .p-stats .st-cupradio::-webkit-scrollbar { display: none; }
  .p-stats .st-chips .st-chip, .p-stats .st-cupradio .st-chip { flex: none; }
}
@media (min-width: 1000px) {
  .p-stats .st-tile { padding: 12px 14px; }
  .p-stats .st-tile b { font-size: 34px; }
  .p-stats .st-tl { font-size: 12px; }
}

/* Ask Review (private) */
.p-askreview .ar-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.p-askreview .ar-tiles .st-tile { align-items: flex-start; text-align: left; }
.p-askreview .ar-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.p-askreview .ar-bar form { display: flex; gap: 8px; flex: 1 1 240px; }
.p-askreview .ar-bar input[type="search"] { flex: 1; min-width: 0; }
.p-askreview .st-chip { text-decoration: none; }
.p-askreview .ar-list { list-style: none; margin: 0; padding: 0; }
.p-askreview .ar-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 12px 4px; border-top: 1px solid var(--hair); align-items: center; }
.p-askreview .ar-item:first-child { border-top: 0; }
.p-askreview .ar-q { font-size: 17px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.p-askreview .ar-now { font-size: 14px; color: var(--ink-soft); margin-top: 3px; }
.p-askreview .ar-meta { font-size: 13px; color: var(--ink-faint); margin-top: 3px; }
.p-askreview .ar-n { font-size: 18px; font-weight: 700; color: var(--accent-2); }
.p-askreview .ar-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .04em; white-space: nowrap; }
.p-askreview .ar-badge.need { color: var(--gold); border: 1px solid var(--gold); }
.p-askreview .ar-badge.now { color: var(--sky-top); background: var(--accent-2); }
.p-askreview .ar-badge.done { color: var(--ink-soft); border: 1px solid var(--hair); }
.p-askreview .ar-form { display: grid; gap: 10px; max-width: 420px; }
.p-askreview .ar-form label { font-size: 14px; color: var(--ink-soft); }
.p-askreview .ar-form input[type="password"] { min-height: 44px; }
.p-askreview code { font-size: 13px; background: var(--st-field); border-radius: 4px; padding: 1px 5px; }
.p-askreview a.btn { text-decoration: none; }
.p-askreview a.btn.ghost { background: transparent; border-color: var(--hair); color: var(--ink-soft); font-weight: 500; }
.p-askreview .ar-tiles { margin-top: var(--gap); }

.p-stats .st-pairnote { margin: 0; padding: 8px 12px; border: 1px solid var(--accent-2); border-radius: 10px; font-size: 14px; background: var(--card-fill); }
.p-stats .st-pairnote a { color: var(--accent-2); }

/* answer headline: always one line, never over the words beside it; the suggested questions: always one line */
.p-stats .st-head { flex: none; white-space: nowrap; line-height: 1; }
.p-stats .st-head.long { font-size: 32px; }
.p-stats .st-atext { flex: 1 1 0; min-width: 0; }
.p-stats .st-arow.duel { flex-direction: column; align-items: stretch; gap: 10px; }
.p-stats .st-duel { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: end; }
.p-stats .st-duel .side { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.p-stats .st-duel .side.b { text-align: right; align-items: flex-end; }
.p-stats .st-duel .nm { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); line-height: 1.15; overflow-wrap: anywhere; }
.p-stats .st-duel b { font-size: 40px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.p-stats .st-duel .side.a b { color: var(--accent); }
.p-stats .st-duel .side.b b { color: var(--accent-2); }
.p-stats .st-duel .mid { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); text-align: center; line-height: 1.3; padding-bottom: 4px; }
.p-stats .st-try { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.p-stats .st-try::-webkit-scrollbar { display: none; }
.p-stats .st-try > * { flex: none; }
@media (max-width: 999px) {
  .p-stats .st-try { -webkit-mask-image: linear-gradient(90deg, #000 90%, transparent); mask-image: linear-gradient(90deg, #000 90%, transparent); }
}
@media (max-width: 479px) {
  .p-stats .st-arow:not(.duel) { flex-direction: column; align-items: flex-start; gap: 6px; }
  .p-stats .st-duel b { font-size: 34px; }
}

/* ---------- Hall of Fame (halloffame.php) ---------- */
.p-hall { --hall-solid: #0b0b92; }   /* a solid version of the card colour, so cells scrolled under a pinned column do not show through */
.p-hall .hall-panel[hidden], .p-hall .hall-table[hidden], .p-hall .hall-modal[hidden] { display: none !important; }
.p-hall .hall-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--card-border); margin-top: var(--gap); }
.p-hall .hall-tabs button { flex: 1; background: none; border: 0; border-bottom: 3px solid transparent; padding: 12px 6px; min-height: 48px; font: inherit; font-size: 16px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); cursor: pointer; }
.p-hall .hall-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.p-hall .hall-panel { margin-top: var(--gap); }
.p-hall .hall-panel > .card { margin-top: 12px; padding: 4px 8px; }
.p-hall .hall-panel > .st-key { margin-top: 10px; }
.p-hall .hall-table th { padding: 8px 8px; text-align: left; vertical-align: bottom; font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--gold); white-space: nowrap; border-bottom: 1px solid var(--card-border); }
.p-hall .hall-table th.num, .p-hall .hall-table td.num { text-align: center; font-variant-numeric: tabular-nums; }
.p-hall .hall-table td { padding: 7px 8px; font-size: 15px; vertical-align: middle; border-bottom: 1px solid var(--hair); }
.p-hall .hall-sort { background: none; border: 0; padding: 0; min-height: 36px; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; cursor: pointer; display: inline-flex; align-items: flex-end; text-align: inherit; }
.p-hall .hall-sort .arr { margin-left: 5px; }
.p-hall .hall-sort .arr::after { content: "↕"; opacity: .45; }
.p-hall th[aria-sort="ascending"] .arr::after { content: "▲"; opacity: 1; color: var(--accent); }
.p-hall th[aria-sort="descending"] .arr::after { content: "▼"; opacity: 1; color: var(--accent); }
.p-hall .hall-stack { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.p-hall .hall-stack.left { align-items: flex-start; }
.p-hall .hall-ic { width: auto; vertical-align: middle; flex: none; }
.p-hall .hall-name { background: none; border: 0; padding: 6px 0; font: inherit; font-size: 16px; font-weight: 600; text-align: left; color: var(--ink); cursor: pointer; border-bottom: 1px dotted var(--ink-faint); }
.p-hall .hall-name:hover { color: var(--accent-2); }
.p-hall .hall-cur { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); margin-right: 7px; }
.p-hall .rk { color: var(--ink-faint); }
.p-hall .hall-big { font-size: 20px; font-weight: 700; color: var(--accent); }
.p-hall .hall-gold { color: var(--gold); font-weight: 700; }
.p-hall .hall-dim { color: var(--ink-faint); font-style: italic; }
.p-hall .hall-dot { color: var(--hair); }
.p-hall .hall-strong { font-weight: 600; }
.p-hall .hall-season { font-weight: 700; color: var(--accent); white-space: nowrap; }
.p-hall .hall-sticky { position: sticky; left: 0; background: var(--hall-solid); z-index: 1; }
.p-hall .hall-hl { display: flex; gap: 6px; align-items: center; font-size: 13px; line-height: 1.3; padding: 1px 0; }
.p-hall .hall-hl .k { color: var(--ink-faint); }
.p-hall .hall-pos { display: inline-block; min-width: 30px; text-align: center; padding: 3px 5px; border-radius: 8px; font-variant-numeric: tabular-nums; }
.p-hall .hall-pos.p1 { background: var(--gold); color: var(--sky-top); font-weight: 700; }
.p-hall .hall-pos.p4 { background: var(--st-pb-tint); font-weight: 600; }
.p-hall .hall-in { color: var(--ink-faint); font-style: italic; font-size: 14px; }
.p-hall .hall-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: 13px; color: var(--ink-soft); margin-top: 10px; }
.p-hall .hall-seas td.num { padding: 5px 3px; }
.p-hall .hall-modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-start; justify-content: center; overflow: auto; padding: 16px 12px; background: rgba(2, 2, 40, .72); }
.p-hall .hall-sheet { width: 100%; max-width: 760px; margin: auto 0; display: flex; flex-direction: column; gap: 14px; padding: 18px; background: var(--hall-solid); border: 1px solid var(--card-border); border-radius: 20px; box-shadow: 0 20px 60px rgba(0, 0, 40, .6); }
.p-hall .hall-sheet-head { display: flex; gap: 12px; align-items: flex-start; }
.p-hall .hall-sheet h2 { margin: 0; font-size: 30px; font-weight: 700; }
.p-hall .hall-close { margin-left: auto; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--card-border); background: var(--card-fill); color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; }
.p-hall .hall-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.p-hall .hall-tile { border: 1px solid var(--card-border); border-radius: 14px; padding: 10px; background: var(--card-fill); }
.p-hall .hall-tile b { display: block; font-size: 26px; line-height: 1.1; }
.p-hall .hall-tile span { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.p-hall .hall-hrow { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--hair); font-size: 15px; }
.p-hall .hall-hrow .s { color: var(--ink-soft); font-size: 14px; }
.p-hall .hall-sg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.p-hall .hall-sg > div { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 54px; font-size: 11px; color: var(--ink-faint); }
.p-hall .st-chips { flex: 0 1 auto; }
@media (min-width: 700px) { .p-hall .hall-tabs button { flex: none; padding: 12px 22px; } }
@media (max-width: 699px) { .p-hall .hide-sm { display: none; } .p-hall .hall-table th, .p-hall .hall-table td { padding: 6px 5px; } }

/* Hall of Fame: tables that scroll (pinned manager column, pinned heading row), the Other honours column, phone sizing */
.p-hall .hall-panel > .card.st-scroll { padding: 0; overflow: auto; max-height: 82vh; }   /* NO padding on the scrolling box: a pinned cell sticks at the padding edge, so padding lets rows and columns slide into the gap */
.p-hall .hall-table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 100%; }   /* always as wide as the box: it fills the screen, or scrolls past it */
.p-hall .hall-table thead th { position: sticky; top: 0; z-index: 2; background: var(--hall-solid); }
.p-hall .hall-table thead th.hall-sticky { left: 0; z-index: 3; }
.p-hall .hall-table th:first-child, .p-hall .hall-table td:first-child { padding-left: 10px; }
.p-hall .hall-table th:last-child, .p-hall .hall-table td:last-child { padding-right: 10px; }
.p-hall .hall-table .hall-sticky { white-space: nowrap; }
.p-hall .hall-table th .sm { display: none; }
.p-hall .hall-rk-sm { display: none; }
.p-hall .hall-icons { display: flex; gap: 4px; }
.p-hall .hall-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.p-hall #hall-hon-m .hall-pills { flex-wrap: nowrap; }   /* the Other honours column: each manager's extra honours stay on one line, at every width, never stacked */
.p-hall .hall-pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 5px; border: 1px solid var(--card-border); border-radius: 999px; font-size: 13px; white-space: nowrap; background: var(--card-fill); }
.p-hall .hall-pc { color: var(--ink-soft); }
.p-hall .st-bar .st-chips { flex: 0 1 auto; }
@media (max-width: 999px) {
  /* the pills (All managers, Current managers...) sit in ONE row that scrolls sideways */
  .p-hall .st-bar .st-chips { flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; min-width: 0; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(90deg, #000 90%, transparent); mask-image: linear-gradient(90deg, #000 90%, transparent); }
  .p-hall .st-bar .st-chips::-webkit-scrollbar { display: none; }
  .p-hall .st-bar .st-chips .st-chip { flex: none; }
}
@media (max-width: 699px) {
  .p-hall .hall-panel > .card.st-scroll { max-height: 75vh; max-height: 75dvh; }
  .p-hall .hall-compact th, .p-hall .hall-compact td { padding: 6px 4px; font-size: 14px; }
  .p-hall .hall-compact th { font-size: 10px; letter-spacing: .02em; }
  .p-hall .hall-compact th, .p-hall .hall-compact td { padding-left: 3px; padding-right: 3px; }
  .p-hall #hall-stats .hall-stack img { display: none; }                  /* Titles: the word is enough here */
  .p-hall .hall-compact th .lg { display: none; }
  .p-hall .hall-compact th .sm { display: inline; }
  .p-hall .hall-compact .hall-name { font-size: 15px; white-space: nowrap; padding: 4px 0; }
  .p-hall .hall-compact td.hall-sticky { padding-right: 8px; }
  .p-hall .hall-compact .hall-rk-sm { display: inline-block; min-width: 22px; margin-right: 4px; color: var(--ink-faint); font-size: 12px; font-variant-numeric: tabular-nums; }
  .p-hall .hall-compact .hall-big { font-size: 17px; }
  .p-hall .hall-compact th[aria-sort="none"] .arr::after { content: ""; }           /* the grey up-down arrow takes room; only the active sort shows an arrow */
  .p-hall .hall-compact th .arr { margin-left: 1px; }
  .p-hall .hall-compact .hall-name { font-size: 14px; }
  .p-hall .hall-compact .hall-cur { width: 6px; height: 6px; margin-right: 4px; }
  .p-hall .hall-compact .hall-rk-sm { min-width: 16px; margin-right: 3px; font-size: 11px; }
  .p-hall .hall-seas td.num { padding: 5px 2px; }
  .p-hall .hall-seas .hall-pos { min-width: 28px; padding: 3px 3px; }
  .p-hall .hall-seas th.num { white-space: nowrap; }
  .p-hall #hall-hon-m .hall-lab { font-size: 0; }                       /* honour headings: the trophy only (the name is still there for screen readers) */
  .p-hall #hall-hon-m .hall-sort .arr { margin-left: 0; font-size: 11px; }
  .p-hall #hall-hon-m .hall-sort { align-items: center; }
  .p-hall #hall-hon-m .hall-stack { gap: 2px; }
  .p-hall #hall-hon-m .hall-pn { font-size: 0; }                         /* Other honours: the trophy and a count, the name on a long press */
  .p-hall #hall-hon-m .hall-pill { padding: 2px 6px 2px 4px; }
  .p-hall #hall-stats .hall-stack { flex-direction: row; align-items: flex-end; }   /* Titles lines up with the other headings */
  .p-hall #hall-hon-m .hall-icons { display: none; }
}
/* "Was this what you were looking for?" under an answer */
.p-stats .st-fb { border-top: 1px solid var(--hair); padding-top: 12px; }
.p-stats .st-fb[hidden], .p-stats .st-fb [hidden] { display: none !important; }
.p-stats .st-fb-ask { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 14px; color: var(--ink-soft); }
.p-stats .st-fb-btn { min-height: 40px; padding: 0 16px; border-radius: 10px; border: 1.5px solid var(--card-border); background: transparent; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.p-stats .st-fb-btn.no { border-color: var(--accent); }
.p-stats .st-fb-form { display: flex; flex-direction: column; gap: 10px; }
.p-stats .st-fb-lbl { font-size: 15px; font-weight: 600; }
.p-stats .st-fb-lbl span { font-weight: 400; color: var(--ink-faint); }
.p-stats .st-fb-form textarea { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--st-field); border: 1px solid var(--card-border); border-radius: 12px; padding: 10px 14px; resize: vertical; }
.p-stats .st-fb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.p-stats .st-fb-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.p-stats .st-fb-count { margin-left: auto; font-size: 12px; color: var(--ink-faint); }
.p-stats .st-fb-done { margin: 0; display: flex; gap: 10px; align-items: center; font-size: 15px; line-height: 1.35; }
.p-stats .st-fb-tick { width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--accent-2); color: var(--sky-top); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.p-askreview .ar-badge.unhappy { color: var(--ink); background: var(--accent); }
.p-askreview .ar-badge.chg { color: var(--sky-top); background: var(--gold); }
.p-askreview .ar-badge.same { color: var(--ink-soft); border: 1px solid var(--ink-faint); }
.p-askreview .ar-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.p-askreview .ar-line { font-size: 14px; color: var(--ink-soft); margin-top: 4px; overflow-wrap: anywhere; }
.p-askreview .ar-line b { color: var(--gold); font-weight: 600; }
@media (max-width: 639px) { .p-askreview .ar-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.p-hall .hall-sticky .hall-name { white-space: nowrap; }
.p-hall #hall-hon-m th, .p-hall #hall-hon-m td { padding-left: 6px; padding-right: 6px; }   /* so the one-line Other honours still fit a desktop screen without sideways scrolling */
.p-hall #hall-hon-m th:first-child, .p-hall #hall-hon-m td:first-child { padding-left: 10px; }
.p-hall .hall-table .hall-sticky { border-right: 1px solid var(--card-border); box-shadow: 4px 0 6px -2px rgba(0, 0, 40, .45); }   /* a clear edge on the pinned column, so text sliding under it looks intentional */
