.nba-max {
  --nba-navy: #0c2c5b;
  --nba-blue: #1478ff;
  --nba-ink: #172033;
  --nba-muted: #687386;
  --nba-line: #dbe3ed;
  --nba-green: #16865c;
  width: min(1480px, calc(100% - 24px));
  margin: 18px auto 48px;
  color: var(--nba-ink);
  font-family: Arial, Helvetica, sans-serif;
}

.nba-max *,
.nba-max *::before,
.nba-max *::after {
  box-sizing: border-box;
}

/* The global responsive shell treats #container as a 1,200px two-column flex
   frame. This route intentionally has no legacy rails, so keep the existing
   DFS-tool shell full width and paint both header rows continuously. */
@media (min-width: 769px) {
  body.fft-dfs-tool > #container,
  body.fft-dfs-tool accelerate > #container {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    gap: 0 !important;
    background: #fff !important;
  }

  body.fft-dfs-tool #header,
  body.fft-dfs-tool #header-stronga-wrapper,
  body.fft-dfs-tool #header-stronga-wrapper header.stronga {
    width: 100% !important;
    max-width: none !important;
  }

  body.fft-dfs-tool #header-stronga-wrapper header.stronga,
  body.fft-dfs-tool #header-stronga-wrapper .new-menu,
  body.fft-dfs-tool #header-stronga-wrapper .new-menu #menu,
  body.fft-dfs-tool #header-stronga-wrapper .new-menu #menu .main-menu > li {
    background: #0b1c2d !important;
  }

  body.fft-dfs-tool #header-stronga-wrapper .new-menu #menu .main-menu {
    width: 100%;
    justify-content: center;
  }
}

.nba-max__hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 26px;
  padding: 22px 26px;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(118deg, #0b2c5b 0%, #104b94 64%, #1679e9 100%);
  color: #fff;
  box-shadow: 0 18px 44px rgba(9, 41, 81, 0.14);
}

.nba-max__eyebrow {
  display: inline-block;
  margin-bottom: 5px;
  color: #9fd1ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nba-max__hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1;
  letter-spacing: -0.035em;
}

.nba-max__hero p {
  max-width: 680px;
  margin: 7px 0 0;
  color: #d9ebff;
  font-size: 16px;
  line-height: 1.35;
}

.nba-max__updated {
  flex: 0 0 auto;
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  background: rgba(4, 26, 58, 0.25);
  text-align: right;
}

.nba-max__updated span,
.nba-max__updated strong {
  display: block;
}

.nba-max__updated span {
  margin-bottom: 4px;
  color: #acd4ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nba-max__updated strong {
  font-size: 14px;
}

.nba-max__toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.1fr) minmax(500px, 2.2fr) minmax(210px, 0.9fr);
  gap: 14px;
  align-items: end;
  padding: 14px 18px;
  border: 1px solid var(--nba-line);
  border-top: 0;
  background: #fff;
}

.nba-max__slate label,
.nba-max__search span {
  display: block;
  margin-bottom: 5px;
  color: #526078;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nba-max__slate select,
.nba-max__search input {
  width: 100%;
  height: 38px;
  border: 1px solid #c9d4e2;
  border-radius: 9px;
  background: #fff;
  color: var(--nba-ink);
  font: inherit;
  font-size: 14px;
}

.nba-max__slate select {
  padding: 0 38px 0 12px;
}

.nba-max__search input {
  padding: 0 12px;
}

.nba-max__slate select:focus,
.nba-max__search input:focus,
.nba-max__position:focus-visible,
.nba-max__table button:focus-visible {
  outline: 3px solid rgba(20, 120, 255, 0.25);
  outline-offset: 2px;
}

.nba-max__positions {
  display: grid;
  grid-template-columns: repeat(8, minmax(43px, 1fr));
  gap: 6px;
}

.nba-max__position {
  min-height: 38px;
  padding: 0 9px;
  border: 1px solid #b7c8dd;
  border-radius: 999px;
  background: #fff;
  color: #174577;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  transition: 0.16s ease;
}

.nba-max__position:hover {
  border-color: var(--nba-blue);
  color: var(--nba-blue);
}

.nba-max__position.is-active {
  border-color: var(--nba-blue);
  background: var(--nba-blue);
  color: #fff;
  box-shadow: 0 6px 14px rgba(20, 120, 255, 0.2);
}

.nba-max__games {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 9px 14px;
  border: 1px solid var(--nba-line);
  border-top: 0;
  background: #f7faff;
  scrollbar-width: thin;
}

.nba-max__game {
  flex: 0 0 124px;
  min-height: 52px;
  padding: 7px 10px;
  border: 1px solid #c8d7e8;
  border-radius: 11px;
  background: #fff;
  color: var(--nba-navy);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.nba-max__game:hover,
.nba-max__game:focus-visible {
  border-color: var(--nba-blue);
  outline: none;
  box-shadow: 0 6px 16px rgba(20, 120, 255, 0.13);
}

.nba-max__game.is-active {
  border-color: var(--nba-blue);
  background: #eaf4ff;
  box-shadow: inset 0 0 0 1px var(--nba-blue);
}

.nba-max__game strong,
.nba-max__game span {
  display: block;
}

.nba-max__game strong {
  font-size: 13px;
  white-space: nowrap;
}

.nba-max__game span {
  margin-top: 3px;
  color: var(--nba-muted);
  font-size: 11px;
}

.nba-max__summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 0.7fr)) minmax(300px, 2fr);
  border: 1px solid var(--nba-line);
  border-top: 0;
  background: #f7f9fc;
}

