/* ===== Kickwise home page: today's matchday programme (index.html, assets/home.js) ===== */

.home section.block { padding: 72px 0 0; }
.home main > section:last-child { padding-bottom: 88px; }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 14px 24px; flex-wrap: wrap; margin-bottom: 24px; }
.sec-head h2 { font-size: clamp(40px, 5vw, 64px); }
.sec-head p { margin: 8px 0 0; color: var(--muted); font-size: 16px; flex-basis: 100%; }
.sec-head .top-tools .kw-ico { width: 15px; height: 15px; }

/* ---------- The cover ---------- */
.home .cover { padding: 20px 0 0; }
.cover-frame {
  position: relative; overflow: hidden; border-radius: 22px; border: 1px solid var(--line-strong);
  background: radial-gradient(70% 110% at 100% 0%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 60%), var(--surface);
}
.masthead {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 26px; padding: 14px 26px;
  border-bottom: 1px solid var(--line-strong);
  font-family: var(--display); font-weight: 800; font-size: 19px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted);
}
.mh-title { color: var(--text); }
.mh-issue b { color: var(--accent); font-weight: 900; }
.mh-next { margin-left: auto; }
.mh-next b { color: var(--text); font-weight: 900; }

.cover-body { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 32px; padding: 30px 26px 30px; }
.cover h1 { font-size: clamp(44px, 5.4vw, 80px); line-height: .9; max-width: 12ch; }
.cover-sub { margin: 14px 0 22px; font-size: 18px; color: var(--muted); max-width: 46ch; }
.daily-cover { min-height: 56px; }
.cover-cta { height: 52px; padding: 0 24px; font-size: 16px; }
.cover-cta .kw-ico { width: 18px; height: 18px; }

/* The cover star: a lime plate with the puzzle number, like the big number on a programme cover */
.cover-star { display: grid; }
.star-plate {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 16px;
  min-height: 340px; padding: 22px 24px; border-radius: 16px; overflow: hidden;
  background: var(--accent); color: var(--accent-ink);
}
.star-q { font-family: var(--display); font-weight: 900; font-size: clamp(200px, 20vw, 300px); line-height: .78; letter-spacing: -.02em; }
.star-cap { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 10px; border-top: 2px solid currentColor;
  font-family: var(--display); font-weight: 900; font-size: 26px; text-transform: uppercase; line-height: 1; }
.star-cap b { font-weight: 900; }
.cover-star.solved .star-plate { background: var(--ok); }
.cover-star.failed .star-plate { background: var(--surface-2); color: var(--text); }
@media (prefers-reduced-motion: no-preference) {
  .star-q { animation: star-in .9s cubic-bezier(.16, 1, .3, 1) both .1s; transform-origin: 30% 80%; }
}
@keyframes star-in { from { opacity: 0; transform: translateY(18px) rotate(-6deg) scale(.92); } }

/* "In this issue": the contents strip along the bottom edge of the cover */
.contents { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); }
.contents a { display: flex; align-items: baseline; gap: 10px; padding: 16px 26px; text-decoration: none; color: var(--muted); font-size: 14.5px; transition: background .15s; }
.contents a + a { border-left: 1px solid var(--line-strong); }
.contents b { font-family: var(--display); font-weight: 900; font-size: 32px; line-height: 1; color: var(--text); text-transform: uppercase; transition: color .15s; }
.contents a:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.contents a:hover b { color: var(--accent); }

/* ---------- Team sheet: games as numbered players ---------- */
.sheet { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(5, auto);
  grid-auto-flow: column; column-gap: 44px; border-top: 3px solid var(--text); }
