/* ============================================================
   BELFRY BASKETBALL — Components
   ============================================================ */

/* ------------------------------------------------------------
   THE JERSEY PLATE
   The site's signature object. Every player without a photograph
   renders as the back of a jersey — number applique in white over
   red — instead of a grey avatar. When a photo is added to
   assets/players/, the photo takes over and the number moves to
   the corner. Nothing else in the file needs to change.
   ------------------------------------------------------------ */
.plate {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--r-sm);
  background:
    radial-gradient(120% 90% at 50% 118%, oklch(0.545 0.208 27 / 0.55), transparent 62%),
    radial-gradient(90% 70% at 50% 22%, var(--surface-3), var(--surface-1) 78%);
  display: grid; place-items: center;
  isolation: isolate;
}
.plate::after {
  content: ""; position: absolute; inset: 0; z-index: 3;
  background: linear-gradient(to top, oklch(0.112 0.008 25 / 0.92) 2%, oklch(0.112 0.008 25 / 0.15) 42%, transparent 68%);
  pointer-events: none;
}
.plate img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; z-index: 1; }

.plate__num {
  position: relative; z-index: 2;
  font-family: var(--font-display);
  font-weight: 700; font-size: clamp(3.2rem, 2rem + 7vw, 5.4rem);
  line-height: 0.95; letter-spacing: 0;
  color: var(--on-dark);
  transform: translateY(-6%);
}
.plate__num::before {
  content: attr(data-num);
  position: absolute; inset: 0; z-index: -1;
  color: var(--red);
  transform: translate(0.055em, 0.055em);
}
.plate__ghost {
  position: absolute; z-index: 2; inset: auto 0 8% 0;
  text-align: center;
  font-family: var(--font-display); font-weight: 700; font-size: 0.625rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: oklch(1 0 0 / 0.45);
}

/* Photo present: number becomes a corner badge */
.plate--photo .plate__num { display: none; }
.plate--photo .plate__ghost { display: none; }
.plate__badge {
  position: absolute; z-index: 4; top: 0; left: 0;
  min-width: 2.4rem; padding: 0.28rem 0.5rem;
  background: var(--red); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 1.0625rem; line-height: 1.15; text-align: center;
  clip-path: polygon(0 0, 100% 0, 100% 72%, 78% 100%, 0 100%);
}

/* ------------------------------------------------------------
   PLAYER CARD
   ------------------------------------------------------------ */
.pcard { display: block; position: relative; background: var(--surface-1); border-radius: var(--r-sm); overflow: hidden; transition: transform var(--dur-2) var(--ease-out), background var(--dur-2) var(--ease-out); }
.pcard:hover { background: var(--surface-2); transform: translateY(-3px); }
.pcard .plate { border-radius: 0; }
.pcard__body { padding: var(--sp-4); position: relative; }
.pcard__name { font-family: var(--font-display); font-weight: 700; font-size: var(--t-md); letter-spacing: 0; text-transform: uppercase; color: var(--on-dark); line-height: 1.06; }
.pcard__meta { margin-top: 0.35rem; display: flex; flex-wrap: wrap; gap: 0.4rem 0.7rem; font-size: 0.8125rem; color: var(--on-dark-dim); font-weight: 500; }
.pcard__meta b { color: var(--red-bright); font-weight: 700; }
.pcard__line { position: absolute; left: 0; top: 0; width: 100%; height: 3px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform var(--dur-3) var(--ease-out); }
.pcard:hover .pcard__line { transform: scaleX(1); }

.pcard__stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--hairline-soft); }
.pcard__stat { padding: 0.6rem 0.35rem; text-align: center; }
.pcard__stat + .pcard__stat { border-left: 1px solid var(--hairline-soft); }
.pcard__stat dt { font-size: 0.625rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--on-dark-dim); font-weight: 700; }
.pcard__stat dd { font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; color: var(--on-dark); line-height: 1.2; }

/* Roster tile — the compact grid on the Team page */
.rtile { position: relative; display: block; background: var(--surface-1); border-radius: var(--r-sm); overflow: hidden; transition: background var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out); }
.rtile:hover, .rtile[aria-current="true"] { background: var(--surface-2); }
.rtile:hover { transform: translateY(-3px); }
.rtile[aria-current="true"] { box-shadow: inset 0 0 0 2px var(--red); }
.rtile .plate { border-radius: 0; }
.rtile__body { padding: 0.7rem 0.75rem 0.85rem; }
.rtile__name { font-family: var(--font-display); font-weight: 700; font-size: 0.9375rem; text-transform: uppercase; color: var(--on-dark); line-height: 1.1; }
.rtile__meta { margin-top: 0.2rem; font-size: 0.75rem; color: var(--on-dark-dim); font-weight: 500; letter-spacing: 0.02em; }

