/* ════════════════════════════════════════════════════════════════════════
   TEAM PAGE — styles for the data-driven nation file (e.g. /en/teams/brazil/)
   A MERGE of the two approved variations:
     · V1 "The Almanac Dossier"  (Win95 manila file frame + several sections)
     · V3 "Arcade Team Select"   (star players, hi-score, the arcade pitch —
       now repurposed for the SUBJECTIVE all-time XI, not a current-squad XI)
   The page now extends layouts/base.njk and is server-rendered from
   data/team-pages/{id}.json by layouts/team.njk; this file is loaded only by
   that layout. Class prefixes are preserved from their source (v1- / v3-) so
   nothing collides; brand-new bits use the tp- prefix.
   Built ONLY from --c-* / --font-* / --fs-* tokens (team accent hexes from the
   data are the only literal colours; raw px only for decorative LED/pixel bits,
   never below the VT323 20px / pixel-Courier 12px floor).
   Does NOT modify global.css, tokens.css, base.njk, home.js, or almanac.js.
   ════════════════════════════════════════════════════════════════════════ */

/* ── PAGE RHYTHM ──
   On match/home pages the panels get their vertical spacing from
   `.content-area { gap }` / `.home-wrapper > .section-panel { margin }`.
   The team page stacks its sections directly under `.site-wrapper` (which has
   neither), so without this they would butt border-to-border. team-page.css is
   loaded ONLY by the team layout, so scoping the rhythm here is safe and
   touches no other page. The shared marquee/nav now supply the top chrome, so
   the old lab-only `.tp-marquee` divider tint is gone. */
.site-wrapper > .section-panel,
.site-wrapper > .v3-cab { margin-bottom: 1.25rem; }
.site-wrapper > .nav-bar { margin-top: 1rem; }

/* ── NAV: HOME button sits first, slightly distinguished ── */
.tp-nav-home {
  color: var(--c-yellow) !important;
  background: var(--c-midblue);
  border-color: var(--c-yellow) var(--c-gold) var(--c-gold) var(--c-yellow) !important;
}
.tp-nav-home:hover {
  background: var(--c-blue);
  color: var(--c-navy) !important;
  background: var(--c-yellow);
}

/* ════════════════════════════════════════════════════════════
   DOSSIER HEADER (V1) — manila file with the big flag, BRAZIL,
   gold stars, nicknames. The rotated CONFIDENTIAL stamp is GONE;
   a framed pixel COUNTRY MAP takes its place.
   ════════════════════════════════════════════════════════════ */
.v1-dossier-header {
  position: relative;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 30px, rgba(0,0,0,0.06) 30px, rgba(0,0,0,0.06) 31px),
    linear-gradient(180deg, var(--c-midblue) 0%, var(--c-darkblue) 100%);
  border: 3px solid var(--c-yellow);
  box-shadow: 0 0 0 1px var(--c-gold), 6px 6px 0 var(--c-navy);
  padding: 1.5rem 1.25rem 1.25rem;
  margin: 0.75rem 0 1rem;
  overflow: hidden;
}
/* "file tab" stub poking off the top-left, like a manila folder */
.v1-file-tab {
  position: absolute;
  top: -2px;
  left: 24px;
  font-family: var(--font-chrome);
  font-size: var(--fs-xs);
  color: var(--c-navy);
  background: var(--c-yellow);
  padding: 5px 14px 4px;
  letter-spacing: 1px;
  border: 2px solid var(--c-gold);
  border-top: none;
}
.v1-header-main {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}
.v1-header-flag {
  flex: 0 0 auto;
  border: 3px solid var(--c-gray2);
  box-shadow: 4px 4px 0 var(--c-navy);
  line-height: 0;
}
.v1-header-flag svg {
  display: block;
  width: 132px;
  height: 89px;
  image-rendering: pixelated;
}
.v1-header-id { flex: 1; min-width: 240px; }
/* keep the header text clear of the absolutely-positioned map on wider screens */
@media (min-width: 721px) {
  .v1-header-id { padding-right: 150px; }
}
.v1-team-name {
  font-family: var(--font-chrome);
  font-size: var(--fs-title);
  color: var(--c-yellow);
  text-shadow: 2px 2px 0 var(--c-orange), 4px 4px 0 var(--c-navy);
  letter-spacing: 2px;
  line-height: 1.5;
}
.v1-team-local {
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  color: var(--c-sky);
  letter-spacing: 2px;
  margin-top: 2px;
}
/* row of gold stars — one per World Cup title */
.v1-stars {
  display: flex;
  gap: 6px;
  margin: 0.6rem 0 0.5rem;
  font-size: var(--fs-lg);
  line-height: 1;
}
.v1-stars .v1-star { color: var(--c-yellow); text-shadow: 1px 1px 0 var(--c-orange); }
.v1-stars .v1-star-label {
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  color: var(--c-gray1);
  letter-spacing: 1px;
  align-self: center;
  margin-left: 4px;
}
.v1-nicknames {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 0.35rem;
}
.v1-nick {
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  color: var(--c-white);
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--c-sky);
  padding: 4px 8px;
  letter-spacing: 1px;
}

