*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

:root {
  /* Dark theme (default) — deep neutral, low-chroma surfaces.
     Cooler than the previous warm-black so the orange accent and
     gold metallic read as deliberate against a true neutral. */
  --bg:          #08090b;
  --surface:     #101114;
  --surface2:   #16181c;
  --surface3:   #1d2025;
  /* Hairline border — kept under 8% luminosity diff vs surface
     so it disappears at distance and resolves up close. Premium
     UIs lean on this restraint rather than thick chrome. */
  --border:      #22252b;
  --border-strong: #2e323a;
  --text:        #ececee;
  --text-muted: #8a8f99;
  --text-dim:   #5e636d;
  --accent:      #ff6a3a;
  --accent-bg:   rgba(255, 106, 58, 0.10);
  --accent-soft: rgba(255, 106, 58, 0.18);
  --gold:        #d4b07a;
  --link:        #d4b07a;
  --overlay-soft:    rgba(255, 255, 255, 0.05);
  --overlay-softer:  rgba(255, 255, 255, 0.03);
  --hairline:        rgba(255, 255, 255, 0.06);
  --serif:       'Newsreader', Georgia, 'Times New Roman', serif;
  --sans:        'Inter', system-ui, sans-serif;
  --transition:  0.18s cubic-bezier(0.4, 0, 0.2, 1);
  /* Layered shadow — sharper close shadow + soft ambient. Reads
     more like real elevation than a single big blur. */
  --shadow-sm:   0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md:   0 2px 4px rgba(0, 0, 0, 0.35), 0 12px 28px rgba(0, 0, 0, 0.45);
  --shadow-lg:   0 4px 8px rgba(0, 0, 0, 0.4), 0 24px 48px rgba(0, 0, 0, 0.5);
  --radius-sm:   2px;
  --radius:      3px;
  --radius-lg:   4px;
}

:root[data-theme="light"] {
  --bg:          #f5f3ee;
  --surface:     #ffffff;
  --surface2:   #ebe7df;
  --surface3:   #ddd8cc;
  --border:      #d6cfbf;
  --border-strong: #b9b09c;
  --text:        #0f1012;
  --text-muted: #4a4d54;
  --text-dim:   #75787f;
  --accent:      #d24d1a;
  --accent-bg:   rgba(210, 77, 26, 0.08);
  --accent-soft: rgba(210, 77, 26, 0.15);
  --gold:        #8a6d2e;
  --link:        #8a6d2e;
  --overlay-soft:    rgba(0, 0, 0, 0.05);
  --overlay-softer:  rgba(0, 0, 0, 0.03);
  --hairline:        rgba(0, 0, 0, 0.08);
  --shadow-sm:   0 1px 2px rgba(15, 16, 18, 0.06);
  --shadow-md:   0 1px 3px rgba(15, 16, 18, 0.08), 0 8px 24px rgba(15, 16, 18, 0.10);
  --shadow-lg:   0 2px 6px rgba(15, 16, 18, 0.10), 0 16px 40px rgba(15, 16, 18, 0.14);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* Faint top-bleed glow — pinned at top so it doesn't follow scroll. */
  background-image:
    radial-gradient(1200px 600px at 50% -200px, rgba(255, 106, 58, 0.07), transparent 60%),
    radial-gradient(900px 500px at 90% -100px, rgba(212, 176, 122, 0.04), transparent 70%);
  background-attachment: fixed;
  transition: background-color 0.25s ease, color 0.25s ease;
  position: relative;
}

/* Big subtle football silhouette anchored bottom-right — fixed so it
   stays as the page scrolls. Sits behind everything via z-index, and
   reads at ~6% opacity so it's a flourish, not a distraction. The SVG
   inherits currentColor so it shifts with the theme. */
body::before {
  content: "";
  position: fixed;
  bottom: -10vw;
  right: -10vw;
  width: min(85vh, 70vw);
  height: min(85vh, 70vw);
  background: url('/static/img/football-silhouette.svg') no-repeat center / contain;
  opacity: 0.055;
  pointer-events: none;
  z-index: 0;
  /* Use a CSS filter to recolour the stroke (currentColor doesn't work
     with background-image SVGs). White stroke + low opacity gives a
     chalk-on-board feel on dark; the light-theme override below
     swaps in a dark stroke. */
  filter: invert(1);
}

:root[data-theme="light"] body::before {
  filter: none;
  opacity: 0.07;
}

:root[data-theme="light"] body {
  background-image:
    radial-gradient(1200px 600px at 50% -200px, rgba(193, 67, 28, 0.05), transparent 60%),
    radial-gradient(900px 500px at 90% -100px, rgba(138, 109, 46, 0.04), transparent 70%);
}

/* Push real content above the silhouette. */
.site-header,
main.container,
.site-footer { position: relative; z-index: 1; }

@media (max-width: 700px) {
  /* Smaller and more bottom-anchored on mobile so it doesn't crowd
     the cards in the right column. */
  body::before {
    width: 110vw;
    height: 110vw;
    bottom: -30vw;
    right: -30vw;
    opacity: 0.04;
  }
  :root[data-theme="light"] body::before { opacity: 0.06; }
}

a { color: inherit; text-decoration: none; }

