/* Pick'Em simulator (template-pickem.php, assets/pickem/pickem.js). Only the site's tokens, so the season layer
   applies by itself. Phones first: rounds and the bracket scroll sideways one column at a time; from 1100 px all five
   rounds are in view. */

/* The Major in four facts: one panel with hairlines between the facts, not four equal cards (unslop, 5 Nov 2026) */
.pk-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 20px 0 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: var(--r-3); background: var(--s1); overflow: hidden; }
.pk-stats li { display: grid; gap: 4px; align-content: start; margin: 0; padding: 16px; }
.pk-stats li:nth-child(n+3) { border-top: 1px solid var(--line); }
.pk-stats li:nth-child(even) { border-left: 1px solid var(--line); }
.pk-stats b { color: var(--heading); font: 600 clamp(20px, 1.6vw + 14px, 28px)/1.1 var(--font-ui); font-stretch: var(--head-stretch, 100%); text-wrap: balance; }
.pk-stats span { color: var(--text-2); font-size: 14px; line-height: 1.4; }
@media (min-width: 900px) {
	.pk-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.pk-stats li:nth-child(n+3) { border-top: 0; }
	.pk-stats li + li { border-left: 1px solid var(--line); }
}

.pk-note { margin: 16px 0 0; padding: 12px 16px; border: 1px solid var(--line-2); border-left: 3px solid var(--stale); border-radius: var(--r-2); background: var(--s1); color: var(--text-2); font-size: 14px; line-height: 1.5; }
.pk-note strong { color: var(--heading); font-weight: 600; }
.pk-note--ok { border-left-color: var(--ok); }

