/* WK 2026 Voetbalpool — Editorial Oranje Brutalism */

:root {
  /* Paper to ink — warm, never pure */
  --paper:        oklch(0.955 0.018 80);
  --paper-2:      oklch(0.915 0.022 78);
  --paper-edge:   oklch(0.860 0.026 76);
  --ink:          oklch(0.165 0.020 60);
  --ink-2:        oklch(0.320 0.018 65);
  --stone:        oklch(0.520 0.018 70);

  /* Oranje system — the dominant 60% */
  --oranje:       oklch(0.700 0.220 47);
  --oranje-deep:  oklch(0.555 0.215 40);
  --oranje-soft:  oklch(0.910 0.075 70);

  /* Singular acid accent — used sparingly for emphasis */
  --acid:         oklch(0.935 0.215 130);

  /* Semantic */
  --ok:           oklch(0.620 0.180 145);
  --ok-soft:      oklch(0.930 0.090 145);
  --err:          oklch(0.560 0.225 25);
  --err-soft:     oklch(0.925 0.080 25);

  /* Type */
  --font-display: 'Big Shoulders Display', 'Anton', 'Oswald', sans-serif;
  --font-body:    'Space Grotesk', system-ui, sans-serif;

  /* Rhythm */
  --container:    1120px;
  --gutter:       clamp(20px, 4vw, 40px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { color-scheme: light; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.45;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'ss01', 'cv11';
  /* Subtle warm grain — felt, not seen */
  background-image:
    radial-gradient(oklch(0.16 0.020 60 / 0.022) 1px, transparent 1px),
    radial-gradient(oklch(0.16 0.020 60 / 0.015) 1px, transparent 1px);
  background-size: 18px 18px, 9px 9px;
  background-position: 0 0, 4px 4px;
}

::selection { background: var(--ink); color: var(--oranje); }

a { color: var(--ink); text-decoration: none; transition: color 140ms ease; }
a:hover { color: var(--oranje-deep); }

strong { font-weight: 700; }

/* =========================================================
   HEADER — black bar, oranje wordmark block, no apologies
   ========================================================= */
.topbar {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: var(--ink);
  color: var(--paper);
  border-bottom: 5px solid var(--oranje);
  position: relative;
  z-index: 10;
}

.brand {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(20px, 2.4vw, 26px);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--oranje);
  padding: 14px 22px 12px;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  line-height: 1;
  transition: background 180ms ease, color 180ms ease;
}
.brand::after {
  content: '';
  width: 8px; height: 8px;
  background: var(--ink);
  align-self: center;
  margin-left: 2px;
}
.brand:hover { background: var(--acid); color: var(--ink); text-decoration: none; }

.nav {
  display: flex;
  flex: 1;
  align-items: stretch;
  gap: 0;
  padding-left: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }

.nav-link {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: oklch(0.75 0.018 70);
  padding: 18px 18px 14px;
  display: inline-flex;
  align-items: center;
  position: relative;
  white-space: nowrap;
  transition: color 140ms ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 18px; right: 18px; bottom: 10px;
  height: 3px;
  background: var(--oranje);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-link:hover { color: var(--paper); text-decoration: none; }
.nav-link:hover::after { transform: scaleX(0.5); }
.nav-active { color: var(--paper); }
.nav-active::after { transform: scaleX(1); }

.user {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 22px;
  border-left: 1px solid oklch(0.30 0.02 65);
}
.user-name {
  font-size: 12px;
  color: oklch(0.78 0.015 70);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: color 140ms ease;
}
a.user-name:hover { color: var(--paper); }
.logout { display: flex; align-items: center; gap: 10px; margin: 0; }
.link-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: oklch(0.72 0.018 70);
  padding: 0;
  transition: color 140ms ease;
}
.link-btn:hover { color: var(--oranje); }

.user a {
  color: oklch(0.78 0.015 70);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.user a:hover { color: var(--oranje); }

/* =========================================================
   CONTAINER & FOOTER
   ========================================================= */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) var(--gutter) clamp(56px, 8vw, 96px);
}

