/* ============================================================
   Theme tokens.

   Two themes, both driven off the NCAA RP logo's blue so buttons,
   headers and accents match the mark. Dark by default, like the rest of
   BYTHERIM; the site header's theme button sets <html data-theme>.
   ============================================================ */

:root {
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-pill: 999px;
  --shadow-soft: 0 4px 16px rgba(0, 0, 0, 0.28);
  --shadow-lift: 0 10px 28px rgba(0, 0, 0, 0.4);

  /* Dark theme (default): near-black surfaces, white text. */
  --bg-color: #06070a;
  --card-bg: #101319;
  --card-hover: #191d26;
  --accent: #4FAEF5;        /* logo blue, lifted for contrast on black */
  --accent-dark: #1E7FC4;
  --accent-contrast: #06131f;
  --text-main: #ffffff;
  --text-muted: #98a2b3;
  --border: #222833;
  --win: #3ddc84;
  --loss: #e5484d;
  --gold: #d4af37;
  --accent-soft: rgba(79, 174, 245, 0.14);
  --accent-soft-strong: rgba(79, 174, 245, 0.30);
}

/* Light theme: inverted surfaces, deeper logo blue for contrast. */
:root[data-theme="light"] {
  --bg-color: #ffffff;
  --card-bg: #f4f6f9;
  --card-hover: #e8ecf2;
  --accent: #0A6FB8;
  --accent-dark: #075289;
  --accent-contrast: #ffffff;
  --text-main: #0b0e13;
  --text-muted: #5a6472;
  --border: #d6dbe3;
  --win: #17914f;
  --loss: #c62828;
  --gold: #9a7611;
  --accent-soft: rgba(10, 111, 184, 0.10);
  --accent-soft-strong: rgba(10, 111, 184, 0.22);
  --shadow-soft: 0 4px 16px rgba(15, 23, 42, 0.10);
  --shadow-lift: 0 10px 28px rgba(15, 23, 42, 0.16);
}

/* No "follow the device" rule: like the rest of BYTHERIM, the RP is dark
   by default and switches with the theme button in the site header. */

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

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: 'Asap Condensed', sans-serif;
  line-height: 1.5;
}

/* Typography */
h1, h2, h3, h4, .section-title, .season-title, .uppercase-title {
  font-family: 'Oswald', 'Asap Condensed', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Header & Navigation */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  background-color: rgba(13, 15, 20, 0.98);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-logo .logo-img {
  height: 42px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  transition: color 0.2s ease;
}

.nav-links a:hover, .nav-links a.active-nav {
  color: var(--text-main);
}

.badge {
  background: var(--accent);
  color: #fff;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: var(--r-sm);
  margin-left: 4px;
}

/* Simulation Main Layout */
/* Single full-width column: the old 320px sidebar column is gone because
   the sidebar became a fixed-position slide-out drawer. Leaving the grid
   in place squeezed the main panel into the vacated sidebar track. */
.sim-layout {
  display: block;
  padding: 2rem 5%;
  max-width: 1600px;
  margin: 0 auto;
}

@media (max-width: 1024px) {
  .sim-layout {
    padding: 1.25rem 4%;
  }
}

/* Panel Cards & Sidebar */
.panel-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 1.5rem;
  min-width: 0; /* grid/flex items default to min-width:auto, which lets a wide table blow out the whole page instead of scrolling internally */
}

.season-title {
  font-size: 1.6rem;
  margin: 0.5rem 0;
  color: var(--text-main);
}

.panel-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.status-badge {
  display: inline-block;
  background: var(--accent-dark);
  color: #ffffff;
  padding: 0.2rem 0.6rem;
  border-radius: var(--r-sm);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* News Feed */
.news-feed-container {
  background: var(--bg-color);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 1rem;
  max-height: 250px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.news-item {
  font-size: 0.9rem;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.5rem;
}

.news-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* Buttons */
.sim-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #ffffff;
  border: 1px solid var(--accent);
  padding: 0.75rem 1.25rem;
  border-radius: var(--r-sm);
  font-family: 'Oswald', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sim-btn:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.sim-btn-secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text-main);
}

.sim-btn-secondary:hover {
  background: var(--card-hover);
  border-color: var(--accent);
}

