:root {
  color-scheme: dark;
  --bg: #000000;
  --surface: #0a0a0a;
  --surface-2: #111111;
  --text: #ffffff;
  --muted: #8e8e93;
  --muted-2: #636366;
  --line: #1c1c1e;
  --line-strong: #2c2c2e;
  --inverse: #000000;
  --header: rgba(0, 0, 0, .78);
  --shadow: 0 20px 70px rgba(0, 0, 0, .5);
  --button-hover: #171717;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f5f5f7;
  --surface-2: #ececee;
  --text: #000000;
  --muted: #6e6e73;
  --muted-2: #8e8e93;
  --line: #e5e5e7;
  --line-strong: #d2d2d7;
  --inverse: #ffffff;
  --header: rgba(255, 255, 255, .78);
  --shadow: 0 20px 70px rgba(0, 0, 0, .16);
  --button-hover: #eeeeef;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .25s ease, color .25s ease;
}

body.settings-open { overflow: hidden; }
button, input, select { font: inherit; }
button, select { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 64px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--line);
  background: var(--header);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
}

.brand {
  width: fit-content;
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -.045em;
}

.nav { display: flex; align-items: center; gap: 26px; }
.nav a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -.01em;
  transition: color .18s ease;
}
.nav a:hover, .nav a.active { color: var(--text); }

.header-actions { justify-self: end; display: flex; align-items: center; gap: 8px; }
.week-button,
.icon-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}
.week-button:hover, .icon-button:hover { background: var(--button-hover); border-color: var(--line-strong); }
.week-button:active, .icon-button:active { transform: scale(.96); }
.week-button { border-radius: 999px; padding: 8px 13px; font-size: 12px; font-weight: 600; letter-spacing: -.01em; }
.icon-button { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; }
.icon-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.hero {
  min-height: 420px;
  display: grid;
  grid-template-columns: 1.18fr .82fr;
  align-items: end;
  gap: 86px;
  padding: 104px 0 66px;
}

.eyebrow,
.section-label {
  margin: 0 0 11px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -.01em;
}

h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(58px, 7.6vw, 104px);
  line-height: .88;
  letter-spacing: -.075em;
  font-weight: 720;
}

.hero-text {
  max-width: 520px;
  margin: 25px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -.018em;
}

.search-box {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.search-box:focus-within { border-color: var(--line-strong); box-shadow: 0 0 0 4px var(--surface-2); }
.search-box > svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 15px; letter-spacing: -.015em; }
.search-box input::placeholder { color: var(--muted); }
kbd { border: 0; border-radius: 6px; padding: 3px 7px; background: var(--surface-2); color: var(--muted); font-family: inherit; font-size: 11px; }

.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
}
.filter-group { display: flex; gap: 7px; flex-wrap: wrap; }
.filter,
.select-wrap {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
}
.filter {
  min-width: 44px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: background .16s ease, color .16s ease, transform .16s ease, border-color .16s ease;
}
.filter:hover { border-color: var(--line-strong); color: var(--text); }
.filter:active { transform: scale(.96); }
.filter.active { background: var(--text); border-color: var(--text); color: var(--inverse); }

.select-wrap { position: relative; display: flex; align-items: center; min-width: 118px; }
.select-wrap select { width: 100%; appearance: none; border: 0; outline: 0; background: transparent; color: var(--text); padding: 8px 34px 8px 13px; font-size: 12px; font-weight: 600; cursor: pointer; }
.select-wrap svg { position: absolute; right: 11px; width: 14px; height: 14px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }

.panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
}
.panel-heading {
  min-height: 100px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 25px 26px;
  border-bottom: 1px solid var(--line);
}
h2 { margin: 0; font-size: 24px; line-height: 1.1; font-weight: 650; letter-spacing: -.045em; }
.live-state { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 600; text-transform: lowercase; }
.live-state i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted-2); }
.live-state.online i { background: var(--text); }

.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 780px; border-collapse: collapse; }
th, td { padding: 16px 20px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; letter-spacing: -.012em; }
th { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; font-weight: 650; }
tbody tr { transition: background .14s ease; }
tbody tr:not(.empty-row):hover { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }

