/* ============================================================
   Help the Helper — Women's Basketball Stats
   Hardwood Editorial design system
   ------------------------------------------------------------
   Type: Fraunces (display serif) · DM Sans (UI) · JetBrains Mono (numerals)
   Palette: deep ink + court-clay accent + semantic positive/negative
   ============================================================ */

:root {
  /* surface */
  --bg:            #0a0b10;
  --bg-tint:       #0e1018;
  --panel:         #14171f;
  --panel-2:       #181c26;
  --panel-3:       #1d222e;
  --border:        #232936;
  --border-soft:   #1c2230;
  --rule:          rgba(255, 255, 255, 0.06);

  /* text */
  --text:          #e8ecf3;
  --text-strong:   #f7f9fc;
  --muted:         #8e96a8;
  --muted-2:       #6b7384;

  /* brand */
  --accent:        #ff7a3d;     /* court clay */
  --accent-bright: #ffa166;
  --accent-deep:   #c2461a;
  --accent-soft:   rgba(255, 122, 61, 0.12);
  --accent-line:   rgba(255, 122, 61, 0.55);
  --gold:          #d8b072;
  --watermark-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 312 144'%3E%3Cg fill='%23ff7a3d'%3E%3Cpath d='M0 58 30 44v88H0zM64 28l30-14v118H64V78H30V54h34zM116 36 206 0v38l-42 17v77h-30V67l-18 7zM226 28l30-14v73h34V0h22v132h-30V76h-26v56h-30z'/%3E%3C/g%3E%3C/svg%3E");

  /* semantic */
  --pos:           #34d399;     /* above average */
  --pos-soft:      rgba(52, 211, 153, 0.12);
  --neg:           #f87171;     /* below average */
  --neg-soft:      rgba(248, 113, 113, 0.12);

  /* radii / motion */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --sticky-table-top: 68px;

  /* type — local-first stacks keep the app quick while giving the brand some bite */
  --display: "Avenir Next Condensed", "Avenir Next", "Bahnschrift",
             "Arial Narrow", -apple-system, BlinkMacSystemFont, sans-serif;
  --sans:    "Avenir Next", "Segoe UI", -apple-system, BlinkMacSystemFont,
             Helvetica, Arial, sans-serif;
  --mono:    ui-monospace, "SF Mono", "SFMono-Regular", Menlo,
             "Cascadia Mono", Consolas, monospace;
}

/* ---------- base ---------- */

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

html { background: var(--bg); }

body {
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background:
    linear-gradient(115deg, rgba(255, 122, 61, 0.07), transparent 32%),
    linear-gradient(245deg, rgba(82, 109, 148, 0.07), transparent 38%),
    linear-gradient(180deg, var(--bg-tint), var(--bg) 34rem),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.28;
  background:
    linear-gradient(90deg, transparent 0 48px, rgba(255, 255, 255, 0.035) 48px 49px, transparent 49px 96px),
    linear-gradient(0deg, transparent 0 48px, rgba(255, 255, 255, 0.026) 48px 49px, transparent 49px 96px);
  -webkit-mask-image: linear-gradient(180deg, black, transparent 72%);
  mask-image: linear-gradient(180deg, black, transparent 72%);
}

a { color: var(--text); text-decoration: none; transition: color 0.15s var(--ease); }
a:hover { color: var(--accent); }

::selection { background: var(--accent-soft); color: var(--text-strong); }

/* ---------- navbar ---------- */

.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 26px;
  min-height: 68px;
  padding: 10px 32px;
  background:
    linear-gradient(180deg, rgba(24, 28, 38, 0.9), rgba(13, 15, 22, 0.82)),
    rgba(20, 23, 31, 0.86);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2);
}
.navbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-line), transparent);
  opacity: 0.72;
}

