:root {
  --red: #ed1c2f;
  --ink: #101826;
  --navy: #07162f;
  --muted: #6d7480;
  --line: #dfe4eb;
  --bg: #f4f6f9;
  --white: #ffffff;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, Arial, sans-serif;
}
a { color: inherit; text-decoration: none; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 36px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-badge, .team-mark {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--white);
  background: var(--red);
  border-radius: 8px;
  font-weight: 900;
}
.brand-badge {
  width: 48px;
  height: 48px;
  color: inherit;
  background: transparent;
  border-radius: 0;
}
.brand-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.team-mark {
  overflow: hidden;
  flex: 0 0 auto;
}
.team-mark.has-team-logo {
  color: transparent;
  background: transparent !important;
  border: 0;
}
.team-mark-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.team-mark.has-team-logo .team-mark-initials {
  display: none !important;
}
.brand small { display: block; color: var(--muted); font-size: 12px; }
nav { display: flex; align-items: center; gap: 16px; font-size: 13px; font-weight: 800; }
nav a.active, nav a:hover, .table-link, table a { color: var(--red); }
.header-action, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 7px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}
.header-action, .button.primary { color: var(--white); background: var(--red); }
.button.secondary { color: var(--ink); background: var(--white); border: 1px solid var(--line); }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  gap: 32px;
  min-height: 520px;
  padding: 86px 48px;
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(7, 22, 47, 0.96), rgba(7, 22, 47, 0.72)),
    radial-gradient(circle at 80% 20%, rgba(237, 28, 47, 0.42), transparent 30%),
    #091326;
}
.hero h1, .page-title h1 { margin: 0; font-size: clamp(42px, 7vw, 78px); line-height: 0.95; letter-spacing: 0; }
.hero p { max-width: 680px; color: rgba(255, 255, 255, 0.82); font-weight: 700; }
.hero-title-block, .page-title, .game-hero-title-block {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  column-gap: 24px;
  align-items: center;
}
.hero-title-block::before, .page-title::before, .game-hero-title-block::before {
  content: "";
  grid-row: 1 / span 4;
  width: 116px;
  height: 116px;
  background: url("assets/branding/the-jump-brand-logo.png") center / contain no-repeat;
}
.hero-title-block > *, .page-title > *, .game-hero-title-block > * {
  grid-column: 2;
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.hero-board {
  display: grid;
  gap: 10px;
  align-self: end;
  padding: 22px;
  color: var(--ink);
  background: var(--white);
  border-left: 5px solid var(--red);
  border-radius: 8px;
  box-shadow: 0 22px 60px rgba(0,0,0,0.24);
}
.hero-board span { display: flex; justify-content: space-between; padding: 9px 0; border-top: 1px solid var(--line); font-weight: 800; }
.eyebrow, .section-kicker {
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.quick-grid, .team-grid, .detail-grid, .two-column {
  display: grid;
  gap: 16px;
  padding: 24px 48px;
}
.quick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--white); border-bottom: 1px solid var(--line); }
.quick-grid a, .team-card, .panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.quick-grid a { display: grid; gap: 6px; padding: 18px; }
.quick-grid span, .helper-text { color: var(--muted); font-size: 13px; }
.section, .page-title { padding: 42px 48px; }
.team-controls-section {
  padding: 34px 48px 12px;
  background: var(--white);
}
.league-selectors {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 14px;
  max-width: 720px;
  margin: 0 auto;
}
.league-lineup-page {
  width: min(920px, calc(100% - 36px));
  margin: 18px auto 0;
  background: var(--white);
}
.team-profile-card, .team-roster-card, .player-profile-card {
  margin-bottom: 16px;
  border: 2px solid var(--red);
  background: var(--white);
}
.team-profile-card > header, .team-roster-card > header, .player-profile-card > header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  color: var(--white);
  background: var(--red);
  font-weight: 900;
}
.page-brand-chip {
  display: inline-block;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  background: url("assets/branding/the-jump-brand-logo.png") center / contain no-repeat;
}
.team-profile-body {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  min-height: 260px;
  padding: 20px 22px;
}
.team-logo-frame {
  display: grid;
  place-items: center;
  width: 190px;
  height: 190px;
  background: #f7f8fb;
  border: 1px solid var(--line);
}
.team-logo-frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.team-logo-frame.has-team-logo .team-logo-img {
  display: block;
}
.team-logo-frame.has-team-logo .team-logo-fallback {
  display: none !important;
}
.team-logo-fallback {
  display: grid;
  place-items: center;
  width: 124px;
  height: 124px;
  color: var(--white);
  background: var(--team-color);
  border-radius: 10px;
  font-size: 34px;
  font-weight: 900;
}
.team-profile-details {
  align-self: end;
  display: grid;
  gap: 14px;
  max-width: 420px;
}
.team-profile-details dl { display: grid; gap: 8px; margin: 0; }
.team-profile-details div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px; }
.team-profile-details dt { font-weight: 900; }
.team-profile-details dd { margin: 0; }
.team-profile-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.player-profile-root {
  width: min(920px, 100%);
  margin: 0 auto;
}
.player-profile-summary {
  display: grid;
  gap: 16px;
  padding: 18px 20px;
}
.player-profile-summary dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
  margin: 0;
}
.player-profile-summary div {
  display: grid;
  gap: 4px;
}
.player-profile-summary dt {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--muted);
}
.player-profile-summary dd {
  margin: 0;
  font-weight: 900;
}
.mini-button {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  color: var(--ink);
  background: #f7f8fb;
  border: 1px solid #cbd3df;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 900;
}
.team-roster-card .roster-public, .team-roster-card .table-wrap { border: 0; border-radius: 0; }
.stats-table-note {
  margin: 14px 12px 4px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}