.footer {
  max-width: var(--container);
  margin: 0 auto;
  padding: 48px var(--gutter) 64px;
  color: var(--stone);
  font-family: var(--font-body);
  font-size: 13px;
  border-top: 1px solid var(--paper-edge);
  position: relative;
  overflow: hidden;
}
.footer::before {
  /* Two identical halves so the loop has no visible seam */
  content: 'WK 26 · WK 26 · WK 26 · WK 26 · WK 26 · WK 26 · WK 26 · WK 26 · WK 26 · WK 26 · WK 26 · WK 26 · WK 26 · WK 26 · WK 26 · WK 26 · WK 26 · WK 26 · WK 26 · WK 26 · WK 26 · WK 26 · WK 26 · WK 26 · WK 26 · WK 26 · WK 26 · WK 26 · WK 26 · WK 26 · WK 26 · WK 26 · WK 26 · WK 26 · ';
  display: block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.45em;
  color: var(--paper-edge);
  margin: -18px -24px 28px;
  white-space: nowrap;
  overflow: hidden;
  user-select: none;
  will-change: transform;
  animation: marquee 90s linear infinite;
}
.footer:hover::before { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .footer::before { animation: none; }
}
.footer small {
  display: inline-block;
  font-size: 13px;
  font-style: italic;
  color: var(--ink-2);
}

/* =========================================================
   HEADINGS
   ========================================================= */
h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(40px, 7vw, 84px);
  line-height: 0.88;
  letter-spacing: -0.022em;
  text-transform: uppercase;
  margin: 0 0 28px;
  color: var(--ink);
}

h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink);
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
  display: flex;
  align-items: baseline;
  gap: 10px;
}
h2::before {
  content: '';
  width: 10px;
  height: 10px;
  background: var(--oranje);
  display: inline-block;
}

.muted { color: var(--stone); }
.ok    { color: oklch(0.46 0.16 145); font-weight: 600; }
.err   { color: var(--err); font-weight: 600; }

p.muted {
  font-size: 15px;
  line-height: 1.55;
  margin: 0 0 32px;
  max-width: 60ch;
}
p.muted strong { color: var(--ink); font-weight: 700; }

/* =========================================================
   HERO — the masthead, the moment
   ========================================================= */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(20px, 3vw, 36px);
  padding: clamp(20px, 4vw, 48px) 0 clamp(48px, 8vw, 96px);
  text-align: left;
  position: relative;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--oranje-deep);
}
.hero-tag::before {
  content: '';
  display: inline-block;
  width: 36px; height: 3px;
  background: var(--oranje);
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(72px, 16vw, 220px);
  line-height: 0.82;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  margin: 0;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 0;
}
.hero-title em {
  font-style: normal;
  font-family: var(--font-display);
  font-weight: 900;
  display: inline-block;
  background: var(--oranje);
  color: var(--ink);
  padding: 0 0.18em 0.04em;
  margin: 0 0.04em;
  transform: rotate(-2.5deg) translateY(-0.04em);
  line-height: 0.95;
}
.hero-title i {
  font-style: normal;
  color: var(--oranje);
  display: inline-block;
}

.hero-sub {
  font-family: var(--font-body);
  font-size: clamp(18px, 2.4vw, 28px);
  line-height: 1.25;
  font-weight: 500;
  max-width: 22ch;
  margin: 0;
  color: var(--ink-2);
}
.hero-sub em {
  font-style: normal;
  background: linear-gradient(transparent 62%, var(--acid) 62%, var(--acid) 92%, transparent 92%);
  padding: 0 0.05em;
  color: var(--ink);
  font-weight: 700;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 8px;
}

/* Page-load choreography */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero > * { animation: rise-in 760ms cubic-bezier(0.22, 1, 0.36, 1) backwards; }
.hero > *:nth-child(1) { animation-delay:   0ms; }
.hero > *:nth-child(2) { animation-delay:  90ms; }
.hero > *:nth-child(3) { animation-delay: 200ms; }
.hero > *:nth-child(4) { animation-delay: 320ms; }
@media (prefers-reduced-motion: reduce) {
  .hero > * { animation: none; }
}

/* =========================================================
   BUTTONS — hard rectangles, arrow tells you it works
   ========================================================= */
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px 13px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  border: 2px solid var(--ink);
  text-decoration: none;
  line-height: 1;
  transition:
    background 180ms cubic-bezier(0.22, 1, 0.36, 1),
    color 180ms ease,
    transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
}
.btn-primary {
  background: var(--oranje);
  color: var(--ink);
}
.btn-primary::after {
  content: '→';
  font-size: 18px;
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}
.btn-primary:hover {
  background: var(--ink);
  color: var(--oranje);
  text-decoration: none;
}
.btn-primary:hover::after { transform: translateX(5px); }