/* ── PIXEL COUNTRY MAP (replaces the old CONFIDENTIAL stamp) ──
   A small framed Win95 plate top-right on desktop; flows below on phones. */
.tp-mapplate {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 132px;
  background: var(--c-navy);
  border: 3px solid var(--c-sky);
  box-shadow: 0 0 0 1px var(--c-gold), 4px 4px 0 var(--c-navy);
  padding: 8px 8px 6px;
  text-align: center;
}
.tp-mapplate svg,
.tp-mapplate .nation-map-pixel {
  display: block;
  width: 84px;
  height: auto;
  margin: 0 auto;
  image-rendering: pixelated;   /* required: keep the pixel map crisp */
}
.tp-map-label {
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  color: var(--c-sky);
  letter-spacing: 1px;
  margin-top: 6px;
  line-height: 1.3;
}
@media (max-width: 720px) {
  /* on phones the map would overlap the title — flow it inline below instead */
  .tp-mapplate {
    position: static;
    margin: 0.9rem auto 0;
    right: auto; top: auto;
  }
}

/* ════════════════════════════════════════════════════════════
   HONOURS CABINET (V1) — trophy chips
   ════════════════════════════════════════════════════════════ */
.v1-honours-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}
.v1-honour-chip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(0,0,0,0.3);
  border: 2px solid var(--c-midblue);
  border-left: 4px solid var(--c-yellow);
  padding: 0.6rem 0.7rem;
}
.v1-honour-icon { font-size: var(--fs-emoji); line-height: 1; flex-shrink: 0; }
.v1-honour-body { min-width: 0; }
.v1-honour-count {
  font-family: var(--font-vt);
  font-size: var(--fs-lg);
  color: var(--c-yellow);
}
.v1-honour-count b {
  font-family: var(--font-chrome);
  font-size: var(--fs-md);
  color: var(--c-yellow);
  text-shadow: 1px 1px 0 var(--c-orange);
  margin-right: 4px;
}
.v1-honour-comp {
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  color: var(--c-white);
  letter-spacing: 1px;
}
.v1-honour-years {
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  color: var(--c-gray2);
  margin-top: 2px;
  line-height: 1.5;
}

/* ════════════════════════════════════════════════════════════
   WORLD CUP RECORD (V1) — stat boxes + high/low callouts
   (the bars reuse global .bar-row/.bar-track/.bar-fill)
   ════════════════════════════════════════════════════════════ */
.tp-wc-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
  margin: 0.4rem 0 1.1rem;
}
.tp-wc-stats.tp-wc-stats-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 360px) { .tp-wc-stats { grid-template-columns: repeat(2, 1fr); } }
.tp-statbox {
  text-align: center;
  background: rgba(0,0,0,0.4);
  border: 2px solid var(--c-midblue);
  padding: 0.7rem 0.4rem;
}
.tp-statbox .tp-stat-n {
  font-family: var(--font-vt);
  font-size: var(--fs-lg);
  color: var(--c-yellow);
  text-shadow: 0 0 8px rgba(245,200,0,0.5);
  line-height: 1;
}
.tp-statbox .tp-stat-l {
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  color: var(--c-sky);
  letter-spacing: 1px;
  margin-top: 0.35rem;
  display: block;
}