.outline-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--accent);
  padding: 0.4rem 0.8rem;
  border-radius: var(--r-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.outline-btn:hover {
  background: var(--accent);
  color: #ffffff;
}

/* Tabs */
.mega-menu {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.mega-menu-group {
  position: relative;
}

.mega-menu-trigger {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.85rem 1.4rem;
  font-family: 'Oswald', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.mega-menu-trigger:hover {
  color: var(--text-main);
}

.mega-menu-trigger.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.mega-menu-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 50;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
  min-width: 210px;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.mega-menu-dropdown.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mega-menu-dropdown .tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: 'Oswald', sans-serif;
  cursor: pointer;
  text-align: left;
  border-radius: var(--r-sm);
  padding: 0.6rem 0.85rem;
  font-size: 0.95rem;
  transition: color 0.15s ease, background 0.15s ease;
}

.mega-menu-dropdown .tab-btn:hover {
  background: var(--card-hover);
}

.mega-menu-dropdown .tab-btn.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeInTab 0.25s ease;
}

@keyframes fadeInTab {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInCard {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.home-screen-card {
  animation: fadeInCard 0.4s ease;
}

/* Dashboard Grids */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.dash-box {
  background: var(--bg-color);
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: var(--r-sm);
}

.dash-box h4 {
  color: var(--accent);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.top-teams-container {
  background: var(--bg-color);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 1rem;
}

/* Filters & Controls */
.filters-container {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.filter-select {
  background: var(--bg-color);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 0.5rem 0.8rem;
  border-radius: var(--r-sm);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
}

.filter-select:focus {
  border-color: var(--accent);
}

/* Tables */
.table-scroll {
  overflow-x: auto;
  width: 100%;
  min-width: 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  margin-top: 0.5rem;
}

.data-table th {
  background: var(--bg-color);
  color: var(--text-muted);
  font-family: 'Oswald', sans-serif;
  font-size: 0.85rem;
  text-transform: uppercase;
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  white-space: nowrap;
}

.data-table tbody tr:hover {
  background: var(--card-hover);
}

.empty-table-msg {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem !important;
}

/* Awards Section */
.awards-grid, .all-american-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.award-section-title {
  color: var(--accent);
  margin-bottom: 0.75rem;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  width: 100%;
  max-width: 850px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
}

.close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
}

.close-btn:hover {
  color: var(--text-main);
}

.team-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.team-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

/* Logo sizes for every other context they appear in — these were
   missing entirely, which is why logos rendered at native image size
   (some source files are 1900px+ wide) instead of as icons. */
.award-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}

.sm-logo {
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex-shrink: 0;
}

.xs-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

.team-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-box {
  background: var(--bg-color);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 0.75rem;
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 700;
}

.stat-value {
  font-family: 'Oswald', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Utilities */
.w-100 { width: 100%; }
.mb-1 { margin-bottom: 1rem; }
.mb-1-5 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.wrap-gap { flex-wrap: wrap; gap: 1rem; }
.sub-text { color: var(--text-muted); font-size: 0.9rem; }
.sub-text-sm { color: var(--text-muted); font-size: 0.8rem; font-weight: normal; }

/* ============================================================
   Everything below fills in classes the JS-generated markup
   already relies on. Without these, logos and team names were
   stacking on top of each other instead of sitting inline, and
   cards/tables had no visual hierarchy at all.
   ============================================================ */

/* Logo + name pairing, used anywhere a team appears in a row */
.team-cell-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.team-name-cell {
  font-weight: 600;
}

/* Clickable player/team names — the entire point of the sim's
   density is that everything drills in, so the hover state needs
   to read as "this opens something," not just decoration. */
.clickable-player, .clickable-school {
  cursor: pointer;
  transition: color 0.15s ease;
}

.clickable-player:hover, .clickable-school:hover {
  color: var(--accent);
}

/* Dashboard: AP Top 10 badges */
.top-teams-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.team-badge {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.team-badge:hover {
  background: var(--card-hover);
  border-color: var(--accent);
}

.team-rank {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  color: var(--accent);
  min-width: 1.75rem;
  font-size: 0.95rem;
}

/* Dashboard: stat leader lists — value is the point, so it gets
   the visual weight, not the row chrome around it. */
.leader-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.92rem;
}

.leader-row:last-child {
  border-bottom: none;
}

.leader-row > span:last-child {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  color: var(--text-main);
}

.leader-school {
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* Standings */
.standings-card {
  margin-bottom: 1.5rem;
}

.standings-header {
  color: var(--accent);
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.rank-cell {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  color: var(--accent);
  width: 3rem;
}

.ap-ranked-row {
  background: var(--accent-soft);
  border-left: 2px solid var(--accent);
}

.ap-rank-tag {
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 700;
  margin-left: 0.35rem;
}

.conf-standings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.conf-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 1rem;
}

.conf-card-title {
  color: var(--text-main);
  font-size: 1rem;
  margin-bottom: 0.6rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
}

/* Sortable table headers */
.data-table th[onclick] {
  cursor: pointer;
  user-select: none;
}

.data-table th.active-sort {
  color: var(--accent);
}

.bold-text {
  font-weight: 700;
  color: var(--text-main);
}

.bold-sub-text {
  font-weight: 700;
  color: var(--text-muted);
}

.highlight-text {
  color: var(--accent);
  font-weight: 700;
}

.highlight-col {
  color: var(--accent);
  font-weight: 700;
}

/* Awards */
.award-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 1.25rem;
}

.award-card.major-award {
  border-color: var(--accent);
  background: linear-gradient(160deg, var(--accent-soft), var(--card-bg) 60%);
}

.award-title {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1rem;
  letter-spacing: 0.4px;
}

.award-sub {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 0.85rem;
}

.award-winner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.award-winner-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.award-winner-name {
  font-weight: 700;
  font-size: 1.05rem;
}

.award-winner-school {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.award-winner-stats {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
}

.award-table-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 1rem;
}

.award-table-title {
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

/* Team & player modal headers */
.team-title-block {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.modal-team-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ap-rank {
  color: var(--gold);
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
}

.modal-team-name, .modal-player-name {
  font-family: 'Oswald', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
}

.modal-team-year, .modal-player-bio {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.modal-player-accolades {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  margin-top: 0.15rem;
}

.player-modal-substat {
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-left: 0.5rem;
}

.draft-projection {
  display: inline-block;
  background: var(--bg-color);
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.15rem 0.5rem;
  border-radius: var(--r-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

/* Schedule tab — game results as compact pills rather than a plain
   table row, closer to how a dashboard-style sim usually shows a
   week's slate. */
.schedule-pill-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.schedule-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 0.7rem 1rem;
}

.schedule-pill-matchup {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  flex: 1;
}

.schedule-pill-at {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.schedule-pill-result {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  white-space: nowrap;
}

.schedule-pill-result .win { color: var(--win); }
.schedule-pill-result .loss { color: var(--text-muted); }

.schedule-pill-pending {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Postseason bracket games as connected result cards */
.bracket-game {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--bg-color);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-sm);
  padding: 0.6rem 0.9rem;
  margin-bottom: 0.4rem;
  font-size: 0.88rem;
}

.bracket-game-teams {
  color: var(--text-muted);
}

.bracket-game-score {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  color: var(--text-main);
}

.bracket-game-advances {
  color: var(--win);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Home screen */
.home-screen-overlay {
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.home-screen-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 2.5rem;
  max-width: 440px;
  width: 100%;
  text-align: center;
}

.home-screen-logo {
  width: 88px;
  height: 88px;
  object-fit: contain;
  margin: 0 auto 1rem;
}

.home-screen-title {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
}

#loadSaveBtn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ============================================================
   Team page: conference index, team detail, stat cells
   ============================================================ */

.conf-section {
  margin-bottom: 1.75rem;
}

.conf-section-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.conf-section-title {
  font-family: 'Oswald', sans-serif;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: auto;
}

.conf-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}

.conf-logo-sm {
  width: 18px;
  height: 18px;
  object-fit: contain;
  vertical-align: -3px;
}

.conf-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.5rem;
}

.team-index-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  background: var(--bg-color);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-main);
  font-family: 'Asap Condensed', sans-serif;
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.team-index-card:hover {
  background: var(--card-hover);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.team-index-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.season-result-banner {
  background: linear-gradient(90deg, var(--accent-soft), transparent);
  border-left: 3px solid var(--accent);
  padding: 0.7rem 1rem;
  border-radius: 0 6px 6px 0;
  font-weight: 600;
}

/* Team stat cells with national rank underneath */
.team-stat-cell-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 0.5rem;
}

.team-stat-cell {
  background: var(--bg-color);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 0.55rem 0.4rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.team-stat-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.team-stat-value {
  font-family: 'Oswald', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
}

.team-stat-rank {
  font-size: 0.68rem;
  color: var(--accent);
  font-weight: 600;
}

/* Conference standings: cards size to content, no inner side-scrolling */
.conf-table-wrap {
  width: 100%;
}

.conf-table-wrap .data-table {
  width: 100%;
  table-layout: fixed;
}

.conf-table-wrap .data-table td,
.conf-table-wrap .data-table th {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-left: 0.4rem;
  padding-right: 0.4rem;
}

.conf-table-wrap .data-table td:first-child,
.conf-table-wrap .data-table th:first-child {
  width: 2rem;
}

.conf-table-wrap .team-name-cell {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Player profile stat grids */
.pstat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
  gap: 0.4rem;
}

.pstat-cell {
  background: var(--bg-color);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 0.45rem 0.3rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.pstat-label {
  font-size: 0.66rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.pstat-value {
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  font-weight: 700;
}

.modal-player-colleges {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.accolade-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  margin-right: 0.35rem;
}

.accolade-tag.preseason {
  background: rgba(212, 175, 55, 0.18);
  color: var(--gold);
}

.accolade-tag.postseason {
  background: var(--accent-soft);
  color: var(--accent);
}

/* Sidebar quick links */
.quick-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
}

.quick-link {
  background: var(--bg-color);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-muted);
  font-family: 'Asap Condensed', sans-serif;
  font-size: 0.85rem;
  padding: 0.45rem 0.3rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.quick-link:hover {
  background: var(--card-hover);
  color: var(--text-main);
  border-color: var(--accent);
}

.season-control .season-title {
  margin-bottom: 0.85rem;
}

.save-panel .section-title {
  margin-bottom: 0.6rem;
}

.win-text { color: var(--win); font-weight: 700; }
.loss-text { color: var(--loss); font-weight: 700; }

/* Row entrance animation for freshly rendered tables */
.data-table tbody tr {
  animation: rowFadeIn 0.2s ease both;
}

@keyframes rowFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ============================================================
   Aesthetic pass: softer geometry, warmer surfaces
   ============================================================ */

.panel-card {
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-soft);
}

.data-table th {
  border-bottom: 1px solid var(--border);
}

.data-table tbody tr {
  transition: background 0.12s ease;
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.status-badge,
.badge,
.ap-rank-tag,
.draft-projection,
.accolade-tag {
  border-radius: var(--r-pill);
}

.sim-btn,
.outline-btn,
.filter-select,
.quick-link {
  border-radius: var(--r-pill);
}

.sim-btn {
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
}

.sim-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.sim-btn:active:not(:disabled) {
  transform: translateY(0);
}

.modal-content {
  border-radius: var(--r-lg);
}

/* ============================================================
   Always-visible toolbar + slide-out drawer
   ============================================================ */

.sim-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 0.55rem 0.8rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-soft);
  position: sticky;
  top: 0.75rem;
  z-index: 60;
}

.drawer-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  width: 38px;
  height: 38px;
  border-radius: var(--r-pill);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  transition: background 0.15s ease;
}

.drawer-toggle:hover { background: var(--card-hover); }

.drawer-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-main);
  border-radius: var(--r-pill);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.drawer-toggle.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.drawer-toggle.active span:nth-child(2) { opacity: 0; }
.drawer-toggle.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.toolbar-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  margin-right: auto;
  min-width: 0;
}

.toolbar-phase {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toolbar-year {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.toolbar-sim {
  flex-shrink: 0;
  padding: 0.55rem 1.4rem;
}

.side-drawer {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 288px;
  max-width: 84vw;
  background: var(--card-bg);
  border-right: 1px solid var(--border);
  transform: translateX(-100%);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 200;
  overflow-y: auto;
  box-shadow: var(--shadow-lift);
}

.side-drawer.open { transform: translateX(0); }

.drawer-inner { padding: 1.5rem 1.15rem; }

.drawer-section {
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.drawer-section:last-child { border-bottom: none; margin-bottom: 0; }

.drawer-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 150;
}

.drawer-scrim.visible { opacity: 1; pointer-events: auto; }

/* Main layout is now a single column since the sidebar became a drawer */
/* ============================================================
   Dashboard: AP bubbles, top performances, brackets
   ============================================================ */

.ap-bubble-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.65rem;
}

.ap-bubble {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.9rem 0.45rem 0.7rem;
  background: var(--bg-color);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  color: var(--text-main);
  font-family: 'Asap Condensed', sans-serif;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.ap-bubble:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  background: var(--card-hover);
}

.ap-bubble-rank {
  position: absolute;
  top: 0.35rem;
  left: 0.45rem;
  font-family: 'Oswald', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
}

.ap-bubble-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.ap-bubble-name {
  font-size: 0.76rem;
  text-align: center;
  line-height: 1.15;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ap-bubble-record {
  font-size: 0.68rem;
  color: var(--text-muted);
}

@media (max-width: 720px) {
  .ap-bubble-grid { grid-template-columns: repeat(3, 1fr); }
}

.perf-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.perf-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-color);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0.65rem 0.9rem;
}

.perf-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin-right: auto;
}

.perf-name { font-weight: 700; }
.perf-meta { font-size: 0.75rem; color: var(--text-muted); }
.perf-line { font-size: 0.82rem; color: var(--accent); font-weight: 600; }

.perf-score {
  font-family: 'Oswald', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
}

/* Brackets */
.bracket-scroll { overflow-x: auto; padding-bottom: 0.5rem; }

.bracket-columns {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  min-width: min-content;
}

.bracket-round {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 200px;
}

.bracket-round-title {
  font-family: 'Oswald', sans-serif;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

.bracket-game-card {
  background: var(--bg-color);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
}

.bracket-team {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.15s ease;
}

.bracket-team:hover { background: var(--card-hover); }
.bracket-team + .bracket-team { border-top: 1px solid var(--border); }

.bracket-team.winner {
  background: rgba(61, 220, 132, 0.08);
  font-weight: 700;
  border-left: 3px solid var(--win);
}

.bracket-team-name {
  margin-right: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bracket-team-score {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  flex-shrink: 0;
}

.bracket-champion {
  margin-top: 0.75rem;
  font-family: 'Oswald', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold);
}

.bracket-conf-title {
  font-family: 'Oswald', sans-serif;
  font-size: 0.95rem;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  width: 100%;
}

.conf-bracket-block {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 1rem;
  margin-bottom: 1rem;
}

.conf-bracket-block.high-major { border-color: var(--accent); }

/* Selection day */
.selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.45rem;
}

.selection-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-color);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  color: var(--text-main);
  font-family: 'Asap Condensed', sans-serif;
  font-size: 0.85rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.selection-chip:hover { border-color: var(--accent); background: var(--card-hover); }
.selection-chip.auto-bid { border-left: 3px solid var(--gold); }

.selection-seed {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  color: var(--accent);
  min-width: 1.4rem;
}

.selection-name {
  margin-right: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selection-tag {
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.4px;
}

/* Awards: horizontal cards, stacked All-American tables */
.award-card-horizontal {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.award-heading {
  min-width: 210px;
  flex-shrink: 0;
}

.award-card-horizontal .award-winner { margin-left: auto; }

.aa-team-block { margin-bottom: 1.25rem; }

/* Offseason */
.champion-spotlight {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.14), var(--card-bg) 65%);
  border: 1px solid var(--gold);
  border-radius: var(--r-lg);
  margin-bottom: 1.5rem;
}

.champion-logo { width: 74px; height: 74px; object-fit: contain; }

.champion-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--gold);
  font-weight: 700;
}