.btn-secondary {
  background: transparent;
  color: var(--ink);
}
.btn-secondary:hover {
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}

button.btn-primary,
button.btn-secondary {
  font: inherit;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* =========================================================
   CARDS — sharp ink borders, no soft drop-shadows
   ========================================================= */
.card {
  background: var(--paper);
  border: 2px solid var(--ink);
  padding: 22px 24px;
  margin-bottom: 18px;
  position: relative;
}

.card.big-score {
  background: var(--ink);
  color: var(--paper);
  padding: 32px 28px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.card.big-score strong {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(48px, 8vw, 88px);
  display: inline-block;
  margin: 0 0.1em;
  color: var(--oranje);
  letter-spacing: -0.02em;
  font-feature-settings: 'tnum';
  vertical-align: -0.18em;
}
.card.big-score .muted { color: oklch(0.72 0.02 70); font-size: 14px; }

.empty {
  border: 2px dashed var(--paper-edge);
  background: transparent;
  color: var(--stone);
  padding: 48px 28px;
  text-align: left;
  font-size: 15px;
  line-height: 1.5;
}

/* =========================================================
   ALERTS — solid color bar on the left
   ========================================================= */
.alert {
  border: 2px solid var(--ink);
  padding: 14px 16px 14px 22px;
  margin-bottom: 20px;
  font-weight: 500;
  font-size: 15px;
  position: relative;
  background: var(--paper);
}
.alert::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 10px;
}
.alert-ok    { background: var(--ok-soft); }
.alert-ok::before { background: var(--ok); }
.alert-error { background: var(--err-soft); }
.alert-error::before { background: var(--err); }
.alert-info  { background: var(--oranje-soft); }
.alert-info::before { background: var(--oranje); }

/* =========================================================
   FORMS — underlined inputs, uppercase labels
   ========================================================= */
.form { display: flex; flex-direction: column; gap: 18px; max-width: 440px; }
.form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink);
}
.form input,
.form textarea {
  font: inherit;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  padding: 12px 0 10px;
  border: none;
  border-bottom: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  outline: none;
  transition: border-color 160ms ease, background 160ms ease;
}
.form input::placeholder { color: oklch(0.65 0.018 70); }
.form input:focus,
.form textarea:focus {
  border-bottom-color: var(--oranje);
  background: oklch(0.96 0.022 80);
}
.form input:disabled {
  color: var(--stone);
  border-bottom-style: dashed;
}

.card.form { padding: 24px; }
.card.form .form { max-width: none; }

/* =========================================================
   LEADERBOARD — oversized rank, JIJ acid tag
   ========================================================= */
.leaderboard {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
  margin: 0 0 40px;
}
.leaderboard thead {
  border-top: 3px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}
.leaderboard th {
  text-align: left;
  padding: 12px 14px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.20em;
  color: var(--ink);
}
.leaderboard th:nth-child(1) { width: 92px; padding-left: 8px; }
.leaderboard th:nth-child(3),
.leaderboard th:nth-child(4),
.leaderboard th:nth-child(5) { text-align: right; }
.leaderboard th:nth-child(5) { padding-right: 8px; }

.leaderboard td {
  padding: 18px 14px;
  border-bottom: 1px solid var(--paper-edge);
  vertical-align: baseline;
  font-size: 16px;
  font-weight: 500;
  font-feature-settings: 'tnum';
}
.leaderboard td:nth-child(1) {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(36px, 4.5vw, 52px);
  line-height: 0.9;
  color: var(--ink);
  padding-left: 8px;
  letter-spacing: -0.04em;
}
.leaderboard td:nth-child(2) {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(18px, 2vw, 22px);
  text-transform: uppercase;
  letter-spacing: -0.005em;
  vertical-align: middle;
}
.leaderboard td:nth-child(3),
.leaderboard td:nth-child(4) {
  text-align: right;
  color: var(--stone);
  vertical-align: middle;
}
.leaderboard td:nth-child(5) {
  text-align: right;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1;
  padding-right: 8px;
  vertical-align: middle;
  letter-spacing: -0.02em;
}
.leaderboard td:nth-child(5) strong { font-weight: 900; }
.leaderboard tr { transition: background 160ms ease; }
.leaderboard tbody tr:hover { background: oklch(0.94 0.025 78); }
.leaderboard tr:last-child td { border-bottom: 2px solid var(--ink); }

