:root {
  color-scheme: light;
  
  /* Sidebar & Header (Dark Charcoal) */
  --header-bg: #141718;
  --sidebar-bg: #1c2022;
  --sidebar-text: #e1e3e5;
  --sidebar-muted: #949c9e;
  --sidebar-hover: #2a3033;
  --sidebar-active: #cc0000;
  
  /* Content Area Surfaces (Light Gray & White) */
  --bg: #f4f6f7;
  --panel: #ffffff;
  --panel-sub: #f8fafb;
  --line: #dbe1e3;
  --line-strong: #b5bec1;
  --text: #141718;
  --text-muted: #5c6567;
  
  /* Scarlet Accent Tokens */
  --scarlet: #cc0000;
  --scarlet-hover: #a30000;
  --scarlet-light: #fff0f0;
  --scarlet-border: #f5b3b3;
  
  --dark-charcoal: #141718;
  --medium-gray: #5c6567;
  --light-gray: #eef1f2;
  --white: #ffffff;
  
  --gold: #b37400;
  --gold-bg: #fff8e6;
  --belt-blue: #0055b3;
  --belt-bg: #eaf2fc;
  
  font-family: Inter, Segoe UI, system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

header {
  height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #00000022;
  background: var(--header-bg);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 4;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand-shield {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand strong {
  font-size: 1.1rem;
}

#menu {
  display: none;
  background: var(--sidebar-hover);
  color: var(--white);
  border: 1px solid var(--sidebar-muted);
}

.layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: calc(100vh - 64px);
}

nav {
  padding: 20px 14px;
  border-right: 1px solid var(--line);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
}

.nav-section-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--sidebar-muted);
  margin: 18px 10px 6px;
  font-weight: 700;
}

.nav-section-title:first-child {
  margin-top: 4px;
}

nav a {
  display: block;
  padding: 9px 12px;
  margin: 2px 0;
  border-radius: 6px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.15s ease, color 0.15s ease;
}

nav a:hover {
  background: var(--sidebar-hover);
  color: var(--white);
}

nav a.active {
  background: var(--scarlet);
  color: var(--white);
  font-weight: 700;
}

main {
  padding: 30px 36px;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

h1 {
  margin: 0 0 6px;
  font-size: clamp(1.7rem, 3.5vw, 2.5rem);
  color: var(--dark-charcoal);
  font-weight: 850;
}

h2 {
  margin-top: 32px;
  margin-bottom: 14px;
  font-size: 1.3rem;
  color: var(--dark-charcoal);
  border-bottom: 2px solid var(--line);
  padding-bottom: 6px;
  font-weight: 800;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--scarlet);
  font-size: 0.75rem;
  margin-bottom: 4px;
  font-weight: 800;
}

.muted {
  color: var(--text-muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 18px 0;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.card h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  color: var(--text);
}

.owner-notable-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.owner-notable-card {
  min-width: 0;
}

.owner-notable-card h3 {
  margin-bottom: 12px;
}

.compact-list {
  margin: 0;
  padding-left: 18px;
}

.compact-list li {
  margin: 6px 0;
}

.owner-hof-list li {
  margin-bottom: 10px;
}

.owner-retired-number-gallery {
  display: grid;
  gap: 12px;
  justify-items: center;
  margin: 0 0 16px;
}

.owner-retired-number-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;
  width: 100%;
}

.owner-retired-number-item {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 1 clamp(58px, 17vw, 132px);
  max-width: 132px;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: zoom-in;
}

.owner-retired-number-item img {
  display: block;
  width: 100%;
  max-height: 96px;
  object-fit: contain;
}

.cfc-game-logo-wrap {
  display: flex;
  justify-content: center;
  margin: 8px auto 14px;
}

.cfc-game-logo {
  width: min(360px, 72vw);
  max-height: 220px;
  object-fit: contain;
  display: block;
}

.championship-banner-wrap {
  display: grid;
  justify-items: center;
  align-items: center;
  margin: 0 auto;
  width: 100%;
}

.championship-banner-artifact {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 210px;
  height: 248px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  position: static;
  text-decoration: none;
}

.championship-banner-artifact img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 248px;
  margin: 0 auto;
  object-fit: contain;
  position: static;
  transform: none;
}

.zoomable-artifact img {
  transition: transform 0.15s ease, filter 0.15s ease;
}

