/* KickoffHour - one stylesheet, BEM, mobile-first. One accent (lime): the favourite and "the hour before kickoff".
   Greys make the hierarchy. All colours are tokens; components never hardcode colours. */
:root {
  --bg: #f4f5f6; --surface: #ffffff; --text: #16181d; --muted: #5e6570; --line: #e2e4e7; --line-strong: #cdd1d6;
  --accent: #7a9f00; --accent-ink: #16181d; --accent-soft: #eef5d6; --live: #c2410c; --miss: #8a9099; --focus: #2b59c3; --win: #15803d; --win-ink: #ffffff; --loss: #dc2626; --loss-ink: #ffffff; --draw-bg: #e5e7eb; --draw-ink: #374151; --upset: #b45309;
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Inter, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1114; --surface: #16181d; --text: #eceef1; --muted: #9aa1ab; --line: #262a31; --line-strong: #353a43;
    --accent: #c6f432; --accent-ink: #16181d; --accent-soft: #2a3313; --live: #fb923c; --miss: #6b717b; --focus: #8fb4ff; --win: #22c55e; --win-ink: #052e16; --loss: #f87171; --loss-ink: #450a0a; --draw-bg: #374151; --draw-ink: #e5e7eb; --upset: #fbbf24;
    color-scheme: dark;
  }
}
:root[data-theme="light"], :root:has(#theme-light:checked) {
  --bg: #f4f5f6; --surface: #ffffff; --text: #16181d; --muted: #5e6570; --line: #e2e4e7; --line-strong: #cdd1d6;
  --accent: #7a9f00; --accent-ink: #16181d; --accent-soft: #eef5d6; --live: #c2410c; --miss: #8a9099; --focus: #2b59c3; --win: #15803d; --win-ink: #ffffff; --loss: #dc2626; --loss-ink: #ffffff; --draw-bg: #e5e7eb; --draw-ink: #374151; --upset: #b45309;
  color-scheme: light;
}
:root[data-theme="dark"], :root:has(#theme-dark:checked) {
  --bg: #0f1114; --surface: #16181d; --text: #eceef1; --muted: #9aa1ab; --line: #262a31; --line-strong: #353a43;
  --accent: #c6f432; --accent-ink: #16181d; --accent-soft: #2a3313; --live: #fb923c; --miss: #6b717b; --focus: #8fb4ff; --win: #22c55e; --win-ink: #052e16; --loss: #f87171; --loss-ink: #450a0a; --draw-bg: #374151; --draw-ink: #e5e7eb; --upset: #fbbf24;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 var(--font); font-variant-numeric: tabular-nums; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible, summary:focus-visible, input:focus-visible + span, input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(24px, 4vw, 32px); letter-spacing: -.02em; }
h2 { font-size: 19px; margin-top: 1.4em; }
h3 { font-size: 15px; }
p { margin: 0 0 .8em; }
ul, ol { padding-left: 1.2em; }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; color: var(--muted); font-weight: 600; }
td.num, th.num { text-align: right; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; word-break: break-all; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.page { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-top: 16px; }
.section > h2:first-child { margin-top: 0; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -16px; padding: 0 16px; }
.prose { max-width: 70ch; }
.prose a, .section p a, .section li a, .intro a { text-decoration: underline; text-decoration-color: var(--line-strong); }
.prose a:hover, .section a:hover { text-decoration-color: currentColor; }
.empty { color: var(--muted); padding: 16px; margin: 0; }
.callout { background: var(--bg); border-radius: 8px; padding: 12px 14px; margin: 12px 0; }

/* ---------- header ---------- */
.site-header { padding: 14px 0 0; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.site-header__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.site-header__logo { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); }
.site-header__logo svg { height: 26px; width: auto; display: block; }
.logo__ink { fill: var(--text); }
.logo__line { stroke: var(--text); }
.logo__accent { fill: var(--accent); }
.theme-switch { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; margin: 0; }
.theme-switch__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.theme-switch__label { display: inline-flex; align-items: center; min-height: 36px; padding: 0 10px; font-size: 13px; color: var(--muted); border-radius: 999px; cursor: pointer; }
.theme-switch__input:checked + .theme-switch__label { background: var(--text); color: var(--bg); }
.sport-switch, .site-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; list-style: none; margin: 0; padding: 0; }
.sport-switch { margin-top: 12px; }
.sport-switch__link { display: inline-flex; align-items: center; min-height: 32px; font-size: 13px; font-weight: 600; padding: 0 12px; border-radius: 999px; text-decoration: none; color: var(--muted); border: 1px solid var(--line); }
.sport-switch__link--current { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.site-nav { margin-top: 6px; }
.site-nav__link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; text-decoration: none; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; }
.site-nav__link--current, .site-nav__link:hover { color: var(--text); border-bottom-color: var(--text); }

