/* Copy of /styleguide/football.css (that folder is not in git). Update both together. */
/* FOOTBALL · dark electric-blue UI kit. Visual values inferred from a mockup, not a brand specification.
   Reuse --fb-* tokens and fb-* components inside a .fb-theme container.
   fbg-* classes belong only to the documentation page (football.html).
   Font: Onest (Google Fonts) — link it in the page head:
   <link href="https://fonts.googleapis.com/css2?family=Onest:wght@400;500;600;700&display=swap" rel="stylesheet"> */

:root {
  --fb-font: 'Onest', 'Segoe UI', Roboto, Arial, sans-serif;

  --fb-canvas: #0b0e13;
  --fb-surface-1: #12161d;
  --fb-surface-2: #1a1f28;
  --fb-surface-3: #232934;
  --fb-line: #ffffff14;
  --fb-line-strong: #ffffff29;
  --fb-ink: #ffffff;
  --fb-ink-soft: #c9d2e3;
  --fb-muted: #8b93a1;

  --fb-accent: #0f47f2;
  --fb-accent-hover: #2e62ff;
  --fb-accent-pressed: #0a36c2;
  --fb-accent-soft: #0f47f233;
  --fb-glow: #1d5cff;
  --fb-live: #f5a700;
  --fb-live-ink: #1a1200;

  --fb-win: #1fb36b;
  --fb-draw: #6b7483;
  --fb-loss: #e5484d;
  --fb-team-blue: #3d7bff;
  --fb-team-red: #ff4d5e;

  --fb-space-1: 4px;
  --fb-space-2: 8px;
  --fb-space-3: 12px;
  --fb-space-4: 16px;
  --fb-space-5: 24px;
  --fb-space-6: 32px;
  --fb-space-7: 48px;

  --fb-radius-sm: 12px;
  --fb-radius-md: 20px;
  --fb-radius-lg: 28px;
  --fb-radius-pill: 999px;

  --fb-shadow-card: 0 12px 32px #00000059;
  --fb-shadow-glow: 0 8px 28px #0f47f273;
  --fb-card-glow: radial-gradient(120% 80% at 50% 0, #12308a73 0, transparent 62%);
  --fb-page-gradient: linear-gradient(160deg, #0a3a8f 0, #0b0e13 32%, #0b0e13 68%, #0a1a5c 100%);
}

/* ---------- base ---------- */
.fb-theme {
  background: var(--fb-canvas);
  color: var(--fb-ink);
  font-family: var(--fb-font);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
.fb-theme *,
.fb-theme *::before,
.fb-theme *::after { box-sizing: border-box; }
.fb-theme :focus-visible { outline: 2px solid var(--fb-glow); outline-offset: 2px; }

.fb-icon {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- buttons ---------- */
.fb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--fb-space-2);
  min-height: 48px;
  padding: 0 28px;
  border: 0;
  border-radius: var(--fb-radius-pill);
  corner-shape: squircle;
  background: var(--fb-accent);
  box-shadow: var(--fb-shadow-glow);
  color: #fff;
  font: 500 16px/1 var(--fb-font);
  text-decoration: none;
  cursor: pointer;
  transition: background .15s;
}
.fb-btn:hover { background: var(--fb-accent-hover); }
.fb-btn:active { background: var(--fb-accent-pressed); }
.fb-btn--lg { min-height: 64px; padding: 0 44px; font-size: 22px; }
.fb-btn--ghost {
  background: var(--fb-surface-2);
  border: 1px solid var(--fb-line);
  box-shadow: none;
}
.fb-btn--ghost:hover { background: var(--fb-surface-3); }
.fb-btn--ghost:active { background: var(--fb-surface-1); }
.fb-btn:disabled { opacity: .4; cursor: default; box-shadow: none; }

.fb-iconbtn {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: none;
  padding: 0;
  border: 1px solid var(--fb-line);
  border-radius: 50%;
  background: var(--fb-surface-2);
  color: var(--fb-ink);
  cursor: pointer;
  transition: background .15s;
}
.fb-iconbtn:hover { background: var(--fb-surface-3); }

/* ---------- chips ---------- */
.fb-chips {
  display: flex;
  gap: var(--fb-space-2);
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px;
  margin: -2px;
}
.fb-chips::-webkit-scrollbar { display: none; }
.fb-chip {
  flex: none;
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--fb-radius-pill);
  corner-shape: squircle;
  background: var(--fb-surface-2);
  color: var(--fb-ink);
  font: 500 15px/1 var(--fb-font);
  cursor: pointer;
  transition: background .15s;
}
.fb-chip:hover { background: var(--fb-surface-3); }
.fb-chip.is-active { background: var(--fb-accent); }

/* ---------- search ---------- */
.fb-search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 4px 0 16px;
  border: 1px solid var(--fb-line);
  border-radius: var(--fb-radius-pill);
  corner-shape: squircle;
  background: var(--fb-surface-1);
  color: var(--fb-ink);
}
.fb-search:focus-within { border-color: var(--fb-glow); }
.fb-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  color: inherit;
  font: 400 16px/1 var(--fb-font);
  outline: none;
}
.fb-search input::placeholder { color: var(--fb-muted); }
.fb-search .fb-iconbtn { width: 46px; height: 46px; }

