/* World Cup 2026 - FIFA-inspired palette, mobile-first, system fonts only. */

:root {
  /* FIFA palette - navy + red on white */
  --navy: #0a4f90;
  --navy-deep: #062f55;
  --navy-tint: #e8eef5;
  --red: var(--navy);
  --red-deep: var(--navy-deep);
  --green: #3cac3b;
  --gold: #f4c430;
  --paper: #f5f6f7;
  --surface: #ffffff;
  --line: #e1e3e6;
  --line-strong: #c9cdd2;
  --ink: #1a1a1a;
  --ink-2: #3a3f47;
  --ink-dim: #6b7480;
  --ink-muted: #9aa3ad;

  --radius: 10px;
  --radius-sm: 6px;
  --tap: 44px;
  --shadow-sm: 0 1px 2px rgba(10,47,85,0.06), 0 1px 4px rgba(10,47,85,0.04);
  --shadow-md: 0 4px 14px rgba(10,47,85,0.08), 0 2px 6px rgba(10,47,85,0.05);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--red); }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font: inherit; }

/* --- Site header (sticky, navy bar) --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy);
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  box-shadow: var(--shadow-sm);
}
.site-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto auto;
  grid-template-areas:
    "logo  search meta"
    "nav   nav    nav";
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
}
@media (min-width: 880px) {
  .site-header-inner {
    grid-template-columns: auto 1fr auto auto;
    grid-template-areas: "logo nav search meta";
    column-gap: 0.85rem;
  }
}
.site-logo {
  grid-area: logo;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  min-height: var(--tap);
}
.site-logo:hover { color: #fff; opacity: 0.92; }
.logo-mark {
  display: inline-flex;
  align-items: center;
  color: #fff;
  font-weight: 900;
  font-size: 2.244rem;
  letter-spacing: -0.02em;
  line-height: 1;
  flex-shrink: 0;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.05; }
.logo-line1 { font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; opacity: 0.85; }
.logo-line2 { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.005em; }
.site-nav {
  grid-area: nav;
  display: flex;
  gap: 0.3rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 0.45rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
@media (min-width: 880px) {
  .site-nav {
    border-top: 0;
    padding-top: 0;
    overflow: visible;
    gap: 0.4rem;
    justify-content: flex-start;
  }
  .site-nav a { flex: 0 0 auto; }
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
  flex: 1 0 auto;
  text-align: center;
  color: #fff;
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255,255,255,0.18);
  white-space: nowrap;
}
.site-nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.site-nav a.active { background: #fff; color: var(--navy); border-color: #fff; }
.site-meta {
  grid-area: meta;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.tz {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
}
.ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: var(--radius-sm);
  min-height: var(--tap);
  padding: 0 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
}
.ghost:hover { background: rgba(255,255,255,0.12); color: #fff; }
.ghost:disabled { opacity: 0.5; cursor: default; }

.lang-switch {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.55rem;
  text-decoration: none;
  white-space: nowrap;
}
.lang-switch:hover { color: #fff; background: rgba(255,255,255,0.12); }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap);
  height: var(--tap);
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: var(--radius-sm);
  padding: 0;
}
.icon-btn:hover { background: rgba(255,255,255,0.12); }
.icon-btn[aria-pressed="true"] {
  background: #fff;
  color: var(--navy);
  border-color: #fff;
}
.icon-btn[aria-pressed="true"]:hover { background: rgba(255,255,255,0.85); }
.icon-btn:disabled,
.icon-btn.is-blocked {
  opacity: 0.45;
  cursor: not-allowed;
}

/* --- Site search (header) --- */
.site-search {
  grid-area: search;
  position: relative;
  display: flex;
  align-items: center;
}
/* Mobile (default): collapsed icon-only by default; expand on tap. */
.search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap);
  height: var(--tap);
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: var(--radius-sm);
  padding: 0;
}
.search-toggle:hover { background: rgba(255,255,255,0.12); }
.search-field {
  display: none;
  align-items: center;
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.45);
  padding: 0 0.55rem;
  height: 38px;
  min-width: 220px;
  box-shadow: var(--shadow-sm);
}
.search-field:focus-within { border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,0.25); }
.search-field .search-icon-wrap {
  display: inline-flex;
  align-items: center;
  color: var(--ink-dim);
  margin-right: 0.4rem;
  flex-shrink: 0;
}
.search-input {
  flex: 1 1 auto;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  min-width: 0;
  padding: 0;
  height: 100%;
}
.search-input::placeholder { color: var(--ink-muted); }
.search-input::-webkit-search-cancel-button { -webkit-appearance: none; }

/* Mobile expand: when .is-open, hide the toggle and show the input.
   The grid area still sits between logo and meta on the top row. */
.site-search.is-open {
  position: absolute;
  top: 0.6rem;
  left: 1rem;
  right: 1rem;
  z-index: 60;
}
.site-search.is-open .search-toggle { display: none; }
.site-search.is-open .search-field {
  display: inline-flex;
  width: 100%;
  min-width: 0;
}

/* Desktop: keep icon-only collapsed by default (same as mobile),
   but when opened the field sits inline in its grid cell. */
@media (min-width: 880px) {
  .site-search.is-open {
    position: relative;
    top: auto; left: auto; right: auto;
  }
  .site-search.is-open .search-field {
    width: auto;
    min-width: 240px;
  }
}