/* the inline gold-stars row above the stat boxes */
.tp-wc-stars {
  text-align: center;
  font-size: var(--fs-lg);
  letter-spacing: 4px;
  color: var(--c-yellow);
  margin: 0.2rem 0 0.5rem;
}
.tp-wc-years {
  font-family: var(--font-vt);
  font-size: var(--fs-lg);
  color: var(--c-white);
  text-align: center;
  letter-spacing: 2px;
  margin-bottom: 0.4rem;
}

.v1-callouts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1.1rem;
}
@media (max-width: 500px) { .v1-callouts { grid-template-columns: 1fr; } }
.v1-callout {
  background: rgba(0,0,0,0.3);
  border: 2px solid var(--c-midblue);
  padding: 0.7rem;
}
.v1-callout.v1-high { border-left: 4px solid var(--c-green); }
.v1-callout.v1-low { border-left: 4px solid var(--c-orange); }
.v1-callout-tag {
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  letter-spacing: 1px;
  margin-bottom: 0.35rem;
}
.v1-callout.v1-high .v1-callout-tag { color: var(--c-green); }
.v1-callout.v1-low .v1-callout-tag { color: var(--c-orange); }
.v1-callout-text {
  font-family: var(--font-vt);
  font-size: var(--fs-lg);
  color: var(--c-gray1);
  line-height: 1.4;
}
.tp-everpresent-note {
  font-family: var(--font-vt);
  font-size: var(--fs-lg);
  color: var(--c-gray1);
  line-height: 1.4;
  margin-top: 1rem;
  padding: 7px 10px;
  border-left: 4px solid var(--c-yellow);
  background: rgba(0,0,0,0.3);
}

/* ════════════════════════════════════════════════════════════
   ARCADE CABINET FRAME (V3) — used by squad/stars/hi-score
   ════════════════════════════════════════════════════════════ */
.v3-cab {
  position: relative;
  background:
    linear-gradient(180deg, rgba(13,26,74,0.92), rgba(10,15,46,0.96));
  border: 3px solid var(--c-sky);
  box-shadow:
    0 0 0 1px var(--c-midblue),
    0 0 14px rgba(68,153,221,0.45),
    4px 4px 0 var(--c-navy);
  padding: 1.25rem;
}
.v3-cab.v3-cab-yellow {
  border-color: var(--c-yellow);
  box-shadow: 0 0 0 1px var(--c-gold), 0 0 14px rgba(245,200,0,0.40), 4px 4px 0 var(--c-navy);
}
.v3-cab.v3-cab-teal {
  border-color: var(--c-teal);
  box-shadow: 0 0 0 1px var(--c-midblue), 0 0 14px rgba(0,187,170,0.40), 4px 4px 0 var(--c-navy);
}

/* arcade section label (small marquee header on each cabinet) */
.v3-caplabel {
  font-family: var(--font-chrome);
  font-size: var(--fs-xs);
  color: var(--c-yellow);
  text-shadow: 2px 2px 0 var(--c-orange);
  letter-spacing: 1px;
  margin-bottom: 1rem;
  padding-bottom: 0.55rem;
  border-bottom: 2px solid var(--c-blue);
  display: flex;
  gap: 0.5ch;
  align-items: baseline;
}
.v3-caplabel .v3-blip { color: var(--c-teal); animation: v3-blink 0.8s step-end infinite; }
.v3-caplabel .v3-star-blink { color: var(--c-yellow); animation: v3-blink 0.6s step-end infinite; }

/* ════════════════════════════════════════════════════════════
   THE SQUAD (V3) — formation pitch + meta column
   ════════════════════════════════════════════════════════════ */
.v3-warn {
  font-family: var(--font-vt);
  font-size: var(--fs-lg);
  color: var(--c-orange);
  background: rgba(224,96,0,0.10);
  border: 1px dashed var(--c-orange);
  padding: 6px 10px;
  letter-spacing: 0.5px;
  line-height: 1.35;
  margin-bottom: 1rem;
}

.v3-pitch-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 1.1rem;
  align-items: start;
}
@media (max-width: 760px) { .v3-pitch-grid { grid-template-columns: 1fr; } }