::selection {
  background: var(--accent);
  color: #fff;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Header ── */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0 1.1rem;
  margin-bottom: 2.5rem;
  background:
    linear-gradient(180deg, rgba(255, 106, 58, 0.04), transparent 80%);
  position: relative;
}
.site-header::after {
  /* Hairline highlight directly under the border — a single bright
     pixel separating header from body. The Linear/Vercel trick. */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-soft), transparent);
  opacity: 0.6;
  pointer-events: none;
}

.site-title {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--sans, 'Inter', system-ui, sans-serif);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1;
  text-decoration: none;
}

/* Geometric football mark — a quiet, functional brand element in the
   Rams spirit: outline-only, accent-colored, scales with the type. */
.site-title__mark {
  width: 1.55em;
  height: 1.55em;
  flex-shrink: 0;
  color: var(--accent);
  transition: transform var(--transition);
}
.site-title:hover .site-title__mark {
  transform: rotate(22deg);
}

.site-title__word {
  white-space: nowrap;
  font-weight: 700;
}
/* "VM" reads as the strong mark, "noden" recedes — a typographic
   split that gives the wordmark identity without color noise. */
.site-title__sub {
  font-weight: 400;
  color: var(--text-muted);
}
/* The pulsing accent dot was visually noisy next to the wordmark —
   hidden via CSS to keep the HTML intact while cleaning up the brand. */
.site-title__dot { display: none; }

.site-tagline {
  font-family: var(--sans, 'Inter', system-ui, sans-serif);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.55rem;
  letter-spacing: 0.01em;
  font-weight: 500;
  text-transform: none;
  line-height: 1.4;
}

/* ── Theme toggle button (header, top-right) ────────────────── */
.theme-toggle {
  appearance: none;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: color var(--transition), border-color var(--transition),
              background var(--transition), transform var(--transition);
}
.theme-toggle:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface2);
}
.theme-toggle:active { transform: scale(0.95); }
.theme-toggle__icon {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  transition: opacity var(--transition), transform var(--transition);
}
.theme-toggle__icon--sun  { opacity: 0; transform: rotate(-90deg); }
.theme-toggle__icon--moon { opacity: 1; transform: rotate(0); }
:root[data-theme="light"] .theme-toggle__icon--sun  { opacity: 1; transform: rotate(0); color: var(--gold); }
:root[data-theme="light"] .theme-toggle__icon--moon { opacity: 0; transform: rotate(90deg); }
@media (max-width: 500px) {
  .theme-toggle { width: 34px; height: 34px; }
}

/* ── Shared meta ── */
.card__topic {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-bg);
  padding: 0.18rem 0.5rem;
  border-radius: var(--radius-sm);
}

.card__topic--gold {
  color: var(--gold);
  background: rgba(201, 169, 110, 0.12);
}

.card__date {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ── Confederation sections ── */
.conf-section {
  margin-bottom: 3rem;
}

.conf-heading {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

.conf-heading::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--accent);
  border-radius: 0;
}

/* ── Group cards + collapsible analysis below ── */
.group-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.group-cards .team-card {
  width: 150px;
  flex-shrink: 0;
  justify-content: center;
}

.group-analysis {
  width: calc(150px * 4 + 0.75rem * 3);
  max-width: 100%;
  margin-top: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  /* Keep layout stable on desktop: limit height and allow internal scrolling */
  max-height: 260px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.group-analysis__toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  cursor: pointer;
  list-style: none;
  user-select: none;
  min-height: 44px;
  transition: background var(--transition);
}

.group-analysis__toggle:hover {
  background: var(--surface2);
}

.group-analysis__toggle::-webkit-details-marker { display: none; }

.group-analysis__toggle::after {
  content: "▸";
  margin-left: auto;
  font-size: 0.8rem;
  transition: transform 0.15s;
}

.group-analysis[open] .group-analysis__toggle::after {
  transform: rotate(90deg);
}

.group-analysis[open] .group-analysis__toggle {
  border-bottom: 1px solid var(--border);
}

.group-analysis__text {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
  padding: 0.7rem 1rem;
}

@media (max-width: 700px) {
  .group-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
  }
  .group-cards .team-card {
    width: 100%;
    height: 110px;
    flex-shrink: unset;
  }
  .group-analysis {
    width: auto;
  }
  .team-header { gap: 0.9rem; }
  .team-hero-flag { font-size: 3rem; }
  .team-hero-name { font-size: 1.6rem; }
}

/* ── Team grid ── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
}

.team-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.15rem 0.9rem 0.95rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition),
              transform var(--transition), box-shadow var(--transition);
  position: relative;
  text-align: center;
  overflow: hidden;
}

/* Hairline top highlight — a single bright pixel that gives the
   card a sense of being pressed up from the surface. Reads as
   precision lighting, not chrome. */
.team-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--hairline), transparent);
  pointer-events: none;
}

/* Accent rail that scales in on hover from the bottom edge.
   Sharp horizontal line — the modern equivalent of a focus state. */
.team-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.team-card--reigning {
  border-color: rgba(212, 176, 122, 0.5);
}

.team-reigning-star {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 0.8rem;
  line-height: 1;
  color: var(--gold);
  pointer-events: none;
  z-index: 3;
}

