/* Public site styles. Tokens come from the original design (dark, padel-lime + cyan). */
@font-face { font-family: 'Heebo'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('/fonts/heebo-hebrew.woff2') format('woff2'); unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: 'Heebo'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('/fonts/heebo-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Rubik'; font-style: normal; font-weight: 500 800; font-display: swap; src: url('/fonts/rubik-hebrew.woff2') format('woff2'); unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: 'Rubik'; font-style: normal; font-weight: 500 800; font-display: swap; src: url('/fonts/rubik-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #0B1220;
  --card: #121B2E;
  --card-2: #1A2540;
  --line: #1F2C47;
  --line-2: #1B2740;
  --line-3: #34466C;
  --text: #F2F5FA;
  --text-2: #C9D3E6;
  --muted: #8D9AB3;
  --ball: #C8FF3D;
  --cyan: #38D6FF;
  --cyan-bg: #17324F;
  --danger: #FF6B6B;
  --warn: #FFD58A;
  --display: 'Rubik', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 'Heebo', system-ui, sans-serif; }
a { color: inherit; }
h1, h2 { font-family: var(--display); margin: 0; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 clamp(14px, 4vw, 20px); }

/* header */
.site-head { border-bottom: 1px solid var(--line-2); }
.site-head .top { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; padding-block: 18px 16px; }
.brand { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 24px; text-decoration: none; }
.brand-title { font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1.1; }
.brand-sub { color: var(--text-2); font-size: 12px; margin-top: 4px; }
.logos { display: flex; align-items: center; gap: 12px; }
.logos img { height: 60px; width: auto; display: block; }
.logos svg { flex: none; }

.tabs { display: flex; gap: 8px; flex-wrap: nowrap; overflow-x: auto; padding-block: 10px; border-top: 1px solid var(--line-2); scrollbar-width: thin; }
.tab, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid #26334F; background: transparent; color: var(--text-2); font: inherit; font-size: 16px; font-weight: 500; text-decoration: none; white-space: nowrap; cursor: pointer; flex: none; }
.tab small { font-size: 13px; opacity: .8; }
.tab:hover, .btn:hover { background: #26334F; }
.tab[aria-current='page'], .tab.is-on { background: var(--ball); border-color: var(--ball); color: var(--bg); font-weight: 700; }
.tab.live[aria-current='page'] { background: var(--ball); }
:where(a, button, select, input):focus-visible { outline: 3px solid #1F5FBF; outline-offset: 2px; }

/* layout */
main { padding-block: 20px 64px; display: flex; flex-direction: column; gap: 20px; }
.page-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: baseline; justify-content: space-between; }
.page-head h1 { font-weight: 800; font-size: clamp(24px, 7vw, 32px); }
.muted { color: var(--muted); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 20px; }
.empty { background: var(--card); border: 1px dashed var(--line-3); border-radius: 16px; padding: 36px 20px; text-align: center; color: var(--muted); }

/* pair filter */
.filter { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.filter .field { flex: 1 1 280px; }
.filter label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.fld { width: 100%; min-height: 44px; border: 1px solid var(--line-3); border-radius: 10px; padding: 0 12px; font: inherit; font-size: 16px; background: var(--bg); color: var(--text); color-scheme: dark; }

/* matches */
.group { display: flex; flex-direction: column; gap: 10px; }
.group h2 { font-weight: 700; font-size: 18px; }
.match { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 20px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.match.hl { border: 2px solid var(--ball); }
.match .when { flex: 1 1 140px; min-width: 0; }
.match .date { font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 1.15; }
.match .where { color: var(--muted); font-size: 14px; }
.match .sides { flex: 2 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 4px; font-size: 18px; }
.match .sides .win { font-weight: 700; }
.match .sides .lose { font-weight: 400; color: var(--muted); }
.match .sides .tbd { font-weight: 500; }
.match .res { flex: 1 1 150px; min-width: 0; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.match .score { font-family: var(--display); font-weight: 700; font-size: 24px; }
.match .detail { font-size: 13px; color: var(--muted); }
.pill { border-radius: 999px; padding: 4px 12px; font-size: 14px; font-weight: 500; background: var(--cyan-bg); color: var(--cyan); }
.pill.live { background: var(--danger); color: #2B0707; font-weight: 700; font-size: 16px; padding: 3px 12px; }

/* table */
.table-wrap { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow-x: auto; }
table.standings { width: 100%; min-width: 540px; border-collapse: collapse; font-size: 16px; }
.standings thead tr { background: var(--card-2); color: var(--text-2); text-align: right; }
.standings th { padding: 14px 8px; font-weight: 500; }
.standings th:first-child, .standings td:first-child { padding-inline: 16px; width: 48px; }
.standings th:last-child, .standings td:last-child { padding-inline: 16px; }
.standings td { padding: 14px 8px; border-bottom: 1px solid var(--line-2); }
.standings td.rank { font-family: var(--display); font-weight: 700; }
.standings td.name { font-weight: 500; min-width: 150px; }
.standings td.wins { font-family: var(--display); font-weight: 700; font-size: 18px; }
.standings tr.sel td { background: #1E2C4A; font-weight: 700; }
.standings tr.sel td:first-child { box-shadow: inset -4px 0 0 var(--ball); }
.table-note { padding: 12px 20px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line-2); }

/* live */
.live-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.slot { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: clamp(14px, 4vw, 24px); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.slot-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.slot-head h2 { font-weight: 800; font-size: 26px; }
.slot-match { flex: 1 1 260px; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-family: var(--display); font-weight: 700; font-size: clamp(18px, 4.5vw, 28px); line-height: 1.3; }
.slot-match .vs { color: var(--muted); font-size: .65em; font-weight: 500; }
.slot-league { color: var(--ball); font-size: 18px; font-weight: 700; }
.stage { background: var(--bg); border: 1px solid var(--line); border-radius: 20px; aspect-ratio: 16 / 9; min-height: 220px; display: flex; align-items: center; justify-content: center; padding: clamp(14px, 4vw, 24px); text-align: center; color: var(--muted); font-size: 22px; }
.stage.has-video { padding: 0; overflow: hidden; background: #000; }
.stage iframe { width: 100%; height: 100%; border: 0; display: block; }
.btn-ball { background: var(--ball); border-color: #A8DB26; color: var(--bg); font-weight: 700; }
.btn-ball:hover { background: #E0FF7A; }
.btn-watch { min-height: 64px; padding: 0 32px; font-size: 22px; }
.picker { display: flex; flex-direction: column; gap: 8px; }
.picker .row { display: flex; gap: 8px; overflow-x: auto; }
.picker .lbl { font-size: 14px; font-weight: 500; color: var(--text-2); }

.site-foot { border-top: 1px solid var(--line-2); padding-block: 20px; color: var(--muted); font-size: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* selected pair summary + "read more" */
.pair-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; }
.pair-stats { display: flex; gap: 22px; flex-wrap: wrap; }
.pair-stats div { display: flex; flex-direction: column; align-items: center; min-width: 64px; }
.pair-stats b { font-family: var(--display); font-size: 22px; color: var(--ball); }
.pair-stats div > span { color: var(--muted); font-size: 13px; }
.btn-more { align-self: center; min-height: 44px; padding: 0 24px; }
/* phones: fit the table without sideways scrolling (hide losses and raw games; the games difference stays) */
@media (max-width: 640px) {
  table.standings { min-width: 0; font-size: 14px; }
  .standings th, .standings td { padding: 12px 4px; }
  .standings th:first-child, .standings td:first-child { padding-inline: 10px 6px; width: 32px; }
  .standings th:last-child, .standings td:last-child { padding-inline: 4px 10px; }
  .standings th:nth-child(5), .standings td:nth-child(5),
  .standings th:nth-child(7), .standings td:nth-child(7) { display: none; }
  .standings td.name { min-width: 0; }
  .standings td.wins { font-size: 16px; }
}
@media (min-width: 900px) { .live-grid.two { grid-template-columns: repeat(2, 1fr); } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