.navbar .brand a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  color: var(--text-strong);
}
.navbar .brand .brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 42px;
  padding: 2px;
  border-radius: var(--r-md);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent),
    rgba(255, 122, 61, 0.08);
  box-shadow: 0 0 0 1px rgba(255, 122, 61, 0.22), 0 10px 24px rgba(255, 122, 61, 0.13);
}
.navbar .brand .brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 5px 10px rgba(255, 122, 61, 0.22));
}
.brand-copy {
  display: grid;
  gap: 1px;
}
.navbar .brand .brand-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.035em;
  line-height: 1;
  text-transform: uppercase;
}
.navbar .brand .brand-tagline {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.navbar nav.primary { display: flex; gap: 6px; }
.navbar nav.primary a {
  position: relative;
  padding: 8px 12px;
  border-radius: var(--r-md);
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.01em;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.navbar nav.primary a:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.navbar nav.primary a.active {
  color: var(--text-strong);
  background: rgba(255, 255, 255, 0.05);
}
.navbar nav.primary a.active::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
}

/* ---------- navbar player search ---------- */

.player-search {
  position: relative;
  margin-left: auto;
  flex: 0 1 320px;
  min-width: 200px;
}
.player-search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  width: 11px;
  height: 11px;
  transform: translateY(-50%);
  border: 2px solid var(--muted);
  border-radius: 50%;
  box-shadow: 6px 6px 0 -3px var(--muted);
  opacity: 0.85;
  pointer-events: none;
}
.player-search-input {
  width: 100%;
  height: 36px;
  padding: 0 38px 0 32px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.005em;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease),
    box-shadow 0.15s var(--ease);
}
.player-search-input::-webkit-search-cancel-button { display: none; }
.player-search-input::placeholder {
  color: var(--muted);
  opacity: 1;
}
.player-search-input:hover { border-color: rgba(255, 255, 255, 0.18); }
.player-search-input:focus {
  outline: none;
  background: var(--panel-2);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.player-search-hint {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  pointer-events: none;
  transition: opacity 0.12s var(--ease);
}
.player-search:focus-within .player-search-hint { opacity: 0; }
.player-search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 90;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #11141c;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
  max-height: 380px;
  overflow-y: auto;
}
.player-search-results[hidden] { display: none; }
.player-search-result {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.1s var(--ease);
}
.player-search-result[aria-selected="true"],
.player-search-result:hover {
  background: rgba(255, 122, 61, 0.12);
}
.player-search-name {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-search-name mark {
  background: transparent;
  color: var(--accent-bright);
  font-weight: 700;
}
.player-search-meta {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.player-search-empty {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12.5px;
  font-style: italic;
}

.season-form {
  margin-left: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 6px 5px 10px;
  border: 1px solid var(--accent-line);
  border-radius: var(--r-md);
  background:
    linear-gradient(180deg, rgba(255, 122, 61, 0.13), rgba(255, 122, 61, 0.04)),
    var(--panel-2);
  box-shadow: 0 0 0 3px rgba(255, 122, 61, 0.05);
}
.season-form label {
  color: var(--accent-bright);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
}
.season-form select {
  background: rgba(10, 11, 16, 0.52);
  color: var(--text-strong);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-sm);
  padding: 6px 26px 6px 10px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.season-form select:hover { border-color: rgba(255, 161, 102, 0.75); }
.season-form select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.updated {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
}

/* ---------- main ---------- */

main {
  padding: 36px 28px 64px;
  max-width: 1850px;
  margin: 0 auto;
  animation: pageIn 0.5s var(--ease) both;
}

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

/* ---------- page heads ---------- */

.page-head, .player-head {
  position: relative;
  margin-bottom: 22px;
  padding: 2px 150px 0 0;
  overflow: hidden;
}
.page-head::before,
.player-head::before {
  content: none;
}

.page-head h1, .player-head h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: 0.005em;
  color: var(--text-strong);
  margin: 0 0 6px;
  text-wrap: balance;
  text-transform: uppercase;
}
.page-head h1::after,
.player-head h1::after {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  margin-top: 12px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  border-radius: 2px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.player-head .back {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  display: inline-block;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.player-head .back:hover { color: var(--accent); }

/* ---------- glossary ---------- */

.glossary-head {
  max-width: 780px;
}

.glossary-shell {
  width: 100%;
}

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.glossary-card {
  position: relative;
  overflow: hidden;
  min-height: 100%;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background:
    radial-gradient(circle at 92% 0%, rgba(255, 122, 61, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    var(--panel);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
  scroll-margin-top: calc(var(--sticky-table-top) + 18px);
}

.glossary-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), var(--gold));
  opacity: 0.88;
}

.glossary-card h2 {
  margin-top: 0;
  font-family: var(--display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.glossary-card dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.glossary-item {
  display: grid;
  grid-template-columns: minmax(78px, 0.32fr) minmax(0, 1fr);
  gap: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
}

.glossary-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.glossary-item dt {
  color: var(--text-strong);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.glossary-item dd {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.glossary-methodology {
  position: relative;
  margin-top: 18px;
  overflow: hidden;
  padding: 24px 28px 26px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 122, 61, 0.14), transparent 30%),
    linear-gradient(120deg, rgba(216, 176, 114, 0.12), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    var(--panel);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
}

.glossary-methodology::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--gold), transparent);
}

.methodology-kicker {
  margin-bottom: 6px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.glossary-methodology h2 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.glossary-methodology p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}


.subhead {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.subhead .muted { opacity: 0.7; margin-left: 6px; }
.subhead .team-link {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-line);
}
.subhead .team-link:hover { color: var(--accent-bright); }

h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.005em;
  color: var(--text-strong);
  margin: 32px 0 12px;
}

/* ---------- filter deck ---------- */

.filter-panel {
  margin: 0 0 16px;
  padding: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 42%),
    var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 12px 34px rgba(0, 0, 0, 0.18);
}
.filter-panel[open] {
  border-color: rgba(255, 122, 61, 0.28);
}
.filter-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  cursor: pointer;
  list-style: none;
}
.filter-panel-head::-webkit-details-marker {
  display: none;
}
.filter-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}
.filter-title span {
  margin: 0;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-strong);
}
.filter-title span::after {
  content: "";
  display: inline-block;
  width: 28px;
  height: 2px;
  margin-left: 9px;
  vertical-align: middle;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: 2px;
}
.filter-title small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  font-variant-numeric: tabular-nums;
}
.filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.filter-toggle::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.16s var(--ease);
}
.filter-panel[open] .filter-toggle::after {
  transform: rotate(225deg) translate(-1px, -1px);
}
.filter-panel[open] .filter-toggle {
  color: var(--accent);
  font-size: 0;
}
.filter-panel[open] .filter-toggle::before {
  content: "Close";
  font-size: 11px;
}
.filter-panel-body {
  position: relative;
  padding: 0 14px 14px;
  border-top: 1px solid var(--rule);
}
.filter-clear {
  height: 30px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--panel-2);
  color: var(--text);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.14s var(--ease), background 0.14s var(--ease), color 0.14s var(--ease);
}
.filter-clear {
  position: absolute;
  right: 14px;
  top: 12px;
  padding: 0 12px;
  color: var(--muted);
}
.filter-clear:hover:not(:disabled) {
  color: var(--text-strong);
  border-color: var(--accent-line);
  background: var(--accent-soft);
}
.filter-clear:disabled {
  opacity: 0.4;
  cursor: default;
}
.filter-primary {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(132px, 0.45fr) minmax(460px, 2fr);
  gap: 10px;
  align-items: end;
  margin: 14px 82px 12px 0;
}
.filter-field {
  display: grid;
  gap: 6px;
}
.filter-field span,
.filter-range-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.filter-field input,
.filter-field select {
  width: 100%;
  height: 34px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0 10px;
  font-family: var(--sans);
  font-size: 13px;
  transition: border-color 0.14s var(--ease), box-shadow 0.14s var(--ease), background 0.14s var(--ease);
}
.filter-field-search input {
  padding-left: 32px;
  background:
    linear-gradient(90deg, transparent 0 28px, rgba(255, 255, 255, 0.06) 28px 29px, transparent 29px),
    var(--bg);
}
.filter-field-search {
  position: relative;
}
.filter-field-search::after {
  content: "";
  position: absolute;
  left: 11px;
  bottom: 11px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--muted);
  border-radius: 50%;
  box-shadow: 5px 5px 0 -3px var(--muted);
  opacity: 0.8;
}
.filter-field input:hover,
.filter-field select:hover,
.filter-range input:hover {
  border-color: rgba(255, 255, 255, 0.18);
}
.filter-field input:focus,
.filter-field select:focus,
.filter-range input:focus {
  outline: none;
  background: var(--panel-2);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.filter-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(112px, 1fr));
  gap: 8px;
}
.filter-grid-core {
  grid-template-columns: repeat(4, minmax(96px, 1fr));
}
.filter-range {
  min-width: 0;
  padding: 8px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
}
.filter-range-inputs {
  display: grid;
  grid-template-columns: 1fr 8px 1fr;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
}
.filter-range-inputs span {
  height: 1px;
  background: var(--muted-2);
  opacity: 0.55;
}
.filter-range input {
  min-width: 0;
  width: 100%;
  height: 28px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 7px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}