.team-card:hover {
  border-color: var(--border-strong);
  background: var(--surface2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.team-card:hover::after { transform: scaleX(1); }
.team-card:hover .team-name { color: var(--text); }

.team-card:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.team-flag {
  font-size: 2.4rem;
  line-height: 1;
  transition: transform var(--transition);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

.team-card:hover .team-flag {
  transform: scale(1.08);
}

.team-name {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
  letter-spacing: -0.005em;
}

.team-code {
  font-size: 0.66rem;
  color: var(--text-dim);
  letter-spacing: 0.12em;
  font-weight: 500;
}

.team-badge {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(212, 176, 122, 0.12);
  padding: 0.12rem 0.4rem;
  border-radius: var(--radius-sm);
}

.team-ranking {
  position: absolute;
  top: 0.45rem;
  left: 0.45rem;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-dim);
  background: var(--surface3);
  border: 1px solid var(--border);
  padding: 0.08rem 0.4rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.team-card--locked {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}

.team-card--locked:hover {
  border-color: var(--border);
  background: var(--surface);
  transform: none;
  box-shadow: none;
}


.team-badge--soon {
  color: var(--text-muted);
  background: rgba(136,136,136,0.1);
}

/* ── Team hero header ── */
.team-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.team-header__main { min-width: 0; }

.team-hero-flag {
  font-size: 4rem;
  line-height: 1;
  flex-shrink: 0;
}

.team-hero-name {
  font-family: var(--serif);
  font-size: 2.4rem;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text);
}

.team-nicknames {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.4rem;
  margin-top: 0.25rem;
  font-family: var(--serif);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--gold);
  line-height: 1.3;
}

.team-nick__sep {
  color: var(--text-dim);
  font-style: normal;
}

/* "Regerande mästare"-stamp i header-raden */
.card__topic--reigning {
  color: #1a1a1a !important;
  background: var(--gold) !important;
  font-weight: 700;
}

/* ── Team facts-panel: visas mellan overview och squad ──────
   Hade för mycket plats att slåss om i headern; en egen lugnare
   sektion mellan analys och trupplistor andas bättre. */
.team-facts {
  margin: 0.5rem 0 1.75rem;
  padding: 0.95rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.team-facts__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 1.1rem;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.team-facts__row--history { font-size: 0.88rem; }

.team-facts__main {
  color: var(--text);
  font-weight: 500;
}

.team-facts__since {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.team-facts__stat strong {
  color: var(--text);
  font-weight: 600;
}

.team-facts__row--rivals {
  align-items: center;
  gap: 0.4rem;
  padding-top: 0.3rem;
  border-top: 1px dashed var(--border);
}

.team-facts__label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-right: 0.15rem;
}

.team-rival {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem 0.25rem 0.45rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: var(--text);
  transition: border-color var(--transition), background var(--transition);
}

.team-rival:hover {
  border-color: var(--accent);
  background: var(--accent-bg);
}

.team-rival__flag {
  font-size: 0.95rem;
  line-height: 1;
}

@media (max-width: 700px) {
  .team-nicknames { font-size: 0.85rem; }
  .team-facts { padding: 0.7rem 0.85rem; }
  .team-facts__row { font-size: 0.8rem; gap: 0.3rem 0.75rem; }
  .team-facts__row--history { font-size: 0.82rem; }
  .team-facts__since { font-size: 0.74rem; }
  .team-rival__name { display: none; }
  .team-rival { padding: 0.25rem 0.55rem; }
  .team-rival__flag { font-size: 1.1rem; }
}

.team-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.55rem;
}

/* ── Squad note ── */
.squad-note {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.55;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 0.85rem;
  margin-bottom: 1.25rem;
}

.sources-link {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sources-link:hover { color: var(--accent); }

/* ── Redaktionen tipsar — ett enskilt rödramat tips
   Slumpas in på olika platser av JS i team.html (efter Vägen till VM,
   mellan trupp-sektioner, i analyst-panel etc) så läsaren möter det
   där hen minst väntar sig. Röd ram + label-pill = sticker ut utan
   att skrika. */
.picks {
  --picks-red: #d6202b;
  display: block;
  margin: 1.5rem 0;
  padding: 1rem 1.1rem 0.95rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 2px solid var(--picks-red);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.picks__label {
  position: absolute;
  top: -9px;
  left: 14px;
  padding: 0.1rem 0.55rem 0.12rem;
  background: var(--bg);
  color: var(--picks-red);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.4;
}

.picks__link {
  display: block;
  min-height: 44px;
  color: var(--text);
  transition: color var(--transition);
}

.picks__link:hover .picks__title { color: var(--picks-red); }
.picks__link:hover .picks__source { color: var(--picks-red); }

.picks__type {
  display: inline-block;
  margin-bottom: 0.4rem;
  padding: 0.08rem 0.45rem;
  background: var(--picks-red);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 2px;
}

.picks__title {
  display: block;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 0.4rem;
  transition: color var(--transition);
}

.picks__hook {
  display: block;
  font-family: var(--sans);
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
  font-style: italic;
}

.picks__source {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color var(--transition);
}

/* When the card lands inside the analyst panel, tighten paddings so it
   doesn't dwarf the surrounding cards. */
.analyst-panel .picks {
  margin: 1.25rem 0 1.25rem;
}

@media (max-width: 500px) {
  .picks { padding: 0.85rem 0.9rem 0.8rem; }
  .picks__title { font-size: 1rem; }
  .picks__hook { font-size: 0.82rem; }
}

/* ── Team story (Vägen till VM) ── */
.team-story {
  border-left: 3px solid var(--gold, #c9a96e);
  background: rgba(201, 169, 110, 0.06);
  padding: 0.9rem 1.1rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
}

.team-story__label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold, #c9a96e);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.squad-prelim-badge {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.08rem 0.45rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold, #c9a96e);
  background: rgba(201, 169, 110, 0.12);
  border-radius: 3px;
  vertical-align: middle;
}

.team-story__text {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--text);
  font-style: italic;
}

/* ── Overview ── */
.team-overview {
  margin-bottom: 2rem;
}

.team-overview p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 1.1rem;
}

/* ── Squad sections ── */
.squad-section {
  margin-bottom: 1.75rem;
}

.squad-heading-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.7rem;
  margin-bottom: 0.65rem;
}

