/* Reusable pieces: cards, tables, ticker, bracket, filters */

.grid {
  display: grid;
  gap: 20px;
}
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) {
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--panel);
  border: 1px solid var(--hairline);
  padding: 20px;
}
.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.card-title h3 { font-size: 18px; letter-spacing: 2px; }
.card-title a { font-size: 13px; font-weight: 600; letter-spacing: 1.5px; color: var(--steel); text-transform: uppercase; }
.card-title a:hover { color: var(--paper); }

/* sport hub tiles (home) */
.sport-tile {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-top: 4px solid var(--sport-accent);
}
.sport-tile__head { display: flex; align-items: center; gap: 12px; }
.sport-tile__head .icon { width: 34px; height: auto; }
.sport-tile__head h3 { font-size: 20px; }
.sport-tile__head .season-label { font-size: 13px; color: var(--steel); letter-spacing: 1.5px; text-transform: uppercase; }
.sport-tile ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sport-tile li { display: flex; justify-content: space-between; font-size: 16px; padding: 5px 0; border-bottom: 1px solid var(--hairline); }
.sport-tile li .rank { color: var(--steel); width: 22px; }
.sport-tile .tile-team { display: inline-flex; align-items: center; gap: 7px; }
.sport-tile .tile-team .team-badge { width: 22px; height: auto; }
.sport-tile__cta { margin-top: auto; font-family: var(--font-display); font-size: 15px; letter-spacing: 1.5px; color: var(--sport-accent); }

/* ticker: upcoming/recent strip on home */
.ticker-list { display: flex; flex-direction: column; }
.ticker-item {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 16px;
}
.ticker-item:last-child { border-bottom: none; }
.ticker-item .icon { width: 22px; height: auto; }
.ticker-item .matchup { display: flex; flex-direction: column; gap: 3px; }
.ticker-item .teams { color: var(--paper); }
.ticker-item .meta { color: var(--steel); font-size: 13px; letter-spacing: 1px; }
.ticker-item .score { font-family: var(--font-display); font-size: 17px; text-align: right; white-space: nowrap; }

/* standings table */
.standings-table { width: 100%; border-collapse: collapse; font-size: 17px; }
.standings-table th {
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--steel);
  padding: 11px 12px;
  border-bottom: 1px solid var(--hairline-strong);
}
.standings-table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--hairline);
}
.standings-table th:not(:first-child), .standings-table td:not(:first-child) { text-align: center; }
.standings-table tbody tr:hover { background: oklch(0.97 0.004 80 / 0.04); }
.standings-table .team-cell { display: flex; align-items: center; gap: 10px; text-align: left; }
.standings-table .team-cell .icon { width: 30px; height: auto; }
.standings-table .seed-tag {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; font-size: 12px; font-weight: 700;
  border: 1px solid var(--steel); color: var(--steel); margin-right: 8px;
}
.standings-table .streak-w { color: var(--forge-amber); }
.standings-table .streak-l { color: var(--league-red); }
@media (max-width: 640px) {
  .standings-card { background: transparent; border: 0; padding: 0; }
  .standings-table,.standings-table tbody,.standings-table tr,.standings-table td { display: block; width: 100%; }
  .standings-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .standings-table tr { margin-bottom: 12px; padding: 12px 14px; border: 1px solid var(--hairline); border-top: 3px solid var(--team-accent); background: var(--panel); }
  .standings-table td { min-height: 32px; padding: 5px 0; border: 0; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; text-align: right !important; }
  .standings-table td:before { content: attr(data-label); color: var(--steel); font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; text-align: left; }
  .standings-table .team-cell { display: flex; margin-bottom: 6px; padding-bottom: 10px; border-bottom: 1px solid var(--hairline); text-align: left !important; }
  .standings-table .team-cell:before { display: none; }
  .standings-table .team-cell .icon { width: 28px; }
}