/* Dropdown */
.search-results {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: auto;
  min-width: 280px;
  max-width: min(420px, calc(100vw - 2rem));
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 0.25rem;
  max-height: 70vh;
  overflow-y: auto;
  z-index: 70;
}
@media (min-width: 880px) {
  .search-results { right: 0; left: auto; min-width: 320px; }
}
/* On mobile, when search is open it spans the row, so anchor the dropdown
   to the full-width input. */
.site-search.is-open .search-results {
  left: 0;
  right: 0;
  max-width: none;
}
.search-result {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.6rem;
  border-radius: var(--radius-sm);
  color: var(--ink);
  text-decoration: none;
  line-height: 1.25;
}
.search-result:hover,
.search-result.is-active {
  background: var(--navy);
  color: #fff;
}
.search-result:hover .search-result-sub,
.search-result.is-active .search-result-sub { color: rgba(255,255,255,0.78); }
.search-result:hover .search-badge,
.search-result.is-active .search-badge {
  background: rgba(255,255,255,0.18);
  color: #fff;
  border-color: rgba(255,255,255,0.3);
}
.search-result-label {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-result-sub {
  color: var(--ink-dim);
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  justify-self: end;
  max-width: 14ch;
}
.search-flag { font-size: 1.05rem; line-height: 1; }
.search-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.search-badge-team   { background: var(--navy-tint); color: var(--navy); }
.search-badge-venue  { background: var(--navy-tint); color: var(--navy-deep); }
.search-badge-match  { background: #e9f5ea; color: #1f7a30; }
.search-badge-group  { background: #fff5d6; color: #6b540a; }
.search-badge-guide  { background: #f1edff; color: #4a3aaa; }
.search-empty {
  padding: 0.75rem 0.85rem;
  color: var(--ink-dim);
  font-size: 0.9rem;
}

/* --- Hero --- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff;
  padding: 2rem 1rem 2.25rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 90% 0%, rgba(230,29,37,0.18), transparent 45%),
    radial-gradient(circle at 0% 100%, rgba(60,172,59,0.12), transparent 50%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
}
.hero-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  align-items: center;
}
.hero-payoff { min-width: 0; }
@media (min-width: 880px) {
  .hero-split {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 1.5rem;
  }
  .hero-countdown { margin-top: 0; }
}
.hero-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 0.5rem;
  font-weight: 700;
}
.hero-h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin: 0 0 0.6rem;
  line-height: 1.15;
}
.hero-sub {
  margin: 0;
  font-size: 0.98rem;
  color: rgba(255,255,255,0.85);
  max-width: 56ch;
}
@media (max-width: 639px) {
  .hero-sub { display: none; }
}
#hero-tz { color: #fff; font-weight: 600; }
.hero-countdown {
  margin-top: 0;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem 1.2rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.hero-head {
  margin: 0 0 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}
.hero-label {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 0.4rem;
  font-weight: 700;
}
.hero-teams {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.hero-teams a {
  color: #fff;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.5rem;
}
.hero-teams a:hover { color: #fff; opacity: 0.9; }
.hero-team { white-space: nowrap; }
.hero-vs {
  color: rgba(255,255,255,0.5);
  font-weight: 500;
  white-space: nowrap;
}
.hero-venue {
  margin: 0 0 0.85rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-venue a {
  color: rgba(255,255,255,0.78);
  border-bottom: 1px solid transparent;
}
.hero-venue a:hover { color: #fff; border-bottom-color: rgba(255,255,255,0.4); }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: center;
}
.hero-info { min-width: 0; }
.hero-when {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem 0.7rem;
  margin: 0;
}
.hero-time {
  font-family: var(--font);
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  color: #fff;
  line-height: 1;
}
.hero-date {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.78);
  font-weight: 500;
}
.hero-tz-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: rgba(255,255,255,0.6);
  padding: 0.1rem 0.45rem;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.hero-big.big-countdown {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  justify-content: flex-start;
  gap: 0.4rem;
}
.hero-big .big-num { color: #fff; }
.hero-big .big-sep { color: rgba(255,255,255,0.45); }
.hero-big .big-lbl { color: rgba(255,255,255,0.65); }
.hero-big .big-now { color: #fff; }

/* --- Page main --- */
.page-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem;
}
.page-narrow { max-width: 760px; }

/* --- Topbar (back link + breadcrumbs) --- */
.page-topbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
  flex-wrap: wrap;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: var(--tap);
  padding: 0 0.85rem 0 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--navy);
  font-size: 0.85rem;
  font-weight: 600;
}
.back-link:hover { border-color: var(--navy); background: var(--navy-tint); color: var(--navy); }
.breadcrumbs {
  font-size: 0.8rem;
  color: var(--ink-dim);
  font-family: var(--mono);
}
.breadcrumbs a { color: var(--ink-dim); }
.breadcrumbs a:hover { color: var(--navy); }
.bc-sep { color: var(--line-strong); margin: 0 0.3rem; }

/* --- Topbar action button (e.g. star match) --- */
.topbar-action {
  margin-left: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  min-height: var(--tap);
  padding: 0 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}
.topbar-action:hover { border-color: var(--navy); color: var(--navy); background: var(--navy-tint); }
.topbar-action.on {
  color: var(--gold);
  border-color: var(--gold);
  background: #fff8e0;
}
@media (max-width: 520px) {
  .topbar-action-label { display: none; }
  .topbar-action { padding: 0 0.7rem; }
}

/* --- Page intro --- */
.page-intro {
  text-align: center;
  margin: 0 0 1.5rem;
}
.page-intro h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin: 0 0 0.6rem;
  line-height: 1.2;
}
.page-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 700;
  margin: 0 0 0.5rem;
}
.page-lede {
  margin: 0 auto;
  max-width: 60ch;
  color: var(--ink-2);
  font-size: 0.98rem;
}