/* ---------- breadcrumbs ---------- */
.breadcrumbs { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.breadcrumbs__list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; }
.breadcrumbs__item + .breadcrumbs__item::before { content: "›"; margin: 0 6px; }
.breadcrumbs__link { color: var(--muted); }

/* ---------- the clock: the one signature element ---------- */
.clock { width: 16px; height: 16px; flex: none; vertical-align: -3px; margin-right: 5px; }
.clock__hour { fill: var(--accent); }
.clock__ring { fill: none; stroke: currentColor; stroke-width: 10; }

/* ---------- country code badge ---------- */
.cc { display: inline-block; flex: none; min-width: 38px; padding: 2px 0; margin-right: 8px; border-radius: 4px; border: 1px solid var(--line-strong); font-size: 11px; font-weight: 700; letter-spacing: .02em; text-align: center; color: var(--muted); background: var(--bg); }

/* ---------- page intro, day switch, filter ---------- */
.intro { margin: 0 0 14px; }
.intro__title { margin-bottom: 6px; }
.intro__text { color: var(--muted); margin: 0; }
.day-switch { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; list-style: none; padding: 0; margin: 0 0 12px; }
.day-switch__link { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; white-space: nowrap; background: var(--surface); font-size: 14px; }
.day-switch__link--current { background: var(--text); color: var(--bg); border-color: var(--text); }
.filter { display: flex; gap: 6px; flex-wrap: wrap; border: 0; padding: 0; margin: 0 0 18px; }
.filter__input { position: absolute; opacity: 0; pointer-events: none; }
.filter__label { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; cursor: pointer; color: var(--muted); }
.filter__input:checked + .filter__label { border-color: var(--text); color: var(--text); font-weight: 600; }
.day__layout { display: grid; gap: 24px; }
@media (min-width: 960px) { .day__layout { grid-template-columns: 220px minmax(0, 1fr); } }
.rail { display: none; }
@media (min-width: 960px) { .rail { display: block; position: sticky; top: 12px; align-self: start; max-height: calc(100vh - 24px); overflow: auto; } }
.rail__title { font-weight: 600; margin: 0 0 8px; }
.rail__list { list-style: none; margin: 0; padding: 0; }
.rail__link { display: flex; gap: 4px; padding: 5px 6px; border-radius: 6px; text-decoration: none; font-size: 14px; }
.rail__country { color: var(--muted); }
.rail__link:hover { background: var(--surface); }
.rail__count { margin-left: auto; color: var(--muted); }
.legend { font-size: 13px; color: var(--muted); margin: 0 0 12px; }

