/* 19/10/2026 PeakyBet design v2 — modelled on Forebet's proportions (see _local/competitors-1910):
   one typeface (Lato), 14px data text, nothing under 11px, AA contrast (>= 4.5:1), 32px pills on one
   scrolling row, compact one-line match rows, mobile bottom navigation. Loaded after app.css. */
:root {
    --pkb-font: "Lato", "Helvetica Neue", Arial, system-ui, sans-serif;
    --pkb-ink: #1a1a1a;
    --pkb-ink-2: #4a4a4a;      /* secondary text: 8.9:1 on white */
    --pkb-line: #e6e6e6;
    --pkb-zebra: #f7f7f7;
    --pkb-head: #ececec;
    --pkb-brand: #b00000;      /* team names / active: 7.4:1 on white */
    --pkb-pick: #ffb400;       /* tip badge (dark text 11:1) */
    --pkb-pill: #f1f1f1;
    --pkb-pill-ink: #333333;
    --pkb-pill-on: #2b2b2b;
}

/* ---- one typeface everywhere (icons are SVG, logo is an image) ---- */
body, body :where(h1, h2, h3, h4, h5, h6, p, span, a, li, td, th, button, input, select, label, div, time, strong, small) {
    font-family: var(--pkb-font) !important;
}
body { color: var(--pkb-ink); }

/* ---- minimum readable size: Tailwind arbitrary 8–10px utilities -> 11px ---- */
.text-\[8px\], .text-\[9px\], .text-\[10px\], .text-\[0\.5rem\], .text-\[0\.625rem\] { font-size: 11px !important; line-height: 1.35 !important; }