/* ------------------------------------------------------------
   GAME OBJECTS
   ------------------------------------------------------------ */
/* Opponent marks sit on the page with no tile behind them. Several are
   near-black artwork that would disappear on a dark ground, so a tight
   white halo traces the shape — it reads as an edge, not a background,
   and it is invisible on the marks that are already light. */
.opp-logo {
  width: 100%; height: 100%; object-fit: contain; background: none;
  filter: drop-shadow(0 0 1px oklch(1 0 0 / 0.85))
          drop-shadow(0 0 2.5px oklch(1 0 0 / 0.45));
}
.on-light .opp-logo {
  filter: drop-shadow(0 0 1px oklch(0.20 0.01 25 / 0.55))
          drop-shadow(0 0 2.5px oklch(0.20 0.01 25 / 0.25));
}
.opp-badge { display: grid; place-items: center; flex: none; width: 44px; height: 44px; background: none; padding: 0; }
.opp-badge--lg { width: 64px; height: 64px; }
.on-light .opp-badge { background: none; }
.opp-badge__fallback { font-family: var(--font-display); font-weight: 700; font-size: 0.9rem; color: var(--on-dark-mid); }
.on-light .opp-badge__fallback { color: var(--on-light-mid); }


/* Next game / result / record — the scoreboard strip */
.board { display: grid; gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); border-radius: var(--r-sm); overflow: hidden; }
@media (min-width: 860px) { .board { grid-template-columns: 1.25fr 1.35fr 1fr; } }
.board__cell { background: var(--surface-1); padding: var(--sp-5); display: grid; align-content: start; gap: var(--sp-3); }
.board__label { font-family: var(--font-display); font-weight: 700; font-size: 0.6875rem; letter-spacing: 0.20em; text-transform: uppercase; color: var(--red-bright); }
.board__cell--record { background: linear-gradient(150deg, var(--red-ink), var(--surface-1) 70%); }
/* Every label that sits on a red ground, in one place. */
.board__cell--record .board__label,
.hero__card__bot .board__label,
.profile__head .board__label,
.coachcard .board__label { color: var(--on-red); }
.game--next .game__mon { color: var(--on-red); }

.matchup { display: flex; align-items: center; gap: var(--sp-3); }
.matchup__name { font-family: var(--font-display); font-weight: 700; font-size: var(--t-lg); text-transform: uppercase; color: var(--on-dark); line-height: 1.05; }
.matchup__vs { font-size: 0.8125rem; font-weight: 600; color: var(--on-dark-dim); text-transform: uppercase; letter-spacing: 0.1em; }
.gmeta { display: grid; gap: 0.4rem; font-size: 0.875rem; }
.gmeta__row { display: flex; align-items: flex-start; gap: 0.55rem; }
.gmeta__row svg { width: 14px; height: 14px; margin-top: 0.3rem; flex: none; color: var(--red-bright); }

.score { display: flex; align-items: center; gap: var(--sp-4); }
.score__side { display: grid; justify-items: center; gap: 0.4rem; min-width: 0; }
.score__val { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.1rem, 1.6rem + 2vw, 3rem); line-height: 0.95; letter-spacing: 0; color: var(--on-dark); }
.score__val--lose { color: var(--on-dark-dim); }
.score__team { font-size: 0.6875rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; color: var(--on-dark-dim); text-align: center; }
.score__flag { font-family: var(--font-display); font-weight: 700; font-size: 0.625rem; letter-spacing: 0.16em; text-transform: uppercase; padding: 0.3rem 0.55rem; border: 1px solid var(--hairline); border-radius: var(--r-xs); color: var(--on-dark-mid); }