.champion-name {
  font-family: 'Oswald', sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
}

.champion-record { color: var(--text-muted); font-size: 0.9rem; }

.transfer-arrow { color: var(--accent); font-weight: 700; }

.declared-tag {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0.1rem 0.4rem;
  border-radius: var(--r-pill);
  margin-left: 0.35rem;
}

.profile-stat-table td {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
}

.mb-2 { margin-bottom: 2rem; }

/* ============================================================
   Theme application: brand-coloured buttons/headers, RP logo header
   ============================================================ */

/* Primary buttons take the logo blue with a readable foreground in
   both themes (dark ink on the bright blue, white on the deep blue). */
.sim-btn,
.sim-btn-primary,
.toolbar-sim {
  background: var(--accent);
  color: var(--accent-contrast);
  border: 1px solid var(--accent);
  font-weight: 700;
}

.sim-btn:hover:not(:disabled),
.toolbar-sim:hover:not(:disabled) {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #ffffff;
}

.sim-btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.sim-btn-secondary:hover:not(:disabled) {
  background: var(--accent);
  color: var(--accent-contrast);
}

.outline-btn {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
}

.outline-btn:hover {
  border-color: var(--accent);
  background: var(--card-hover);
}

/* Section headers share the logo colour. */
/* Headings stay plain text colour (white on dark, black on light) — the
   logo blue is reserved for interactive elements so it still reads as
   "this is clickable". */