/* ---- market pills: one row, horizontal scroll, 32px (Forebet) ---- */
.pkb-pills { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 2px; margin: 0; list-style: none; }
.pkb-pills::-webkit-scrollbar { display: none; }
.pkb-pills > li { flex: 0 0 auto; }
.pkb-pill { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 16px; background: var(--pkb-pill); color: var(--pkb-pill-ink); font-size: 14px; font-weight: 400; white-space: nowrap; text-decoration: none; transition: background .15s, color .15s; }
.pkb-pill:hover { background: #e4e4e4; color: var(--pkb-ink); }
.pkb-pill.is-on, .pkb-pill[aria-current="page"] { background: var(--pkb-pill-on); color: #fff; }

/* ---- day tabs (Yesterday / Today / Tomorrow) ---- */
.pkb-daytabs { display: inline-grid; grid-template-columns: repeat(3, auto); gap: 6px; background: transparent !important; padding: 0 !important; }
.pkb-daytabs > button, .pkb-daytabs > a { height: 32px; padding: 0 14px !important; border-radius: 16px !important; border: 0 !important; background: var(--pkb-pill) !important; color: var(--pkb-pill-ink) !important; font-size: 14px !important; font-weight: 400 !important; box-shadow: none !important; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.pkb-daytabs > .is-on { background: var(--pkb-pill-on) !important; color: #fff !important; }

/* ---- league header bar ---- */
.pkb-league-bar { background: var(--pkb-head) !important; border-left: 0 !important; padding: 6px 12px !important; min-height: 34px; }
.pkb-league-bar :is(h2, h3, h4, h5, h6, div, span, a) { font-size: 13px !important; color: #2b2b2b; }
.pkb-league-bar :is(h2, h3, h4, h5, h6) { font-weight: 700 !important; }
.pkb-league { border-radius: 6px !important; border: 1px solid var(--pkb-line) !important; box-shadow: none !important; }

/* ---- list column header ---- */
.pkb-colhead { display: grid; grid-template-columns: minmax(0, 1fr) 132px 60px 64px 56px; align-items: end; gap: 6px; padding: 6px 12px; font-size: 12px; font-weight: 700; color: var(--pkb-ink-2); border-bottom: 1px solid var(--pkb-line); background: #fff; position: sticky; top: 0; z-index: 2; }
.pkb-colhead__probs { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; }
.pkb-colhead__probs.is-two { grid-template-columns: repeat(2, 1fr); }
.pkb-colhead > span { text-align: center; }
.pkb-colhead > span:first-child { text-align: left; }

/* ---- match row ---- */
.pkb-row { list-style: none; border-bottom: 1px solid var(--pkb-line); background: #fff; }
.pkb-row:nth-child(even) { background: var(--pkb-zebra); }
.pkb-row:last-child { border-bottom: 0; }
.pkb-row__link { display: grid; grid-template-columns: minmax(0, 1fr) 132px 60px 64px 56px; align-items: center; gap: 6px; padding: 8px 12px; min-height: 58px; color: inherit; text-decoration: none; }
.pkb-row__link:hover { background: #fff4f2; }
.pkb-row__teams { display: grid; gap: 2px; min-width: 0; }
.pkb-team { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pkb-team img { width: 18px; height: 18px; object-fit: contain; flex: 0 0 18px; }
.pkb-team__name { font-size: 14px; font-weight: 700; line-height: 18px; color: var(--pkb-brand); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pkb-row__meta { font-size: 12px; line-height: 16px; color: var(--pkb-ink-2); padding-left: 24px; }
.pkb-row__meta .pkb-time { font-size: 12px; color: var(--pkb-ink-2); font-weight: 400; }
.pkb-live { color: #c00000; font-weight: 700; }
.pkb-row__probs { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; font-size: 14px; color: var(--pkb-ink); font-variant-numeric: tabular-nums; }
.pkb-row--two .pkb-row__probs { grid-template-columns: repeat(2, 1fr); }
.pkb-p.is-max { font-weight: 700; }
.pkb-p__l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pkb-row__tip { display: flex; justify-content: center; }
.pkb-tip { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 15px; background: var(--pkb-pick); color: #1a1a1a; font-size: 13px; font-weight: 700; white-space: nowrap; }
.pkb-row__odds { display: flex; justify-content: center; }
.pkb-odds { display: inline-block; min-width: 44px; padding: 3px 6px; border: 1px solid #cfcfcf; border-radius: 5px; background: #fff; font-size: 13px; text-align: center; font-variant-numeric: tabular-nums; }
.pkb-row__score { text-align: center; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pkb-row__score.is-live { color: #c00000; }
.pkb-muted { color: #8a8a8a; font-weight: 400; }

@media (max-width: 639px) {
    .pkb-colhead, .pkb-row__link { grid-template-columns: minmax(0, 1fr) 96px 46px 52px; gap: 4px; padding-left: 8px; padding-right: 8px; }
    .pkb-colhead > span:last-child, .pkb-row__score { display: none; }
    .pkb-row__probs { font-size: 13px; }
    .pkb-tip { min-width: 28px; height: 28px; font-size: 12px; padding: 0 6px; }
    .pkb-odds { min-width: 40px; font-size: 12px; padding: 3px 4px; }
}

/* ---- compact hero on phones: get to the matches faster ---- */
@media (max-width: 639px) {
    .pkb-hero { padding-top: 10px !important; padding-bottom: 6px !important; margin-bottom: 4px !important; }
    .pkb-hero h1 { font-size: 20px !important; line-height: 1.25 !important; }
    .pkb-hero p { font-size: 13px !important; margin-top: 4px !important; }
}

/* ---- mobile bottom navigation ---- */
.pkb-bottomnav { display: none; }
@media (max-width: 1023px) {
    .pkb-bottomnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: #1f1f1f; padding-bottom: env(safe-area-inset-bottom, 0px); box-shadow: 0 -1px 0 rgba(0,0,0,.08); }
    .pkb-bottomnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 56px; color: #d6d6d6; font-size: 11px; font-weight: 700; text-decoration: none; }
    .pkb-bottomnav a[aria-current="page"] { color: #fff; }
    .pkb-bottomnav svg { width: 22px; height: 22px; }
    body { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }
}

/* ---- tighter list header on phones (first match higher on screen) ---- */
@media (max-width: 1023px) {
    .pkb-listbox { padding-top: 8px !important; padding-bottom: 8px !important; }
    .pkb-listhead { margin-bottom: 8px !important; row-gap: 8px !important; }
    .pkb-daybar { flex-direction: row !important; align-items: center !important; gap: 8px !important; }
    .pkb-daybar .pkb-daytabs { flex: 1 1 auto; min-width: 0; }
    .pkb-daybar .pkb-daytabs > button { padding: 0 8px !important; }
    hr.mt-2\.5.mb-5 { margin: 8px 0 !important; }
    .pkb-league-bar { padding: 6px 8px !important; }
}
.pkb-league-bar span.bg-\[\#C20000\] { color: #fff !important; font-size: 12px !important; }

/* ---- hub pages (config/hubs.php) ---- */
.pkb-hub__links { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.pkb-hub__links::-webkit-scrollbar { display: none; }
.pkb-hub__links > a { flex: 0 0 auto; }
.pkb-listhead h2 { margin: 0; }
.pkb-slip-total { padding: 10px 12px; font-size: 14px; border-top: 1px solid var(--pkb-line); background: #fff; }
.pkb-empty { padding: 16px 12px; font-size: 14px; color: var(--pkb-ink-2); background: var(--pkb-zebra); border-radius: 6px; }
.pkb-proof__table { overflow-x: auto; margin-top: 8px; border: 1px solid var(--pkb-line); border-radius: 6px; }
.pkb-proof__table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pkb-proof__table th, .pkb-proof__table td { padding: 8px 10px; border-bottom: 1px solid var(--pkb-line); text-align: left; white-space: nowrap; }
.pkb-proof__table th { font-size: 12px; color: var(--pkb-ink-2); background: var(--pkb-zebra); }
.pkb-proof__table td a { color: var(--pkb-brand); font-weight: 700; }
.pkb-won { color: #0f6b2f; font-weight: 700; }
.pkb-lost { color: #b00000; font-weight: 700; }
.pkb-prose { max-width: 75ch; font-size: 15px; line-height: 1.65; color: var(--pkb-ink); }
.pkb-prose p { margin: 8px 0; }
.pkb-prose h3 { font-size: 16px; font-weight: 700; margin: 16px 0 4px; }
.pkb-prose a { color: var(--pkb-brand); text-decoration: underline; }
.pkb-league-bar h3 { margin: 0; }
.pkb-twin { display: inline-block; margin-top: 4px; font-size: 14px; font-weight: 700; color: var(--pkb-brand); text-decoration: underline; text-underline-offset: 2px; }
.pkb-jp { list-style: none; margin: 0; padding: 0; counter-reset: jp; }
.pkb-jp > .pkb-row { counter-increment: jp; }
.pkb-jp > .pkb-row .pkb-row__teams { position: relative; padding-left: 26px; }
.pkb-jp > .pkb-row .pkb-row__teams::before { content: counter(jp); position: absolute; left: 0; top: 2px; width: 20px; text-align: right; font-size: 12px; font-weight: 700; color: var(--pkb-ink-2); }
.pkb-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 10px 0; }
.pkb-stats > div { background: var(--pkb-zebra); border: 1px solid var(--pkb-line); border-radius: 6px; padding: 8px 10px; }
.pkb-stats dt { font-size: 12px; color: var(--pkb-ink-2); }
.pkb-stats dd { margin: 0; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* 19/10/2026 fix: a long nowrap pill row must not widen its container (it scrolls inside instead) */
.pkb-pills, .pkb-hub__links { width: 100%; max-width: 100%; min-width: 0; contain: inline-size; }
