/* Dugout projections screen: styles only the projections view (js/views/projections.js) uses.
   Classes here belong to this screen; tests/css-lint.mjs fails if another screen's file defines the same class. */
.pj-verdict, .pj-sale, .pj-cap, .pj-two { margin-bottom: 14px; }
.pj-verdict { display: flex; flex-direction: column; gap: 4px; }
.pj-verdict small { font: 800 10.5px var(--num); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.pj-verdict b { font: 900 extra-condensed 30px/1.05 var(--head); text-transform: uppercase; }
.pj-verdict p { margin: 2px 0 0; }
.pj-sale h3 .small { font-weight: 400; }
.pj-sale > p, .pj-cap > p { margin: 10px 0 0; }

/* candidate and captain tables: the pick tinted, the ones you can't buy greyed, the player sold on top */
.pj-cands tr.pj-pick td { background: color-mix(in srgb, var(--hi) 45%, transparent); }
/* a dark look's highlighter half over its dark card is a mid-tone that light text can't be read on (2026-11-27 check):
   there the pick is marked by a bar instead */
:root[data-theme=dark] .pj-cands tr.pj-pick td { background: none; }
:root[data-theme=dark] .pj-cands tr.pj-pick td:first-child { box-shadow: inset 4px 0 0 var(--hi); }
.pj-cands tr.pj-out td { background: var(--card2); }
.pj-cands tr.pj-no td, .pj-cands tr.pj-no .who b { color: var(--muted); }
.pj-why { white-space: normal !important; min-width: 250px; max-width: 440px; font-size: 13px; line-height: 1.45; color: var(--ink2); }
.pj-why .linkbtn { font-size: 13px; }
.pj-tag { display: inline-block; font: 800 10px var(--num); letter-spacing: .05em; text-transform: uppercase; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--edge); background: var(--card2); color: var(--ink2); margin-right: 2px; }
.pj-tag.pj-pick { background: var(--accent); color: var(--accent-ink); }
.pj-tag.pj-close { background: var(--hi); color: var(--hi-ink); }
.pj-tag.pj-dear, .pj-tag.pj-club { color: var(--muted); }
/* phones: each row is a card (name and the deciding figure on top, the other numbers labelled under, then the
   fixtures and the verdict) instead of a 9-column table that hides the verdict off to the right */
@media (max-width: 600px) {
  .pj-cands thead { display: none; }
  .pj-cands tr { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 10px; padding: 10px 8px; border-top: 1px solid var(--line); }
  .pj-cands tr:first-child { border-top: 0; }
  .pj-cands td { border: 0; padding: 0; background: none !important; }
  .pj-cands td:first-child { order: 1; flex: 1 1 calc(100% - 130px); min-width: 0; white-space: normal; }
  .pj-cands td[data-l] { order: 3; font-size: 13px; }
  .pj-cands td[data-l]::before { content: attr(data-l) ' '; color: var(--muted); }
  .pj-cands td.pj-main[data-l] { order: 2; margin-left: auto; font-size: 17px; }
  .pj-cands td.pj-main[data-l]::before { font-size: 12px; }
  .pj-cands td.nx { order: 4; flex: 1 1 100%; margin-top: 4px; }
  .pj-cands td.pj-why { order: 5; flex: 1 1 100%; min-width: 0; max-width: none; }
  .pj-cands tr.pj-pick { background: color-mix(in srgb, var(--hi) 45%, transparent); }
  :root[data-theme=dark] .pj-cands tr.pj-pick { background: none; box-shadow: inset 4px 0 0 var(--hi); }
  :root[data-theme=dark] .pj-cands tr.pj-pick td:first-child { box-shadow: none; }
  .pj-cands tr.pj-out { background: var(--card2); }
}

/* track record: headline figures, then its transfer and yours week by week (the better side's points tinted, and
   named in the last column so it isn't colour alone) */