/* ---------- league block + match row ---------- */
.league { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; scroll-margin-top: 12px; }
.league__head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; list-style: none; border-bottom: 1px solid var(--line); min-height: 52px; }
.league:not([open]) > .league__head { border-bottom: 0; }
.league__head::-webkit-details-marker { display: none; }
.league__head::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; flex: none; }
.league[open] > .league__head::before { transform: rotate(45deg); }
.league__head--static { cursor: default; }
.league__head--static::before { display: none; }
.league__name { display: flex; flex-direction: column; min-width: 0; }
.league__country { font-size: 12px; color: var(--muted); }
.league__title { font-weight: 650; text-decoration: none; }
a.league__title:hover { text-decoration: underline; }
.league__soon { display: flex; align-items: center; font-size: 12px; color: var(--muted); white-space: nowrap; }
.league__count { margin-left: auto; font-size: 13px; color: var(--muted); }
.league__cols, .prob { display: grid; grid-template-columns: repeat(3, 38px); gap: 4px; text-align: center; }
.league__cols { font-size: 12px; color: var(--muted); font-weight: 600; }
.league__matches { list-style: none; margin: 0; padding: 0; }
.match + .match { border-top: 1px solid var(--line); }
.match__link { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; grid-template-areas: "time teams score prob" "time note note prob"; align-items: center; column-gap: 10px; padding: 8px 12px; text-decoration: none; min-height: 52px; }
a.match__link:hover { background: var(--bg); }
.match__time { grid-area: time; font-size: 14px; color: var(--muted); }
.match__time--ft { font-weight: 600; color: var(--text); }
.match__time--live { color: var(--live); font-weight: 700; }
.match__teams { grid-area: teams; display: flex; flex-direction: column; min-width: 0; }
.match__team { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match__score { grid-area: score; display: flex; flex-direction: column; font-weight: 700; text-align: right; }
.match__note { grid-area: note; display: flex; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.match--hour .match__note { color: var(--text); font-weight: 600; }
.match__verdict { color: var(--text); }
.match__verdict--miss { color: var(--miss); }
.match__league { margin-right: 6px; color: var(--muted); font-weight: 400; }
.prob { grid-area: prob; }
.prob__cell { padding: 6px 0; border-radius: 6px; font-size: 14px; color: var(--muted); }
.prob__cell--top { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.prob__cell--miss { background: transparent; color: var(--miss); box-shadow: inset 0 0 0 1.5px var(--line-strong); text-decoration: line-through; }
.match--ft .match__teams, .match--ft .prob__cell:not(.prob__cell--top) { opacity: .75; }
@media (max-width: 420px) {
  .league__cols, .prob { grid-template-columns: repeat(3, 32px); gap: 3px; }
  .match__link { column-gap: 8px; padding: 8px 10px; grid-template-columns: 40px minmax(0, 1fr) auto auto; }
  .league__soon { display: none; }
}

/* no-JS filter (radio + :has); without :has() support everything stays visible */
.day:has(.filter__input[value="hour"]:checked) .match:not(.match--hour),
.day:has(.filter__input[value="pre"]:checked) .match:not(.match--pre):not(.match--hour),
.day:has(.filter__input[value="ft"]:checked) .match:not(.match--ft) { display: none; }
.day:has(.filter__input[value="hour"]:checked) .league:not(.league--has-hour),
.day:has(.filter__input[value="ft"]:checked) .league:not(.league--has-ft),
.day:has(.filter__input[value="pre"]:checked) .league:not(.league--has-pre):not(.league--has-hour) { display: none; }

/* ---------- more leagues / country grid / league catalogue ---------- */
.more { margin-top: 28px; }
.more__title { font-size: 19px; margin: 0 0 4px; }
.more__lead { color: var(--muted); margin: 0 0 12px; }
.country-index, .lg-group__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.country-index__link { display: flex; align-items: center; min-height: 44px; padding: 8px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; }
.country-index__link:hover, .lg-item:hover, .league-index__link:hover { border-color: var(--line-strong); }
.country-index__count { margin-left: auto; color: var(--muted); font-size: 13px; }
.jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 22px; }
.jump__link { display: inline-flex; align-items: center; min-height: 32px; font-size: 12px; font-weight: 700; padding: 0 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--muted); }
.jump__link:hover { color: var(--text); border-color: var(--line-strong); }
.lg-group { margin: 0 0 22px; scroll-margin-top: 12px; }
.lg-group__title { display: flex; align-items: center; font-size: 18px; margin: 0 0 10px; }
.lg-group__more { margin-left: auto; font-size: 13px; font-weight: 400; color: var(--muted); }
.lg-item { display: flex; flex-direction: column; gap: 2px; min-height: 44px; padding: 10px 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; height: 100%; }
.lg-item__name { font-weight: 600; }
.lg-item__note { display: flex; align-items: center; font-size: 13px; color: var(--muted); }
.lg-item__note .cc { min-width: 34px; font-size: 10px; margin-right: 6px; }
@media (max-width: 640px) { .country-index, .lg-group__list { grid-template-columns: 1fr 1fr; } }

/* ---------- home ---------- */
.hero { max-width: 680px; margin: 8px 0 28px; }
.hero__title { margin: 0 0 6px; }
.hero__lead { font-size: 17px; margin: 10px 0; }
.hero__proof { margin: 0; color: var(--muted); }
.hero__proof a { color: var(--text); font-weight: 600; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.block { margin: 0 0 28px; }
.block__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.block__title { display: flex; align-items: center; font-size: 19px; margin: 0 0 12px; }
.block__title .clock { width: 18px; height: 18px; margin-right: 8px; }
.block__more { font-size: 14px; white-space: nowrap; }
.soon { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.soon-card__link { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); text-decoration: none; height: 100%; }
.soon-card__link:hover { border-color: var(--line-strong); border-left-color: var(--accent); }
.soon-card__league { font-size: 12px; color: var(--muted); }
.soon-card__time { display: flex; align-items: center; font-size: 13px; font-weight: 600; }
.soon-card__teams { font-size: 16px; font-weight: 650; line-height: 1.3; }
.bar { display: flex; gap: 2px; margin-top: 4px; }
.bar__seg { flex: 0 0 var(--w); min-width: 30px; font-size: 12px; padding: 3px 5px; border-radius: 4px; background: var(--bg); color: var(--muted); }
.bar__seg--top { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.league-index { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.league-index__link { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; min-height: 44px; padding: 9px 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; }
.league-index__country { font-size: 12px; color: var(--muted); width: 100%; }
.league-index__name { font-weight: 600; }
.league-index__count { margin-left: auto; color: var(--muted); font-size: 13px; }
.how__steps { margin: 0 0 8px; padding-left: 20px; max-width: 680px; }
.how__steps li { margin-bottom: 6px; }
.strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 0 0 24px; }
.button-link { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--text); border-radius: 8px; text-decoration: none; font-weight: 600; }
@media (max-width: 640px) {
  .soon { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; scrollbar-width: none; }
  .soon-card { flex: 0 0 78%; scroll-snap-align: start; }
  .league-index { grid-template-columns: 1fr 1fr; }
}

/* ---------- match page ---------- */
.match-head { margin: 0 0 4px; }
.match-head__league { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.match-head__title { margin-bottom: 6px; }
.match-head__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 14px; color: var(--muted); }
.match-head__score { font-size: 24px; font-weight: 700; margin: 8px 0 0; }
.match-head__dates { font-size: 12px; color: var(--muted); margin-top: 6px; }
.status { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); font-size: 12px; color: var(--muted); white-space: nowrap; }
.probs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; margin-bottom: 12px; }
.probs__item { background: var(--bg); border-radius: 8px; padding: 10px 4px; }
.probs__item--top { background: var(--accent); color: var(--accent-ink); }
.probs__item--top .probs__label, .probs__item--top .probs__market { color: var(--accent-ink); }
.probs__label { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.probs__value { font-size: 28px; font-weight: 700; line-height: 1.2; }
.probs__market { font-size: 12px; color: var(--muted); }
.side-markets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.side-markets__item { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 14px; }
.side-markets__value { font-weight: 700; }
.tldr { font-size: 16px; }
.fact-list { margin: 0; padding-left: 1.2em; }
.fact-list__item { margin-bottom: 6px; }
.fact-list__src { font-size: 11px; vertical-align: super; line-height: 0; margin-left: 2px; color: var(--muted); text-decoration: none; }
.source-list { font-size: 12px; color: var(--muted); margin: 12px 0 0; padding-left: 1.6em; }
.source-list__item { margin-bottom: 2px; word-break: break-word; }
.lineup { display: grid; grid-template-columns: 1fr; gap: 12px; }
.lineup__team { font-weight: 600; margin-bottom: 4px; }
.lineup__formation { font-weight: 400; color: var(--muted); font-size: 13px; }
.lineup__list { margin: 0; padding-left: 1.4em; font-size: 14px; columns: 2; column-gap: 16px; }
.lineup__note { font-size: 12px; color: var(--muted); margin-top: 8px; }
@media (min-width: 640px) { .lineup { grid-template-columns: 1fr 1fr; } .lineup__list { columns: 1; } }
.injury-table td { white-space: normal; min-width: 90px; }
.injury-table__status--out, .injury-table__status--suspended, .injury-table__status--doubtful, .injury-table__status--returning { font-weight: 600; }
.context-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 0; }
.context-grid__item { background: var(--bg); border-radius: 8px; padding: 8px 10px; }
.context-grid__label { font-size: 12px; color: var(--muted); }
.context-grid__value { margin: 0; font-weight: 600; }
.form { display: grid; gap: 12px; }
@media (min-width: 640px) { .form { grid-template-columns: 1fr 1fr; } }
.form__badge { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; border-radius: 4px; font-size: 12px; font-weight: 700; color: var(--muted); border: 1px solid var(--line-strong); }
.form__badge--W { background: var(--text); color: var(--bg); border-color: var(--text); }
.version-table__row--counted td { font-weight: 600; }
.fan-vote__buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.fan-vote__button { min-height: 44px; padding: 8px 4px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; overflow-wrap: break-word; hyphens: auto; }
.fan-vote__button:hover { border-color: var(--text); }
.fan-vote__msg:empty { display: none; }

