/* Voetbaltoto - professional football interface */

:root {
  color-scheme: light;
  --page: #f1f5ff;
  --ink: #071751;
  --ink-soft: #34447a;
  --ink-muted: #6e78a0;
  --surface: #ffffff;
  --surface-2: #f8fbff;
  --surface-3: #eaf0ff;
  --line: #d8e1f6;
  --line-strong: #bcc9ec;
  --stadium: #001a70;
  --stadium-2: #061247;
  --grass: #00a95c;
  --grass-2: #63c83b;
  --grass-dark: #00723f;
  --chalk: #f8fff8;
  --gold: #b7dc2f;
  --gold-ink: #112600;
  --blue: #003da5;
  --red: #e63845;
  --good: #008d50;
  --warning: #9a6f00;
  --critical: #d73045;
  --silver: #8490b8;
  --bronze: #b56f3f;
  --shadow-sm: 0 1px 2px rgba(0, 26, 112, .07);
  --shadow: 0 14px 34px rgba(0, 26, 112, .11);
  --shadow-strong: 0 28px 70px rgba(0, 26, 112, .20);
  --radius: 8px;
  --radius-sm: 6px;
  --header-h: 78px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #050b25;
    --ink: #f6f8f6;
    --ink-soft: #cfd8ff;
    --ink-muted: #909bc8;
    --surface: #09133d;
    --surface-2: #0d1a4f;
    --surface-3: #111f5e;
    --line: #22306b;
    --line-strong: #354581;
    --chalk: #eff8ef;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .32);
    --shadow: 0 16px 38px rgba(0, 0, 0, .36);
    --shadow-strong: 0 32px 80px rgba(0, 0, 0, .48);
  }
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--page);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: rgba(36, 111, 209, .45); text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0 0 .55em; line-height: 1.08; letter-spacing: 0; }
h1 { font-size: clamp(2rem, 4vw, 4.35rem); }
h2 { font-size: clamp(1.08rem, 1.45vw, 1.46rem); }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(100% - 40px, 1240px);
  margin-inline: auto;
}

.pitch-backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 26, 112, .98) 0 88px, rgba(0, 61, 165, .96) 88px 252px, rgba(0, 169, 92, .90) 252px 390px, transparent 390px),
    linear-gradient(180deg, rgba(255,255,255,.00) 0 390px, var(--page) 390px 100%),
    var(--page);
}

.pitch-backdrop::before {
  content: "";
  position: absolute;
  inset: 88px 0 auto;
  height: 380px;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(255,255,255,.24) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    radial-gradient(circle at 50% 128px, transparent 0 78px, rgba(255,255,255,.22) 79px 81px, transparent 82px),
    linear-gradient(90deg, rgba(255,255,255,.08) 0 1px, transparent 1px 100%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.045) 0 110px, rgba(0,0,0,.040) 110px 220px),
    linear-gradient(180deg, rgba(0,61,165,.40), rgba(0,169,92,.24));
  background-size: auto, auto, 12.5% 100%, auto, auto;
  mask-image: linear-gradient(#000 0 74%, transparent 100%);
}

.pitch-backdrop::after {
  content: "";
  position: absolute;
  inset: 88px 0 auto;
  height: 160px;
  background:
    linear-gradient(105deg, transparent 0 17%, rgba(248,255,248,.18) 17% 17.4%, transparent 17.4% 100%),
    linear-gradient(75deg, transparent 0 78%, rgba(248,255,248,.11) 78% 78.4%, transparent 78.4% 100%);
  opacity: .82;
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmerLine {
  from { transform: translateX(-24%); }
  to { transform: translateX(24%); }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 10px 0;
  color: #fff;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(0, 169, 92, .30), transparent 32%, transparent 68%, rgba(183, 220, 47, .22)),
    rgba(0, 26, 112, .94);
  border-bottom: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 12px 34px rgba(0,0,0,.18);
  backdrop-filter: blur(18px);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--grass), var(--gold), var(--blue), var(--grass));
}

.header-inner {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(230px, auto) 1fr minmax(270px, auto);
  align-items: center;
  gap: 24px;
}

.brand {
  grid-column: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}

.brand-badge {
  position: relative;
  width: 48px;
  height: 48px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--chalk);
  box-shadow: inset 0 0 0 3px var(--stadium), 0 12px 26px rgba(0,26,112,.26);
}

.brand-badge::before,
.brand-badge::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.brand-badge::before {
  inset: 7px;
  background:
    linear-gradient(90deg, transparent 45%, var(--stadium) 45% 55%, transparent 55%),
    linear-gradient(35deg, transparent 46%, var(--stadium) 46% 54%, transparent 54%),
    linear-gradient(-35deg, transparent 46%, var(--stadium) 46% 54%, transparent 54%);
  opacity: .96;
}

.brand-badge::after {
  width: 14px;
  height: 14px;
  background: var(--stadium);
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  font-size: 1.08rem;
  font-weight: 950;
  letter-spacing: .01em;
  line-height: 1;
  text-transform: uppercase;
}

.brand-text small {
  margin-top: 7px;
  color: rgba(255,255,255,.66);
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .11em;
  white-space: nowrap;
}

.main-nav {
  grid-column: 2;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  background: rgba(0, 11, 54, .44);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.main-nav a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 9px 15px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.78);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 850;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}

.main-nav a > span {
  position: relative;
  width: 22px;
  height: 22px;
  flex: none;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(255,255,255,.09);
}

.main-nav a > span::before,
.main-nav a > span::after {
  content: "";
  position: absolute;
  background: currentColor;
}