.pj-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 14px; }
.pj-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-left: 10px; border-left: 3px solid var(--frame); }
.pj-t small { font: 700 10.5px var(--num); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pj-t b { font: 900 extra-condensed 32px/1 var(--head); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pj-t span { font-size: 12px; color: var(--ink2); }
.pj-t.pos b { color: var(--good); }
.pj-t.neg b { color: var(--bad); }
.pj-rec td { vertical-align: top; }
.pj-rec td.pj-mv { white-space: normal; min-width: 180px; line-height: 1.5; }
.pj-rec td small { display: block; font-size: 11.5px; color: var(--muted); }
.pj-rec td.pj-mv small { display: inline; }
.pj-rec td.pj-pt { white-space: nowrap; }
.pj-rec tr.pj-itsw td:nth-child(3), .pj-rec tr.pj-youw td:nth-child(5) { background: color-mix(in srgb, var(--hi) 45%, transparent); }
@media (max-width: 600px) {
  .pj-rec thead { display: none; }
  .pj-rec tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 10px 8px; border-top: 1px solid var(--line); }
  .pj-rec tr:first-child { border-top: 0; }
  .pj-rec td { border: 0; padding: 0; }
  .pj-rec td.pj-wk { display: flex; gap: 8px; align-items: baseline; }
  .pj-rec td.pj-wk small { display: inline; }
  .pj-rec td.pj-bt { grid-column: 2; grid-row: 1; }
  .pj-rec td.pj-mv { min-width: 0; }
  .pj-rec td[data-l]::before { content: attr(data-l) ': '; color: var(--muted); }
  .pj-rec td.pj-pt { text-align: right; }
  .pj-rec tr.pj-itsw td:nth-child(3), .pj-rec tr.pj-youw td:nth-child(5) { background: none; }
  .pj-rec tr.pj-itsw td:nth-child(3) b, .pj-rec tr.pj-youw td:nth-child(5) b { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
}

/* the projection grid: one hue, more expected points = stronger (sequential bins, legend below) */
.pj-grid tr > :first-child { position: sticky; left: 0; z-index: 1; background: var(--card); }   /* names stay put while the weeks scroll */
.pj-grid td.pj-x { text-align: center; min-width: 58px; padding: 5px 6px; box-shadow: inset 0 0 0 2px var(--card); }
.pj-x b { display: block; font: 800 13.5px/1.2 var(--num); }
.pj-x small { display: block; font-size: 11px; color: var(--ink2); }
.pj-x sup { font-size: 9px; color: var(--accent-text); margin-left: 1px; }
.pj-h0 { background: transparent; }
.pj-h1 { background: color-mix(in srgb, var(--seq) 10%, transparent); }
.pj-h2 { background: color-mix(in srgb, var(--seq) 18%, transparent); }
.pj-h3 { background: color-mix(in srgb, var(--seq) 28%, transparent); }
.pj-h4 { background: color-mix(in srgb, var(--seq) 40%, transparent); }
.pj-h5 { background: color-mix(in srgb, var(--seq) 52%, transparent); }
.pj-grid td.pj-bench { opacity: .45; }
.pj-grid td.pj-tot { font: 600 14px var(--num); }
.pj-grid tr.pj-team td, .pj-pts tr.pj-team td { border-top: 1px solid var(--edge); }
.pj-legend i.pj-h0 { border: 1px solid var(--line); }
.pj-legend span.pj-bench { opacity: .55; }
/* what it said against what they scored: on phones the names wrap, so the totals beside them stay in view */
@media (max-width: 600px) {
  .pj-said td.l:not([colspan]) { white-space: normal; min-width: 92px; max-width: 118px; }
  .pj-said td.l small { display: block; }
}

/* form check: two lists side by side on wide screens */
.pj-two { display: grid; gap: 14px; }
@media (min-width: 900px) { .pj-two { grid-template-columns: 1fr 1fr; align-items: start; } }
.pj-fc { list-style: none; margin: 0; padding: 0; }
.pj-fc li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.pj-fc li:first-child { border-top: 0; padding-top: 0; }
.pj-fc li > div:first-child { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; min-width: 0; }
.pj-fc button.who { background: none; border: 0; padding: 0; text-align: left; color: inherit; font: inherit; cursor: pointer; }
.pj-fc button.who small { color: var(--muted); }
.pj-fc li.mine .who b { text-decoration: underline 3px var(--accent); text-underline-offset: 3px; text-decoration-skip-ink: none; }
.pj-fc p { grid-column: 1 / -1; margin: 0; color: var(--ink2); }
.pj-fcn { display: flex; gap: 6px; align-items: baseline; font: 800 16px var(--num); font-variant-numeric: tabular-nums; color: var(--ink2); }

/* how it's worked out: numbered steps */
.pj-found { margin: -6px 0 12px; }
/* minmax(0, …): a long table in a step mustn't stretch the column past the screen (it did on phones) */
.pj-steps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-bottom: 14px; }
@media (min-width: 1300px) { .pj-steps { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.pj-step h3 { display: flex; align-items: center; gap: 10px; }
.pj-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); border: 1px solid var(--edge); font: 800 14px var(--num); flex: none; }
.pj-step p { margin: 0 0 8px; font-size: 14.5px; color: var(--ink2); }
.pj-step p:last-child { margin-bottom: 0; }
.pj-sub { margin: 12px 0 6px; font: 800 condensed 14px var(--head); text-transform: uppercase; letter-spacing: .05em; }
.pj-pts { margin-bottom: 8px; }
.pj-pts td.pj-how { white-space: normal; text-align: left; }
@media (max-width: 600px) { .pj-pts td.l { white-space: normal; } .pj-pts td { padding-inline: 5px; } }
