.standings-table-wrap {
  background: var(--tlfl-surface);
  border: 1px solid var(--tlfl-table-border);
  border-radius: var(--tlfl-radius);
  box-shadow: 0 6px 18px rgb(17 24 39 / 0.06);
  overflow: hidden;
  overflow-x: hidden;
}

.standings-scroll-cue {
  min-width: 0;
}

.standings-tabs {
  display: flex;
  gap: 0.5rem;
  margin: -0.35rem 0 1.25rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
  scrollbar-width: thin;
  white-space: nowrap;
}

.standings-tab {
  appearance: none;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  color: #1f2937;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1;
  padding: 0.45rem 0.75rem;
}

.standings-tab:visited {
  color: #1f2937;
}

.standings-tab:hover {
  background: var(--tlfl-blue);
  border-color: var(--tlfl-blue);
  color: #ffffff;
  text-decoration: none;
}

.standings-tab-active,
.standings-tab-active:hover {
  background: var(--tlfl-blue);
  border-color: var(--tlfl-blue);
  color: #ffffff;
}

.standings-tab-active:visited {
  color: #ffffff;
}

.standings-table {
  background: var(--tlfl-surface);
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.86rem;
  min-width: 0;
  table-layout: fixed;
  width: 100%;
}

.standings-team-column {
  width: 18%;
}

.standings-short-column {
  width: 3.2%;
}

.standings-pct-column {
  width: 4.8%;
}

.standings-record-column {
  width: 6.2%;
}

.standings-points-column {
  width: 4.7%;
}

.standings-diff-column {
  width: 5.2%;
}

.standings-streak-column {
  width: 4.7%;
}

.standings-postseason-column {
  width: 31%;
}

@media (min-width: 761px) {
  .standings-table-without-postseason col.standings-team-column {
    width: 18%;
  }

  .standings-table-without-postseason col.standings-short-column {
    width: 5.5%;
  }

  .standings-table-without-postseason col.standings-pct-column {
    width: 8%;
  }

  .standings-table-without-postseason col.standings-record-column {
    width: 11%;
  }

  .standings-table-without-postseason col.standings-points-column {
    width: 9%;
  }

  .standings-table-without-postseason col.standings-diff-column,
  .standings-table-without-postseason col.standings-streak-column {
    width: 8.75%;
  }
}

.playoff-standings {
  display: grid;
  gap: 1rem;
}

.playoff-standings-wrap+.playoff-standings-wrap {
  margin-top: 0.15rem;
}

.playoff-standings-table {
  min-width: 0;
}

.playoff-standings-unavailable {
  background: var(--tlfl-surface);
  border: 1px solid var(--tlfl-table-border);
  border-left: 4px solid var(--tlfl-blue);
  border-radius: var(--tlfl-radius-sm);
  color: var(--tlfl-text-muted);
  font-size: 0.95rem;
  font-weight: 800;
  margin: 0;
  padding: 0.9rem 1rem;
}

.playoff-seed-column {
  width: 4.2%;
}

