/* Liga Aktywni — live matches (2026-11-22). Markup: src/live-view.mjs; behaviour: static/live/live.js.
   Day blocks are [hidden] in the static HTML; live.js shows them only on a league day. */

/* status line */
.lv-st, .lb-st { display: inline-flex; align-items: center; gap: .45rem; font-size: .8125rem; font-weight: 600; color: var(--ink3); font-variant-numeric: lining-nums; }
.lv-st.live, .lb-st.live { color: var(--live); }
.lv-st.live i, .lb-st.live i, .ek-st.live i { width: .55rem; height: .55rem; border-radius: 50%; background: currentColor; animation: pulse 1.8s ease-out infinite; flex: none; }
.lv-st.to, .lb-st.to { color: #B45309; }
.lv-st.done, .lb-st.done { color: var(--ink2); }
.lv-st small, .lb-st small { font-weight: 500; color: var(--ink3); }

/* ── day block (home band, season page) ── */
.lv-day[hidden], [data-live-day][hidden] { display: none !important; }
.lv-hd { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .5rem 1.5rem; margin-bottom: 1.1rem; }
.lv-hd h2 { margin: 0; }
.lv-hd p { margin: .35rem 0 0; color: var(--ink2); }
/* matches side by side, separated by hairlines like the departments row and the 7-day board (no boxes) */
.lv-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.lv-slot { display: grid; min-width: 0; border-top: 1px solid var(--line); }
@media (min-width: 40rem) {
  .lv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lv-slot:nth-child(2n) { border-left: 1px solid var(--line); }
  .lv-slot:nth-child(2n) .lv-card { padding-left: 1.5rem; }
  .lv-slot:nth-child(2n + 1) .lv-card { padding-right: 1.5rem; }
}
@media (min-width: 72rem) {
  .lv-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lv-slot:nth-child(n) { border-left: 1px solid var(--line); }
  .lv-slot:nth-child(4n + 1) { border-left: 0; }
  .lv-slot:nth-child(n) .lv-card { padding-inline: 1.5rem; }
  .lv-slot:nth-child(4n + 1) .lv-card { padding-left: 0; }
}
.h4 .lv-day { padding-top: clamp(1.75rem, 3.5vw, 2.75rem); padding-bottom: clamp(1.75rem, 3.5vw, 2.75rem); }
.lv-today { margin: 0 0 2rem; padding: 1.25rem 0 1.5rem; border-bottom: 1px solid var(--line); }
.lv-today h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); }

