/* ==========================================================================
   PROJECT GOLDEN BOOT — Design system
   Palette: "MetLife Final" (deep navy + USA red + Mexico green + NYC orange + Canada red)
   Typography: New Yorker Editorial (Cormorant Garamond + Source Serif 4 + Inter + JetBrains Mono)
   ========================================================================== */

:root {
  /* Surfaces */
  --bg: #0A1F3D;
  --bg-2: #13284D;
  --bg-3: #1A3258;
  --hairline: #2A4068;
  --hairline-soft: #1F3354;

  /* Text */
  --ink: #F4F1E8;
  --ink-soft: #C9CBD4;
  --ink-muted: #8893A8;
  --ink-faint: #5B6A85;

  /* Accents */
  --usa-red: #BF0A30;
  --mex-green: #00A86B;
  --can-red: #D52B1E;
  --nyc-orange: #FF7900;
  --gold: #FFC72C;

  /* Tier */
  --bones: var(--mex-green);
  --differential: var(--nyc-orange);
  --captain: var(--gold);

  /* Pitch */
  --pitch-fill: #0E2D24;
  --pitch-line: rgba(244, 241, 232, 0.32);

  /* Type */
  --display: 'Cormorant Garamond', Georgia, serif;
  --serif: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
}

/* RESET ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; margin: 0; }
button { font-family: inherit; }

/* MASTHEAD --------------------------------------------------------------- */
.masthead {
  border-bottom: 1px solid var(--hairline);
  background: linear-gradient(to bottom, var(--bg), var(--bg) 95%, transparent);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.masthead-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 36px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 36px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  font-family: var(--display);
  font-size: 34px;
  color: var(--gold);
  line-height: 1;
}
.brand-name {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 1.05;
}
.brand-sub {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 3px;
}
.primary-nav { display: flex; gap: 32px; }
.nav-link {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 8px 0;
  border-bottom: 1.5px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-link:hover { color: var(--ink); }
.nav-link.is-active {
  color: var(--ink);
  border-bottom-color: var(--usa-red);
}
.masthead-meta {
  display: flex; flex-direction: column; align-items: flex-end;
  border-left: 1px solid var(--hairline);
  padding-left: 22px;
}
.meta-label {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.meta-value {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 500;
  margin-top: 4px;
}

/* CONTAINER -------------------------------------------------------------- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 36px 80px;
}
.view { animation: fadeIn 0.25s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* PAGE HEADERS ----------------------------------------------------------- */
.page-header { margin-bottom: 36px; max-width: 720px; }
.kicker {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--nyc-orange);
  margin-bottom: 14px;
  font-weight: 500;
}
.page-title {
  font-family: var(--display);
  font-size: 56px;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.02;
  margin: 0 0 18px;
}
.lede {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
}

/* CARDS ----------------------------------------------------------------- */
.card {
  background: var(--bg-2);
  border: 1px solid var(--hairline-soft);
  border-radius: 4px;
  padding: 28px 30px;
  margin-bottom: 24px;
}
.card-header {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hairline-soft);
}
.card-title {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0.002em;
  margin: 0;
}
.card-meta {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.grid { display: grid; gap: 24px; }
.two-col { grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

/* PITCH ------------------------------------------------------------------ */
.pitch-card {
  background: var(--bg-2);
  border: 1px solid var(--hairline-soft);
  border-radius: 4px;
  padding: 24px 28px 28px;
  margin-bottom: 24px;
}
.pitch-card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px;
}
.pitch-card-title {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 500;
  display: flex; align-items: center; gap: 12px;
}
.formation-badge {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  padding: 3px 9px;
  background: var(--bg-3);
  border-radius: 2px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.pitch-card-meta {
  display: flex; gap: 22px; align-items: center;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.legend-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.legend-bones { background: var(--bones); }
.legend-diff { background: var(--differential); }
.legend-cap { background: var(--captain); }

.pitch-wrap { width: 100%; }
.pitch-svg {
  width: 100%; height: auto;
  display: block;
  border-radius: 3px;
}
.pitch-bg { fill: var(--pitch-fill); }
.pitch-line { stroke: var(--pitch-line); stroke-width: 1.5; fill: none; }
.pitch-line-bold { stroke: var(--pitch-line); stroke-width: 2; fill: none; }

.player-dot {
  cursor: pointer;
}
.player-dot circle {
  fill: var(--bg);
  stroke: var(--bones);
  stroke-width: 2.5;
  transition: stroke-width 0.15s ease;
}
.player-dot.is-diff circle {
  stroke: var(--differential);
}
.player-dot.is-captain circle {
  stroke: var(--captain);
  stroke-width: 3.5;
}
.player-dot:hover circle { stroke-width: 4; }
.player-init {
  fill: var(--ink);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  text-anchor: middle;
}
.player-name-label {
  fill: var(--ink);
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 500;
  text-anchor: middle;
}
.player-nation-label {
  fill: var(--ink-muted);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  text-anchor: middle;
  letter-spacing: 0.04em;
}
.captain-flag {
  fill: var(--captain);
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
  text-anchor: middle;
}

/* BENCH ------------------------------------------------------------------ */
.bench-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed var(--hairline-soft);
}
@media (max-width: 720px) {
  .bench-row { grid-template-columns: repeat(2, 1fr); }
}
.bench-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--bg-3);
  border-radius: 3px;
  border-left: 2px solid var(--bones);
}
.bench-card.is-diff { border-left-color: var(--differential); }
.bench-init {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.bench-text { display: flex; flex-direction: column; min-width: 0; }
.bench-name {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bench-meta {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}

/* CAPTAIN PAIR ----------------------------------------------------------- */
.captain-pair { display: flex; gap: 18px; flex-direction: column; }
.captain-row {
  display: flex; align-items: center; gap: 16px;
  padding: 14px;
  background: var(--bg-3);
  border-radius: 3px;
  border-left: 3px solid var(--captain);
}
.captain-row.is-vice { border-left-color: var(--ink-muted); }
.captain-letter {
  font-family: var(--display);
  font-size: 32px;
  font-weight: 700;
  color: var(--captain);
  width: 44px;
  text-align: center;
}
.captain-row.is-vice .captain-letter { color: var(--ink-muted); }
.captain-info {
  flex: 1;
}
.captain-info-name {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
}
.captain-info-note {
  font-family: var(--serif);
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 3px;
  line-height: 1.4;
}

/* SET-PIECE LIST --------------------------------------------------------- */
.sp-list li {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--hairline-soft);
}
.sp-list li:last-child { border-bottom: none; }
.sp-tag {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 7px;
  border-radius: 2px;
  font-weight: 500;
}
.sp-tag-pens { background: rgba(255, 121, 0, 0.18); color: var(--nyc-orange); }
.sp-tag-fks { background: rgba(0, 168, 107, 0.18); color: var(--mex-green); }
.sp-tag-corners { background: rgba(191, 10, 48, 0.18); color: var(--usa-red); }
.sp-tag-headers { background: rgba(213, 43, 30, 0.18); color: var(--can-red); }
.sp-name {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 500;
  flex: 1;
}
.sp-nation {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}

/* NATION STACK ----------------------------------------------------------- */
.nation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}
.nation-cell {
  padding: 14px 16px;
  background: var(--bg-3);
  border-radius: 3px;
  border-top: 2px solid var(--bones);
}
.nation-cell.is-diff { border-top-color: var(--differential); }
.nation-cell-name {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
}
.nation-cell-count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-muted);
  margin-top: 2px;
}
.nation-cell-prob {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  margin-top: 6px;
  color: var(--mex-green);
}
.nation-cell-prob.is-low { color: var(--nyc-orange); }
.nation-cell-prob.is-tiny { color: var(--ink-muted); }
.nation-cell-players {
  font-family: var(--serif);
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 8px;
  line-height: 1.35;
}