.v3-pitch {
  position: relative;
  width: 100%;
  aspect-ratio: 68 / 100;
  background:
    repeating-linear-gradient(0deg,
      rgba(0,120,40,0.45) 0 9%,
      rgba(0,95,32,0.45) 9% 18%);
  border: 3px solid var(--c-white);
  box-shadow: inset 0 0 24px rgba(0,0,0,0.55), 0 0 14px rgba(0,170,68,0.4);
  overflow: hidden;
}
.v3-pitch .v3-line {
  position: absolute;
  border: 2px solid rgba(255,255,255,0.78);
}
.v3-pitch .v3-halfway { left: 0; right: 0; top: 50%; border-width: 2px 0 0 0; }
.v3-pitch .v3-circle {
  left: 50%; top: 50%;
  width: 30%; aspect-ratio: 1;
  transform: translate(-50%,-50%);
  border-radius: 50%;
}
.v3-pitch .v3-spot {
  position: absolute; left: 50%; top: 50%;
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(255,255,255,0.85);
  transform: translate(-50%,-50%);
}
.v3-pitch .v3-box-top    { top: 0;  left: 26%; right: 26%; height: 14%; border-width: 0 2px 2px 2px; }
.v3-pitch .v3-box-bottom { bottom: 0; left: 26%; right: 26%; height: 14%; border-width: 2px 2px 0 2px; }
.v3-pitch .v3-goal-top    { top: 0;  left: 40%; right: 40%; height: 4%;  border-width: 0 2px 2px 2px; }
.v3-pitch .v3-goal-bottom { bottom: 0; left: 40%; right: 40%; height: 4%; border-width: 2px 2px 0 2px; }

/* glowing player dots — green by default.
   Position comes from per-dot CSS custom properties --x / --y (set inline by
   the template from each player's pitch coordinates); no inline left/top. */
.v3-dot {
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 50%);
  width: 34px; height: 34px;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #19d96a, #009c3b 62%, #00622a);
  box-shadow: 0 0 10px rgba(0,170,68,0.85), inset 0 0 4px rgba(255,255,255,0.4);
  color: var(--c-white);
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  z-index: 2;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.v3-dot:hover,
.v3-dot:focus,
.v3-dot.is-active {
  transform: translate(-50%, -50%) scale(1.18);
  box-shadow: 0 0 16px rgba(0,187,170,0.95), 0 0 4px var(--c-white);
  outline: 2px solid var(--c-yellow);
  z-index: 3;
}
/* captain dot on the recent line-up pitch — gold, with a © badge */
.v3-dot.is-captain {
  background: radial-gradient(circle at 38% 32%, #ffe879, #f5c800 60%, #d4a00a);
  box-shadow: 0 0 12px rgba(245,200,0,0.9), inset 0 0 4px rgba(255,255,255,0.5);
  color: var(--c-navy);
}
.v3-dot.is-captain::after {
  content: 'C';
  font-weight: 700;
  position: absolute;
  top: -5px; right: -5px;
  width: 16px; height: 16px;
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  line-height: 16px;
  text-align: center;
  color: var(--c-navy);
  background: var(--c-yellow);
  border: 1px solid var(--c-navy);
  border-radius: 50%;
}
/* P1 SELECT readout */
.v3-readout {
  margin-top: 0.7rem;
  font-family: var(--font-chrome);
  font-size: var(--fs-xs);
  color: var(--c-teal);
  letter-spacing: 1px;
  background: rgba(0,0,0,0.5);
  border: 2px solid var(--c-teal);
  box-shadow: inset 0 0 8px rgba(0,187,170,0.35);
  padding: 9px 11px;
  text-align: center;
  min-height: 38px;
  line-height: 1.5;
}
.v3-readout .v3-ro-name { color: var(--c-yellow); }
.v3-readout .v3-ro-cur  { color: var(--c-white); animation: v3-blink 0.7s step-end infinite; }

/* formation meta column */
.v3-fmeta { display: grid; gap: 0.7rem; align-content: start; }
.v3-tag {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(0,0,0,0.4);
  border: 2px solid var(--c-midblue);
  border-left: 4px solid var(--c-teal);
  padding: 8px 11px;
}
.v3-tag .v3-tag-k {
  font-family: var(--font-chrome);
  font-size: var(--fs-xs);
  color: var(--c-sky);
  letter-spacing: 1px;
}
.v3-tag .v3-tag-v {
  font-family: var(--font-vt);
  font-size: var(--fs-lg);
  color: var(--c-white);
  letter-spacing: 1px;
  line-height: 1.35;
}
.v3-tag.v3-tag-cap { border-left-color: var(--c-yellow); }
.v3-tag.v3-tag-cap .v3-tag-v { color: var(--c-yellow); }
.v3-tag .v3-tag-note {
  font-family: var(--font-vt);
  font-size: var(--fs-lg);
  color: var(--c-gray2);
  line-height: 1.3;
  margin-top: 5px;
}
.v3-formpill {
  align-self: start;
  font-family: var(--font-chrome);
  font-size: var(--fs-lg);
  color: var(--c-navy);
  background: var(--c-teal);
  padding: 7px 12px;
  letter-spacing: 2px;
  box-shadow: 0 0 12px rgba(0,187,170,0.6);
}

.v3-board-cap {
  margin-top: 0.6rem;
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  color: var(--c-gray2);
  letter-spacing: 1px;
  text-align: center;
  line-height: 1.4;
}
.tp-board-cap-left { text-align: left; }

/* ════════════════════════════════════════════════════════════
   THE SQUAD — factual roster GROUPED BY POSITION (tp-)
   No starting XI / formation pitch here (history only, no prediction);
   the arcade pitch is reused below for the SUBJECTIVE all-time XI.
   ════════════════════════════════════════════════════════════ */
.tp-squad-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin-bottom: 0.7rem;
}
@media (max-width: 520px) { .tp-squad-meta { grid-template-columns: 1fr; } }
.tp-squad-line {
  font-family: var(--font-vt);
  font-size: var(--fs-lg);
  color: var(--c-gray1);
  line-height: 1.4;
  margin: 0.25rem 0;
}

