/* layout: one navy band (brand + next game) sitting over a light, scannable list of game cards */
:root {
  --navy: #0F1B2D;
  --navy-2: #1B2A42;
  --orange: #FF8A4C;
  --orange-soft: #FFB48A;
  --orange-ink: #9A3412;
  --orange-tint: #FFE8DC;
  --page: #F3F5F9;
  --card: #FFFFFF;
  --line: #DDE2EB;
  --ink: #0F1B2D;
  --ink-2: #3B4559;
  --muted: #5B6577;
  --on-navy: #FFFFFF;
  --on-navy-2: #B9C4D6;
  --win-bg: #DCEBF6;  --win-ink: #13496E;
  --loss-bg: #EFE1DA; --loss-ink: #7A3A1C;
  --draw-bg: #E6E9EF; --draw-ink: #404A5C;
  --radius: 14px;
  --font: 'Heebo', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Hebrew', Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
}

p { margin: 0; }
h2 { margin: 0; }
ol { margin: 0; padding: 0; list-style: none; }

.num { font-variant-numeric: tabular-nums; }

/* ---------- shared gutters ---------- */

.wrap, .band-in {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.skip-link {
  position: absolute;
  inset-inline-start: -9999px;
  top: 0;
  background: var(--card);
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 0 0 10px 10px;
  z-index: 20;
}
.skip-link:focus { inset-inline-start: 0; }

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- navy band ---------- */

.band { background: var(--navy); color: var(--on-navy); }
.band-in { padding-block: 18px 28px; display: flex; flex-direction: column; gap: 26px; }

.topbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.logo { flex: 0 0 auto; display: flex; }
.logo svg { display: block; }
.brand { min-width: 0; display: flex; flex-direction: column; }
.brand-name {
  font-size: 1rem; font-weight: 800; letter-spacing: 0.01em;
  text-align: start;
}
.brand-sub { font-size: 0.8125rem; color: var(--on-navy-2); }
.brand-meta {
  font-size: 0.8125rem; color: var(--on-navy-2);
  margin-inline-start: auto;
}

/* ---------- next game ---------- */

.hero { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.hero-kicker {
  font-size: 0.875rem; font-weight: 600; color: var(--orange-soft);
  letter-spacing: 0.02em;
}
.hero-title {
  font-size: 1.6rem; font-weight: 800; line-height: 1.2;
  text-wrap: balance;
  display: flex; flex-wrap: wrap; gap: 0 10px; align-items: baseline;
}
.hero-vs { font-size: 1.1rem; font-weight: 500; color: var(--on-navy-2); }
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline;
  font-size: 0.9375rem; color: #E4EAF3;
}
.hero-dot { color: var(--on-navy-2); }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  border-radius: 12px;
  padding: 12px 20px;
  min-height: 44px;
  cursor: pointer;
}
.btn-primary { background: var(--orange); color: var(--navy); border: none; }
.btn-primary:hover { background: #FF7A33; }
.btn-ghost {
  background: var(--card); color: var(--ink);
  border: 1px solid #C5CCD9;
  font-weight: 600;
  padding: 10px 18px;
}
.btn-ghost:hover { border-color: var(--muted); background: #FBFCFE; }

/* ---------- list header ---------- */

main.wrap { padding-block: 22px 8px; display: flex; flex-direction: column; gap: 16px; }

.list-head {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 12px;
}
.list-title { font-size: 1.35rem; font-weight: 800; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit; font-weight: 600; font-size: 0.9375rem;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--card); color: var(--ink);
  border: 1px solid #C5CCD9;
  border-radius: 999px;
  padding: 9px 16px; min-height: 44px;
  cursor: pointer;
}
.chip:hover { border-color: var(--muted); }
.chip.is-on { background: var(--navy); color: var(--on-navy); border-color: var(--navy); }
.chip-n { opacity: 0.75; font-size: 0.875rem; }

/* ---------- game card ---------- */

.list { display: flex; flex-direction: column; gap: 12px; }

.game {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 10px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}
.game.is-done { background: transparent; border-style: dashed; }
.game.is-live { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange); }