h1, h2, h3, h4,
.section-title,
.season-title,
.standings-header,
.award-section-title,
.conf-section-title,
.modal-team-name,
.modal-player-name,
.champion-name,
.home-screen-title,
.draft-section-title,
.offseason-title,
.rp-header-title {
  color: var(--text-main);
}

.data-table th {
  color: var(--text-muted);
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
}

.filter-select,
input[type="file"] {
  background: var(--card-bg);
  color: var(--text-main);
  border: 1px solid var(--border);
}

/* RP logo header above the sim */
.rp-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 1.25rem 5% 0.25rem;
  max-width: 1600px;
  margin: 0 auto;
}

.rp-header-logo {
  width: 150px;
  height: 150px;
  object-fit: contain;
}

@media (max-width: 720px) {
  .rp-header-logo { width: 104px; height: 104px; }
}

.rp-header-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.rp-header-title {
  font-family: 'Oswald', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
}

.rp-header-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 0.2rem;
  flex-shrink: 0;
}

.theme-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--r-pill);
  padding: 0.32rem 0.62rem;
  font-size: 0.78rem;
  font-family: 'Asap Condensed', sans-serif;
  transition: background 0.15s ease, color 0.15s ease;
}

.theme-btn:hover { color: var(--text-main); }

.theme-btn.active {
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 700;
}