.sheet-row a {
  display: grid; grid-template-columns: 60px minmax(0, 1fr) auto 18px; gap: 18px; align-items: center;
  padding: 18px 0; border-bottom: 1px solid var(--line); text-decoration: none;
}
.shirt {
  width: 60px; height: 60px; display: grid; place-items: center; border-radius: 14px; background: var(--g); color: #0b120e;
  font-family: var(--display); font-weight: 900; font-size: 36px; line-height: 1; transition: transform .35s cubic-bezier(.16, 1, .3, 1);
}
.sr-main { min-width: 0; }
.sr-title { display: block; font-family: var(--display); font-weight: 900; font-size: 30px; line-height: .95; text-transform: uppercase; transition: color .15s; }
.sr-goal { display: block; margin-top: 5px; color: var(--muted); font-size: 14.5px; line-height: 1.4; }
.sr-pv { display: block; margin-top: 11px; }
.sr-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.sr-state { display: inline-flex; align-items: center; gap: 5px; color: var(--ok); font-weight: 600; }
.sr-state .kw-ico { width: 14px; height: 14px; }
.sr-state.new { color: var(--accent); }
.sr-go { color: var(--muted); transition: transform .25s cubic-bezier(.16, 1, .3, 1), color .15s; }
.sr-go .kw-ico { width: 18px; height: 18px; }
.sheet-row a:hover .sr-title, .sheet-row a:focus-visible .sr-title { color: var(--g); }
.sheet-row a:hover .shirt { transform: rotate(-5deg) scale(1.06); }
.sheet-row a:hover .sr-go { color: var(--text); transform: translateX(4px); }
.sheet-row a:focus-visible { outline-offset: 4px; border-radius: 6px; }

