/* Dugout Overview: Matchday's front page (js/views/home.js). A 12-column board of cards: the poster, the Scout's call,
   the XI, the forecast, then the checklist, prices, leagues, last week, fixture swings and targets.
   Classes here belong to this screen; tests/css-lint.mjs fails if another screen's file defines the same class. */
.hm { display: grid; gap: 20px; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: stretch; }
.hm > * { min-width: 0; }
.hm-hero { grid-column: span 8; }
.hm-call { grid-column: span 4; }
.hm-xi { grid-column: span 7; }
.hm-fc { grid-column: span 5; }
.hm-prices { grid-column: span 5; }
.hm-mine { grid-column: span 7; }   /* last gameweek over your leagues */
.hm-swing, .hm-targets { grid-column: span 12; }
.hm-yr { grid-column: span 5; }   /* the season in numbers, once it's over */
.hm-call p { margin: 0; font-size: 15px; line-height: 1.45; }
.hm-yrl { list-style: none; margin: 0; padding: 0; }
.hm-yrl li { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line); }
.hm-yrl b { font: 900 extra-condensed 34px/1 var(--head); text-align: right; }
.hm-yrl span { font-size: 14px; }
.hm-cell { display: flex; flex-direction: column; }
.hm-cell > .box { flex: 1; }
.hm-stack { display: flex; flex-direction: column; gap: 20px; }
.hm-stack > .box:last-child { flex: 1; }
/* the XI's pitch grows to the height of the forecast and checklist beside it */
.hm-xi > .box { display: flex; flex-direction: column; }
.hm-xi .hm-pitch { flex: 1; }
.hm-sub { margin: 14px 0 4px; font: 800 condensed 13px/1.2 var(--head); text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }
.hm-sub small { font: 500 11px var(--num); text-transform: none; letter-spacing: 0; margin-left: 4px; }
.box h3 + .hm-sub { margin-top: 0; }
.hm-more { display: inline-block; margin-top: 14px; background: none; border: 0; border-bottom: 3px solid var(--accent); padding: 0 0 1px; color: var(--ink);
  font: 800 condensed 14.5px/1.2 var(--head); text-transform: uppercase; letter-spacing: .06em; }
.hm-more:hover { background: var(--hi); color: var(--hi-ink); }