/* Jersey number styling */
.jersey-num {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 1.8rem;
  display: inline-block;
}

/* ============================================================
   Offseason takeover screen
   ============================================================ */

.offseason-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-color);
  z-index: 300;
  overflow-y: auto;
  padding: 2.5rem 5%;
}

.offseason-shell {
  max-width: 1100px;
  margin: 0 auto;
}

.offseason-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.offseason-head-logo { width: 64px; height: 64px; object-fit: contain; }

.offseason-title {
  font-family: 'Oswald', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1;
}

.offseason-subtitle { color: var(--text-muted); font-size: 0.9rem; }

.offseason-actions { margin-left: auto; display: flex; gap: 0.6rem; flex-wrap: wrap; }

.offseason-stage-nav {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
}

.offseason-stage-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  color: var(--text-muted);
  font-family: 'Oswald', sans-serif;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.45rem 1rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.offseason-stage-btn:hover { color: var(--text-main); border-color: var(--accent); }

.offseason-stage-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
  font-weight: 700;
}

.offseason-panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.75rem;
}


/* Player profile bio: labelled rows rather than one run-on line */
.modal-player-bio,
.modal-player-colleges {
  display: block;
  margin-top: 0.35rem;
}

.bio-row {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  font-size: 0.9rem;
  line-height: 1.5;
}

.bio-label {
  color: var(--text-muted);
  font-weight: 700;
  min-width: 96px;
  flex-shrink: 0;
}

.bio-label:empty { min-width: 96px; }

.bio-value { color: var(--text-main); }

/* ============================================================
   Full-page player profile
   ============================================================ */

.player-page-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-color);
  z-index: 320;
  overflow-y: auto;
  padding: 2rem 4%;
}

.player-page-shell {
  max-width: 1400px;
  margin: 0 auto;
}

.player-page-head {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
}

.player-page-logo { width: 92px; height: 92px; object-fit: contain; flex-shrink: 0; }

.player-page-ident { min-width: 0; margin-right: auto; }

.player-page-name {
  font-family: 'Oswald', sans-serif;
  font-size: 2.1rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-main);
  margin: 0 0 0.5rem;
  line-height: 1;
}

/* Two columns of labelled bio rows so the block reads as a reference
   card rather than a single stacked run. */
.player-bio-block {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.1rem 1.5rem;
  max-width: 720px;
}

.player-accolade-block {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.75rem 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 0.9rem;
}

/* Career tables must fill the width — previously the stat tables were
   sized to their content and clustered at the left edge of the panel. */
.player-career-table,
.profile-stat-table {
  width: 100%;
  min-width: 100%;
  table-layout: auto;
}

.player-career-table th,
.player-career-table td,
.profile-stat-table th,
.profile-stat-table td {
  text-align: center;
  padding: 0.5rem 0.4rem;
  white-space: nowrap;
}

.player-career-table td:nth-child(2),
.player-career-table th:nth-child(2) {
  text-align: left;
}

.rank-col-head { width: 46px; }

body.player-page-open,
body.offseason-open {
  overflow: hidden;
}

@media (max-width: 720px) {
  .player-page-name { font-size: 1.5rem; }
  .player-page-logo { width: 64px; height: 64px; }
}

/* Head coach card on the team page */
.coach-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-md);
  padding: 0.9rem 1.1rem;
}

.coach-head { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }

.coach-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  font-weight: 700;
}

.coach-name {
  font-family: 'Oswald', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.coach-tags { display: flex; gap: 0.35rem; flex-wrap: wrap; margin: 0.45rem 0 0.35rem; }

.coach-tag {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--r-pill);
  padding: 0.1rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 600;
}

.coach-style { color: var(--text-muted); font-size: 0.86rem; line-height: 1.45; margin: 0; }

/* Universal back control */
.nav-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  color: var(--text-muted);
  font-family: 'Asap Condensed', sans-serif;
  font-size: 0.85rem;
  padding: 0.4rem 0.85rem;
  cursor: pointer;
  max-width: 190px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-back-btn:hover { color: var(--accent); border-color: var(--accent); }

/* Dashboard leaders: logo instead of school text */
.leader-ident { display: flex; align-items: center; gap: 0.4rem; min-width: 0; }
.leader-ident .xs-logo { cursor: pointer; }

/* Top performances: stat line beside the name, at readable size */
.perf-statline {
  display: flex;
  gap: 0.9rem;
  align-items: baseline;
  flex-shrink: 0;
  margin-right: 0.9rem;
}

.perf-stat {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.perf-stat b {
  font-family: 'Oswald', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-right: 0.18rem;
}

@media (max-width: 720px) {
  .perf-statline { gap: 0.55rem; margin-right: 0.4rem; }
  .perf-stat b { font-size: 1rem; }
  .nav-back-btn { max-width: 110px; }
}

/* ============================================================
   NCAA Tournament selection bracket — four regions arranged in a
   four-corner layout, meeting at the Final Four in the middle.
   ============================================================ */

.ncaa-bracket-grid {
  display: grid;
  grid-template-columns: 1fr minmax(150px, 0.6fr) 1fr;
  grid-template-areas:
    "r1 hub r3"
    "r2 hub r4";
  gap: 1rem;
  align-items: start;
}

.ncaa-bracket-grid > .bracket-region:nth-of-type(1) { grid-area: r1; }
.ncaa-bracket-grid > .bracket-region:nth-of-type(2) { grid-area: r2; }
.ncaa-bracket-grid > .bracket-region:nth-of-type(3) { grid-area: r3; }
.ncaa-bracket-grid > .bracket-region:nth-of-type(4) { grid-area: r4; }

.bracket-region {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0.85rem;
}

.region-title {
  font-family: 'Oswald', sans-serif;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--accent);
  margin: 0 0 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.seed-matchup {
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
  margin-bottom: 0.4rem;
}

.seed-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.5rem;
  font-size: 0.82rem;
  cursor: pointer;
  background: var(--bg-color);
  transition: background 0.15s ease;
}