/* Previews: a labelled piece of the real game, in chips */
.sr-pv > div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sr-pv span, .sr-pv i, .sr-pv b { font-style: normal; }
.sr-pv > div > span, .sr-pv > div > i {
  display: inline-flex; align-items: center; gap: 6px; height: 27px; padding: 0 11px; border-radius: 999px;
  background: var(--bg-2); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--text); white-space: nowrap;
}
.sr-pv b { font-weight: 800; color: var(--g); }
.sr-pv .pv-q { background: transparent; border-style: dashed; border-color: var(--line-strong); color: var(--muted); }
.sr-pv .pv-q b { color: var(--muted); }
.sr-pv .pv-x { border-color: var(--g); color: var(--g); }
.sr-pv .pv-chain > i { background: transparent; border-style: dashed; border-color: var(--line-strong); color: var(--muted); }
.sr-pv .pv-match > b { color: var(--text); font-family: var(--display); font-size: 18px; padding: 0 4px; }
.sr-pv .pv-daily { flex-direction: column; align-items: flex-start; gap: 4px; }
.sr-pv .pv-row { display: flex; gap: 4px; }
.sr-pv .pv-row i { display: inline-grid; place-items: center; height: 24px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700; }
.sr-pv .pv-row i.ok { background: var(--ok); color: #0b120e; }
.sr-pv .pv-row i.near { background: var(--warn); color: #0b120e; }
.sr-pv .pv-row i.no { background: var(--surface-2); color: var(--muted); }

/* ---------- Quests ---------- */
.quest-board { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 36px; padding: 30px; border-radius: 22px;
  background: var(--surface); border: 1px solid var(--line); }
.qb-side h2 { font-size: clamp(40px, 5vw, 64px); }
.qb-side p { margin: 10px 0 18px; color: var(--muted); max-width: 36ch; }
.qb-list .quests li { padding: 14px 16px; }
.qb-list .quests .q-top b { font-size: 15px; }

/* ---------- Team news: the shared .top-* cards, heading spacing only ---------- */
.home .top-news .sec-head { margin-bottom: 24px; }

/* ---------- Collector's page ---------- */
.collector {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: center; padding: 40px;
  border-radius: 22px; border: 1px solid var(--line);
  background: radial-gradient(70% 90% at 25% 50%, color-mix(in srgb, #ffd23f 13%, transparent), transparent 70%), var(--bg-2);
}
.col-fan { position: relative; height: 290px; display: flex; justify-content: center; align-items: center; }
.col-fan .pcard { position: absolute; transition: transform .5s cubic-bezier(.16, 1, .3, 1); filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .45)); }
.col-fan .pcard:nth-child(1) { transform: translateX(-118px) translateY(14px) rotate(-11deg); }
.col-fan .pcard:nth-child(2) { transform: translateY(-8px); z-index: 2; }
.col-fan .pcard:nth-child(3) { transform: translateX(118px) translateY(14px) rotate(11deg); }
.collector:hover .col-fan .pcard:nth-child(1) { transform: translateX(-140px) translateY(10px) rotate(-15deg); }
.collector:hover .col-fan .pcard:nth-child(3) { transform: translateX(140px) translateY(10px) rotate(15deg); }
.col-copy h2 { font-size: clamp(40px, 5vw, 64px); }
.col-copy p { margin: 12px 0 0; color: var(--muted); max-width: 40ch; }
.col-progress { display: flex; align-items: baseline; gap: 10px; margin: 20px 0 22px; color: var(--muted); }
.col-progress b { font-family: var(--display); font-weight: 900; font-size: 64px; line-height: .85; color: #ffd23f; }
.col-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Tablets and phones ---------- */
@media (max-width: 980px) {
  .cover-body { grid-template-columns: minmax(0, 1fr) 220px; gap: 22px; }
  .star-plate { min-height: 280px; }
  .sheet { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-flow: row; }
}
@media (max-width: 720px) {
  .home section.block { padding-top: 52px; }
  .home .cover { padding-top: 12px; }
  .cover-frame { border-radius: 18px; }
  /* phones: the masthead is one line and the puzzle starts high, so the first screen also shows what else is here */
  .masthead { padding: 9px 14px; gap: 4px 12px; font-size: 13.5px; flex-wrap: nowrap; white-space: nowrap; }
  .mh-title { display: none; }
  .mh-next { margin-left: auto; }
  .cover-body { grid-template-columns: 1fr; padding: 14px 14px 16px; gap: 0; }
  .cover-star { display: none; }
  .cover h1 { font-size: 32px; max-width: none; margin-bottom: 14px; }
  .cover-sub { display: none; }
  .contents a { flex-direction: column; gap: 2px; padding: 12px 14px; font-size: 12.5px; line-height: 1.3; }
  .contents b { font-size: 24px; }
  .sheet-row a { grid-template-columns: 46px minmax(0, 1fr) 16px; gap: 14px; padding: 16px 0; align-items: start; }
  .shirt { width: 46px; height: 46px; border-radius: 12px; font-size: 28px; }
  .sr-title { font-size: 25px; }
  .sr-meta { grid-column: 2; grid-row: 2; flex-direction: row; align-items: center; gap: 12px; margin-top: -6px; }
  .sr-go { grid-column: 3; grid-row: 1; align-self: center; }
  .quest-board { grid-template-columns: 1fr; gap: 16px; padding: 20px 16px; }
  .collector { grid-template-columns: 1fr; gap: 12px; padding: 28px 16px; }
  .col-fan { height: 240px; }
  .col-fan .pcard:nth-child(1) { transform: translateX(-92px) translateY(14px) rotate(-11deg); }
  .col-fan .pcard:nth-child(3) { transform: translateX(92px) translateY(14px) rotate(11deg); }
  .col-progress b { font-size: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  .shirt, .sr-go, .col-fan .pcard { transition: none; }
}
.sr-pv b.pv-q { display: inline; height: auto; padding: 0; border: 0; background: none; }

/* Guides strip */
.guides-block { padding-top: 0; }
.home-guides { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.home-guides a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-decoration: none; transition: border-color .15s, transform .2s; }
.home-guides a:hover { border-color: var(--accent); transform: translateY(-2px); }
.home-guides b { font-size: 17px; line-height: 1.3; }
.home-guides span { font-size: 14px; color: var(--muted); }
@media (max-width: 960px) { .home-guides { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .home-guides { grid-template-columns: 1fr; } }