.zoomable-artifact:hover img,
.zoomable-artifact:focus-visible img {
  transform: scale(1.035);
  filter: drop-shadow(0 5px 12px rgba(0,0,0,0.18));
}

.championship-banner-artifact:hover img,
.championship-banner-artifact:focus-visible img {
  transform: none;
  filter: none;
}

.zoomable-artifact:focus-visible {
  outline: 1px solid var(--line);
  outline-offset: 3px;
}

.championship-banner-game-link {
  color: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
}

.championship-banner-game-link:hover,
.championship-banner-game-link:focus-visible {
  color: var(--scarlet);
  text-decoration: underline;
}

.artifact-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.68);
}

.artifact-preview-panel {
  position: relative;
  display: grid;
  gap: 12px;
  justify-items: center;
  max-width: min(920px, 94vw);
  max-height: 92vh;
  padding: 16px;
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(0,0,0,0.32);
}

.artifact-preview-panel img {
  max-width: min(860px, 88vw);
  max-height: 72vh;
  object-fit: contain;
  display: block;
}

.artifact-preview-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
}

.artifact-preview-link {
  justify-self: center;
}

.compact-table-wrap table {
  font-size: 0.9rem;
}

.owner-player-table-wrap {
  overflow-x: visible;
}

.owner-player-table {
  width: 100%;
  table-layout: fixed;
}

.owner-player-table th,
.owner-player-table td {
  padding: 8px 10px;
}

.owner-player-table th:nth-child(1),
.owner-player-table td:nth-child(1) {
  width: auto;
  overflow-wrap: anywhere;
}

.owner-player-table th:nth-child(2),
.owner-player-table td:nth-child(2) {
  width: 48px;
  text-align: right;
  white-space: nowrap;
}

.owner-player-table th:nth-child(3),
.owner-player-table td:nth-child(3) {
  width: 88px;
  text-align: right;
  white-space: nowrap;
}

.owner-player-meta {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.25;
}

.owner-compact-hof-name {
  font-weight: 900;
}

.trophy-card-link {
  color: inherit;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.trophy-card-link:hover,
.trophy-card-link:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  outline: none;
}

.trophy-card-championship-banner {
  border: 2px solid var(--gold) !important;
}

.rivalry-card-link {
  color: inherit;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.rivalry-card-link:hover,
.rivalry-card-link:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  outline: none;
}

.h2h-short-label {
  display: none;
}

.h2h-section th,
.h2h-section td {
  white-space: nowrap;
}

.h2h-page a:not(.btn) {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 3px;
}

.h2h-page a:not(.btn):hover,
.h2h-page a:not(.btn):focus-visible {
  color: var(--text);
  text-decoration: underline;
}

.h2h-page .muted a:not(.btn),
.h2h-page a.muted:not(.btn) {
  color: inherit;
}

.position-points-chart {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  justify-items: center;
}

.position-points-donut {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  position: relative;
  border: 1px solid var(--line);
}

.position-points-donut::after {
  content: "";
  position: absolute;
  inset: 28px;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--line);
}

.position-points-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.position-points-legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
}

.position-points-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex: 0 0 auto;
}

.season-blowout-cell {
  white-space: normal;
}

.season-blowout-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: baseline;
  line-height: 1.35;
}

.season-blowout-meta {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.season-bracket-game-link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.season-bracket-game-link:hover,
.season-bracket-game-link:focus-visible {
  border-color: var(--scarlet) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-1px);
  outline: none;
}