.tp-roster {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1rem 0 0.4rem;
}
.tp-roster-group {
  background: rgba(0,0,0,0.32);
  border: 2px solid var(--c-midblue);
  border-top: 4px solid var(--c-teal);
  padding: 0.7rem 0.8rem 0.8rem;
}
.tp-roster-head {
  font-family: var(--font-chrome);
  font-size: var(--fs-xs);
  color: var(--c-teal);
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(0,187,170,0.6);
  margin-bottom: 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px dashed var(--c-midblue);
}
.tp-roster-list { display: grid; gap: 0.55rem; }
.tp-player {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: start;
  gap: 0.6rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dotted rgba(68,153,221,0.2);
}
.tp-player:last-child { border-bottom: none; padding-bottom: 0; }
.tp-player-num {
  font-family: var(--font-chrome);
  font-size: var(--fs-xs);
  color: var(--c-sky);
  text-align: center;
  padding-top: 2px;
}
.tp-player.is-captain .tp-player-num { color: var(--c-yellow); }
.tp-player-name {
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--c-white);
  letter-spacing: 0.5px;
  line-height: 1.3;
}
.tp-player.is-captain .tp-player-name { color: var(--c-yellow); }
.tp-player-name .tp-cap-c {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--c-navy);
  background: var(--c-yellow);
  border-radius: 50%;
  width: 16px; height: 16px;
  line-height: 16px;
  text-align: center;
  margin-left: 2px;
}
.tp-player-club {
  font-family: var(--font-vt);
  font-size: var(--fs-lg);
  color: var(--c-gray1);
  line-height: 1.2;
}
.tp-player-stats {
  font-family: var(--font-ui);
  font-size: var(--fs-md);
  color: var(--c-teal);
  letter-spacing: 0.5px;
  margin-top: 2px;
}
.tp-player-note {
  font-family: var(--font-vt);
  font-size: var(--fs-lg);
  color: var(--c-gray2);
  line-height: 1.3;
  margin-top: 2px;
}