/* ---------- track record ---------- */
.stat-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 720px) { .stat-tiles { grid-template-columns: repeat(4, 1fr); } }
.stat-tile { background: var(--bg); border-radius: 8px; padding: 10px 12px; }
.stat-tile__label { font-size: 12px; color: var(--muted); }
.stat-tile__value { font-size: 22px; font-weight: 700; }
.stat-tile__bench { font-size: 12px; color: var(--muted); }
.calibration-chart { max-width: 360px; }
.calibration-chart__svg { width: 100%; height: auto; display: block; }
.calibration-chart__grid { stroke: var(--line); stroke-width: 1; }
.calibration-chart__ideal { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 4; }
.calibration-chart__line { fill: none; stroke: var(--text); stroke-width: 2; }
.calibration-chart__dot { fill: var(--accent); stroke: var(--surface); stroke-width: 1.5; }
.calibration-chart__label { fill: var(--muted); font-size: 10px; font-family: var(--font); }
.calibration-chart__axis { fill: var(--muted); font-size: 11px; font-family: var(--font); }

/* ---------- notes, lists, footer ---------- */
.ai-note, .rg-note { font-size: 13px; color: var(--muted); border-left: 3px solid var(--line-strong); padding: 4px 0 4px 12px; margin: 16px 0 0; }
.link-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 16px; }
.link-grid li { min-height: 44px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.site-footer { border-top: 1px solid var(--line); margin-top: 32px; padding: 18px 0 28px; font-size: 13px; color: var(--muted); }
.site-footer__note { margin: 0 0 10px; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 0 14px; list-style: none; padding: 0; margin: 0; }
.site-footer__link { display: inline-flex; align-items: center; min-height: 36px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- search ---------- */
.search { position: relative; flex: 1 1 220px; max-width: 360px; margin-left: auto; }
.search__input { width: 100%; min-height: 40px; font: inherit; font-size: 15px; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); }
.search__input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.search__results { position: absolute; z-index: 10; top: calc(100% + 4px); left: 0; right: 0; list-style: none; margin: 0; padding: 4px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; max-height: 60vh; overflow: auto; }
.search__hit { display: grid; grid-template-columns: 52px 1fr; grid-template-areas: "kind text" "kind sub"; column-gap: 8px; padding: 7px 8px; border-radius: 6px; text-decoration: none; }
.search__hit:hover, [aria-selected="true"] > .search__hit { background: var(--bg); }
.search__kind { grid-area: kind; font-size: 11px; color: var(--muted); padding-top: 3px; }
.search__text { grid-area: text; font-weight: 600; }
.search__sub { grid-area: sub; font-size: 12px; color: var(--muted); }
.search__empty { padding: 10px; color: var(--muted); font-size: 14px; }
.search-page__list { list-style: none; padding: 0; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.search-page__list li + li { border-top: 1px solid var(--line); }
.search-page__list .search__hit { padding: 10px 12px; border-radius: 0; }
@media (max-width: 640px) { .search { order: 3; flex-basis: 100%; max-width: none; margin: 10px 0 0; } }
.ptable__likely { font-weight: 700; }
.ptable th:nth-child(2), .ptable td:nth-child(2) { position: sticky; left: 0; background: var(--surface); z-index: 1; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }

/* ---------- match page: extended blocks ---------- */
.match-head__teams { margin: 6px 0 0; font-weight: 600; }
.market-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 12px 0; }
.market-grid__item { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.market-grid__title { font-size: 13px; margin: 0 0 4px; color: var(--muted); }
.market-grid__title a { text-decoration: none; }
.kv { margin: 0; }
.kv > div { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 700; }
.context-grid__note { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.form__strip { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; margin: 0 0 8px; }
.form__badge--L { color: var(--text); border-color: var(--miss); }
.compare td, .compare th { text-align: center; }
.compare td:first-child, .compare th:first-child { text-align: right; }
.compare td:last-child, .compare th:last-child { text-align: left; }
.compare__label { color: var(--muted); font-size: 13px; white-space: normal; }
.compare td:first-child, .compare td:last-child { font-weight: 700; }
.table-focus td { font-weight: 700; background: var(--bg); }
.minutes { max-width: 520px; }
.minutes-chart { width: 100%; height: auto; display: block; }
.minutes-chart__bar--home { fill: var(--text); }
.minutes-chart__bar--away { fill: var(--accent); }
.minutes-chart__val, .minutes-chart__label { fill: var(--muted); font-size: 10px; font-family: var(--font); }
.minutes-chart__axis { stroke: var(--line-strong); }
.legend-inline { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-left: 8px; }
.swatch--home { background: var(--text); margin-left: 0; }
.swatch--away { background: var(--accent); }

/* ---------- league pages ---------- */
.subnav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.subnav a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); text-decoration: none; font-size: 14px; }
.subnav a:hover { border-color: var(--line-strong); }
.tabs__input { position: absolute; opacity: 0; pointer-events: none; }
.tabs__label { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; margin: 0 4px 10px 0; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; cursor: pointer; color: var(--muted); }
.tabs__input:checked + .tabs__label { border-color: var(--text); color: var(--text); font-weight: 600; }
.tabs__panel { display: none; }
.tabs__panel--overall { display: block; }
.tabs:has(.tabs__input:checked:not(#tbl-overall)) .tabs__panel--overall { display: none; }
.tabs:has(#tbl-home:checked) .tabs__panel--home, .tabs:has(#tbl-away:checked) .tabs__panel--away, .tabs:has(#tbl-form:checked) .tabs__panel--form { display: block; }
.sorted { border-top: 1px solid var(--line); padding: 6px 0; }
.sorted__head { cursor: pointer; min-height: 40px; display: flex; align-items: center; font-weight: 600; }
.outlook-chart { width: 100%; height: auto; display: block; }
.outlook-chart__line { fill: none; stroke: var(--text); stroke-width: 2; }
.outlook-chart__dot { fill: var(--accent); stroke: var(--surface); stroke-width: 1.5; }
.ptable a, .tabs__panel a { text-decoration: none; }
.ptable a:hover, .tabs__panel a:hover { text-decoration: underline; }
.match--next { box-shadow: inset 3px 0 0 var(--accent); }
.match--next .match__note { color: var(--text); font-weight: 600; }
.tag { display: inline-block; padding: 0 6px; border: 1px solid var(--line-strong); border-radius: 4px; font-size: 11px; color: var(--muted); vertical-align: 1px; }

/* ---------- result colours (owner decision: win green, loss red, draw neutral; letters stay inside) ---------- */
.form__badge { border: 0; }
.form__badge--W { background: var(--win); color: var(--win-ink); }
.form__badge--L { background: var(--loss); color: var(--loss-ink); }
.form__badge--D { background: var(--draw-bg); color: var(--draw-ink); }
.status--out { color: var(--loss); font-weight: 600; }
.result { grid-area: prob; display: flex; flex-direction: column; align-items: flex-end; text-align: right; font-size: 13px; line-height: 1.3; }
.result__verdict { font-weight: 700; white-space: nowrap; }
.result__verdict--hit { color: var(--win); }
.result__verdict--miss { color: var(--upset); }
.result__detail { color: var(--muted); white-space: nowrap; }
.match__verdict--miss { color: var(--upset); }

/* UX step 3: match page */
.match-status { display: inline-block; margin: 8px 0; padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: 15px; background: var(--bg); border: 1px solid var(--line-strong); }
.match-status--final { background: var(--text); color: var(--surface); border-color: var(--text); }
.match-status--started { color: var(--live); border-color: var(--live); }
.match-head__teams { margin: 4px 0; font-size: 14px; }
.result-block { border-left: 4px solid var(--line-strong); padding-left: 12px; }
.result-block .result__verdict { font-weight: 700; }
.term { font-size: 12px; font-weight: 400; color: var(--muted); }
.term a { color: inherit; }
.who td, .who th { padding: 6px 10px; }
.who__fav td { background: var(--accent-soft); }
.who__fav td:first-child { box-shadow: inset 4px 0 0 var(--accent); font-weight: 600; }
.context-grid__item--wide { grid-column: span 2; }
.context-grid__note { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.context-grid__pair { display: flex; flex-direction: column; gap: 2px; font-weight: 400; }
.context-grid__pair b { font-weight: 700; }
@media (max-width: 420px) { .context-grid__item--wide { grid-column: auto; } }
.bars { width: 100%; table-layout: fixed; }
.bars caption { text-align: left; padding-bottom: 4px; }
.bars th[scope="row"] { width: 6.5em; font-weight: 400; font-size: 13px; white-space: nowrap; }
.bars td { white-space: nowrap; }
.bars__bar { display: inline-block; height: 10px; border-radius: 3px; vertical-align: middle; max-width: calc(100% - 2.5em); min-width: 2px; }
.bars__bar--home { background: var(--text); }
.bars__bar--away { background: var(--muted); }
.bars__val { display: inline-block; margin-left: 6px; font-variant-numeric: tabular-nums; font-size: 13px; vertical-align: middle; }
.table-gap td { text-align: center; color: var(--muted); padding: 0; line-height: 1.2; }
.disclosure > summary { cursor: pointer; list-style: none; }
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure__head h2 { display: inline; }
.disclosure__head::before { content: "▸"; display: inline-block; width: 1.2em; color: var(--muted); transition: transform .15s; }
.disclosure[open] > .disclosure__head::before { transform: rotate(90deg); }
.fan-vote__button { min-height: 44px; }
.injury-table__team th { padding-top: 10px; font-size: 13px; color: var(--muted); text-align: left; border-bottom: 1px solid var(--line); }
.market-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.kv dd { margin: 0; text-align: right; font-weight: 700; white-space: nowrap; }
.kv__note { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.who { width: 100%; }
.who th { white-space: normal; font-size: 13px; }
.who td, .who th { padding: 6px 6px; }
.injury-table td, .h2h td { white-space: normal; }
.h2h td.num { white-space: nowrap; }
.nowrap { white-space: nowrap; }
.version-table td:last-child { white-space: normal; min-width: 10em; }
.bars__track { display: inline-block; width: calc(100% - 2.5em); vertical-align: middle; }
.bars__bar { max-width: 100%; }
.fan-vote__button { overflow-wrap: normal; word-break: normal; hyphens: manual; }
@media (max-width: 520px) {
  .col-wide { display: none; }
  .fan-vote__buttons { grid-template-columns: 1fr; }
}
.form table td { padding: 8px 6px; }
.h2h td.nowrap { white-space: nowrap; }
@media (max-width: 520px) { .h2h td, .h2h th { padding: 8px 4px; font-size: 14px; } .h2h td.small { font-size: 12px; } }
/* flags (flag-icons, MIT) */
.flag { display: inline-block; flex: none; width: 20px; height: 15px; margin-right: 8px; border-radius: 2px; vertical-align: -2px; box-shadow: 0 0 0 1px var(--line); object-fit: cover; }
.flag--globe { color: var(--muted); box-shadow: none; }
.jump__link .flag { margin-right: 6px; }
.jump__link .cc { min-width: 0; margin: 0; padding: 0; border: 0; background: none; font-size: 12px; }
.lg-item__note .flag { margin-right: 6px; }

/* ---- match page v2 (docs/ux-match-v2) ---- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin: 0 0 12px; }
.card h2 { margin-top: 0; }
.match-title { font-size: clamp(22px, 4vw, 28px); letter-spacing: -.02em; line-height: 1.2; margin: 4px 0 14px; }
.crest { width: 22px; height: 22px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); display: inline-grid; place-items: center; flex: none; overflow: hidden; vertical-align: middle; font-size: 11px; font-weight: 700; color: var(--muted); }
.crest img { width: 100%; height: 100%; object-fit: contain; padding: 2px; }
.crest--lg { width: 56px; height: 56px; font-size: 20px; }
.crest--lg img { padding: 6px; }
.match__team .crest { margin-right: 6px; width: 20px; height: 20px; }
.mh__grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: start; text-align: center; }
.mh__team { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.mh__name { font-weight: 700; font-size: 17px; line-height: 1.2; overflow-wrap: anywhere; }
.mh__name a { color: inherit; text-decoration: none; }
.mh__name a:hover { text-decoration: underline; }
.mh__pos { font-size: 13px; color: var(--muted); }
.mh__form { display: flex; gap: 3px; justify-content: center; }
.mh__form .form__badge { font-style: normal; }
.mh__mid { padding-top: 6px; }
.mh__time { font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.mh__date { font-size: 13px; color: var(--muted); margin-top: 4px; white-space: nowrap; }
.mh__status { display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-strong); }
.mh__status--final { background: var(--text); color: var(--surface); border-color: var(--text); }
.mh__status--started { color: var(--live); border-color: var(--live); }
.mh__venue { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); text-align: center; }
.mh__venue a { color: inherit; }
.wbar { display: flex; height: 40px; border-radius: 8px; overflow: hidden; gap: 2px; margin: 4px 0 8px; }
.wbar__seg { display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; background: var(--line); color: var(--text); min-width: 44px; font-variant-numeric: tabular-nums; }
.wbar__seg--fav { background: var(--accent); color: var(--accent-ink); }
.wbar--fans { height: 30px; }
.wbar--fans .wbar__seg { font-size: 13px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-strong); }
.wbar__labels { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.wbar__labels span:nth-child(2) { color: var(--muted); text-align: center; }
.wbar__labels span:last-child { text-align: right; }
.wbar__fav { font-weight: 700; }
.vsbook { margin: 12px 0 0; font-size: 14px; }
.vsbook b { font-weight: 600; }
.vote { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.vote__q, .vote__label { font-weight: 650; margin: 0 0 8px; }
.vote__fans { margin-top: 12px; }
.vote__opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.vote__btn { font: inherit; font-weight: 600; padding: 10px 6px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); cursor: pointer; min-height: 44px; overflow-wrap: anywhere; }
.vote__btn:hover, .vote__btn:focus-visible { border-color: var(--text); }
.vote__btn:disabled { opacity: .6; cursor: default; }
.vote__note { margin: 8px 0 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.team-head { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 2px; }
.team-head__note { font-weight: 400; color: var(--muted); font-size: 13px; margin-left: auto; font-variant-numeric: tabular-nums; }
.pill-state { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); margin-left: 6px; vertical-align: 3px; }
.pill-state--ok { background: var(--win); color: var(--win-ink); border-color: var(--win); }
.lu__line { margin: 10px 0 0; }
.lu__role { font-size: 12px; color: var(--muted); margin: 0 0 3px; }
.lu__players { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.lu__p { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; padding: 3px 8px; border-radius: 6px; background: var(--bg); }
.lu__no { font-size: 11px; color: var(--muted); font-weight: 600; min-width: 14px; text-align: right; font-variant-numeric: tabular-nums; }
.lu__p--doubt { box-shadow: inset 0 0 0 1px var(--line-strong); }
.lu__q { font-size: 11px; font-weight: 700; color: var(--muted); }
.lu__subs { margin-top: 10px; font-size: 13px; }
.lu__subs summary { cursor: pointer; color: var(--muted); margin-bottom: 6px; }
.abs__list { list-style: none; margin: 6px 0 0; padding: 0; }
.abs__item { display: flex; gap: 8px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--line); }
.abs__tag { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; flex: none; }
.abs__tag--out, .abs__tag--susp { background: var(--loss); color: var(--loss-ink); }
.abs__tag--doubt { box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--muted); }
.abs__why { color: var(--muted); font-size: 13px; margin-left: auto; text-align: right; }
.abs__none { margin: 8px 0 0; }
.match-dates { margin: 16px 0 8px; }
@media (max-width: 600px) {
  .two-col { grid-template-columns: 1fr; }
  .crest--lg { width: 44px; height: 44px; }
  .mh__pos-league { display: none; }
  .mh__name { font-size: 15px; }
  .mh__time { font-size: 24px; }
  .card { padding: 14px; }
}
.mh__name, .vote__btn { overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
@media (max-width: 600px) {
  .mh__grid { gap: 6px; }
  .mh__date { white-space: normal; }
  .mh__form { gap: 2px; }
  .mh__form .form__badge { width: 17px; height: 17px; min-width: 0; font-size: 10px; line-height: 17px; padding: 0; }
  .vote__btn { font-size: 14px; }
}
@media (max-width: 480px) { .vote__opts--long { grid-template-columns: 1fr; } }
.result-block { margin-bottom: 12px; }
