/* ===========================================================================
   Town Team Baseball — V2 main stylesheet
   Component-driven, dark-first, mobile-friendly. No build step.
   ========================================================================= */

/* ---- Reset ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex; flex-direction: column;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }

/* ---- Layout primitives ------------------------------------------------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--s4); }
main { flex: 1 0 auto; }
.section { padding: var(--s7) 0; }
.section-tight { padding: var(--s6) 0; }
.section-alt { background: var(--bg-2); }
.stack > * + * { margin-top: var(--s4); }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s5); flex-wrap: wrap; }
.section-title {
  font-family: var(--font-sub); font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; font-size: 1.55rem; line-height: 1.1;
}
.section-title .accent { color: var(--accent); }
.section-link { font-family: var(--font-sub); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: .85rem; color: var(--accent); }
.section-link:hover { color: var(--text); }
.eyebrow { font-family: var(--font-sub); font-weight: 700; text-transform: uppercase; letter-spacing: .18em; font-size: .8rem; color: var(--accent); }

/* ---- Header / nav ------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14,17,22,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { height: var(--nav-h); display: flex; align-items: center; gap: var(--s5); }
.brand { display: flex; align-items: center; gap: var(--s2); font-family: var(--font-display); font-size: 1.15rem; letter-spacing: .02em; }
.brand img { height: 30px; width: auto; }
.brand .brand-txt { color: var(--text); }
.brand .brand-txt b { color: var(--accent); font-weight: inherit; }
.nav-links { display: flex; align-items: center; gap: var(--s1); margin-left: auto; }
.nav-links a {
  font-family: var(--font-sub); font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; font-size: .92rem; color: var(--muted);
  padding: var(--s2) var(--s3); border-radius: var(--r-sm);
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a.active { color: var(--accent); }
.nav-ig {
  margin-left: var(--s2); color: var(--bg) !important; background: var(--accent);
  font-weight: 700;
}
.nav-ig:hover { background: var(--accent-deep) !important; color: var(--bg) !important; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--text); border-radius: var(--r-sm); padding: 6px 10px; }

/* ---- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  font-family: var(--font-sub); font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; font-size: .95rem;
  padding: .7rem 1.3rem; border-radius: var(--r-pill); border: 1px solid transparent;
  transition: transform .08s ease, background .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { background: var(--accent-deep); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: .45rem .9rem; font-size: .82rem; }

/* ---- Hero -------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding: var(--s8) 0 var(--s7); }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(900px 400px at 80% -10%, var(--accent-glow), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
  z-index: -1;
}
.hero h1 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.6rem, 7vw, 5rem); line-height: .98; letter-spacing: .01em;
  text-transform: uppercase; max-width: 16ch;
}
.hero h1 .accent { color: var(--accent); }
.hero p.lede { color: var(--muted); font-size: clamp(1.05rem, 2.4vw, 1.3rem); max-width: 54ch; margin-top: var(--s4); }
.hero-cta { display: flex; gap: var(--s3); margin-top: var(--s5); flex-wrap: wrap; }

/* ---- Stat strip -------------------------------------------------------- */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s3); margin-top: var(--s7); }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: var(--s4); text-align: center;
}
.stat .num { font-family: var(--font-num); font-weight: 700; font-size: clamp(1.4rem, 3.5vw, 2.1rem); color: var(--accent); line-height: 1; }
.stat .lbl { font-family: var(--font-sub); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; color: var(--muted); margin-top: var(--s2); }