/* mini-headings for the in-squad callouts (replacements / player to watch) */
.tp-mini-head {
  font-family: var(--font-chrome);
  font-size: var(--fs-xs);
  color: var(--c-yellow);
  text-shadow: 1px 1px 0 var(--c-orange);
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}
.tp-replacements {
  margin-top: 1rem;
  background: rgba(0,0,0,0.3);
  border: 2px solid var(--c-midblue);
  border-left: 4px solid var(--c-sky);
  padding: 0.7rem 0.8rem;
}
.tp-repl-row {
  font-family: var(--font-vt);
  font-size: var(--fs-lg);
  color: var(--c-gray1);
  line-height: 1.4;
  padding: 2px 0;
}
.tp-repl-row .tp-repl-swap { color: var(--c-yellow); }

.tp-watch-highlight {
  margin-top: 1rem;
  background: linear-gradient(180deg, rgba(224,96,0,0.16), rgba(0,0,0,0.4));
  border: 2px solid var(--c-orange);
  box-shadow: 0 0 12px rgba(224,96,0,0.35);
  padding: 0.7rem 0.8rem;
}
.tp-watch-highlight .tp-mini-head { color: var(--c-orange); text-shadow: 1px 1px 0 var(--c-navy); }
.tp-watch-name {
  font-family: var(--font-ui);
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--c-orange);
  letter-spacing: 1px;
}
.tp-watch-name .tp-watch-meta {
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  color: var(--c-gray2);
  letter-spacing: 1px;
}
.tp-watch-blurb {
  font-family: var(--font-vt);
  font-size: var(--fs-lg);
  color: var(--c-gray1);
  line-height: 1.4;
  margin-top: 0.4rem;
}

.tp-sourcenote {
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  color: var(--c-gray2);
  letter-spacing: 0.5px;
  line-height: 1.4;
  margin-top: 1rem;
  font-style: italic;
}

/* ── ALL-TIME XI: meta-column legend list (tp-) ── */
.tp-xi-list { display: grid; gap: 0.2rem; }
.tp-xi-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: baseline;
  gap: 0.5rem;
  padding: 3px 0;
  border-bottom: 1px dotted rgba(68,153,221,0.2);
}
.tp-xi-row:last-child { border-bottom: none; }
.tp-xi-num {
  font-family: var(--font-chrome);
  font-size: var(--fs-xs);
  color: var(--c-yellow);
  text-align: center;
}
.tp-xi-name {
  font-family: var(--font-vt);
  font-size: var(--fs-lg);
  color: var(--c-white);
  letter-spacing: 0.5px;
}
.tp-xi-pos {
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  color: var(--c-teal);
  letter-spacing: 1px;
}
/* captain "C" armband badge in the XI list */
.tp-xi-cap {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--c-navy);
  background: var(--c-yellow);
  border-radius: 50%;
  width: 16px; height: 16px;
  line-height: 16px;
  text-align: center;
}

/* dimmed shirt number next to a Hall-of-Fame legend's name */
.tp-shirt-dim { color: var(--c-gray3); }

/* ════════════════════════════════════════════════════════════
   STAR PLAYERS (V3) — STAR / LEGEND / WATCH cards
   ════════════════════════════════════════════════════════════ */