.leaderboard .is-self td:nth-child(1) { color: var(--oranje); }

.self-tag {
  display: inline-block;
  margin-left: 12px;
  background: var(--acid);
  color: var(--ink);
  padding: 3px 9px 2px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  vertical-align: 3px;
  border: 2px solid var(--ink);
  line-height: 1;
}
.preds-table .self-tag { vertical-align: 1px; font-size: 10px; padding: 2px 7px; }

/* preds-table — same family, lighter weight */
.preds-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 32px;
  background: transparent;
}
.preds-table thead {
  border-top: 3px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}
.preds-table th {
  text-align: left;
  padding: 12px 14px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.20em;
  color: var(--ink);
}
.preds-table td {
  padding: 14px;
  border-bottom: 1px solid var(--paper-edge);
  font-size: 15px;
  font-weight: 500;
  font-feature-settings: 'tnum';
}
.preds-table td:nth-child(1) {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  text-transform: uppercase;
}
.preds-table td:nth-child(2) {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
}
.preds-table .is-self {
  background: var(--oranje-soft);
}

.is-self { /* base hook for any future use */
  position: relative;
}

/* =========================================================
   DUAL COLUMNS (Komende / Recent)
   ========================================================= */
/* =========================================================
   MATCH TABS — side-by-side on desktop, swipe-tab on mobile
   ========================================================= */
.match-tabs {
  margin-top: clamp(40px, 6vw, 72px);
  position: relative;
}
/* Radios are visually hidden but stay focusable for keyboard users.
   On desktop both panels always render — the radios only control display
   below the mobile breakpoint. */
.match-tabs-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  margin: 0;
}
.match-tabs-nav { display: none; }

.match-tabs-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 56px);
}
.panel h2 { font-size: 12px; }

.match-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--paper-edge);
}
.match-list li { border-bottom: 1px solid var(--paper-edge); }
.match-list a {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 18px 8px 18px 0;
  color: var(--ink);
  position: relative;
  transition: padding 200ms cubic-bezier(0.22, 1, 0.36, 1), background 200ms ease;
}
.match-list a::before {
  content: '';
  position: absolute;
  left: -8px; top: 0; bottom: 0;
  width: 0;
  background: var(--oranje);
  transition: width 220ms cubic-bezier(0.22, 1, 0.36, 1);
}
.match-list a:hover {
  padding-left: 16px;
  background: linear-gradient(90deg, var(--oranje-soft), transparent 70%);
  text-decoration: none;
}
.match-list a:hover::before { width: 5px; }
.match-list a::after {
  content: '→';
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  color: var(--ink);
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
  margin-left: 8px;
}
.match-list a:hover::after { transform: translateX(6px); }
.match-list .muted {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
}
/* 3-column grid: home name right-aligned, score centered, away name left-aligned.
   The 1fr columns share the row width equally, so the score sits at a fixed x
   on every row regardless of team-name length. */
.match-list strong {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 16px;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  min-width: 0;
}
.ml-team {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(15px, 1.7vw, 18px);
  color: var(--ink);
  white-space: nowrap;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.ml-team-home { text-align: right; justify-content: flex-end; }
.ml-team-away { text-align: left; justify-content: flex-start; }
.ml-vs {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(15px, 1.6vw, 17px);
  color: var(--stone);
  text-align: center;
}
.ml-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--oranje);
  font-feature-settings: 'tnum';
  min-width: 4ch;
}
.ml-score i {
  font-style: normal;
  font-weight: 800;
  color: var(--ink-2);
  font-size: 0.55em;
  margin: 0 0.22em;
  display: inline-block;
}

/* =========================================================
   VOORSPELLINGEN — day groupings + score rows
   ========================================================= */
.day { margin-bottom: 44px; }
.day h2 {
  font-size: 12px;
  letter-spacing: 0.24em;
  margin-bottom: 8px;
}

.day-matches {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--paper-edge);
}

.pred-row {
  display: grid;
  grid-template-columns: 100px 1fr 150px;
  align-items: center;
  gap: 20px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--paper-edge);
  transition: background 160ms ease;
}
.pred-row.locked { opacity: 0.55; }
.pred-row:not(.locked):focus-within {
  background: linear-gradient(90deg, var(--oranje-soft), transparent 80%);
}