/* --- Filters (desktop only) --- */
.filters {
  display: none;
}
@media (min-width: 640px) {
  .filters {
    background: var(--surface);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
    padding: 0.85rem 1rem;
    max-width: 1100px;
    margin: 0 auto;
  }
}
.filters label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.62rem;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
}
.filters label > span { padding-left: 0.1rem; }
.filters select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 100%;
  background-color: var(--surface);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5L6 7.8 9 4.5' fill='none' stroke='%230a4f90' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 12px 12px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  min-height: var(--tap);
  padding: 0 2.5rem 0 0.85rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: var(--tap);
  cursor: pointer;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}
.filters select:hover {
  border-color: var(--navy);
  background-color: var(--navy-tint);
}
.filters select:focus {
  border-color: var(--navy);
  outline: none;
  box-shadow: 0 0 0 3px rgba(10, 79, 144, 0.18);
  background-color: var(--surface);
}
.filters select:focus-visible {
  border-color: var(--navy);
  outline: none;
  box-shadow: 0 0 0 3px rgba(10, 79, 144, 0.18);
}
.filters select::-ms-expand { display: none; }

/* --- Schedule day sections --- */
.day { margin-bottom: 1.5rem; }
.day-heading {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
  margin: 0 0 0.5rem;
  padding: 0.4rem 0.25rem;
  border-bottom: 2px solid var(--navy);
}

/* --- Match table (list of clickable rows) --- */
.match-table {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.match-row {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) auto minmax(0, 1fr) 1.25rem;
  grid-template-areas:
    "time   stage stage stage arrow"
    "home   home  vs    away  arrow"
    "venue  venue venue venue arrow"
    "cd     cd    cd    cd    arrow";
  gap: 0.2rem 0.5rem;
  padding: 0.85rem 0.85rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  align-items: center;
}
.match-row:last-child { border-bottom: 0; }
.match-row:hover { background: var(--navy-tint); color: var(--ink); }
.cell-time { grid-area: time; font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 0.95rem; font-weight: 700; }
.cell-stage { grid-area: stage; font-size: 0.7rem; color: var(--ink-dim); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; text-align: right; }
.cell-home { grid-area: home; min-width: 0; text-align: right; }
.cell-home .team { justify-content: flex-end; }
.cell-away { grid-area: away; min-width: 0; text-align: left; }
.cell-vs {
  grid-area: vs;
  display: inline;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--red);
  font-weight: 700;
  text-align: center;
  padding: 0 0.2rem;
}
.venue-cell { grid-area: venue; font-size: 0.78rem; color: var(--ink-dim); margin-top: 0.15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-countdown { grid-area: cd; margin-top: 0.25rem; }
.cell-arrow { grid-area: arrow; color: var(--ink-muted); font-size: 1.5rem; align-self: center; }

.team {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.92rem;
  min-width: 0;
  max-width: 100%;
}
.flag { font-size: 1.05rem; line-height: 1; flex-shrink: 0; }
.team-name {
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.team-tbd { color: var(--ink-dim); font-style: italic; font-weight: 500; }

.countdown {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--navy);
  font-weight: 600;
  letter-spacing: 0.01em;
  background: var(--navy-tint);
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}

/* --- Match detail --- */
.match-detail { padding: 0; }
.detail-stage {
  text-align: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin: 0 0 0.5rem;
  font-weight: 700;
}
.match-headline {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin: 0 0 1rem;
  line-height: 1.2;
}
.vs-divider { color: var(--red); font-weight: 600; margin: 0 0.5rem; font-size: 0.85em; }
.match-versus {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.75rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 0.75rem;
  margin: 0 0 1rem;
  box-shadow: var(--shadow-sm);
}
.versus-side { text-align: center; }
.versus-flag { font-size: 2.6rem; line-height: 1; margin-bottom: 0.4rem; }
.versus-name { font-size: 0.95rem; font-weight: 700; color: var(--ink); }
.versus-mid { color: var(--red); font-weight: 700; font-size: 0.95rem; letter-spacing: 0.05em; }
.versus-goals {
  font-family: var(--mono);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--navy);
  margin-top: 0.3rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.match-versus.is-played .versus-mid { color: var(--ink-dim); font-size: 1.5rem; }

.result-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1rem;
  margin: 1rem 0;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.result-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--navy-tint);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  margin-bottom: 0.65rem;
}
.result-score {
  font-family: var(--mono);
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  line-height: 1;
}
.result-pen, .result-ht {
  display: inline-block;
  margin-top: 0.55rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
  font-weight: 600;
}
.result-pen { margin-right: 0.55rem; }