.filter-range input::placeholder,
.filter-field input::placeholder {
  color: var(--muted-2);
  opacity: 1;
}
.filter-grid-more {
  grid-template-columns: repeat(6, minmax(112px, 1fr));
  margin-top: 10px;
}

/* ---------- player link ---------- */

.player-link {
  display: inline-block;
  max-width: 100%;
  color: var(--text-strong);
  font-weight: 500;
  border-bottom: 1px dotted transparent;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
  transition: color 0.12s var(--ease), border-color 0.12s var(--ease);
}
.player-link:hover { color: var(--accent); border-bottom-color: var(--accent); }

#player-table td:first-child,
#player-table th:first-child,
#team-table td:first-child,
#team-table th:first-child,
#roster-table td:first-child,
#roster-table th:first-child {
  min-width: 170px;
  max-width: 190px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- shot chart ---------- */

.shot-chart { margin: 8px 0 28px; }
.shot-chart .chart-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.shot-chart h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.shot-chart .chart-head select {
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 5px 10px;
  font-family: var(--mono); font-size: 12.5px; font-weight: 500;
  cursor: pointer;
}
.shot-chart .chart-head select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.chart-identity {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: -4px 0 10px;
  color: var(--text-strong);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-transform: uppercase;
}
.chart-identity small {
  color: var(--accent-bright);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.chart-identity .chart-identity-stat {
  color: var(--text);
  background: rgba(255, 122, 61, 0.14);
  border: 1px solid rgba(255, 122, 61, 0.32);
  padding: 1px 8px;
  border-radius: 999px;
  letter-spacing: 0.06em;
  text-transform: none;
}
.chart-identity .chart-identity-stat:empty {
  display: none;
}
.shot-chart .court-wrap {
  background:
    radial-gradient(140% 80% at 50% 100%, rgba(255, 122, 61, 0.06), transparent 60%),
    var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px;
  max-width: 640px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 10px 30px rgba(0, 0, 0, 0.18);
}
.shot-chart svg.court { width: 100%; height: auto; display: block; }
.chart-watermark,
.chart-watermark-below {
  fill: rgba(231, 236, 243, 0.38);
  font-family: var(--display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
  pointer-events: none;
  user-select: none;
}
.chart-watermark-below {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 10px;
  color: rgba(231, 236, 243, 0.48);
  text-align: right;
  line-height: 1;
}
.chart-watermark-below span {
  display: block;
  line-height: 1;
}
.chart-watermark-below::after {
  content: "";
  flex: 0 0 28px;
  width: 28px;
  height: 18px;
  background: url("../img/hth-mark.png") right bottom / contain no-repeat;
  opacity: 0.58;
}
.chart-watermark-below::before {
  content: "";
  display: block;
  width: 30px;
  height: 1px;
  align-self: flex-end;
  margin-bottom: 5px;
  background: linear-gradient(90deg, transparent, rgba(231, 236, 243, 0.42));
}
.share-control {
  position: relative;
  margin-left: auto;
}
.share-button {
  height: 31px;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0 11px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease), background 0.15s var(--ease);
}
.share-button:hover,
.share-control.open .share-button {
  color: var(--text-strong);
  border-color: var(--accent-line);
  background: rgba(255, 122, 61, 0.08);
}
.share-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 80;
  min-width: 172px;
  padding: 6px;
  background: #11141c;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
}
.share-control.open .share-menu {
  display: grid;
  gap: 2px;
}
.share-menu a,
.share-menu button {
  display: block;
  width: 100%;
  padding: 8px 9px;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
}
.share-menu a:hover,
.share-menu button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent-bright);
}
.shot-chart .legend {
  display: flex; gap: 18px; align-items: center;
  justify-content: center;
  margin-top: 12px; color: var(--muted); font-size: 11.5px;
  font-weight: 500;
  flex-wrap: wrap;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.shot-chart .legend-item { display: inline-flex; align-items: center; gap: 7px; }
.shot-chart .swatch {
  display: inline-block; width: 14px; height: 14px; border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.35);
}
.shot-chart .swatch.low  { background: #d73027; }
.shot-chart .swatch.mid  { background: #ffffbf; }
.shot-chart .swatch.high { background: #1a9850; }
.shot-chart .legend-size { gap: 4px; }
.shot-chart .hex-icon {
  display: inline-block; background: var(--muted);
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%);
}
.shot-chart .hex-icon.small { width: 6px; height: 6px; }
.shot-chart .hex-icon.med   { width: 10px; height: 10px; }
.shot-chart .hex-icon.big   { width: 14px; height: 14px; }

.chart-grid {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0 auto;
}
.chart-grid .shot-chart {
  margin: 8px 0 28px;
  flex: 0 0 640px;
  width: 640px;
  max-width: 100%;
}
.chart-grid .shot-chart .court-wrap { max-width: none; }
.chart-grid .shot-chart .legend,
.chart-grid .shot-chart .zone-color-scale { max-width: 100%; }

.career-chart {
  margin: 2px 0 30px;
}
.career-chart .chart-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.career-chart h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0;
}
.career-chart select {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 5px 10px;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}
.career-chart select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.career-chart-wrap {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent),
    var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 12px 34px rgba(0, 0, 0, 0.2);
}
#career-line-chart {
  display: block;
  width: 100%;
  height: auto;
  min-height: 260px;
}
#career-line-chart .career-line-seg {
  fill: none;
  stroke-linecap: round;
  stroke-width: 2.5;
}

#career-line-chart .career-point {
  stroke: var(--panel);
  stroke-width: 2;
}

#career-line-chart .career-zero-line {
  stroke: rgba(255, 255, 255, 0.26);
  stroke-dasharray: 4 4;
}
#career-line-chart .tick line {
  stroke: rgba(255, 255, 255, 0.07);
}
#career-line-chart .tick text,
#career-line-chart .career-latest-label {
  fill: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}
#career-line-chart .career-x-axis .domain {
  stroke: rgba(255, 255, 255, 0.14);
}
.zone-chart .court-wrap { max-width: 640px; }
.zone-chart .zone-box rect {
  stroke: rgba(0, 0, 0, 0.35);
  stroke-width: 1;
  rx: 4;
}
.zone-chart .zone-box text {
  fill: var(--text-strong);
  font-family: var(--mono);
  font-weight: 600;
  text-anchor: middle;
}
.zone-chart .zone-box text.zone-fg { font-weight: 500; }
.zone-chart .zone-color-scale {
  margin-top: 12px;
  max-width: 640px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
}
.zone-chart .zone-color-scale .label {
  display: block;
  margin-bottom: 6px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 10.5px;
}
.zone-chart .zone-color-scale .bar {
  height: 10px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.35);
  background: linear-gradient(90deg, #d73027 0%, #ffffbf 50%, #1a9850 100%);
}
.zone-chart .zone-color-scale .ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

