/**
 * Teamball front-end — namespaced (.nfl-tb-*). Works with any theme.
 * ESPN-like layout: cards, nav, responsive.
 */

/* Wrap: contain all Teamball front content; prevent horizontal scroll */
.nfl-tb-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Nav: horizontal links */
.nfl-tb-nav {
  display: flex;
  flex-wrap: wrap;
  /* v2.0.4 — WITHOUT THIS, "NFL Teams" SITS HIGHER THAN EVERY OTHER LINK.
     Every nav item is a plain <a> flex child except NFL Teams, which is
     wrapped in a .nfl-tb-nav__item--has-submenu div so its dropdown has a
     positioning context. Flex defaults to align-items: stretch, so the
     plain anchors stretch to the line box while the inline-block wrapper
     is sized by its content — leaving its text baseline riding above its
     siblings'. Centring the children aligns both item TYPES. */
  align-items: center;
  gap: 0.5rem 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #ddd;
}

.nfl-tb-nav__link {
  padding: 0.35em 0.6em;
  text-decoration: none;
  color: #0066b3;
  border-radius: 3px;
}

.nfl-tb-nav__link:hover,
.nfl-tb-nav__link:focus {
  text-decoration: underline;
  background: #f0f0f0;
}

.nfl-tb-nav__link:focus-visible {
  outline: 2px solid #0066b3;
  outline-offset: 2px;
}

.nfl-tb-nav__link--active {
  font-weight: 600;
  color: #000;
}

/* Title and description */
.nfl-tb-title {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
}

.nfl-tb-desc {
  margin: 0 0 1rem;
  color: #555;
}

.nfl-tb-meta {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: #555;
}

/* Buttons and links list */
.nfl-tb-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.nfl-tb-btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #0066b3;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.nfl-tb-btn:hover,
.nfl-tb-btn:focus {
  background: #005090;
  color: #fff;
}

.nfl-tb-btn:focus-visible,
.nfl-tb-select:focus-visible {
  outline: 2px solid #0066b3;
  outline-offset: 2px;
}

/* Filters (scoreboard form) */
.nfl-tb-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.nfl-tb-label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nfl-tb-label__text {
  font-size: 0.85rem;
  font-weight: 600;
}

.nfl-tb-select {
  padding: 0.35em 0.5em;
  min-width: 5rem;
}