/* ---- the poster */
/* Dugout 4: a rounded card with the gameweek as a dark inset panel and the figures as tiles beneath */
.hm-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; background: var(--card); border: 1px solid var(--edge); border-radius: 22px; box-shadow: var(--drop); overflow: hidden; padding: 10px; }
.hm-gw { display: flex; flex-direction: column; justify-content: flex-end; padding: 18px 26px 12px 22px; background: var(--ink); color: var(--bg); border-radius: 15px; }
.hm-gw small { font: 800 12px/1 var(--num); text-transform: uppercase; letter-spacing: .14em; color: var(--accent); }
/* in the dark looks the block is pale (it's the ink colour), where their bright accent disappears */
:root[data-theme=dark] .hm-gw small { color: var(--accent-ink); }
.hm-gw b { font: 900 extra-condensed 200px/.78 var(--head); letter-spacing: -.02em; color: var(--bg); margin-top: 10px; }
.hm-who { display: flex; flex-direction: column; gap: 8px; padding: 20px 24px 18px; min-width: 0; }
.hm-who > small { font: 700 12px var(--num); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.hm-who h1 { margin: 0; font-size: clamp(42px, 4.8vw, 78px); overflow-wrap: anywhere; }
.hm-dl { margin-top: auto; display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; }
.hm-dl small { font: 700 11.5px var(--num); text-transform: uppercase; letter-spacing: .06em; color: var(--ink2); }
.hm-dl b { font: 800 30px/1.15 var(--num); font-variant-numeric: tabular-nums; text-transform: uppercase; background: var(--hi); color: var(--hi-ink); border-radius: 999px; padding: 2px 16px; box-shadow: var(--drop-sm); }
.hm-cal { font-size: 13px; }   /* every deadline in your calendar (home.js saveDeadlines) */
.hm-kpis { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.hm-k { container-type: inline-size; padding: 11px 13px 12px; min-width: 0; background: var(--card2); border-radius: 13px; }
.hm-k small { display: block; font: 700 10.5px/1.3 var(--num); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-k b { display: block; font: 900 extra-condensed clamp(18px, 23cqi, 38px)/1 var(--head); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }   /* sized to its cell, so a rank like 1,811,876 fits */
.hm-k span { display: block; font: 600 11.5px var(--num); color: var(--ink2); white-space: nowrap; }
.hm-k.pos span { color: var(--good); }
.hm-k.neg span { color: var(--bad); }

/* ---- the Scout's call: the page's one orange card */
.hm-call { --frame: #151515; display: flex; flex-direction: column; gap: 12px; padding: 22px 24px 24px; background: var(--accent); color: #151515;
  border-radius: 22px; box-shadow: 0 2px 4px rgb(0 0 0 / .08), 0 22px 44px -18px color-mix(in srgb, var(--accent) 75%, #000); }
.hm-call h2 { margin: 0; font-size: 36px; color: #151515; }
.hm-alert { display: block; width: 100%; text-align: left; background: #151515; color: #f4f1e8; border: 0; border-radius: 13px; padding: 10px 13px; font: 600 13px/1.4 var(--font); }
.hm-alert b { color: var(--hi); font: 900 extra-condensed 20px/1 var(--head); margin-right: 3px; }
.hm-alert:hover { outline: 3px solid var(--hi); }
.hm-c { display: grid; gap: 3px; border-top: 1px solid rgb(21 21 21 / .22); padding-top: 11px; }
.hm-c small { font: 800 11px var(--num); text-transform: uppercase; letter-spacing: .1em; }
.hm-name { justify-self: start; background: none; border: 0; padding: 0; text-align: left; color: #151515; font: 900 extra-condensed 40px/.92 var(--head); text-transform: uppercase; }
button.hm-name:hover { text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: 4px; }
.hm-name s { text-decoration-thickness: 4px; opacity: .55; }
.hm-name.hm-sm { font-size: 27px; }
.hm-c > span { font-size: 13.5px; line-height: 1.45; }
.hm-c .linkbtn { color: #151515; text-decoration-color: #151515; }
.hm-c .linkbtn:hover { background: #151515; color: var(--accent); }
.hm-c b.up { color: var(--hi); background: #151515; padding: 0 6px; font-family: var(--num); }
.hm-acts { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; padding-top: 4px; }
.hm-acts .btn { background: #151515; color: var(--accent); border-color: #151515; box-shadow: none; }
.hm-acts .btn:hover { box-shadow: 0 8px 18px -8px rgb(0 0 0 / .5); }
.hm-acts .btn.ghost { background: #fbfaf6; color: #151515; }

/* ---- the XI */
.hm-pitch { position: relative; display: flex; flex-direction: column; justify-content: space-around; gap: 14px; min-height: 380px; padding: 18px 6px 14px;
  border: 1px solid var(--edge); border-radius: 14px; overflow: hidden; background: repeating-linear-gradient(180deg, var(--card2) 0 48px, var(--card) 48px 96px); }
.hm-pitch::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px dashed var(--line); }
.hm-pitch::after { content: ''; position: absolute; left: 50%; top: 50%; width: 90px; height: 90px; border: 2px dashed var(--line); border-radius: 50%; transform: translate(-50%, -50%); }
.hm-row { position: relative; z-index: 1; display: flex; justify-content: space-evenly; gap: 4px; }
.hm-p { width: 19%; max-width: 112px; display: flex; flex-direction: column; align-items: center; background: none; border: 0; padding: 0; color: var(--ink); transition: transform .1s; }
.hm-p:hover { transform: translateY(-3px); }
.hm-p .kit { width: 42px; height: 42px; font-size: 10.5px; margin-bottom: 9px; }
.hm-p b { width: 100%; padding: 2px 4px; background: var(--ink); color: var(--bg); border-radius: 8px 8px 0 0; font: 700 12.5px/1.5 var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-pxp { width: 100%; background: var(--card); border: 1px solid var(--edge); border-top: 0; border-bottom: 0; font: 800 15px/1.35 var(--num); font-variant-numeric: tabular-nums; }
.hm-p i { width: 100%; border-radius: 0 0 8px 8px; font: 700 normal 9.5px/16px var(--num); color: #fff; white-space: nowrap; overflow: hidden; }
.hm-bench { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; }
.hm-bench > small { font: 800 11px var(--num); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-right: 4px; }
.hm-note { margin: 10px 0 0; }
.hm-note .hm-more { margin: 0 0 0 6px; }

/* ---- the forecast */
.hm-big { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; }
.hm-big b { font: 900 extra-condensed 108px/.8 var(--head); font-variant-numeric: tabular-nums; }
.hm-big span { font-size: 13.5px; color: var(--ink2); line-height: 1.6; }
.hm-big em { font: 800 normal 13.5px var(--num); background: var(--hi); color: var(--hi-ink); padding: 0 4px; }

/* ---- prices: one line a player, so the card sits level with last week and the leagues beside it */
.hm-prices .plist li { padding: 6px; grid-template-columns: minmax(0, 1fr) 96px 58px; }
.hm-prices .plist .who b { display: inline; }
.hm-prices .plist .who small { margin-left: 7px; }
.hm-prices .plist .who { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- leagues */
.hm-lg { list-style: none; margin: 0; padding: 0; }
.hm-lg button { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; padding: 8px 0; background: none; border: 0; border-top: 1px solid var(--line); color: inherit; text-align: left; }
.hm-lg li:first-child button { border-top: 0; }
.hm-lg button:hover span { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.hm-pos { box-sizing: content-box; width: calc(var(--n, 2) * .44em); min-width: 1.2em; padding: 4px 8px 2px; font: 900 extra-condensed 34px/1 var(--head); font-variant-numeric: tabular-nums; text-align: center; white-space: nowrap; border: 1px solid var(--edge); border-radius: 12px; }   /* --n: the longest rank's length (home.js) */
.hm-lg li:first-child .hm-pos { background: var(--hi); color: var(--hi-ink); }
.hm-lg span { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.hm-lg small { display: block; font: 500 11.5px var(--num); color: var(--muted); }
.hm-lg i { font: 800 normal 12.5px var(--num); }

/* ---- fixture swings */
.hm-swg { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
.hm-sw { list-style: none; margin: 0; padding: 0; }
.hm-sw li { display: grid; grid-template-columns: minmax(118px, 190px) minmax(0, 1fr) 36px; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.hm-sw li:first-child { border-top: 0; }
.hm-sw button { display: flex; align-items: center; gap: 8px; min-width: 0; background: none; border: 0; padding: 0; color: inherit; text-align: left; }
.hm-sw button b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-sw button:hover b { background: var(--hi); color: var(--hi-ink); }
.hm-sw .kit { width: 24px; height: 24px; font-size: 0; box-shadow: 0 0 0 1.5px var(--card); }
.hm-sw em { font: 700 normal 12px var(--num); text-align: right; color: var(--muted); }

/* ---- targets */
.hm-tgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 24px; }
.hm-tcol { min-width: 0; }
.hm-t { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; padding: 8px 4px; background: none; border: 0; border-top: 1px solid var(--line); color: inherit; text-align: left; }
.hm-t.top { border: 1px solid var(--edge); border-radius: 13px; padding: 9px 8px; background: var(--card2); box-shadow: var(--drop-sm); margin-bottom: 4px; }
.hm-t:hover b { background: var(--hi); color: var(--hi-ink); }
.hm-t .kit { width: 32px; height: 32px; font-size: 8.5px; box-shadow: 0 0 0 1.5px var(--card), 0 0 0 3.5px var(--ring); }
.hm-t .kit .flag { display: none; }
.hm-t span { min-width: 0; }
.hm-t b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-t small { display: block; font: 500 11px var(--num); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-t em { font: 800 normal 16px var(--num); }

/* ---- narrower screens: the board reflows to two columns, then one */
/* tablets and small laptops: the poster and the call each take a full row (the call laid out across it, rather than
   stretched tall beside the forecast); the rest keeps the desktop's columns */
@media (max-width: 1279px) {
  .hm-hero, .hm-call { grid-column: span 12; }
  .hm-call { flex-flow: row wrap; gap: 12px 24px; align-items: flex-start; }
  .hm-call h2, .hm-alert, .hm-acts { flex: 1 0 100%; }
  .hm-c { flex: 1 1 220px; }
  .hm-acts { margin-top: 0; }
  .hm-tgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 899px) {
  .hm { gap: 16px; }
  .hm > * { grid-column: span 12; }
  .hm-call, .hm-xi, .hm-fc, .hm-prices, .hm-mine, .hm-yr, .hm-swing, .hm-targets { grid-column: span 12; }
  .hm-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hm-swg { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .hm-gw { padding: 14px 14px 8px; }
  .hm-gw b { font-size: 120px; }
  .hm-who { padding: 14px 14px 12px; }
  .hm-who h1 { font-size: 40px; }
  .hm-dl b { font-size: 22px; }
  .hm-k { padding: 8px 10px 10px; }
  .hm-k small { white-space: normal; min-height: 2.6em; }
  .hm-k span { white-space: normal; }
  .hm-pitch { min-height: 320px; padding: 14px 0 10px; }
  .hm-p .kit { width: 34px; height: 34px; font-size: 9px; }
  .hm-p b { font-size: 11px; }
  .hm-pxp { font-size: 13px; }
  .hm-tgrid { grid-template-columns: 1fr; }
  .hm-name { font-size: 34px; }
  .hm-big b { font-size: 88px; }
  .hm-sw li { grid-template-columns: minmax(0, 1fr) 136px 30px; }
  .hm-sw .strip i { font-size: 8px; }
}
@media (max-width: 400px) {
  .hm-gw b { font-size: 104px; }
}
/* rank target (home.js targetCard): the pick sits in the heading */
.hm-tg h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.hm-tg h3 .sel { margin-left: auto; font: 600 13px var(--font); text-transform: none; letter-spacing: 0; }
.hm-tgs { margin-bottom: 10px; }