.seed-row + .seed-row { border-top: 1px solid var(--border); }
.seed-row:hover { background: var(--card-hover); }
.seed-row.empty { cursor: default; color: var(--text-muted); }
.seed-row.auto-bid { border-left: 3px solid var(--gold); }

.seed-num {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 1.3rem;
  font-size: 0.78rem;
  text-align: center;
  flex-shrink: 0;
}

.seed-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.final-four-hub {
  grid-area: hub;
  align-self: center;
  text-align: center;
  background: linear-gradient(160deg, var(--accent-soft), var(--card-bg) 70%);
  border: 1px solid var(--accent);
  border-radius: var(--r-lg);
  padding: 1.5rem 1rem;
}

.ff-label {
  font-family: 'Oswald', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
}

.ff-trophy { font-size: 2rem; margin: 0.4rem 0; }
.ff-sub { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

.first-four {
  margin-top: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0.85rem;
}

.first-four-games {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.5rem;
}

@media (max-width: 900px) {
  .ncaa-bracket-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "r1" "r2" "hub" "r3" "r4";
  }
}

.seed-row.playin-slot {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.76rem;
}

/* Award cards: long player names and honour titles were overflowing their
   boxes. Let the text wrap and shrink instead of spilling. */
.award-card,
.award-card-horizontal {
  min-width: 0;
  overflow-wrap: anywhere;
}

.award-title {
  font-size: 0.95rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.award-heading { min-width: 0; flex: 1 1 200px; }

.award-winner {
  min-width: 0;
  flex: 1 1 240px;
}

.award-winner-info { min-width: 0; overflow: hidden; }

.award-winner-name,
.award-winner-school,
.award-winner-stats {
  overflow-wrap: anywhere;
  white-space: normal;
  line-height: 1.25;
}

.award-winner-name { font-size: 1rem; }

.awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 0.75rem;
  align-items: stretch;
}

.award-table-card { min-width: 0; overflow: hidden; }
.award-table-title { overflow-wrap: anywhere; line-height: 1.25; }

/* Season summary headline */
.season-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: linear-gradient(135deg, rgba(212,175,55,0.12), var(--card-bg) 65%);
  border: 1px solid var(--gold);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  flex-wrap: wrap;
}

.season-headline-main { min-width: 0; }
.season-headline .champion-logo { width: 76px; height: 76px; }

/* Award cards were overflowing when a long player or school name met a
   narrow grid column. */
.award-card, .award-card-horizontal { min-width: 0; overflow-wrap: anywhere; }
.award-title { font-size: 0.95rem; line-height: 1.2; overflow-wrap: anywhere; }
.award-winner-name { overflow-wrap: anywhere; line-height: 1.2; }
.award-winner-school, .award-winner-stats { overflow-wrap: anywhere; }
.award-winner-info { flex: 1 1 auto; min-width: 0; }
.awards-grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

/* Sim spinner — a basketball spins while a week is being simulated */
.sim-spinner-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 400;
  backdrop-filter: blur(2px);
}
.sim-spinner-overlay.active { display: flex; }
.sim-ball {
  width: 74px; height: 74px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #f0913f, #c4571a 68%, #8f3d10);
  position: relative;
  animation: ballSpin 0.7s linear infinite;
  box-shadow: 0 8px 22px rgba(0,0,0,0.45);
}
.sim-ball::before, .sim-ball::after {
  content: ''; position: absolute; inset: 0;
  border-radius: 50%; border: 2.5px solid rgba(0,0,0,0.65);
}
.sim-ball::before { border-left-color: transparent; border-right-color: transparent; }
.sim-ball::after { border-top-color: transparent; border-bottom-color: transparent; }
.sim-ball-line {
  position: absolute; left: 50%; top: 0; bottom: 0;
  width: 2.5px; background: rgba(0,0,0,0.65); transform: translateX(-50%);
}
@keyframes ballSpin { from { transform: rotate(0deg);} to { transform: rotate(360deg);} }
.sim-spinner-label {
  margin-top: 0.9rem; color: #fff;
  font-family: 'Oswald', sans-serif; text-transform: uppercase; letter-spacing: 1px; font-size: 0.85rem;
}
.sim-spinner-inner { display: flex; flex-direction: column; align-items: center; }

/* Record book */
.records-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 1rem;
}
.record-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0.9rem 1rem;
}

/* ============================================================
   Masthead: module logo on the left with its name beside it, the same
   pattern as the recruiting page, sitting under the shared site header.
   ============================================================ */
.rp-header {
  gap: 1rem;
  padding: 1.4rem 5% 0.6rem;
}
.rp-header-logo { width: 72px; height: 72px; flex: none; }
.rp-header-kicker {
  font-family: 'Oswald', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
}
.rp-header-kicker:hover { text-decoration: underline; text-underline-offset: 3px; }
.rp-header .rp-header-title {
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-main);
  margin: 0.1rem 0 0;
  padding: 0;
  border: 0;
}
@media (max-width: 720px) {
  .rp-header { padding: 1rem 1rem 0.4rem; gap: 0.8rem; }
  .rp-header-logo { width: 54px; height: 54px; }
}

/* Links styled as buttons never show an underline. */
a.sim-btn, a.sim-btn:hover { text-decoration: none; }

/* Form controls take the page font (browsers don't pass it down). */
button, input, select, textarea { font-family: inherit; }