/* ---------- badges ---------- */
.fb-live {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  border-radius: var(--fb-radius-pill);
  corner-shape: squircle;
  background: var(--fb-live);
  color: var(--fb-live-ink);
  font: 700 12px/1 var(--fb-font);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.fb-datepill {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 22px;
  border-radius: var(--fb-radius-pill);
  corner-shape: squircle;
  background: var(--fb-accent);
  box-shadow: var(--fb-shadow-glow);
  color: #fff;
  font: 500 14px/1 var(--fb-font);
  white-space: nowrap;
}
.fb-rating {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 20px;
  padding: 0 6px;
  border: 1px solid var(--fb-line-strong);
  border-radius: var(--fb-radius-pill);
  corner-shape: squircle;
  background: var(--fb-surface-3);
  color: var(--fb-ink);
  font: 600 11px/1 var(--fb-font);
  font-variant-numeric: tabular-nums;
}
.fb-rating--top { background: var(--fb-accent); border-color: transparent; }
.fb-rating--low { color: var(--fb-muted); }

/* ---------- avatar ---------- */
.fb-avatar {
  --fb-avatar: 44px;
  position: relative;
  display: inline-grid;
  place-items: center;
  width: var(--fb-avatar);
  height: var(--fb-avatar);
  flex: none;
  border: 1px solid var(--fb-line-strong);
  border-radius: 50%;
  background: linear-gradient(160deg, #2a3550, #151a24);
  color: var(--fb-ink-soft);
  font: 600 calc(var(--fb-avatar) * .36)/1 var(--fb-font);
}
.fb-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.fb-avatar--sm { --fb-avatar: 32px; }
.fb-avatar--lg { --fb-avatar: 64px; }
.fb-avatar--blue { border-color: var(--fb-team-blue); }
.fb-avatar--red { border-color: var(--fb-team-red); }
.fb-avatar .fb-rating { position: absolute; top: -6px; left: calc(100% - 12px); }

/* ---------- header & divider ---------- */
.fb-header { display: flex; align-items: center; gap: 10px; }
.fb-header__title { flex: 1; min-width: 0; margin: 0; font: 500 28px/1.1 var(--fb-font); }
.fb-header--center .fb-header__title { font-weight: 600; font-size: 22px; text-align: center; }

.fb-horizon {
  height: 1px;
  margin: 0;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--fb-glow), transparent);
  box-shadow: 0 0 14px 1px #1d5cff80;
}

/* ---------- league rail ---------- */
.fb-rail { display: flex; gap: var(--fb-space-4); overflow-x: auto; scrollbar-width: none; }
.fb-rail::-webkit-scrollbar { display: none; }
.fb-league {
  display: grid;
  justify-items: center;
  gap: var(--fb-space-2);
  flex: none;
  width: 72px;
  color: var(--fb-ink);
  font-size: 14px;
  text-decoration: none;
}
.fb-league__icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 1px solid var(--fb-line-strong);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 0, var(--fb-league, var(--fb-glow)) -30%, #151a22 78%);
  font-weight: 700;
  font-size: 18px;
}

