.pb-standings {
  --pbs-navy: var(--primary, #2c3e50);
  --pbs-header: var(--secondary, #202a25);
  --pbs-ink: #17232d;
  --pbs-muted: #61707b;
  --pbs-line: rgba(44, 62, 80, 0.14);
  --pbs-soft: var(--secondary-light, #dce7e2);
  --pbs-playoff: #2f7d63;
  --pbs-playin: #d19a2d;
  --pbs-outside: #a6afb5;
  color: var(--pbs-ink);
  font-family: "Roboto Condensed", Roboto, sans-serif;
  inline-size: 100%;
}

.pb-standings *,
.pb-standings *::before,
.pb-standings *::after {
  box-sizing: border-box;
}

.pb-standings__meta {
  align-items: center;
  background: var(--pbs-soft);
  border-block-end: 1.5px solid rgba(44, 62, 80, 0.28);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: space-between;
  margin-block-end: 16px;
  min-block-size: 48px;
  padding: 10px 16px;
}

.pb-standings__season,
.pb-standings__season-state {
  font-family: Oswald, "Roboto Condensed", sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pb-standings__season-state {
  background: rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  color: var(--pbs-muted);
  padding: 5px 10px;
}

.pb-standings__updated {
  color: var(--pbs-muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  margin-inline-start: auto;
}

.pb-standings__section + .pb-standings__section {
  margin-block-start: 28px;
}

.pb-standings__section-heading { margin-block-end: 12px; }

.pb-standings__section-season {
  color: var(--pbs-muted);
  display: block;
  font: 500 12px/1.4 "Roboto Condensed", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pb-standings__section-title {
  color: var(--pbs-header);
  font: 700 clamp(24px, 2.6cqi, 34px)/1.05 Oswald, "Roboto Condensed", sans-serif;
  letter-spacing: 0.015em;
  margin: 3px 0 0;
  text-transform: uppercase;
}

.pb-standings__table-wrap {
  background: #fff;
  border-block-end: 1.5px solid rgba(44, 62, 80, 0.28);
  border-radius: 8px;
  box-shadow: 0 7px 24px rgba(35, 53, 64, 0.05);
  inline-size: 100%;
  overflow: hidden;
}

.pb-standings__table {
  border: 0;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 15px;
  inline-size: 100%;
  table-layout: auto;
}

.pb-standings__table thead {
  background: var(--pbs-header);
  color: #fff;
}

.pb-standings__table th,
.pb-standings__table td {
  border: 0;
  border-block-end: 1px solid var(--pbs-line);
  padding: 10px 8px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.pb-standings__table thead th {
  color: #fff;
  font-family: Oswald, "Roboto Condensed", sans-serif;
  font-size: 13px;
  font-weight: 600;
  height: 48px;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.pb-standings__table abbr {
  cursor: help;
  text-decoration: none;
}

.pb-standings__table tbody tr:nth-child(even) {
  background: #e9efec;
  background: color-mix(in srgb, var(--pbs-soft) 58%, white);
}

.pb-standings__table tbody tr:last-child > * {
  border-block-end: 0;
}

.pb-standings__table tbody tr:hover {
  background: #e1eae6;
  background: color-mix(in srgb, var(--pbs-soft) 84%, white);
}

.pb-standings__table--sportoteka tbody td {
	font-variant-numeric: tabular-nums;
	font-weight: 500;
}

.pb-standings__table--sportoteka tbody .pb-standings__points { font-weight: 600; }

.pb-standings__col-place,
.pb-standings__place {
  inline-size: 50px;
}

.pb-standings__place {
  border-inline-start: 4px solid var(--pbs-outside) !important;
  font-family: Oswald, "Roboto Condensed", sans-serif;
  font-size: 18px;
	font-weight: 600;
}

.pb-standings__row--playoff .pb-standings__place { border-inline-start-color: var(--pbs-playoff) !important; }
.pb-standings__row--playin .pb-standings__place { border-inline-start-color: var(--pbs-playin) !important; }

.pb-standings__col-team,
.pb-standings__team {
  min-inline-size: 210px;
  text-align: start !important;
}

.pb-standings__team-link {
  align-items: center;
  color: var(--pbs-ink);
  display: inline-flex;
  font-weight: 600;
  gap: 10px;
  min-inline-size: 0;
  text-decoration: none;
}

a.pb-standings__team-link:hover .pb-standings__team-name,
a.pb-standings__team-link:focus-visible .pb-standings__team-name {
  color: var(--pbs-playoff);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pb-standings__team-link:focus-visible {
  border-radius: 4px;
  outline: 2px solid var(--pbs-playin);
  outline-offset: 3px;
}

.pb-standings__logo {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(44, 62, 80, 0.11);
  border-radius: 8px;
  display: inline-flex;
  flex: 0 0 46px;
  height: 46px;
  justify-content: center;
  padding: 4px;
  width: 46px;
}

.pb-standings__logo img {
  display: block;
  height: 100%;
  max-height: 38px;
  max-width: 38px;
  object-fit: contain;
  width: 100%;
}

.pb-standings__logo--empty::after {
  background: var(--pbs-soft);
  border-radius: 50%;
  content: "";
  height: 20px;
  width: 20px;
}

.pb-standings__team-name {
  line-height: 1.15;
  white-space: normal;
}

.pb-standings__form small {
  color: var(--pbs-muted);
  display: block;
  font-size: 11px;
  margin-block-start: 3px;
}

.pb-standings__form-value,
.pb-standings__zone-label {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  justify-content: center;
  line-height: 1;
  padding: 6px 9px;
}

.pb-standings__form-value--positive { background: #e2f3eb; color: #23634f; }
.pb-standings__form-value--negative { background: #f7e7e7; color: #8d3b3b; }
.pb-standings__form-value--neutral { background: #edf0f2; color: #586670; }

.pb-standings__zone-label--playoff { background: #e2f3eb; color: #23634f; }
.pb-standings__zone-label--playin { background: #fff2d6; color: #825f16; }
.pb-standings__zone-label--outside { background: #edf0f2; color: #66737c; }

.pb-standings__footer {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: space-between;
  margin-block-start: 12px;
}

.pb-standings__footer .pb-standings__updated {
  margin-inline-start: auto;
  text-align: end;
}

.pb-standings__legend {
  align-items: center;
  color: var(--pbs-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  gap: 8px 18px;
  margin-block-start: 12px;
}

.pb-standings__footer .pb-standings__legend { margin-block-start: 0; }

.pb-standings__legend > span {
  align-items: center;
  display: inline-flex;
  gap: 6px;
}

.pb-standings__legend-dot {
  background: var(--pbs-outside);
  border-radius: 999px;
  display: inline-block;
  height: 8px;
  width: 8px;
}

.pb-standings__legend-dot--playoff { background: var(--pbs-playoff); }
.pb-standings__legend-dot--playin { background: var(--pbs-playin); }

.pb-standings__notice,
.pb-standings__empty {
  border-block-end: 1.5px solid rgba(44, 62, 80, 0.28);
  border-radius: 8px;
  margin: 0 0 16px;
  padding: 16px;
}

.pb-standings__notice--stale { background: #fff4d9; color: #755414; }
.pb-standings__notice--error { background: #f8e3e3; color: #7f3030; }

.pb-standings__empty {
  align-items: center;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  min-block-size: 150px;
  text-align: center;
}

.pb-standings__empty strong {
  font-family: Oswald, "Roboto Condensed", sans-serif;
  font-size: 22px;
  text-transform: uppercase;
}

.pb-standings__empty span { color: var(--pbs-muted); }

.pb-standings__sr-only {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

@media (max-width: 1080px) {
  .pb-standings__table { font-size: 14px; }
  .pb-standings__table th,
  .pb-standings__table td { padding-inline: 6px; }
  .pb-standings__col-team,
  .pb-standings__team { min-inline-size: 176px; }
  .pb-standings__logo { flex-basis: 40px; height: 40px; width: 40px; }
  .pb-standings__logo img { max-height: 32px; max-width: 32px; }
}

@media (max-width: 820px) {
  .pb-standings__meta {
    align-items: flex-start;
    gap: 6px 10px;
    padding: 10px 12px;
  }

  .pb-standings__updated {
    flex: 1 0 100%;
    font-size: 14px;
    margin-inline-start: 0;
  }

  .pb-standings__section + .pb-standings__section { margin-block-start: 22px; }
  .pb-standings__section-heading { margin-block-end: 10px; }
  .pb-standings__section-title { font-size: 24px; }
  .pb-standings__table-wrap { background: transparent; border: 0; box-shadow: none; overflow: visible; }
  .pb-standings__table,
  .pb-standings__table tbody { display: block; }

  .pb-standings__table thead {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
  }

  .pb-standings__table tbody {
    display: grid;
    gap: 10px;
  }

  .pb-standings__table tbody tr {
    background: #fff !important;
    border-block-end: 1.5px solid rgba(44, 62, 80, 0.28);
    border-radius: 8px;
    box-shadow: 0 5px 18px rgba(35, 53, 64, 0.045);
    display: grid;
    gap: 0;
    grid-template-columns: 48px repeat(4, minmax(42px, 1fr));
    overflow: hidden;
    padding: 0;
  }

  .pb-standings__table tbody th,
  .pb-standings__table tbody td {
    border: 0;
    min-inline-size: 0;
    padding: 8px 5px;
    white-space: normal;
  }

  .pb-standings__place {
    align-items: center;
    display: flex;
    font-size: 20px;
    grid-column: 1;
    grid-row: 1 / span 2;
    inline-size: auto;
    justify-content: center;
  }

  .pb-standings__team {
    border-block-end: 1px solid var(--pbs-line) !important;
    grid-column: 2 / -1;
    grid-row: 1;
    min-inline-size: 0;
    padding: 8px !important;
  }

  .pb-standings__team-link { font-size: 16px; gap: 8px; }
  .pb-standings__logo { flex-basis: 38px; height: 38px; width: 38px; }

  .pb-standings__table tbody td:not(.pb-standings__place):not(.pb-standings__secondary):not(.pb-standings__form):not(.pb-standings__zone) {
    border-inline-end: 1px solid var(--pbs-line);
    grid-row: 2;
  }

  .pb-standings__table tbody td:nth-of-type(2) { grid-column: 2; }
  .pb-standings__table tbody td:nth-of-type(3) { grid-column: 3; }
  .pb-standings__table tbody td:nth-of-type(4) { grid-column: 4; }
  .pb-standings__table tbody td:nth-of-type(5) { grid-column: 5; }

  .pb-standings__table tbody td:nth-of-type(n+2):nth-of-type(-n+5)::before {
    color: var(--pbs-muted);
    content: attr(data-label);
    display: block;
    font-size: 11px;
    letter-spacing: 0.03em;
    line-height: 1;
    margin-block-end: 4px;
    text-transform: uppercase;
  }

  .pb-standings__secondary {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
  }

  .pb-standings__form {
    align-items: center;
    display: flex;
    gap: 6px;
    grid-column: 2 / 4;
    grid-row: 3;
    justify-content: flex-start;
    padding-inline-start: 8px !important;
  }

  .pb-standings__form::before {
    color: var(--pbs-muted);
    content: "Форма";
    font-size: 10px;
    text-transform: uppercase;
  }

  .pb-standings__form small { display: inline; margin: 0; }
  .pb-standings__zone { grid-column: 4 / -1; grid-row: 3; text-align: end !important; }
  .pb-standings__table--sportoteka .pb-standings__points {
    border-inline-end: 0;
    grid-column: 5;
    grid-row: 2;
  }

  .pb-standings__table--sportoteka .pb-standings__points::before {
    color: var(--pbs-muted);
    content: attr(data-label);
    display: block;
    font-size: 11px;
    letter-spacing: 0.03em;
    line-height: 1;
    margin-block-end: 4px;
    text-transform: uppercase;
  }
  .pb-standings__legend { font-size: 14px; gap: 7px 12px; }

  .pb-standings__footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .pb-standings__footer .pb-standings__updated {
    flex: 1 0 100%;
    margin-inline-start: 0;
    text-align: start;
  }
}

@media (max-width: 390px) {
  .pb-standings__table tbody tr { grid-template-columns: 44px repeat(4, minmax(40px, 1fr)); }
  .pb-standings__team-name { font-size: 15px; }
  .pb-standings__form-value,
  .pb-standings__zone-label { font-size: 11px; padding: 5px 7px; }
}

@media (prefers-reduced-motion: reduce) {
  .pb-standings *,
  .pb-standings *::before,
  .pb-standings *::after { scroll-behavior: auto !important; transition: none !important; }
}