.stats-abbrev-link {
  margin: 0 12px 14px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}
.team-bottom-nav { padding-top: 20px; }
.bottom-selectors { margin: 0; }
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
h1, h2, h3, p { margin-top: 0; }
h2 { font-size: 30px; line-height: 1.05; }
.team-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0; }
.team-card { display: grid; gap: 10px; padding: 18px; font-weight: 900; }
.team-card .team-mark, .team-hero .team-mark { background: var(--team-color); }
.team-card .team-mark.has-team-logo, .team-hero .team-mark.has-team-logo {
  background: transparent !important;
}
.team-card small { color: var(--muted); }
.team-hero, .game-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 54px 48px;
  color: var(--white);
  background: var(--navy);
}
.game-hero-title-block {
  width: 100%;
}
.team-hero .team-mark { width: 96px; height: 96px; font-size: 28px; }
.detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 42px 48px; }
.two-column { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 42px 48px; }
.panel { padding: 22px; }
.table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; }
thead th { color: var(--white); background: var(--navy); font-size: 12px; text-transform: uppercase; }
tbody tr:nth-child(even) { background: #f0f3f7; }
.wide-table { min-width: 1100px; }
.court-grid-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: 8px; }
.court-grid-table { min-width: 920px; }
.court-grid-table th:first-child { width: 120px; }
.court-grid-table tbody th { color: var(--white); background: var(--navy); font-size: 13px; }
.court-grid-table td { width: 30%; vertical-align: top; }
.grid-game-link {
  display: block;
  min-height: 58px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--white);
  border-left: 4px solid var(--red);
  border-radius: 6px;
  font-weight: 900;
  line-height: 1.25;
}
.grid-game-link:hover { color: var(--red); background: #fff5f6; }
.open-slot {
  display: block;
  min-height: 58px;
  padding: 10px 12px;
  color: var(--muted);
  background: #f3f5f8;
  border: 1px dashed #cbd3df;
  border-radius: 6px;
  font-weight: 900;
}
.full-list {
  margin-top: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.full-list summary { padding: 14px 16px; cursor: pointer; font-weight: 900; }
.full-list .table-wrap { border: 0; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; }
.status {
  display: inline-flex;
  padding: 5px 9px;
  color: var(--navy);
  background: #e9edf5;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}
.clean-list { display: grid; gap: 10px; margin: 0; padding-left: 18px; }
.empty-box { padding: 22px; color: var(--muted); background: #f3f5f8; border: 1px dashed #cbd3df; border-radius: 8px; }
.stat-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat-strip span { padding: 16px; background: #f3f5f8; border-radius: 8px; font-weight: 900; }
.stat-strip strong { display: block; font-size: 28px; }
.matchup { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.matchup a { display: inline-flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 900; }
.score-grid {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) repeat(6, 56px);
  gap: 1px;
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.score-grid > * { padding: 10px; background: #f1f4f8; text-align: center; }
.score-grid > :nth-child(-n+7) { color: var(--white); background: var(--navy); font-weight: 900; }
.score-grid strong { text-align: left; }
.detail-list { display: grid; gap: 10px; margin: 0; }
.detail-list div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.detail-list dt { color: var(--muted); font-weight: 800; }
.detail-list dd { margin: 0; font-weight: 900; }
.admin-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 18px; padding: 0 48px 48px; }
.admin-menu { position: sticky; top: 82px; display: grid; gap: 8px; align-self: start; padding: 12px; background: var(--white); border: 1px solid var(--line); border-radius: 8px; }
.admin-menu a { padding: 10px; border-radius: 7px; font-weight: 900; }
.admin-menu a:hover { color: var(--white); background: var(--red); }
.admin-panels { display: grid; gap: 18px; }
.center-cell { text-align: center; }
.checkmark { color: var(--navy); font-size: 16px; font-weight: 900; }
.table-link-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  color: var(--red);
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  text-align: left;
}
.table-link-button:hover { text-decoration: underline; }
.team-name-control .team-mark { flex: 0 0 auto; }
.count-control {
  justify-content: center;
  min-width: 32px;
  min-height: 28px;
  padding: 0 8px;
  color: var(--red);
  background: #fff5f6;
  border: 1px solid #f7c6cf;
  border-radius: 6px;
}
.action-links { display: flex; flex-wrap: wrap; gap: 8px; }
.action-links a, .link-button {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  color: var(--red);
  background: #fff5f6;
  border: 1px solid #f7c6cf;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 900;
  font-family: inherit;
  cursor: pointer;
}
.link-button { border: 1px solid #f7c6cf; }
.action-links a:hover, .link-button:hover { color: var(--white); background: var(--red); border-color: var(--red); }
.admin-logo-cell { display: flex; align-items: center; gap: 10px; }
.admin-logo-cell .team-logo-frame { width: 58px; height: 58px; }
.admin-logo-cell .team-logo-fallback { width: 42px; height: 42px; border-radius: 6px; font-size: 14px; }
.mini-upload {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 9px;
  color: var(--red);
  background: #fff5f6;
  border: 1px solid #f7c6cf;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}
.mini-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 900; }
input, select, textarea {
  min-height: 40px;
  width: 100%;
  padding: 8px 10px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
  font-weight: 800;
}
.team-edit-panel,
.team-player-editor {
  margin-top: 18px;
  padding: 16px;
  background: #f7f8fb;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.team-edit-grid {
  display: grid;
  grid-template-columns: 160px repeat(4, minmax(120px, 1fr));
  gap: 12px;
  align-items: end;
}
.team-edit-logo-preview .team-logo-frame { width: 120px; height: 120px; }
.team-edit-logo-preview .team-logo-fallback { width: 86px; height: 86px; border-radius: 7px; font-size: 22px; }
.team-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.team-feature-grid span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.team-feature-grid strong { color: #0f6848; }
.team-player-toolbar {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}
.team-player-toolbar label { min-width: 220px; margin: 0; }
.team-player-edit-wrap { margin-top: 12px; }
.team-player-edit-table { min-width: 820px; }
.team-player-edit-table input, .team-player-edit-table select {
  min-height: 32px;
  padding: 5px 7px;
  border-radius: 3px;
}
.team-player-edit-table .team-player-number { max-width: 72px; }
.roster-entry-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 10px; }
.quick-add-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 14px;
  align-items: end;
}
.roster-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 10px; }
.quick-add-wrap {
  overflow-x: auto;
  margin-top: 12px;
  background: #e5e7eb;
  border: 1px solid #cbd3df;
  border-radius: 8px;
}
.quick-add-table {
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0;
}
.quick-add-table th, .quick-add-table td { padding: 6px; border-bottom: 1px solid #d3d8e0; }
.quick-add-table thead th { color: var(--white); background: var(--navy); }
.quick-add-table tbody th { width: 42px; color: var(--white); background: #1f2937; text-align: center; }
.quick-add-table input { min-height: 32px; padding: 5px 7px; border-radius: 3px; }
.quick-add-table .quick-number { max-width: 80px; }
.file-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
}
.file-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.status-message {
  min-height: 34px;
  padding: 9px 12px;
  color: var(--navy);
  background: #eef3ff;
  border: 1px solid #cad8f6;
  border-radius: 7px;
  font-weight: 800;
}
.status-message.error { color: #8a1222; background: #fff1f3; border-color: #f4b7c2; }
.status-message.success { color: #0f6848; background: #eefbf5; border-color: #b8e6d1; }
.roster-table-wrap { margin-top: 12px; }
.roster-table-wrap table { min-width: 680px; }
.team-schedule-editor {
  margin-bottom: 18px;
  padding: 16px;
  background: #f7f8fb;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.subsection-title {
  margin: 18px 0 10px;
  font-size: 18px;
}
.team-schedule-edit-table { min-width: 980px; }
.team-schedule-edit-table input,
.team-schedule-edit-table select {
  min-height: 32px;
  padding: 5px 7px;
  border-radius: 3px;
}
.notes-editor-grid {
  display: grid;
  gap: 12px;
}
.notes-editor-grid textarea {
  min-height: 180px;
  resize: vertical;
  line-height: 1.45;
}
.delete-player {
  min-height: 28px;
  padding: 0 9px;
  color: var(--white);
  background: var(--ink);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
}
.roster-public-table { min-width: 0; }
.roster-public-table th, .roster-public-table td { font-size: 13px; }
.player-stats-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}
.player-single-summary { min-width: 760px; }
.player-game-log { min-width: 940px; }
.player-stats-table th {
  padding: 7px 8px;
  color: var(--white);
  background: var(--red);
  border-right: 1px solid rgba(255,255,255,0.35);
  font-size: 11px;
  text-align: center;
}
.player-stats-table th:nth-child(2),
.player-stats-table td:nth-child(2) {
  text-align: left;
}
.player-stats-table td {
  padding: 7px 8px;
  border: 1px solid var(--line);
  font-size: 12px;
  text-align: center;
}
.player-stats-table tbody tr:nth-child(even) td { background: #f7f8fb; }
.player-stats-table .stats-total-row td {
  background: #fff;
  font-weight: 900;
}
.admin-score-grid input { min-height: auto; padding: 4px; text-align: center; }
footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 48px;
  color: rgba(255,255,255,0.72);
  background: var(--ink);
}
footer a { color: var(--white); }

@media (max-width: 900px) {
  .site-header { align-items: flex-start; flex-direction: column; padding: 16px; }
  nav { flex-wrap: wrap; }
  .hero, .quick-grid, .team-grid, .detail-grid, .two-column, .admin-layout, .roster-entry-grid, .quick-add-toolbar, .league-selectors, .team-profile-body, .player-profile-summary dl, .hero-title-block, .page-title, .game-hero-title-block, .team-edit-grid, .team-feature-grid {
    grid-template-columns: 1fr;
  }
  .hero-title-block::before, .page-title::before, .game-hero-title-block::before {
    grid-row: auto;
    grid-column: 1;
    width: 88px;
    height: 88px;
    margin-bottom: 12px;
  }
  .hero-title-block > *, .page-title > *, .game-hero-title-block > * {
    grid-column: 1;
  }
  .hero, .section, .page-title, .team-hero, .game-hero, .quick-grid, .detail-grid, .two-column, .admin-layout, footer, .team-controls-section {
    padding-left: 18px;
    padding-right: 18px;
  }
  .hero h1, .page-title h1 { font-size: 42px; }
  .team-logo-frame { width: 160px; height: 160px; }
}