/* --- Big countdown (time.is-inspired: serif numerals, colon separators) --- */
.big-countdown {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.35rem;
  margin: 1rem 0;
  padding: 1rem 0.6rem 0.95rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.big-seg {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 2.4rem;
}
.big-num {
  font-family: var(--font);
  font-size: 2.2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--navy);
  letter-spacing: -0.035em;
}
.big-sep {
  font-family: var(--font);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1;
  color: var(--ink-muted);
  padding-top: 0.05rem;
  letter-spacing: -0.05em;
  user-select: none;
}
.big-lbl {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-dim);
}
.big-now {
  flex: 1;
  text-align: center;
  font-family: var(--font);
  font-size: 1.3rem;
  color: var(--red);
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* --- Info table (replaces the meta-list) --- */
.info-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin: 0 0 1rem;
}
.info-table th, .info-table td {
  padding: 0.7rem 0.85rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
.info-table tr:last-child th, .info-table tr:last-child td { border-bottom: 0; }
.info-table th {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  width: 40%;
  background: #fafbfc;
}
.info-table td { color: var(--ink); }
.info-table td.mono { font-family: var(--mono); font-size: 0.82rem; }

/* --- Venue spotlight (on match page) --- */
.venue-spotlight {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 0.75rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem;
  margin: 0 0 1rem;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.venue-spotlight:hover { border-color: var(--navy); color: var(--ink); background: var(--navy-tint); }
.vs-image {
  width: 92px;
  height: 92px;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  background: var(--navy);
}
.vs-eyebrow { font-size: 0.65rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-dim); margin: 0 0 0.2rem; font-weight: 700; }
.vs-stadium { font-size: 1rem; font-weight: 700; margin: 0 0 0.15rem; }
.vs-meta { font-size: 0.8rem; color: var(--ink-dim); margin: 0; }
.vs-arrow { color: var(--ink-muted); font-size: 1.5rem; }

/* --- Action button (star) --- */
.action-btn {
  display: block;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  min-height: var(--tap);
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 0.75rem;
}
.action-btn:hover { border-color: var(--navy); background: var(--navy-tint); color: var(--navy); }
.action-btn.on { color: var(--gold); border-color: var(--gold); background: #fff8e0; }

/* --- Venue detail page --- */
.venue-hero {
  position: relative;
  background-color: var(--navy);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 220px;
  margin: 0 0 1rem;
  box-shadow: var(--shadow-md);
}
.venue-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.venue-hero-noimg { background: linear-gradient(135deg, var(--navy), var(--navy-deep)); }
.venue-hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem 1.1rem;
  color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.35) 50%, rgba(0,0,0,0.05) 100%);
  margin: 0;
}
.venue-hero-eyebrow { font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; margin: 0 0 0.35rem; color: rgba(255,255,255,0.85); font-weight: 700; }
.venue-hero-h1 { font-size: 1.6rem; font-weight: 800; margin: 0 0 0.4rem; line-height: 1.15; letter-spacing: -0.005em; }
.venue-hero-meta { margin: 0; font-size: 0.85rem; color: rgba(255,255,255,0.85); }
.venue-blurb { color: var(--ink-2); font-size: 0.98rem; margin: 0 0 1.25rem; }