.pred-kickoff {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--stone);
  font-feature-settings: 'tnum';
}

.pred-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
}
.team {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(17px, 1.9vw, 22px);
  text-transform: uppercase;
  letter-spacing: -0.005em;
  min-width: 0;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.team-home { text-align: right; justify-content: flex-end; }
.team-away { text-align: left; justify-content: flex-start; }
.team .team-name { min-width: 0; }

.pred-scores { display: inline-flex; align-items: center; gap: 8px; }
.pred-scores input {
  width: 52px;
  padding: 4px 0 6px;
  border: none;
  border-bottom: 3px solid var(--ink);
  background: transparent;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(24px, 3vw, 32px);
  color: var(--ink);
  font-feature-settings: 'tnum';
  appearance: textfield;
  -moz-appearance: textfield;
  outline: none;
  transition: border-color 160ms ease, color 160ms ease;
}
.pred-scores input::-webkit-outer-spin-button,
.pred-scores input::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0;
}
.pred-scores input:focus {
  border-bottom-color: var(--oranje);
  color: var(--oranje-deep);
}
.pred-scores input:disabled {
  color: var(--stone);
  border-bottom-style: dotted;
  border-bottom-color: var(--paper-edge);
}
.pred-dash {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(20px, 2.4vw, 26px);
  color: var(--ink);
}

.pred-status {
  text-align: right;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  min-height: 16px;
  color: var(--stone);
}
.pred-status .ok  { color: oklch(0.46 0.16 145); }
.pred-status .err { color: var(--err); }

/* =========================================================
   BONUS FORM
   ========================================================= */
.bonus-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.bonus-form .alert { grid-column: 1 / -1; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; }
  .brand { flex: 0 0 auto; padding: 12px 16px; }
  .nav { padding-left: 4px; }
  .nav-link { padding: 14px 12px 12px; font-size: 13px; letter-spacing: 0.04em; }
  .user { padding: 0 14px; border-left: none; gap: 10px; }
  .user-name { display: none; }

  .container { padding-top: 32px; padding-bottom: 56px; }

  .hero-title { font-size: clamp(54px, 17vw, 120px); }
  .hero-sub   { font-size: 18px; max-width: none; }

  /* Match tabs become an actual tab UI */
  .match-tabs-nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--ink);
    margin-bottom: 24px;
  }
  .match-tabs-nav label {
    flex: 1;
    padding: 14px 14px 12px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--stone);
    text-align: center;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
  }
  .match-tabs-nav label:hover { color: var(--ink); }
  .match-tabs-nav .count {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 11px;
    letter-spacing: 0.02em;
    color: var(--stone);
    background: var(--paper-edge);
    padding: 2px 7px 1px;
    line-height: 1;
    font-feature-settings: 'tnum';
  }
  #mt-up:checked ~ .match-tabs-nav label[for="mt-up"],
  #mt-re:checked ~ .match-tabs-nav label[for="mt-re"] {
    color: var(--ink);
    border-bottom-color: var(--oranje);
  }
  #mt-up:checked ~ .match-tabs-nav label[for="mt-up"] .count,
  #mt-re:checked ~ .match-tabs-nav label[for="mt-re"] .count {
    background: var(--oranje);
    color: var(--ink);
  }
  .match-tabs-input:focus-visible ~ .match-tabs-nav label[for="mt-up"],
  .match-tabs-input:focus-visible ~ .match-tabs-nav label[for="mt-re"] {
    /* Only highlight the label tied to the focused input. Browsers don't
       expose which one without :has(), so we draw an outline on both. */
    outline: 2px dashed var(--oranje);
    outline-offset: 2px;
  }

  .match-tabs-panels {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .panel { display: none; }
  #mt-up:checked ~ .match-tabs-panels > .panel-up,
  #mt-re:checked ~ .match-tabs-panels > .panel-re { display: block; }

  /* The tab label IS the heading on mobile — avoid repeating it. */
  .match-tabs-panels .panel h2 { display: none; }

  .bonus-form { grid-template-columns: 1fr; }

  .pred-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 16px 4px;
  }
  .pred-status { text-align: left; }

  .leaderboard th:nth-child(3),
  .leaderboard td:nth-child(3) { display: none; }
  .leaderboard th:nth-child(4),
  .leaderboard td:nth-child(4) { display: none; }
  .leaderboard td:nth-child(1) { font-size: 36px; }
  .leaderboard td:nth-child(2) { font-size: 17px; }
  .leaderboard td:nth-child(5) { font-size: 26px; }

  .match-list a { grid-template-columns: 80px 1fr auto; gap: 12px; }
}