.nav-link-home > span::before {
  width: 11px;
  height: 8px;
  left: 5.5px;
  top: 10px;
  border-radius: 2px;
}
.nav-link-home > span::after {
  width: 12px;
  height: 12px;
  left: 5px;
  top: 4px;
  transform: rotate(45deg);
  clip-path: polygon(50% 0, 100% 50%, 76% 50%, 76% 100%, 24% 100%, 24% 50%, 0 50%);
}
.nav-link-board > span::before {
  width: 13px;
  height: 13px;
  left: 5px;
  top: 4px;
  border: 2px solid currentColor;
  border-top: 0;
  background: transparent;
  border-radius: 0 0 6px 6px;
}
.nav-link-board > span::after {
  width: 6px;
  height: 4px;
  left: 8px;
  top: 16px;
  border-radius: 2px;
}
.nav-link-admin > span::before {
  width: 13px;
  height: 10px;
  left: 5px;
  top: 8px;
  border-radius: 3px;
}
.nav-link-admin > span::after {
  width: 8px;
  height: 5px;
  left: 7px;
  top: 4px;
  border: 2px solid currentColor;
  border-bottom: 0;
  background: transparent;
  border-radius: 6px 6px 0 0;
}

.main-nav a:hover {
  color: #fff;
  background: rgba(255,255,255,.08);
  transform: translateY(-1px);
}

.main-nav a.active {
  color: #fff;
  background: linear-gradient(180deg, #0053c7, var(--stadium));
  box-shadow: 0 10px 22px rgba(0,61,165,.26), inset 0 -3px 0 var(--gold);
}

.main-nav a.active > span {
  background: rgba(183,220,47,.18);
}

.header-meta {
  grid-column: 3;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,.76);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.header-meta-admin { width: min(390px, 32vw); }

.season-chip,
.header-season-button {
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius);
  background: rgba(255,255,255,.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10);
}

.season-chip {
  max-width: 220px;
  overflow: hidden;
  padding: 10px 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-season-menu {
  position: relative;
  width: 100%;
}

.header-season-button {
  position: relative;
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: 4px;
  align-items: center;
  padding: 8px 40px 8px 16px;
  color: #fff;
  text-align: left;
  cursor: pointer;
}

.header-season-button::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  color: rgba(255,255,255,.78);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
  transition: transform .16s ease;
}

.header-season-menu.open .header-season-button::after {
  transform: translateY(-30%) rotate(225deg);
}

.header-season-button:focus-visible {
  outline: 3px solid rgba(243,181,51,.28);
  outline-offset: 2px;
}

.header-season-button span {
  color: rgba(255,255,255,.58);
  font-size: .64rem;
  font-weight: 950;
  letter-spacing: .13em;
  line-height: 1;
  text-transform: uppercase;
}

.header-season-button strong {
  min-width: 0;
  overflow: hidden;
  color: #fff;
  font-size: .86rem;
  font-weight: 950;
  letter-spacing: .03em;
  line-height: 1.1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.header-season-options {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  width: min(390px, calc(100vw - 24px));
  padding: 7px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  background: rgba(0, 18, 80, .98);
  box-shadow: var(--shadow-strong);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .16s ease, visibility .16s ease, transform .16s ease;
}

.header-season-menu.open .header-season-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.header-season-options form {
  display: grid;
  gap: 5px;
  margin: 0;
}

.header-season-options button {
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: rgba(255,255,255,.82);
  text-align: left;
  cursor: pointer;
}

.header-season-options button:hover,
.header-season-options button.active {
  background: rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.10);
  color: #fff;
}

.header-season-options button.active { box-shadow: inset 3px 0 0 var(--gold); }
.header-season-options button span {
  overflow: hidden;
  font-weight: 860;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-season-options button small {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--gold-ink);
  font-size: .68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.nav-toggle {
  grid-column: 3;
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius);
  background: rgba(255,255,255,.08);
  color: #fff;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 99px;
  background: currentColor;
  transition: transform .18s ease, opacity .18s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-admin-nav {
  display: none;
}

main.container {
  min-height: 66vh;
  padding: clamp(28px, 4.5vw, 64px) 0 72px;
}

main.container > h1 {
  color: #fff;
  font-size: clamp(1.8rem, 3vw, 3rem);
}

main.container > h1 + p {
  max-width: 70ch;
  color: rgba(255,255,255,.74);
}

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(240px, 30vw, 380px);
  display: grid;
  align-content: end;
  gap: 16px;
  margin-bottom: 22px;
  padding: clamp(26px, 5vw, 58px);
  color: #fff;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--radius);
  background:
    linear-gradient(115deg, rgba(0,26,112,.97) 0 44%, rgba(0,61,165,.92) 44% 72%, rgba(0,169,92,.88) 72% 100%),
    var(--stadium);
  box-shadow: var(--shadow-strong);
  animation: riseIn .42s ease both;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(255,255,255,.22) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    radial-gradient(circle at 72% 34%, transparent 0 72px, rgba(255,255,255,.24) 73px 75px, transparent 76px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 86px, rgba(0,0,0,.035) 86px 172px);
  opacity: .72;
}

.hero::after {
  content: "";
  position: absolute;
  right: clamp(18px, 5vw, 72px);
  top: clamp(20px, 5vw, 60px);
  width: clamp(92px, 16vw, 184px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, #fff 0 9%, transparent 10%),
    conic-gradient(from 18deg, #fff 0 11%, #111820 11% 22%, #fff 22% 33%, #111820 33% 44%, #fff 44% 55%, #111820 55% 66%, #fff 66% 77%, #111820 77% 88%, #fff 88% 100%);
  box-shadow: 0 30px 80px rgba(0,0,0,.30), inset 0 0 0 5px rgba(255,255,255,.76);
  opacity: .16;
}

.hero h1 {
  max-width: 880px;
  margin-bottom: 0;
  text-wrap: balance;
}

.hero .lead {
  max-width: 780px;
  margin-bottom: 0;
  color: rgba(255,255,255,.82);
  font-size: clamp(1rem, 1.45vw, 1.18rem);
}

.hero .alert {
  width: fit-content;
  margin: 0;
}

.deadline-note {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin: 4px 0 0;
  padding: 7px 11px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius);
  background: rgba(255,255,255,.10);
  color: rgba(255,255,255,.74);
  font-size: .92rem;
  font-weight: 760;
}

.countdown-card {
  width: min(100%, 760px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-top: 4px;
  padding: 13px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--radius);
  background: rgba(4, 9, 14, .38);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10);
}

