/* play-polls.html — page-specific composition (system tokens only) */

.polls-jump { margin-bottom: var(--sp-5); }
.polls-grid { align-items: start; }
.polls-grid > .card { height: 100%; }
.polls-grid .poll { height: 100%; }

/* ---- all-time XI builder ---------------------------------------------------- */
.xi-lead { margin-bottom: var(--sp-4); max-width: var(--reading-max); font-size: var(--fs-base); line-height: var(--lh-normal); color: var(--text-muted); }

.xi { display: block; }
.xi__bar {
  display: flex; align-items: center; gap: var(--sp-3);
  position: sticky; top: calc(var(--header-h) + var(--sp-2)); z-index: var(--z-sticky);
  margin-bottom: var(--sp-3); padding: var(--sp-3);
  background: var(--surface-1); border: var(--bw) solid var(--border-subtle); border-radius: var(--r-md);
}
.xi__progress { flex: 1 1 auto; min-width: 0; }
.xi__actions { display: flex; align-items: center; gap: var(--sp-2); flex: none; }
.xi__actions .chip--reward { display: none; }
.xi__actions .btn { white-space: nowrap; }
.xi__pitch { margin-bottom: var(--sp-4); }
.xi__pitch .pitch { max-width: 440px; }
.xi__list { display: grid; gap: var(--sp-2); align-content: start; }
.xi__list-title {
  font-family: var(--font-display); font-stretch: var(--stretch-c); font-weight: var(--fw-bold);
  font-size: var(--fs-lg); line-height: var(--lh-tight); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--text-strong);
}
.xi__hint { font-size: var(--fs-sm); line-height: var(--lh-normal); color: var(--text-muted); }
.xi__list-foot { display: flex; justify-content: flex-start; padding-top: var(--sp-2); }

.xi-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-1) var(--sp-3); margin: 0; padding: 0; list-style: none; }
.xi-row {
  display: flex; align-items: center; gap: var(--sp-2); width: 100%; min-height: var(--tap); padding: 0 var(--sp-2);
  background: none; border: 0; border-bottom: var(--bw) solid var(--border-subtle); border-radius: 0;
  color: var(--text); font: inherit; font-size: var(--fs-md); text-align: left; cursor: pointer;
}
.xi-row:hover { background: var(--hover-tint); }
.xi-row:focus-visible { outline: var(--bw-2) solid var(--focus); outline-offset: -2px; }
.xi-row__pos {
  flex: none; display: grid; place-items: center; min-width: 30px; height: 24px; padding: 0 4px;
  border-radius: var(--r-xs); background: var(--surface-3); color: var(--text-strong);
  font-family: var(--font-display); font-stretch: var(--stretch-c); font-weight: var(--fw-bold); font-size: var(--fs-xs); letter-spacing: var(--tracking-label);
}
.xi-row__name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xi-row__full { display: none; }
.xi-row.is-filled .xi-row__name { color: var(--text-strong); font-weight: var(--fw-semibold); }
.xi-row.is-empty .xi-row__name { color: var(--text-muted); }
.xi-row__ic { flex: none; color: var(--text-muted); }
.xi-row.is-filled .xi-row__ic { color: var(--success); }

@media (min-width: 700px) {
  .xi { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); grid-template-areas: "pitch bar" "pitch list"; gap: var(--sp-4) var(--sp-6); align-items: start; }
  .xi__bar { position: static; grid-area: bar; flex-direction: column; align-items: stretch; margin: 0; padding: var(--sp-4); gap: var(--sp-4); }
  .xi__actions { justify-content: space-between; }
  .xi__actions .chip--reward { display: inline-flex; }
  .xi__actions .btn { flex: 1 1 auto; }
  .xi__pitch { grid-area: pitch; margin: 0; }
  .xi__list { grid-area: list; }
  .xi-list { grid-template-columns: 1fr; }
  .xi-row__full { display: inline; }
  .xi-row__short { display: none; }
}
@media (min-width: 1440px) { .xi { grid-template-columns: minmax(0, 440px) minmax(0, 1fr); } }

/* Submit stays visibly "not ready" until all eleven slots are filled */
.xi__actions .btn[aria-disabled="true"] { opacity: .55; }