@media (max-width: 480px) {
  .footer::before { font-size: 11px; letter-spacing: 0.32em; }
}

/* =========================================================
   DELIGHT — stamped save badge
   The text "opgeslagen" lands like a referee whistle:
   a hard ink box stamps in, a tiny tilt, then settles.
   ========================================================= */
.stamp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--ok-soft);
  border: 2px solid var(--ok);
  padding: 4px 9px 3px;
  line-height: 1;
  animation: stamp-in 420ms cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: left center;
}
.stamp::before {
  content: '';
  width: 7px;
  height: 7px;
  background: var(--ok);
  display: inline-block;
}
.stamp.stamp-err {
  background: var(--err-soft);
  border-color: var(--err);
  color: var(--ink);
}
.stamp.stamp-err::before { background: var(--err); }
.stamp.stamp-saving {
  background: transparent;
  border-color: var(--stone);
  color: var(--stone);
  animation: none;
}
.stamp.stamp-saving::before {
  background: var(--stone);
  animation: stamp-pulse 900ms ease-in-out infinite;
}
@keyframes stamp-in {
  0%   { opacity: 0; transform: rotate(-6deg) scale(0.6); }
  60%  { opacity: 1; transform: rotate(2.5deg) scale(1.06); }
  100% { opacity: 1; transform: rotate(0deg) scale(1); }
}
@keyframes stamp-pulse {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .stamp { animation: none; }
  .stamp.stamp-saving::before { animation: none; opacity: 1; }
}

/* =========================================================
   DELIGHT — score-input "kick" on save
   A quick scale flash on the inputs + a transient row glow
   that washes left-to-right when a prediction commits.
   ========================================================= */
.pred-row.is-saved {
  animation: row-glow 700ms cubic-bezier(0.22, 1, 0.36, 1);
}
.pred-row.is-saved .pred-scores input {
  animation: score-kick 380ms cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes row-glow {
  0%   { background: transparent; }
  30%  { background: var(--ok-soft); }
  100% { background: transparent; }
}
@keyframes score-kick {
  0%   { transform: scale(1);   color: var(--ink); }
  40%  { transform: scale(1.18); color: var(--ok); }
  100% { transform: scale(1);   color: var(--ink); }
}
@media (prefers-reduced-motion: reduce) {
  .pred-row.is-saved,
  .pred-row.is-saved .pred-scores input { animation: none; }
}

/* =========================================================
   DELIGHT — leaderboard top spot
   The #1 rank gets an oranje fill behind the position number,
   a thin ink edge on the left, and a heavier name treatment.
   Editorial restraint — the position itself is the trophy.
   ========================================================= */
.leaderboard tbody tr:first-child td:nth-child(1) {
  background: var(--oranje);
  color: var(--ink);
  box-shadow: inset 5px 0 0 var(--ink);
  position: relative;
  /* Single digit ranks read off-center with the base negative tracking,
     so reset spacing and center the digit inside the oranje block.
     Asymmetric padding compensates for the 5px ink bar on the left. */
  text-align: center;
  letter-spacing: 0;
  padding-left: 13px;
  padding-right: 8px;
}
.leaderboard tbody tr:first-child td:nth-child(2) {
  font-weight: 900;
}
.leaderboard tbody tr:first-child td:nth-child(5) strong {
  color: var(--oranje-deep);
}
/* If the user holds #1, keep the position legible with ink on oranje */
.leaderboard tbody tr.is-self:first-child td:nth-child(1) { color: var(--ink); }

/* =========================================================
   DELIGHT — hero em block settles on hover
   The rotated "Voetbal" tag straightens slightly when hovered,
   like a stamp pressed flat. Subtle, not bouncy.
   ========================================================= */
.hero-title em {
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}
.hero-title:hover em {
  transform: rotate(-0.5deg) translateY(-0.04em);
}
@media (prefers-reduced-motion: reduce) {
  .hero-title em { transition: none; }
}

/* =========================================================
   DELIGHT — 404 page
   Big editorial 404, oranje block, no apologies.
   ========================================================= */
.not-found {
  padding: clamp(48px, 9vw, 120px) 0 clamp(40px, 6vw, 80px);
  display: grid;
  gap: clamp(20px, 3vw, 32px);
}
.not-found-code {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(140px, 28vw, 360px);
  line-height: 0.82;
  letter-spacing: -0.045em;
  color: var(--ink);
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 0.04em;
}
.not-found-code i {
  font-style: normal;
  background: var(--oranje);
  color: var(--ink);
  padding: 0 0.06em 0.04em;
  display: inline-block;
  transform: rotate(-3deg);
  line-height: 0.95;
}
.not-found-lede {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(20px, 2.4vw, 28px);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
  max-width: 28ch;
  margin: 0;
  line-height: 1.15;
}
.not-found-sub {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink-2);
  max-width: 50ch;
  margin: 0;
  line-height: 1.55;
}
.not-found .hero-cta { margin-top: 4px; }
.not-found > * { animation: rise-in 720ms cubic-bezier(0.22, 1, 0.36, 1) backwards; }
.not-found > *:nth-child(1) { animation-delay:   0ms; }
.not-found > *:nth-child(2) { animation-delay:  80ms; }
.not-found > *:nth-child(3) { animation-delay: 200ms; }
.not-found > *:nth-child(4) { animation-delay: 300ms; }
.not-found > *:nth-child(5) { animation-delay: 400ms; }
@media (prefers-reduced-motion: reduce) {
  .not-found > * { animation: none; }
}