/* PLAYER TABLE ----------------------------------------------------------- */
.player-table {
  display: flex; flex-direction: column;
}
.player-row {
  display: grid;
  grid-template-columns: 44px 1.6fr 1fr 60px 1fr 80px;
  align-items: center;
  gap: 16px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--hairline-soft);
  font-size: 13px;
}
.player-row:last-child { border-bottom: none; }
.player-row-header {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding-bottom: 8px;
}
@media (max-width: 800px) {
  .player-row { grid-template-columns: 38px 1.4fr 80px; }
  .player-row-header > div:nth-child(3),
  .player-row-header > div:nth-child(4),
  .player-row-header > div:nth-child(5),
  .player-row > div:nth-child(3),
  .player-row > div:nth-child(4),
  .player-row > div:nth-child(5) { display: none; }
}
.pr-init {
  width: 36px; height: 36px;
  background: var(--bg-3);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  border-left: 2px solid var(--bones);
  border-radius: 50%;
}
.pr-init.is-diff { background: rgba(255, 121, 0, 0.12); border-left-color: var(--differential); }
.pr-name {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 500;
}
.pr-club {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 2px;
}
.pr-nation { font-family: var(--mono); font-size: 11px; color: var(--ink-soft); letter-spacing: 0.04em; }
.pr-pos { font-family: var(--mono); font-size: 11px; color: var(--ink-muted); }
.pr-sp { display: flex; gap: 4px; flex-wrap: wrap; }
.pr-tier {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  text-align: right;
}
.pr-tier-bones { color: var(--bones); }
.pr-tier-diff { color: var(--differential); }