/* ---- Cards ------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.card-head { display: flex; align-items: center; gap: var(--s3); padding: var(--s4); border-bottom: 1px solid var(--line); }
.card-head .title { font-family: var(--font-sub); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 1.05rem; }
.card-head .meta { margin-left: auto; color: var(--muted); font-size: .82rem; }
.card-body { padding: var(--s4); }
.card-pad { padding: var(--s4); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); }
.grid-home { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--s5); align-items: start; }

/* ---- Tables ------------------------------------------------------------ */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { font-size: .92rem; }
.data-table thead th {
  position: sticky; top: 0; background: var(--surface-2);
  font-family: var(--font-sub); font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; font-size: .76rem; color: var(--muted);
  text-align: left; padding: .7rem var(--s3); white-space: nowrap; border-bottom: 1px solid var(--line);
}
.data-table tbody td { padding: .65rem var(--s3); border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table .num, .data-table td.num, .data-table th.num { font-family: var(--font-num); text-align: right; font-variant-numeric: tabular-nums; }
.data-table .center { text-align: center; }
.data-table a.tlink { font-weight: 600; }
.data-table a.tlink:hover { color: var(--accent); }
.rank-cell { font-family: var(--font-num); font-weight: 700; color: var(--muted); width: 2.5rem; text-align: right; }
.data-table thead th.sort { cursor: pointer; user-select: none; white-space: nowrap; }
.data-table thead th.sort:hover { color: var(--text); }
.data-table thead th.sorted-asc::after  { content: " ▲"; color: var(--accent); font-size: .62rem; }
.data-table thead th.sorted-desc::after { content: " ▼"; color: var(--accent); font-size: .62rem; }
.rec-inline { display: none; }
.qrf-prov { color: var(--faint) !important; font-weight: 600; }

/* Home Top 20 mirrors #rank-table styling (auto layout, numeric cols right-aligned,
   W/L/T/PCT collapse into the team subline on mobile — see the @media block). */
.row-1 td { background: var(--accent-glow); }
.row-1 .rank-cell { color: var(--accent); }

/* ---- Badges / pills ---------------------------------------------------- */
.cls { font-family: var(--font-num); font-weight: 700; font-size: .72rem; padding: .12rem .42rem; border-radius: var(--r-sm); border: 1px solid var(--line); color: var(--muted); }
.cls-a { color: var(--cls-a); border-color: color-mix(in srgb, var(--cls-a) 40%, transparent); }
.cls-b { color: var(--cls-b); border-color: color-mix(in srgb, var(--cls-b) 40%, transparent); }
.cls-c { color: var(--cls-c); border-color: color-mix(in srgb, var(--cls-c) 40%, transparent); }

.res { font-family: var(--font-num); font-weight: 700; font-size: .78rem; width: 1.5rem; height: 1.5rem; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-sm); }
.res-w { color: var(--pos); background: var(--pos-bg); }
.res-l { color: var(--neg); background: var(--neg-bg); }
.res-t { color: var(--muted); background: var(--surface-2); }

.trend { font-family: var(--font-num); font-weight: 700; font-size: .8rem; }
.trend-up { color: var(--pos); }
.trend-down { color: var(--neg); }
.trend-flat { color: var(--faint); }

.tx-badge { font-family: var(--font-sub); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; font-size: .7rem; padding: .15rem .5rem; border-radius: var(--r-pill); }
.tx-pos { color: var(--pos); background: var(--pos-bg); }
.tx-neg { color: var(--neg); background: var(--neg-bg); }
.tx-neutral { color: var(--muted); background: var(--surface-2); }

.prov { font-family: var(--font-sub); font-weight: 700; font-size: .62rem; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; }