/* ---------- tables (DataTables overrides) ---------- */

.table-wrap {
  overflow-x: auto;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 90px),
    var(--panel);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.035) inset, 0 18px 46px rgba(0, 0, 0, 0.25);
}
.player-table-wrap {
  overflow: visible;
}
.player-table-wrap .dt-layout-table,
.team-table-wrap .dt-layout-table {
  overflow-x: visible;
  overscroll-behavior-x: contain;
}
.player-sticky-header,
.team-sticky-header {
  position: fixed;
  display: none;
  overflow: hidden;
  z-index: 90;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: 0 10px 16px rgba(0, 0, 0, 0.24);
  pointer-events: none;
}
.player-sticky-header.visible,
.team-sticky-header.visible {
  display: block;
}
.player-sticky-header table,
.team-sticky-header table {
  margin: 0;
  table-layout: fixed;
}
.player-sticky-header th,
.team-sticky-header th {
  box-sizing: border-box;
}

table.dataTable {
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  width: max-content !important;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
#player-table {
  overflow: visible !important;
  table-layout: fixed;
  width: 100% !important;
  min-width: 1040px;
}
#player-table col:nth-child(1) { width: 12% !important; }
#player-table col:nth-child(2) { width: 4% !important; }
#player-table col:nth-child(n+3) { width: 4.2% !important; }
#player-table thead {
  z-index: 45;
}
#career-table {
  table-layout: fixed;
  width: 100% !important;
  min-width: 0;
}
#career-table col:nth-child(1) { width: 6% !important; }
#career-table col:nth-child(2) { width: 5% !important; }
#career-table col:nth-child(3) { width: 4% !important; }
#career-table col:nth-child(n+4) { width: 4.25% !important; }
#roster-table {
  table-layout: fixed;
  width: 100% !important;
  min-width: 1040px;
}
#roster-table col:nth-child(1) { width: 12% !important; }
#roster-table col:nth-child(2) { width: 4% !important; }
#roster-table col:nth-child(n+3) { width: 4.2% !important; }
#team-table {
  overflow: visible !important;
  table-layout: fixed;
  width: 100% !important;
  min-width: 1060px;
  margin-left: 0 !important;
  margin-right: auto !important;
}
#team-table col:first-child {
  width: 13% !important;
}
#team-table col:nth-child(n+2) {
  width: 4.58% !important;
}

table.dataTable thead th {
  background: linear-gradient(180deg, var(--panel-3), var(--panel-2));
  color: var(--text-strong);
  border-bottom: 1px solid var(--border);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 10px 8px;
  text-align: center;
  white-space: nowrap;
}
table.dataTable thead tr.column-groups th {
  text-align: center;
  font-family: var(--display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  background: #11141c;
  border-bottom: 1px solid var(--border);
  padding: 8px 8px 6px;
}
table.dataTable thead th.mixed-case-label,
table.dataTable thead tr.column-groups th.mixed-case-label {
  text-transform: none;
}
table.dataTable thead tr.column-groups th {
  text-align: center;
}
table.dataTable thead tr.column-groups th .dt-column-title {
  display: block;
  width: 100%;
  text-align: center;
}
table.dataTable thead tr.column-groups th .dt-column-order {
  display: none;
}
table.dataTable thead tr.column-groups th:nth-child(2),
table.dataTable thead tr.column-groups th:nth-child(3),
table.dataTable thead tr.column-groups th:nth-child(4),
table.dataTable thead tr.column-groups th:nth-child(5),
table.dataTable thead tr.column-groups th:nth-child(6),
table.dataTable thead tr.column-groups th:nth-child(7) {
  background: linear-gradient(180deg, #1a2030, #161b27);
  color: var(--text);
  position: relative;
}
table.dataTable thead tr.column-groups th:nth-child(2)::after,
table.dataTable thead tr.column-groups th:nth-child(3)::after,
table.dataTable thead tr.column-groups th:nth-child(4)::after,
table.dataTable thead tr.column-groups th:nth-child(5)::after,
table.dataTable thead tr.column-groups th:nth-child(6)::after,
table.dataTable thead tr.column-groups th:nth-child(7)::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 4px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-line), transparent);
}

#player-table thead th {
  position: sticky;
  box-sizing: border-box;
  background: #1a1f2b;
  background-clip: border-box;
  padding: 7px 11px 7px 3px;
  font-size: 10px;
  letter-spacing: 0.035em;
}
#player-table thead th::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #1a1f2b;
}
#player-table thead th .dt-column-title {
  position: relative;
  z-index: 1;
  display: block;
  overflow: hidden;
  text-align: center;
  text-overflow: clip;
}
#player-table thead th .dt-column-order {
  position: absolute !important;
  right: 2px !important;
  top: 50% !important;
  bottom: auto !important;
  width: 8px !important;
  transform: translateY(-50%) !important;
}
#player-table thead tr.column-groups th {
  top: var(--sticky-table-top);
  z-index: 46;
  background: #11141c;
  padding: 7px 4px 5px;
  font-size: 10px;
  letter-spacing: 0.13em;
  box-shadow: 0 -1px 0 var(--border), 0 1px 0 var(--border);
}
#player-table thead tr.column-groups th::before {
  background: #11141c;
}
#player-table thead tr:not(.column-groups) th {
  top: calc(var(--sticky-table-top) + 27px);
  z-index: 47;
  background: #1a1f2b;
  box-shadow: 0 1px 0 var(--border), 0 9px 14px rgba(0, 0, 0, 0.2);
}
#player-table thead tr:not(.column-groups) th::before {
  background: #1a1f2b;
}
#player-table thead tr:not(.column-groups) th:nth-child(2) {
  padding-left: 2px;
  padding-right: 8px;
}