.countdown-card > div:first-child { min-width: 0; }
.countdown-card > div:first-child { text-align: center; }
.countdown-card > div:first-child strong {
  display: block;
  margin-top: 5px;
  color: #fff;
  font-size: .96rem;
}

.countdown-kicker {
  display: inline-flex;
  color: rgba(255,255,255,.62);
  font-size: .68rem;
  font-weight: 950;
  letter-spacing: .13em;
  line-height: 1;
  text-transform: uppercase;
}

.countdown-units {
  display: grid;
  grid-template-columns: repeat(4, minmax(58px, 1fr));
  gap: 8px;
}

.countdown-units span {
  min-width: 58px;
  display: grid;
  place-items: center;
  padding: 8px 9px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.10);
}

.countdown-units strong {
  color: #fff;
  font-size: clamp(1.2rem, 2.4vw, 1.9rem);
  font-weight: 950;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.countdown-units small {
  margin-top: 4px;
  color: rgba(255,255,255,.62);
  font-size: .65rem;
  font-weight: 900;
  text-transform: uppercase;
}

.countdown-card.is-expired {
  border-color: rgba(255,255,255,.20);
  background: rgba(200,54,54,.25);
}

.crest-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: none;
  margin-top: 8px;
}

.crest-strip .club-crest {
  width: 42px;
  height: 46px;
  transition: transform .16s ease, filter .16s ease;
}

.crest-strip .club-crest:hover {
  transform: translateY(-3px);
  filter: drop-shadow(0 14px 18px rgba(0,0,0,.22));
}

/* Layout */
.grid {
  display: grid;
  gap: 18px;
  margin-bottom: 22px;
}
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card,
.stat-tile {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: riseIn .34s ease both;
}

.card {
  padding: clamp(18px, 2.4vw, 30px);
  margin-bottom: 22px;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, var(--blue), var(--grass), var(--gold), transparent 78%);
  opacity: .72;
}

.card-flat { box-shadow: none; }
.card h2 { color: var(--ink); }

.stat-tile {
  overflow: hidden;
  padding: 20px 22px;
  background:
    linear-gradient(180deg, var(--surface), var(--surface-2));
}

.stat-tile::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--blue), var(--grass), var(--gold));
}

.stat-value {
  color: var(--ink);
  font-size: clamp(1.75rem, 3.5vw, 3rem);
  font-weight: 950;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  margin-top: 8px;
  color: var(--ink-muted);
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.hint {
  color: var(--ink-muted);
  font-size: .9rem;
}

/* Prediction form */
.prediction-card {
  padding: 0;
  overflow: clip;
}
.prediction-card::before { display: none; }
.prediction-card form { margin: 0; }

.prediction-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 370px);
  align-items: start;
}

.prediction-panel {
  min-width: 0;
  padding: clamp(18px, 2.4vw, 30px);
}

.rank-panel {
  border-right: 1px solid var(--line);
}

.picks-panel {
  position: sticky;
  top: calc(var(--header-h) + 18px);
  display: grid;
  gap: 16px;
  background:
    linear-gradient(180deg, rgba(243,181,51,.09), transparent 54%),
    var(--surface-2);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.section-heading h2 { margin: 4px 0 0; }

.section-title {
  min-width: 0;
}

.section-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
  margin-left: auto;
}

.export-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 18px;
}

.export-heading h2 {
  margin: 0;
}