/* ---------- card ---------- */
.fb-card {
  position: relative;
  border: 1px solid var(--fb-line);
  border-radius: var(--fb-radius-lg);
  corner-shape: squircle;
  background: var(--fb-card-glow), var(--fb-surface-1);
  box-shadow: var(--fb-shadow-card);
}

/* ---------- match score card ---------- */
.fb-match {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: var(--fb-space-2);
  margin-top: 18px;
  padding: 36px 14px 18px;
  text-align: center;
  container-type: inline-size;
}
.fb-match__date { position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%); }
.fb-match__team { display: grid; justify-items: center; gap: 6px; min-width: 0; }
.fb-match__name { max-width: 100%; font-weight: 500; font-size: 16px; text-transform: uppercase; overflow-wrap: anywhere; }
.fb-match__side { color: var(--fb-muted); font-size: 14px; }
.fb-match__score {
  padding: 14px 26px;
  background: var(--fb-surface-3);
  clip-path: polygon(14% 0, 86% 0, 100% 50%, 86% 100%, 14% 100%, 0 50%);
  font: 700 44px/1 var(--fb-font);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.fb-match__score--time { font-size: 26px; padding: 18px 26px; }
.fb-match__status { grid-column: 1 / -1; justify-self: center; margin-top: 2px; color: var(--fb-muted); font-size: 13px; }
/* narrow columns: shrink the score plate so team names keep their room */
@container (max-width: 330px) {
  .fb-match__score { padding: 12px 16px; font-size: 32px; }
  .fb-match__score--time { padding: 14px 16px; font-size: 22px; }
  .fb-match__name { font-size: 14px; }
}

.fb-crest {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 2px solid var(--fb-team, var(--fb-ink));
  border-radius: 50%;
  background: #0c0f14;
  color: var(--fb-team, var(--fb-ink));
}
.fb-crest svg { width: 34px; height: 34px; fill: currentColor; }
.fb-crest--blue { --fb-team: var(--fb-team-blue); }
.fb-crest--red { --fb-team: var(--fb-team-red); }

/* ---------- player / follow card ---------- */
.fb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--fb-space-3); }
.fb-player {
  position: relative;
  display: block;
  width: 100%;
  padding: 4px 4px 0;
  border: 1px solid var(--fb-line);
  border-radius: var(--fb-radius-md);
  corner-shape: squircle;
  background: var(--fb-surface-2);
  color: var(--fb-ink);
  font-family: var(--fb-font);
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.fb-player__media {
  display: grid;
  place-items: end center;
  aspect-ratio: 1 / .92;
  border-radius: 16px;
  corner-shape: squircle;
  background: radial-gradient(90% 70% at 50% 0, #1d4bd6 0, transparent 72%), #141922;
  overflow: hidden;
}
.fb-player__media img { width: 100%; height: 100%; object-fit: cover; }
.fb-player__media svg { width: 72%; fill: #2b3654; }
.fb-player__name { display: block; padding: 12px 6px 14px; font-weight: 700; font-size: 17px; }
.fb-player__check {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--fb-glow);
  border-radius: 50%;
  background: #0b0e1399;
  color: #fff;
  opacity: 0;
  transition: opacity .15s;
}
.fb-player__check .fb-icon { width: 14px; height: 14px; stroke-width: 2.4; }
.fb-player.is-selected { border-color: var(--fb-glow); box-shadow: 0 0 0 1px var(--fb-glow), 0 8px 24px #0f47f24d; }
.fb-player.is-selected .fb-player__check { opacity: 1; background: var(--fb-accent); }

/* ---------- hero news card ---------- */
.fb-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--fb-space-2);
  min-height: 260px;
  padding: 20px;
  border-radius: var(--fb-radius-lg);
  corner-shape: squircle;
  background: radial-gradient(100% 90% at 70% 10%, #2456e6 0, #0d1f63 45%, #0a1030 100%);
  color: #fff;
  text-decoration: none;
  overflow: hidden;
}
.fb-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fb-hero::after { content: ''; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, #070b1ccc); }
.fb-hero__tag, .fb-hero__title { position: relative; z-index: 1; }
.fb-hero__tag { color: var(--fb-ink-soft); font-size: 14px; }
.fb-hero__title { max-width: 80%; margin: 0; font: 700 34px/1.05 var(--fb-font); }

/* ---------- lineup pitch ---------- */
.fb-pitch {
  position: relative;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--fb-line-strong);
  border-radius: var(--fb-radius-md);
  corner-shape: squircle;
  background:
    radial-gradient(80% 45% at 50% 0, #12308a66, transparent 70%),
    repeating-linear-gradient(180deg, #ffffff05 0 10%, transparent 10% 20%),
    #0d1118;
  overflow: hidden;
}
.fb-pitch::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; border-top: 1px solid var(--fb-line-strong); }
.fb-pitch::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 26%;
  aspect-ratio: 1;
  border: 1px solid var(--fb-line-strong);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.fb-pitch__box { position: absolute; left: 20%; right: 20%; height: 15%; border: 1px solid var(--fb-line-strong); }
.fb-pitch__box--top { top: -1px; }
.fb-pitch__box--bottom { bottom: -1px; }
.fb-pitch__player {
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 4px;
  transform: translate(-50%, -50%);
  color: var(--fb-muted);
  font-size: 11px;
  white-space: nowrap;
}
.fb-pitch__player .fb-avatar { --fb-avatar: 40px; }

/* ---------- bottom tab bar ---------- */
.fb-tabbar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  padding: 12px 8px 14px;
  border-top: 1px solid var(--fb-line);
  border-radius: 24px 24px 0 0;
  corner-shape: squircle;
  background: #10141bf2;
}
.fb-tab {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--fb-ink);
  font: 400 14px/1 var(--fb-font);
  text-decoration: none;
  cursor: pointer;
}
.fb-tab .fb-icon { width: 28px; height: 28px; color: var(--fb-ink-soft); }
.fb-tab.is-active .fb-icon { color: var(--fb-glow); fill: var(--fb-accent); }
.fb-tab__fab {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin-top: -40px;
  border: 4px solid var(--fb-canvas);
  border-radius: 50%;
  background: var(--fb-accent);
  box-shadow: var(--fb-shadow-glow);
}
.fb-tab__fab .fb-icon { color: #fff; fill: #fff; }

/* ---------- leaderboard ---------- */
.fb-board { margin: 0; padding: 6px 0; list-style: none; }
.fb-board__row {
  display: grid;
  grid-template-columns: 24px auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--fb-space-3);
  padding: 10px 16px;
  border-bottom: 1px solid var(--fb-line);
}
.fb-board__row:last-child { border-bottom: 0; }
.fb-board__rank { color: var(--fb-muted); font-weight: 600; font-variant-numeric: tabular-nums; text-align: center; }
.fb-board__row--top .fb-board__rank { color: var(--fb-glow); }
.fb-board__name { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-board__meta { display: block; color: var(--fb-muted); font-size: 13px; }
.fb-board__value { font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }

/* ---------- stat tile & form strip ---------- */
.fb-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--fb-space-3); }
.fb-stat { padding: 16px; border-radius: var(--fb-radius-md); corner-shape: squircle; }
.fb-stat__value { display: block; font: 700 32px/1.1 var(--fb-font); font-variant-numeric: tabular-nums; }
.fb-stat__label { display: block; margin-top: 4px; color: var(--fb-muted); font-size: 13px; }
.fb-stat__delta { display: inline-block; margin-top: 8px; font-weight: 600; font-size: 13px; }
.fb-stat__delta--up { color: var(--fb-win); }
.fb-stat__delta--down { color: var(--fb-loss); }