.recordline { display: flex; align-items: baseline; gap: var(--sp-3); }
.recordline__big { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.6rem, 2rem + 2.6vw, 3.6rem); line-height: 0.95; letter-spacing: 0; color: var(--on-dark); }
.recordline__cap { font-size: 0.6875rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 700; color: oklch(0.88 0.04 27); }
.splits { display: flex; gap: var(--sp-5); padding-top: var(--sp-3); border-top: 1px solid oklch(1 0 0 / 0.14); }
.splits div { display: grid; gap: 0.15rem; }
.splits dt { font-size: 0.625rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; color: oklch(0.84 0.04 27); }
.splits dd { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: #fff; line-height: 1.1; }

/* Schedule row */
.games { display: grid; gap: 1px; background: var(--hairline-soft); border-block: 1px solid var(--hairline-soft); }
/* The whole row is a link to that game's recap page. */
.games li { list-style: none; }
.game {
  display: grid; gap: var(--sp-2) var(--sp-4); align-items: center;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "date opp result" "date meta result";
  background: var(--surface-1); padding: var(--sp-4);
  color: inherit; text-decoration: none;
  transition: background var(--dur-1) var(--ease-out);
}
.game:hover .game__name { color: var(--red-bright); }
.on-light .game:hover .game__name { color: var(--red-deep); }
.on-light .games { background: var(--paper-line); border-color: var(--paper-line); }
.on-light .game { background: var(--paper); }
.game:hover { background: var(--surface-2); }
.on-light .game:hover { background: var(--paper-2); }
.game--next { background: linear-gradient(100deg, var(--red-ink), var(--surface-1) 58%); }
.on-light .game--next { background: linear-gradient(100deg, oklch(0.545 0.208 27 / 0.14), var(--paper) 58%); }

.game__date { grid-area: date; display: grid; justify-items: center; min-width: 3.6rem; padding-right: var(--sp-3); border-right: 1px solid var(--hairline-soft); }
.on-light .game__date { border-color: var(--paper-line); }
.game__mon { font-family: var(--font-display); font-weight: 700; font-size: 0.6875rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--red-bright); }
.on-light .game__mon { color: var(--red-deep); }
.game__day { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; line-height: 1.05; color: var(--on-dark); }
.on-light .game__day { color: var(--on-light); }
.game__dow { font-size: 0.625rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-dark-dim); font-weight: 600; }

.game__opp { grid-area: opp; display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }
.game__name { font-family: var(--font-display); font-weight: 700; font-size: var(--t-md); text-transform: uppercase; color: var(--on-dark); line-height: 1.15; }
.on-light .game__name { color: var(--on-light); }
.game__at { color: var(--on-dark-dim); font-weight: 600; }
.game__meta { grid-area: meta; display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; font-size: 0.8125rem; color: var(--on-dark-dim); padding-left: calc(42px + var(--sp-3)); }
.on-light .game__meta { color: var(--on-light-dim); }
.game__event { color: var(--gold); font-weight: 600; }
.on-light .game__event { color: var(--gold-deep); }
.game__result { grid-area: result; display: flex; align-items: center; gap: var(--sp-3); justify-self: end; text-align: right; }
.game__score { font-family: var(--font-display); font-weight: 700; font-size: var(--t-lg); color: var(--on-dark); line-height: 1; }
.on-light .game__score { color: var(--on-light); }
.game__wl { font-family: var(--font-display); font-weight: 700; font-size: 0.9375rem; width: 1.5rem; text-align: center; }
.game__wl--w { color: var(--win); }
.game__wl--l { color: var(--loss); }
.game__tip { font-family: var(--font-display); font-weight: 700; font-size: 0.875rem; color: var(--on-dark-mid); }
.on-light .game__tip { color: var(--on-light-mid); }

@media (max-width: 620px) {
  .game { grid-template-columns: auto 1fr; grid-template-areas: "date opp" "date meta" "date result"; }
  .game__result { justify-self: start; padding-left: calc(42px + var(--sp-3)); }
  .game__meta { padding-left: calc(42px + var(--sp-3)); }
}

/* Compact upcoming list (homepage) */
.upnext { display: grid; gap: 1px; background: var(--hairline-soft); }
.upnext__row { display: grid; grid-template-columns: 3.1rem minmax(0,1fr) auto; gap: var(--sp-3); align-items: center; background: var(--surface-1); padding: 0.8rem var(--sp-4); min-height: 60px; transition: background var(--dur-1) var(--ease-out); }
.upnext__row:hover { background: var(--surface-2); }
.upnext__d { display: grid; justify-items: center; }
.upnext__d span:first-child { font-family: var(--font-display); font-weight: 700; font-size: 0.625rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--red-bright); }
.upnext__d span:last-child { font-family: var(--font-display); font-weight: 700; font-size: 1.1875rem; color: var(--on-dark); line-height: 1; }
.upnext__o { font-family: var(--font-display); font-weight: 700; font-size: 0.9375rem; text-transform: uppercase; color: var(--on-dark); line-height: 1.2; }
.upnext__t { font-size: 0.75rem; color: var(--on-dark-dim); }

/* ------------------------------------------------------------
   STAT OBJECTS
   ------------------------------------------------------------ */
.statgrid { display: grid; gap: 1px; background: var(--hairline); grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border: 1px solid var(--hairline); border-radius: var(--r-sm); overflow: hidden; }
/* Explicit counts so a row never ends in dead cells */
@media (min-width: 620px)  { .statgrid--4, .statgrid--5 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px)  { .statgrid--4 { grid-template-columns: repeat(4, 1fr); }
                             .statgrid--5 { grid-template-columns: repeat(5, 1fr); } }