/* group dividers */
#player-table thead tr:not(.column-groups) th:nth-child(3),
#player-table tbody td:nth-child(3),
#player-table thead tr:not(.column-groups) th:nth-child(6),
#player-table tbody td:nth-child(6),
#player-table thead tr:not(.column-groups) th:nth-child(9),
#player-table tbody td:nth-child(9),
#player-table thead tr:not(.column-groups) th:nth-child(12),
#player-table tbody td:nth-child(12),
#player-table thead tr:not(.column-groups) th:nth-child(15),
#player-table tbody td:nth-child(15),
#player-table thead tr:not(.column-groups) th:nth-child(19),
#player-table tbody td:nth-child(19),
#career-table thead tr:not(.column-groups) th:nth-child(4),
#career-table tbody td:nth-child(4),
#career-table thead tr:not(.column-groups) th:nth-child(7),
#career-table tbody td:nth-child(7),
#career-table thead tr:not(.column-groups) th:nth-child(10),
#career-table tbody td:nth-child(10),
#career-table thead tr:not(.column-groups) th:nth-child(13),
#career-table tbody td:nth-child(13),
#career-table thead tr:not(.column-groups) th:nth-child(16),
#career-table tbody td:nth-child(16),
#career-table thead tr:not(.column-groups) th:nth-child(20),
#career-table tbody td:nth-child(20),
#roster-table thead tr:not(.column-groups) th:nth-child(3),
#roster-table tbody td:nth-child(3),
#roster-table thead tr:not(.column-groups) th:nth-child(6),
#roster-table tbody td:nth-child(6),
#roster-table thead tr:not(.column-groups) th:nth-child(9),
#roster-table tbody td:nth-child(9),
#roster-table thead tr:not(.column-groups) th:nth-child(12),
#roster-table tbody td:nth-child(12),
#roster-table thead tr:not(.column-groups) th:nth-child(15),
#roster-table tbody td:nth-child(15),
#roster-table thead tr:not(.column-groups) th:nth-child(19),
#roster-table tbody td:nth-child(19),
#team-table thead tr:not(.column-groups) th:nth-child(2),
#team-table tbody td:nth-child(2),
#team-table thead tr:not(.column-groups) th:nth-child(6),
#team-table tbody td:nth-child(6),
#team-table thead tr:not(.column-groups) th:nth-child(15),
#team-table tbody td:nth-child(15) {
  border-left: 2px solid rgba(255, 255, 255, 0.16);
}

#player-table thead tr:not(.column-groups) th:nth-child(3),
#player-table tbody td:nth-child(3),
#player-table thead tr:not(.column-groups) th:nth-child(6),
#player-table tbody td:nth-child(6),
#player-table thead tr:not(.column-groups) th:nth-child(9),
#player-table tbody td:nth-child(9),
#player-table thead tr:not(.column-groups) th:nth-child(12),
#player-table tbody td:nth-child(12),
#player-table thead tr:not(.column-groups) th:nth-child(15),
#player-table tbody td:nth-child(15),
#player-table thead tr:not(.column-groups) th:nth-child(19),
#player-table tbody td:nth-child(19) {
  border-left-width: 1px;
}

/* group tints */
#player-table thead tr:not(.column-groups) th:nth-child(n+6):nth-child(-n+8),
#player-table tbody td:nth-child(n+6):nth-child(-n+8),
#career-table thead tr:not(.column-groups) th:nth-child(n+7):nth-child(-n+9),
#career-table tbody td:nth-child(n+7):nth-child(-n+9),
#roster-table thead tr:not(.column-groups) th:nth-child(n+6):nth-child(-n+8),
#roster-table tbody td:nth-child(n+6):nth-child(-n+8) {
  background: rgba(255, 122, 61, 0.055);
}
#player-table thead tr:not(.column-groups) th:nth-child(n+9):nth-child(-n+11),
#player-table tbody td:nth-child(n+9):nth-child(-n+11),
#career-table thead tr:not(.column-groups) th:nth-child(n+10):nth-child(-n+12),
#career-table tbody td:nth-child(n+10):nth-child(-n+12),
#roster-table thead tr:not(.column-groups) th:nth-child(n+9):nth-child(-n+11),
#roster-table tbody td:nth-child(n+9):nth-child(-n+11),
#team-table thead tr:not(.column-groups) th:nth-child(n+6):nth-child(-n+14),
#team-table tbody td:nth-child(n+6):nth-child(-n+14) {
  background: rgba(82, 109, 148, 0.06);
}
#player-table thead tr:not(.column-groups) th:nth-child(n+12):nth-child(-n+14),
#player-table tbody td:nth-child(n+12):nth-child(-n+14),
#career-table thead tr:not(.column-groups) th:nth-child(n+13):nth-child(-n+15),
#career-table tbody td:nth-child(n+13):nth-child(-n+15),
#roster-table thead tr:not(.column-groups) th:nth-child(n+12):nth-child(-n+14),
#roster-table tbody td:nth-child(n+12):nth-child(-n+14) {
  background: rgba(56, 96, 73, 0.06);
}
#player-table thead tr:not(.column-groups) th:nth-child(n+15):nth-child(-n+18),
#player-table tbody td:nth-child(n+15):nth-child(-n+18),
#career-table thead tr:not(.column-groups) th:nth-child(n+16):nth-child(-n+19),
#career-table tbody td:nth-child(n+16):nth-child(-n+19),
#roster-table thead tr:not(.column-groups) th:nth-child(n+15):nth-child(-n+18),
#roster-table tbody td:nth-child(n+15):nth-child(-n+18),
#team-table thead tr:not(.column-groups) th:nth-child(n+15):nth-child(-n+19),
#team-table tbody td:nth-child(n+15):nth-child(-n+19) {
  background: rgba(120, 98, 60, 0.06);
}
#player-table thead tr:not(.column-groups) th:nth-child(n+19):nth-child(-n+22),
#player-table tbody td:nth-child(n+19):nth-child(-n+22),
#career-table thead tr:not(.column-groups) th:nth-child(n+20):nth-child(-n+23),
#career-table tbody td:nth-child(n+20):nth-child(-n+23),
#roster-table thead tr:not(.column-groups) th:nth-child(n+19):nth-child(-n+22),
#roster-table tbody td:nth-child(n+19):nth-child(-n+22) {
  background: rgba(84, 118, 116, 0.065);
}

table.dataTable tbody td {
  border-top: 1px solid var(--rule);
  padding: 6px 7px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  text-align: center;
  vertical-align: middle;
}
/* first column is a name (text), not a number */
table.dataTable tbody td:first-child {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: -0.005em;
  text-align: left;
}
#career-table tbody td:nth-child(3),
#roster-table tbody td:nth-child(2) {
  font-family: var(--sans);
  color: var(--text);
  font-weight: 500;
}