.pk { margin-top: 24px; border: 1px solid var(--line); border-radius: var(--r-3); background: var(--s1); }
.pk__tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 6px; border-bottom: 1px solid var(--line); } /* four equal tabs that always fit: nothing hides off the edge */
.pk__tab { position: relative; min-width: 0; min-height: 44px; padding: 0 4px; border: 0; border-radius: var(--r-2); background: transparent; color: var(--text-2); font: 600 15px/1 var(--font-ui); white-space: nowrap; cursor: pointer; transition: background-color var(--t), color var(--t); }
@media (hover: hover) { .pk__tab:hover { color: var(--text); } }
.pk__tab[aria-selected="true"] { background: var(--s3); color: var(--heading); }
.pk__tab.is-locked:not([aria-selected="true"]) { color: var(--text-3); }
/* A finished stage: the site's check (sprite i-check) as a mask, so the tab's text (and its translation) stays untouched */
.pk__tab.is-done::after { content: ""; position: absolute; top: 5px; right: 5px; width: 10px; height: 10px; background: var(--ok); -webkit-mask: var(--pk-check) center / contain no-repeat; mask: var(--pk-check) center / contain no-repeat; } /* phones: in the corner, so the tab is no wider */
@media (min-width: 640px) { .pk__tab.is-done::after { position: static; display: inline-block; width: 16px; height: 16px; margin-left: 6px; vertical-align: -3px; } }
.pk { --pk-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.pk__body { padding: 16px; }
.pk__h { margin: 0; color: var(--heading); font: 600 20px/1.2 var(--font-ui); } /* not the season's display font: a label inside a tool */
.pk__sub { margin: 4px 0 0; color: var(--text-3); font-size: 14px; line-height: 1.45; }
.pk__bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.pk-b { min-height: 40px; padding: 0 14px; font-size: 14px; }
.pk-b:disabled { opacity: .5; cursor: default; }
.pk-link { min-height: 40px; padding: 0 6px; border: 0; background: none; color: var(--text-2); font: 400 14px/1 var(--font-ui); text-decoration: underline; text-decoration-color: var(--underline); text-underline-offset: 3px; cursor: pointer; }
@media (hover: hover) { .pk-link:hover { color: var(--text); } }
.pk-share { height: 40px; cursor: pointer; }
@media (min-width: 640px) { .pk-share { margin-left: auto; } } /* on a phone it follows the other buttons instead of hanging alone on the right */

/* Rounds of a Swiss stage */
.pk__rounds { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(236px, 84%); gap: 12px; margin: 16px -16px 0; padding: 0 16px 8px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; overscroll-behavior-x: contain; }
.pk-r { min-width: 0; scroll-snap-align: start; }
@media (min-width: 640px) { .pk__rounds { grid-auto-columns: minmax(236px, 44%); } }
@media (min-width: 1100px) { .pk__rounds { grid-auto-columns: minmax(0, 1fr); margin-inline: 0; padding-inline: 0; overflow: visible; } }
.pk-r__h { margin: 0 0 8px; color: var(--text); font: 600 15px/1.2 var(--font-ui); }
.pk-r__h span { color: var(--text-3); font-weight: 400; font-size: 13px; }
.pk-r__wait { margin: 0; padding: 12px; border: 1px dashed var(--line-2); border-radius: var(--r-2); color: var(--text-3); font-size: 13px; line-height: 1.45; }
.pk-g { display: grid; gap: 6px; margin-bottom: 14px; }
.pk-g__h { display: flex; gap: 6px; align-items: baseline; margin: 0; color: var(--text-3); font-size: 13px; }
.pk-g__h b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

/* One match: two team buttons */
.pk-m { display: grid; border: 1px solid var(--line-2); border-radius: var(--r-2); background: var(--s2); overflow: hidden; }
.pk-m__bo { display: none; }
.pk-t { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 44px; padding: 0 10px; border: 0; background: transparent; color: var(--text); font: 400 14px/1.2 var(--font-ui); text-align: left; cursor: pointer; transition: background-color var(--t); }
.pk-t + .pk-t { border-top: 1px solid var(--line); }
@media (hover: hover) { button.pk-t:hover { background: var(--s3); } } /* no hover left behind on the tapped spot after a phone redraws the rounds */
button.pk-t:disabled { cursor: default; }
.pk-t__seed { color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; text-align: right; }
.pk-t__name { min-width: 0; overflow-wrap: anywhere; } /* a long name takes a second line instead of being cut */
.pk-t__p { color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.pk-t.is-w { background: color-mix(in oklab, var(--ok) 14%, var(--s2)); box-shadow: inset 3px 0 0 var(--ok); }
.pk-t.is-w .pk-t__name { color: var(--heading); font-weight: 600; }
.pk-t.is-w .pk-t__p { color: var(--text-2); }
.pk-t.is-l .pk-t__name, .pk-t.is-l .pk-t__seed { color: var(--text-3); }
.pk-t.is-tbd { grid-template-columns: 1fr; color: var(--text-3); cursor: default; }
.pk-m.is-wait { border-style: dashed; background: transparent; }
.pk-m.is-wait .pk-t.is-tbd:empty { min-height: 28px; }
.pk-m.is-wait .pk-t.is-tbd:empty + .pk-t { border-top-color: transparent; } /* a slot to come is one quiet box, not two empty rows */
.pk-r.is-wait .pk-r__wait { margin-bottom: 10px; }

/* Standings and the Pick'Em card */
.pk__grid { display: grid; gap: 16px; margin-top: 8px; }
@media (min-width: 1000px) { .pk__grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; } }
.pk-tbl, .pk-card { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-3); background: var(--bg); }
.pk-tbl__h, .pk-card__h { margin: 0; color: var(--heading); font: 600 17px/1.25 var(--font-ui); }
.pk-tbl__sub { margin: 2px 0 10px; color: var(--text-3); font-size: 13px; }
.pk-tbl__head, .pk-row { display: grid; grid-template-columns: minmax(0, 1fr) 34px 34px 56px; gap: 6px; align-items: center; }
.pk-tbl__head { padding-bottom: 6px; border-bottom: 1px solid var(--line); color: var(--text-3); font-size: 12px; }
.pk-tbl__head span:not(:first-child) { text-align: right; }
.pk-tbl__head .pk-tbl__picks { display: none; }
.pk-tbl__rows { margin: 0; padding: 0; list-style: none; }
.pk-row { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.pk-row:last-child { border-bottom: 0; }
.pk-row__team { display: flex; gap: 8px; align-items: center; min-width: 0; }
.pk-row__team b { min-width: 0; overflow-wrap: anywhere; color: var(--text); font-weight: 600; }
.pk-row__team .pk-t__seed { flex: none; width: 18px; }
.pk-row__rec, .pk-row__diff, .pk-row__c { text-align: right; font-variant-numeric: tabular-nums; }
.pk-row__diff, .pk-row__c { color: var(--text-2); font-size: 13px; }
.pk-row__pick { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
/* 48 pick buttons on a stage: quiet fills with no outline until one is a pick, which gets the outline, the check and the weight */
.pk-pick { justify-content: center; gap: 4px; min-width: 0; height: 32px; padding: 0 6px; border-color: transparent; background: var(--s2); font-size: 13px; white-space: nowrap; cursor: pointer; }
@media (hover: hover) { .pk-pick:hover { border-color: var(--line-2); } }
.pk-pick b { color: var(--text-3); font-weight: 400; font-variant-numeric: tabular-nums; }
.pk-pick[aria-pressed="true"] { border-color: var(--text-2); color: var(--heading); }
.pk-pick[aria-pressed="true"] b { color: var(--text); }
@media (max-width: 479px) { .pk-pick { flex-direction: column; gap: 2px; height: 44px; line-height: 1.1; } } /* the chance under the label: "3-1/3-2 55%" in bold is wider than a third of a phone row */
.pk-row.is-in .pk-row__team b { color: var(--ok); }
.pk-row.is-out .pk-row__team b, .pk-row.is-out .pk-row__rec { color: var(--text-3); }
@media (min-width: 1280px) {
	.pk-tbl__head, .pk-row { grid-template-columns: minmax(0, 1fr) 34px 34px 56px 312px; }
	.pk-tbl__head .pk-tbl__picks { display: block; text-align: left; }
	.pk-row__pick { grid-column: auto; }
}
.pk-tbl__note, .pk-card__note { margin: 10px 0 0; color: var(--text-3); font-size: 12px; line-height: 1.45; }

.pk-slot { margin-top: 12px; }
.pk-slot__h { margin: 0 0 6px; color: var(--text); font-size: 14px; font-weight: 600; }
.pk-slot__h span { color: var(--text-3); font-size: 13px; font-weight: 400; }
.pk-slot__list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pk-chip { display: inline-flex; gap: 6px; align-items: center; min-height: 36px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: var(--r-2); background: var(--s2); color: var(--text); font: 400 13px/1 var(--font-ui); cursor: pointer; }
.pk-chip b { font-weight: 600; }
.pk-chip span { color: var(--text-3); font-variant-numeric: tabular-nums; }
.pk-chip .icon { color: var(--text-3); }
@media (hover: hover) { .pk-chip:hover .icon { color: var(--text); } }
.pk-chip.is-empty { border-style: dashed; background: transparent; color: var(--text-3); cursor: default; }
.pk-card__score { margin: 14px 0 0; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.pk-card__score b { color: var(--heading); font-size: 16px; font-variant-numeric: tabular-nums; }
.pk-card__msg { margin: 6px 0 0; color: var(--text-2); font-size: 13px; }
.pk-card__msg.is-warn { color: var(--stale); }
.pk-card__msg:empty { display: none; }

/* Playoffs */
.pk-br { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(236px, 84%); gap: 12px; margin: 16px -16px 0; padding: 0 16px 8px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; overscroll-behavior-x: contain; }
.pk-br__col { display: grid; gap: 8px; align-content: start; min-width: 0; scroll-snap-align: start; }
.pk-br__col .pk-r__h { margin: 4px 0 0; }
@media (min-width: 640px) { .pk-br { grid-auto-columns: minmax(236px, 44%); } }
@media (min-width: 900px) { .pk-br { grid-auto-columns: minmax(0, 1fr); margin-inline: 0; padding-inline: 0; overflow: visible; } }
.pk-champ { display: grid; gap: 2px; margin: 4px 0 8px; padding: 12px; border: 1px solid color-mix(in oklab, var(--score-good) 45%, var(--line)); border-radius: var(--r-2); background: color-mix(in oklab, var(--score-good) 10%, var(--s2)); }
.pk-champ span { color: var(--text-3); font-size: 12px; }
.pk-champ b { color: var(--heading); font-size: 18px; font-weight: 600; }
.pk-body-po .pk-tbl { margin-top: 16px; }
.pk-tbl__head--po, .pk-row--po { grid-template-columns: minmax(0, 1fr) 52px 52px 52px; }
.pk-br + .pk-card__score, .pk-br ~ .pk-tbl { margin-top: 16px; }

/* A stage that can't start yet */
.pk-lock { margin-top: 12px; padding: 14px; border: 1px dashed var(--line-2); border-radius: var(--r-2); color: var(--text-2); font-size: 14px; line-height: 1.5; }
.pk-lock > p { margin: 0; }
.pk-lock__inv { margin: 10px 0 0 !important; color: var(--text-3); font-size: 13px; }

/* Round 1 as the server prints it (no JavaScript) */
.pk-r1 { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); margin: 12px 0 0; padding: 0; list-style: none; }
.pk-r1 .pk-m { margin: 0; }

/* Tables in the text */
.pk-prio caption { caption-side: top; padding: 10px 14px; color: var(--text-3); font-size: 13px; text-align: left; }
.pk-prio td, .pk-odds td { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Small phones (320–359 px): tighter padding, no Diff column (the note under the table explains it) */
@media (max-width: 359px) {
	.pk__body { padding: 12px; }
	.pk__rounds, .pk-br { margin-inline: -12px; padding-inline: 12px; scroll-padding-inline: 12px; }
	.pk-tbl, .pk-card { padding: 10px; }
	.pk-tbl__head, .pk-row { grid-template-columns: minmax(0, 1fr) 34px 48px; }
	.pk-tbl__head:not(.pk-tbl__head--po) span:nth-child(3), .pk-row__diff { display: none; }
	.pk-tbl__head--po, .pk-row--po { grid-template-columns: minmax(0, 1fr) 44px 44px 44px; }
	.pk__tab { font-size: 14px; }
}
/* Round four: the match box clips overflow, so the focus ring goes inside the team button (it showed as one edge, like
   the line between the two teams) */
.pk-t:focus-visible { outline-offset: -3px; }
.pk-b[aria-busy="true"] { cursor: progress; }