/* ---- candidate sheet --------------------------------------------------------- */
.xi-picker__body { display: grid; gap: var(--sp-3); align-content: start; padding: var(--sp-4); }
.xi-picker__sub { font-size: var(--fs-sm); color: var(--text-muted); }
.xi-cands { display: grid; gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
.xi-cand {
  position: relative; display: flex; align-items: center; gap: var(--sp-3); width: 100%; min-height: 56px; padding: var(--sp-2) var(--sp-3);
  background: var(--surface-1); border: var(--bw) solid var(--border); border-radius: var(--r-sm);
  color: var(--text); font: inherit; text-align: left; cursor: pointer;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.xi-cand:hover:not(:disabled) { border-color: var(--border-strong); background: var(--surface-2); }
.xi-cand:focus-visible { outline: var(--bw-2) solid var(--focus); outline-offset: 1px; }
.xi-cand:disabled { cursor: not-allowed; opacity: .55; }
.xi-cand__main { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.xi-cand__main b { font-weight: var(--fw-semibold); color: var(--text-strong); font-size: var(--fs-md); }
.xi-cand__main small { font-size: var(--fs-xs); color: var(--text-muted); }
.xi-cand__check { flex: none; opacity: 0; color: var(--text-strong); }
.xi-cand.is-mine { border-color: var(--yellow); box-shadow: inset 0 0 0 var(--bw) var(--yellow); background: var(--yellow-soft); }
.xi-cand.is-mine .xi-cand__check { opacity: 1; }

/* ---- community comparison ----------------------------------------------------- */
.xi-results { display: grid; gap: var(--sp-4); }
.xi-results__grid { display: grid; gap: var(--sp-4); align-items: start; }
.xi-results__pitch .pitch { max-width: 440px; }
.xi-results__side { display: grid; gap: var(--sp-2); }
.pitch__player--pct { cursor: default; }
.pitch__pct {
  padding: 0 5px; border-radius: var(--r-xs);
  background: var(--brand-yellow); color: var(--on-yellow);
  font-family: var(--font-display); font-stretch: var(--stretch-c); font-weight: var(--fw-bold); font-size: var(--fs-xs); line-height: 1.35; font-variant-numeric: tabular-nums;
}
.pitch__player--pct .pitch__num { font-size: calc(var(--pp) * .42); }

.xi-cmp { display: grid; margin: 0; padding: 0; list-style: none; }
.xi-cmp__row {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-1); border-bottom: var(--bw) solid var(--border-subtle);
}
.xi-cmp__row.is-match { background: var(--yellow-soft); }
.xi-cmp__pos {
  display: grid; place-items: center; height: 24px; border-radius: var(--r-xs); background: var(--surface-3); color: var(--text-strong);
  font-family: var(--font-display); font-stretch: var(--stretch-c); font-weight: var(--fw-bold); font-size: var(--fs-xs); letter-spacing: var(--tracking-label);
}
.xi-cmp__main { display: grid; gap: 3px; min-width: 0; }
.xi-cmp__main b { color: var(--text-strong); font-weight: var(--fw-semibold); font-size: var(--fs-md); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xi-cmp__main small { display: flex; align-items: center; gap: 4px; font-size: var(--fs-xs); color: var(--text-muted); }
.xi-cmp__row.is-match .xi-cmp__main small { color: var(--text); font-weight: var(--fw-medium); }
.xi-cmp__bar { display: block; height: 6px; border-radius: var(--r-xs); background: var(--bar-track); overflow: hidden; }
.xi-cmp__bar i { display: block; height: 100%; width: calc(var(--pct) * 1%); background: var(--bar-strong); }
.xi-cmp__pct { font-family: var(--font-display); font-stretch: var(--stretch-c); font-weight: var(--fw-bold); font-size: var(--fs-lg); color: var(--text-strong); font-variant-numeric: tabular-nums; }

@media (min-width: 700px) {
  .xi-results__grid { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: var(--sp-6); }
}
@media (min-width: 1440px) { .xi-results__grid { grid-template-columns: minmax(0, 440px) minmax(0, 1fr); } }