/* =========================================================
   DELIGHT — country flags
   SVG flags sit beside team names like a stadium scoreboard:
   home gets the flag on the outside-left, away on the outside-right.
   A thin ink hairline frames each one so they read as objects,
   not stray imagery, and keep the editorial feel intact.
   ========================================================= */
.flag {
  display: inline-block;
  width: 1.7em;
  height: 1.275em; /* 4:3 ratio */
  object-fit: cover;
  border: 1.5px solid var(--ink);
  background: var(--paper-2);
  flex: 0 0 auto;
  vertical-align: middle;
  transition:
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 180ms ease;
  user-select: none;
}

/* Match-list rows: a touch of lift on row hover */
.match-list a:hover .flag {
  transform: scale(1.06);
  box-shadow: 2px 2px 0 var(--ink);
}

/* Locked rows fade with the rest of the .55 opacity wash */
.pred-row.locked .flag { border-color: var(--paper-edge); }

/* =========================================================
   DELIGHT — flags "wave" on prediction save
   The .is-saved row already glows + kicks the score; the flags
   add a tiny celebratory tilt that resolves quickly.
   ========================================================= */
.pred-row.is-saved .flag-home { animation: flag-wave-home 620ms cubic-bezier(0.22, 1, 0.36, 1); }
.pred-row.is-saved .flag-away { animation: flag-wave-away 620ms cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes flag-wave-home {
  0%   { transform: rotate(0)   scale(1);    }
  35%  { transform: rotate(-8deg) scale(1.18); }
  65%  { transform: rotate(4deg)  scale(1.08); }
  100% { transform: rotate(0)   scale(1);    }
}
@keyframes flag-wave-away {
  0%   { transform: rotate(0)   scale(1);    }
  35%  { transform: rotate(8deg)  scale(1.18); }
  65%  { transform: rotate(-4deg) scale(1.08); }
  100% { transform: rotate(0)   scale(1);    }
}
@media (prefers-reduced-motion: reduce) {
  .flag,
  .pred-row.is-saved .flag-home,
  .pred-row.is-saved .flag-away,
  .match-list a:hover .flag { animation: none; transform: none; transition: none; }
}

/* =========================================================
   MATCH DETAIL — h1 with flags framing the matchup
   Override h1 block layout so flags & names sit on one row,
   wrapping cleanly on narrow screens.
   ========================================================= */
h1.match-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(10px, 1.6vw, 22px);
  line-height: 0.95;
}
.match-title-team {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--ink);
}
.match-title-dash {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--oranje);
}
.match-title .flag {
  width: 1.1em;
  height: 0.825em;
  border-width: 2px;
}

/* Mobile: pred-row stacks. Flags stay attached to names. */
@media (max-width: 760px) {
  .team { gap: 10px; }
  .flag { width: 1.55em; height: 1.1625em; border-width: 1px; }
  .match-title .flag { width: 0.95em; height: 0.7125em; }
}