.on-light .statgrid { background: var(--paper-line); border-color: var(--paper-line); }
.stat { background: var(--surface-1); padding: var(--sp-4) var(--sp-4) var(--sp-5); display: grid; gap: 0.35rem; }
.on-light .stat { background: var(--paper); }
.stat__k { font-size: 0.625rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; color: var(--on-dark-dim); }
.on-light .stat__k { color: var(--on-light-dim); }
.stat__v { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.7rem, 1.4rem + 1.2vw, 2.3rem); line-height: 0.95; letter-spacing: 0; color: var(--on-dark); }
.on-light .stat__v { color: var(--on-light); }
.stat__n { font-size: 0.75rem; color: var(--on-dark-dim); }
.on-light .stat__n { color: var(--on-light-dim); }
.stat--accent .stat__v { color: var(--red-bright); }
.on-light .stat--accent .stat__v { color: var(--red-deep); }

/* Season leader plate */
.leader { background: var(--surface-1); border-radius: var(--r-sm); overflow: hidden; display: grid; }
.leader__cat { padding: 0.55rem var(--sp-4); background: var(--red); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 0.6875rem; letter-spacing: 0.18em; text-transform: uppercase; }
.leader__fig { position: relative; }
.leader__fig .plate { aspect-ratio: 4/3; border-radius: 0; }
.leader__fig .plate__num { font-size: clamp(2.6rem, 2rem + 3vw, 3.6rem); }
.leader__val { position: absolute; z-index: 4; right: var(--sp-3); bottom: var(--sp-3); text-align: right; }
.leader__val b { display: block; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem, 1.4rem + 1.8vw, 2.5rem); line-height: 0.95; color: #fff; letter-spacing: 0; }
.leader__val span { font-size: 0.625rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 700; color: var(--on-red); }
.leader__who { padding: 0.7rem var(--sp-4) var(--sp-4); font-family: var(--font-display); font-weight: 700; font-size: 0.875rem; text-transform: uppercase; color: var(--on-dark); }
.leader__who span { color: var(--red-bright); }

/* Data table */
.tablewrap { border: 1px solid var(--hairline); border-radius: var(--r-sm); overflow: hidden; }
.on-light .tablewrap { border-color: var(--paper-line); }
.dtable { font-size: 0.875rem; min-width: 660px; }
.dtable caption { text-align: left; padding: var(--sp-4); font-family: var(--font-display); font-weight: 700; font-size: var(--t-md); text-transform: uppercase; color: var(--on-dark); background: var(--surface-1); }
.on-light .dtable caption { color: var(--on-light); background: var(--paper); }
.dtable th, .dtable td { padding: 0.7rem 0.75rem; text-align: right; white-space: nowrap; }
.dtable th:first-child, .dtable td:first-child,
.dtable th:nth-child(2), .dtable td:nth-child(2) { text-align: left; }
.dtable thead th {
  background: var(--surface-2); color: var(--on-dark-mid);
  font-family: var(--font-display); font-weight: 700; font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase;
  border-bottom: 1px solid var(--hairline); position: sticky; top: 0;
}
.on-light .dtable thead th { background: var(--paper-2); color: var(--on-light-mid); border-color: var(--paper-line); }
.dtable tbody tr { background: var(--surface-1); border-top: 1px solid var(--hairline-soft); }
.on-light .dtable tbody tr { background: var(--paper); border-color: var(--paper-line); }
.dtable tbody tr:hover { background: var(--surface-2); }
.on-light .dtable tbody tr:hover { background: var(--paper-2); }
.dtable td { color: var(--on-dark-mid); }
.on-light .dtable td { color: var(--on-light-mid); }
.dtable .c-num { font-family: var(--font-display); font-weight: 700; color: var(--red-bright); width: 3rem; }
.on-light .dtable .c-num { color: var(--red-deep); }
.dtable .c-name { font-weight: 600; color: var(--on-dark); }
.on-light .dtable .c-name { color: var(--on-light); }
.dtable .c-lead { color: var(--on-dark); font-weight: 700; }
.on-light .dtable .c-lead { color: var(--on-light); }

/* Regional / district standings table (Stats page) */
.standtable { min-width: 340px; }
.standtable .c-rank { width: 2.75rem; font-family: var(--font-display); font-weight: 700; color: var(--on-dark-dim); }
.on-light .standtable .c-rank { color: var(--on-light-dim); }
.standtable__us { background: oklch(0.545 0.208 27 / 0.14) !important; }
.on-light .standtable__us { background: oklch(0.545 0.208 27 / 0.10) !important; }
.standtable__us td { color: var(--on-dark); }
.on-light .standtable__us td { color: var(--on-light); }
.standtable__us .c-rank { color: var(--red-bright); }
.on-light .standtable__us .c-rank { color: var(--red-deep); }
.standtable__tag { font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--red-bright); font-weight: 700; }
.on-light .standtable__tag { color: var(--red-deep); }