.standings-table th,
.standings-table td {
  border-bottom: 1px solid var(--tlfl-table-border);
  padding: 0.3rem 0.42rem;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.standings-column-row th {
  background: var(--tlfl-blue-light);
  border-bottom: 1px solid #c7d8f7;
  color: #12366f;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.standings-column-row th:first-child {
  font-size: 0.78rem;
  padding: 0.28rem 0.62rem 0.25rem;
}

.playoff-column-row th:first-child {
  text-align: center;
}

.standings-table th:first-child,
.standings-table td:first-child {
  text-align: left;
}

.standings-table th.standings-postseason,
.standings-table td.standings-postseason {
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

.playoff-standings-table th:first-child,
.playoff-standings-table td:first-child {
  text-align: center;
}

.playoff-standings-table th:nth-child(2),
.playoff-standings-table td:nth-child(2) {
  text-align: left;
}

.standings-conference-row th {
  background: var(--tlfl-blue-dark);
  border-bottom: 0;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 900;
  padding: 0.42rem 0.62rem 0.38rem;
  text-align: left;
  text-transform: uppercase;
}

.playoff-standings-table .standings-conference-row th {
  text-align: left;
}

.standings-conference+.standings-conference .standings-conference-row th {
  border-top: 0.34rem solid var(--tlfl-surface);
}

.standings-division-row th {
  border-bottom: 1px solid #c7d8f7;
  font-weight: 900;
  text-transform: uppercase;
}

.standings-division-row:not(:first-child) th {
  border-top: 1px solid var(--tlfl-table-border);
}

.playoff-team-group-start td {
  border-top: 0.58rem solid #dbe7f8;
  box-shadow: inset 0 1px 0 #b9cdec;
}

.standings-table tbody tr:not(.standings-conference-row):not(.standings-division-row):not(.standings-column-row):nth-of-type(even) {
  background: var(--tlfl-table-row-alt);
}

.standings-table tbody tr:not(.standings-conference-row):not(.standings-division-row):not(.standings-column-row):hover {
  background: var(--tlfl-table-row-hover);
}

.standings-team-row {
  --standings-team-color: var(--tlfl-blue);
}

.standings-team-content {
  align-items: center;
  display: inline-flex;
  gap: 0.32rem;
  max-width: 100%;
  min-width: 0;
  vertical-align: middle;
}

.standings-team a {
  align-items: center;
  color: #111827;
  display: inline-flex;
  font-weight: 800;
  gap: 0.35rem;
  max-width: 100%;
  min-width: 0;
}

.standings-team a::before {
  background: var(--standings-team-color);
  border-radius: 999px;
  content: "";
  flex: 0 0 auto;
  height: 1.35rem;
  opacity: 0.78;
  width: 0.22rem;
}

.standings-team-row:hover .standings-team a::before {
  opacity: 1;
}

.standings-team-prefix {
  color: #111827;
  flex: 0 0 auto;
  font-weight: 900;
  text-align: left;
}

.playoff-seed {
  color: #111827;
  font-weight: 900;
}

.standings-team img {
  background: #ffffff;
  border: 1px solid var(--tlfl-table-border);
  border-radius: 999px;
  flex: 0 0 auto;
  height: 1.45rem;
  object-fit: contain;
  padding: 0.08rem;
  width: 1.45rem;
}

.standings-team-name {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.standings-postseason {
  color: #1f2937;
  font-size: 0.78rem;
  font-weight: 700;
}

.standings-mobile-postseason-button {
  display: none;
}

.standings-postseason-summary {
  display: block;
  line-height: 1.22;
  white-space: normal;
}

.standings-postseason-details {
  max-width: 100%;
}

.standings-postseason-details summary {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: 0.42rem;
  grid-template-columns: minmax(0, 1fr) auto;
  line-height: 1.22;
  list-style: none;
  white-space: normal;
  width: 100%;
}

.standings-postseason-details summary::-webkit-details-marker {
  display: none;
}

.standings-postseason-toggle {
  align-items: center;
  color: var(--tlfl-blue-dark);
  display: inline-flex;
  flex: 0 0 auto;
  height: 1.1rem;
  justify-content: center;
  margin: 0;
  width: 1.1rem;
}

.standings-postseason-toggle-icon {
  display: block;
  height: 1rem;
  width: 1rem;
}

.standings-postseason-details summary:hover .standings-postseason-toggle {
  color: var(--tlfl-blue);
}

.standings-postseason-details[open] .standings-postseason-toggle-icon {
  transform: rotate(180deg);
}

.standings-postseason-summary-text {
  display: block;
  line-height: 1.22;
  min-width: 0;
}

.standings-postseason-help-rows {
  border-left: 2px solid var(--tlfl-table-border-strong);
  display: grid;
  gap: 0.22rem;
  margin: 0.35rem 0 0 0.3rem;
  padding-left: 0.55rem;
}

.standings-postseason-help-row {
  color: #374151;
  font-size: 0.76rem;
  line-height: 1.25;
  white-space: normal;
}

.standings-postseason-modal {
  background: #ffffff;
  border: 0;
  border-radius: var(--tlfl-radius);
  box-shadow: 0 22px 60px rgb(17 24 39 / 0.32);
  color: #111827;
  max-width: min(30rem, calc(100vw - 2rem));
  padding: 0;
  width: 100%;
}

.standings-postseason-modal::backdrop {
  background: rgb(17 24 39 / 0.48);
}

.standings-postseason-modal-header {
  align-items: center;
  border-bottom: 1px solid var(--tlfl-table-border);
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  padding: 0.8rem 0.95rem 0.65rem;
}

.standings-postseason-modal-header h2 {
  color: #111827;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.2;
  margin: 0;
}

.standings-postseason-modal-close {
  appearance: none;
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0.5rem;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  height: 2rem;
  justify-content: center;
  padding: 0;
  width: 2rem;
}

.standings-postseason-modal-close-icon {
  display: block;
  height: 1.25rem;
  width: 1.25rem;
}

.standings-postseason-modal-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.standings-postseason-modal-summary {
  color: #111827;
  font-size: 0.94rem;
  font-weight: 900;
  line-height: 1.35;
  margin: 0;
  padding: 0.9rem 0.95rem 0.1rem;
}

.standings-postseason-modal-details {
  color: #374151;
  display: grid;
  font-size: 0.86rem;
  gap: 0.42rem;
  line-height: 1.35;
  margin: 0;
  padding: 0.65rem 0.95rem 1rem 1.95rem;
}

.standings-key-table {
  background: var(--tlfl-surface);
  border: 1px solid var(--tlfl-table-border);
  border-collapse: separate;
  border-radius: var(--tlfl-radius-sm);
  border-spacing: 0;
  box-shadow: 0 4px 14px rgb(17 24 39 / 0.05);
  color: #374151;
  font-size: 0.86rem;
  margin-top: 0.9rem;
  overflow: hidden;
  width: min(100%, 31rem);
}

.standings-key-table caption {
  color: #111827;
  font-size: 0.84rem;
  font-weight: 900;
  padding: 0.45rem 0.65rem;
  text-align: left;
  text-transform: uppercase;
}

.standings-key-table th,
.standings-key-table td {
  border-top: 1px solid var(--tlfl-table-border);
  padding: 0.42rem 0.45rem;
}

.standings-key-table th {
  color: #111827;
  font-weight: 900;
  text-align: left;
  text-transform: none;
  width: 2.75rem;
}

.standings-key-table td {
  padding-left: 0.25rem;
}

.standings-diff-positive {
  color: #15803d;
}

.standings-diff-negative {
  color: #b91c1c;
}

.standings-diff-even {
  color: #111827;
}

@media (max-width: 760px) {
  .standings-scroll-cue {
    position: relative;
  }

  .standings-scroll-cue::before,
  .standings-scroll-cue::after {
    bottom: 1px;
    content: "";
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: 1px;
    transition: opacity 140ms ease;
    width: 1.8rem;
    z-index: 2;
  }

  .standings-scroll-cue::before {
    background: linear-gradient(to left, transparent, rgb(246 248 251 / 0.96));
    border-radius: var(--tlfl-radius) 0 0 var(--tlfl-radius);
    left: 1px;
  }

  .standings-scroll-cue::after {
    background: linear-gradient(to right, transparent, rgb(246 248 251 / 0.96));
    border-radius: 0 var(--tlfl-radius) var(--tlfl-radius) 0;
    right: 1px;
  }

  .standings-scroll-cue-left::before,
  .standings-scroll-cue-right::after {
    opacity: 1;
  }

  .standings-table-wrap {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }

  .standings-table col.standings-team-column {
    width: 14rem;
  }

  .standings-table col.standings-short-column {
    width: 1.75rem;
  }

  .standings-table col.standings-pct-column {
    width: 3.05rem;
  }

  .standings-table col.standings-record-column {
    width: 3.65rem;
  }

  .standings-table col.standings-points-column {
    width: 2.45rem;
  }

  .standings-table col.standings-diff-column,
  .standings-table col.standings-streak-column {
    width: 2.75rem;
  }

  .playoff-standings-table col.playoff-seed-column {
    width: 2.8rem;
  }

  .standings-table col.standings-postseason-column,
  .standings-table th.standings-postseason,
  .standings-table td.standings-postseason {
    display: none;
  }

  .standings-mobile-postseason-button {
    appearance: none;
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 999px;
    color: var(--tlfl-blue);
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    height: 1.5rem;
    justify-content: center;
    margin: 0;
    padding: 0;
    width: 1.5rem;
  }

  .standings-mobile-postseason-icon {
    display: block;
    height: 1.15rem;
    width: 1.15rem;
  }

  .standings-mobile-postseason-button:hover {
    background: #eaf1ff;
    color: var(--tlfl-blue-dark);
  }

  .standings-postseason-modal {
    border-radius: var(--tlfl-radius) var(--tlfl-radius) 0 0;
    inset: auto 0 0;
    margin: 0;
    max-height: 78dvh;
    max-width: none;
    overflow: auto;
    position: fixed;
    width: 100%;
  }

  .standings-postseason-modal-header {
    padding: 0.85rem 1rem 0.7rem;
  }

  .standings-postseason-modal-summary {
    padding: 0.9rem 1rem 0.15rem;
  }

  .standings-postseason-modal-details {
    padding: 0.65rem 1rem 1.05rem 2rem;
  }
}