/* The masthead above already shows the NCAA RP logo. */
.home-screen-logo { display: none; }

/* The closed drawer sits just off-screen; keep its shadow from bleeding
   onto the page edge until it's open. */
.side-drawer:not(.open) { box-shadow: none; visibility: hidden; transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0.25s; }
.side-drawer.open { visibility: visible; transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1); }

/* ---- Offseason draft results (links to the Draft RP) ---- */
.draft-results-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.draft-results-head .award-table-title { margin-bottom: .5rem; }
.text-link { color: var(--accent); font-weight: 600; text-decoration: none; font-size: .9rem; }
.text-link:hover { text-decoration: underline; }
.drawer-section code { font-size: .85em; }

/* Dashboard: a way back into the offseason screen once the season ends */
.dash-offseason-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  background: var(--accent-soft); border: 1px solid var(--accent); border-radius: var(--r-md);
  padding: 0.85rem 1.1rem; margin-bottom: 1.25rem;
}
.dash-offseason-banner strong { display: block; font-family: 'Oswald', sans-serif; text-transform: uppercase; letter-spacing: 0.04em; }
.dnp-row td { opacity: 0.6; font-style: italic; }
.withdrew-title { color: var(--win); }
.withdrew-table { border-left: 3px solid var(--win); }

/* ============================================================
   Printed-style brackets (NCAA and conference tournaments)

   Columns of games; each pair of games is joined by a line that runs
   into the game it feeds. Games in a pair sit at 1/4 and 3/4 of the
   pair's height (flex space-around), so the joins line up round to
   round without any measuring in JavaScript.
   ============================================================ */
.nb-scroll { overflow-x: auto; padding: 0.25rem 0 0.75rem; -webkit-overflow-scrolling: touch; }
.nb-bracket {
  --nb-gap: 18px; --nb-col: 150px; --nb-line: color-mix(in srgb, var(--text-muted) 55%, transparent);
  display: flex; align-items: stretch; gap: 0; min-width: max-content; font-size: 0.74rem;
}
.nb-side { display: flex; gap: var(--nb-gap); }
.nb-side.nb-right { flex-direction: row-reverse; }
.nb-col { width: var(--nb-col); display: flex; flex-direction: column; }
.nb-region { flex: 1; display: flex; flex-direction: column; position: relative; }
.nb-region + .nb-region { margin-top: 14px; }
.nb-region-label {
  position: absolute; top: -2px; left: 0; font-family: 'Oswald', sans-serif; font-size: 0.68rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent);
}
.nb-right .nb-region-label { left: auto; right: 0; }
.nb-region:has(.nb-region-label) { padding-top: 14px; }
.nb-pair { flex: 1; display: flex; flex-direction: column; justify-content: space-around; position: relative; }
.nb-single { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.nb-game { position: relative; background: var(--card-bg); border: 1px solid var(--border); border-radius: 6px; margin: 3px 0; }
.nb-team { display: flex; align-items: center; gap: 4px; height: 20px; padding: 0 5px; cursor: pointer; white-space: nowrap; }
.nb-team + .nb-team { border-top: 1px solid var(--border); }
.nb-team.empty { cursor: default; }
.nb-team:hover:not(.empty) { background: var(--card-hover); }
.nb-seed { width: 14px; flex-shrink: 0; text-align: right; color: var(--text-muted); font-size: 0.66rem; font-weight: 700; }
.nb-logo { width: 14px; height: 14px; object-fit: contain; flex-shrink: 0; }
.nb-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nb-score { font-weight: 700; margin-left: 3px; }
.nb-team.win { font-weight: 700; color: var(--text-main); }
.nb-team.win .nb-score { color: var(--accent); }
.nb-team.loss { color: var(--text-muted); }
.nb-team.loss .nb-logo { opacity: 0.55; }
.nb-team.auto .nb-seed { color: var(--gold); }

/* Lines: every game reaches out toward the next round; each pair is
   joined by a vertical line halfway into the gap. */
.nb-left .nb-col:not(:last-child) .nb-game::after,
.nb-conf .nb-col:not(:last-child) .nb-game::after {
  content: ''; position: absolute; top: 50%; right: calc(-1 * var(--nb-gap) / 2 - 1px); width: calc(var(--nb-gap) / 2); border-top: 1px solid var(--nb-line);
}
.nb-left .nb-col:not(:first-child) .nb-game::before,
.nb-conf .nb-col:not(:first-child) .nb-game::before {
  content: ''; position: absolute; top: 50%; left: calc(-1 * var(--nb-gap) / 2 - 1px); width: calc(var(--nb-gap) / 2); border-top: 1px solid var(--nb-line);
}
.nb-left .nb-col:not(:last-child) .nb-pair::after,
.nb-conf .nb-col:not(:last-child) .nb-pair::after {
  content: ''; position: absolute; top: 25%; bottom: 25%; right: calc(-1 * var(--nb-gap) / 2 - 1px); border-right: 1px solid var(--nb-line);
}
.nb-right .nb-col:not(:last-child) .nb-game::after {
  content: ''; position: absolute; top: 50%; left: calc(-1 * var(--nb-gap) / 2 - 1px); width: calc(var(--nb-gap) / 2); border-top: 1px solid var(--nb-line);
}
.nb-right .nb-col:not(:first-child) .nb-game::before {
  content: ''; position: absolute; top: 50%; right: calc(-1 * var(--nb-gap) / 2 - 1px); width: calc(var(--nb-gap) / 2); border-top: 1px solid var(--nb-line);
}
.nb-right .nb-col:not(:last-child) .nb-pair::after {
  content: ''; position: absolute; top: 25%; bottom: 25%; left: calc(-1 * var(--nb-gap) / 2 - 1px); border-left: 1px solid var(--nb-line);
}
/* Each side's Final Four game reaches into the title game in the middle. */
.nb-col-ff { position: relative; }
.nb-col-label {
  position: absolute; left: 0; right: 0; top: calc(50% - 44px); text-align: center;
  font-family: 'Oswald', sans-serif; font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted);
}
.nb-left .nb-col:last-child .nb-game::after { content: ''; position: absolute; top: 50%; right: calc(-1 * var(--nb-gap) - 1px); width: var(--nb-gap); border-top: 1px solid var(--nb-line); }
.nb-right .nb-col:last-child .nb-game::after { content: ''; position: absolute; top: 50%; left: calc(-1 * var(--nb-gap) - 1px); width: var(--nb-gap); border-top: 1px solid var(--nb-line); }