/* --- Venue: next match callout --- */
.venue-next {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  padding: 1.1rem 1rem;
  margin: 0 0 1.25rem;
  box-shadow: var(--shadow-md);
}
.venue-next-eyebrow { font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255,255,255,0.7); margin: 0 0 0.35rem; font-weight: 700; }
.venue-next-teams { font-size: 1.2rem; font-weight: 800; margin: 0 0 0.2rem; }
.venue-next-teams a { color: #fff; }
.venue-next-teams a:hover { color: #fff; opacity: 0.9; }
.venue-next-when { font-size: 0.85rem; color: rgba(255,255,255,0.8); margin: 0 0 0.85rem; }
.venue-next .big-countdown {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  margin: 0;
  box-shadow: none;
}
.venue-next .big-num { color: #fff; }
.venue-next .big-sep { color: rgba(255,255,255,0.45); }
.venue-next .big-lbl { color: rgba(255,255,255,0.7); }
.venue-next .big-now { color: #fff; }

.section-h2 {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.005em;
  margin: 0 0 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--navy);
}
.venue-facts, .venue-fixtures { margin: 1.5rem 0; }

/* --- Venues grid (index page) --- */
.venues-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin: 0 0 2rem;
}
.venue-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  display: flex;
  flex-direction: column;
}
.venue-card:hover {
  border-color: var(--navy);
  color: var(--ink);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.vc-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: center;
  background-color: var(--navy);
  display: block;
}
.vc-image-placeholder { background: linear-gradient(135deg, var(--navy), var(--navy-deep)); }
.vc-body { padding: 1rem; }
.vc-country {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 700;
  margin: 0 0 0.3rem;
}
.vc-stadium {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0 0 0.2rem;
  line-height: 1.2;
}
.vc-city { font-size: 0.85rem; color: var(--ink-dim); margin: 0 0 0.85rem; }
.vc-stats {
  list-style: none;
  margin: 0;
  padding: 0.7rem 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
.vc-stats li { display: flex; flex-direction: column; gap: 0.15rem; }
.vc-stat-num { font-family: var(--mono); font-size: 0.95rem; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.vc-stat-lbl { font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-dim); font-weight: 700; }

/* --- Share bar --- */
.share-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1.25rem 0;
  padding: 0.7rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  position: relative;
}
.share-label {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
  font-weight: 700;
  margin-right: 0.25rem;
}
.share-buttons {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.share-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease, transform 0.08s ease;
}
.share-btn:hover { transform: translateY(-1px); }
.share-x:hover      { background: #000;     color: #fff; border-color: #000; }
.share-fb:hover     { background: #1877F2; color: #fff; border-color: #1877F2; }
.share-wa:hover     { background: #25D366; color: #fff; border-color: #25D366; }
.share-tg:hover     { background: #229ED9; color: #fff; border-color: #229ED9; }
.share-email:hover  { background: var(--navy); color: #fff; border-color: var(--navy); }
.share-copy:hover   { background: var(--ink); color: #fff; border-color: var(--ink); }
.share-confirm {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--green);
  margin-left: 0.4rem;
  padding: 0.2rem 0.5rem;
  background: #e6f4e6;
  border-radius: var(--radius-sm);
}
@media (min-width: 640px) {
  .share-bar { gap: 0.85rem; padding: 0.8rem 1.1rem; }
}

/* --- Head-to-head --- */
.h2h { margin: 1.5rem 0 1rem; }
.h2h-summary {
  margin: 0 0 0.85rem;
  color: var(--ink-2);
  font-size: 0.95rem;
}
.h2h-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.h2h-item { border-bottom: 1px solid var(--line); }
.h2h-item:last-child { border-bottom: 0; }
.h2h-row {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1.1rem;
  grid-template-areas:
    "meta   chevron"
    "result chevron";
  align-items: center;
  gap: 0.3rem 0.7rem;
  padding: 0.75rem 0.9rem;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  border: 0;
  text-align: left;
  font: inherit;
}
.h2h-row:hover { background: var(--navy-tint); color: var(--ink); }
.h2h-row.is-open { background: var(--navy-tint); }
.h2h-meta {
  grid-area: meta;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.h2h-year {
  font-family: var(--mono);
  font-weight: 800;
  color: var(--navy);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}
.h2h-badge {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: var(--navy-tint);
  color: var(--navy);
}
.h2h-badge-euro { background: var(--navy-tint); color: var(--navy-deep); }
.h2h-badge-copa { background: #e6f4e6; color: #226022; }
.h2h-badge-gc { background: #fff8e0; color: #8a6500; }
.h2h-round {
  font-size: 0.78rem;
  color: var(--ink-dim);
  font-family: var(--mono);
  letter-spacing: 0.02em;
}
.h2h-result {
  grid-area: result;
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.h2h-team { font-weight: 600; }
.h2h-score {
  font-family: var(--mono);
  font-weight: 800;
  color: var(--navy);
  margin: 0 0.35rem;
  font-variant-numeric: tabular-nums;
}
.h2h-pen { color: var(--ink-dim); font-size: 0.8rem; margin-left: 0.25rem; }
.h2h-chevron {
  grid-area: chevron;
  color: var(--ink-muted);
  font-size: 1.25rem;
  transition: transform 0.15s ease;
}
.h2h-row.is-open .h2h-chevron { transform: rotate(90deg); color: var(--navy); }

/* Inline expand panel (DPM-style: not a modal, sits between rows) */
.h2h-expand {
  position: relative;
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding: 1rem 1.1rem 1.15rem;
}
.h2h-expand-close {
  position: absolute;
  top: 0.55rem;
  right: 0.65rem;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--ink-dim);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 999px;
}
.h2h-expand-close:hover { background: var(--line); color: var(--navy); }
.h2h-x-headline {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.h2h-x-team { color: var(--ink); }
.h2h-x-score {
  font-family: var(--mono);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--navy);
  margin: 0 0.5rem;
  font-variant-numeric: tabular-nums;
}
.h2h-x-pen, .h2h-x-ht {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-dim);
  margin-left: 0.4rem;
  letter-spacing: 0.02em;
}
.h2h-x-meta {
  margin: 0 0 0.85rem;
  font-size: 0.85rem;
  color: var(--ink-dim);
}
.h2h-x-goals {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  margin-bottom: 0.85rem;
}
.goal-side-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
  font-weight: 700;
  margin: 0 0 0.3rem;
}
.goal-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.goal-list li {
  font-size: 0.9rem;
  padding: 0.18rem 0;
  color: var(--ink);
}
.goal-minute {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--navy);
  font-weight: 600;
  margin-left: 0.25rem;
}
.h2h-x-deeplink {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--navy);
  font-weight: 700;
}
.h2h-x-deeplink:hover { color: var(--red); }

.h2h-toggle-more {
  display: block;
  width: 100%;
  background: transparent;
  border: 1px dashed var(--line-strong);
  border-top: 0;
  color: var(--navy);
  font-weight: 700;
  font-size: 0.85rem;
  font-family: var(--mono);
  letter-spacing: 0.05em;
  padding: 0.7rem;
  cursor: pointer;
  border-radius: 0 0 var(--radius) var(--radius);
}
.h2h-toggle-more:hover { background: var(--navy-tint); color: var(--navy); }
.h2h-toggle-count { color: var(--ink-dim); margin-left: 0.25rem; }
.h2h-sources { color: var(--ink-dim); font-size: 0.85rem; }

@media (min-width: 640px) {
  .h2h-row {
    grid-template-columns: minmax(15rem, auto) minmax(0, 1fr) 1.1rem;
    grid-template-areas: "meta result chevron";
    padding: 0.7rem 1.1rem;
  }
  .h2h-result { text-align: right; }
  .h2h-x-goals { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
}

/* --- Groups index --- */
.groups-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin: 0 0 2rem;
}
.group-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.group-card:hover {
  border-color: var(--navy);
  color: var(--ink);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.group-card-head {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--navy);
}
.group-card-label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  font-weight: 700;
}
.group-card-letter {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}
.group-card-teams {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.group-card-teams li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.95rem;
  font-weight: 500;
}
.g-flag { font-size: 1.15rem; line-height: 1; flex-shrink: 0; }
.g-team {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.group-card-meta {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-dim);
  font-family: var(--mono);
  letter-spacing: 0.02em;
}

/* --- Group detail --- */
.group-hero {
  text-align: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  margin: 0 0 1.25rem;
  box-shadow: var(--shadow-md);
}
.group-hero-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 0.4rem;
  font-weight: 700;
}
.group-hero-h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin: 0 0 0.4rem;
  letter-spacing: -0.01em;
}
.group-hero-meta {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
}

.gt-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.gt-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
  font-weight: 600;
}
.gt-row:last-child { border-bottom: 0; }
.gt-flag { font-size: 1.5rem; line-height: 1; flex-shrink: 0; }
.gt-name { color: var(--ink); }

.group-teams, .group-fixtures, .ko-stage { margin: 1.5rem 0; }
.ko-count {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-dim);
  letter-spacing: 0.04em;
  margin-left: 0.4rem;
}

