:root {
  --bg: #0b0c0f;
  --surface: #13161b;
  --surface-raised: #1a1e25;
  --surface-soft: #20252d;
  --border: #2a3039;
  --border-strong: #3b4350;
  --text: #f4f6f8;
  --muted: #9da5b0;
  --muted-strong: #c0c6ce;
  --accent: #d4ff3f;
  --accent-soft: rgba(212, 255, 63, 0.12);
  --warning: #ffd980;
  --warning-bg: #2a2312;
  --warning-border: #5f4a18;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  --radius-lg: 22px;
  --radius-md: 15px;
  --max-width: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(212, 255, 63, 0.07), transparent 32rem),
    var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a {
  color: inherit;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(11, 12, 15, 0.92);
}

.site-nav {
  width: min(var(--max-width), calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--accent);
  color: #111;
  font-size: 13px;
  letter-spacing: 0.05em;
}

.brand-text {
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-links a {
  color: var(--muted-strong);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--accent);
}

.hero {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0 56px;
}

.hero-copy {
  max-width: 900px;
}

.hero h1 {
  max-width: 950px;
  margin: 0;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.subtitle {
  max-width: 760px;
  margin: 24px 0 0;
  color: var(--muted-strong);
  font-size: clamp(17px, 2vw, 20px);
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 12px;
  font-weight: 800;
}

.summary-grid {
  margin-top: 38px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.summary-card {
  min-height: 126px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(26, 30, 37, 0.72);
}

.summary-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.summary-card strong {
  display: block;
  margin-top: 12px;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1;
  letter-spacing: -0.04em;
}

main {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 32px auto;
}

.panel {
  scroll-margin-top: 18px;
  background: linear-gradient(180deg, rgba(24, 28, 34, 0.98), rgba(19, 22, 27, 0.98));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 26px;
  box-shadow: var(--shadow);
}

.section-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  margin-bottom: 24px;
}

h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: -0.04em;
}

.section-copy {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--muted);
}

.season-control {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

select {
  min-width: 118px;
  background: var(--surface-soft);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  padding: 11px 38px 11px 12px;
  font-size: 16px;
  font-weight: 700;
}

select:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(212, 255, 63, 0.35);
  outline-offset: 3px;
}

.notice {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  color: var(--warning);
  padding: 13px 15px;
  border-radius: 11px;
  margin-bottom: 17px;
}

.hidden {
  display: none;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
}

table {
  width: 100%;
  min-width: 850px;
  border-collapse: collapse;
  background: var(--surface);
}