.squad-heading {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.squad-count {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-dim);
}

/* Position group rating dots */
.pos-rating {
  display: flex;
  gap: 3px;
  align-items: center;
  margin-left: auto;
}

/* Sub-label shown on each rating bar when a section covers two positions */
.pos-rating__label {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-right: 4px;
}

.pos-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border);
  border: 1px solid var(--border);
}

.pos-dot--on {
  background: var(--accent);
  border-color: var(--accent);
}

/* Player star rating */
.player-rating {
  font-size: 0.7rem;
  color: var(--gold);
  letter-spacing: -0.05em;
  white-space: nowrap;
}

.player-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.player-row {
  display: flex;
  flex-direction: column;
  padding: 0.7rem 0.95rem;
  border-radius: 0;
  border-bottom: 1px solid var(--hairline);
  transition: background var(--transition);
}
.player-row:last-child { border-bottom: 0; }

.player-row:hover { background: var(--surface2); }

.player-row--clickable { cursor: pointer; }

.player-row__main {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.player-bio {
  display: none;
  font-size: 0.79rem;
  color: var(--text-muted);
  line-height: 1.55;
  padding-top: 0.4rem;
  border-top: 1px solid var(--border);
  margin-top: 0.4rem;
}

.player-row--open .player-bio { display: block; }

.player-bio__text { display: block; }
.player-bio__edit-link {
  display: inline-block;
  margin-top: 0.3rem;
  font-size: 0.68rem;
  color: var(--text-dim);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.player-bio__edit-link:hover { color: var(--accent); }
.player-bio__form { display: none; margin-top: 0.4rem; }
.player-bio--editing .player-bio__text,
.player-bio--editing .player-bio__edit-link { display: none; }
.player-bio--editing .player-bio__form { display: block; }
.player-bio__textarea {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.79rem;
  line-height: 1.55;
  padding: 0.4rem 0.5rem;
  resize: vertical;
  min-height: 60px;
}
.player-bio__textarea:focus { outline: none; border-color: var(--accent); }
.player-bio__actions { display: flex; gap: 0.6rem; align-items: center; margin-top: 0.3rem; }
.player-bio__save {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 3px;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
}
.player-bio__save:hover { opacity: 0.85; }
.player-bio__cancel {
  font-size: 0.72rem;
  color: var(--text-dim);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.player-row--key {
  background: var(--accent-bg);
  border-left: 2px solid var(--accent);
  padding-left: 0.85rem;
}

.player-main {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.player-name {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
}

.player-star {
  color: var(--gold);
  font-size: 0.85rem;
}

.player-meta {
  display: flex;
  gap: 0.9rem;
  align-items: center;
}

.player-club {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.player-field--editable:hover {
  outline: 1px dashed var(--border);
  border-radius: 2px;
  cursor: text;
}
.player-field--editable:focus {
  outline: 1px solid var(--accent);
  border-radius: 2px;
  color: var(--text);
}

.player-stat {
  font-size: 0.73rem;
  color: var(--text-dim);
  background: var(--surface2);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  white-space: nowrap;
}

/* ── Formation pitch ── */
.formation-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  background: var(--surface2);
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
}

.formation-wrap {
  max-width: 280px;
  margin: 0.6rem auto 0;
  border-radius: 6px;
  overflow: hidden;
}

@media (max-width: 700px) {
  .formation-wrap { max-width: 100%; }
}

/* ── Article layout (two columns) ── */
.article-layout {
  display: grid;
  /* Prevent left-column content from forcing the grid to resize */
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 3rem;
  align-items: start;
}

.back-link {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 1.75rem;
  transition: color var(--transition), transform var(--transition);
}

.back-link:hover {
  color: var(--accent);
  transform: translateX(-3px);
}

/* ── Analyst panel (reused) ── */
.analyst-panel {
  position: static;
  margin-top: 1.5rem;
} 

.analyst-panel__heading {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

.analyst-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.7rem 0.85rem;
  margin-bottom: 0.5rem;
  transition: border-color var(--transition), background var(--transition);
}
.analyst-card:hover {
  border-color: var(--border-strong);
  background: var(--surface2);
}

.analyst-card__meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.2rem;
}

.analyst-card__publication {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.source-badge {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
}

.source-badge--podcast { background: rgba(147,51,234,0.15); color: #a855f7; }
.source-badge--youtube { background: rgba(239,68,68,0.15);  color: #ef4444; }
.source-badge--tv      { background: rgba(59,130,246,0.15); color: #60a5fa; }

.analyst-card__quote {
  font-size: 0.76rem;
  font-style: italic;
  color: var(--text);
  border-left: 2px solid var(--accent);
  padding-left: 0.5rem;
  margin: 0.25rem 0;
  line-height: 1.45;
}

.analyst-card__title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 0.2rem;
}

.analyst-card__summary {
  font-size: 0.73rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 0.3rem;
}

.analyst-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.68rem;
  color: var(--link);
  font-weight: 500;
}

.analyst-card__link:hover { color: var(--accent); }

/* ── Recent results ── */
.results-panel {
  margin-bottom: 1.5rem;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0 0.85rem;
  box-shadow: var(--shadow-sm);
}

.result-row {
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 0.78rem;
}

.result-row:last-child { border-bottom: none; }

.result-date {
  color: var(--text-dim);
  font-size: 0.7rem;
  white-space: nowrap;
}

.result-teams {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.result-team {
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90px;
}

.result-team--ours {
  color: var(--text);
  font-weight: 600;
}

.result-score {
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  font-size: 0.82rem;
  padding: 0 0.1rem;
}

.result-league {
  color: var(--text-dim);
  font-size: 0.65rem;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}

/* ── Upcoming fixtures ── */
.fixtures-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0 0.85rem;
  box-shadow: var(--shadow-sm);
}

.fixture-row {
  display: grid;
  grid-template-columns: 6rem 1fr auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 0.8rem;
}

.fixture-row:last-child { border-bottom: none; }

.fixture-date {
  color: var(--text-dim);
  font-size: 0.72rem;
  white-space: nowrap;
}

.fixture-teams {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.fixture-team {
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fixture-team--ours {
  color: var(--text);
  font-weight: 600;
}

.fixture-vs {
  color: var(--text-dim);
  font-size: 0.68rem;
  flex-shrink: 0;
}

.fixture-comp {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: var(--surface2);
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  white-space: nowrap;
}

.fixture-comp--wc {
  color: var(--gold);
  background: rgba(201, 169, 110, 0.12);
}

/* ── Two-column news section inside analyst panel ── */
.news-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.news-col {
  min-width: 0;
}

.news-link-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}

.news-link-card:last-child {
  border-bottom: none;
}

.news-link-source {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
}

.news-link-title {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  transition: color 0.15s;
  word-break: break-word;
}

.news-link-title:hover {
  color: var(--link);
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  padding: 1.5rem 0 1.75rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}
.site-footer p {
  margin: 0 0 0.4rem;
  line-height: 1.5;
}
.site-footer p:last-child { margin-bottom: 0; }
.site-footer__disclosure { color: var(--text-dim); }
.site-footer__credit { color: var(--text-muted); font-size: 0.78rem; }
.site-footer__credit strong { color: var(--text); font-weight: 600; }
.site-footer__credit a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}
.site-footer__credit a:hover { border-bottom-color: var(--accent); }

.btn-generate {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.4rem 0.9rem;
  border-radius: 4px;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: border-color 0.15s, color 0.15s;
}

.btn-generate:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .article-layout { grid-template-columns: 1fr 340px; }
  .news-columns { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; }
  .analyst-panel { position: static; }
  .team-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .player-meta { gap: 0.5rem; }
  .news-columns { grid-template-columns: 1fr 1fr; }

}

@media (max-width: 500px) {
  /* Club is hidden by default on narrow screens to keep the row tidy;
     surfaced inside the row when the user expands it (tap to reveal bio). */
  .player-club { display: none; }
  .player-row--open .player-meta { flex-wrap: wrap; }
  .player-row--open .player-club {
    display: inline-block;
    order: 99;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: var(--text-muted);
  }
  .player-row--open .player-club::before {
    content: "Klubb: ";
    color: var(--text-dim);
  }
}

/* ── WC opener countdown (landing-page header, top right) ──── */
.site-header .container { display: flex; align-items: center; gap: 1.2rem; }
.site-header__brand { flex: 1; min-width: 0; }
.site-header__titlerow {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

/* Tournament phase pill — sibling to the title, visible on every page.
   Colour-shifts as the phase advances so the header itself signals
   where we are in the calendar. */
.phase-pill {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--overlay-softer);
  border: 1px solid var(--border);
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1.4;
}
.phase-pill--gruppspel       { color: var(--gold);   border-color: rgba(201,169,110,0.35); background: rgba(201,169,110,0.08); }
.phase-pill--sextondelsfinal,
.phase-pill--attondelsfinal,
.phase-pill--kvartsfinal     { color: var(--accent); border-color: rgba(255,106,58,0.4);   background: rgba(255,106,58,0.08); }
.phase-pill--semifinal,
.phase-pill--bronsmatch,
.phase-pill--final           { color: #fff;          border-color: var(--accent);         background: var(--accent); }
.phase-pill--avslutat        { color: var(--text-dim); }

.wc-opener {
  display: flex !important;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  padding: 0.7rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-align: right;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  min-height: 60px;
  min-width: 220px;
}
.wc-opener__top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.wc-opener__label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.wc-opener__match {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--text);
}
.wc-opener__flag { font-size: 1.55rem; line-height: 1; }
.wc-opener__vs   { font-size: 0.62rem; color: var(--text-dim); font-style: italic; }
.wc-opener__when { color: var(--text-dim); }

.wc-opener__countdown {
  display: flex;
  align-items: baseline;
  gap: 0.15rem;
}
.wc-opener__seg {
  display: inline-flex;
  align-items: baseline;
  gap: 0.12rem;
}
.wc-opener__num {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
  letter-spacing: 0.02em;
}
.wc-opener__seg-unit {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.wc-opener__colon {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1;
  color: var(--text-dim);
  margin: 0 0.05rem;
  align-self: center;
  transform: translateY(-2px);
}
.wc-opener__live {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
}

@media (max-width: 700px) {
  .site-header .container { flex-wrap: wrap; gap: 0.65rem; }
  .wc-opener {
    width: 100%;
    align-items: stretch;
    text-align: left;
  }
  .wc-opener__top { justify-content: space-between; }
  .wc-opener__countdown { justify-content: space-between; }
  .wc-opener__num { font-size: 1.55rem; }
  /* On team pages, hide the header opener countdown on mobile only —
     on desktop it always stays at the top of every page. */
  .wc-opener--team { display: none; }
}
@media (max-width: 360px) {
  .wc-opener__when { display: none; }
  .wc-opener__num { font-size: 1.35rem; }
}


/* ── "Idag spelas"-strip (landing top) ──────────────────────── */
.today-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin: 0 0 1.4rem;
  padding: 0.7rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius);
  font-variant-numeric: tabular-nums;
}
.today-strip__label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 0.18rem 0.55rem;
  background: var(--accent-bg);
  border-radius: var(--radius-sm);
}
.today-strip__match {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.92rem;
  color: var(--text);
}
.today-strip__time {
  font-weight: 700;
  color: var(--gold);
}
.today-strip__flag { font-size: 1.05rem; }
.today-strip__vs {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
}
.today-strip__teams { color: var(--text-muted); font-size: 0.85rem; }
@media (max-width: 700px) {
  .today-strip { gap: 0.4rem 0.6rem; }
  .today-strip__teams { display: none; }
}

/* ── Veckans citat (featured quote, landing) ───────────────── */
.featured-quote {
  position: relative;
  margin: 0 0 1.6rem;
  padding: 1.3rem 1.5rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 2px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.featured-quote::before {
  /* Massive serif quote-mark anchored top-right — pure visual weight. */
  content: "\201D";
  position: absolute;
  top: -1.8rem;
  right: 0.6rem;
  font-family: var(--serif);
  font-size: 8.5rem;
  line-height: 1;
  font-weight: 700;
  color: var(--gold);
  opacity: 0.10;
  pointer-events: none;
  user-select: none;
}
:root[data-theme="light"] .featured-quote::before { opacity: 0.15; }
.featured-quote > * { position: relative; }
.featured-quote__label {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.7rem;
}
.featured-quote__context {
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}
.featured-quote__text {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--text);
  font-style: italic;
  margin: 0 0 0.65rem;
}
.featured-quote__meta {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.featured-quote__expert { color: var(--text); font-weight: 600; }
.featured-quote__role { color: var(--text-muted); }
.featured-quote__pub { color: var(--text-dim); }
.featured-quote__link {
  display: inline-block;
  margin-top: 0.55rem;
  font-size: 0.78rem;
  color: var(--gold);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}
.featured-quote__link:hover { border-bottom-color: var(--gold); }
@media (max-width: 700px) {
  .featured-quote { padding: 1rem 1.05rem; }
  .featured-quote__text { font-size: 1.02rem; }
}

/* ── On-this-day card (right panel) ─────────────────────────── */
.on-this-day {
  position: relative;
  margin: 0 0 1.3rem;
  padding: 1.05rem 1.05rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.on-this-day::after {
  content: "";
  position: absolute;
  top: 0;
  right: 18px;
  width: 12px;
  height: 12px;
  background: var(--gold);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  opacity: 0.7;
}
.on-this-day__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.45rem;
}
.on-this-day__label {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.on-this-day__ago {
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  font-style: italic;
  white-space: nowrap;
}
.on-this-day__headline {
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.35;
  color: var(--text);
  margin: 0 0 0.3rem;
}
.on-this-day__detail {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-muted);
  margin: 0;
}

/* ── Analyst-panel topline (heading + relative updated stamp) — */
.analyst-panel__topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}
.analyst-panel__updated {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ── Fresh-item dot (≤24h marker) ───────────────────────────── */
.fresh-dot {
  display: inline-block;
  margin-left: 0.4rem;
  color: var(--accent);
  font-size: 1.1rem;
  line-height: 0;
  vertical-align: middle;
  text-shadow: 0 0 6px rgba(255,106,58,0.55);
}

/* ── Next-WC-match countdown (team page) ────────────────────── */
.next-match {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0 0 1.4rem;
  padding: 0.9rem 1.1rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-variant-numeric: tabular-nums;
}
.next-match__top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.next-match__label {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 0.18rem 0.5rem;
  border: 1px solid rgba(255,106,58,0.5);
  border-radius: 999px;
}
.next-match__opp { font-size: 0.95rem; color: var(--text); font-weight: 600; }
.next-match__vs { color: var(--text-muted); font-size: 0.75rem; font-weight: 400; }
.next-match__when {
  margin-left: auto;
  font-size: 0.82rem;
  color: var(--gold);
}
.next-match__countdown {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
}
.next-match__seg {
  display: inline-flex;
  align-items: baseline;
  gap: 0.15rem;
}
.next-match__num {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text);
  min-width: 1.8ch;
  text-align: center;
}
.next-match__unit {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.next-match__colon { color: var(--text-dim); }
.next-match__live { color: var(--accent); font-weight: 700; }
@media (max-width: 460px) {
  .next-match__when { margin-left: 0; width: 100%; }
  .next-match__num { font-size: 1.25rem; }
}
/* Never show the generic WC-opener fallback (Mexico) on team pages.
   The widget is hydrated client-side with the team's real first WC
   match, which removes this class and reveals the countdown. Teams
   with no real fixture simply show nothing rather than the opener. */
.next-match--opener { display: none; }

/* ── Live-score badge in team-card ──────────────────────────── */
.live-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.16rem 0.42rem;
  border-radius: 3px;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.4);
  animation: live-pulse 2.4s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(0,0,0,0.4), 0 0 0 0 rgba(255,106,58,0.55); }
  50%      { box-shadow: 0 0 0 1px rgba(0,0,0,0.4), 0 0 0 5px rgba(255,106,58,0); }
}