/* TRANSFER WINDOWS ------------------------------------------------------- */
.windows { display: flex; flex-direction: column; gap: 22px; }
.window-card {
  background: var(--bg-2);
  border: 1px solid var(--hairline-soft);
  border-radius: 4px;
  padding: 30px 32px;
  border-left: 3px solid var(--hairline);
}
.window-card.is-active { border-left-color: var(--nyc-orange); }
.window-card.is-pending { border-left-color: var(--ink-faint); }

.window-head {
  display: flex; justify-content: space-between; align-items: baseline;
  flex-wrap: wrap; gap: 12px;
  margin-bottom: 6px;
}
.window-title {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 600;
  margin: 0;
}
.window-deadline {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}
.window-sub {
  font-family: var(--serif);
  font-size: 15px;
  font-style: italic;
  color: var(--ink-soft);
  margin: 0 0 18px;
}
.window-bullets {
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  margin: 0 0 24px;
  padding-left: 20px;
  list-style: disc;
}
.window-bullets li { margin-bottom: 8px; }

.window-targets-label {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--hairline-soft);
}
.window-targets {
  display: flex; flex-direction: column; gap: 10px;
}
.target-row {
  display: grid;
  grid-template-columns: 24px 1.2fr 60px 2fr;
  gap: 14px;
  padding: 10px 0;
  align-items: baseline;
  border-bottom: 1px dashed var(--hairline-soft);
}
.target-row:last-child { border-bottom: none; }
.target-rank {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-faint);
  font-weight: 500;
}
.target-name {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
}
.target-nation {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}
.target-reason {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.45;
}
@media (max-width: 760px) {
  .target-row { grid-template-columns: 1fr; gap: 4px; }
}

.empty-windows {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-muted);
  padding: 18px 0;
}

/* MY RANK ---------------------------------------------------------------- */
.rank-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 36px;
  align-items: center;
}
@media (max-width: 720px) { .rank-card { grid-template-columns: 1fr; } }

.rank-countdown {
  text-align: center;
  padding: 18px;
  background: var(--bg-3);
  border-radius: 4px;
  border-top: 3px solid var(--nyc-orange);
}
.rank-countdown-value {
  font-family: var(--display);
  font-size: 78px;
  font-weight: 600;
  line-height: 1;
  color: var(--nyc-orange);
}
.rank-countdown-label {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 8px;
}
.rank-status {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.rank-status p { margin: 0 0 12px; }

/* MILESTONES ------------------------------------------------------------- */
.milestones {
  display: flex; flex-direction: column;
  border-left: 1.5px solid var(--hairline);
  margin-left: 12px;
  padding-left: 28px;
  list-style: none;
}
.milestone {
  position: relative;
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline-soft);
}
.milestone:last-child { border-bottom: none; }
.milestone::before {
  content: '';
  position: absolute;
  left: -36px; top: 18px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 2px solid var(--ink-faint);
}
.milestone.is-past::before { background: var(--mex-green); border-color: var(--mex-green); }
.milestone.is-next::before { background: var(--nyc-orange); border-color: var(--nyc-orange); }
.milestone-date {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}
.milestone-label {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 500;
  margin-top: 2px;
}
.milestone-phase {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 4px;
}

/* FOOTER ---------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--hairline);
  padding: 30px 0;
  margin-top: 60px;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 36px;
  display: flex;
  gap: 12px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.footer-sep { color: var(--ink-faint); }
