/* Piłka w Liczbach — v2 "matchday". Hand-written, no frameworks. */

/* ── Tokens ──────────────────────────────────────────────────────────── */
:root {
  /* surfaces */
  --page: #f4f6f3;
  --surface: #ffffff;
  --sunken: #eef1ed;
  --line: #dfe4dd;
  --line-soft: #eaeee8;

  /* dark band */
  --deep: #0e2b28;
  --deep-2: #12333f;
  --deep-line: rgba(255,255,255,.14);
  --on-deep: #eef4ee;
  --on-deep-dim: #a9c0b6;

  /* ink */
  --ink: #14201c;
  --ink-2: #405049;
  --muted: #5f716a;

  /* brand + outcomes */
  --pitch: #17843f;
  --pitch-deep: #14663b;
  --pitch-tint: #e4f3ea;
  --amber: #e8a33d;
  --amber-ink: #8a5510;
  --amber-tint: #fdf1dc;
  --away-blue: #2f6fd0;
  --away-blue-ink: #24589f;
  --coral: #d13f2d;
  --coral-ink: #ad2f20;
  --coral-tint: #fdeae7;
  --slate: #8896a0;
  --heat-mix: var(--pitch-deep);

  --focus: #12333f;
  --shadow: 0 1px 2px rgba(14,43,40,.06), 0 10px 24px -16px rgba(14,43,40,.35);
  --shadow-lift: 0 2px 4px rgba(14,43,40,.07), 0 18px 34px -20px rgba(14,43,40,.42);

  --r-lg: 16px;
  --r: 13px;
  --r-sm: 9px;
  --wrap: 1080px;

  --disp: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #0d1614;
    --surface: #14211d;
    --sunken: #1a2924;
    --line: #263831;
    --line-soft: #1f302a;
    --deep: #081c1a;
    --deep-2: #0b2029;
    --on-deep: #e8f1ec;
    --on-deep-dim: #91aaa0;
    --ink: #e9f1ec;
    --ink-2: #bccdc4;
    --muted: #8ba398;
    --pitch: #2fae66;
    --pitch-deep: #6fd79b;
    --pitch-tint: #16342a;
    --amber: #eeb057;
    --amber-ink: #f0c07c;
    --amber-tint: #33280f;
    --coral: #ec6552;
    --coral-ink: #f19183;
    --coral-tint: #35201c;
    --heat-mix: var(--pitch);
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 24px -16px rgba(0,0,0,.7);
    --shadow-lift: 0 2px 6px rgba(0,0,0,.45), 0 18px 34px -20px rgba(0,0,0,.8);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(66px + env(safe-area-inset-bottom));
}
@media (min-width: 760px) { body { padding-bottom: 0; } }