/* ── Tournament explainer (collapsible "Så funkar VM 2026") ─── */
.tournament-explainer {
  margin: 0 0 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.tournament-explainer__summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  flex-wrap: wrap;
  padding: 0.75rem 0.95rem;
  font-size: 0.95rem;
  transition: background var(--transition);
}
.tournament-explainer__summary::-webkit-details-marker { display: none; }
.tournament-explainer__summary:hover { background: var(--surface2); }
.tournament-explainer__chev {
  display: inline-block;
  color: var(--gold);
  font-size: 0.85rem;
  transform: rotate(0deg);
  transition: transform var(--transition);
}
.tournament-explainer[open] .tournament-explainer__chev { transform: rotate(90deg); }
.tournament-explainer__title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}
.tournament-explainer__tease {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-left: auto;
}
.tournament-explainer__body {
  padding: 0.3rem 1.05rem 0.95rem 1.65rem;
  border-top: 1px solid var(--border);
}
.explainer-list {
  list-style: none;
  padding: 0;
  margin: 0.6rem 0 0;
}
.explainer-list li {
  position: relative;
  padding: 0.35rem 0 0.35rem 1.1rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text);
}
.explainer-list li + li { border-top: 1px solid var(--hairline); }
.explainer-list li::before {
  content: "";
  position: absolute;
  left: 0.05rem;
  top: 0.95rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}