.v3-stars {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.8rem;
}
@media (max-width: 900px) { .v3-stars { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .v3-stars { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 340px) { .v3-stars { grid-template-columns: 1fr; } }

.v3-star {
  position: relative;
  text-align: center;
  background: linear-gradient(180deg, rgba(34,85,187,0.25), rgba(0,0,0,0.45));
  border: 2px solid var(--c-sky);
  box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
  padding: 2rem 0.5rem 0.8rem;
}
.v3-star .v3-star-shirt {
  font-family: var(--font-chrome);
  font-size: var(--fs-lg);
  color: var(--c-yellow);
  text-shadow: 2px 2px 0 var(--c-orange);
  line-height: 1;
}
.v3-star .v3-star-name {
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--c-white);
  letter-spacing: 1px;
  margin: 0.45rem 0 0.2rem;
  word-break: break-word;
}
.v3-star .v3-star-pos {
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  color: var(--c-teal);
  letter-spacing: 1px;
  line-height: 1.4;
}
.v3-star .v3-star-tag {
  position: absolute;
  top: -1px; left: -1px;
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  letter-spacing: 1px;
  padding: 2px 6px;
  background: var(--c-teal);
  color: var(--c-navy);
}

/* LEGEND card (Neymar) — gold treatment */
.v3-star.v3-star-legend {
  border-color: var(--c-yellow);
  box-shadow: inset 0 0 10px rgba(0,0,0,0.5), 0 0 12px rgba(245,200,0,0.4);
}
.v3-star.v3-star-legend .v3-star-tag { background: var(--c-yellow); }
.v3-star.v3-star-legend .v3-star-pos { color: var(--c-yellow); }

/* WATCH card — "★ ONE TO WATCH": a distinct orange accent so the data-driven
   young revelation pops differently from STAR (teal) and LEGEND (gold). */
.v3-star.v3-star-watch {
  border-color: var(--c-orange);
  box-shadow: inset 0 0 10px rgba(0,0,0,0.5), 0 0 14px rgba(224,96,0,0.5);
  background: linear-gradient(180deg, rgba(224,96,0,0.22), rgba(0,0,0,0.5));
}
.v3-star.v3-star-watch .v3-star-tag {
  background: var(--c-orange);
  color: var(--c-white);
  animation: v3-blink 0.9s step-end infinite;
}
.v3-star.v3-star-watch .v3-star-shirt { color: var(--c-orange); text-shadow: 2px 2px 0 var(--c-navy); }
.v3-star.v3-star-watch .v3-star-pos { color: var(--c-orange); }
.tp-watch-spark {
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  color: var(--c-orange);
  letter-spacing: 1px;
  margin-bottom: 0.2rem;
  animation: v3-blink 1.2s step-end infinite;
}

/* ════════════════════════════════════════════════════════════
   HI-SCORE — ALL-TIME RECORDS (V3) — two LED leaderboards
   ════════════════════════════════════════════════════════════ */
.v3-boards { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 640px) { .v3-boards { grid-template-columns: 1fr; } }

.v3-board {
  background: #02060f;
  border: 2px solid var(--c-teal);
  box-shadow: inset 0 0 14px rgba(0,0,0,0.85), 0 0 10px rgba(0,187,170,0.35);
  padding: 0.85rem 0.9rem;
}
.v3-board-head {
  font-family: var(--font-chrome);
  font-size: var(--fs-xs);
  color: var(--c-teal);
  letter-spacing: 1px;
  text-align: center;
  margin-bottom: 0.7rem;
  text-shadow: 0 0 8px rgba(0,187,170,0.7);
}
.v3-hi {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: baseline;
  gap: 0.5rem;
  padding: 5px 0;
  border-bottom: 1px dotted rgba(0,187,170,0.25);
}
.v3-hi:last-child { border-bottom: 0; }
.v3-hi .v3-rank {
  font-family: var(--font-vt);
  font-size: var(--fs-lg);
  color: var(--c-gray2);
  text-align: right;
}
.v3-hi .v3-who {
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  color: var(--c-white);
  letter-spacing: 1px;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.v3-hi .v3-led {
  font-family: var(--font-vt);
  font-size: var(--fs-lg);
  color: var(--c-yellow);
  text-align: right;
  letter-spacing: 2px;
  text-shadow: 0 0 8px rgba(245,200,0,0.6);
  font-variant-numeric: tabular-nums;
}
.v3-hi.v3-hi-top .v3-rank { color: var(--c-yellow); }
.v3-hi.v3-hi-top .v3-who  { color: var(--c-yellow); }

/* ════════════════════════════════════════════════════════════
   HALL OF FAME (V1) — legends table (reuses .pixel-table)
   ════════════════════════════════════════════════════════════ */
.v1-pos-pill {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  color: var(--c-navy);
  background: var(--c-sky);
  padding: 1px 6px;
  letter-spacing: 1px;
  min-width: 30px;
  text-align: center;
}
.v1-legend-name { color: var(--c-yellow) !important; }
.v1-legend-blurb {
  font-family: var(--font-vt);
  font-size: var(--fs-lg);   /* VT323 >=20px legibility floor */
  color: var(--c-gray2);
  line-height: 1.35;
}
.v1-hof-table td:first-child { white-space: nowrap; }
/* the legends table carries six columns + a blurb — let it scroll on narrow screens */
.tp-table-scroll { overflow-x: auto; }
.tp-table-scroll .pixel-table { min-width: 600px; }

/* ════════════════════════════════════════════════════════════
   THE ALMANAC SPEAKS (V1 verdict + V3 octopus + tidbits)
   ════════════════════════════════════════════════════════════ */
.v3-verdict {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: start;
}
@media (max-width: 420px) { .v3-verdict { grid-template-columns: 1fr; } }
.v3-verdict .v3-octo {
  font-size: var(--fs-mega);
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(0,187,170,0.7));
}
.v3-verdict .v3-who-said {
  font-family: var(--font-chrome);
  font-size: var(--fs-xs);
  color: var(--c-teal);
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}
.v3-verdict .v3-verdict-text {
  font-family: var(--font-vt);
  font-size: var(--fs-lg);
  color: var(--c-white);
  line-height: 1.4;
}
.v3-tidbits {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.5rem;
  list-style: none;
}
.v3-tidbits li {
  font-family: var(--font-vt);
  font-size: var(--fs-lg);
  line-height: 1.35;
  color: var(--c-gray1);
  padding-left: 1.6rem;
  position: relative;
}
.v3-tidbits li::before {
  content: '\25BA';   /* ► */
  position: absolute;
  left: 0;
  color: var(--c-teal);
}

/* ════════════════════════════════════════════════════════════
   FILE TIMELINE (V1) — horizontal archival ledger
   ════════════════════════════════════════════════════════════ */
.v1-timeline {
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  border-top: 2px solid var(--c-midblue);
  border-bottom: 2px solid var(--c-midblue);
}
.v1-tl-entry {
  flex: 0 0 200px;
  position: relative;
  padding: 1.4rem 0.8rem 0.8rem;
  border-right: 1px dashed var(--c-midblue);
}
.v1-tl-entry:last-child { border-right: none; }
.v1-tl-entry::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 0.8rem;
  width: 12px;
  height: 12px;
  background: var(--c-yellow);
  border: 2px solid var(--c-gold);
  box-shadow: 2px 2px 0 var(--c-navy);
}
.v1-tl-year {
  font-family: var(--font-chrome);
  font-size: var(--fs-xs);
  color: var(--c-yellow);
  text-shadow: 1px 1px 0 var(--c-orange);
  letter-spacing: 1px;
  margin-bottom: 0.4rem;
}
.v1-tl-text {
  font-family: var(--font-vt);
  font-size: var(--fs-lg);   /* VT323 >=20px legibility floor */
  color: var(--c-gray1);
  line-height: 1.4;
}
.v1-tl-hint {
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  color: var(--c-gray2);
  text-align: center;
  margin-top: 0.6rem;
  letter-spacing: 1px;
}