/* Game cards (scoreboard) — ESPN-like card layout */
.nfl-tb-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 600px) {
  .nfl-tb-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .nfl-tb-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.nfl-tb-card {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 1rem;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.nfl-tb-card__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0;
}

.nfl-tb-card__row--away {
  border-bottom: 1px solid #eee;
}

.nfl-tb-card__team {
  font-weight: 600;
}

.nfl-tb-card__score {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  min-width: 2rem;
  text-align: right;
}

.nfl-tb-card__meta {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #666;
}

/* Messages */
.nfl-tb-msg {
  margin: 1rem 0;
  padding: 0.75rem;
  background: #f8f8f8;
  border-radius: 4px;
}

/* Responsive: touch-friendly tap targets on small screens */
@media (max-width: 599px) {
  .nfl-tb-wrap {
    padding: 0.75rem;
  }

  .nfl-tb-nav__link {
    padding: 0.5em 0.75em;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .nfl-tb-btn {
    padding: 0.6rem 1rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nfl-tb-select {
    min-height: 44px;
    font-size: 16px; /* avoids zoom on focus on iOS */
  }

  .nfl-tb-title {
    font-size: 1.5rem;
  }
}

/* Breadcrumbs */
.nfl-tb-breadcrumbs {
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.nfl-tb-breadcrumbs__sep {
  color: #888;
  margin: 0 0.25rem;
}

.nfl-tb-breadcrumbs__link {
  color: #0066b3;
  text-decoration: none;
}

.nfl-tb-breadcrumbs__link:hover {
  text-decoration: underline;
}

.nfl-tb-breadcrumbs__current {
  color: #333;
  font-weight: 600;
}

/* Empty state */
.nfl-tb-empty {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 6px;
}

.nfl-tb-empty__text {
  margin: 0 0 1rem;
  color: #555;
}

/* Team list (My Teams) */
.nfl-tb-team-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nfl-tb-team-list__item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
}

.nfl-tb-team-list__name {
  font-weight: 600;
  text-decoration: none;
  color: #0066b3;
}

.nfl-tb-team-list__name:hover {
  text-decoration: underline;
}

/* League list */
.nfl-tb-league-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nfl-tb-league-list__item {
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
}

.nfl-tb-league-list__name {
  text-decoration: none;
  color: #0066b3;
  font-weight: 600;
}

.nfl-tb-league-list__meta {
  display: block;
  font-size: 0.9rem;
  color: #555;
  margin-top: 0.25rem;
}

/* Tables */
.nfl-tb-table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
}

.nfl-tb-table {
  width: 100%;
  border-collapse: collapse;
}

.nfl-tb-table th,
.nfl-tb-table td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.nfl-tb-table th {
  font-weight: 600;
  background: #f5f5f5;
}

/* Notices */
.nfl-tb-notice {
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border-radius: 4px;
}

.nfl-tb-notice--success {
  background: #d4edda;
  color: #155724;
}

.nfl-tb-notice--error {
  background: #f8d7da;
  color: #721c24;
}

/* Picks form */
.nfl-tb-picks-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1rem 0;
}

@media (min-width: 500px) {
  .nfl-tb-picks-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .nfl-tb-picks-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.nfl-tb-pick-slot {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nfl-tb-pick-slot__num {
  font-weight: 600;
  font-size: 0.9rem;
}

.nfl-tb-pick-slot__uses {
  font-size: 0.8rem;
  color: #555;
}

.nfl-tb-form-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.nfl-tb-btn--small {
  padding: 0.35rem 0.75rem;
  font-size: 0.9rem;
}

.nfl-tb-btn--secondary {
  background: #6c757d;
}

.nfl-tb-btn--secondary:hover,
.nfl-tb-btn--secondary:focus {
  background: #5a6268;
}

.nfl-tb-links-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.nfl-tb-h2 {
  font-size: 1.25rem;
  margin: 1rem 0 0.5rem;
}

.nfl-tb-team-stats {
  margin: 1rem 0;
}

/* Game card as link */
.nfl-tb-card__link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.nfl-tb-card__link:hover .nfl-tb-card__team {
  text-decoration: underline;
  color: #0066b3;
}

/* Compare grid */
.nfl-tb-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 1.5rem;
}

.nfl-tb-compare-col {
  padding: 1rem;
  border: 1px solid #eee;
  border-radius: 6px;
}

.nfl-tb-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}

.nfl-tb-picks-inline {
  list-style: none;
  margin: 0.25rem 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.nfl-tb-picks-inline li {
  display: inline;
}

.nfl-tb-my-week-team {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

/* =========================================================================
   2b.3.j-Teamball-Phase1 — Home + Account Home layouts & primitives
   Following the mockup template shared across pages 1, 2, 3, 5:
     two-column (main + right rail) + full-width leaderboard footer rail
   ========================================================================= */

/* ---- Layout wrappers ----------------------------------------------- */

.nfl-tb-home__layout,
.nfl-tb-account__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 960px) {
  .nfl-tb-home__layout,
  .nfl-tb-account__layout {
    grid-template-columns: 1fr;
  }
}

.nfl-tb-home__main,
.nfl-tb-account__main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.nfl-tb-home__rail,
.nfl-tb-account__rail {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ---- Slider (default; operator overrides via shortcode) ------------ */

.nfl-tb-slider {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  color: #f8fafc;
  border-radius: 8px;
  overflow: hidden;
}
.nfl-tb-slider__frame {
  padding: 3rem 1.5rem;
  text-align: center;
}
.nfl-tb-slider__title {
  font-size: 2rem;
  margin: 0 0 0.5rem;
  color: #f8fafc;
}
.nfl-tb-slider__subtitle {
  margin: 0;
  color: #cbd5e1;
}

/* ---- News blocks --------------------------------------------------- */

.nfl-tb-home__news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
@media (max-width: 760px) {
  .nfl-tb-home__news-grid { grid-template-columns: 1fr; }
}

.nfl-tb-news {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  min-height: 140px;
}
.nfl-tb-news__title {
  font-size: 1rem;
  margin: 0 0 0.5rem;
}
.nfl-tb-news__body {
  margin: 0;
  font-size: 0.875rem;
  color: #6b7280;
}

/* ---- NFL team rank cards (Home) ------------------------------------ */

.nfl-tb-home__rank-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
@media (max-width: 760px) {
  .nfl-tb-home__rank-grid { grid-template-columns: 1fr; }
}

.nfl-tb-rank-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 0.75rem;
}
.nfl-tb-rank-card--total_score   { border-top: 3px solid #2563eb; }
.nfl-tb-rank-card--offense_score { border-top: 3px solid #15803d; }
.nfl-tb-rank-card--defense_score { border-top: 3px solid #b91c1c; }

.nfl-tb-rank-card__title {
  font-size: 0.9rem;
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #374151;
}
.nfl-tb-rank-card__list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.nfl-tb-rank-card__row {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 0.5rem;
  padding: 4px 0;
  font-size: 0.875rem;
}
.nfl-tb-rank-card__rank {
  color: #9ca3af;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.nfl-tb-rank-card__abbr {
  font-weight: 700;
  text-decoration: none;
  color: inherit;
  font-family: ui-monospace, Menlo, monospace;
}
.nfl-tb-rank-card__abbr:hover { text-decoration: underline; }
.nfl-tb-rank-card__val {
  font-variant-numeric: tabular-nums;
  color: #374151;
}
.nfl-tb-rank-card__empty {
  color: #9ca3af;
  font-size: 0.875rem;
  font-style: italic;
  margin: 0;
}

/* ---- Right rail ---------------------------------------------------- */

.nfl-tb-rail {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}
.nfl-tb-rail__card {
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
}
.nfl-tb-rail__card:last-child { border-bottom: none; }
.nfl-tb-rail__title {
  font-size: 0.9rem;
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #374151;
}
.nfl-tb-rail__text {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  color: #6b7280;
}
.nfl-tb-rail__list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.nfl-tb-rail__team {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.375rem 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.875rem;
}
.nfl-tb-rail__team:last-child { border-bottom: none; }
.nfl-tb-rail__team-link {
  font-weight: 600;
  text-decoration: none;
  color: inherit;
}
.nfl-tb-rail__team-link:hover { text-decoration: underline; }
.nfl-tb-rail__team-picks {
  font-size: 0.75rem;
  color: #6b7280;
  text-decoration: underline;
}

/* ---- 32-team grid -------------------------------------------------- */

.nfl-tb-team-grid {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 0.5rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.25rem;
}
.nfl-tb-team-grid--compact { font-size: 0.8rem; }
.nfl-tb-team-grid--full { grid-template-columns: repeat(auto-fit, minmax(56px, 1fr)); }

.nfl-tb-team-grid__division {
  display: contents;
}

.nfl-tb-team-grid__tile {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.25rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-weight: 700;
  text-decoration: none;
  color: inherit;
  font-family: ui-monospace, Menlo, monospace;
  text-align: center;
}
.nfl-tb-team-grid__tile:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}
.nfl-tb-team-grid__tile--active {
  background: #dbeafe;
  border-color: #2563eb;
  color: #1e3a8a;
}
.nfl-tb-team-grid--compact .nfl-tb-team-grid__tile {
  padding: 0.375rem 0.25rem;
  font-size: 0.75rem;
}

/* ---- Leaderboard footer rail (4 cards) ----------------------------- */

.nfl-tb-lb-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px solid #e5e7eb;
}
@media (max-width: 960px) {
  .nfl-tb-lb-rail { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .nfl-tb-lb-rail { grid-template-columns: 1fr; }
}

.nfl-tb-lb-rail__card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 0.75rem;
}
.nfl-tb-lb-rail__card--overall { border-top: 3px solid #2563eb; }
.nfl-tb-lb-rail__card--week    { border-top: 3px solid #15803d; }
.nfl-tb-lb-rail__card--month   { border-top: 3px solid #b45309; }
.nfl-tb-lb-rail__card--season  { border-top: 3px solid #6b21a8; }

.nfl-tb-lb-rail__title {
  font-size: 0.85rem;
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #374151;
}
.nfl-tb-lb-rail__list {
  list-style: decimal;
  padding-left: 1.25rem;
  margin: 0;
}
.nfl-tb-lb-rail__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.875rem;
  padding: 2px 0;
}
.nfl-tb-lb-rail__name {
  text-decoration: none;
  color: inherit;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nfl-tb-lb-rail__name:hover { text-decoration: underline; }
.nfl-tb-lb-rail__pts {
  font-variant-numeric: tabular-nums;
  color: #6b7280;
}
.nfl-tb-lb-rail__empty {
  color: #9ca3af;
  font-style: italic;
  font-size: 0.875rem;
  margin: 0;
}

/* ---- Account Home ------------------------------------------------- */

.nfl-tb-account__teams,
.nfl-tb-account__manage,
.nfl-tb-account__help {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 1rem;
}

.nfl-tb-account__team-table th,
.nfl-tb-account__team-table td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid #f3f4f6;
}
.nfl-tb-account__team-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  background: #f9fafb;
}
.nfl-tb-account__team-table td {
  font-variant-numeric: tabular-nums;
}
.nfl-tb-account__team-link {
  font-weight: 700;
  text-decoration: none;
  color: inherit;
}
.nfl-tb-account__team-link:hover { text-decoration: underline; }

.nfl-tb-account__manage-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.nfl-tb-account__manage-list li {
  padding: 0.375rem 0;
  border-bottom: 1px solid #f3f4f6;
}
.nfl-tb-account__manage-list li:last-child { border-bottom: none; }

.nfl-tb-account__help-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 600px) {
  .nfl-tb-account__help-grid { grid-template-columns: 1fr; }
}
.nfl-tb-account__help-card {
  background: #f9fafb;
  border-radius: 4px;
  padding: 0.75rem;
}
.nfl-tb-account__help-title {
  font-size: 0.9rem;
  margin: 0 0 0.5rem;
}
.nfl-tb-help-block {
  font-size: 0.875rem;
}

/* ---- Coming-soon placeholder for Chat-3 routes --------------------- */

.nfl-tb-coming-soon {
  background: #fffbeb;
  border: 1px solid #fbbf24;
  border-radius: 6px;
  padding: 1.5rem;
  text-align: center;
}

/* =========================================================================
   2b.3.j-Teamball-Phase1-Chat2 — League Home, Pick Selection rail,
   Account Team Score stat cards
   ========================================================================= */

/* ---- League Home --------------------------------------------------- */

.nfl-tb-league-home__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 960px) {
  .nfl-tb-league-home__layout { grid-template-columns: 1fr; }
}
.nfl-tb-league-home__main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.nfl-tb-league-home__rail {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.nfl-tb-league-home__last-week,
.nfl-tb-league-home__standings {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 1rem;
}

.nfl-tb-league-home__matchups {
  list-style: none;
  padding: 0;
  margin: 0;
}
.nfl-tb-league-home__matchup {
  display: grid;
  grid-template-columns: 1fr auto auto auto 1fr;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.25rem;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.9rem;
}
.nfl-tb-league-home__matchup:last-child { border-bottom: none; }
.nfl-tb-league-home__matchup-team {
  font-weight: 600;
}
.nfl-tb-league-home__matchup-team:last-child {
  text-align: right;
}
.nfl-tb-league-home__matchup-score {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.nfl-tb-league-home__matchup-vs {
  color: #9ca3af;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.nfl-tb-league-home__topscorers {
  list-style: decimal;
  padding-left: 1.5rem;
  margin: 0;
}
.nfl-tb-league-home__topscorers li {
  padding: 0.25rem 0;
  font-size: 0.9rem;
}

.nfl-tb-league-home__me {
  background: #fef3c7;
  font-weight: 600;
}

/* ---- Pick Selection layout (mockup 4) ------------------------------ */

.nfl-tb-picks__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1.5rem;
}
@media (max-width: 960px) {
  .nfl-tb-picks__layout { grid-template-columns: 1fr; }
}
.nfl-tb-picks__main {
  min-width: 0;
}
.nfl-tb-picks__rail {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.nfl-tb-picks__rules {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 1rem;
  margin-top: 1.25rem;
}
.nfl-tb-picks__rules h2 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
  color: #374151;
}
.nfl-tb-picks__rules-list {
  margin: 0;
  padding-left: 1.25rem;
  color: #4b5563;
  font-size: 0.9rem;
}
.nfl-tb-picks__rules-list li {
  margin-bottom: 0.25rem;
}

/* ---- Account Team Score (mockup 5) -------------------------------- */

.nfl-tb-team-view__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 960px) {
  .nfl-tb-team-view__layout { grid-template-columns: 1fr; }
}
.nfl-tb-team-view__main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.nfl-tb-team-view__rail {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.nfl-tb-team-view__header {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 1rem;
}
.nfl-tb-team-view__header .nfl-tb-meta {
  margin: 0.25rem 0 0.75rem;
  color: #6b7280;
  font-size: 0.875rem;
}

/* 3 stat cards side-by-side. */
.nfl-tb-team-view__cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
@media (max-width: 760px) {
  .nfl-tb-team-view__cards { grid-template-columns: 1fr; }
}

.nfl-tb-stat-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 0.75rem 1rem;
}
.nfl-tb-stat-card__title {
  font-size: 0.85rem;
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #374151;
}
.nfl-tb-stat-card__dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 0.75rem;
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.nfl-tb-stat-card__dl dt {
  color: #6b7280;
  font-size: 0.8rem;
}
.nfl-tb-stat-card__dl dd {
  margin: 0;
  font-weight: 700;
  font-size: 0.95rem;
}
.nfl-tb-stat-card__note {
  margin: 0.5rem 0 0;
  color: #9ca3af;
  font-size: 0.75rem;
  font-style: italic;
}

.nfl-tb-team-view__weeks {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 1rem;
}
.nfl-tb-team-view__week-table th,
.nfl-tb-team-view__week-table td {
  text-align: right;
  padding: 0.375rem 0.75rem;
}
.nfl-tb-team-view__week-table th:first-child,
.nfl-tb-team-view__week-table td:first-child {
  text-align: left;
}
.nfl-tb-team-view__week-table th:last-child,
.nfl-tb-team-view__week-table td:last-child {
  text-align: right;
}
.nfl-tb-team-view__week-row--current {
  background: #eff6ff;
  font-weight: 600;
}

.nfl-tb-muted {
  color: #d1d5db;
}

/* =========================================================================
   2b.3.j-Teamball-Phase1-Chat3 — Week #, NFL Team X, Week # NFL Team pages
   ========================================================================= */

/* ---- Shared layout (two-col + full-width leaderboard) --------------- */

.nfl-tb-team-week__layout,
.nfl-tb-nfl-team__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 960px) {
  .nfl-tb-team-week__layout,
  .nfl-tb-nfl-team__layout { grid-template-columns: 1fr; }
}
.nfl-tb-team-week__main,
.nfl-tb-nfl-team__main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.nfl-tb-team-week__rail,
.nfl-tb-nfl-team__rail {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ---- Week nav bar ------------------------------------------------- */

.nfl-tb-week-nav {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin: 0.5rem 0 0;
}

/* ---- Week totals card (Page 6) ----------------------------------- */

.nfl-tb-team-week__totals {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 1rem;
}
.nfl-tb-team-week__totals .nfl-tb-stat-card__dl {
  grid-template-columns: repeat(6, max-content);
  gap: 4px 1.5rem;
  align-items: center;
}
@media (max-width: 600px) {
  .nfl-tb-team-week__totals .nfl-tb-stat-card__dl {
    grid-template-columns: max-content 1fr;
  }
}

.nfl-tb-team-week__picks,
.nfl-tb-nfl-team__opponent,
.nfl-tb-nfl-team__weeks,
.nfl-tb-nfl-team-week__box {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 1rem;
}

/* ---- NFL team header ---------------------------------------------- */

.nfl-tb-nfl-team__header {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 1rem;
}
.nfl-tb-nfl-team__opponent-line {
  font-size: 1rem;
  margin: 0 0 0.75rem;
}
.nfl-tb-nfl-team__opponent-abbr {
  font-weight: 700;
  font-family: ui-monospace, Menlo, monospace;
  text-decoration: none;
}
.nfl-tb-nfl-team__opponent-abbr:hover { text-decoration: underline; }

/* ---- Rank pill + week pill --------------------------------------- */

.nfl-tb-rank-pill {
  display: inline-block;
  background: #dbeafe;
  color: #1e3a8a;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: 4px;
  vertical-align: middle;
}
.nfl-tb-week-pill {
  display: inline-block;
  background: #f3f4f6;
  color: #374151;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: 4px;
  vertical-align: middle;
}

/* ---- Best/Worst block -------------------------------------------- */

.nfl-tb-best-worst__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 600px) {
  .nfl-tb-best-worst__grid { grid-template-columns: 1fr; }
}
.nfl-tb-best-worst__card--best  { border-top: 3px solid #15803d; }
.nfl-tb-best-worst__card--worst { border-top: 3px solid #b91c1c; }

/* ---- Week # NFL Team box score highlight ------------------------- */

.nfl-tb-nfl-team-week__row--me {
  background: #eff6ff;
}

/* ---- 3 NFL leaderboards on Page 7 -------------------------------- */

.nfl-tb-nfl-team__leaderboards {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 2px solid #e5e7eb;
}

/* 2b.3.j-Teamball-Phase1-Chat5: cross-link to NFL Lines (Algorithms ↗) */
.nfl-tb-nav__link--external {
  margin-left: auto;
  color: #6b7280;
  font-size: 0.9rem;
}
.nfl-tb-nav__link--external:hover,
.nfl-tb-nav__link--external:focus {
  color: #111827;
}

/* v1.5.12: picks-page fidelity — per-slot week-score cell + league sidebar.
   Additive only; no existing selectors modified. */
.nfl-tb-pick-slot__score {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1d3b6e;
}
.nfl-tb-picks__league-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.nfl-tb-picks__league-cards .nfl-tb-h2 {
  margin-bottom: 0.25rem;
}

/* ============================================================
 * §1.8 (v1.10.0) — teamball stats line under each score row on
 * the /scoreboard/ cards. Surfaces the offense_score, defense_score,
 * and total_score values that were already loaded but discarded
 * before v1.10.0. Tokens come from ds.css (--nfl-tb-text-muted L51,
 * --nfl-tb-text-faint L52); inline hex fallbacks duplicate the
 * canonical values so cards still render on surfaces that haven't
 * loaded ds.css.
 * ============================================================ */
.nfl-tb-card__teamball {
  display: flex;
  gap: 0.5em;
  align-items: baseline;
  padding: 0.15em 0 0.4em;
  font-size: 0.85em;
  color: var(--nfl-tb-text-muted, #6b7280);
}
.nfl-tb-card__teamball-total {
  font-weight: 600;
}
.nfl-tb-card__teamball-od {
  color: var(--nfl-tb-text-faint, #9ca3af);
}

/* §1.1 (v1.10.0) — Scoreboard meta-line cross-link to /week/{s}/{w}/ table. */
.nfl-tb-meta__link {
  margin-left: 0.5em;
  font-size: 0.9em;
  text-decoration: underline;
}

/* ============================================================
 * §1.2-uplift (v1.10.3) — Per-game boxscore layout.
 * Nested grid: team-blocks with internal Value/Rank/Range/vs-avg
 * columns. Subtle column tints via the new ds.css tokens
 * (--nfl-tb-surface-away, --nfl-tb-surface-home). All selectors
 * scoped to .nfl-tb-boxscore* — no global rule changes.
 * ============================================================ */

/* ── Top-line strip (4 KPI tiles per team-card) ── */
.nfl-tb-boxscore__topline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5em;
  margin: 1em 0 0.5em;
}
.nfl-tb-boxscore__topline-team {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  padding: 0.75em;
  border-radius: 6px;
}
.nfl-tb-boxscore__topline-team--away {
  background: var(--nfl-tb-surface-away, #f7f8fa);
}
.nfl-tb-boxscore__topline-team--home {
  background: var(--nfl-tb-surface-home, #fbf9f4);
}
.nfl-tb-boxscore__team-card-header {
  margin-bottom: 0.25em;
}
.nfl-tb-boxscore__team-name {
  font-size: 1.4em;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.01em;
}
.nfl-tb-boxscore__team-side {
  font-size: 0.65em;
  font-weight: 500;
  color: var(--nfl-tb-text-muted, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-left: 0.25em;
}
.nfl-tb-boxscore__kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5em;
}
.nfl-tb-boxscore__kpi {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2em;
  padding: 0.4em 0.25em;
  background: #ffffff;
  border-radius: 4px;
  text-align: center;
}
.nfl-tb-boxscore__kpi-label {
  font-size: 0.8em;
  font-weight: 500;
  color: var(--nfl-tb-text-muted, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.nfl-tb-boxscore__kpi-value {
  font-size: 1.4em;
  font-weight: 700;
  line-height: 1.2;
}
.nfl-tb-boxscore__kpi-pill {
  display: inline-flex;
  align-items: center;
}

/* ── Top-line footer line + legend block ── */
.nfl-tb-boxscore__topline-footer {
  margin: 0.5em 0 0.25em;
  font-size: 0.85em;
  color: var(--nfl-tb-text-muted, #6b7280);
  text-align: center;
}
.nfl-tb-boxscore__legend {
  margin: 0.5em 0 1.5em;
  padding: 0.6em 0.9em;
  border-left: 3px solid var(--nfl-tb-text-faint, #e5e7eb);
  background: #fafafa;
  font-size: 0.85em;
  color: var(--nfl-tb-text-muted, #6b7280);
  font-style: italic;
}
.nfl-tb-boxscore__legend p {
  margin: 0.15em 0;
}
.nfl-tb-boxscore__legend strong {
  font-style: normal;
  color: inherit;
}

/* ── Section bands (Offense / Defense / Scoring Plays) — full-width ── */
.nfl-tb-boxscore__section {
  margin: 2em 0 1em;
}
.nfl-tb-boxscore__section--empty {
  opacity: 0.7;
}
.nfl-tb-boxscore__section-band {
  font-size: 1.1em;
  font-weight: 700;
  margin: 0 0 0.75em;
  padding: 0.5em 0.75em;
  background: var(--nfl-tb-text-faint, #f3f4f6);
  border-radius: 4px;
  letter-spacing: 0.02em;
}

/* ── §1.2-uplift-fix2 (v1.10.5) — SINGLE 9-column grid per detail section.
 * Root-cause fix for D5: nested grids in v1.10.3/4 had separate parents
 * for header sub-row vs each data row, so grid-template-columns produced
 * independent tracks per container. Tracks only auto-align when cells
 * share ONE grid parent — implemented here: all cells across all rows
 * (header h3s, sub-header labels, every stat cell) are direct children
 * of `.nfl-tb-boxscore__detail-grid`. NO per-row wrappers.
 *
 * Columns: 1 row-label (8em) + 4 cols team A (3.5em + 3em + 6em + 3em) +
 *          4 cols team B (3.5em + 3em + 6em + 3em) = 9 cols total.
 * ── */
.nfl-tb-boxscore__detail-grid {
  display: grid;
  grid-template-columns: 8em 3.5em 3em 6em 3em 3.5em 3em 6em 3em;
  column-gap: 0.5em;
  row-gap: 0.4em;
  align-items: center;
  justify-items: center;
}

/* Team-name banner row: h3 spans 4 cols per team (2-5 away, 6-9 home) */
.nfl-tb-boxscore__team-name-row {
  margin: 0;
  font-size: 1em;
  font-weight: 700;
  padding: 0.35em 0.5em;
  border-radius: 3px;
  width: 100%;
  text-align: center;
  justify-self: stretch;
}
.nfl-tb-boxscore__team-name-row--away {
  grid-column: 2 / 6;
  background: var(--nfl-tb-surface-away, #f7f8fa);
}
.nfl-tb-boxscore__team-name-row--home {
  grid-column: 6 / 10;
  background: var(--nfl-tb-surface-home, #fbf9f4);
}

/* Sub-header column labels (VALUE / RANK / RANGE / VS AVG) */
.nfl-tb-boxscore__col-header {
  font-size: 0.75em;
  font-weight: 600;
  color: var(--nfl-tb-text-faint, #9ca3af);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 0.25em 0;
  width: 100%;
  justify-self: stretch;
}
.nfl-tb-boxscore__col-header--away {
  background: var(--nfl-tb-surface-away, #f7f8fa);
}
.nfl-tb-boxscore__col-header--home {
  background: var(--nfl-tb-surface-home, #fbf9f4);
}

/* Row-label spacer cells (positioned in col 1 above the stat-label rows) */
.nfl-tb-boxscore-cell--spacer {
  grid-column: 1;
}

/* Stat-row label cell (col 1) */
.nfl-tb-boxscore-cell--row-label {
  grid-column: 1;
  text-align: left;
  justify-self: start;
  font-weight: 500;
  font-size: 0.92em;
  color: var(--nfl-tb-text-muted, #6b7280);
  width: 100%;
}
.nfl-tb-boxscore-cell--row-label-derived {
  font-style: italic;
  opacity: 0.85;
}

/* Data cells — all share these base styles */
.nfl-tb-boxscore-cell {
  font-size: 0.92em;
  text-align: center;
  width: 100%;
  justify-self: stretch;
  padding: 0.2em 0;
  min-width: 0;
}
.nfl-tb-boxscore-cell--value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.nfl-tb-boxscore-cell--rank {
  display: flex;
  align-items: center;
  justify-content: center;
}
.nfl-tb-boxscore-cell--range {
  display: flex;
  align-items: center;
  justify-content: center;
}
.nfl-tb-boxscore-cell--vsavg {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--nfl-tb-text-muted, #6b7280);
}

/* Column tints — per-cell, since the unified grid has no per-column container */
.nfl-tb-boxscore-cell--away { background: var(--nfl-tb-surface-away, #f7f8fa); }
.nfl-tb-boxscore-cell--home { background: var(--nfl-tb-surface-home, #fbf9f4); }

/* D6 fix: derived-row em-dash placeholders rendered as dark + full-size + 50%
   opacity — visible "no data" indicator, NOT a faint near-invisible glyph.
   Applies to rank/range/vsavg placeholders only (not the value cell which
   shows the real derived number). */
.nfl-tb-boxscore-cell--derived.nfl-tb-boxscore-cell--rank,
.nfl-tb-boxscore-cell--derived.nfl-tb-boxscore-cell--range,
.nfl-tb-boxscore-cell--derived.nfl-tb-boxscore-cell--vsavg {
  color: var(--nfl-tb-text, #111827);
  font-size: 1em;
  opacity: 0.5;
}
.nfl-tb-boxscore-cell--derived.nfl-tb-boxscore-cell--value {
  font-style: italic;
}

/* ── §1.7 (v1.10.8) — single-team Season Stats grid (/teamball/nfl-team/{abbr}/).
 * 5-col layout (1 label + 4 stat cells). Same root-cause architecture as
 * §1.2-uplift-fix2's 9-col boxscore grid — all cells share one grid parent
 * so column tracks auto-align. Reuses every nfl-tb-boxscore-cell--* and
 * nfl-tb-boxscore__col-header class (column-agnostic). The --single side
 * variant has transparent background (no away/home tint). ── */
.nfl-tb-team-season__grid {
  display: grid;
  grid-template-columns: 12em 3.5em 3em 6em 3em;
  column-gap: 0.5em;
  row-gap: 0.4em;
  align-items: center;
  justify-items: center;
  margin-bottom: 1em;
}
.nfl-tb-boxscore-cell--single,
.nfl-tb-boxscore__col-header--single {
  background: transparent;
}

/* Scope the F1a delta-bar adaptation to the single-team grid too, since
 * its range cells live outside the boxscore __detail-grid. Same scoping
 * as the boxscore version — width fill + hide internal val-text. */
.nfl-tb-team-season__grid .nfl-tb-boxscore-cell--range .nfl-tb-ds-delta {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}
.nfl-tb-team-season__grid .nfl-tb-boxscore-cell--range .nfl-tb-ds-delta__track {
  min-width: 0;
  width: 100%;
}
.nfl-tb-team-season__grid .nfl-tb-boxscore-cell--range .nfl-tb-ds-delta__val {
  display: none;
}

/* §1.7 — Season Stats outer wrapper (sits between This Week Opponent and
 * Weekly Scores). Inherits nfl-tb-h2 + nfl-tb-meta styling from theme.
 * Bottom margin so the Weekly Scores rail breathes. */
.nfl-tb-nfl-team__season-stats {
  margin: 1.5em 0;
}

/* §1.4 (v1.10.9) — Record KPI sub-line (NFL-team header + game boxscore topline).
 * Tight, secondary typography per Q7 lock (reuse nfl-tb-meta typography). */
.nfl-tb-record-line {
  margin: 0.25em 0 0.5em;
  font-size: 0.95em;
  color: var(--nfl-tb-text-muted, #6b7280);
}
.nfl-tb-boxscore__topline-team .nfl-tb-record-line {
  margin: 0.1em 0 0.5em;
}

/* §1.4+§1.9 (v1.10.9, rebuilt v1.10.11) — NFL Teams data index page.
 * The page now renders an F1a sortable table; the wrapper just provides
 * vertical spacing. */
.nfl-tb-nfl-teams-index {
  margin: 1em 0 2em;
}

/* v1.10.11 — Submenu dropdown on "NFL Teams" nav entry.
 * Desktop: hover reveals; Mobile: .is-open class toggled by JS handler. */
.nfl-tb-nav__item--has-submenu {
  position: relative;
  /* flex, not inline-block: as a flex item it sizes and aligns like the
     plain anchors beside it. inline-block also brought the usual
     whitespace/baseline quirks that made this fiddly to chase.
     position stays — the dropdown is absolutely positioned to it. */
  display: flex;
  align-items: center;
}
.nfl-tb-nav__chevron {
  font-size: 0.75em;
  margin-left: 0.15em;
  opacity: 0.7;
}
.nfl-tb-nav__submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 100;
  margin: 0;
  padding: 0.75em;
  list-style: none;
  background: var(--nfl-tb-surface-card, #fff);
  border: 1px solid var(--nfl-tb-text-faint, #e5e7eb);
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  /* 4-col grid per spec */
  grid-template-columns: repeat(4, minmax(3.5em, 1fr));
  gap: 0.35em;
  min-width: 18em;
}
.nfl-tb-nav__item--has-submenu:hover .nfl-tb-nav__submenu,
.nfl-tb-nav__item--has-submenu:focus-within .nfl-tb-nav__submenu,
.nfl-tb-nav__item--has-submenu.is-open .nfl-tb-nav__submenu {
  display: grid;
}
.nfl-tb-nav__submenu-item { margin: 0; }
.nfl-tb-nav__submenu-link {
  display: block;
  padding: 0.4em 0.5em;
  text-align: center;
  font-weight: 700;
  font-size: 0.9em;
  letter-spacing: 0.03em;
  color: var(--nfl-tb-text, #111827);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 4px;
  transition: background 0.12s, border-color 0.12s;
}
.nfl-tb-nav__submenu-link:hover,
.nfl-tb-nav__submenu-link:focus {
  background: var(--nfl-tb-surface-soft, #f9fafb);
  border-color: var(--nfl-tb-text-faint, #e5e7eb);
}

@media (max-width: 700px) {
  .nfl-tb-nav__submenu {
    /* On narrow viewports, lay out as 3 cols to fit and reduce horizontal scroll. */
    grid-template-columns: repeat(3, minmax(3em, 1fr));
    min-width: 0;
    width: calc(100vw - 2em);
    max-width: 22em;
  }
}

/* v1.10.10 §4.4 — Home at-a-glance panels. Stack between hero slider and
 * leaderboard footer rail. Each panel = card surface + title + body. */
.nfl-tb-home-panel {
  margin: 1.5em 0;
  padding: 1.25em 1.5em;
  border: 1px solid var(--nfl-tb-text-faint, #e5e7eb);
  border-radius: 8px;
  background: var(--nfl-tb-surface-card, #fff);
}
.nfl-tb-home-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1em;
  margin: 0 0 0.75em;
  flex-wrap: wrap;
}
.nfl-tb-home-panel__title {
  margin: 0 0 0.75em;
  font-size: 1.15em;
  font-weight: 700;
  color: var(--nfl-tb-text, #111827);
}
.nfl-tb-home-panel__header .nfl-tb-home-panel__title { margin: 0; }
.nfl-tb-home-panel__cta-inline {
  font-size: 0.9em;
  color: var(--nfl-tb-accent, #2563eb);
  text-decoration: none;
}
.nfl-tb-home-panel__cta-inline:hover { text-decoration: underline; }

/* Your Week — stat grid */
.nfl-tb-home-panel__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8em, 1fr));
  gap: 0.75em;
  margin: 0 0 0.75em;
}
.nfl-tb-home-panel__stat {
  display: flex;
  flex-direction: column;
  padding: 0.5em 0.75em;
  background: var(--nfl-tb-surface-soft, #f9fafb);
  border-radius: 6px;
}
.nfl-tb-home-panel__stat-label {
  font-size: 0.8em;
  color: var(--nfl-tb-text-muted, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.nfl-tb-home-panel__stat-value {
  font-size: 1.4em;
  font-weight: 700;
  color: var(--nfl-tb-text, #111827);
}
.nfl-tb-home-panel__cta {
  display: inline-block;
  margin-top: 0.5em;
  color: var(--nfl-tb-accent, #2563eb);
  text-decoration: none;
  font-weight: 600;
}
.nfl-tb-home-panel__cta:hover { text-decoration: underline; }

/* Scoreboard panel — compact card grid */
.nfl-tb-home-panel__cards { margin: 0; }

/* Leaderboard panel — top-5 ordered list */
.nfl-tb-home-panel__leaderboard {
  list-style: none;
  padding: 0;
  margin: 0;
}
.nfl-tb-home-panel__leaderboard-row {
  display: grid;
  grid-template-columns: 2em 1fr auto;
  gap: 0.75em;
  align-items: center;
  padding: 0.5em 0.25em;
  border-bottom: 1px solid var(--nfl-tb-text-faint, #f3f4f6);
}
.nfl-tb-home-panel__leaderboard-row:last-child { border-bottom: none; }
.nfl-tb-home-panel__leaderboard-rank {
  font-weight: 700;
  color: var(--nfl-tb-text-muted, #6b7280);
  text-align: right;
}
.nfl-tb-home-panel__leaderboard-name {
  color: var(--nfl-tb-text, #111827);
  text-decoration: none;
}
.nfl-tb-home-panel__leaderboard-name:hover { text-decoration: underline; }
.nfl-tb-home-panel__leaderboard-pts {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--nfl-tb-text, #111827);
}

/* v1.10.10 — Team-abbr deep-link styling — keeps abbr looking like part
 * of the existing surface (not a blue underlined link). Hover reveals it
 * is clickable. */
.nfl-tb-card__team-link,
.nfl-tb-boxscore__team-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: border-bottom-color 0.15s;
}
.nfl-tb-card__team-link:hover,
.nfl-tb-card__team-link:focus,
.nfl-tb-boxscore__team-link:hover,
.nfl-tb-boxscore__team-link:focus {
  border-bottom-color: var(--nfl-tb-text-muted, #6b7280);
}
/* F1a 'link' render mode — inline cell anchor matches surrounding text. */
.nfl-tb-ds-td__link {
  color: var(--nfl-tb-accent, #2563eb);
  text-decoration: none;
}
.nfl-tb-ds-td__link:hover { text-decoration: underline; }

/* ── F1a delta-bar adaptation inside boxscore range cells (scoped) ──
 * F1a's `.nfl-tb-ds-delta` has min-width: 100px globally — would blow out
 * our 6em range column. Scope it to fill exactly its cell. Hide internal
 * val-text since we render delta in the dedicated vs-avg cell. F1a
 * primitive untouched globally. */
.nfl-tb-boxscore-cell--range .nfl-tb-ds-delta {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}
.nfl-tb-boxscore-cell--range .nfl-tb-ds-delta__track {
  min-width: 0;
  width: 100%;
}
.nfl-tb-boxscore-cell--range .nfl-tb-ds-delta__val {
  display: none;
}

/* ── Scoring plays panel ── */
.nfl-tb-boxscore__scoring-plays {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5em;
}
.nfl-tb-boxscore__scoring-plays-team {
  padding: 0.6em 0.8em;
  border-radius: 4px;
}
.nfl-tb-boxscore__scoring-plays-team--away {
  background: var(--nfl-tb-surface-away, #f7f8fa);
}
.nfl-tb-boxscore__scoring-plays-team--home {
  background: var(--nfl-tb-surface-home, #fbf9f4);
}
.nfl-tb-boxscore__plays-list {
  list-style: decimal inside;
  margin: 0.3em 0 0;
  padding: 0;
  font-size: 0.9em;
}
.nfl-tb-boxscore__play {
  display: flex;
  justify-content: space-between;
  padding: 0.15em 0;
}
.nfl-tb-boxscore__play-yards {
  color: var(--nfl-tb-text-faint, #9ca3af);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
 * §1.5 (v1.10.2) — Leaderboards view-toggle tab strip + season picker.
 * Used on /teamball/leaderboards/ to switch between Overall / Last 4
 * Weeks / Season. Cross-link to §1.1 NFL-team board sits below the
 * tab strip. Tokens come from ds.css (--nfl-tb-text-muted L51,
 * --nfl-tb-text-faint L52); inline hex fallbacks.
 * ============================================================ */
.nfl-tb-view-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  margin: 0.5em 0 0.75em;
  padding: 0.25em 0;
  border-bottom: 1px solid var(--nfl-tb-text-faint, #e5e7eb);
}
.nfl-tb-view-toggle__tab {
  display: inline-block;
  padding: 0.4em 0.9em;
  text-decoration: none;
  color: var(--nfl-tb-text-muted, #6b7280);
  border-radius: 4px 4px 0 0;
  font-size: 0.95em;
}
.nfl-tb-view-toggle__tab.is-active {
  font-weight: 600;
  color: inherit;
  background: var(--nfl-tb-text-faint, #f3f4f6);
}
.nfl-tb-view-toggle__tab:hover:not(.is-active) {
  background: var(--nfl-tb-text-faint, #f9fafb);
}
.nfl-tb-view-toggle__cross-link {
  margin: 0.25em 0 1em;
  font-size: 0.9em;
}
.nfl-tb-leaderboards__season-picker a,
.nfl-tb-leaderboards__season-picker strong {
  margin-right: 0.5em;
}

/* §1.3.1 — NFL team page season selector chips (sticky-header right slot).
   ds.css is frozen; selector styling lives here. Chips reuse design-system
   tokens with safe fallbacks so they read correctly with or without the
   host theme's custom props. */
.nfl-tb-season-select {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35em;
  align-items: center;
}
.nfl-tb-season-select__chip {
  display: inline-block;
  padding: 0.15em 0.6em;
  border-radius: 999px;
  border: 1px solid var(--nfl-tb-card-border, #e6e8ec);
  font-size: 0.85em;
  line-height: 1.6;
  text-decoration: none;
  color: var(--nfl-tb-text-faint, #9ca3af);
  background: transparent;
  transition: background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
a.nfl-tb-season-select__chip:hover,
a.nfl-tb-season-select__chip:focus {
  border-color: var(--nfl-tb-accent, #2563eb);
  color: var(--nfl-tb-accent, #2563eb);
}
.nfl-tb-season-select__chip--active {
  background: var(--nfl-tb-accent, #2563eb);
  border-color: var(--nfl-tb-accent, #2563eb);
  color: #fff;
  font-weight: 600;
  cursor: default;
}

/* ============================================================
 * §2.4.1 (v1.10.30) — Stat Catalog (/teamball/stats/)
 * Additive. All rules namespaced .nfl-tb-stats* — no existing
 * rule touched. Filter strip + side pills + family accordion.
 * ============================================================ */
.nfl-tb-stats__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 16px 0 20px;
}
.nfl-tb-stats__search {
  flex: 1 1 240px;
  min-width: 200px;
}
.nfl-tb-stats__search-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--nfl-tb-card-border, #e6e8ec);
  border-radius: 8px;
  font-size: 0.95rem;
  background: var(--nfl-tb-card-bg, #fff);
  color: inherit;
}
.nfl-tb-stats__search-input:focus {
  outline: none;
  border-color: var(--nfl-tb-accent, #2563eb);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.nfl-tb-stats__pills {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}
.nfl-tb-stats__pill {
  padding: 6px 14px;
  border: 1px solid var(--nfl-tb-card-border, #e6e8ec);
  border-radius: 999px;
  background: var(--nfl-tb-card-bg, #fff);
  color: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}
.nfl-tb-stats__pill:hover {
  border-color: var(--nfl-tb-accent, #2563eb);
}
.nfl-tb-stats__pill.is-active {
  background: var(--nfl-tb-accent, #2563eb);
  border-color: var(--nfl-tb-accent, #2563eb);
  color: #fff;
}
.nfl-tb-stats__accordion {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nfl-tb-stats__family {
  border: 1px solid var(--nfl-tb-card-border, #e6e8ec);
  border-radius: 10px;
  overflow: hidden;
  background: var(--nfl-tb-card-bg, #fff);
}
.nfl-tb-stats__family-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.nfl-tb-stats__family-head::-webkit-details-marker {
  display: none;
}
.nfl-tb-stats__family-count {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--nfl-tb-muted, #6b7280);
  background: var(--nfl-tb-chip-bg, #f3f4f6);
  border-radius: 999px;
  padding: 2px 9px;
}
.nfl-tb-stats__rows {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--nfl-tb-card-border, #e6e8ec);
}
.nfl-tb-stats__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--nfl-tb-row-border, #f0f1f3);
}
.nfl-tb-stats__row:last-child {
  border-bottom: none;
}
.nfl-tb-stats__row-name {
  font-size: 0.92rem;
}
.nfl-tb-stats__row-side {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 4px;
  padding: 2px 7px;
  color: #fff;
}
.nfl-tb-stats__row-side--off { background: #2563eb; }
.nfl-tb-stats__row-side--def { background: #dc2626; }
.nfl-tb-stats__row-side--net { background: #6b7280; }

/* ============================================================
 * §2.4.2 (v1.10.31) — Stat Detail page (/teamball/stat/{id}/)
 * Additive. All rules namespaced .nfl-tb-stat-detail* (+ the
 * catalog row-link added this ship). No existing rule touched.
 * ============================================================ */
.nfl-tb-stats__row-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-decoration: none;
  color: inherit;
}
.nfl-tb-stats__row-link:hover .nfl-tb-stats__row-name {
  color: var(--nfl-tb-accent, #2563eb);
  text-decoration: underline;
}
.nfl-tb-stat-detail__header {
  margin: 16px 0 24px;
}
.nfl-tb-stat-detail__pills {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 8px 0 14px;
}
.nfl-tb-stat-detail__family-pill {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--nfl-tb-muted, #6b7280);
  background: var(--nfl-tb-chip-bg, #f3f4f6);
  border-radius: 999px;
  padding: 3px 11px;
}
.nfl-tb-stat-detail__years {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.nfl-tb-stat-detail__year {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 6px;
  border: 1px solid var(--nfl-tb-card-border, #e6e8ec);
  text-decoration: none;
  color: inherit;
  background: var(--nfl-tb-card-bg, #fff);
}
.nfl-tb-stat-detail__year:hover {
  border-color: var(--nfl-tb-accent, #2563eb);
}
.nfl-tb-stat-detail__year.is-active {
  background: var(--nfl-tb-accent, #2563eb);
  border-color: var(--nfl-tb-accent, #2563eb);
  color: #fff;
}
.nfl-tb-stat-detail__section {
  margin: 28px 0;
}
.nfl-tb-stat-detail__yoy-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 640px) {
  .nfl-tb-stat-detail__yoy-cols { grid-template-columns: 1fr; }
}
.nfl-tb-stat-detail__yoy-head {
  font-size: 0.95rem;
  margin: 0 0 8px;
}
.nfl-tb-stat-detail__yoy-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nfl-tb-stat-detail__yoy-list li {
  display: flex;
  justify-content: space-between;
  padding: 7px 12px;
  border-bottom: 1px solid var(--nfl-tb-row-border, #f0f1f3);
}
.nfl-tb-stat-detail__yoy-team {
  font-weight: 600;
}
.nfl-tb-stat-detail__yoy-delta--up   { color: #16a34a; font-weight: 600; }
.nfl-tb-stat-detail__yoy-delta--down { color: #dc2626; font-weight: 600; }

/* ============================================================
 * §2.3 (v1.10.32) — NFL Teams overview uplift
 * Additive. All rules namespaced .nfl-tb-teams-overview*.
 * Uplifts the existing /teamball/nfl-teams/ index: year
 * selector + KPI strip + by-division grid. No existing rule
 * touched (the existing sortable table keeps its own styles).
 * ============================================================ */
.nfl-tb-teams-overview__years {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 18px;
}
.nfl-tb-teams-overview__year {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 6px;
  border: 1px solid var(--nfl-tb-card-border, #e6e8ec);
  text-decoration: none;
  color: inherit;
  background: var(--nfl-tb-card-bg, #fff);
}
.nfl-tb-teams-overview__year:hover {
  border-color: var(--nfl-tb-accent, #2563eb);
}
.nfl-tb-teams-overview__year.is-active {
  background: var(--nfl-tb-accent, #2563eb);
  border-color: var(--nfl-tb-accent, #2563eb);
  color: #fff;
}
.nfl-tb-teams-overview__kpi {
  margin: 0 0 22px;
}
.nfl-tb-teams-overview__divisions {
  margin: 28px 0;
}
.nfl-tb-teams-overview__div-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 900px) {
  .nfl-tb-teams-overview__div-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .nfl-tb-teams-overview__div-grid { grid-template-columns: 1fr; }
}
.nfl-tb-teams-overview__div-card {
  border: 1px solid var(--nfl-tb-card-border, #e6e8ec);
  border-radius: 10px;
  background: var(--nfl-tb-card-bg, #fff);
  overflow: hidden;
}
.nfl-tb-teams-overview__div-name {
  font-size: 0.9rem;
  margin: 0;
  padding: 10px 14px;
  border-bottom: 1px solid var(--nfl-tb-card-border, #e6e8ec);
  background: var(--nfl-tb-chip-bg, #f3f4f6);
}
.nfl-tb-teams-overview__div-rows {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nfl-tb-teams-overview__div-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--nfl-tb-row-border, #f0f1f3);
}
.nfl-tb-teams-overview__div-row:last-child {
  border-bottom: none;
}
.nfl-tb-teams-overview__div-team {
  font-weight: 600;
  text-decoration: none;
  color: inherit;
}
.nfl-tb-teams-overview__div-team:hover {
  color: var(--nfl-tb-accent, #2563eb);
  text-decoration: underline;
}
.nfl-tb-teams-overview__div-wl {
  font-variant-numeric: tabular-nums;
  color: var(--nfl-tb-muted, #6b7280);
}
.nfl-tb-teams-overview__div-ats {
  font-size: 0.78rem;
  color: var(--nfl-tb-muted, #6b7280);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
 * §2.3 (v1.10.32) — NFL Teams overview uplift
 * ============================================================ */
.nfl-tb-teams-overview__years { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 18px; }
.nfl-tb-teams-overview__year {
  font-size: 0.85rem; font-weight: 600; padding: 4px 11px; border-radius: 6px;
  border: 1px solid var(--nfl-tb-card-border, #e6e8ec); text-decoration: none; color: inherit;
  background: var(--nfl-tb-card-bg, #fff);
}
.nfl-tb-teams-overview__year:hover { border-color: var(--nfl-tb-accent, #2563eb); }
.nfl-tb-teams-overview__year.is-active { background: var(--nfl-tb-accent, #2563eb); border-color: var(--nfl-tb-accent, #2563eb); color: #fff; }
.nfl-tb-teams-overview__kpi { margin: 16px 0 20px; }
.nfl-tb-teams-overview__divisions { margin: 28px 0; }
.nfl-tb-teams-overview__div-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
@media (max-width: 1024px) { .nfl-tb-teams-overview__div-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .nfl-tb-teams-overview__div-grid { grid-template-columns: 1fr; } }
.nfl-tb-teams-overview__div-card {
  border: 1px solid var(--nfl-tb-card-border, #e6e8ec); border-radius: 10px;
  background: var(--nfl-tb-card-bg, #fff); padding: 12px 14px;
}
.nfl-tb-teams-overview__div-name { margin: 0 0 8px; font-size: 0.95rem; font-weight: 700; }
.nfl-tb-teams-overview__div-rows { list-style: none; margin: 0; padding: 0; }
.nfl-tb-teams-overview__div-row {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 6px 0; border-bottom: 1px solid var(--nfl-tb-row-border, #f0f1f3);
}
.nfl-tb-teams-overview__div-row:last-child { border-bottom: none; }
.nfl-tb-teams-overview__div-team { font-weight: 600; text-decoration: none; color: inherit; }
.nfl-tb-teams-overview__div-team:hover { color: var(--nfl-tb-accent, #2563eb); text-decoration: underline; }
.nfl-tb-teams-overview__div-wl { font-size: 0.85rem; color: var(--nfl-tb-muted, #6b7280); }
.nfl-tb-teams-overview__div-ats { font-size: 0.78rem; color: var(--nfl-tb-muted, #6b7280); }

/* ============================================================
   §4.4-rebuild (v1.10.40) — home page surfaces.
   Scoped .nfl-tb-home__* only; appended. Engines (ds/rank/record/
   charts) untouched. Rank pills reuse ds.css .nfl-tb-ds-rank*.
   ============================================================ */
.nfl-tb-home__hero { margin: 0 0 1.25rem; }
.nfl-tb-home__subtitle {
    margin: 0.5rem 0 0; font-size: 0.95rem; font-weight: 600;
    color: var(--nfl-tb-muted, #6b7280); letter-spacing: 0.01em;
}
.nfl-tb-home__section-title {
    margin: 0 0 0.85rem; font-size: 1.15rem; font-weight: 800;
    color: var(--nfl-tb-ds-text, #111827);
}

/* --- Your-team / join callout --- */
.nfl-tb-home__callout { margin: 0 0 1.5rem; }
.nfl-tb-home__callout-team,
.nfl-tb-home__callout-join {
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem;
    padding: 0.9rem 1.1rem; border-radius: 12px;
    background: var(--nfl-tb-ds-surface-2, #f3f4f6);
    border: 1px solid var(--nfl-tb-ds-border, #e5e7eb);
}
.nfl-tb-home__callout-label {
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--nfl-tb-muted, #6b7280);
}
.nfl-tb-home__callout-name {
    font-size: 1.1rem; font-weight: 800; text-decoration: none;
    color: var(--nfl-tb-ds-text, #111827);
}
.nfl-tb-home__callout-name:hover { text-decoration: underline; }
.nfl-tb-home__callout-rank {
    font-size: 0.9rem; font-weight: 600; color: var(--nfl-tb-muted, #6b7280);
}
.nfl-tb-home__callout-cta {
    margin-left: auto; font-size: 0.92rem; font-weight: 700;
    text-decoration: none; padding: 0.4rem 0.85rem; border-radius: 999px;
    background: var(--nfl-tb-ds-accent, #2563eb); color: #fff;
}
.nfl-tb-home__callout-cta:hover { filter: brightness(0.93); }

/* --- League Leaders board --- */
.nfl-tb-home__leaders { margin: 0 0 1.75rem; }
.nfl-tb-home__leaders-grid {
    display: grid; gap: 0.85rem;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.nfl-tb-home__leader-panel {
    padding: 0.75rem 0.85rem; border-radius: 10px;
    background: var(--nfl-tb-ds-surface, #fff);
    border: 1px solid var(--nfl-tb-ds-border, #e5e7eb);
}
.nfl-tb-home__leader-title {
    display: block; margin: 0 0 0.5rem; font-size: 0.9rem; font-weight: 800;
    text-decoration: none; color: var(--nfl-tb-ds-text, #111827);
    border-bottom: 2px solid var(--nfl-tb-ds-accent, #2563eb); padding-bottom: 0.35rem;
}
.nfl-tb-home__leader-title:hover { color: var(--nfl-tb-ds-accent, #2563eb); }
.nfl-tb-home__leader-list { list-style: none; margin: 0; padding: 0; }
.nfl-tb-home__leader-row {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.28rem 0; font-size: 0.9rem;
    border-top: 1px solid var(--nfl-tb-ds-border-faint, #f1f5f9);
}
.nfl-tb-home__leader-row:first-child { border-top: 0; }
.nfl-tb-home__leader-team {
    font-weight: 700; text-decoration: none; color: var(--nfl-tb-ds-text, #111827);
}
.nfl-tb-home__leader-team:hover { text-decoration: underline; }
.nfl-tb-home__leader-val {
    margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 600;
    color: var(--nfl-tb-muted, #6b7280);
}
.nfl-tb-home__leader-empty {
    margin: 0; font-size: 0.85rem; color: var(--nfl-tb-muted, #6b7280);
}

/* --- Explore the stats --- */
.nfl-tb-home__explore { margin: 0 0 1.5rem; }
.nfl-tb-home__chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 0.85rem; }
.nfl-tb-home__chip {
    font-size: 0.85rem; font-weight: 600; text-decoration: none;
    padding: 0.35rem 0.8rem; border-radius: 999px;
    background: var(--nfl-tb-ds-surface-2, #f3f4f6);
    border: 1px solid var(--nfl-tb-ds-border, #e5e7eb);
    color: var(--nfl-tb-ds-text, #111827);
}
.nfl-tb-home__chip:hover { border-color: var(--nfl-tb-ds-accent, #2563eb); }
.nfl-tb-home__explore-cta {
    display: inline-block; font-size: 0.92rem; font-weight: 700;
    text-decoration: none; color: var(--nfl-tb-ds-accent, #2563eb);
}
.nfl-tb-home__explore-cta:hover { text-decoration: underline; }

@media (max-width: 640px) {
    .nfl-tb-home__leaders-grid { grid-template-columns: 1fr 1fr; }
    .nfl-tb-home__callout-cta { margin-left: 0; }
}
@media (max-width: 420px) {
    .nfl-tb-home__leaders-grid { grid-template-columns: 1fr; }
}