.owner-card {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.owner-card:hover, .owner-card:focus {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border-color: var(--gold, #d97706);
}

.owner-card h3.owner-name {
  margin: 0 0 4px 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.owner-card .owner-tenure {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.owner-card .owner-accolade {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold, #d97706);
  margin: 4px 0;
}

.owner-card .owner-record {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin: 8px 0 4px 0;
}

.owner-card .owner-stats {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.metric {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--dark-charcoal);
}

.metric-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Hall of Fame gallery */
.hall-page {
  max-width: 1180px;
  margin: 0 auto;
}

.hall-hero {
  padding: 4px 0 24px;
  border-bottom: 1px solid var(--line-strong);
}

.hall-hero h1 {
  text-transform: uppercase;
  letter-spacing: 0;
}

.hall-hero p:last-child {
  margin: 8px 0 0;
  max-width: 660px;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.55;
}

.hall-class {
  padding: 34px 0 42px;
  border-bottom: 1px solid var(--line);
}

.hall-class-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.hall-class-heading h2 {
  margin: 0;
  padding: 0 0 8px;
  border-bottom: 3px solid var(--scarlet);
  font-size: clamp(1.3rem, 2vw, 1.85rem);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hall-class-heading span {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.hall-grid {
  --hall-gap: 30px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 34px var(--hall-gap);
}

.hall-inductee {
  flex: 0 1 calc((100% - (2 * var(--hall-gap))) / 3);
  max-width: 330px;
  min-width: 250px;
  text-align: center;
}

.hall-image-frame {
  height: 315px;
  display: flex;
  align-items: end;
  justify-content: center;
  margin-bottom: 14px;
}

.hall-inductee img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
}

.hall-image-frame a {
  display: block;
  width: 100%;
  height: 100%;
}

.hall-dst .hall-image-frame {
  align-items: center;
}

.hall-dst img {
  width: min(82%, 250px);
  height: min(82%, 250px);
  object-position: center;
}

.hall-inductee h3 {
  margin: 0;
  font-size: 1.16rem;
  font-weight: 850;
  color: var(--dark-charcoal);
  line-height: 1.25;
}

.hall-inductee h3 a {
  color: inherit;
  text-decoration: none;
}

.hall-inductee h3 a:hover {
  color: var(--scarlet);
  text-decoration: underline;
}

.hall-inductee p {
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.hall-primary-owner a {
  color: var(--text-muted);
  text-decoration: none;
}

.hall-primary-owner a:hover {
  color: var(--scarlet);
  text-decoration: underline;
}

.hall-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 130px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--text-muted);
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.62), transparent);
}

@media (max-width: 980px) {
  .hall-inductee {
    flex-basis: calc((100% - var(--hall-gap)) / 2);
  }
}

@media (max-width: 620px) {
  .hall-page {
    max-width: 420px;
  }

  .hall-class {
    padding: 28px 0 34px;
  }

  .hall-class-heading {
    display: block;
    margin-bottom: 18px;
  }

  .hall-class-heading span {
    display: block;
    margin-top: 8px;
  }

  .hall-grid {
    gap: 28px;
  }

  .hall-inductee {
    flex-basis: 100%;
    min-width: 0;
    max-width: 320px;
  }

  .hall-image-frame {
    height: 285px;
  }
}

/* Scoreboard Prototype Styling */
.scoreboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(460px, 1fr));
  gap: 16px;
  margin: 18px 0;
}

.scoreboard-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.scoreboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}

.scoreboard-designations {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.badge-designation {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--scarlet-light);
  color: var(--scarlet);
  border: 1px solid var(--scarlet-border);
}

.scoreboard-status {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: var(--light-gray);
  padding: 3px 8px;
  border-radius: 4px;
}

.team-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.team-row.winner {
  background: var(--scarlet-light);
}

.team-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.team-logo-slot {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 6px;
  background: var(--light-gray);
  border: 1px solid var(--line);
  display: block;
  cursor: pointer;
  transition: border-color 0.15s ease;
  overflow: hidden;
  place-items: center;
}

.team-logo-slot.has-shield {
  background: #fff;
  display: grid;
}

.team-logo-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.team-logo-slot:hover {
  border-color: var(--scarlet);
}

.owner-header-shield {
  width: clamp(76px, 14vw, 120px);
  height: clamp(76px, 14vw, 120px);
  object-fit: contain;
  display: block;
  margin: 0 auto 12px;
}

.team-names {
  min-width: 0;
  flex: 1;
}

.team-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  white-space: normal;
  word-break: break-word;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-decoration: none;
  cursor: pointer;
}

.team-name:hover {
  color: var(--scarlet);
  text-decoration: underline;
}

.team-row.winner .team-name {
  font-weight: 850;
  color: var(--dark-charcoal);
}

.team-subtext {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  text-decoration: none;
  cursor: pointer;
}

.team-subtext:hover {
  color: var(--scarlet);
  text-decoration: underline;
}

.team-scores {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-left: 12px;
  flex-shrink: 0;
}

.score-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-decoration: none;
  cursor: pointer;
}

.score-col:hover .col-val {
  color: var(--scarlet);
}