.explainer-list strong { color: var(--gold); font-weight: 600; }
@media (max-width: 700px) {
  .tournament-explainer__tease { width: 100%; margin-left: 1.1rem; }
}

/* ── Context card (right-column editorial banner) ───────────── */
.context-card {
  position: relative;
  margin: 0 0 1.3rem;
  padding: 1.15rem 1.25rem 1.25rem;
  background:
    linear-gradient(135deg,
      rgba(11, 75, 153, 0.14) 0%,
      rgba(11, 75, 153, 0.06) 40%,
      rgba(178, 34, 52, 0.10) 75%,
      rgba(178, 34, 52, 0.16) 100%),
    var(--surface);
  border: 1px solid var(--border);
  border-left: 2px solid #b22234;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.context-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 160px;
  height: 100px;
  background: #ffffff;
  -webkit-mask: url('/static/img/stars-pattern.svg') repeat top left / 56px 56px;
          mask: url('/static/img/stars-pattern.svg') repeat top left / 56px 56px;
  opacity: 0.07;
  pointer-events: none;
}
:root[data-theme="light"] .context-card::before {
  /* White stars vanish on the light surface — switch the masked fill to
     navy so the pattern stays visible against the pale background. */
  background: #0b4b99;
  opacity: 0.14;
}
.context-card > * { position: relative; z-index: 1; }
@media (max-width: 500px) {
  .context-card::before { width: 130px; height: 80px; }
}
.context-card__label {
  display: inline-block;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #cc6677;
  margin-bottom: 0.45rem;
}
.context-card__title {
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.35;
  color: var(--text);
  margin: 0 0 0.5rem;
}
.context-card__list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem;
}
.context-card__list li {
  position: relative;
  padding: 0.22rem 0 0.22rem 0.95rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-muted);
}
.context-card__list li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0.18rem;
  color: var(--accent);
  font-size: 0.95rem;
}
.context-card__list strong { color: var(--text); font-weight: 600; }
.context-card__link {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--gold);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}
.context-card__link:hover { border-bottom-color: var(--gold); }
.context-card__link-prefix {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-right: 0.35rem;
}