/* --- Fixture card (FIFA-style: 2 lines per match) --- */
.fixtures-stack {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.fixture-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 1rem 0.7rem;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}
.fixture-card:hover {
  border-color: var(--navy);
  color: var(--ink);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.fc-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem 0.85rem;
}
.fc-team {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}
.fc-home { justify-content: flex-end; }
.fc-away { justify-content: flex-start; }
.fc-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.fc-tbd { color: var(--ink-dim); font-style: italic; font-weight: 500; }
.fc-flag {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
}
.fc-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  text-align: center;
  flex-shrink: 0;
}
.fc-time {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--navy);
  line-height: 1;
  letter-spacing: -0.01em;
}
.fc-mid .countdown {
  font-size: 0.7rem;
  padding: 0.1rem 0.45rem;
}
.fc-meta {
  margin-top: 0.6rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--ink-dim);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.fc-meta-date { font-weight: 700; color: var(--ink-2); }
.fc-venue, .fc-stage { color: var(--ink-dim); }
.fc-dot { color: var(--line-strong); }

@media (min-width: 640px) {
  .fixture-card { padding: 1rem 1.25rem 0.8rem; }
  .fc-name { font-size: 1.1rem; }
  .fc-flag { font-size: 1.85rem; }
  .fc-time { font-size: 1.3rem; }
  .fc-body { gap: 0.6rem 1.25rem; }
}

/* --- Standings table (group page) --- */
.group-standings { margin: 1.5rem 0; }
.standings-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.standings-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 460px;
}
.standings-table thead th {
  background: #fafbfc;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
  padding: 0.6rem 0.5rem;
  text-align: center;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.standings-table thead th.st-team-h { text-align: left; padding-left: 0.85rem; }
.standings-table tbody td {
  padding: 0.6rem 0.5rem;
  text-align: center;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}
.standings-table tbody tr:last-child td { border-bottom: 0; }
.standings-table .st-pos { font-weight: 700; color: var(--ink-dim); width: 2rem; }
.standings-table .st-team { text-align: left; padding-left: 0.85rem; font-family: var(--font); font-size: 0.92rem; font-weight: 600; }
.standings-table .st-team a { color: var(--ink); display: inline-flex; align-items: center; gap: 0.45rem; }
.standings-table .st-team a:hover { color: var(--navy); }
.standings-table .st-flag { font-size: 1.1rem; line-height: 1; flex-shrink: 0; }
.standings-table .st-gd { color: var(--ink-2); }
.standings-table .st-pts { font-weight: 800; color: var(--navy); }
.standings-table tr.qualify-top2 { background: rgba(60,172,59,0.06); }
.standings-table tr.qualify-third { background: rgba(244,196,48,0.06); }
.standings-empty {
  margin: 0;
  padding: 1rem;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink-dim);
  font-size: 0.92rem;
  text-align: center;
}
.standings-key {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.65rem 0 0;
  font-size: 0.78rem;
  color: var(--ink-dim);
  flex-wrap: wrap;
}
.key-dot { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 999px; }
.key-top2 { background: rgba(60,172,59,0.5); }
.key-third { background: rgba(244,196,48,0.6); }