.col-label {
  font-size: 0.63rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.col-val {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.col-current-score .col-val {
  font-size: 1.3rem;
  font-weight: 850;
  color: var(--text);
}

.team-row.winner .col-current-score .col-val {
  color: var(--scarlet);
}

.winner-marker {
  color: var(--scarlet);
  font-size: 0.8rem;
  margin-right: 4px;
}

.scoreboard-footer {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

.rivalry-caption {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.rivalry-caption:hover {
  color: var(--scarlet);
  text-decoration: underline;
}

/* Title Badges */
.title-badges {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0 16px;
}

.badge-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  width: fit-content;
}

.badge-cup {
  background: var(--gold-bg);
  border: 1px solid var(--gold);
  color: var(--gold);
}

.badge-belt {
  background: var(--belt-bg);
  border: 1px solid var(--belt-blue);
  color: var(--belt-blue);
}

.badge-ugc {
  background: #fdf0f5;
  border: 1px solid #b5179e;
  color: #b5179e;
}

/* Tables */
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 16px 0;
  background: var(--panel);
}

.standings-table-wrap {
  margin-bottom: 6px;
  overflow-x: auto;
  width: max-content;
  max-width: 100%;
  box-sizing: border-box;
}

table.standings-table {
  width: auto;
  min-width: max-content;
  border-collapse: collapse;
}

.standings-table th, .standings-table td {
  padding: 4px 10px;
  font-size: 0.85rem;
}

.standings-table .team-logo-slot {
  width: 24px;
  height: 24px;
  min-width: 24px;
}

.standings-table .col-rk {
  font-weight: 800;
  width: 44px;
  text-align: center;
  color: var(--text-muted);
}

.standings-table .col-team {
  white-space: nowrap;
  padding-right: 24px;
}

.standings-table .team-name {
  font-size: 0.88rem;
  font-weight: 750;
  line-height: 1.2;
}

.standings-table .team-subtext {
  font-size: 0.76rem;
  color: #42494b;
  font-weight: 500;
  line-height: 1.2;
  display: block;
  text-decoration: none;
}

.standings-table .team-subtext:hover {
  color: var(--scarlet);
  text-decoration: underline;
}

.standings-table .col-rec {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: center;
  padding: 4px 14px;
  width: 76px;
}

.standings-table .col-stat {
  font-variant-numeric: tabular-nums;
  text-align: right;
  padding: 4px 14px;
  width: 76px;
}

.standings-table .col-streak {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: center;
  padding: 4px 14px;
  width: 68px;
}

.standings-table .col-streak .streak-w,
.streak-w {
  color: #15803d !important;
  font-weight: 800 !important;
}

.standings-table .col-streak .streak-l,
.streak-l {
  color: #dc2626 !important;
  font-weight: 800 !important;
}

.standings-table .col-streak .streak-n,
.streak-n {
  color: var(--text-muted);
  font-weight: 600;
}

th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--scarlet); }
.sort-icon { font-size: 0.7em; margin-left: 4px; color: var(--scarlet); }

/* Compact Transaction Cards */
.transaction-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
  width: 100%;
}

.tx-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tx-meta-line {
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.tx-team-line {
  margin-top: 2px;
}

.tx-team-link {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--scarlet);
  text-decoration: underline;
}

.tx-team-link:hover {
  color: var(--scarlet-hover);
}

.tx-team-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--dark-charcoal);
}

.tx-action-line {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark-charcoal);
  margin-bottom: 2px;
}

.tx-reporter-attr {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 4px;
}

.tx-excerpt-body {
  font-size: 0.85rem;
  line-height: 1.4;
  color: #333d40;
  background: var(--panel-sub);
  border-left: 3px solid var(--line-strong);
  padding: 6px 10px;
  border-radius: 0 4px 4px 0;
  margin-top: 2px;
}

.tx-excerpt-body strong {
  font-weight: 750;
  color: var(--dark-charcoal);
}


tbody.playoff-field-group {
  background: var(--light-gray);
  border-bottom: 2px solid var(--dark-charcoal);
}

tbody.playoff-field-group tr td {
  background: #edf1f3;
}

tbody.playoff-field-group tr:hover td {
  background: #e2e7ea;
}

.standings-footer-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
  margin-bottom: 16px;
  font-style: italic;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th, td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

th {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--light-gray);
  font-weight: 750;
}

tr:last-child td {
  border-bottom: 0;
}

tr:hover td {
  background: var(--panel-sub);
}

button, select, input, textarea {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 0.9rem;
}

textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  margin-top: 7px;
}

label {
  display: block;
  margin: 12px 0;
  color: var(--text-muted);
}