.section-kicker {
  color: var(--grass);
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.save-panel {
  display: grid;
  gap: 10px;
  margin-top: 6px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.save-panel p {
  margin: 0;
  color: var(--ink-muted);
  font-size: .9rem;
  font-weight: 760;
}
.mobile-save-bar { display: none; }

/* Controls */
.btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #003da5, var(--stadium));
  color: #fff;
  text-decoration: none;
  font-weight: 880;
  font-size: .92rem;
  line-height: 1.1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(16,24,32,.16);
}
.btn:active { transform: translateY(0); }
.btn-accent {
  background: linear-gradient(180deg, #d8f267, var(--gold));
  color: var(--gold-ink);
}
.btn-accent:hover { background: #d8f267; }
.btn-outline {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
  box-shadow: none;
}
.btn-outline:hover {
  background: var(--surface-2);
  border-color: var(--blue);
}
.btn-danger { background: var(--critical); color: #fff; }
.btn-sm {
  min-height: 34px;
  padding: 7px 12px;
  font-size: .8rem;
}
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: .86rem;
  font-weight: 850;
}
.field .hint { margin-top: 6px; }

input[type=text],
input[type=password],
input[type=number],
input[type=datetime-local],
input[type=email],
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: .95rem;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
textarea { min-height: 110px; resize: vertical; }
input:focus,
select:focus,
textarea:focus {
  border-color: var(--grass);
  box-shadow: 0 0 0 4px rgba(18,138,88,.15);
  background: var(--surface);
}

.form-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.form-row .field { flex: 1 1 230px; }
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.checkbox-row input { width: auto; accent-color: var(--grass); }

.badge,
.pill {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: .77rem;
  font-weight: 850;
  white-space: nowrap;
}
.badge-good { background: rgba(19,131,79,.12); color: var(--good); border-color: rgba(19,131,79,.22); }
.badge-muted { background: transparent; color: var(--ink-muted); }
.badge-gold { background: rgba(243,181,51,.18); color: #8a6500; border-color: rgba(243,181,51,.32); }

.trend { display: inline-flex; align-items: center; font-weight: 850; font-size: .82rem; font-variant-numeric: tabular-nums; }
.trend-up { color: var(--good); }
.trend-down { color: var(--critical); }
.trend-flat, .trend-new { color: var(--ink-muted); font-weight: 700; font-size: .78rem; }

.alert {
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
}
.alert-success { border-left-color: var(--good); background: rgba(19,131,79,.08); color: var(--good); }
.alert-error { border-left-color: var(--critical); background: rgba(200,54,54,.08); color: var(--critical); }
.alert-info { border-left-color: var(--blue); background: rgba(36,111,209,.08); color: var(--blue); }

/* Clubs and ranks */
.club {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.club-crest {
  position: relative;
  width: 38px;
  height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  filter: drop-shadow(0 6px 10px rgba(16,24,32,.13));
}
.club-crest svg,
.club-crest img {
  width: 100%;
  height: 100%;
  display: block;
}
.club-crest img { object-fit: contain; }
.club-crest-logo {
  padding: 3px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.club-crest-sm {
  width: 28px;
  height: 31px;
}
.club-name {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 780;
}

.rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.rank-list li {
  min-height: 62px;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(19,131,79,.055), transparent 28%),
    var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.rank-list li:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: 0 12px 22px rgba(16,24,32,.10);
}
.rank-list li.sortable-ghost { opacity: .36; }
.rank-list li.sortable-chosen { border-color: var(--grass); box-shadow: 0 0 0 4px rgba(18,138,88,.14); }

.position-badge {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--blue), var(--stadium));
  color: #fff;
  font-size: .84rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.drag-handle {
  width: 30px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--ink-muted);
  cursor: grab;
  touch-action: none;
  font-size: 1.2rem;
}

.rank-actions {
  display: inline-flex;
  gap: 5px;
}
.rank-actions button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
}
.rank-actions button:hover {
  border-color: var(--blue);
  color: var(--blue);
}
.rank-list.locked li {
  grid-template-columns: auto minmax(0, 1fr);
  opacity: .92;
}
.rank-list.locked .drag-handle,
.rank-list.locked .rank-actions { display: none; }

/* Tables */
.leaderboard,
.standings-table,
.table-plain,
.history-table,
.matrix-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: .92rem;
}

.leaderboard th,
.leaderboard td,
.standings-table th,
.standings-table td,
.table-plain th,
.table-plain td,
.history-table th,
.history-table td,
.matrix-table th,
.matrix-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.leaderboard th,
.standings-table th,
.table-plain th,
.history-table th,
.matrix-table th {
  color: var(--ink-muted);
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .08em;
  text-align: left;
  text-transform: uppercase;
}

.leaderboard tr:last-child td,
.standings-table tr:last-child td,
.table-plain tr:last-child td,
.history-table tr:last-child td { border-bottom: 0; }

.leaderboard tbody tr,
.standings-table tbody tr,
.table-plain tbody tr,
.history-table tbody tr { transition: background .14s ease; }

.leaderboard tbody tr:hover,
.standings-table tbody tr:hover,
.table-plain tbody tr:hover,
.history-table tbody tr:hover { background: rgba(19,131,79,.055); }

.leaderboard .rank-cell {
  width: 48px;
  color: var(--stadium);
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.leaderboard tbody td {
  height: 54px;
  line-height: 1.25;
}

.leaderboard thead th {
  line-height: 1.25;
}

.leaderboard tr.rank-1 { background: rgba(243,181,51,.12); }
.leaderboard tr.rank-2 { background: rgba(0,61,165,.08); }
.leaderboard tr.rank-3 { background: rgba(0,169,92,.08); }
.leaderboard tr.rank-1 .rank-cell { color: var(--gold-ink); }
.score-total { font-weight: 950; font-variant-numeric: tabular-nums; }

.standings-table th,
.standings-table td {
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.leaderboard th.col-club,
.leaderboard td.col-club,
.standings-table th.col-club,
.standings-table td.col-club { text-align: left; }

.matrix-scroll,
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}
.table-scroll {
  border: 0;
  background: none;
}
.table-scroll table { white-space: nowrap; }

.table-export-bar {
  display: flex;
  justify-content: flex-end;
  flex: 0 0 auto;
  margin: 0;
}

.section-heading .table-export-bar {
  margin-left: 0;
}

.table-export-btn {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border: 1px solid #c7d5f4;
  border-radius: 6px;
  background: #fff;
  color: var(--blue);
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
}

.table-export-btn:hover {
  background: #edf4ff;
  border-color: var(--blue);
}

.snapshot-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.matrix-table { min-width: 100%; font-size: .86rem; }
.matrix-table th,
.matrix-table td {
  white-space: nowrap;
  border-right: 1px solid var(--line);
}
.matrix-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
}
.matrix-table td:first-child,
.matrix-table th:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  background: var(--surface);
  font-weight: 850;
}
.matrix-table .delta-good { color: var(--good); font-weight: 950; }
.matrix-table .delta { color: var(--ink-muted); }
.matrix-table .empty-note { color: var(--ink-muted); font-style: italic; }
.matrix-table input[type=number] { width: 74px; min-height: 34px; padding: 6px 8px; }