/* Centre: the title game, with the champion underneath. */
.nb-center { display: flex; align-items: center; justify-content: center; padding: 0 var(--nb-gap); }
.nb-final { width: calc(var(--nb-col) + 30px); position: relative; text-align: center; }
.nb-final .nb-final-label { position: absolute; bottom: calc(100% + 6px); left: -20px; right: -20px; }
.nb-final-label, .nb-champion-label, .nb-ff-title, .nb-col-title {
  font-family: 'Oswald', sans-serif; font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 4px;
}
.nb-title { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-soft-strong); text-align: left; }
.nb-champion { position: absolute; top: calc(100% + 18px); left: -30px; right: -30px; text-align: center; }
.nb-champion-box {
  min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  border: 1px solid var(--gold); border-radius: 8px; padding: 0.4rem 0.8rem;
  font-family: 'Oswald', sans-serif; font-size: 1rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--gold);
  background: color-mix(in srgb, var(--gold) 10%, var(--card-bg));
}
.nb-champ-logo { width: 28px; height: 28px; object-fit: contain; }

/* The NCAA bracket is compact, and on wide screens it breaks out of the
   panel to use the whole window so all 64 lines show at once. */
.nb-ncaa { --nb-col: 108px; --nb-gap: 14px; font-size: 0.7rem; }
.nb-ncaa .nb-logo { width: 12px; height: 12px; }
/* Inside the regions the names need every pixel; logos return from the
   Final Four on. */
.nb-ncaa .nb-side .nb-logo { display: none; }
.nb-ncaa .nb-team { padding: 0 4px; gap: 3px; }
.nb-ncaa .nb-seed { width: 12px; }
.nb-ncaa .nb-score { margin-left: 2px; }
.nb-ncaa .nb-name { font-family: 'Asap Condensed', 'Arial Narrow', sans-serif; font-size: 0.78rem; letter-spacing: 0.01em; }
/* Short names inside the bracket itself; full names everywhere else. */
.nb-short { display: none; }
.nb-ncaa .nb-side .nb-short, .nb-ncaa .nb-final .nb-short { display: inline; }
.nb-ncaa .nb-side .nb-full, .nb-ncaa .nb-final .nb-full { display: none; }
@media (min-width: 1100px) {
  /* Size the columns to the window so the whole bracket fits:
     ten side columns, the title game and the gaps between them. */
  .nb-ncaa { --nb-gap: 12px; --nb-col: clamp(92px, calc((100vw - 64px - 30px - 10 * 12px) / 11), 132px); }
}
.nb-bracket { width: max-content; margin: 0 auto; }
@media (min-width: 1100px) {
  .nb-wide { width: calc(100vw - 48px); position: relative; left: 50%; transform: translateX(-50%); }
}

/* First Four strip under the bracket */
.nb-first-four { margin-top: 0.75rem; }
.nb-ff-games { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0.6rem; }
.nb-ff-item { display: flex; flex-direction: column; font-size: 0.74rem; }
.nb-ff-meta { color: var(--text-muted); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.06em; }

/* Conference tournaments: one side, titled columns, champion at the end. */
.nb-conf { --nb-col: 160px; }
.nb-conf .nb-col-body { flex: 1; display: flex; flex-direction: column; }
.nb-conf .nb-col { min-height: 100%; }
.nb-bye .nb-bye-line { color: var(--text-muted); font-style: italic; cursor: default; }
.nb-conf-champ { display: flex; flex-direction: column; justify-content: center; padding-left: 1.2rem; }
.nb-conf-champ .nb-champion-box { min-width: 160px; font-size: 0.9rem; }
.conf-bracket .bracket-conf-title { margin-bottom: 0.5rem; }

/* Bracketology */
.bracketology-head { margin-bottom: 0.5rem; }
.bl-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 1.25rem; align-items: start; }
.bl-lines { display: grid; gap: 4px; }
.bl-row { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 0.5rem; padding: 4px 0; border-bottom: 1px solid var(--border); }
.bl-seed { font-family: 'Oswald', sans-serif; font-size: 1.05rem; font-weight: 700; color: var(--accent); text-align: center; }
.bl-teams { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.bl-team { display: inline-flex; align-items: center; gap: 5px; font-size: 0.85rem; cursor: pointer; white-space: nowrap; }
.bl-team:hover { color: var(--accent); }
.bl-team.bl-auto { color: var(--gold); }
.bl-team.bl-playin { color: var(--text-muted); font-style: italic; cursor: default; }
.bl-side { display: grid; gap: 0.75rem; }
.bl-bubble { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--r-md); padding: 0.75rem 0.9rem; display: grid; gap: 5px; }
.bl-bubble h5 { font-family: 'Oswald', sans-serif; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.78rem; margin-bottom: 2px; }
.bl-bubble.in h5 { color: var(--win); }
.bl-bubble.out h5 { color: var(--loss); }
.conf-cell { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 860px) { .bl-grid { grid-template-columns: 1fr; } }

.nb-bracket.nb-conf { margin: 0; }