/* ── Main nav (header) ─────────────────────────────────────── */
.site-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
  margin-right: 0.6rem;
  flex-shrink: 0;
}
.site-nav__link {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 0.95rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  position: relative;
  transition: color var(--transition), border-color var(--transition),
              background var(--transition), transform var(--transition);
}
.site-nav__link:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface2);
}
.site-nav__link:active {
  transform: translateY(1px);
}
.site-nav__link--active {
  /* Current page reads as a solid accent-tinted chip — clean box, no
     underline, with an accent border that ties it to the brand color. */
  color: var(--accent);
  background: var(--accent-bg);
  border-color: var(--accent);
}
.site-nav__link--active:hover {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent);
}

/* On mobile the toggle moves to a fixed top-right anchor and the nav
   wraps onto its own row underneath the brand. */
@media (max-width: 700px) {
  .site-header { position: relative; }
  .site-header .theme-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 5;
  }
  .site-nav {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    flex-wrap: wrap;
  }
  .site-nav__link { height: 34px; padding: 0 0.7rem; }
}


/* ── Fact-box: "Visste du?" — server-rendered random VM trivia ── */
.fact-box {
  position: relative;
  margin: 0 0 1.3rem;
  padding: 1rem 1.1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.fact-box__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}
.fact-box__label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.fact-box__refresh {
  appearance: none;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: 30px;
  height: 30px;
  font-size: 1rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition), border-color var(--transition),
              background var(--transition), transform 0.3s ease;
}
.fact-box__refresh:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(255, 106, 58, 0.08);
  transform: rotate(60deg);
}
.fact-box__refresh:active { transform: rotate(180deg); }
.fact-box__period {
  display: inline-block;
  margin-bottom: 0.45rem;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 0.15rem 0.55rem;
  border: 1px solid rgba(201, 169, 110, 0.4);
  border-radius: 999px;
}
.fact-box__text {
  font-family: var(--serif);
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--text);
  margin: 0;
  transition: opacity 0.18s ease;
}
.fact-box--swapping .fact-box__text,
.fact-box--swapping .fact-box__period { opacity: 0.25; }


