/* MIB Football — night broadcast scoreboard.
   Brand: deep navy dark + one neon green comet (from the logo).
   Green is spent on exactly three things: live play, the active place
   in navigation, and the comet motif. Everything else stays quiet. */

@font-face {
  font-family: "Barlow Condensed";
  src: url("fonts/barlow-condensed-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("fonts/barlow-condensed-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-800.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

:root {
  --bg: #05090f;
  --bg-raise: #0a1017;
  --card: #0d1520;
  --card-2: #121c2a;
  --line: #1a2432;
  --line-soft: #141d29;
  --ink: #e7edf5;
  --muted: #8a95a4;
  --faint: #55606e;
  --green: #2ef06a;
  --green-ink: #56f388;
  --green-dim: rgba(46, 240, 106, 0.10);
  --loss: #e0635b;
  --loss-dim: rgba(224, 99, 91, 0.12);
  --cond: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --ui: "Inter", system-ui, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font: 14.5px/1.5 var(--ui);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--green); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 3px; }

img { max-width: 100%; }

/* ---------------- header */

.top { border-bottom: 1px solid var(--line-soft); background: var(--bg); }
.top-in {
  max-width: 860px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.lockup { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.lockup-mark { width: 46px; height: 29px; }
.lockup-text {
  font-family: var(--cond);
  font-weight: 700;
  font-size: 23px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1;
}
.lockup-text em { font-style: normal; color: var(--muted); margin-left: 6px; font-weight: 600; }
.lockup:hover .lockup-text em { color: var(--green-ink); }

.nav { display: flex; gap: 20px; }
.nav-link {
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.nav-link:hover { color: var(--ink); }
.nav-link.is-here { color: var(--ink); border-bottom-color: var(--green); }

/* ---------------- the LED board (signature) */

.board {
  max-width: 860px;
  margin: 22px auto 0;
  padding: 16px 20px 6px 26px;
  position: relative;
}
.board::before {
  /* comet trail from the logo: three staggered green pills */
  content: "";
  position: absolute;
  left: 20px;
  top: 24px;
  bottom: 18px;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(
    to bottom,
    var(--green) 0 28%, transparent 28% 36%,
    var(--green) 36% 58%, transparent 58% 66%,
    var(--green) 66% 100%);
}
.board-label {
  font-family: var(--cond);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green-ink);
  padding-left: 14px;
}
.board .match {
  grid-template-columns: 64px 1fr 26px 92px 26px 1fr;
  padding: 13px 14px;
  margin: 6px 0 0;
  border: 0;
  background: var(--card);
  border-radius: 10px;
  font-size: 16px;
}
.board .match:hover { background: var(--card-2); }
.board .m-score {
  font-family: var(--cond);
  font-size: 26px;
  font-weight: 700;
  padding: 0;
}
.board .m-when { font-size: 13px; }
.board .crest, .board .crest-empty { width: 24px; height: 24px; }

/* ---------------- competition filter + switch */

.comps {
  max-width: 860px;
  margin: 26px auto 0;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 18px;
}
.comp-link, .switch-link {
  appearance: none;
  background: none;
  border: 0;
  padding: 4px 0;
  font: inherit;
  font-size: 12.5px;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 1px solid transparent;
  text-decoration: none;
}
.comp-link:hover, .switch-link:hover { color: var(--ink); }
.comp-link.is-active, .switch-link.is-active {
  color: var(--ink);
  border-bottom-color: var(--green);
}

.switch {
  max-width: 860px;
  margin: 16px auto 0;
  padding: 12px 20px 0;
  display: flex;
  align-items: baseline;
  gap: 22px;
  border-top: 1px solid var(--line-soft);
}
.switch-link { font-size: 15px; font-weight: 600; }
a.switch-link { padding-bottom: 4px; }
.switch-year { font-weight: 400; color: var(--faint); }
.switch-year:hover { color: var(--ink); }
.switch-year.is-active { color: var(--ink); font-weight: 600; border-bottom-color: var(--green); }
.switch-year-first { margin-left: 6px; padding-left: 24px; border-left: 1px solid var(--line); }

/* ---------------- day + competition groups */

main, .page { max-width: 860px; margin: 0 auto; padding: 6px 20px 48px; }
.page { padding-top: 26px; }

.page-title {
  font-family: var(--cond);
  font-weight: 700;
  font-size: 34px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.page-sub { margin-top: 6px; color: var(--muted); font-size: 13px; }

.day { margin-top: 30px; }
.day-label {
  font-family: var(--cond);
  font-weight: 600;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.day-label .day-rel { color: var(--green-ink); }

.comp-group { margin-top: 14px; }
.comp-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 3px;
}

/* ---------------- match rows */

.match {
  display: grid;
  grid-template-columns: 56px 1fr 21px 76px 21px 1fr;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  margin: 0 -10px;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 8px;
}
.comp-group .match:last-child { border-bottom: 0; }
a.match { text-decoration: none; color: inherit; }
a.match:hover { background: var(--card); }

.m-when {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.m-when.is-ft { color: var(--faint); letter-spacing: 0.06em; }
.m-when.is-off { color: var(--faint); font-style: italic; }
.m-when.is-live { color: var(--green); font-weight: 650; letter-spacing: 0.04em; }

.m-live-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(46, 240, 106, 0.8);
  margin-right: 5px;
  vertical-align: 1px;
}
@media (prefers-reduced-motion: no-preference) {
  .m-live-dot { animation: pulse 1.8s ease-in-out infinite; }
  @keyframes pulse { 50% { opacity: 0.3; } }
}

.m-team { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-home { text-align: right; }
.m-away { text-align: left; }

.crest { width: 20px; height: 20px; object-fit: contain; justify-self: center; }
.crest-empty { display: inline-block; width: 20px; height: 20px; border-radius: 50%; background: var(--line); }

.m-score {
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  border-radius: 6px;
  padding: 2px 0;
}
.match[data-status="IN_PLAY"] .m-score,
.match[data-status="PAUSED"] .m-score,
.match.is-live-now .m-score { background: var(--green-dim); color: var(--green-ink); }
.match[data-status="TIMED"] .m-score,
.match[data-status="SCHEDULED"] .m-score { color: var(--faint); font-weight: 400; }

.empty { margin-top: 34px; color: var(--muted); }
.tz-note { margin-top: 34px; color: var(--faint); font-size: 12px; }

/* ---------------- match page */

.match-main { max-width: 860px; margin: 0 auto; padding: 8px 20px 44px; }

.hero-date {
  margin-top: 24px;
  font-family: var(--cond);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.hero {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  margin-top: 14px;
  padding: 30px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  /* faint comet sweep across the panel */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px 140px at 12% 50%, rgba(46, 240, 106, 0.07), transparent 70%);
  pointer-events: none;
}
.hero-team { text-align: center; min-width: 0; position: relative; }
.crest-big { width: 56px; height: 56px; object-fit: contain; }
.hero-name { margin-top: 9px; font-weight: 600; font-size: 15px; }
.hero-mid { text-align: center; min-width: 128px; position: relative; }
.hero-score {
  font-family: var(--cond);
  font-size: 52px;
  font-weight: 700;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  line-height: 1;
}
.hero-score.is-live-score { color: var(--green); text-shadow: 0 0 22px rgba(46, 240, 106, 0.35); }
.hero-ko { color: var(--ink); }
.hero-when { margin-top: 7px; font-size: 12px; color: var(--muted); }
.hero-when.is-live { color: var(--green); font-weight: 650; letter-spacing: 0.04em; }
.hero-when.is-ft { letter-spacing: 0.06em; }
.hero-when.is-off { font-style: italic; color: var(--faint); }
.hero-venue { margin-top: 12px; text-align: center; font-size: 12.5px; color: var(--muted); }

.m-section { margin-top: 34px; }
.m-section h2 {
  font-family: var(--cond);
  font-weight: 600;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 10px;
}

.timeline { list-style: none; }
.ev {
  display: flex;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px;
}
.ev:last-child { border-bottom: 0; }
.ev-min {
  flex: 0 0 40px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  padding-top: 1px;
}
.ev-goal .ev-min { color: var(--green-ink); font-weight: 650; }
.ev-goal .ev-text { font-weight: 550; }
.ev-card .ev-text { color: var(--muted); }

.st {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}
.st:last-child { border-bottom: 0; }
.st-h { text-align: right; font-weight: 650; }
.st-a { text-align: left; font-weight: 650; }
.st-label { color: var(--muted); font-size: 12.5px; text-align: center; }

/* ---------------- tables (mini + full) */

.table-scroll { overflow-x: auto; }
.minitable {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}
.minitable th {
  font-size: 11px;
  font-weight: 500;
  color: var(--faint);
  text-align: center;
  padding: 4px 7px;
}
.minitable th.th-team { text-align: left; }
.minitable td { padding: 8px 7px; text-align: center; border-top: 1px solid var(--line-soft); }
.minitable .mt-pos { color: var(--faint); width: 30px; }
.minitable .mt-team { text-align: left; font-weight: 600; white-space: nowrap; }
.minitable .mt-team .crest { display: inline-block; vertical-align: -5px; margin-right: 8px; width: 19px; height: 19px; }
.minitable .mt-player { font-weight: 600; }
.minitable .mt-club { font-weight: 400; color: var(--muted); }
.minitable .mt-dim { color: var(--muted); }
.minitable .mt-pts { font-weight: 700; font-family: var(--cond); font-size: 15.5px; }
.minitable tr.is-home td, .minitable tr.is-away td { background: var(--card); }
.fulltable tbody tr:hover td { background: var(--card); }

/* ---------------- h2h + form */

.h2h-agg { font-size: 13.5px; color: var(--muted); margin-bottom: 10px; }
.h2h { list-style: none; }
.h2h li {
  display: flex;
  gap: 14px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px;
}
.h2h li:last-child { border-bottom: 0; }
.h2h-date { flex: 0 0 92px; color: var(--faint); font-size: 12.5px; padding-top: 1px; }
.h2h-line b { font-variant-numeric: tabular-nums; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.form-col h3 { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.form-col ul { list-style: none; }
.form-col li {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 5px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
}
.form-col li:last-child { border-bottom: 0; }
.fb {
  flex: 0 0 18px;
  height: 18px;
  border-radius: 4px;
  text-align: center;
  line-height: 18px;
  font-size: 10.5px;
  font-weight: 700;
  align-self: center;
}
.fb-w { background: var(--green-dim); color: var(--green-ink); }
.fb-d { background: var(--line); color: var(--muted); }
.fb-l { background: var(--loss-dim); color: var(--loss); }
.fb-line { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fb-date { margin-left: auto; color: var(--faint); font-size: 11.5px; white-space: nowrap; }

.backlink { margin-top: 38px; font-size: 13.5px; }

/* ---------------- footer */

.foot {
  margin-top: 30px;
  border-top: 1px solid var(--line-soft);
  background: var(--bg-raise);
}
.foot-in {
  max-width: 860px;
  margin: 0 auto;
  padding: 26px 20px 34px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px 28px;
  align-items: start;
}
.foot-brand { display: flex; gap: 13px; align-items: center; }
.foot-mark { width: 44px; height: 28px; flex: 0 0 auto; }
.foot-name {
  font-family: var(--cond);
  font-weight: 700;
  font-size: 17px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.foot-line { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.foot-meta { grid-column: 1; color: var(--muted); font-size: 12.5px; }
.foot-meta p + p { margin-top: 4px; }
.foot-sponge {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  text-decoration: none;
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.foot-sponge img { height: 16px; width: auto; opacity: 0.85; }
.foot-sponge:hover { color: var(--muted); }
.foot-sponge:hover img { opacity: 1; }

/* ---------------- small screens */

@media (max-width: 620px) {
  .top-in { flex-direction: column; align-items: flex-start; gap: 10px; padding-bottom: 10px; }
  .nav { gap: 16px; }
  .board { padding-left: 22px; }
  .board::before { left: 16px; }
  .board .match { grid-template-columns: 50px 1fr 20px 66px 20px 1fr; font-size: 14px; }
  .board .m-score { font-size: 21px; }
  .match { grid-template-columns: 46px 1fr 18px 58px 18px 1fr; gap: 6px; font-size: 13.5px; }
  .crest, .crest-empty { width: 17px; height: 17px; }
  .m-score { font-size: 14px; }
  .comps { gap: 0 14px; }
  .page-title { font-size: 27px; }
  .hero { gap: 10px; padding: 22px 8px; }
  .crest-big { width: 40px; height: 40px; }
  .hero-name { font-size: 13px; }
  .hero-score { font-size: 36px; }
  .hero-mid { min-width: 92px; }
  .h2h-date { flex-basis: 78px; }
  .form-grid { grid-template-columns: 1fr; gap: 14px; }
  .foot-in { grid-template-columns: 1fr; }
  .foot-sponge { grid-column: 1; grid-row: auto; align-items: flex-start; }
}