/* schedule */
.schedule-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.schedule-filters label { min-height: 44px; display: flex; align-items: center; color: var(--steel); font-size: 12px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; }
.schedule-filters select {
  background: var(--panel);
  color: var(--paper);
  border: 1px solid var(--hairline-strong);
  padding: 9px 12px;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 14px;
  min-height: 44px;
}
.schedule-group + .schedule-group { margin-top: 28px; }
.schedule-group h3 {
  font-size: 16px;
  letter-spacing: 2px;
  color: var(--steel);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--hairline-strong);
  margin-bottom: 4px;
}
.game-row {
  display: grid;
  grid-template-columns: 108px 1fr 96px;
  align-items: center;
  gap: 16px;
  padding: 15px 4px;
  border-bottom: 1px solid var(--hairline);
}
.game-row .when { display: flex; flex-direction: column; gap: 2px; }
.game-row .when .date { font-weight: 600; font-size: 14px; }
.game-row .when .time { font-size: 13px; color: var(--steel); }
.game-row .matchup { display: flex; flex-direction: column; gap: 6px; }
.game-row .side { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.game-row .side .icon { width: 22px; height: auto; }
.game-row .side.winner { font-weight: 700; }
.game-row .side .pts { margin-left: auto; font-family: var(--font-display); }
.game-row .venue { font-size: 13px; color: var(--steel); grid-column: 2; margin-top: -2px; }
.game-row .status {
  justify-self: end;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 9px;
  border: 1px solid var(--hairline-strong);
  color: var(--steel);
}
.game-row .status.final { color: var(--paper); border-color: var(--paper); }
@media (max-width: 640px) {
  .game-row { grid-template-columns: 1fr; }
  .game-row .status { justify-self: start; }
}

/* bracket */
.bracket {
  display: flex;
  gap: 48px;
  overflow-x: auto;
  padding-bottom: 12px;
}
.bracket-round { display: flex; flex-direction: column; justify-content: space-around; gap: 32px; min-width: 240px; }
.bracket-round .round-label { font-size: 13px; letter-spacing: 2px; color: var(--steel); text-transform: uppercase; margin-bottom: 8px; text-align: center; }
.bracket-matchup { border: 1px solid var(--hairline-strong); background: var(--panel); }
.bracket-side {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 12px;
  font-size: 16px;
}
.bracket-side + .bracket-side { border-top: 1px solid var(--hairline); }
.bracket-side .icon { width: 20px; height: auto; }
.bracket-side .seed { color: var(--steel); font-size: 12px; width: 15px; }
.bracket-side .name { flex: 1; }
.bracket-side .pts { font-family: var(--font-display); }
.bracket-side.winner { background: color-mix(in oklch, var(--sport-accent) 10%, transparent); font-weight: 700; }
.bracket-matchup .when { font-size: 12px; color: var(--steel); text-align: center; padding: 6px; border-top: 1px solid var(--hairline); letter-spacing: 1px; }
.bracket-champion {
  display: flex; align-items: center; justify-content: center;
  writing-mode: vertical-rl;
  font-family: var(--font-display);
  letter-spacing: 3px;
  color: var(--steel);
  text-transform: uppercase;
  font-size: 14px;
}
@media (max-width: 640px) {
  .bracket { display: grid; gap: 22px; overflow: visible; }
  .bracket-round { min-width: 0; gap: 12px; }
  .bracket-champion { min-height: 68px; writing-mode: horizontal-tb; border: 1px solid var(--hairline-strong); }
}

/* team page */
.team-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 36px 0;
}
.team-hero .icon { width: 84px; height: auto; flex: none; }
.team-hero h1 { font-size: clamp(26px, 4vw, 40px); }
.team-hero .meta { color: var(--steel); font-size: 15px; letter-spacing: 1px; margin-top: 6px; }
.sport-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.sport-pill {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 13px;
  font-size: 13px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  border: 1px solid var(--hairline-strong);
  color: var(--steel);
  min-height: 44px;
}
.sport-pill .icon { width: 16px; height: auto; }
.sport-pill.active { color: var(--paper); border-color: var(--sport-accent); }

.roster-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.roster-table th { text-align: left; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--steel); padding: 9px 10px; border-bottom: 1px solid var(--hairline-strong); }
.roster-table td { padding: 10px; border-bottom: 1px solid var(--hairline); }
.roster-table .num { font-family: var(--font-display); color: var(--steel-soft); width: 40px; }

.stat-row { display: flex; gap: 28px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat .value { font-family: var(--font-display); font-size: 30px; }
.stat .label { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--steel); }

.empty-note { color: var(--steel); font-size: 15px; padding: 20px 0; }

.breadcrumb { font-size: 13px; letter-spacing: 1px; color: var(--steel); margin-bottom: 10px; }
.breadcrumb a:hover { color: var(--paper); }

@media (max-width: 520px) {
  .team-hero { align-items: flex-start; gap: 16px; }
  .team-hero .icon { width: 62px; }
  .roster-table,.roster-table tbody,.roster-table tr,.roster-table td { display: block; width: 100%; }
  .roster-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .roster-table tr { padding: 10px 0; border-bottom: 1px solid var(--hairline); }
  .roster-table td { border: 0; padding: 4px 0; display: grid; grid-template-columns: 74px 1fr; gap: 8px; }
  .roster-table td:before { content: attr(data-label); color: var(--steel); font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; }
}