.player-cell { display: flex; align-items: center; gap: 12px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--surface-2); border: 1px solid var(--line); }
.player-name { display: block; font-weight: 620; }
.player-team { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.trend-up, .trend-down, .trend-flat { color: var(--text); font-weight: 600; }

.call {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0 9px;
  background: transparent;
  color: var(--text);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
}
.call-start { background: var(--text); border-color: var(--text); color: var(--inverse); }
.call-maybe-start { border-color: var(--text); }
.call-maybe-bench { color: var(--muted); }
.call-bench, .call-injured { color: var(--muted); border-color: var(--line); }

.empty-state { min-height: 190px; display: grid; place-content: center; gap: 7px; padding: 30px; text-align: center; }
.empty-state strong { font-size: 14px; font-weight: 600; }
.empty-state span { color: var(--muted); font-size: 12px; }

.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.compact-panel .panel-heading { min-height: 92px; }
.arrow-mark { color: var(--muted); font-size: 24px; font-weight: 300; }
.placeholder-list { padding: 8px 22px 18px; }
.placeholder-item { padding: 19px 4px; color: var(--muted); font-size: 12px; }
.mover { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.mover:last-child { border-bottom: 0; }
.mover strong { font-size: 13px; font-weight: 620; }
.mover small { display: block; margin-top: 4px; color: var(--muted); }

footer { width: min(1180px, calc(100% - 40px)); margin: 72px auto 0; padding: 30px 0 44px; display: flex; justify-content: space-between; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
footer strong { color: var(--text); }

.settings-layer { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; pointer-events: none; visibility: hidden; }
.settings-layer.open { pointer-events: auto; visibility: visible; }
.settings-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(0,0,0,.52); opacity: 0; transition: opacity .22s ease; cursor: default; }
.settings-layer.open .settings-backdrop { opacity: 1; }
.settings-sheet {
  position: relative;
  width: min(460px, 100%);
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--bg);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px) scale(.985);
  transition: opacity .2s ease, transform .24s cubic-bezier(.2,.8,.2,1);
}
.settings-layer.open .settings-sheet { opacity: 1; transform: translateY(0) scale(1); }
.settings-head { display: flex; justify-content: space-between; align-items: center; padding: 24px 24px 20px; border-bottom: 1px solid var(--line); }
.close-button { width: 32px; height: 32px; background: var(--surface); }
.settings-group { padding: 24px; }
.setting-copy strong { display: block; font-size: 14px; font-weight: 650; }
.setting-copy span { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.theme-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.theme-option { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--text); padding: 10px; cursor: pointer; text-align: left; transition: border-color .16s ease, transform .16s ease, background .16s ease; }
.theme-option:hover { border-color: var(--line-strong); }
.theme-option:active { transform: scale(.98); }
.theme-option.active { border-color: var(--text); }
.theme-option > span:last-child { display: block; padding: 10px 3px 3px; font-size: 12px; font-weight: 620; }
.theme-preview { display: block; height: 96px; border-radius: 12px; border: 1px solid #2c2c2e; position: relative; overflow: hidden; }
.theme-preview::before { content: "DEPTH"; position: absolute; top: 12px; left: 12px; font-size: 8px; font-weight: 750; letter-spacing: -.03em; }
.theme-preview::after { content: ""; position: absolute; left: 12px; right: 12px; top: 34px; height: 38px; border-radius: 8px; border: 1px solid currentColor; opacity: .25; }
.preview-dark { background: #000; color: #fff; }
.preview-light { background: #fff; color: #000; border-color: #d2d2d7; }
.settings-note { margin: 0; padding: 0 24px 24px; color: var(--muted); font-size: 11px; }

@media (max-width: 760px) {
  .site-header { grid-template-columns: 1fr auto; padding: 0 16px; }
  .nav { display: none; }
  .week-button { display: none; }
  main { width: min(100% - 24px, 1180px); }
  .hero { min-height: 0; grid-template-columns: 1fr; gap: 42px; padding: 68px 0 40px; }
  h1 { font-size: clamp(58px, 18vw, 82px); }
  .hero-text { font-size: 15px; }
  .controls { align-items: flex-start; flex-direction: column; }
  .split-grid { grid-template-columns: 1fr; }
  .panel { border-radius: 18px; }
  .panel-heading { padding: 22px 18px; }
  th, td { padding: 14px 16px; }
  .settings-layer { align-items: end; padding: 10px; }
  .settings-sheet { border-radius: 26px 26px 18px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* DEPTH live data additions */
.panel-subtitle {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.player-row { cursor: pointer; outline: none; }
.player-row:focus-visible { box-shadow: inset 0 0 0 2px var(--text); }
.depth-score {
  display: inline-grid;
  min-width: 34px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 720;
  letter-spacing: -.02em;
}

.mover-button {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.mover-button:hover { opacity: .72; }

.player-layer {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  justify-items: end;
  pointer-events: none;
  visibility: hidden;
}
.player-layer.open { pointer-events: auto; visibility: visible; }
.player-layer .settings-backdrop {
  opacity: 0;
  transition: opacity .22s ease;
}
.player-layer.open .settings-backdrop { opacity: 1; }
.player-sheet {
  position: relative;
  width: min(560px, 100%);
  height: 100%;
  overflow-y: auto;
  border-left: 1px solid var(--line);
  background: var(--bg);
  box-shadow: var(--shadow);
  transform: translateX(28px);
  opacity: 0;
  transition: transform .26s cubic-bezier(.2,.8,.2,1), opacity .2s ease;
}
.player-layer.open .player-sheet { transform: translateX(0); opacity: 1; }
.player-sheet-head {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--header);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
}
.player-identity { display: flex; align-items: center; gap: 14px; min-width: 0; }
.player-photo {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  object-fit: cover;
  background: var(--surface);
  border: 1px solid var(--line);
}
.player-identity h2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-score-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 20px 22px 0;
}
.score-card {
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  padding: 16px;
}
.score-card span { color: var(--muted); font-size: 11px; }
.score-card strong { font-size: 28px; letter-spacing: -.05em; }
.player-call-block {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 10px 22px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}
.player-call-block h3 { margin: 0; font-size: 18px; letter-spacing: -.035em; }
.player-detail-section { padding: 24px 22px 0; }
.reason-list { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--surface); }
.reason-item {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  padding: 14px 15px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.reason-item:last-child { border-bottom: 0; }
.reason-item i { width: 5px; height: 5px; margin-top: 6px; border-radius: 50%; background: var(--text); }
.week-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding-bottom: 28px; }
.week-chip {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 14px;
}
.week-chip span { color: var(--muted); font-size: 10px; font-weight: 650; }
.week-chip strong { font-size: 20px; letter-spacing: -.04em; }

@media (max-width: 760px) {
  .player-layer { align-items: end; justify-items: stretch; padding-top: 10vh; }
  .player-sheet {
    width: 100%;
    height: 90vh;
    border-left: 0;
    border-top: 1px solid var(--line);
    border-radius: 26px 26px 0 0;
    transform: translateY(28px);
  }
  .player-layer.open .player-sheet { transform: translateY(0); }
  .player-score-grid { padding: 16px 14px 0; }
  .player-call-block { margin: 10px 14px 0; }
  .player-detail-section { padding: 22px 14px 0; }
  .player-sheet-head { padding: 16px 14px; }
}