/* compact card */
.lv-card { display: grid; align-content: start; gap: .5rem; padding: 1.1rem 0 1.25rem; color: var(--ink); text-decoration: none; min-width: 0; }
.lv-card:hover .lv-n { text-decoration: underline; text-underline-offset: .18em; }
.lv-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto auto; align-items: center; gap: .6rem; }
.lv-n { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-row.w .lv-n { font-weight: 800; }
.lv-row.l .lv-n { color: var(--ink3); }
.lv-sw { min-width: 1.2rem; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink3); }
.lv-pt { min-width: 2.2rem; text-align: right; font-family: var(--display); font-size: 1.6rem; font-weight: 800; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.lv-row:not(.w) .lv-pt { color: var(--ink2); }
.lv-chips, .lb-chips { display: flex; flex-wrap: wrap; gap: .3rem .55rem; font-size: .8125rem; color: var(--ink2); font-variant-numeric: lining-nums; }
.lv-chips small, .lb-chips small { margin-right: .25rem; color: var(--ink3); font-size: .6875rem; font-weight: 600; }
.lv-meta { font-size: .8125rem; color: var(--ink3); }

/* ── wide board (/liga/dzis/, match page) ── */
.lbs { display: grid; }
.lb { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-areas: "st st st" "h s a"; align-items: center; gap: .75rem clamp(1rem, 4vw, 3rem); }
.lb-item { padding: clamp(1.25rem, 3vw, 2rem) 0 1rem; border-bottom: 1px solid var(--line); }
.lb-item:first-child { border-top: 1px solid var(--line); }
.lb-st { grid-area: st; justify-self: center; }
.lb-t { display: grid; justify-items: center; gap: .55rem; text-align: center; color: var(--ink); text-decoration: none; }
.lb-t.h { grid-area: h; }
.lb-t.a { grid-area: a; }
.lb-t b { font-family: var(--display); font-weight: 800; font-size: clamp(1rem, 2.1vw, 1.5rem); line-height: 1.15; letter-spacing: -.015em; }
a.lb-t:hover b { text-decoration: underline; }
.lb-t.l { opacity: .55; }
.lb-s { grid-area: s; display: grid; justify-items: center; gap: .45rem; }
.lb-big { display: flex; align-items: center; gap: .08em; font-family: var(--display); font-weight: 800; font-size: clamp(3rem, 9vw, 6rem); line-height: .95; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.lb-big i { font-style: normal; color: var(--line2); font-size: .7em; transform: translateY(-.04em); }
.lb-big .dim { color: #A9B0BC; }
.lb-time { font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 5vw, 3.25rem); letter-spacing: -.03em; line-height: 1; }
.lb-sets { font-size: .9375rem; color: var(--ink2); }
.lb-sets b { font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.lb-chips { justify-content: center; }
.lb.live .lb-big > span:not(.dim) { color: var(--ink); }
@media (max-width: 40rem) { .lb .crest { width: 52px; height: 52px; } .lb-chips { max-width: 9rem; } }
.lb-more { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; justify-content: center; margin: 1rem 0 0; font-size: .875rem; }
.board-live { margin: 1.25rem 0 .5rem; }

/* digits that just changed */
@keyframes lvbump { 0% { transform: scale(1.18); color: var(--live); } 100% { transform: none; } }
.bump { display: inline-block; animation: lvbump .8s cubic-bezier(.2, .8, .2, 1) 1; }
@media (prefers-reduced-motion: reduce) { .bump { animation: none; } }

/* ── big screen ── */
body.ekb { margin: 0; overflow-x: hidden; --ek-bg: #FFFFFF; --ek-fg: var(--ink); --ek-fg2: var(--ink2); --ek-fg3: var(--ink3); --ek-dim: #B3BAC6; --ek-chip: var(--mist); --ek-line: var(--line); --ek-live: var(--live); background: var(--ek-bg); color: var(--ek-fg); }
body.ekb::before { content: ""; position: fixed; inset: 0 0 auto; height: 4px; z-index: 5; background: linear-gradient(90deg, var(--ball-g) 0 33.33%, var(--ball-b) 33.33% 66.66%, var(--ball-y) 66.66%); }
.ek-wrap { min-height: 100vh; min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; gap: clamp(14px, 3vh, 40px); padding: clamp(16px, 2.4vw, 40px) clamp(16px, 3.2vw, 64px); }
.ek-top { display: flex; align-items: center; gap: clamp(10px, 1.2vw, 20px); min-width: 0; }
.ek-logo { width: clamp(40px, 3.6vw, 64px); height: auto; flex: none; }
.ek-ttl { flex: 1; min-width: 0; display: grid; gap: 4px; }
.ek-ttl a { color: var(--ek-fg2); text-decoration: none; font-size: clamp(13px, 1.15vw, 20px); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ek-st { display: inline-flex; align-items: center; gap: .5em; font-size: clamp(14px, 1.5vw, 26px); font-weight: 800; color: var(--ek-fg3); font-variant-numeric: lining-nums; }
.ek-st.live { color: var(--ek-live); }
.ek-st.to { color: #B45309; }
.ek-st small { font-weight: 600; color: var(--ek-fg3); }
.ek-act { display: flex; gap: 8px; }
.ek-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--ek-line); background: transparent; color: var(--ek-fg); border-radius: 999px; padding: 9px 15px; font: 700 13px var(--text); cursor: pointer; white-space: nowrap; }
.ek-btn:hover { background: var(--ek-chip); }
.ek { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-areas: "l s r"; align-items: center; gap: clamp(16px, 2.4vw, 56px); min-width: 0; }
.ek-team { min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: clamp(8px, 1.6vh, 18px); }
.ek-team.l { grid-area: l; }
.ek-team.r { grid-area: r; }
.ek-crest { width: clamp(64px, min(8vw, 13vh), 150px); height: auto; }
.ek-name { margin: 0; font-size: calc(clamp(22px, min(3vw, 5.5vh), 68px) * var(--k, 1)); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; color: var(--ek-fg); overflow-wrap: break-word; }
.ek-win { padding: 5px 14px; border-radius: 999px; background: var(--ball-y); color: var(--ink); font-size: clamp(12px, 1.1vw, 18px); font-weight: 800; }
.ek-team.lose { opacity: .45; }
.ek-roster { list-style: none; margin: clamp(4px, 1vh, 12px) 0 0; padding: clamp(10px, 1.6vh, 18px) 0 0; border-top: 1px solid var(--ek-line); width: min(100%, 30em); columns: 2; column-gap: 1.6em; text-align: left; font-size: clamp(12px, min(.98vw, 1.9vh), 20px); font-weight: 600; line-height: 1.55; color: var(--ek-fg2); }
.ek-roster li { break-inside: avoid; display: flex; align-items: baseline; min-width: 0; }
.ek-roster li span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ek-roster abbr { flex: none; text-decoration: none; margin-left: .45em; padding: 0 .35em; border-radius: 4px; background: var(--ek-fg); color: var(--ek-bg); font-size: .68em; font-weight: 800; vertical-align: .12em; }
.ek-score { grid-area: s; display: flex; flex-direction: column; align-items: center; gap: clamp(10px, 2vh, 24px); text-align: center; }
.ek-big { display: flex; align-items: center; gap: .06em; font-family: var(--display); font-weight: 800; font-size: clamp(96px, min(15vw, 36vh), 560px); line-height: .86; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.ek-big > i { font-style: normal; color: var(--ek-dim); font-size: .55em; transform: translateY(-.06em); }
.ek-big > span.dim { color: var(--ek-dim); }
.ek-time { font-family: var(--display); font-weight: 800; font-size: clamp(64px, min(11vw, 22vh), 300px); line-height: 1; letter-spacing: -.04em; font-variant-numeric: lining-nums; }
.ek-sets, .ek-tu { display: flex; align-items: center; gap: 14px; font-size: clamp(14px, 1.4vw, 24px); font-weight: 700; color: var(--ek-fg3); }
.ek-sets em, .ek-tu em { font-style: normal; }
.ek-sw { display: grid; place-items: center; min-width: 1.7em; height: 1.7em; border-radius: 8px; background: var(--ek-chip); color: var(--ek-fg); font: 800 clamp(24px, 2.8vw, 52px)/1 var(--display); font-variant-numeric: tabular-nums; }
.ek-tu span { letter-spacing: .2em; color: var(--ek-fg2); }
.ek-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ek-chips span { padding: 6px 14px; border-radius: 999px; background: var(--ek-chip); font-weight: 700; font-size: clamp(13px, 1.2vw, 21px); font-variant-numeric: lining-nums; color: var(--ek-fg2); }
.ek-chips small { margin-right: .4em; color: var(--ek-fg3); font-size: .78em; }
.ek-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding-top: clamp(10px, 1.6vh, 20px); border-top: 1px solid var(--ek-line); font-size: clamp(12px, 1.1vw, 19px); font-weight: 600; color: var(--ek-fg3); }
.ek-next { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.ek-next b { color: var(--ek-fg); }
.ek-next a, .ek-foot a { color: var(--ek-fg2); }
@media (max-aspect-ratio: 1/1) {
  .ek { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "l r" "s s"; align-content: center; row-gap: clamp(28px, 5vh, 56px); }
  .ek-big { font-size: clamp(88px, 26vw, 400px); }
  .ek-name { font-size: calc(clamp(18px, 5vw, 48px) * var(--k, 1)); }
  .ek-roster { display: none; }
}
@media (max-width: 600px) { .ek-btn.fs { display: none; } .ek-btn { padding: 8px 12px; } }

/* home hero pill on a league day */
.h4-now i.lvp { background: var(--live); animation: pulse 1.8s ease-out infinite; }
.h4-stage .h4-now i.lvp { background: #4ADE80; } /* the pill sits on the navy hero photo */