/* sticky first column */
#player-table thead tr:not(.column-groups) th:first-child,
#player-table tbody td:first-child,
#player-table tfoot th:first-child {
  position: sticky !important;
  left: 0 !important;
}
#team-table thead tr:not(.column-groups) th:first-child,
#team-table tbody td:first-child,
#team-table tfoot th:first-child {
  position: sticky !important;
  left: 0 !important;
}
#player-table thead tr:not(.column-groups) th:first-child {
  z-index: 5;
  background: linear-gradient(180deg, var(--panel-3), var(--panel-2));
  box-shadow: 1px 0 0 var(--rule), 12px 0 14px -8px rgba(0, 0, 0, 0.55);
}
#team-table thead tr:not(.column-groups) th:first-child {
  z-index: 5;
  background: linear-gradient(180deg, var(--panel-3), var(--panel-2));
  box-shadow: 1px 0 0 var(--rule), 12px 0 14px -8px rgba(0, 0, 0, 0.55);
}
#player-table tfoot th:first-child {
  z-index: 4;
  background: var(--panel-3);
  box-shadow: 1px 0 0 var(--rule), 12px 0 14px -8px rgba(0, 0, 0, 0.55);
}
#team-table tfoot th:first-child {
  z-index: 4;
  background: var(--panel-3);
  box-shadow: 1px 0 0 var(--rule), 12px 0 14px -8px rgba(0, 0, 0, 0.55);
}
#player-table tbody td:first-child {
  z-index: 20 !important;
  background: var(--panel) !important;
  overflow: hidden;
  box-shadow: 1px 0 0 var(--rule), 12px 0 14px -8px rgba(0, 0, 0, 0.45);
}
#player-table tbody tr:hover td:first-child {
  background: var(--panel-2) !important;
}
#team-table tbody td:first-child {
  z-index: 20 !important;
  background: var(--panel) !important;
  overflow: hidden;
  box-shadow: 1px 0 0 var(--rule), 12px 0 14px -8px rgba(0, 0, 0, 0.45);
}
#team-table tbody tr:hover td:first-child {
  background: var(--panel-2) !important;
}
#player-table tbody tr.odd td:first-child {
  background: #11141c !important;
}
#team-table tbody tr.odd td:first-child {
  background: #11141c !important;
}

/* metric cell (value + percentile pill) */
.metric-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 50px;
  min-height: 34px;
  padding: 4px 5px 3px;
  border-radius: var(--r-sm);
  line-height: 1.1;
  transition: transform 0.12s var(--ease);
}
.metric-cell .metric-value {
  font-family: var(--mono);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.metric-cell .metric-percentile {
  margin-top: 3px;
  font-family: var(--sans);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(231, 236, 243, 0.72);
  font-variant-numeric: tabular-nums;
}

table.dataTable.stripe tbody tr.odd > * { background: rgba(255, 255, 255, 0.012); }
table.dataTable.hover tbody tr:hover > * { background: var(--accent-soft) !important; }
table.dataTable thead .dt-orderable-asc:hover,
table.dataTable thead .dt-orderable-desc:hover { color: var(--accent); cursor: pointer; }

#player-table th:first-child,
#player-table td:first-child {
  width: 12%;
  min-width: 112px;
  max-width: none;
}
#career-table th:first-child,
#career-table td:first-child,
#roster-table th:first-child,
#roster-table td:first-child {
  width: 200px;
  min-width: 200px;
  max-width: 200px;
}
#team-table th:first-child,
#team-table td:first-child {
  width: 13%;
  min-width: 142px;
  max-width: none;
  text-align: left;
}

#player-table th:nth-child(2),
#player-table td:nth-child(2),
#career-table th:nth-child(2),
#career-table td:nth-child(2),
#roster-table th:nth-child(2),
#roster-table td:nth-child(2) {
  width: 58px;
  min-width: 58px;
  max-width: 58px;
  text-align: left;
}
#player-table th:nth-child(2),
#player-table td:nth-child(2),
#career-table th:nth-child(2),
#career-table td:nth-child(2) {
  width: 4%;
  min-width: 38px;
  max-width: none;
  text-align: center;
}
.team-link {
  color: var(--text);
  text-decoration: none;
}
.team-link:hover {
  color: var(--accent-bright);
}
#player-table td:nth-child(2) .team-link,
#career-table td:nth-child(2) .team-link {
  display: block;
  text-align: center;
}

#player-table th:nth-child(n+3),
#player-table td:nth-child(n+3),
#career-table th:nth-child(n+3),
#career-table td:nth-child(n+3),
#roster-table th:nth-child(n+3),
#roster-table td:nth-child(n+3),
#team-table th:nth-child(n+2),
#team-table td:nth-child(n+2) {
  width: 4.58%;
  min-width: 50px;
  max-width: none;
}

#team-table thead tr:not(.column-groups) th,
#team-table tbody td:nth-child(n+2) {
  text-align: center;
}

#team-table thead th {
  box-sizing: border-box;
  padding-left: 4px;
  padding-right: 14px;
  text-align: center;
}

#team-table thead th .dt-column-title {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
}

#team-table thead tr.column-groups th {
  padding-left: 8px;
  padding-right: 8px;
}

#team-table thead tr.column-groups th .dt-column-title {
  overflow: visible;
}

#team-table thead tr:not(.column-groups) th .dt-column-order {
  right: 3px !important;
  width: 8px !important;
}

#team-table .metric-cell {
  box-sizing: border-box;
  width: calc(100% - 4px);
  max-width: 52px;
  min-width: 0;
  margin: 0 auto;
}

#player-table th:nth-child(n+3),
#player-table td:nth-child(n+3) {
  width: 4.2%;
  min-width: 48px;
  max-width: none;
}
#player-table th:nth-child(3),
#player-table td:nth-child(3) {
  width: 4.2%;
  min-width: 48px;
  max-width: none;
}

#player-table th:nth-child(4),
#player-table td:nth-child(4) {
  width: 4.2%;
  min-width: 48px;
  max-width: none;
}

#player-table th:nth-child(5),
#player-table td:nth-child(5),
#career-table th:nth-child(6),
#career-table td:nth-child(6),
#roster-table th:nth-child(5),
#roster-table td:nth-child(5) {
  width: 76px;
  min-width: 76px;
  max-width: 76px;
}

#player-table th:nth-child(5),
#player-table td:nth-child(5) {
  width: 4.2%;
  min-width: 48px;
  max-width: none;
}

#player-table th:nth-child(n+6):nth-child(-n+8),
#player-table td:nth-child(n+6):nth-child(-n+8),
#career-table th:nth-child(n+7):nth-child(-n+9),
#career-table td:nth-child(n+7):nth-child(-n+9),
#roster-table th:nth-child(n+6):nth-child(-n+8),
#roster-table td:nth-child(n+6):nth-child(-n+8) {
  width: 82px;
  min-width: 82px;
  max-width: 82px;
}