.nba-max__summary > div {
  min-height: 60px;
  padding: 10px 16px;
  border-right: 1px solid var(--nba-line);
}

.nba-max__summary > div:last-child {
  border-right: 0;
}

.nba-max__summary span,
.nba-max__summary strong {
  display: block;
}

.nba-max__summary span {
  margin-bottom: 3px;
  color: var(--nba-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nba-max__summary strong {
  color: var(--nba-navy);
  font-size: 20px;
}

.nba-max__summary strong small {
  font-size: 11px;
  text-transform: uppercase;
}

.nba-max__formula strong {
  padding-top: 2px;
  font-size: 13px;
  line-height: 1.4;
}

.nba-max__table-wrap {
  overflow: auto;
  max-height: max(520px, calc(100vh - 330px));
  border: 1px solid var(--nba-line);
  border-top: 0;
  border-radius: 0 0 16px 16px;
  background: #fff;
  box-shadow: 0 20px 46px rgba(15, 42, 74, 0.1);
}

.nba-max__table {
  width: 100%;
  min-width: 1240px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.nba-max__table thead {
  position: sticky;
  z-index: 4;
  top: 0;
}

.nba-max__table th {
  height: 40px;
  padding: 0 8px;
  border-bottom: 1px solid #c8d7e7;
  background: #e9f1f9;
  color: #174577;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: right;
  text-transform: uppercase;
  white-space: nowrap;
}

.nba-max__table th:first-child,
.nba-max__table th:nth-child(2) {
  text-align: left;
}

.nba-max__table th button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  line-height: 1.05;
}

.nba-max__table th button::after {
  margin-left: 4px;
  color: #7890aa;
  content: "↕";
}

.nba-max__table th button[aria-sort="ascending"]::after {
  content: "↑";
}

.nba-max__table th button[aria-sort="descending"]::after {
  content: "↓";
}

.nba-max__table td {
  height: 52px;
  padding: 6px 8px;
  border-bottom: 1px solid #e7ecf2;
  background: #fff;
  color: #2c3850;
  font-size: 13px !important;
  text-align: right !important;
  white-space: nowrap;
}

.nba-max__table tbody tr:nth-child(even) td {
  background: #fafbfd;
}

.nba-max__table tbody tr:hover td {
  background: #f0f7ff;
}

.nba-max__table tbody tr[hidden] {
  display: none;
}

.nba-max__table .nba-max__rank,
.nba-max__table .nba-max__player {
  text-align: left !important;
}

.nba-max__rank {
  width: 38px;
  color: #8090a4 !important;
  font-weight: 800;
}

.nba-max__player-col {
  min-width: 190px;
}

.nba-max__player strong,
.nba-max__player span,
.nba-max__player small {
  display: block;
}

.nba-max__player strong {
  max-width: 220px;
  overflow: hidden;
  color: #0e294b;
  font-size: 14px;
  text-overflow: ellipsis;
}

.nba-max__player span {
  margin-top: 2px;
  color: var(--nba-muted);
  font-size: 11px;
}

.nba-max__player span b {
  color: var(--nba-blue);
}

.nba-max__player small {
  display: none;
}

.nba-max__salary,
.nba-max__projection,
.nba-max__value,
.nba-max__score {
  font-variant-numeric: tabular-nums;
}

.nba-max__projection strong {
  color: var(--nba-navy);
  font-size: 16px;
}

.nba-max__value {
  color: var(--nba-green) !important;
  font-weight: 800;
}

.nba-max__score {
  min-width: 94px;
}

.nba-max__score strong {
  color: #0d4b92;
  font-size: 16px;
}

.nba-max__score span {
  display: block;
  width: 66px;
  height: 4px;
  margin: 3px 0 0 auto;
  overflow: hidden;
  border-radius: 999px;
  background: #dbe7f5;
}

.nba-max__score span::before {
  display: block;
  width: var(--max-score);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2ba875, #1478ff);
  content: "";
}

.nba-max__notice,
.nba-max__empty-filter {
  padding: 34px;
  border: 1px solid var(--nba-line);
  border-top: 0;
  border-radius: 0 0 16px 16px;
  background: #f8fbff;
  color: var(--nba-muted);
  text-align: center;
}

.nba-max__notice strong,
.nba-max__notice span {
  display: block;
}

.nba-max__notice strong {
  margin-bottom: 7px;
  color: var(--nba-navy);
  font-size: 18px;
}

.nba-max__notice--error {
  background: #fff4f4;
  color: #9d2626;
}

.nba-max__empty-filter {
  border: 0;
  border-radius: 0;
}

.nba-max__footnote {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  padding: 18px 4px 0;
  color: var(--nba-muted);
  font-size: 12px;
  line-height: 1.5;
}

.nba-max__footnote p {
  max-width: 560px;
  margin: 0;
}

@media (max-width: 980px) {
  .nba-max__toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .nba-max__positions {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .nba-max__summary {
    grid-template-columns: repeat(3, 1fr);
  }

  .nba-max__formula {
    grid-column: 1 / -1;
    border-top: 1px solid var(--nba-line);
  }
}

@media (max-width: 720px) {
  .nba-max {
    width: min(100% - 8px, 700px);
    margin: 8px auto 32px;
  }

  .nba-max__hero {
    display: block;
    padding: 16px 14px;
    border-radius: 14px 14px 0 0;
  }

  .nba-max__hero p {
    margin-top: 5px;
    font-size: 12px;
  }

  .nba-max__updated {
    display: inline-block;
    margin-top: 10px;
    padding: 7px 10px;
    text-align: left;
  }

  .nba-max__toolbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 10px 8px;
  }

  .nba-max__positions {
    display: flex;
    gap: 7px;
    order: -1;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: thin;
  }

  .nba-max__position {
    flex: 0 0 48px;
    min-height: 36px;
  }

  .nba-max__games {
    padding: 8px;
    scroll-snap-type: x proximity;
  }

  .nba-max__game {
    flex-basis: 108px;
    min-height: 48px;
    scroll-snap-align: start;
  }

  .nba-max__summary {
    grid-template-columns: repeat(3, 1fr);
  }

  .nba-max__summary > div {
    min-height: 56px;
    padding: 9px 6px;
    text-align: center;
  }

  .nba-max__summary strong {
    font-size: 17px;
  }

  .nba-max__formula {
    display: none;
  }

  .nba-max__table-wrap {
    max-height: none;
  }

  .nba-max__table {
    min-width: 0;
    table-layout: fixed;
  }

  .nba-max__table th,
  .nba-max__table td {
    padding: 5px 3px;
  }

  .nba-max__table th:first-child,
  .nba-max__table td:first-child,
  .nba-max__table th:nth-child(3),
  .nba-max__table td:nth-child(3),
  .nba-max__stat-col {
    display: none;
  }

  .nba-max__table .nba-max__minutes-col {
    display: table-cell;
  }

  .nba-max__table th:nth-child(2) { width: 38%; }
  .nba-max__table th:nth-child(4) { width: 13%; }
  .nba-max__table th:nth-child(5) { width: 15%; }
  .nba-max__table th:nth-child(6) { width: 15%; }
  .nba-max__table th:nth-child(7) { width: 19%; }

  .nba-max__table th {
    height: 40px;
  }

  .nba-max__table td {
    height: 48px;
  }

  .nba-max__player strong {
    max-width: 100%;
    font-size: 13px;
  }

  .nba-max__player span {
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
  }

  .nba-max__player small {
    display: none;
  }

  .nba-max__score {
    min-width: 0;
  }

  .nba-max__score span {
    display: none;
  }

  .nba-max__footnote {
    display: block;
  }

  .nba-max__footnote p + p {
    margin-top: 8px;
  }
}

@media (max-width: 420px) {
  .nba-max__summary span {
    font-size: 9px;
  }

  .nba-max__summary strong {
    font-size: 16px;
  }

  .nba-max__table th {
    font-size: 9px;
  }

  .nba-max__table td {
    font-size: 11px !important;
  }

  .nba-max__table th:nth-child(2) { width: 36%; }
  .nba-max__table th:nth-child(4) { width: 14%; }
  .nba-max__table th:nth-child(5) { width: 15%; }
  .nba-max__table th:nth-child(6) { width: 16%; }
  .nba-max__table th:nth-child(7) { width: 19%; }
}