label select {
  display: block;
  margin-top: 7px;
  min-width: 240px;
}

button {
  cursor: pointer;
  background: var(--scarlet);
  color: var(--white);
  font-weight: 700;
  border: 0;
}

button:hover {
  background: var(--scarlet-hover);
}

button.secondary {
  background: var(--light-gray);
  color: var(--text);
  border: 1px solid var(--line-strong);
}

button.secondary:hover {
  background: var(--line);
}

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0;
  align-items: center;
}

.notice {
  border-left: 4px solid var(--scarlet);
  background: var(--scarlet-light);
  padding: 14px 16px;
  border-radius: 6px;
  margin: 16px 0;
  color: var(--text);
}

.danger {
  background: #dc3545;
  color: white;
}

.owner-link {
  color: var(--scarlet);
  cursor: pointer;
  text-decoration: underline;
  font-weight: 600;
}

.owner-link:hover {
  color: var(--scarlet-hover);
}

.empty {
  padding: 28px;
  color: var(--text-muted);
  text-align: center;
}

.loading {
  color: var(--text-muted);
  padding: 40px 0;
}

/* Operations styling preserved */
.overall {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--state);
  border-radius: 8px;
  margin: 18px 0;
  background: var(--panel);
}

.overall > span { font-size: 2rem; }
.overall h2 { margin: 0; border: 0; padding: 0; }
.health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.health-card { border-top: 5px solid var(--state); }
.state-green { --state: #28a745; }
.state-amber { --state: #ffc107; }
.state-red { --state: #dc3545; }
.status-label {
  color: var(--state);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.operation { padding: 10px 0; border-top: 1px solid var(--line); }
details { margin-top: 14px; }
.attention-list { display: grid; gap: 10px; }
.preview {
  background: var(--panel-sub);
  border: 1px solid var(--line);
  padding: 15px;
  border-radius: 8px;
}
.warning { color: #b37400; font-weight: 700; }

@media(max-width: 820px) {
  header { height: 58px; padding: 0 16px; }
  #menu { display: block; padding: 7px 10px; }
  .layout { display: block; }
  nav {
    display: none;
    position: fixed;
    top: 58px;
    left: 0;
    right: 0;
    z-index: 3;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    max-height: calc(100vh - 58px);
    overflow-y: auto;
  }
  nav.open { display: block; }
  main { padding: 20px 14px; }
  .grid, .health-grid, .scoreboard-grid { grid-template-columns: 1fr; }
  th, td { padding: 8px 10px; }
  .owner-player-table {
    font-size: 0.78rem;
  }
  .owner-player-table th,
  .owner-player-table td {
    padding: 7px 8px;
  }
  .owner-player-table th:nth-child(2),
  .owner-player-table td:nth-child(2) {
    width: 42px;
  }
  .owner-player-table th:nth-child(3),
  .owner-player-table td:nth-child(3) {
    width: 76px;
  }
  .h2h-section table {
    table-layout: auto !important;
    font-size: 0.78rem;
  }
  .h2h-section th,
  .h2h-section td {
    padding: 6px 5px;
  }
  .h2h-full-label {
    display: none;
  }
  .h2h-short-label {
    display: inline;
  }
}

/* Phase B.5 League Titles Redesign Styles */
.current-champions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin: 18px 0;
}

.champion-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.champion-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.cup-card {
  border-top: 4px solid var(--scarlet);
}

.belt-card {
  border-top: 4px solid var(--belt-blue);
}

.champ-link {
  color: inherit;
  text-decoration: none;
}

.champ-link:hover {
  text-decoration: underline;
}

.champ-name {
  font-size: 1.6rem;
  font-weight: 850;
  margin: 6px 0;
}

.champ-name a {
  color: var(--dark-charcoal);
  text-decoration: none;
}

.champ-name a:hover {
  color: var(--scarlet);
  text-decoration: underline;
}

.champ-reign {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--scarlet);
  margin-bottom: 4px;
}

.champ-meta {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.champ-detail {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.ugc-hero-card {
  background: linear-gradient(135deg, #18181b 0%, #27272a 100%);
  color: #ffffff;
  border-radius: 12px;
  padding: 28px;
  margin: 18px 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  border: 2px solid #eab308;
}

.ugc-hero-badge {
  display: inline-block;
  background: #eab308;
  color: #000000;
  font-weight: 900;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.ugc-hero-name {
  font-size: 2.2rem;
  font-weight: 900;
  margin: 0 0 6px;
}

.ugc-hero-name a {
  color: #ffffff;
  text-decoration: none;
}

.ugc-hero-name a:hover {
  color: #fef08a;
  text-decoration: underline;
}

.ugc-hero-cup {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fef08a;
  margin-bottom: 4px;
}

.ugc-hero-belt {
  font-size: 1.05rem;
  font-weight: 600;
  color: #e4e4e7;
  margin-bottom: 8px;
}

.ugc-hero-subtext {
  font-size: 0.95rem;
  font-weight: 600;
  color: #a1a1aa;
  margin: 0;
}

.season-link {
  color: var(--scarlet);
  text-decoration: none;
}

.season-link:hover {
  text-decoration: underline;
}

.belt-result-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
}

.belt-result-tag.defense {
  background: #e6f4ea;
  color: #137333;
}

.belt-result-tag.change {
  background: var(--scarlet-light);
  color: var(--scarlet);
}

.ugc-active {
  color: #137333;
  font-weight: 900;
}

.view-complete-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--scarlet);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.95rem;
}

.view-complete-link:hover {
  text-decoration: underline;
}

.btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn.primary {
  background: var(--scarlet);
  color: #ffffff;
}

.btn.primary:hover {
  background: var(--scarlet-hover);
}

.btn.secondary {
  background: var(--panel-sub);
  color: var(--text);
  border: 1px solid var(--line-strong);
}

.btn.secondary:hover {
  background: var(--line);
}
.state-unknown { --state: #6c757d; }

/* Record Book: restrained engraved plaques within the dashboard palette. */
.record-book { min-width: 0; }
.rb-intro { color: var(--text-muted); margin-top: -8px; }
.rb-navigation { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line-strong); padding-bottom: 6px; }
.rb-navigation a { padding: 6px 10px; color: var(--text-muted); text-decoration: none; border-radius: 3px; font-size: 13px; font-weight: 650; }
.rb-navigation a[aria-current] { background: var(--dark-charcoal); color: white; }
.rb-navigation a:hover { box-shadow: inset 0 -2px var(--scarlet); }
.rb-filters { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 10px; margin: 12px 0 16px; }
.rb-filters label { margin: 0; display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 650; min-width: 0; }
.rb-filters input, .rb-filters select { width: 100%; min-width: 0; margin: 0; }
.rb-filters :disabled { opacity: .65; cursor: not-allowed; }
.rb-filters p { grid-column: 1 / -1; font-size: 12px; color: var(--text-muted); margin: 0; }
.rb-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.rb-section-heading h2 { margin: 0; }
.rb-section-heading > span { color: var(--text-muted); font-size: 12px; }
.rb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.rb-plaque { background: #fffdf5; border: 1px solid #b6ad98; border-top: 4px solid var(--dark-charcoal); padding: 16px 20px 13px; box-shadow: inset 0 0 0 4px #eee9dc, 0 3px 7px #14171812; min-width: 0; display: flex; flex-direction: column; }
.rb-plaque[hidden] { display: none; }
.rb-plaque-heading { display: flex; justify-content: space-between; gap: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .1em; font-size: 9px; }
.rb-plaque h3 { font-size: 16px; margin: 10px 0 8px; font-weight: 750; }
.rb-value { font-family: Georgia, serif; font-variant-numeric: tabular-nums; font-size: clamp(36px, 4vw, 54px); line-height: 1.1; letter-spacing: -.04em; }
.rb-value > span { display: block; font-family: Inter, Segoe UI, sans-serif; font-size: 10px; text-transform: uppercase; letter-spacing: .13em; margin: 4px 0 10px; color: var(--text-muted); }
.rb-holder { font-size: 20px; font-weight: 750; }
.record-book a { text-underline-offset: 3px; }
.rb-holder a, .rb-runners a { color: var(--text); text-decoration: none; }
.rb-holder a:hover, .rb-runners a:hover { text-decoration: underline; }
.rb-context { color: var(--text-muted); font-size: 12px; line-height: 1.6; margin: 3px 0 9px; }
.rb-context a { color: inherit; }
.rb-seal { color: #806329; font-size: 9px; font-weight: 750; letter-spacing: .14em; margin: 0 0 10px; }
.rb-runners { list-style: none; margin: 0; padding: 5px 0 0; border-top: 1px solid #dedacf; }
.rb-runners li { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; padding: 5px 0; align-items: baseline; font-size: 12px; }
.rb-rank, .rb-versus { color: var(--text-muted); }
.rb-runners small { display: block; color: var(--text-muted); font-size: 10px; margin-top: 3px; }
.rb-detail-link { display: flex; justify-content: space-between; border-top: 1px solid #dedacf; padding-top: 9px; margin-top: 8px; text-decoration: none; color: var(--text); font-size: 12px; font-weight: 650; }
.rb-detail-link:hover { color: var(--scarlet); }
.rb-back { display: inline-block; margin-bottom: 18px; }
.rb-detail-plaque { max-width: 720px; }
.rb-empty { border: 1px solid var(--line); padding: 30px; color: var(--text-muted); background: var(--panel); }
.record-book .table-wrap { max-width: 100%; overflow-x: auto; }
.record-book td { font-size: 13px; }
.explorer-page .rb-navigation { margin-bottom: 10px; }
.explorer-control { display: flex; align-items: end; gap: 8px; margin: 14px 0 18px; }
.explorer-control label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 750; text-transform: uppercase; color: var(--text-muted); }
.explorer-control input { width: 150px; min-height: 36px; font-size: 18px; font-weight: 750; text-align: center; }
.explorer-control .btn { min-width: 38px; text-align: center; }
.explorer-control .btn.disabled { opacity: .45; pointer-events: none; }
@media (max-width: 800px) {
  .rb-grid { grid-template-columns: 1fr; }
  .rb-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rb-filters label:first-child { grid-column: 1 / -1; }
  .rb-plaque { padding: 16px; }
  .explorer-control { align-items: stretch; }
  .explorer-control input { width: 100%; }
}

.rb-filters input, .rb-filters select { padding: 7px 9px; min-height: 34px; }
.record-book td { padding-top: 9px; padding-bottom: 9px; }

/* Player Pages */
.player-page { display: grid; gap: 18px; min-width: 0; }
.player-search-card label { display: block; font-size: 12px; font-weight: 850; letter-spacing: .1em; color: var(--text-muted); margin-bottom: 8px; }
.player-search-card input { width: 100%; max-width: 560px; min-height: 42px; font-size: 18px; font-weight: 650; }
.player-results-heading { display: flex; gap: 8px; align-items: baseline; margin: 2px 0 -6px; }
.player-results { display: grid; gap: 8px; }
.player-explore-heading { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 12px; }
.player-explore-heading h2 { margin: 0; }
.player-explore-card td, .player-explore-card th { white-space: nowrap; }
.player-explore-card td:first-child, .player-explore-card th:first-child,
.player-explore-card td:last-child, .player-explore-card th:last-child { text-align: left; }
.player-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px 120px;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
}
.player-result:hover { border-color: var(--scarlet); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.player-result-name { font-weight: 850; }
.player-hof-name { color: #a66f00; font-weight: 900; }
.player-hof-name span { font-size: .85em; letter-spacing: .02em; }
.player-summary-heading { display: flex; justify-content: space-between; align-items: start; gap: 14px; margin-bottom: 16px; }
.player-summary-heading h2 { margin: 0; font-size: clamp(24px, 4vw, 38px); letter-spacing: 0; }
.player-metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.player-metric { border: 1px solid var(--line); background: var(--panel-muted); padding: 12px; min-width: 0; }
.player-metric span { display: block; font-size: 11px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.player-metric strong { display: block; font-size: 22px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.player-metric small { display: block; color: var(--text-muted); margin-top: 5px; line-height: 1.35; }
.career-total-row { font-weight: 850; background: var(--panel-muted); }
.player-accolade-section { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.player-accolade-section:first-of-type { border-top: 0; padding-top: 0; }
.player-accolade-section h3 { margin: 0 0 8px; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
.player-accolade-section ul { margin: 0; padding-left: 18px; }
.player-accolade-section li { margin: 5px 0; }
.player-page .table-wrap { max-width: 100%; overflow-x: auto; }
@media (max-width: 800px) {
  .player-result { grid-template-columns: 1fr; gap: 3px; }
  .player-explore-heading { display: block; }
  .player-explore-heading button { margin-top: 10px; }
  .player-summary-heading { display: block; }
  .player-summary-heading .btn { margin-top: 10px; }
  .player-metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .player-metrics-grid { grid-template-columns: 1fr; }
}