#player-table th:nth-child(n+6):nth-child(-n+8),
#player-table td:nth-child(n+6):nth-child(-n+8) {
  width: 4.2%;
  min-width: 48px;
  max-width: none;
}

#player-table th:nth-child(n+9):nth-child(-n+14),
#player-table td:nth-child(n+9):nth-child(-n+14) {
  width: 4.2%;
  min-width: 48px;
  max-width: none;
}

#player-table th:nth-child(n+15):nth-child(-n+22),
#player-table td:nth-child(n+15):nth-child(-n+22) {
  width: 4.2%;
  min-width: 48px;
  max-width: none;
}

#career-table th:nth-child(n+20),
#career-table td:nth-child(n+20),
#roster-table th:nth-child(n+19),
#roster-table td:nth-child(n+19) {
  width: 62px;
  min-width: 62px;
  max-width: 62px;
}

#roster-table th:first-child,
#roster-table td:first-child {
  width: 12%;
  min-width: 112px;
  max-width: none;
}
#roster-table th:nth-child(2),
#roster-table td:nth-child(2) {
  width: 4%;
  min-width: 38px;
  max-width: none;
  text-align: center;
}
#roster-table th:nth-child(n+3),
#roster-table td:nth-child(n+3) {
  width: 4.2%;
  min-width: 48px;
  max-width: none;
}

#career-table th:first-child,
#career-table td:first-child {
  width: 6%;
  min-width: 0;
  max-width: none;
}
#career-table th:nth-child(2),
#career-table td:nth-child(2) {
  width: 5%;
  min-width: 0;
  max-width: none;
}
#career-table th:nth-child(3),
#career-table td:nth-child(3) {
  width: 4%;
  min-width: 0;
  max-width: none;
}
#career-table th:nth-child(n+4),
#career-table td:nth-child(n+4) {
  width: 4.25%;
  min-width: 0;
  max-width: none;
}

#player-table tbody td,
#career-table tbody td,
#roster-table tbody td {
  padding: 4px 3px;
  font-size: 11.5px;
}

#player-table tbody td:first-child {
  font-size: 12px;
}

#player-table .metric-cell,
#career-table .metric-cell,
#roster-table .metric-cell {
  box-sizing: border-box;
  width: calc(100% - 4px);
  max-width: 48px;
  min-width: 0;
  min-height: 31px;
  margin: 0 auto;
  padding: 3px 2px 2px;
}

#player-table td:nth-child(3) .metric-cell,
#career-table td:nth-child(4) .metric-cell,
#roster-table td:nth-child(3) .metric-cell {
  width: calc(100% - 3px);
}

#player-table .metric-cell .metric-value,
#career-table .metric-cell .metric-value,
#roster-table .metric-cell .metric-value {
  font-size: 12px;
  letter-spacing: 0;
  white-space: nowrap;
}

#player-table .metric-cell .metric-percentile,
#career-table .metric-cell .metric-percentile,
#roster-table .metric-cell .metric-percentile {
  margin-top: 2px;
  font-size: 8.5px;
  letter-spacing: 0.02em;
}

#player-table thead tr.column-groups th.mixed-case-label,
#career-table thead tr.column-groups th.mixed-case-label,
#roster-table thead tr.column-groups th.mixed-case-label {
  letter-spacing: 0.08em;
}

/* hide native number spinners */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

/* ---------- DataTables chrome (search, paging, info, length) ---------- */

.dt-container { padding: 10px 14px 4px; }

/* a quiet rule above the bottom controls separates them from the table body */
.dt-container .dt-layout-row:last-child {
  z-index: 12;
  width: 100%;
  border-top: 1px solid var(--rule);
  margin-top: 4px;
  padding-top: 4px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent),
    var(--panel);
}