/* ------------------------------------------------------------
   NEWS
   ------------------------------------------------------------ */
.ncard { display: grid; grid-template-columns: 116px 1fr; gap: var(--sp-4); padding: var(--sp-4) 0; border-bottom: 1px solid var(--hairline-soft); align-items: start; }
.on-light .ncard { border-color: var(--paper-line); }
.ncard__fig { aspect-ratio: 4/3; overflow: hidden; border-radius: var(--r-xs); background: var(--surface-2); }
.ncard__fig img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; transition: transform var(--dur-4) var(--ease-out); }
.ncard:hover .ncard__fig img { transform: scale(1.06); }
.ncard__t { font-family: var(--font-display); font-weight: 700; font-size: 1rem; line-height: 1.15; text-transform: uppercase; color: var(--on-dark); }
.on-light .ncard__t { color: var(--on-light); }
.ncard:hover .ncard__t { color: var(--red-bright); }
.on-light .ncard:hover .ncard__t { color: var(--red-deep); }
.ncard__x { margin-top: 0.35rem; font-size: 0.8125rem; line-height: 1.5; }
.ncard__d { margin-top: 0.4rem; font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; color: var(--on-dark-dim); }
.on-light .ncard__d { color: var(--on-light-dim); }

.nfeature { display: block; position: relative; overflow: hidden; border-radius: var(--r-sm); background: var(--surface-1); }
.nfeature__fig { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--surface-2); }
@media (min-width: 820px) {
  .nfeature { display: grid; grid-template-columns: 1.15fr 1fr; align-items: stretch; }
  .nfeature__fig { aspect-ratio: auto; height: 100%; min-height: 320px; }
  .nfeature__body { display: grid; align-content: center; gap: 0.4rem; padding: var(--sp-7); }
  .nfeature__t { font-size: var(--t-xl); }
}
.nfeature__fig img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-4) var(--ease-out); }
.nfeature:hover .nfeature__fig img { transform: scale(1.05); }
.nfeature__tag { position: absolute; z-index: 2; left: 0; top: 0; background: var(--red); color: #fff; padding: 0.35rem 0.75rem; font-family: var(--font-display); font-weight: 700; font-size: 0.625rem; letter-spacing: 0.16em; text-transform: uppercase; }
.nfeature__body { padding: var(--sp-4) var(--sp-5) var(--sp-5); }
.nfeature__t { font-family: var(--font-display); font-weight: 700; font-size: var(--t-lg); line-height: 1.08; text-transform: uppercase; color: var(--on-dark); }
.on-light .nfeature { background: var(--paper-2); }
.on-light .nfeature__t { color: var(--on-light); }

/* ------------------------------------------------------------
   MEDIA
   ------------------------------------------------------------ */
.mgrid { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
/* Horizontal carousel variant (Media page) — a single scrolling row of tiles
   instead of a wrapped grid. Lives inside a .scroll-x so the overflow scrolls. */
.mscroll { scroll-padding-left: 2px; }
.mgrid--row { display: flex; grid-template-columns: none; scroll-snap-type: x proximity; padding-bottom: var(--sp-2); }
.mgrid--row > * { flex: 0 0 clamp(240px, 74vw, 340px); scroll-snap-align: start; }
.mtile { position: relative; display: block; overflow: hidden; border-radius: var(--r-sm); aspect-ratio: 4/3; background: var(--surface-2); }
.mtile img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%; transition: transform var(--dur-4) var(--ease-out), filter var(--dur-3) var(--ease-out); }
.mtile:hover img { transform: scale(1.06); }
.mtile__veil { position: absolute; inset: 0; background: linear-gradient(to top, oklch(0.112 0.008 25 / 0.88), transparent 55%); }
.mtile__cap { position: absolute; left: var(--sp-4); right: var(--sp-4); bottom: var(--sp-3); font-family: var(--font-display); font-weight: 700; font-size: 0.8125rem; text-transform: uppercase; color: #fff; line-height: 1.2; }
.mtile__play { position: absolute; inset: 0; display: grid; place-items: center; }
.mtile__play span { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: oklch(0.545 0.208 27 / 0.92); color: #fff; transition: transform var(--dur-2) var(--ease-out), background var(--dur-2) var(--ease-out); }
.mtile:hover .mtile__play span { transform: scale(1.1); background: var(--red-bright); }
.mtile__play svg { width: 18px; height: 18px; margin-left: 3px; }
.mtile__dur { position: absolute; right: var(--sp-3); top: var(--sp-3); background: oklch(0 0 0 / 0.7); color: #fff; padding: 0.15rem 0.4rem; border-radius: var(--r-xs); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.04em; }

/* ------------------------------------------------------------
   SPONSORS
   ------------------------------------------------------------ */
.tierhead {
  display: flex; align-items: center; justify-content: center; gap: var(--sp-3);
  padding: 0.5rem var(--sp-4); border-radius: var(--r-xs);
  font-family: var(--font-display); font-weight: 700; font-size: 0.6875rem; letter-spacing: 0.20em; text-transform: uppercase;
}
.tierhead--champ { background: linear-gradient(100deg, var(--gold-deep), var(--gold)); color: oklch(0.20 0.04 80); }
.tierhead--allstar { background: linear-gradient(100deg, oklch(0.66 0.006 250), oklch(0.78 0.006 250)); color: oklch(0.20 0.01 250); }
.on-light .tierhead--allstar { background: linear-gradient(100deg, oklch(0.72 0.006 250), oklch(0.83 0.006 250)); color: oklch(0.20 0.01 250); }
.tierhead--varsity { background: linear-gradient(100deg, oklch(0.46 0.070 55), oklch(0.58 0.085 58)); color: oklch(0.96 0.02 60); }
.on-light .tierhead--varsity { background: linear-gradient(100deg, oklch(0.62 0.075 55), oklch(0.72 0.080 58)); color: oklch(0.20 0.04 55); }

.sponsorgrid { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-top: var(--sp-4); }
.sponsor {
  display: grid; place-items: center; gap: 0.4rem; min-height: 104px;
  padding: var(--sp-4); text-align: center;
  background: var(--surface-1); border-radius: var(--r-sm);
  transition: background var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out);
}
.on-light .sponsor { background: var(--paper-2); }
.sponsor:hover { transform: translateY(-3px); background: var(--surface-2); }
.on-light .sponsor:hover { background: var(--paper-3); }
.sponsor__name { font-family: var(--font-display); font-weight: 700; font-size: 0.9375rem; text-transform: uppercase; color: var(--on-dark); line-height: 1.15; }
.on-light .sponsor__name { color: var(--on-light); }
.sponsor__kind { font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-dark-dim); }
.on-light .sponsor__kind { color: var(--on-light-dim); }
.sponsor img { max-height: 46px; width: auto; object-fit: contain; background: none; }

/* Marquee — homepage supporter strip */
.marquee { position: relative; overflow: hidden; -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; gap: clamp(2.5rem, 6vw, 5.5rem); width: max-content; animation: slide 46s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .marquee__track { animation: none; }
}
.marquee__item { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.15rem, 0.95rem + 0.8vw, 1.55rem); letter-spacing: 0.02em; text-transform: uppercase; color: var(--on-dark-dim); white-space: nowrap; padding-block: 0.75rem; transition: color var(--dur-1) var(--ease-out); }
.marquee__item:hover { color: var(--on-dark); }
.on-light .marquee__item { color: var(--on-light-dim); }
.on-light .marquee__item:hover { color: var(--on-light); }

/* ------------------------------------------------------------
   SHOP
   ------------------------------------------------------------ */
.shopgrid { display: grid; gap: var(--sp-4); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px)  { .shopgrid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .shopgrid { grid-template-columns: repeat(4, 1fr); } }
.product { display: block; background: var(--surface-1); border-radius: var(--r-sm); overflow: hidden; transition: transform var(--dur-2) var(--ease-out), background var(--dur-2) var(--ease-out); }
.on-light .product { background: var(--paper-2); }
.product:hover { transform: translateY(-4px); background: var(--surface-2); }
.on-light .product:hover { background: var(--paper-3); }
.product__fig { position: relative; aspect-ratio: 1; display: grid; place-items: center; background: radial-gradient(70% 60% at 50% 40%, var(--surface-3), var(--surface-1)); overflow: hidden; }
.on-light .product__fig { background: radial-gradient(70% 60% at 50% 40%, #fff, var(--paper-2)); }
.product__fig > img { width: 100%; height: 100%; object-fit: cover; }
.product__body { padding: var(--sp-4); display: grid; gap: 0.3rem; }
.product__n { font-family: var(--font-display); font-weight: 700; font-size: 0.9375rem; text-transform: uppercase; color: var(--on-dark); line-height: 1.15; }
.on-light .product__n { color: var(--on-light); }
.product__p { font-family: var(--font-display); font-weight: 700; font-size: 0.9375rem; color: var(--red-bright); }
.on-light .product__p { color: var(--red-deep); }

/* ------------------------------------------------------------
   TROPHY CASE — history only. Gold, engraved, its own world.
   ------------------------------------------------------------ */
.case { background: linear-gradient(180deg, oklch(0.145 0.010 40), var(--black)); }
.honor { display: grid; gap: var(--sp-3); padding: var(--sp-5); background: oklch(0.18 0.012 60 / 0.6); border: 1px solid var(--gold-line); border-radius: var(--r-sm); }
.honor__row { display: flex; align-items: center; gap: var(--sp-4); }
.honor__row + .honor__row { padding-top: var(--sp-3); border-top: 1px solid oklch(0.80 0.126 84 / 0.16); }
.honor__n { font-family: var(--font-display); font-weight: 700; font-size: 2.1rem; line-height: 0.95; color: var(--gold); min-width: 2.6rem; }
.honor__l { font-family: var(--font-display); font-weight: 700; font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-dark-mid); line-height: 1.3; }

.wall { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
@media (min-width: 760px)  { .wall { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1040px) { .wall { grid-template-columns: repeat(4, 1fr); } }
.plaque {
  position: relative; display: grid; gap: 0; text-align: center;
  background: linear-gradient(168deg, oklch(0.24 0.020 70), oklch(0.145 0.012 55));
  border: 1px solid var(--gold-line);
  border-radius: var(--r-xs);
  padding: 0.55rem;
  transition: transform var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out);
}
.plaque:hover { transform: translateY(-4px); border-color: var(--gold); }
.plaque__inner { border: 1px solid oklch(0.80 0.126 84 / 0.28); padding: var(--sp-4) var(--sp-3); display: grid; gap: 0.5rem; }
.plaque__name { font-family: var(--font-plate); font-weight: 700; font-size: 0.9375rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--gold); line-height: 1.2; }
.plaque__fig { aspect-ratio: 4/5; margin-inline: auto; width: 100%; }
.plaque__yrs { font-size: 0.6875rem; letter-spacing: 0.12em; color: var(--on-dark-dim); font-weight: 600; }
.plaque__pts { font-family: var(--font-display); font-weight: 700; font-size: 1.75rem; line-height: 1; color: #fff; letter-spacing: 0; }
.plaque__cap { font-size: 0.5625rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold-deep); font-weight: 700; }
.plaque .plate { aspect-ratio: 4/5; background: radial-gradient(90% 70% at 50% 34%, oklch(0.29 0.022 70), oklch(0.155 0.012 55)); }
.plaque .plate__num { font-size: clamp(2.2rem, 1.6rem + 3vw, 3rem); color: var(--gold); }
.plaque .plate__num::before { color: oklch(0.40 0.06 70); }
.plaque .plate::after { background: linear-gradient(to top, oklch(0.145 0.012 55 / 0.85), transparent 60%); }

.recordlist { display: grid; gap: 0; }
.recordrow { display: grid; grid-template-columns: 1fr auto; gap: var(--sp-3) var(--sp-4); align-items: baseline; padding: var(--sp-3) 0; border-bottom: 1px solid oklch(0.80 0.126 84 / 0.16); }
.recordrow__k { font-family: var(--font-display); font-weight: 700; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-dark-mid); }
.recordrow__v { font-family: var(--font-display); font-weight: 700; font-size: 1.375rem; color: var(--gold); line-height: 1; }
.recordrow__w { grid-column: 1 / -1; font-size: 0.75rem; color: var(--on-dark-dim); margin-top: -0.35rem; }

/* Timeline */
.timeline { position: relative; display: grid; gap: var(--sp-6); padding-left: var(--sp-6); }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(to bottom, var(--red), var(--gold-deep), transparent); }
.tl { position: relative; }
.tl::before { content: ""; position: absolute; left: calc(var(--sp-6) * -1); top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--black); border: 3px solid var(--red); }
.tl--gold::before { border-color: var(--gold); }
.tl__yr { font-family: var(--font-display); font-weight: 700; font-size: var(--t-lg); color: var(--gold); line-height: 1; }
.tl__t { margin-top: 0.3rem; font-family: var(--font-display); font-weight: 700; font-size: var(--t-md); text-transform: uppercase; color: var(--on-dark); }
.tl__x { margin-top: 0.4rem; font-size: 0.9375rem; max-width: 56ch; }