.fb-form { display: inline-flex; gap: 6px; }
.fb-form__dot {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--fb-draw);
  color: #fff;
  font: 700 11px/1 var(--fb-font);
}
.fb-form__dot--w { background: var(--fb-win); }
.fb-form__dot--l { background: var(--fb-loss); }

/* ---------- screen shell ---------- */
.fb-screen {
  display: flex;
  flex-direction: column;
  width: min(390px, 100%);
  border: 1px solid var(--fb-line);
  border-radius: 44px;
  corner-shape: squircle;
  background: var(--fb-canvas);
  box-shadow: 0 30px 80px #000000a6;
  overflow: hidden;
}
.fb-screen__body { display: grid; align-content: start; gap: var(--fb-space-4); flex: 1; padding: 24px 16px 16px; }
.fb-screen__body > * { min-width: 0; }
.fb-screen__float { position: relative; z-index: 2; justify-self: center; margin-top: -52px; }

/* ================= documentation page only ================= */
.fbg-page { margin: 0; min-height: 100vh; background: var(--fb-page-gradient) fixed, var(--fb-canvas); }
.fbg-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: var(--fb-space-4);
  padding: 12px max(16px, calc((100% - 1180px) / 2));
  border-bottom: 1px solid var(--fb-line);
  background: #0b0e13e6;
  backdrop-filter: blur(12px);
}
.fbg-nav__brand { flex: none; font-weight: 700; letter-spacing: .08em; }
.fbg-nav__links { display: flex; gap: var(--fb-space-4); overflow-x: auto; scrollbar-width: none; }
.fbg-nav__links a { flex: none; color: var(--fb-muted); font-size: 14px; text-decoration: none; }
.fbg-nav__links a:hover { color: var(--fb-ink); }
.fbg-main { max-width: 1212px; margin: 0 auto; padding: 0 16px 96px; }
.fbg-intro { padding: 56px 0 8px; }
.fbg-intro h1 { margin: 0 0 12px; font: 700 clamp(34px, 6vw, 56px)/1.05 var(--fb-font); text-wrap: balance; }
.fbg-intro p, .fbg-section > p, .fbg-item > p { max-width: 68ch; margin: 0; color: var(--fb-ink-soft); }
.fbg-section { padding-top: 56px; scroll-margin-top: 48px; }
.fbg-section > h2 { margin: 0 0 8px; font: 600 28px/1.15 var(--fb-font); }
.fbg-section > p { margin-bottom: 24px; }
.fbg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: var(--fb-space-5); align-items: start; }
.fbg-item { display: grid; gap: var(--fb-space-3); min-width: 0; }
.fbg-item > h3 { margin: 0; font: 600 18px/1.2 var(--fb-font); }
.fbg-item > p { font-size: 14px; color: var(--fb-muted); }
.fbg-demo {
  min-width: 0;
  padding: 20px 16px;
  border: 1px solid var(--fb-line);
  border-radius: var(--fb-radius-md);
  corner-shape: squircle;
  background: var(--fb-canvas);
}
.fbg-demo--row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--fb-space-4); }
.fbg-demo--flush { padding: 0; overflow: hidden; }
.fbg-code { min-width: 0; font-size: 13px; }
.fbg-code summary { width: fit-content; color: var(--fb-muted); cursor: pointer; }
.fbg-code pre {
  max-height: 320px;
  margin: 8px 0 0;
  padding: 12px;
  border: 1px solid var(--fb-line);
  border-radius: var(--fb-radius-sm);
  corner-shape: squircle;
  background: #07090d;
  color: var(--fb-ink-soft);
  font: 12px/1.5 Consolas, 'Cascadia Mono', monospace;
  overflow: auto;
}
.fbg-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--fb-space-3); }
.fbg-swatch { border: 1px solid var(--fb-line); border-radius: var(--fb-radius-sm); corner-shape: squircle; background: var(--fb-surface-1); overflow: hidden; font-size: 13px; }
.fbg-swatch__chip { height: 64px; background: var(--c); border-bottom: 1px solid var(--fb-line); }
.fbg-swatch__name, .fbg-swatch__value { display: block; padding: 0 10px; }
.fbg-swatch__name { padding-top: 8px; font-weight: 500; }
.fbg-swatch__value { padding-bottom: 8px; color: var(--fb-muted); font-family: Consolas, monospace; }
.fbg-type { display: grid; gap: var(--fb-space-3); }
.fbg-type__row { display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: baseline; gap: var(--fb-space-4); padding-bottom: 12px; border-bottom: 1px solid var(--fb-line); }
.fbg-type__meta { color: var(--fb-muted); font-size: 13px; }
.fbg-shapes { display: flex; flex-wrap: wrap; gap: var(--fb-space-4); }
.fbg-shape { display: grid; place-items: center; width: 132px; height: 96px; border: 1px solid var(--fb-line-strong); background: var(--fb-surface-2); color: var(--fb-ink-soft); font-size: 13px; text-align: center; }
.fbg-screens { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: var(--fb-space-6); }
@media (max-width: 520px) {
  .fbg-type__row { grid-template-columns: 1fr; gap: 4px; }
}