.dt-container .dt-search input,
.dt-container .dt-length select {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 6px 10px;
  font-family: var(--sans);
  font-size: 12.5px;
  height: 30px;
  transition: border-color 0.12s var(--ease), box-shadow 0.12s var(--ease);
}
.dt-container .dt-length select { padding-right: 24px; cursor: pointer; }
.dt-container .dt-search input:hover,
.dt-container .dt-length select:hover { border-color: rgba(255, 255, 255, 0.18); }
.dt-container .dt-search input:focus,
.dt-container .dt-length select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.dt-container .dt-search label,
.dt-container .dt-length label {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.dt-container .dt-info,
.dt-container .dt-paging,
.dt-container .dt-length,
.dt-container .dt-search {
  color: var(--muted);
  padding: 8px 0;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
/* bottom-row layout: pageLength + info on left, paging on right */
.dt-container .dt-layout-row:last-child .dt-layout-cell {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.dt-container .dt-layout-row:last-child .dt-info {
  padding: 0;
  font-weight: 500;
}
.dt-container .dt-paging .dt-paging-button {
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  margin: 0 2px;
  padding: 5px 11px;
  font-family: var(--mono);
  font-size: 12px;
  transition: color 0.12s var(--ease), background 0.12s var(--ease), border-color 0.12s var(--ease);
}
.dt-container .dt-paging .dt-paging-button:hover {
  color: var(--text); background: var(--accent-soft);
}
.dt-container .dt-paging .dt-paging-button.current {
  color: var(--text-strong);
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* ---------- responsive ---------- */

@media (max-width: 720px) {
  .player-table-wrap,
  .team-table-wrap {
    overflow-x: hidden;
  }
  .player-table-wrap .dt-layout-table,
  .team-table-wrap .dt-layout-table {
    overflow-x: auto;
  }
  .navbar { flex-wrap: wrap; gap: 12px; padding: 10px 16px; }
  .navbar .brand { width: 100%; }
  .navbar .brand .brand-mark { width: 48px; height: 38px; }
  .navbar .brand .brand-tagline { font-size: 9px; }
  .player-search {
    order: 20;
    flex: 1 0 100%;
    min-width: 0;
    transition: max-height 0.18s var(--ease), opacity 0.14s var(--ease),
      margin 0.18s var(--ease);
  }
  body.mobile-search-collapsed .player-search {
    max-height: 0;
    margin-top: -12px;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
  }
  .updated { display: none; }
  .season-form { margin-left: 0; }
  input,
  select,
  textarea,
  .player-search-input,
  .dt-container .dt-search input,
  .dt-container .dt-length select {
    font-size: 16px;
  }
  main { padding: 20px 16px 40px; }
  .page-head, .player-head { padding-right: 78px; }
  .page-head h1, .player-head h1 { font-size: 30px; }
  .glossary-grid {
    grid-template-columns: 1fr;
  }
  .glossary-card {
    padding: 16px;
  }
  .glossary-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  h2 { font-size: 19px; }
  .filter-panel-head { align-items: flex-start; }
  .filter-title {
    display: grid;
    gap: 4px;
  }
  .filter-panel-body {
    padding: 0 12px 12px;
  }
  .filter-clear {
    position: static;
    width: 100%;
    margin-top: 12px;
  }
  .filter-panel-head,
  .filter-primary {
    display: grid;
    grid-template-columns: 1fr;
  }
  .filter-primary { margin: 12px 0; }
  .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .chart-grid {
    display: block;
    max-width: 640px;
    margin: 0 auto;
  }
  #player-table col:nth-child(1) { width: 76px !important; }
  #player-table col:nth-child(2) { width: 44px !important; }
  #player-table col:nth-child(n+3) { width: 60px !important; }
  #career-table {
    width: max-content !important;
    min-width: 0;
  }
  #team-table {
    width: max-content !important;
    min-width: 0;
  }
  #career-table col:nth-child(1) { width: 66px !important; }
  #career-table col:nth-child(2) { width: 44px !important; }
  #career-table col:nth-child(3) { width: 42px !important; }
  #career-table col:nth-child(n+4) { width: 54px !important; }
  #team-table col:first-child { width: 142px !important; }
  #team-table col:nth-child(n+2) { width: 56px !important; }
  #player-table th:first-child,
  #player-table td:first-child {
    width: 76px;
    min-width: 76px;
    max-width: 76px;
  }
  #roster-table th:first-child,
  #roster-table td:first-child {
    width: 142px;
    min-width: 142px;
    max-width: 142px;
  }
  #team-table th:first-child,
  #team-table td:first-child {
    width: 142px;
    min-width: 142px;
    max-width: 142px;
  }
  #career-table th:first-child,
  #career-table td:first-child {
    width: 66px;
    min-width: 66px;
    max-width: 66px;
  }
  #career-table th:nth-child(2),
  #career-table td:nth-child(2) {
    width: 44px;
    min-width: 44px;
    max-width: 44px;
  }
  #career-table th:nth-child(3),
  #career-table td:nth-child(3) {
    width: 42px;
    min-width: 42px;
    max-width: 42px;
  }
  #career-table th:nth-child(n+4),
  #career-table td:nth-child(n+4) {
    width: 54px;
    min-width: 54px;
    max-width: 54px;
  }
  #team-table th:nth-child(n+2),
  #team-table td:nth-child(n+2) {
    width: 56px;
    min-width: 56px;
    max-width: 56px;
  }
  #player-table th:nth-child(2),
  #player-table td:nth-child(2) {
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    text-align: center;
  }
  #player-table th:nth-child(n+3),
  #player-table td:nth-child(n+3) {
    width: 60px;
    min-width: 60px;
    max-width: 60px;
  }
  #player-table tbody td:first-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.18;
  }
  #team-table tbody td:first-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.18;
  }
  .player-sticky-header table.dataTable thead th:first-child,
  .team-sticky-header table.dataTable thead th:first-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.18;
  }
  #player-table tbody td:first-child a {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #team-table tbody td:first-child a {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #roster-table tbody td:first-child {
    white-space: normal;
    line-height: 1.18;
  }
  #player-table tbody td,
  #career-table tbody td {
    box-sizing: border-box;
    padding: 3px 2px;
    font-size: 11px;
  }
  #player-table tbody td:first-child {
    font-size: 11.5px;
  }
  #player-table .metric-cell,
  #career-table .metric-cell {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 28px;
    padding: 3px 2px 2px;
  }
  #player-table .metric-value,
  #career-table .metric-value {
    letter-spacing: 0;
    white-space: nowrap;
  }
  #player-table .metric-percentile,
  #career-table .metric-percentile {
    margin-top: 2px;
    font-size: 8px;
  }
  #player-table thead th,
  #team-table thead th,
  .player-sticky-header table.dataTable thead th,
  .team-sticky-header table.dataTable thead th {
    box-sizing: border-box;
    padding-left: 3px !important;
    padding-right: 14px !important;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    font-size: 9.5px;
    letter-spacing: 0.04em;
    text-align: center;
    box-shadow: none !important;
  }
  #player-table thead th {
    position: static !important;
    top: auto !important;
    z-index: auto !important;
  }
  #team-table thead th {
    position: static !important;
    top: auto !important;
    z-index: auto !important;
  }
  .player-sticky-header table.dataTable thead th,
  .team-sticky-header table.dataTable thead th {
    position: relative !important;
    top: auto !important;
    z-index: auto !important;
  }
  .player-sticky-header table.dataTable thead th::before,
  .team-sticky-header table.dataTable thead th::before {
    display: none !important;
  }
  #player-table thead th .dt-column-title,
  #team-table thead th .dt-column-title,
  .player-sticky-header table.dataTable thead th .dt-column-title,
  .team-sticky-header table.dataTable thead th .dt-column-title {
    display: block;
    max-width: calc(100% - 10px);
    overflow: hidden;
    margin: 0 auto;
    text-align: center;
    text-overflow: ellipsis;
  }
  #player-table thead th .dt-column-order,
  #team-table thead th .dt-column-order,
  .player-sticky-header table.dataTable thead th .dt-column-order,
  .team-sticky-header table.dataTable thead th .dt-column-order {
    position: absolute !important;
    right: 3px !important;
    top: 50% !important;
    bottom: auto !important;
    width: 8px !important;
    height: 1em !important;
    transform: translateY(-50%) !important;
  }
  #player-table thead th:first-child,
  #team-table thead th:first-child,
  .player-sticky-header table.dataTable thead th:first-child,
  .team-sticky-header table.dataTable thead th:first-child {
    padding-right: 14px !important;
  }
  #player-table thead tr.column-groups th,
  #team-table thead tr.column-groups th,
  .player-sticky-header table.dataTable thead tr.column-groups th,
  .team-sticky-header table.dataTable thead tr.column-groups th {
    padding: 8px 12px 6px 3px !important;
    font-size: 9px;
    letter-spacing: 0.12em;
  }
  .dt-container .dt-layout-row:last-child {
    width: 100%;
  }
}

@media (max-width: 1180px) and (min-width: 721px) {
  .filter-primary {
    grid-template-columns: minmax(220px, 1fr) minmax(130px, 0.45fr);
  }
  .filter-grid-core {
    grid-column: 1 / -1;
  }
  .filter-grid {
    grid-template-columns: repeat(4, minmax(112px, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