/* ── /spelschema — full WC schedule ─────────────────────────── */
.schema-intro {
  position: relative;
  margin: 0 0 1.6rem;
  padding: 1.3rem 1.8rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background:
    linear-gradient(135deg,
      rgba(255, 106, 58, 0.07) 0%,
      rgba(212, 176, 122, 0.04) 40%,
      transparent 100%),
    var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.schema-intro::before {
  /* Single sharp accent edge on the left — replaces the chunky
     4px border with a more precise hairline+rail combination. */
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--gold));
}
.schema-intro::after {
  /* Subtle dotted grid texture pinned to the right — gives the
     hero quiet depth without dominating. */
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background-image: radial-gradient(circle, var(--hairline) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.5;
  mask-image: linear-gradient(270deg, black, transparent);
  -webkit-mask-image: linear-gradient(270deg, black, transparent);
  pointer-events: none;
}
.schema-intro__title {
  position: relative;
  z-index: 1;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.schema-intro__lead {
  position: relative;
  z-index: 1;
  color: var(--text-muted);
  font-size: 1rem;
  margin: 0;
  max-width: 56ch;
  line-height: 1.55;
}
@media (max-width: 600px) {
  .schema-intro { padding: 1.1rem 1.1rem; }
  .schema-intro__title { font-size: 1.35rem; }
  .schema-intro__lead  { font-size: 0.9rem; }
}
.schema-empty {
  padding: 1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
}
.schema-empty code {
  font-family: var(--mono, monospace);
  background: var(--surface2);
  padding: 0.05rem 0.3rem;
  border-radius: 3px;
}

.schema-days {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}
.schema-day__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  margin: 0 0 0.55rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}
.schema-day__count {
  font-family: var(--sans, inherit);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.schema-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.schema-match {
  display: grid;
  grid-template-columns: 4.5rem 9rem 1fr 1fr;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.95rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.92rem;
  color: var(--text);
  transition: border-color var(--transition), background var(--transition);
}
.schema-match:hover {
  border-color: var(--border-strong);
  background: var(--surface2);
}
.schema-match--final,
.schema-match--sf,
.schema-match--third {
  border-color: rgba(255, 106, 58, 0.4);
  background: linear-gradient(90deg, rgba(255,106,58,0.06), transparent);
}
.schema-match--qf,
.schema-match--r16,
.schema-match--r32 {
  border-color: rgba(201, 169, 110, 0.35);
}
.schema-match__time {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--gold);
  display: flex;
  align-items: center;
}
.schema-match__live {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 3px;
  animation: schema-pulse 1.6s ease-in-out infinite;
}
.schema-match__ft {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: var(--surface2);
  color: var(--text-muted);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 3px;
  border: 1px solid var(--border);
}
@keyframes schema-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,106,58,0.45); }
  50%      { box-shadow: 0 0 0 6px rgba(255,106,58,0); }
}
.schema-match__score {
  font-family: var(--serif);
  font-variant-numeric: tabular-nums;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  padding: 0 0.55rem;
  letter-spacing: 0.05em;
}
.schema-match--live  { border-color: var(--accent); background: linear-gradient(90deg, rgba(255,106,58,0.10), transparent 60%); }
.schema-match--finished { opacity: 0.85; }
.schema-match--finished .schema-match__teams { color: var(--text-muted); }
.schema-match__stage {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.schema-match__teams {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}
.schema-match__team {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}
.schema-match__team:hover { color: var(--accent); }
.schema-match__team--tbd {
  color: var(--text-dim);
  font-style: italic;
  font-weight: 500;
}
.schema-match__flag { font-size: 1.15rem; line-height: 1; }
.schema-match__name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.schema-match__vs {
  color: var(--text-dim);
  font-weight: 500;
  flex-shrink: 0;
}
.schema-match__venue {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: right;
}
.schema-match__arena { color: var(--text); }
.schema-match__city { color: var(--text-dim); font-size: 0.72rem; }

@media (max-width: 800px) {
  .schema-match {
    grid-template-columns: 4rem 1fr;
    grid-template-areas:
      "time   stage"
      "time   teams"
      "venue  venue";
    row-gap: 0.25rem;
  }
  .schema-match__time   { grid-area: time; align-self: start; padding-top: 0.15rem; }
  .schema-match__stage  { grid-area: stage; }
  .schema-match__teams  { grid-area: teams; flex-wrap: wrap; }
  .schema-match__venue  { grid-area: venue; text-align: left; }
}

/* ── Reduced motion ──────────────────────────────────────────
   Respect the OS-level "reduce motion" setting. Hover/state styling
   (color, border, background) still applies — only the movement is
   neutralised: transforms collapse, transitions become near-instant,
   and the infinite live/schema pulses stop looping. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .team-card:hover,
  .site-nav__link:active,
  .site-title:hover .site-title__mark {
    transform: none !important;
  }
}