/* --- Played-match scores (rows + cards) --- */
.fixture-card.is-played .fc-time { display: none; }
.fc-score {
  font-family: var(--mono);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  line-height: 1;
}
.fc-pen, .fc-state {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.fc-state { color: var(--ft); margin-top: 0.15rem; }
.row-score {
  font-family: var(--mono);
  font-weight: 800;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.row-state {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ft);
  margin-left: 0.3rem;
  letter-spacing: 0.06em;
}

/* --- Team pages --- */
.team-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 1.4rem 1.2rem;
  margin: 0 0 1.25rem;
  box-shadow: var(--shadow-md);
}
.team-hero-flag { font-size: 3.2rem; line-height: 1; flex-shrink: 0; }
.team-hero-text { min-width: 0; }
.team-hero-eyebrow { font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--red); margin: 0 0 0.3rem; font-weight: 700; }
.team-hero-h1 { font-size: 1.85rem; font-weight: 800; margin: 0 0 0.3rem; letter-spacing: -0.01em; line-height: 1.15; }
.team-hero-meta { margin: 0; font-size: 0.88rem; color: rgba(255,255,255,0.82); }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin: 0 0 1.25rem;
}
.stat-pill {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.6rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-num {
  font-family: var(--mono);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  margin-bottom: 0.25rem;
}
.stat-lbl {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
}

.team-stats, .team-fixtures, .recent-history, .team-form { margin: 1.25rem 0; }

.team-form .form-summary {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 0.5rem;
  font-variant-numeric: tabular-nums;
}
.team-form .form-chart {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem 0.6rem 0.4rem;
  box-shadow: var(--shadow-sm);
}
.team-form .form-chart-svg {
  display: block;
  width: 100%;
  height: auto;
}
.team-form .form-grid { stroke: var(--line); stroke-width: 1; }
.team-form .form-axis-y { font-family: var(--mono); font-size: 10px; fill: var(--ink-dim); text-anchor: end; dominant-baseline: middle; }
.team-form .form-axis-x { font-family: var(--mono); font-size: 10px; fill: var(--ink-dim); text-anchor: middle; }
.team-form .form-line { stroke: var(--navy); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.team-form .form-dot { stroke: var(--surface); stroke-width: 1.5; }
.team-form .form-dot-w { fill: var(--green); }
.team-form .form-dot-d { fill: var(--gold); }
.team-form .form-dot-l { fill: var(--red); }
.team-form .form-caption { font-size: 0.75rem; margin: 0.4rem 0 0; }

.recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.recent-row {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  grid-template-areas:
    "year tournament"
    "year result";
  gap: 0.1rem 0.65rem;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
  align-items: center;
}
.recent-row:last-child { border-bottom: 0; }
.recent-year {
  grid-area: year;
  font-family: var(--mono);
  font-weight: 800;
  color: var(--navy);
  font-size: 1rem;
}
.recent-tournament {
  grid-area: tournament;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  font-weight: 700;
}
.recent-result {
  grid-area: result;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recent-result strong {
  font-family: var(--mono);
  color: var(--navy);
  font-weight: 800;
  margin: 0 0.2rem;
}

/* --- Teams index --- */
.teams-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
  margin: 0 0 2rem;
}
.team-card {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 0.95rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.12s ease, transform 0.08s ease, box-shadow 0.12s ease;
  min-width: 0;
}
.team-card:hover {
  border-color: var(--navy);
  color: var(--ink);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.team-card-flag { font-size: 1.7rem; line-height: 1; flex-shrink: 0; }
.team-card-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.team-card-name { font-weight: 700; font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-card-meta {
  font-size: 0.72rem;
  color: var(--ink-dim);
  font-family: var(--mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 480px) {
  .teams-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 640px) {
  .teams-grid { grid-template-columns: repeat(3, 1fr); }
  .team-hero-flag { font-size: 4rem; }
  .team-hero-h1 { font-size: 2.4rem; }
  .stat-grid { grid-template-columns: repeat(6, 1fr); }
}
@media (min-width: 960px) {
  .teams-grid { grid-template-columns: repeat(4, 1fr); }
}

/* --- Group team links --- */
.gt-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  color: var(--ink);
}
.gt-link:hover { color: var(--navy); background: var(--navy-tint); }

/* --- FAQ --- */
.faq { margin: 2.25rem 0 1.25rem; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.faq-item[open] { border-color: var(--navy); }
.faq-item summary {
  cursor: pointer;
  padding: 0.9rem 1rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
  list-style: none;
  position: relative;
  padding-right: 2.5rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--navy);
  font-weight: 800;
  font-size: 1.2rem;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-body {
  padding: 0 1rem 1rem;
  color: var(--ink-2);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* --- Body intro paragraph + related fixtures (SEO body text & internal links) --- */
.page-intro-p {
  margin: 1.25rem 0;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border-left: 4px solid var(--navy);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink-2);
}
.page-intro-p strong { color: var(--ink); }
.related { margin: 1.5rem 0; }
.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}
.related-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow-sm);
}
.related-block h3 {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  font-weight: 700;
}
.related-block h3 a { color: var(--navy); }
.related-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.related-list li {
  font-size: 0.92rem;
  padding: 0.3rem 0;
  border-bottom: 1px dotted var(--line);
}
.related-list li:last-child { border-bottom: 0; }
.rel-when { color: var(--ink-dim); font-family: var(--mono); font-size: 0.82rem; }
@media (min-width: 640px) {
  .related-grid { grid-template-columns: repeat(3, 1fr); }
}

/* --- Footer --- */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255,255,255,0.85);
  margin-top: 2.5rem;
  padding: 2rem 1rem;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
.footer-block h3 { font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: #fff; margin: 0 0 0.6rem; font-weight: 800; }
.footer-block ul { list-style: none; padding: 0; margin: 0; }
.footer-block li { margin-bottom: 0.4rem; }
.footer-block a { color: rgba(255,255,255,0.85); }
.footer-block a:hover { color: #fff; }
.footer-block p { margin: 0; font-size: 0.85rem; line-height: 1.55; }
.footer-block .muted { color: rgba(255,255,255,0.62); font-size: 0.78rem; }
#tz-footer { color: #fff; }

.footer-bottom {
  max-width: 1100px;
  margin: 1.75rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
}
.footer-bottom .lang-switch { color: rgba(255,255,255,0.85); }
.footer-bottom .lang-switch:hover { color: #fff; background: rgba(255,255,255,0.12); }

/* --- Tablet --- */
@media (min-width: 640px) {
  .site-header-inner { padding: 0.75rem 1.5rem; }
  .site-nav { gap: 0.4rem; }
  .hero { padding: 3rem 1.5rem 3.25rem; }
  .hero-h1 { font-size: 2.4rem; }
  .hero-sub { font-size: 1.05rem; }
  .filters { grid-template-columns: repeat(3, 1fr); padding: 1rem 1.5rem; }
  .page-main { padding: 1.5rem; }

  /* Wide-table layout for matches: time | stage | home > vs < away | venue | countdown | > */
  .match-row {
    grid-template-columns: 4.5rem 5.5rem minmax(0, 1fr) auto minmax(0, 1fr) minmax(6.5rem, 10rem) 7rem 1.25rem;
    grid-template-areas: "time stage home vs away venue cd arrow";
    align-items: center;
    padding: 0.85rem 1rem;
  }
  /* No-venue variant (used on venue detail pages where the column is redundant) */
  .match-table--no-venue .match-row {
    grid-template-columns: 4.5rem 5.5rem minmax(0, 1fr) auto minmax(0, 1fr) 7rem 1.25rem;
    grid-template-areas: "time stage home vs away cd arrow";
  }
  .cell-vs { padding: 0; }
  .cell-home { text-align: right; min-width: 0; }
  .cell-away { min-width: 0; }
  .cell-home .team { justify-content: flex-end; }
  .cell-stage { text-align: left; }
  .venue-cell { font-size: 0.82rem; margin-top: 0; }
  .cell-countdown { text-align: right; margin-top: 0; }
  .team { font-size: 0.98rem; }

  .match-headline { font-size: 2rem; }
  .versus-flag { font-size: 3.4rem; }
  .versus-name { font-size: 1.1rem; }
  .big-num { font-size: 3rem; }
  .big-sep { font-size: 2.7rem; padding-top: 0.1rem; }
  .big-lbl { font-size: 0.65rem; }
  .big-seg { min-width: 3.2rem; gap: 0.5rem; }
  .hero-time { font-size: 2rem; }
  .hero-teams { font-size: 1.3rem; }
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.75rem;
    align-items: center;
  }
  .hero-big.big-countdown { justify-self: end; }
  .venue-hero { min-height: 320px; }
  .venue-hero-h1 { font-size: 2.1rem; }
  .venues-grid { grid-template-columns: repeat(2, 1fr); }
  .groups-grid { grid-template-columns: repeat(2, 1fr); }
  .gt-list { grid-template-columns: repeat(2, 1fr); }
  .gt-row:nth-child(odd) { border-right: 1px solid var(--line); }
  .group-hero-h1 { font-size: 2.6rem; }
  .footer-inner { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .venues-grid { grid-template-columns: repeat(3, 1fr); }
  .groups-grid { grid-template-columns: repeat(3, 1fr); }
  .match-headline { font-size: 2.4rem; }
  .versus-flag { font-size: 4rem; }
  .hero-h1 { font-size: 2.8rem; }
  .footer-inner { grid-template-columns: repeat(4, 1fr); }
}

/* --- Guide articles (long-form prose) --- */
.guide-article {
  max-width: 65ch;
  margin: 0 auto;
  line-height: 1.7;
  color: var(--ink);
}
.guide-article p {
  margin: 0 0 1.1rem;
}
.guide-article h2.section-h2 {
  margin-top: 2rem;
}
.guide-article h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 1.3rem 0 0.4rem;
  color: var(--ink);
}
.guide-article a {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.guide-article a:hover { color: var(--red); }
.guide-article .info-table { margin: 1rem 0 1.4rem; }
.guide-article .guide-team-list {
  line-height: 1.9;
}
.guide-article .guide-team-list a {
  text-decoration: none;
  border-bottom: 1px dotted var(--line);
}
.guide-article .guide-team-list a:hover {
  border-bottom-color: var(--red);
}
.guide-article .muted {
  font-size: 0.85rem;
  color: var(--muted, #6b7280);
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* --- Knockout bracket SVG --- */
.ko-bracket-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 1rem;
  margin: 1.5rem 0;
  border: 1px solid var(--line);
  border-radius: var(--radius, 8px);
  background: var(--surface);
}
.ko-bracket {
  display: block;
  width: 1400px;
  min-width: 1400px;
  height: auto;
}
.ko-svg-cell { cursor: pointer; }
.ko-svg-cell rect { transition: fill 0.15s ease, stroke 0.15s ease; }
.ko-svg-cell:hover rect { fill: var(--navy-tint, #e8eef5); stroke: var(--navy, #0a4f90); }
.ko-svg-cell-final rect { stroke: var(--red, #e61d25) !important; }
.ko-svg-cell-final:hover rect { fill: #fff1f1; }
.ko-list-details {
  margin-top: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius, 8px);
  padding: 0.5rem 1rem;
  background: var(--surface);
}
.ko-list-details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--navy);
  padding: 0.5rem 0;
  list-style: revert;
}
.ko-list-details[open] summary { margin-bottom: 0.5rem; }
@media (max-width: 768px) {
  /* Bracket stays available on mobile via horizontal scroll, but the details
     list is the friendlier default. Users can still scroll the SVG. */
  .ko-bracket-wrap { font-size: 0.9rem; }
}

.match-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 2rem 0 1.5rem;
}
.match-nav-link {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s, background 0.15s;
}
.match-nav-link:hover { border-color: var(--navy); background: var(--surface-strong, var(--surface)); }
.match-nav-next { text-align: right; }
.match-nav-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.match-nav-teams { font-weight: 600; }
.match-nav-when { font-size: 0.82rem; color: var(--muted); }
@media (max-width: 540px) {
  .match-nav { grid-template-columns: 1fr; }
  .match-nav-next { text-align: left; }
}