/* ════════════════════════════════════════════════════════════
   BLINK KEYFRAME (shared by the v3 cabinet flourishes)
   ════════════════════════════════════════════════════════════ */
@keyframes v3-blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

/* ════════════════════════════════════════════════════════════
   REDUCED MOTION — kill the flashing for accessibility
   ════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .v3-blip, .v3-star-blink, .v3-readout .v3-ro-cur,
  .v3-star.v3-star-watch .v3-star-tag, .tp-watch-spark {
    animation: none !important;
  }
  .v3-dot, .bar-fill { transition: none !important; }
}

/* ════════════════════════════════════════════════════════════
   CROSS-LINK ROWS — internal links to matches + player files
   (new rules only; reuse the .tp-xi-row grid for layout)
   ════════════════════════════════════════════════════════════ */
.tp-linkrow {
  text-decoration: none;
  color: inherit;
  transition: background 0.1s;
}
.tp-linkrow:hover { background: rgba(245,200,0,0.10); }
.tp-linkrow:hover .tp-xi-name { color: var(--c-yellow); }
.tp-linkrow .tp-xi-name { transition: color 0.1s; }
/* two-column variant (player files: name + code, no shirt number column) */
.tp-linkrow-2col { grid-template-columns: 1fr auto; }

/* ════════════════════════════════════════════════════════════
   SMALL-SCREEN TIGHTENING
   ════════════════════════════════════════════════════════════ */
@media (max-width: 500px) {
  .v1-header-flag svg { width: 104px; height: 70px; }
}