th,
td {
  text-align: left;
  padding: 14px 15px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

th {
  background: #171b21;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

td {
  color: #e9edf1;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover td {
  background: rgba(255, 255, 255, 0.018);
}

.champion-row td {
  color: var(--accent);
  font-weight: 800;
  background: var(--accent-soft);
}

.card-grid,
.record-grid,
.champions-list {
  display: grid;
  gap: 16px;
}

.card-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.record-grid {
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
}

.champions-list {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.manager-card,
.record-card,
.champion-card {
  position: relative;
  overflow: hidden;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
}

.manager-card::before,
.record-card::before,
.champion-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: transparent;
}

.manager-card:hover,
.record-card:hover,
.champion-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.manager-card:hover::before,
.record-card:hover::before,
.champion-card:hover::before {
  background: var(--accent);
}

.manager-card,
.record-card,
.champion-card {
  transition:
    transform 140ms ease,
    border-color 140ms ease;
}

.manager-card h3,
.record-card h3,
.champion-card h3 {
  margin: 0 0 9px;
  font-size: 21px;
  letter-spacing: -0.025em;
}

.meta {
  color: var(--muted);
  margin: 4px 0;
  line-height: 1.45;
}

.stat-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: 10px;
  color: var(--muted-strong);
}

.stat-line strong {
  color: var(--text);
}

footer {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto 42px;
  color: #737b86;
  font-size: 14px;
}

@media (max-width: 820px) {
  .site-nav {
    min-height: 62px;
  }

  .nav-links {
    display: none;
  }

  .hero {
    padding: 46px 0 42px;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .season-control,
  .season-control select {
    width: 100%;
  }

  .panel {
    padding: 22px;
  }
}

@media (max-width: 520px) {
  .brand-text {
    display: none;
  }

  .hero h1 {
    font-size: 43px;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  main,
  .site-nav,
  .hero,
  footer {
    width: min(100% - 20px, var(--max-width));
  }

  main {
    margin-top: 20px;
  }

  .panel {
    padding: 18px;
    border-radius: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .manager-card,
  .record-card,
  .champion-card {
    transition: none;
  }
}

.season-actions {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--muted-strong);
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.status-badge--preseason {
  color: var(--warning);
  border-color: var(--warning-border);
  background: var(--warning-bg);
}

.status-badge--live {
  color: var(--accent);
  border-color: rgba(212, 255, 63, 0.36);
  background: var(--accent-soft);
}

.status-badge--complete {
  color: var(--text);
}

.status-badge--planned {
  color: var(--muted);
}

.notice--live {
  color: var(--accent);
  border-color: rgba(212, 255, 63, 0.36);
  background: var(--accent-soft);
}

.notice--preseason {
  color: var(--warning);
}

@media (max-width: 820px) {
  .season-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .status-badge {
    justify-content: center;
  }
}

.notice--official {
  color: var(--muted-strong);
  border-color: var(--border-strong);
  background: var(--surface-soft);
}

.season-table--preseason {
  min-width: 520px;
}

.season-table--live {
  min-width: 760px;
}

.season-table--completed {
  min-width: 1180px;
}

@media (max-width: 700px) {
  .table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .season-table {
    min-width: 0;
    background: transparent;
  }

  .season-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .season-table,
  .season-table tbody,
  .season-table tr,
  .season-table td {
    display: block;
    width: 100%;
  }

  .season-table tr {
    margin-bottom: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface);
  }

  .season-table td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
    padding: 10px 13px;
    white-space: normal;
    text-align: right;
  }

  .season-table td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-align: left;
    text-transform: uppercase;
  }

  .season-table tr:last-child td {
    border-bottom: 1px solid var(--border);
  }

  .season-table tr td:last-child {
    border-bottom: 0;
  }

  .season-table .champion-row {
    border-color: rgba(212, 255, 63, 0.42);
    background: var(--accent-soft);
  }
}

/* Manager profile experience */

button.manager-card {
  width: 100%;
  appearance: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.manager-card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.manager-card-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  color: var(--accent);
  font-weight: 700;
}

.manager-dialog {
  width: min(1080px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  overflow: visible;
}

.manager-dialog::backdrop {
  background: rgb(8 12 20 / 78%);
  backdrop-filter: blur(4px);
}

.manager-dialog-shell {
  position: relative;
  max-height: calc(100vh - 32px);
  padding: 30px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px rgb(0 0 0 / 42%);
}

.manager-dialog-close {
  position: sticky;
  z-index: 2;
  top: 0;
  float: right;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin: -8px -8px 0 18px;
  color: inherit;
  font: inherit;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.manager-dialog-close:hover,
.manager-dialog-close:focus-visible {
  border-color: var(--accent);
}

.manager-profile-header {
  max-width: 720px;
  padding-right: 48px;
}

.manager-profile-header h2 {
  margin: 4px 0 8px;
  font-size: clamp(30px, 6vw, 52px);
  letter-spacing: -0.04em;
}

.manager-profile-lede {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.manager-profile-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 26px;
}

.profile-stat,
.profile-detail,
.manager-profile-highlights article {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.profile-stat {
  padding: 15px;
}

.profile-stat span,
.profile-detail span,
.manager-profile-highlights article > span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.profile-stat strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
}

.manager-profile-section {
  margin-top: 30px;
}

.manager-profile-section h3 {
  margin: 0 0 14px;
  font-size: 20px;
}

.manager-profile-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}

.profile-detail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
}

.manager-profile-highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
}

.manager-profile-highlights article {
  padding: 18px;
}

.manager-profile-highlights article strong {
  display: block;
  margin: 5px 0 8px;
  font-size: 28px;
}

.manager-profile-highlights article > span + span {
  margin-top: 3px;
}

.manager-history-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.manager-history-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  background: var(--surface-raised);
}

.manager-history-table th,
.manager-history-table td {
  padding: 13px 14px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

.manager-history-table th {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.manager-history-table tbody tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 900px) {
  .manager-profile-stats {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }

  .manager-profile-overview {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
}

@media (max-width: 640px) {
  .manager-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  .manager-dialog-shell {
    max-height: calc(100vh - 16px);
    padding: 20px 16px;
    border-radius: var(--radius-md);
  }

  .manager-profile-header {
    padding-right: 24px;
  }

  .manager-profile-stats,
  .manager-profile-overview,
  .manager-profile-highlights {
    grid-template-columns: 1fr 1fr;
  }

  .manager-history-wrap {
    overflow: visible;
    border: 0;
  }

  .manager-history-table,
  .manager-history-table thead,
  .manager-history-table tbody,
  .manager-history-table tr,
  .manager-history-table th,
  .manager-history-table td {
    display: block;
    min-width: 0;
  }

  .manager-history-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .manager-history-table {
    background: transparent;
  }

  .manager-history-table tr {
    margin-bottom: 14px;
    padding: 10px 14px;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
  }

  .manager-history-table td {
    display: grid;
    grid-template-columns: minmax(105px, 0.8fr) 1fr;
    gap: 12px;
    padding: 8px 0;
    white-space: normal;
    border-bottom: 1px solid var(--border);
  }

  .manager-history-table td:last-child {
    border-bottom: 0;
  }

  .manager-history-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
}