/* ---- Filter bar -------------------------------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin-bottom: var(--s4); }
.filter-group { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 4px; }
.pill {
  font-family: var(--font-sub); font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  font-size: .82rem; color: var(--muted); padding: .35rem .85rem; border-radius: var(--r-pill); border: none; background: none;
}
.pill:hover { color: var(--text); }
.pill.active { background: var(--accent); color: var(--bg); }
.filter-input, select.filter-input {
  font-size: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--text);
  border-radius: var(--r-pill); padding: .5rem 1rem; min-width: 0;
}
.filter-input:focus { outline: none; border-color: var(--accent); }

/* ---- Home rails: fixed-column grids for clean alignment ---------------- */
.hrail { display: flex; flex-direction: column; }
.hrow { display: grid; align-items: center; gap: .6rem; padding: .55rem var(--s4); border-bottom: 1px solid var(--line-soft); }
.hrow:last-child { border-bottom: none; }
.hrow.head {
  border-bottom: 1px solid var(--line);
  font-family: var(--font-sub); font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; font-size: .68rem; color: var(--faint); padding-top: .45rem; padding-bottom: .45rem;
}
.hrow .c-rank { font-family: var(--font-num); font-weight: 700; color: var(--muted); text-align: center; }
.hrow.row-1 { background: var(--accent-glow); }
.hrow.row-1 .c-rank { color: var(--accent); }
.hrow .c-team { min-width: 0; }
.hrow .c-team a { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hrow .c-team a:hover { color: var(--accent); }
.hrow .c-team small { display: block; color: var(--muted); font-size: .74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hrow .c-cls { text-align: center; }
.hrow .c-num { font-family: var(--font-num); font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.hrow .c-trend { font-family: var(--font-num); text-align: right; font-variant-numeric: tabular-nums; }

/* Top 10:  rank | team | class | TTRF | trend(arrow) */
.hrow-rk { grid-template-columns: 2rem minmax(0,1fr) 1.9rem 3.4rem 1.6rem; }
.hrow-rk .c-trend { text-align: center; }

/* Scores: date header rows grouping games; team + class left, score bold right */
.hsc-dhead { font-family: var(--font-sub); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: .7rem; color: var(--accent); padding: .55rem var(--s4) .2rem; }
.hsc-dhead:first-child { padding-top: .2rem; }
.hsc { padding: .35rem var(--s4); border-bottom: 1px solid var(--line-soft); }
.hsc:last-child { border-bottom: none; }
.hsc-line { display: grid; grid-template-columns: minmax(0,1fr) 1.8rem; gap: .5rem; align-items: baseline; padding: 2px 0; }
.hsc-team { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hsc-team a { color: var(--muted); font-weight: 600; }
.hsc-team a:hover { color: var(--accent); }
.hsc-line.win .hsc-team a { color: var(--text); }
.hsc-score { font-family: var(--font-num); font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.hsc-line.win .hsc-score { color: var(--text); }
.hsc.upset { border: 1px solid var(--accent); box-shadow: inset 0 0 0 1px var(--accent); border-radius: var(--r-sm); margin: .35rem var(--s3); padding: .3rem var(--s3) .15rem; }
.hsc-upset { font-family: var(--font-sub); font-weight: 700; letter-spacing: .08em; font-size: .62rem; color: var(--accent); text-align: center; padding-top: .25rem; margin-top: .2rem; border-top: 1px solid var(--line-soft); }

/* Moves:  badge | who | date */
.hrow-tx { grid-template-columns: 5.6rem minmax(0,1fr) 2.9rem; }
.hrow-tx .c-badge { text-align: left; }
.hrow-tx .c-who { min-width: 0; }
.hrow-tx .c-who strong { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hrow-tx .c-who small { display: block; color: var(--muted); font-size: .74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hrow-tx .c-when { font-family: var(--font-num); font-size: .74rem; color: var(--faint); text-align: right; }

/* ---- Compact lists (home rails) --------------------------------------- */
.rail-list { display: flex; flex-direction: column; }
.rail-row { display: flex; align-items: center; gap: var(--s3); padding: .6rem var(--s4); border-bottom: 1px solid var(--line-soft); }
.rail-row:last-child { border-bottom: none; }
.rail-rank { font-family: var(--font-num); font-weight: 700; color: var(--muted); width: 1.8rem; text-align: right; }
.rail-row.row-1 .rail-rank { color: var(--accent); }
.rail-name { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-name small { display: block; color: var(--muted); font-size: .76rem; font-weight: 500; }
.rail-num { font-family: var(--font-num); font-weight: 700; }

.score-row { display: flex; align-items: center; gap: var(--s3); padding: .55rem var(--s4); border-bottom: 1px solid var(--line-soft); font-size: .92rem; }
.score-row:last-child { border-bottom: none; }
.score-teams { flex: 1; min-width: 0; }
.score-line { display: flex; justify-content: space-between; gap: var(--s3); }
.score-line .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score-line .t.win { font-weight: 700; }
.score-line .s { font-family: var(--font-num); font-weight: 700; }
.score-date { font-family: var(--font-num); font-size: .74rem; color: var(--muted); width: 3.4rem; text-align: right; }

.tx-row { display: grid; grid-template-columns: 5.6rem minmax(0,1fr) auto; align-items: center; gap: var(--s3); padding: .5rem var(--s4); border-bottom: 1px solid var(--line-soft); font-size: .9rem; }
.tx-row:last-child { border-bottom: none; }
.tx-row .tx-badge { justify-self: start; }
.tx-row .who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-row .who small { color: var(--muted); }
.tx-row .when { font-family: var(--font-num); font-size: .72rem; color: var(--faint); white-space: nowrap; text-align: right; }

/* ---- Mini class indicator (no box) ------------------------------------ */
.cls-mini { font-family: var(--font-num); font-weight: 700; font-size: .62rem; margin-left: .35rem; vertical-align: 1px; color: var(--faint); }
.cls-mini.cls-a { color: var(--cls-a); }
.cls-mini.cls-b { color: var(--cls-b); }
.cls-mini.cls-c { color: var(--cls-c); }

/* ---- Matchup cards (scores / schedule) -------------------------------- */
.match-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.match {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: .15rem var(--s3); transition: border-color .12s ease;
}
.match:hover { background: var(--surface-2); }
.match.upset { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.mt { padding: .4rem 0; }
.mt + .mt { border-top: 1px solid var(--line-soft); }
.mt-main { display: grid; grid-template-columns: 1.8rem minmax(0,1fr) 1.8rem; align-items: center; gap: var(--s2); }
.match.sched .mt-main { grid-template-columns: 1.8rem minmax(0,1fr); }
.mt-rank { font-family: var(--font-num); font-size: .74rem; color: var(--faint); text-align: center; }
.mt-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-name a { color: var(--muted); font-weight: 600; }
.mt-name a:hover { color: var(--accent); }
.mt.win .mt-name a { color: var(--text); }
.mt-score { font-family: var(--font-num); font-weight: 700; font-size: 1.15rem; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.mt.win .mt-score { color: var(--accent); }
.mt-sub { padding-left: 2.3rem; font-family: var(--font-num); font-size: .72rem; color: var(--faint); margin-top: 1px; }
.m-foot { border-top: 1px solid var(--line-soft); padding: .3rem 0; text-align: center; font-family: var(--font-num); font-size: .72rem; color: var(--faint); }
.m-foot.upset-tag { color: var(--accent); font-family: var(--font-sub); font-weight: 700; letter-spacing: .08em; }

/* ---- Date group header (scores/schedule) ------------------------------ */
.date-head { font-family: var(--font-sub); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); font-size: .92rem; margin: var(--s5) 0 var(--s2); padding-bottom: var(--s2); border-bottom: 1px solid var(--line); }
.date-head:first-child { margin-top: 0; }

/* ---- Pagination -------------------------------------------------------- */
.pagination { display: flex; align-items: center; justify-content: center; gap: var(--s2); margin-top: var(--s5); flex-wrap: wrap; }
.pagination a, .pagination span {
  font-family: var(--font-num); font-weight: 600; font-size: .9rem;
  min-width: 2.2rem; height: 2.2rem; padding: 0 .6rem; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--text); background: var(--surface);
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .cur { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.pagination .gap { border: none; background: none; color: var(--faint); }
.pagination .disabled { opacity: .35; pointer-events: none; }
.page-meta { text-align: center; color: var(--muted); font-size: .82rem; margin-top: var(--s3); }

/* ---- Email CTA --------------------------------------------------------- */
.cta {
  background:
    radial-gradient(600px 300px at 100% 0%, var(--accent-glow), transparent 60%),
    var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(1.5rem, 4vw, 3rem); text-align: center;
}
.cta h2 { font-family: var(--font-display); text-transform: uppercase; font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1; }
.cta p { color: var(--muted); max-width: 48ch; margin: var(--s3) auto 0; }
.signup-form { display: flex; gap: var(--s2); max-width: 460px; margin: var(--s5) auto 0; }
.signup-form input {
  flex: 1; font-size: 16px; background: var(--bg); border: 1px solid var(--line);
  color: var(--text); border-radius: var(--r-pill); padding: .8rem 1.2rem;
}
.signup-form input:focus { outline: none; border-color: var(--accent); }
.signup-msg { margin-top: var(--s3); font-family: var(--font-sub); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; font-size: .85rem; min-height: 1.2em; }
.signup-msg.ok { color: var(--pos); }
.signup-msg.err { color: var(--neg); }

/* ---- IG funnel band ---------------------------------------------------- */
.ig-band { display: grid; grid-template-columns: 1fr auto; gap: var(--s5); align-items: center; }
.ig-band .ig-copy h2 { font-family: var(--font-sub); font-weight: 700; text-transform: uppercase; font-size: 1.6rem; }
.ig-band .ig-copy p { color: var(--muted); margin-top: var(--s2); }

/* ---- Team hero --------------------------------------------------------- */
.team-hero { display: flex; flex-wrap: wrap; gap: var(--s5); align-items: flex-end; justify-content: space-between; padding: var(--s6) 0; border-bottom: 1px solid var(--line); }
.team-hero h1 { font-family: var(--font-display); text-transform: uppercase; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1; }
.team-hero .meta { display: flex; gap: var(--s2); align-items: center; margin-top: var(--s3); flex-wrap: wrap; color: var(--muted); }
.team-stats { display: flex; gap: var(--s5); }
.team-stat { text-align: right; }
.team-stat .v { font-family: var(--font-num); font-weight: 700; font-size: 1.8rem; line-height: 1; }
.team-stat .v.accent { color: var(--accent); }
.team-stat .k { font-family: var(--font-sub); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; font-size: .72rem; color: var(--muted); margin-top: 4px; }
.chip { font-family: var(--font-sub); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: .78rem; padding: .2rem .6rem; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); }
.chip-rank { background: var(--accent); color: var(--bg); }
.chart-wrap { position: relative; height: 260px; }

/* ---- Funnel cards (home freed space) ---------------------------------- */
.cta-card { background: radial-gradient(420px 200px at 100% 0%, var(--accent-glow), transparent 60%), var(--surface); }
.cta-card-title { font-family: var(--font-sub); font-weight: 700; text-transform: uppercase; letter-spacing: .02em; font-size: 1.25rem; line-height: 1.1; margin-top: .35rem; }
.cta-card-sub { font-size: .9rem; margin-top: .5rem; }
.signup-form.col { flex-direction: column; max-width: none; margin-top: var(--s4); }
.signup-form.col .btn { width: 100%; }
.ig-card .btn { margin-top: var(--s4); }

/* ---- Bottom ticker (scores + moves crawl) ----------------------------- */
.ticker { position: fixed; left: 0; right: 0; bottom: 0; height: var(--ticker-h); z-index: 60; display: flex; align-items: stretch; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 20px rgba(0,0,0,.4); }
.ticker-label { flex: 0 0 auto; display: flex; align-items: center; background: var(--accent); color: var(--bg); font-family: var(--font-sub); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: .72rem; padding: 0 .9rem; }
.ticker-viewport { flex: 1 1 auto; overflow: hidden; position: relative; }
.ticker-track { display: flex; width: max-content; height: 100%; align-items: center; animation: ticker-scroll 110s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.tk-item { display: inline-flex; align-items: center; gap: .45rem; padding: 0 1.1rem; border-right: 1px solid var(--line-soft); font-size: .82rem; color: var(--muted); white-space: nowrap; }
.tk-item .tk-txt a { color: inherit; }
.tk-item:hover .tk-txt { color: var(--text); }
.tk-tag { font-family: var(--font-sub); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: .62rem; color: var(--faint); }
.tk-tag.pos { color: var(--pos); }
.tk-tag.neg { color: var(--neg); }
.tk-item.tk-upset .tk-tag { color: var(--accent); }
.tk-win { color: var(--accent); }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
body.has-ticker { padding-bottom: var(--ticker-h); }
body.has-ticker .ticker { display: flex; }
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .ticker-viewport { overflow-x: auto; }
}

/* ---- Footer ------------------------------------------------------------ */
.site-footer { flex-shrink: 0; border-top: 1px solid var(--line); background: var(--bg-2); margin-top: var(--s8); }
.footer-inner { display: flex; flex-wrap: wrap; gap: var(--s5); justify-content: space-between; padding: var(--s6) 0; }
.footer-brand { font-family: var(--font-display); font-size: 1.3rem; }
.footer-brand b { color: var(--accent); font-weight: inherit; }
.footer-links { display: flex; gap: var(--s5); flex-wrap: wrap; }
.footer-col h4 { font-family: var(--font-sub); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: .8rem; color: var(--muted); margin-bottom: var(--s2); }
.footer-col a { display: block; color: var(--text); font-size: .9rem; padding: 2px 0; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--line); padding: var(--s4) 0; color: var(--faint); font-size: .82rem; display: flex; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }

.muted { color: var(--muted); }
.mono { font-family: var(--font-num); }
.nowrap { white-space: nowrap; }
.empty { padding: var(--s6); text-align: center; color: var(--muted); }

/* ---- Responsive -------------------------------------------------------- */
@media (max-width: 900px) {
  .grid-home { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .ig-band { grid-template-columns: 1fr; text-align: center; }
}
@media (max-width: 760px) {
  .nav-links {
    position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; align-items: stretch;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: var(--s3); gap: 2px;
    transform: translateY(-120%); transition: transform .2s ease; margin-left: 0;
  }
  .nav-links.open { transform: translateY(0); box-shadow: var(--shadow-lg); }
  .nav-links a { padding: var(--s3); font-size: 1rem; }
  .nav-ig { margin-left: 0; text-align: center; }
  .nav-toggle { display: inline-block; }
  .grid-3 { grid-template-columns: 1fr; }
  .match-grid { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .team-hero { flex-direction: column; align-items: stretch; }
  .team-stats { justify-content: space-between; }
  .team-stat { text-align: left; }
}
@media (max-width: 560px) {
  /* Transactions: drop time + class so the Action badge always fits */
  #tx-table .col-time, #tx-table .col-class { display: none; }
  /* Rankings: collapse W/L/PCT into the team subline record */
  #rank-table .col-wl, #rank-table .col-pct { display: none; }
  #rank-table .rec-inline { display: inline; }
  /* Home Top 20: same collapse as rankings — W/L/T/PCT fold into the team subline */
  #top20-table .col-wl, #top20-table .col-t, #top20-table .col-pct { display: none; }
  #top20-table .rec-inline { display: inline; }
}
@media (max-width: 480px) {
  .signup-form { flex-direction: column; }
  .signup-form .btn { width: 100%; }
  .section-title { font-size: 1.3rem; }
  .data-table { font-size: .86rem; }
  .data-table thead th, .data-table tbody td { padding: .55rem .5rem; }
}