/* Timeline boards */
.timeline-card { overflow: hidden; }
.timeline-board-scroll {
  max-height: min(68vh, 720px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}
.timeline-board {
  min-width: max(760px, calc(230px + var(--round-count) * 118px));
}
.timeline-board-clubs {
  min-width: max(820px, calc(270px + var(--round-count) * 118px));
}
.timeline-board-head,
.timeline-row {
  display: grid;
  grid-template-columns: 230px repeat(var(--round-count), minmax(108px, 1fr));
}
.timeline-board-clubs .timeline-board-head,
.timeline-board-clubs .timeline-row {
  grid-template-columns: 270px repeat(var(--round-count), minmax(108px, 1fr));
}
.timeline-board-head {
  position: sticky;
  top: 0;
  z-index: 8;
  background: var(--surface);
}
.timeline-corner,
.timeline-round,
.timeline-person,
.timeline-cell {
  min-height: 54px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.timeline-corner,
.timeline-round {
  color: var(--ink-muted);
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.timeline-corner,
.timeline-person {
  position: sticky;
  left: 0;
  z-index: 5;
  padding: 0 14px;
  background: var(--surface);
  border-right: 1px solid var(--line);
}
.timeline-corner { z-index: 10; }
.timeline-round {
  position: sticky;
  top: 0;
  z-index: 8;
  justify-content: center;
  padding: 0 10px;
  background: var(--surface);
  text-align: center;
}
.timeline-cell {
  position: relative;
  justify-content: center;
  padding: 0 10px;
  text-align: center;
}
.timeline-row:hover .timeline-person,
.timeline-row:hover .timeline-cell { background: rgba(19,131,79,.055); }

.timeline-person {
  gap: 10px;
  color: var(--ink);
  font-weight: 880;
}
.timeline-club { gap: 12px; }
.timeline-person i,
.timeline-name i {
  width: 11px;
  height: 11px;
  flex: none;
  border-radius: 999px;
  box-shadow: 0 0 0 3px rgba(255,255,255,.65);
}
.timeline-person span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.timeline-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: .86rem;
  font-weight: 780;
}
.timeline-cell::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: var(--line);
  transform: translateY(-50%);
}
.timeline-dot {
  position: relative;
  z-index: 1;
  min-width: 42px;
  min-height: 32px;
  display: inline-grid;
  place-items: center;
  padding: 5px 9px;
  border: 2px solid var(--participant-color, var(--line-strong));
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: .82rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  box-shadow: var(--shadow-sm);
}
.timeline-dot.top {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--gold-ink);
}
.timeline-dot.good {
  background: color-mix(in srgb, var(--participant-color, var(--good)) 16%, var(--surface));
}
.timeline-dot.empty {
  border-color: var(--line);
  color: var(--ink-muted);
}

/* Admin */
.admin-shell {
  position: relative;
  z-index: 5;
  margin-bottom: 22px;
}

.admin-nav {
  display: grid;
  grid-template-columns: repeat(10, max-content) 1fr max-content max-content;
  align-items: center;
  gap: 3px;
  padding: 7px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  scrollbar-width: thin;
}

.admin-nav a,
.admin-user {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .84rem;
  font-weight: 850;
  white-space: nowrap;
}
.admin-nav a:hover {
  background: var(--surface-3);
  color: var(--ink);
}
.admin-nav a.active {
  background: var(--stadium);
  color: #fff;
}
.admin-user { color: var(--ink-muted); }
.admin-divider {
  width: 1px;
  height: 24px;
  margin: 0 6px;
  background: var(--line-strong);
}

.season-switch {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  color: var(--ink-muted);
  font-size: .82rem;
  font-weight: 780;
}
.season-switch select {
  width: auto;
  max-width: min(100%, 320px);
  min-height: 36px;
  border-radius: var(--radius-sm);
  font-size: .82rem;
}

.link-copy {
  display: flex;
  align-items: center;
  gap: 7px;
}
.link-copy input {
  min-width: 260px;
  color: var(--ink-muted);
  font-size: .8rem;
}

.login-card {
  max-width: 430px;
  margin: clamp(30px, 8vw, 88px) auto;
}

footer.site-footer {
  padding: 32px 0 38px;
  color: var(--ink-muted);
  text-align: center;
  font-size: .86rem;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}

@media (max-width: 980px) {
  .header-inner { grid-template-columns: auto 1fr auto; }
  .header-meta:not(.header-meta-admin) { display: none; }
  .header-meta-admin {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    width: 100%;
  }
  .grid-3 { grid-template-columns: 1fr; }
  .admin-nav { grid-template-columns: repeat(14, max-content); }
  .admin-nav-spacer { display: none; }
  .prediction-grid { grid-template-columns: 1fr; }
  .rank-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .picks-panel { position: static; }
}