/* ------------------------------------------------------------
   BELL DIVIDER — the town's namesake, used as a section mark
   ------------------------------------------------------------ */
.belldiv { display: flex; align-items: center; gap: var(--sp-4); color: var(--red); }
.belldiv::before, .belldiv::after { content: ""; height: 1px; flex: 1; background: linear-gradient(to right, transparent, var(--hairline), transparent); }
.belldiv svg { width: 22px; height: 22px; flex: none; }
.on-light .belldiv { color: var(--red-deep); }

/* ------------------------------------------------------------
   FILTERS / TABS
   ------------------------------------------------------------ */
.filters { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }
.filter {
  min-height: 44px; padding: 0.6rem 0.95rem;
  font-family: var(--font-display); font-weight: 700; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--on-dark-mid); background: var(--surface-1);
  border-radius: var(--r-xs);
  transition: background var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
}
.filter:hover { background: var(--surface-2); color: var(--on-dark); }
.filter[aria-pressed="true"], .filter[aria-selected="true"] { background: var(--red); color: #fff; }
.on-light .filter { background: var(--paper-2); color: var(--on-light-mid); }
.on-light .filter:hover { background: var(--paper-3); color: var(--on-light); }
.on-light .filter[aria-pressed="true"], .on-light .filter[aria-selected="true"] { background: var(--red); color: #fff; }

.fieldlabel { font-family: var(--font-display); font-weight: 700; font-size: 0.6875rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--on-dark-dim); }
.on-light .fieldlabel { color: var(--on-light-dim); }
select.field, input.field, textarea.field {
  min-height: 48px; padding: 0.6rem 0.85rem;
  background: var(--surface-1); color: var(--on-dark);
  border: 1px solid var(--hairline); border-radius: var(--r-sm);
  font-size: 1rem; width: 100%;
}
.on-light select.field, .on-light input.field, .on-light textarea.field { background: #fff; color: var(--on-light); border-color: var(--paper-line); }
textarea.field { min-height: 140px; resize: vertical; }

/* ------------------------------------------------------------
   EMPTY / NOTE
   ------------------------------------------------------------ */
.note {
  display: grid; gap: 0.5rem; padding: var(--sp-5);
  background: var(--surface-1); border-radius: var(--r-sm);
  border: 1px dashed var(--hairline);
  font-size: 0.9375rem;
}
.on-light .note { background: var(--paper-2); border-color: var(--paper-line); }
.note strong { display: block; font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.875rem; }

.score__mark { width: 46px; height: auto; }


/* ------------------------------------------------------------
   Spans used as stacked rows inside link/button cards
   ------------------------------------------------------------ */
.rtile__body, .rtile__name, .rtile__meta,
.ncard__fig, .nfeature__fig,
.sponsor__name, .sponsor__kind,
.product__n, .product__p,
.ncard__t, .ncard__x, .ncard__d,
.nfeature__t,
.leader__cat, .leader__fig, .leader__who,
.plate__ghost { display: block; }
.ncard, .nfeature, .rtile, .product, .sponsor, .leader { color: inherit; }


/* Sortable table headings: the whole cell is the target, not the word. */
.dtable thead th { padding: 0; }
.dtable thead th button {
  display: block; width: 100%;
  padding: 0.75rem 0.75rem; min-height: 44px;
  text-align: right; white-space: nowrap;
}
.dtable thead th:first-child button,
.dtable thead th:nth-child(2) button { text-align: left; }
.dtable thead th button:hover { color: var(--red-bright); }

/* Player name links fill their cell so the tap target is the row height */
.dtable td.c-name { padding: 0; }
.dtable td.c-name a { display: block; padding: 0.7rem 0.75rem; min-height: 44px; }
.dtable td.c-name a:hover { color: var(--red-bright); }


/* ------------------------------------------------------------
   MERCH PRINT PROOF
   No product photography yet, so each item shows the artwork that
   would actually be printed on it. Deliberate, and different for
   every item — not the same mark eight times.
   ------------------------------------------------------------ */
.merch {
  display: grid; justify-items: center; align-content: center; gap: 0.55rem;
  width: 100%; height: 100%; padding: var(--sp-5) var(--sp-4);
  text-align: center;
}
.merch__mark { width: min(72%, 172px); height: auto; }
.merch__a {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.05rem); line-height: 0.95;
  letter-spacing: 0; text-transform: uppercase; color: var(--on-dark);
}
.merch__b {
  font-family: var(--font-display); font-weight: 700; font-size: 0.5625rem; letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--red-bright);
}
.merch__rule { width: 2.2rem; height: 2px; background: var(--red); margin-block: 0.15rem; }
.merch__c {
  font-family: var(--font-display); font-weight: 700; font-size: 0.625rem; letter-spacing: 0.20em; text-transform: uppercase;
  color: var(--on-dark-dim);
}
.on-light .merch__a { color: var(--on-light); }
.on-light .merch__b { color: var(--red-deep); }
.on-light .merch__c { color: var(--on-light-dim); }

/* Each category gets its own ground so the wall is not one texture */
.product__fig[data-tone="0"] { background: radial-gradient(75% 62% at 50% 34%, var(--surface-3), var(--surface-1)); }
.product__fig[data-tone="1"] { background: radial-gradient(75% 62% at 50% 34%, oklch(0.30 0.112 27), var(--surface-1)); }
.product__fig[data-tone="2"] { background: radial-gradient(75% 62% at 50% 34%, oklch(0.24 0.020 70), var(--surface-1)); }
.product__fig[data-tone="3"] { background: radial-gradient(75% 62% at 50% 34%, oklch(0.26 0.010 250), var(--surface-1)); }