.game-date {
  flex: 0 0 54px;
  display: flex; flex-direction: column; align-items: center;
  background: var(--page);
  border-radius: 10px;
  padding: 7px 0;
}
.game.is-done .game-date { background: #EDF0F5; }
.date-wd { font-size: 0.75rem; color: var(--muted); line-height: 1.3; }
.date-d { font-size: 1.5rem; font-weight: 800; line-height: 1.1; }
.date-m { font-size: 0.8125rem; font-weight: 600; line-height: 1.2; }

.game-time { flex: 0 0 auto; font-size: 1.2rem; font-weight: 800; }

/* the score sits between the time and the team names */
.score {
  flex: 0 0 auto;
  display: flex; align-items: baseline; justify-content: center; gap: 4px;
  min-width: 74px;
  background: var(--page);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 10px;
}
.score-n { font-size: 1.2rem; font-weight: 800; }
.score-sep { font-size: 1rem; font-weight: 600; color: var(--muted); }
.score.is-empty { background: transparent; border-style: dashed; }
.score.is-empty .score-n { color: var(--muted); font-weight: 600; }

.game-main { flex: 1 1 100%; min-width: 0; display: flex; flex-direction: column; gap: 6px; }

.game-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tag-round { font-size: 0.8125rem; font-weight: 600; color: var(--muted); }
.tag {
  font-size: 0.6875rem; font-weight: 700;
  padding: 3px 9px; border-radius: 999px;
  letter-spacing: 0.02em;
}
.tag-home { background: var(--navy); color: var(--on-navy); }
.tag-away { background: var(--orange-tint); color: var(--orange-ink); }
.tag-live { background: var(--orange); color: var(--navy); }
.tag-done { background: var(--draw-bg); color: var(--draw-ink); }
.tag-win  { background: var(--win-bg);  color: var(--win-ink); }
.tag-loss { background: var(--loss-bg); color: var(--loss-ink); }
.tag-draw { background: var(--draw-bg); color: var(--draw-ink); }

.game-teams {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px;
  font-size: 1.0625rem;
}
.team { color: var(--ink-2); }
.team.is-mine { font-weight: 800; color: var(--ink); }
.team-dash { color: var(--muted); }

.game-venue {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.8125rem; color: var(--muted);
}
.pin { width: 15px; height: 15px; flex: 0 0 auto; }

.game-actions { flex: 1 1 100%; }
.game-actions .btn { display: block; text-align: center; }

.empty {
  background: var(--card); border: 1px dashed var(--line);
  border-radius: var(--radius); padding: 20px; text-align: center; color: var(--muted);
}

/* ---------- past games toggle, note, footer ---------- */

.toggle {
  font: inherit; font-weight: 600; font-size: 0.9375rem;
  width: 100%;
  background: var(--card); color: var(--ink);
  border: 1px solid #C5CCD9; border-radius: 12px;
  padding: 13px 16px; min-height: 44px; cursor: pointer;
}
.toggle:hover { border-color: var(--muted); }

.note { font-size: 0.8125rem; color: var(--muted); }

.foot {
  padding-block: 20px 28px;
  display: flex; flex-direction: column; gap: 8px;
  font-size: 0.8125rem; color: var(--muted);
  border-top: 1px solid var(--line);
  margin-top: 8px;
}
.share { color: var(--orange-ink); font-weight: 600; }

.noscript { padding-block: 24px; }

/* ---------- wider screens ---------- */

@media (min-width: 760px) {
  .band-in { padding-block: 20px 40px; gap: 36px; }
  .brand-name { font-size: 1.25rem; }
  .brand-sub { font-size: 0.875rem; }
  .hero { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 28px; }
  .hero-text { flex: 1 1 480px; min-width: 0; }
  .hero-title { font-size: 2.4rem; }
  .hero-vs { font-size: 1.5rem; }
  .hero-meta { font-size: 1.0625rem; }
  .btn-primary { padding: 14px 22px; }

  .game { padding: 16px 18px; gap: 16px; }
  .game-date { flex: 0 0 64px; }
  .date-d { font-size: 1.75rem; }
  .game-time { font-size: 1.35rem; min-width: 56px; text-align: center; }
  .score { min-width: 84px; }
  .score-n { font-size: 1.35rem; }
  .game-main { flex: 1 1 300px; }
  .game-teams { font-size: 1.125rem; }
  .game-actions { flex: 0 0 auto; margin-inline-start: auto; }
  .game-actions .btn { display: inline-block; }
  .toggle { width: auto; align-self: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