@media (max-width: 760px) {
  .container { width: min(100% - 24px, 1240px); }
  .site-header { padding: 9px 0; }
  .header-inner { gap: 10px; }
  .brand-badge { width: 40px; height: 40px; }
  .brand-text { font-size: .92rem; }
  .brand-text small {
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .nav-toggle {
    display: block;
    justify-self: end;
  }
  .main-nav {
    grid-column: 1 / -1;
    position: fixed;
    inset: 68px 12px auto 12px;
    display: grid;
    grid-template-columns: 1fr;
    justify-self: stretch;
    gap: 8px;
    padding: 12px;
    border-radius: var(--radius);
    background: rgba(16, 24, 32, .98);
    box-shadow: var(--shadow-strong);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity .18s ease, visibility .18s ease, transform .18s ease;
  }
  .main-nav.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .main-nav a {
    min-height: 46px;
    justify-content: flex-start;
  }
  main.container { padding-top: 24px; }
  .hero {
    min-height: 270px;
    padding: 24px;
  }
  .hero::after {
    top: 20px;
    right: 18px;
    width: 96px;
  }
  .grid-2,
  .grid-3 { grid-template-columns: 1fr; }
  .card { padding: 18px; }
  .prediction-card { padding: 0; }
  .prediction-panel { padding: 18px; }
  .form-row { gap: 12px; }
  .btn { width: 100%; }
  .countdown-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .countdown-units { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .countdown-units span {
    min-width: 0;
    padding: 8px 5px;
  }
  .save-panel { display: none; }
  .mobile-save-bar {
    position: sticky;
    bottom: 0;
    z-index: 20;
    display: block;
    margin: 0;
    padding: 12px;
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: blur(18px);
  }
  .link-copy,
  .table-plain form[style*="display:flex"] { flex-wrap: wrap; }
  .link-copy input,
  .table-plain input[type=text] { min-width: 100% !important; }
  .rank-list li { grid-template-columns: auto auto minmax(0, 1fr); }
  .rank-actions {
    grid-column: 1 / -1;
    justify-self: end;
  }
  .leaderboard,
  .standings-table,
  .table-plain { font-size: .84rem; }
  .leaderboard th,
  .leaderboard td,
  .standings-table th,
  .standings-table td,
  .table-plain th,
  .table-plain td { padding: 9px 8px; }
  footer.site-footer { padding-bottom: 26px; }
}

@media (max-width: 520px) {
  h1 { font-size: 2rem; }
  .hero h1 { font-size: 1.45rem; }
  .hero { min-height: 300px; }
  .hero .lead { font-size: .98rem; }
  .deadline-note {
    width: 100%;
    border-radius: var(--radius);
  }
  .countdown-card { padding: 12px; }
  .countdown-units { gap: 6px; }
  .countdown-units strong { font-size: 1.15rem; }
  .countdown-units small { font-size: .58rem; }
  .club-crest { width: 34px; height: 38px; }
  .club-crest-sm { width: 26px; height: 29px; }
  .rank-list li {
    gap: 9px;
    padding: 9px;
  }
  .position-badge {
    width: 31px;
    height: 31px;
  }
}

/* -------------------------------------------------------------------------
   Final visual direction: Eredivisie-inspired, professional match centre.
   ------------------------------------------------------------------------- */

:root {
  --page: #f4f7fc;
  --ink: #071650;
  --ink-soft: #33437a;
  --ink-muted: #7380aa;
  --surface: #ffffff;
  --surface-2: #f8fbff;
  --surface-3: #edf3ff;
  --line: #dce5f8;
  --line-strong: #bdcaeb;
  --stadium: #001b72;
  --stadium-2: #041044;
  --grass: #00a767;
  --grass-2: #00c47a;
  --grass-dark: #007a4d;
  --gold: #c8ea38;
  --gold-ink: #162500;
  --blue: #003da5;
  --shadow-sm: 0 1px 2px rgba(0, 27, 114, .08);
  --shadow: 0 16px 42px rgba(0, 27, 114, .11);
  --shadow-strong: 0 32px 90px rgba(0, 27, 114, .22);
}

body {
  background:
    linear-gradient(180deg, #edf3ff 0, #f7faff 360px, var(--page) 100%);
  color: var(--ink);
}

.container {
  width: min(100% - 44px, 1280px);
}

.pitch-backdrop {
  background:
    radial-gradient(circle at 82% 120px, rgba(0, 167, 103, .22), transparent 280px),
    linear-gradient(135deg, #00145a 0 46%, #003da5 46% 68%, #00a767 68% 100%);
  height: 430px;
  inset: 0 0 auto;
  overflow: hidden;
}

.pitch-backdrop::before {
  inset: 92px 0 0;
  height: 338px;
  opacity: .34;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(255,255,255,.32) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    radial-gradient(circle at 50% 122px, transparent 0 76px, rgba(255,255,255,.28) 77px 79px, transparent 80px),
    linear-gradient(90deg, rgba(255,255,255,.12) 0 1px, transparent 1px 100%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.055) 0 118px, rgba(0,0,0,.045) 118px 236px);
  background-size: auto, auto, 12.5% 100%, auto;
  mask-image: linear-gradient(#000 0 72%, transparent 100%);
}

.pitch-backdrop::after {
  inset: 0;
  height: 430px;
  opacity: .78;
  background:
    linear-gradient(112deg, transparent 0 18%, rgba(200,234,56,.36) 18% 18.55%, transparent 18.55% 100%),
    linear-gradient(112deg, transparent 0 72%, rgba(255,255,255,.18) 72% 72.35%, transparent 72.35% 100%),
    radial-gradient(circle at 8% 20%, rgba(255,255,255,.12), transparent 240px);
}

.site-header {
  padding: 12px 0;
  color: var(--ink);
}

.site-header::before {
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid rgba(0, 27, 114, .10);
  box-shadow: 0 14px 40px rgba(0, 27, 114, .12);
  backdrop-filter: blur(20px);
}

.site-header::after {
  height: 4px;
  background: linear-gradient(90deg, var(--blue) 0 44%, var(--grass) 44% 72%, var(--gold) 72% 100%);
}

.header-inner {
  min-height: 62px;
}

.brand {
  color: var(--stadium);
}

.brand-badge {
  background:
    radial-gradient(circle at 50% 50%, #fff 0 31%, transparent 32%),
    conic-gradient(from 15deg, var(--stadium) 0 12%, #fff 12% 24%, var(--stadium) 24% 36%, #fff 36% 48%, var(--stadium) 48% 60%, #fff 60% 72%, var(--stadium) 72% 84%, #fff 84% 100%);
  box-shadow: inset 0 0 0 3px var(--stadium), 0 10px 22px rgba(0,27,114,.20);
}

.brand-badge::before {
  inset: 12px;
  background: var(--stadium);
  opacity: 1;
}

.brand-badge::after {
  width: 24px;
  height: 24px;
  border: 3px solid #fff;
  background: transparent;
}

.brand-text {
  font-size: 1.05rem;
  letter-spacing: .015em;
}

.brand-text small {
  color: var(--ink-muted);
}

.main-nav {
  gap: 2px;
  padding: 5px;
  border-color: var(--line);
  background: #f2f6ff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.65), var(--shadow-sm);
}

.main-nav a {
  color: var(--ink-soft);
  border-radius: 6px;
  font-weight: 900;
}

.main-nav a > span {
  background: #e4ecff;
  color: var(--blue);
}

.main-nav a:hover {
  color: var(--blue);
  background: #e7efff;
}

.main-nav a.active {
  color: #fff;
  background: var(--blue);
  box-shadow: inset 0 -3px 0 var(--gold), 0 10px 22px rgba(0,61,165,.22);
}

.main-nav a.active > span {
  background: rgba(255,255,255,.16);
  color: #fff;
}

.season-chip,
.header-season-button {
  border-color: rgba(0, 27, 114, .18);
  background: linear-gradient(180deg, #ffffff, #f1f5ff);
  color: var(--stadium);
  box-shadow: var(--shadow-sm);
}

.header-season-button span {
  color: var(--ink-muted);
}

.header-season-button strong {
  color: var(--stadium);
}

.header-season-button::after {
  color: var(--blue);
}

.header-season-options {
  border-color: rgba(255,255,255,.12);
  background: #00145a;
}

.nav-toggle {
  border-color: var(--line);
  background: #f2f6ff;
  color: var(--blue);
}

main.container {
  padding-top: clamp(30px, 4.4vw, 58px);
}

.hero {
  min-height: clamp(250px, 31vw, 390px);
  border: 1px solid rgba(255,255,255,.20);
  background:
    linear-gradient(116deg, rgba(0,27,114,.98) 0 47%, rgba(0,61,165,.96) 47% 73%, rgba(0,167,103,.92) 73% 100%),
    var(--stadium);
  box-shadow: 0 32px 90px rgba(0,27,114,.28);
}

.hero::before {
  opacity: .52;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(255,255,255,.22) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    radial-gradient(circle at 74% 36%, transparent 0 76px, rgba(255,255,255,.24) 77px 79px, transparent 80px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.045) 0 92px, rgba(0,0,0,.035) 92px 184px);
}

.hero::after {
  opacity: .12;
}

.hero h1 {
  letter-spacing: 0;
}

.hero .lead {
  color: rgba(255,255,255,.86);
}

.countdown-card {
  border-color: rgba(255,255,255,.20);
  background: rgba(0, 20, 90, .44);
}

.countdown-units span {
  background: rgba(255,255,255,.12);
}

.card,
.stat-tile {
  border-color: rgba(0,27,114,.10);
  box-shadow: 0 18px 46px rgba(0,27,114,.10);
}

.card::before {
  height: 4px;
  background: linear-gradient(90deg, var(--blue) 0 46%, var(--grass) 46% 72%, var(--gold) 72% 100%);
  opacity: 1;
}

.stat-tile {
  background: linear-gradient(180deg, #fff, #f9fbff);
}

.stat-tile::before {
  background: linear-gradient(180deg, var(--blue), var(--grass), var(--gold));
}

.stat-tile-status {
  display: grid;
  align-content: center;
  gap: 12px;
}

.status-chip {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid #c7d5f4;
  border-radius: 6px;
  background: #f4f8ff;
  color: var(--blue);
  font-size: .92rem;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.status-chip::before {
  content: "";
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 999px;
  background: currentColor;
}

.status-chip.is-open {
  border-color: rgba(0,167,103,.24);
  background: rgba(0,167,103,.08);
  color: #007a4d;
}

.status-chip.is-closed {
  border-color: rgba(215,48,69,.24);
  background: rgba(215,48,69,.08);
  color: var(--critical);
}

.section-kicker {
  color: var(--blue);
}

.btn {
  border-radius: 6px;
  background: var(--blue);
  box-shadow: 0 10px 22px rgba(0,61,165,.17);
}

.btn:hover {
  background: #004fc3;
}

.btn-accent {
  background: var(--gold);
  color: var(--gold-ink);
  box-shadow: 0 10px 22px rgba(183,220,47,.22);
}

.btn-accent:hover {
  background: #d5f252;
}

.btn-outline {
  background: #fff;
  color: var(--blue);
  border-color: #c7d5f4;
  box-shadow: none;
}

.btn-outline:hover {
  background: #edf4ff;
  color: var(--stadium);
  border-color: var(--blue);
}

input[type=text],
input[type=password],
input[type=number],
input[type=datetime-local],
input[type=email],
select,
textarea {
  border-color: #cdd8f0;
  background: #fff;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0,61,165,.14);
}

.badge,
.pill {
  border-color: #d7e1f6;
  background: #f4f8ff;
  color: var(--ink-soft);
}

.badge-good {
  background: rgba(0,167,103,.10);
  color: #007a4d;
  border-color: rgba(0,167,103,.24);
}

.badge-gold {
  background: rgba(200,234,56,.22);
  color: #526900;
  border-color: rgba(200,234,56,.40);
}

.rank-list li {
  border-color: #dce5f8;
  background:
    linear-gradient(90deg, rgba(0,61,165,.055), transparent 34%),
    #fff;
}

.position-badge {
  background: var(--blue);
}

.leaderboard tbody tr:hover,
.standings-table tbody tr:hover,
.table-plain tbody tr:hover,
.history-table tbody tr:hover,
.timeline-row:hover .timeline-person,
.timeline-row:hover .timeline-cell {
  background: rgba(0,61,165,.055);
}

.leaderboard tr.rank-1 {
  background: rgba(200,234,56,.18);
}

.leaderboard tr.rank-2 {
  background: rgba(0,61,165,.08);
}

.leaderboard tr.rank-3 {
  background: rgba(0,167,103,.08);
}

.timeline-board-scroll,
.matrix-scroll,
.table-scroll {
  border-color: #dce5f8;
}

.timeline-dot.top {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--gold-ink);
}

.timeline-dot.good {
  background: color-mix(in srgb, var(--grass) 12%, #fff);
}

.admin-nav {
  border-color: rgba(0,27,114,.10);
  background: #ffffff;
  box-shadow: 0 18px 46px rgba(0,27,114,.10);
}

.admin-nav a {
  color: var(--ink-soft);
}

.admin-nav a:hover {
  background: #edf4ff;
  color: var(--blue);
}

.admin-nav a.active {
  background: var(--blue);
  color: #fff;
  box-shadow: inset 0 -3px 0 var(--gold);
}

.admin-divider {
  background: #d2dcf4;
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 24px, 1280px);
  }

  .site-header {
    color: var(--ink);
  }

  .main-nav {
    background: #00145a;
  }

  .main-nav a {
    color: rgba(255,255,255,.80);
  }

  .main-nav a > span {
    background: rgba(255,255,255,.10);
    color: currentColor;
  }
}

/* Cleanup pass: remove the oversized abstract hero artwork. */
.pitch-backdrop {
  height: 360px;
  background:
    radial-gradient(circle at 78% 60px, rgba(0, 167, 103, .16), transparent 260px),
    linear-gradient(180deg, #00145a 0, #003da5 230px, transparent 230px),
    var(--page);
}

.pitch-backdrop::before {
  inset: 90px 0 auto;
  height: 210px;
  opacity: .18;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(255,255,255,.35) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    radial-gradient(circle at 50% 88px, transparent 0 58px, rgba(255,255,255,.30) 59px 61px, transparent 62px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.045) 0 120px, rgba(0,0,0,.035) 120px 240px);
  mask-image: linear-gradient(#000 0 70%, transparent 100%);
}

.pitch-backdrop::after {
  display: none;
}

.hero {
  min-height: clamp(180px, 20vw, 260px);
  align-content: center;
  justify-items: center;
  text-align: center;
  background:
    linear-gradient(90deg, rgba(0, 20, 90, .98), rgba(0, 61, 165, .95)),
    var(--stadium);
}

.hero::before {
  opacity: .20;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(255,255,255,.26) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    radial-gradient(circle at 50% 50%, transparent 0 76px, rgba(255,255,255,.24) 77px 79px, transparent 80px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 96px, rgba(0,0,0,.03) 96px 192px);
}

.hero::after {
  display: none;
}

.hero h1,
.hero .lead,
.hero .countdown-card,
.hero .crest-strip,
.hero .alert {
  position: relative;
  z-index: 1;
}

.hero h1 {
  max-width: none;
  font-size: clamp(1.55rem, 2.65vw, 2.55rem);
  line-height: 1.06;
}

.hero .lead {
  max-width: min(100%, 1080px);
}

.hero .countdown-card {
  justify-self: center;
}

.countdown-card {
  background: rgba(255, 255, 255, .10);
}

@media (max-width: 760px) {
  .pitch-backdrop {
    height: 320px;
  }

  .hero {
    min-height: 240px;
  }
}

@media (max-width: 980px) {
  .admin-shell {
    margin-bottom: 18px;
  }

  .admin-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
    padding: 8px;
  }

  .admin-nav a,
  .admin-user {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 9px 8px;
    border-radius: 8px;
    white-space: normal;
    text-align: center;
    line-height: 1.1;
  }

  .admin-divider {
    grid-column: 1 / -1;
    width: 100%;
    height: 1px;
    margin: 2px 0;
  }

  .admin-nav-spacer,
  .admin-user {
    display: none;
  }
}

@media (max-width: 420px) {
  .admin-nav {
    gap: 5px;
    padding: 7px;
  }

  .admin-nav a {
    min-height: 38px;
    padding: 8px 5px;
    font-size: .72rem;
  }
}

@media (max-width: 760px) {
  body.menu-open {
    overflow: hidden;
  }

  .header-inner {
    align-items: start;
  }

  .main-nav {
    inset: 74px 12px auto 12px;
    max-height: calc(100dvh - 88px);
    overflow-y: auto;
    overscroll-behavior: contain;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 8px;
    padding: 10px;
    background: #00145a;
  }

  .main-nav a {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    justify-content: flex-start;
    border-radius: 8px;
    white-space: normal;
    line-height: 1.1;
  }

  .main-nav > .nav-link-admin {
    grid-column: 1 / -1;
  }

  .mobile-admin-nav {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,.16);
  }

  .mobile-admin-nav a {
    min-height: 40px;
    justify-content: center;
    padding: 8px 6px;
    background: rgba(255,255,255,.06);
    color: rgba(255,255,255,.82);
    font-size: .78rem;
    text-align: center;
  }

  .mobile-admin-nav a.active {
    background: #fff;
    color: var(--blue);
    box-shadow: inset 0 -3px 0 var(--gold);
  }

  .mobile-admin-divider {
    grid-column: 1 / -1;
    height: 1px;
    margin: 1px 0;
    background: rgba(255,255,255,.14);
  }

  .admin-shell {
    display: none;
  }

  .is-admin .main-nav {
    inset: 144px 12px auto 12px;
    max-height: calc(100dvh - 158px);
  }
}

@media (max-width: 420px) {
  .mobile-admin-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