a { color: var(--pitch-deep); text-decoration-color: color-mix(in srgb, var(--pitch-deep) 35%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--pitch); }
img { max-width: 100%; height: auto; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.band :focus-visible, .topbar :focus-visible { outline-color: var(--amber); }

h1, h2, h3 { font-family: var(--disp); letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 10px; }
h1 { font-size: clamp(28px, 6.4vw, 40px); font-weight: 800; }
h2 { font-size: clamp(20px, 3.6vw, 25px); font-weight: 700; }
h3 { font-size: 17px; font-weight: 700; }
p { margin: 0 0 12px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.caps { font-family: var(--disp); font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* shadow hints on the edges while a wide table can still be scrolled */
.card .scroll-x, .scroll-x.hinted {
  background:
    linear-gradient(to right, var(--surface) 40%, transparent),
    linear-gradient(to left, var(--surface) 40%, transparent) 100% 0,
    radial-gradient(farthest-side at 0 50%, rgba(14,43,40,.16), transparent),
    radial-gradient(farthest-side at 100% 50%, rgba(14,43,40,.16), transparent) 100% 0;
  background-repeat: no-repeat;
  background-size: 44px 100%, 44px 100%, 15px 100%, 15px 100%;
  background-attachment: local, local, scroll, scroll;
}

/* ── Top bar ─────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--deep);
  color: var(--on-deep);
  border-bottom: 1px solid var(--deep-line);
}
.topbar-in { display: flex; align-items: center; gap: 14px; min-height: 58px; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; margin-right: auto; }
.brand img { width: 30px; height: 30px; }
.brand b { font-family: var(--disp); font-size: 17px; font-weight: 800; letter-spacing: -.02em; display: block; }
.brand span { display: block; font-size: 11px; color: var(--on-deep-dim); letter-spacing: .02em; }
.fresh {
  font-size: 11.5px; color: var(--on-deep-dim); white-space: nowrap;
  border: 1px solid var(--deep-line); border-radius: 999px; padding: 4px 10px;
}
@media (max-width: 519px) { .fresh { display: none; } }

.navdesk { display: none; gap: 4px; }
.navdesk a {
  color: var(--on-deep-dim); text-decoration: none; font-size: 14.5px; font-weight: 600;
  padding: 7px 12px; border-radius: 999px;
}
.navdesk a:hover { color: #fff; background: rgba(255,255,255,.09); }
.navdesk a.on { color: var(--deep); background: var(--on-deep); }
@media (min-width: 760px) { .navdesk { display: flex; } }

/* ── Bottom tab bar (mobile) ─────────────────────────────────────────── */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 4px 8px; text-decoration: none; color: var(--muted);
  font-size: 11px; font-weight: 700; font-family: var(--disp); letter-spacing: .01em;
}
.tabbar a.on { color: var(--pitch-deep); }
.tabbar svg { width: 22px; height: 22px; stroke-width: 1.9; }
@media (min-width: 760px) { .tabbar { display: none; } }

/* ── Dark hero band ──────────────────────────────────────────────────── */
.band {
  background: linear-gradient(150deg, var(--deep) 0%, var(--deep) 45%, var(--deep-2) 100%);
  color: var(--on-deep);
  padding: 22px 0 26px;
  position: relative; overflow: hidden;
}
.band::after {
  content: ""; position: absolute; right: -80px; top: -110px; width: 300px; height: 300px;
  border-radius: 50%; border: 40px solid rgba(255,255,255,.035);
}
.band h1 { color: #fff; margin: 4px 0 6px; }
.band .sub { color: var(--on-deep-dim); margin: 0; max-width: 46em; font-size: 15px; }
.band a { color: #fff; }
.band-kicker { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.band-crumb { font-size: 13px; color: var(--on-deep-dim); margin: 0 0 8px; }
.band-crumb a { color: var(--on-deep-dim); }
.band-crumb a:hover { color: #fff; }
.on-deep-chip {
  font-family: var(--disp); font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  background: rgba(255,255,255,.12); border: 1px solid var(--deep-line); color: #fff;
  border-radius: 999px; padding: 4px 11px;
}
.on-deep-chip.amber { background: var(--amber); border-color: transparent; color: #40270a; }

main { padding: 20px 0 40px; }
section { margin: 0 0 26px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.sec-head h2 { margin: 0; }
.sec-head > a, .sec-head > span:last-child { font-size: 13.5px; font-weight: 700; white-space: nowrap; }

/* ── Cards ───────────────────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow); padding: 16px;
}
.card.flush { padding: 0; overflow: hidden; }
.card > :last-child { margin-bottom: 0; }
.card h3 { margin-bottom: 10px; }

.note {
  background: var(--sunken); border: 1px solid var(--line); border-left: 4px solid var(--amber);
  border-radius: var(--r); padding: 13px 15px; font-size: 14.5px; color: var(--ink-2);
}
.note b { color: var(--ink); }
.note > :last-child { margin-bottom: 0; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--disp); font-size: 11.5px; font-weight: 700; letter-spacing: .04em;
  background: var(--sunken); color: var(--ink-2); border-radius: 999px; padding: 3px 10px;
  white-space: nowrap;
}
.chip-tier { background: var(--pitch-tint); color: var(--pitch-deep); text-transform: uppercase; letter-spacing: .07em; }
.chip-hit { background: var(--pitch-tint); color: var(--pitch-deep); }
.chip-miss { background: var(--coral-tint); color: var(--coral-ink); }
.chip-upset { background: var(--amber-tint); color: var(--amber-ink); }
.tier-tag { font-size: 10.5px; font-weight: 700; color: var(--muted); margin-left: 5px; white-space: nowrap; }

/* ── Probability bar ─────────────────────────────────────────────────── */
.pbar { display: flex; gap: 2px; height: 12px; }
.pbar .s { display: block; flex-basis: 0; min-width: 5px; border-radius: 999px; }
.pbar .s1 { background: var(--pitch); }
.pbar .sx { background: var(--slate); }
.pbar .s2 { background: var(--away-blue); }
.pbar-lg { height: 30px; gap: 3px; }
.pbar-lg .s {
  display: flex; align-items: center; justify-content: center; min-width: 8px;
  font-family: var(--disp); font-weight: 700; font-size: 13px; color: #fff; overflow: hidden;
}
.pbar-lg .sx { color: #402a05; }
.pkeys { display: flex; gap: 12px; margin-top: 6px; font-size: 12.5px; font-weight: 700; flex-wrap: wrap; }
.pkeys span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.pkeys span::before { content: ""; width: 9px; height: 9px; border-radius: 3px; flex: none; }
.k1 { color: var(--pitch-deep); } .k1::before { background: var(--pitch); }
.kx { color: var(--muted); } .kx::before { background: var(--slate); }
.k2 { color: var(--away-blue-ink); } .k2::before { background: var(--away-blue); }
.pkeys.wide { gap: 8px; justify-content: space-between; }
.pkeys.wide span { flex: 1 1 0; }

.minibar { display: block; height: 6px; border-radius: 999px; background: var(--sunken); overflow: hidden; margin-top: 4px; min-width: 46px; }
.minibar i { display: block; height: 100%; background: var(--pitch); border-radius: 999px; }
.minibar.red i { background: var(--coral); }

/* ── Match row (tappable) ────────────────────────────────────────────── */
.rows { display: flex; flex-direction: column; }
.rows > * + * { border-top: 1px solid var(--line-soft); }
.mrow {
  display: block; text-decoration: none; color: inherit; padding: 13px 16px;
  position: relative; transition: background .12s ease;
}
.mrow:hover, .mrow:focus-visible { background: var(--sunken); color: inherit; }
.mrow-top { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.mrow-when { font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.mrow-flag { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; }
.mrow-main {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
  font-family: var(--disp); font-weight: 700; font-size: 15.5px; letter-spacing: -.01em;
}
.mrow-main .t { min-width: 0; line-height: 1.2; }
.mrow-main .t.away { text-align: right; }
.mrow-score {
  font-variant-numeric: tabular-nums; background: var(--ink); color: var(--surface);
  border-radius: var(--r-sm); padding: 2px 9px; font-size: 15px;
}
.mrow-vs { color: var(--muted); font-weight: 600; font-size: 13px; }
.mrow-bar { margin-top: 9px; }
.mrow-lead { display: block; margin-top: 8px; font-size: 13.5px; color: var(--ink-2); }
.mrow-lead b { color: var(--ink); }
.mrow.miss { box-shadow: inset 3px 0 0 var(--coral); }
.mrow.hit { box-shadow: inset 3px 0 0 var(--pitch); }
.row-label { padding: 12px 16px 0; }

@media (min-width: 760px) {
  .mrow {
    display: grid; align-items: center; padding: 12px 18px;
    grid-template-columns: 88px minmax(0, 1fr) 210px;
    grid-template-areas: "when teams bar" "when lead bar";
    column-gap: 16px; row-gap: 3px;
  }
  .mrow-top { grid-area: when; margin: 0; flex-direction: column; align-items: flex-start; gap: 3px; }
  .mrow-main { grid-area: teams; }
  .mrow-lead { grid-area: lead; margin-top: 0; font-size: 13px; }
  .mrow-bar { grid-area: bar; margin-top: 0; }
  .mrow > * { min-width: 0; }
  .mrow-flag { margin: 0; }
}

/* ── Pill tabs / chip strip ──────────────────────────────────────────── */
.segtabs { display: flex; gap: 4px; background: var(--sunken); border-radius: 999px; padding: 4px; margin: 0 0 18px; }
.segtabs a {
  flex: 1; text-align: center; padding: 9px 10px; border-radius: 999px; text-decoration: none;
  font-family: var(--disp); font-weight: 700; font-size: 14px; color: var(--ink-2);
}
.segtabs a:hover { color: var(--ink); }
.segtabs a.on { background: var(--surface); color: var(--pitch-deep); box-shadow: var(--shadow); }

.striprow { margin: 0 -16px 18px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.striprow::-webkit-scrollbar { display: none; }
.strip { display: flex; gap: 7px; width: max-content; padding-bottom: 2px; }
.strip a {
  display: block; padding: 7px 14px; border-radius: 999px; text-decoration: none; white-space: nowrap;
  font-family: var(--disp); font-weight: 700; font-size: 13.5px;
  background: rgba(255,255,255,.1); color: var(--on-deep); border: 1px solid var(--deep-line);
}
.strip a:hover { background: rgba(255,255,255,.2); color: #fff; }
.strip a.on { background: var(--on-deep); color: var(--deep); border-color: transparent; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 14px; }
.pager a, .pager span.off {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; font-size: 19px; flex: none;
  box-shadow: var(--shadow);
}
.pager span.off { color: var(--line); box-shadow: none; }
.pager .mid { text-align: center; }
.pager .mid strong { font-family: var(--disp); font-size: 17px; display: block; }
.pager .mid span { font-size: 12.5px; color: var(--muted); }

/* ── Stats ───────────────────────────────────────────────────────────── */
.statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 13px 15px; box-shadow: var(--shadow);
}
.stat .k { font-family: var(--disp); font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.stat .v { font-family: var(--disp); font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin: 3px 0 2px; font-variant-numeric: tabular-nums; }
.stat .s { font-size: 12.5px; color: var(--muted); line-height: 1.35; }

.hero-stat {
  grid-column: 1 / -1;
  background: linear-gradient(140deg, var(--deep) 0%, var(--deep-2) 100%); border: 0; color: var(--on-deep);
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 18px 20px;
}
.hero-stat .k { color: var(--amber); }
.hero-stat .v { font-size: clamp(48px, 13vw, 68px); color: #fff; }
.hero-stat .s { color: var(--on-deep-dim); }
.hero-stat .side { flex: 1 1 200px; min-width: 0; }
@media (min-width: 620px) { .hero-stat { grid-column: span 2; } }

/* ── Tables ──────────────────────────────────────────────────────────── */
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; background: var(--surface); }
.tbl th, .tbl td { padding: 10px 8px; text-align: right; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.tbl thead th {
  font-family: var(--disp); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); border-bottom: 1px solid var(--line); background: var(--surface);
}
.tbl .l { text-align: left; }
.tbl td.team { font-weight: 700; font-family: var(--disp); letter-spacing: -.01em; }
.tbl td.team a { color: inherit; text-decoration: none; }
.tbl td.team a:hover { color: var(--pitch-deep); text-decoration: underline; }
.tbl td.pos { font-family: var(--disp); font-weight: 800; color: var(--muted); width: 34px; text-align: center; }
.tbl td.pts { font-weight: 800; font-family: var(--disp); font-size: 15.5px; }
.tbl tbody tr:hover { background: var(--sunken); }
.tbl tr.zone-promo td.pos { color: var(--pitch-deep); box-shadow: inset 3px 0 0 var(--pitch); }
.tbl tr.zone-releg td.pos { color: var(--coral-ink); box-shadow: inset 3px 0 0 var(--coral); }
.tbl tr.row-region td.team::after { content: "★"; color: var(--amber); font-size: 11px; margin-left: 6px; vertical-align: 2px; }
.tbl tr.me { background: var(--pitch-tint); }
@media (max-width: 559px) { .c-opt { display: none; } }

.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }

/* form dots */
.form { display: inline-flex; gap: 3px; }
.form i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--slate); }
.form i.W { background: var(--pitch); } .form i.D { background: var(--amber); } .form i.L { background: var(--coral); }

/* heat tables */
.heat { border-collapse: separate; border-spacing: 3px; font-size: 12px; font-variant-numeric: tabular-nums; }
.heat caption { caption-side: bottom; text-align: left; font-size: 12.5px; color: var(--muted); padding-top: 10px; }
.heat th { font-family: var(--disp); font-size: 11px; font-weight: 700; color: var(--muted); padding: 2px 6px; }
.heat td { width: 42px; height: 30px; text-align: center; border-radius: 7px; background: var(--sunken); color: var(--ink); }
.heat td.hi { font-weight: 800; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--heat-mix) 55%, transparent); }
.heat td.muted { color: color-mix(in srgb, var(--muted) 55%, transparent); }
.heat th.tname { text-align: left; white-space: nowrap; font-size: 13px; color: var(--ink); font-family: var(--disp); padding-right: 10px; }
.heat th.tname a { color: inherit; text-decoration: none; }
.pos-heat td { width: 34px; font-size: 11px; }

/* ── Prose ───────────────────────────────────────────────────────────── */
.prose { font-size: 15.5px; color: var(--ink-2); max-width: 62ch; }
.prose b { color: var(--ink); font-weight: 800; }
.prose > :last-child { margin-bottom: 0; }
.longread { max-width: 66ch; }
.longread h2 { margin-top: 30px; }
.longread ul { padding-left: 20px; }
.longread li { margin-bottom: 7px; color: var(--ink-2); }

/* ── Home: search ────────────────────────────────────────────────────── */
.findwrap { position: relative; }
.findwrap input {
  width: 100%; font: inherit; font-size: 16px; padding: 14px 16px 14px 44px;
  border-radius: var(--r); border: 1px solid transparent; background: rgba(255,255,255,.13);
  color: #fff; -webkit-appearance: none;
}
.findwrap input::placeholder { color: rgba(255,255,255,.55); }
.findwrap input:focus { background: #fff; color: var(--ink); outline-offset: 0; }
.findwrap input:focus::placeholder { color: var(--muted); }
.findwrap .ico { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: rgba(255,255,255,.6); pointer-events: none; }
.findwrap input:focus ~ .ico { color: var(--muted); }
.find-results {
  list-style: none; margin: 8px 0 0; padding: 6px; position: absolute; left: 0; right: 0; z-index: 30;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lift);
  max-height: 320px; overflow-y: auto;
}
.find-results a {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 12px; text-decoration: none; color: var(--ink); border-radius: var(--r-sm); font-weight: 700;
  font-family: var(--disp); font-size: 14.5px;
}
.find-results a:hover, .find-results a:focus-visible { background: var(--pitch-tint); }
.find-results .muted { font-weight: 600; font-size: 12px; font-family: var(--body); }
.find-hint { font-size: 12.5px; color: var(--on-deep-dim); margin: 9px 0 0; }

/* league list on home */
.lglist { list-style: none; margin: 0; padding: 0; }
.lglist li + li { border-top: 1px solid var(--line-soft); }
.lglist a {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px; text-decoration: none; color: inherit;
}
.lglist a:hover { background: var(--sunken); }
.lglist .nm { font-family: var(--disp); font-weight: 700; font-size: 15.5px; letter-spacing: -.01em; }
.lglist .meta { font-size: 12.5px; color: var(--muted); }
.lglist .go { margin-left: auto; color: var(--muted); flex: none; }

/* ── Team page bits ──────────────────────────────────────────────────── */
.nextcard {
  display: block; text-decoration: none; color: inherit; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lift); padding: 18px;
}
.nextcard:hover { color: inherit; box-shadow: var(--shadow-lift), 0 0 0 2px var(--pitch-tint); }
.nextcard .teams {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  font-family: var(--disp); font-weight: 800; font-size: clamp(17px, 4.6vw, 22px); letter-spacing: -.02em; margin-bottom: 14px;
}
.nextcard .teams .away { text-align: right; }
.nextcard .teams .vs { color: var(--muted); font-size: 14px; font-weight: 600; }
.nextcard .more { display: flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 14px; font-weight: 700; color: var(--pitch-deep); }

.hist { list-style: none; margin: 0; padding: 0; }
.hist li { display: flex; align-items: center; gap: 10px; padding: 10px 16px; font-size: 14px; }
.hist li + li { border-top: 1px solid var(--line-soft); }
.hist .rd { width: 26px; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12.5px; flex: none; }
.hist .opp { flex: 1; min-width: 0; }
.hist .opp a { color: inherit; }
.hist .res { display: flex; align-items: center; gap: 8px; flex: none; }
.hist .sc { font-variant-numeric: tabular-nums; font-weight: 700; }
.hist .oc { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; background: var(--slate); }
.hist .oc.W { background: var(--pitch); } .hist .oc.D { background: var(--amber); color: #402a05; } .hist .oc.L { background: var(--coral); }
.hist .pbadge { width: 62px; font-size: 12px; color: var(--muted); text-align: right; }

.poschart { display: flex; align-items: flex-end; gap: 3px; height: 92px; }
.poschart .b { flex: 1; display: flex; align-items: flex-end; height: 100%; }
.poschart .b i { display: block; width: 100%; background: var(--pitch); border-radius: 4px 4px 2px 2px; min-height: 2px; opacity: .85; }
.poschart-x { display: flex; gap: 3px; margin-top: 5px; font-size: 10px; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.poschart-x span { flex: 1; }

.ranklist { list-style: none; margin: 0; padding: 0; }
.ranklist li { padding: 9px 0; font-size: 14.5px; }
.ranklist li + li { border-top: 1px solid var(--line-soft); }
.ranklist .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ranklist .row a { color: inherit; text-decoration: none; font-weight: 600; }
.ranklist .row a:hover { color: var(--pitch-deep); }
.ranklist .val { font-weight: 800; font-family: var(--disp); font-variant-numeric: tabular-nums; }
.ranklist .me { font-weight: 800; }

/* match page */
.mhead { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-top: 12px; }
.mhead .nm { font-family: var(--disp); font-weight: 800; font-size: clamp(17px, 4.4vw, 24px); letter-spacing: -.02em; line-height: 1.2; color: #fff; }
.mhead .nm a { color: #fff; text-decoration: none; }
.mhead .nm a:hover { text-decoration: underline; }
.mhead .role { font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--on-deep-dim); font-weight: 700; font-family: var(--disp); margin-top: 4px; }
.mhead .side.away { text-align: right; }
.mhead .mid {
  font-family: var(--disp); font-weight: 800; font-size: clamp(20px, 6vw, 30px); color: #fff;
  background: rgba(255,255,255,.1); border: 1px solid var(--deep-line); border-radius: var(--r); padding: 6px 14px;
  font-variant-numeric: tabular-nums;
}
.mhead .mid.vs { font-size: 14px; color: var(--on-deep-dim); background: none; border: 0; }

.scorelines { display: flex; flex-wrap: wrap; gap: 8px; }
.scoreline {
  display: inline-flex; align-items: baseline; gap: 7px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 14px; font-size: 13.5px; color: var(--muted); box-shadow: var(--shadow);
}
.scoreline b { font-family: var(--disp); font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }

.cmp { width: 100%; border-collapse: collapse; font-size: 14.5px; background: var(--surface); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.cmp th, .cmp td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); }
.cmp thead th { font-family: var(--disp); font-size: 13px; font-weight: 800; letter-spacing: -.01em; background: var(--sunken); }
.cmp tbody tr:last-child td { border-bottom: 0; }
.cmp td { font-family: var(--disp); font-weight: 700; font-variant-numeric: tabular-nums; }
.cmp td.mid { font-family: var(--body); font-weight: 600; color: var(--muted); text-align: center; font-size: 12.5px; }
.cmp td:last-child { text-align: right; }

/* methodology steps */
.steps { display: grid; gap: 14px; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 16px; }
.step svg { width: 100%; height: auto; border-radius: var(--r); background: var(--sunken); display: block; margin-bottom: 12px; }
.step .n { font-family: var(--disp); font-size: 11.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--amber-ink); }
.step p { font-size: 14.5px; color: var(--ink-2); margin: 0; }

/* details cards */
details.card > summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font-family: var(--disp); font-weight: 700; font-size: 15px;
}
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::after { content: "⌄"; color: var(--muted); font-size: 18px; line-height: 1; margin-top: -6px; }
details.card[open] > summary::after { content: "⌃"; margin-top: 4px; }
details.card.flush > summary { padding: 14px 16px; }
details.card.flush[open] > summary { border-bottom: 1px solid var(--line); }
details.card > summary .n { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 800; }

/* ── Footer ──────────────────────────────────────────────────────────── */
.foot { background: var(--deep); color: var(--on-deep-dim); padding: 28px 0 34px; font-size: 13.5px; }
.foot a { color: var(--on-deep); }
.foot .row { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; margin-bottom: 12px; font-weight: 700; }
.foot p { margin: 0 0 6px; }
.foot .fine { font-size: 12px; color: color-mix(in srgb, var(--on-deep-dim) 80%, transparent); }

/* utilities */
.stack-12 > * + * { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.cols { display: grid; gap: 18px; }
@media (min-width: 900px) { .cols { grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr); align-items: start; } }

/* ── Inside the dark band ────────────────────────────────────────────── */
.band .segtabs { background: rgba(255,255,255,.1); }
.band .segtabs a { color: var(--on-deep-dim); }
.band .segtabs a:hover { color: #fff; }
.band .segtabs a.on { background: var(--on-deep); color: var(--deep); box-shadow: none; }
.band .sub b, .band .prose b { color: #fff; }
.band .form i { box-shadow: 0 0 0 1px rgba(255,255,255,.25); }
.hero-stat .prose b, .hero-stat b { color: #fff; }
.hero-stat .prose { max-width: none; }
.hero-stat .k { letter-spacing: .08em; }

/* ── Icons ───────────────────────────────────────────────────────────── */
.ic { width: 1.15em; height: 1.15em; flex: none; display: inline-block; vertical-align: -.18em; stroke-width: 1.9; }
.tabbar .ic { width: 22px; height: 22px; }
.findwrap .find-ico {
  position: absolute; left: 15px; top: 15px; width: 19px; height: 19px;
  color: rgba(255,255,255,.6); pointer-events: none;
}
.findwrap input:focus ~ .find-ico { color: var(--muted); }
.lglist .go .ic { width: 18px; height: 18px; }
.nextcard .more .ic { width: 16px; height: 16px; }

/* ── Tier badge in league list ───────────────────────────────────────── */
.tbadge {
  flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  font-family: var(--disp); font-weight: 800; font-size: 13px; letter-spacing: -.01em;
  background: var(--pitch-tint); color: var(--pitch-deep);
}
.tbadge.t3 { background: var(--deep); color: #fff; }
.tbadge.t4 { background: var(--pitch); color: #fff; }
.tbadge.t5 { background: color-mix(in srgb, var(--pitch) 42%, var(--surface)); color: #06331d; }
.tbadge.t6 { background: var(--pitch-tint); color: var(--pitch-deep); }
.tbadge.t7 { background: var(--sunken); color: var(--ink-2); }
.tbadge.tcup { background: var(--amber); color: #40270a; font-size: 12px; }
.lglist .lgtxt { min-width: 0; }
.lglist .nm, .lglist .meta { display: block; }
.lglist .meta b { color: var(--ink-2); font-weight: 700; }

/* names wrap instead of clipping on narrow screens */
@media (max-width: 759px) {
  .mrow-main .t { white-space: normal; line-height: 1.2; }
}

/* ── Refinements ─────────────────────────────────────────────────────── */
.tbl th, .tbl td { padding: 10px 12px; }
@media (min-width: 560px) { .tbl td.team, .tbl th.tname { width: 100%; } }
.tbl .minibar { width: 62px; margin-left: auto; }
.tbl td.pos { padding-left: 10px; padding-right: 6px; }

.hitdot {
  width: 19px; height: 19px; border-radius: 50%; display: inline-grid; place-items: center;
  font-size: 11px; font-weight: 800; color: #fff; line-height: 1;
}
.hitdot.ok { background: var(--pitch); }
.hitdot.no { background: var(--coral); }

.pkeys.keys3 { display: grid; grid-template-columns: 1fr; gap: 6px; font-size: 13px; }
@media (min-width: 620px) { .pkeys.keys3 { grid-template-columns: repeat(3, 1fr); } }

.ranklist .val .u { font-family: var(--body); font-weight: 600; font-size: 12px; color: var(--muted); }

.sec-head > span:last-child { text-align: right; }
@media (max-width: 559px) { .sec-head > a, .sec-head > span:last-child { white-space: normal; } }

.striprow { position: relative; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 34px), transparent 100%); mask-image: linear-gradient(90deg, #000 calc(100% - 34px), transparent 100%); }
@media (min-width: 760px) { .segtabs { max-width: 480px; } }
@media (max-width: 479px) { .segtabs a { white-space: nowrap; font-size: 12.5px; padding: 9px 4px; } }
@media (max-width: 519px) {
  .sec-head { flex-direction: column; align-items: flex-start; gap: 2px; }
  .sec-head > a, .sec-head > span:last-child { text-align: left; }
}
.band-fresh { font-size: 13px; }
@media (min-width: 520px) { .band-fresh { display: none; } }
.find-hint .dot { opacity: .5; margin: 0 2px; }

.hero-wordmark{display:block;font-family:var(--disp);font-size:clamp(40px,8vw,64px);font-weight:800;letter-spacing:-0.02em;color:#fff;line-height:1.05}

/* duel layout: team names sit on their ends of the bar; favourite in bold */
.duel{display:flex;justify-content:space-between;gap:10px;align-items:baseline;font-size:14.5px;line-height:1.25}
.duel-side{display:inline-flex;align-items:baseline;gap:6px;min-width:0;color:var(--ink-2)}
.duel-side.fav{font-weight:800;color:var(--ink)}
.duel-side.da{text-align:right;justify-content:flex-end}
.duel .dot{width:9px;height:9px;border-radius:3px;align-self:center;flex:none}
.duel .d1{background:var(--pitch)}
.duel .d2{background:var(--away-blue)}
.mrow-sub{display:flex;justify-content:space-between;gap:10px;font-size:12.5px;color:var(--muted)}
.mrow-sub .kx{flex:none}
.mrow .mrow-main{display:none}

/* bigbar: the whole forecast as one tall bar, labels inside segments (mock 2026-08-31) */
.bigbar{display:flex;height:52px;border-radius:10px;overflow:hidden;margin:8px 0 6px}
.bseg{display:flex;align-items:center;justify-content:center;gap:8px;min-width:0;overflow:hidden;white-space:nowrap}
.bseg .bl{font-weight:700;font-size:14px;color:#fff;text-overflow:ellipsis;overflow:hidden}
.bseg img{width:32px;height:32px;object-fit:contain;flex:none;filter:drop-shadow(0 1px 3px rgba(0,0,0,.35))}
.bh{background:var(--pitch)}
.bd{background:var(--slate)}
.ba{background:var(--away-blue)}
.mrow-names{font-weight:700;min-width:0;overflow:hidden;text-overflow:ellipsis}
.duel{display:none}
/* bigbar rows are stacked at every width — the bar needs the full row width */
@media (min-width: 760px) {
  .mrow { display: block; }
  .mrow .mrow-top { display: flex; }
  .bigbar { height: 56px; }
}

/* legend above the bar when any segment is too narrow for its inline label */
.bar-legend{display:flex;flex-wrap:wrap;gap:4px 14px;font-size:12.5px;color:var(--ink-2);margin:6px 0 -2px}
.bar-legend .dot{display:inline-block;width:9px;height:9px;border-radius:3px;margin-right:5px;vertical-align:baseline}
.bar-legend .d1{background:var(--pitch)}
.bar-legend .d2{background:var(--away-blue)}
.bar-legend .lg-d{color:var(--muted)}

/* "remis" must always fit: the segment is a size container and the label scales with it */
.bseg.bd{container-type:inline-size}
.bseg.bd .bl{font-size:clamp(6.5px,13cqw,14px);letter-spacing:0;overflow:visible}

/* stacked segment labels: percentage above the name */
.bseg .bl{display:flex;flex-direction:column;align-items:center;line-height:1.15}
.bseg .bl b{font-size:1em}
.bseg .bl i{font-style:normal;font-weight:600;font-size:.85em;opacity:.95;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.bigbar{height:58px}

/* league chip strip: desktop shows all chips (wrap), mobile scrolls by touch */
@media (min-width: 900px) {
  .striprow { overflow-x: visible; mask-image: none; -webkit-mask-image: none; }
  .strip { width: auto; flex-wrap: wrap; }
}

.track-league{margin:18px 0 4px;font-size:16px}
.track-league a{color:inherit;text-decoration:none}
.track-league a:hover{text-decoration:underline}

/* track page: hero card full-width (its own row), three tiles below it.
   Scoped — never restyle .stat globally (it broke .hero-stat's row layout once). */
.hero-wide{margin-bottom:14px}
.statgrid.tiles-3{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;align-items:stretch}
@media(max-width:760px){.statgrid.tiles-3{grid-template-columns:1fr}}
.statgrid.tiles-3 .stat{display:flex;flex-direction:column;gap:7px;padding:18px}
.statgrid.tiles-3 .stat .k{font-size:12.5px}
.statgrid.tiles-3 .stat .v{font-size:clamp(34px,4vw,46px)}
.statgrid.tiles-3 .stat .s{font-size:14px;line-height:1.4}

.hist-picker{display:flex;flex-wrap:wrap;gap:6px 10px;align-items:baseline;margin-bottom:14px;font-size:13.5px}
.hist-picker a{padding:5px 11px;border:1px solid var(--line);border-radius:999px;text-decoration:none;color:var(--ink-2);background:var(--surface)}
.hist-picker a.on{background:var(--deep);color:#fff;border-color:transparent}
