.standings-feed {
  --standings-bg: #fff;
  --standings-text: #111827;
  --standings-muted: var(--bs-secondary-color, #6b7280);
  --standings-rank-width: 2.5rem;
  --standings-stat-width: 2rem;
  --standings-goals-width: 3.5rem;
  --standings-difference-width: 3rem;
  --standings-points-width: 2rem;
  width: 100%;
  min-width: 0;
  container-name: standings;
  container-type: inline-size;
  isolation: isolate;
  color: var(--standings-text);
  font-family: 'Causten', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.2;
  text-align: left;
}

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

.standings-feed table,
.standings-feed thead,
.standings-feed tbody,
.standings-feed tr,
.standings-feed th,
.standings-feed td {
  margin: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-style: normal;
  line-height: inherit;
  box-shadow: none;
}

.standings-feed button,
.standings-feed a {
  font-family: inherit;
}

.standings-feed.is-panel {
  overflow: hidden;
  padding: 1rem;
  border: 0;
  border-radius: 20px;
  background: var(--standings-bg);
}

.standings-section + .standings-section {
  margin-top: 1.5rem;
}

.standings-section[hidden] {
  display: none;
}

.standings-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  width: 100%;
  min-height: 26px;
  margin: 0 0 var(--evi-section-gap, .5rem);
}

.standings-section-title {
  min-width: 0;
  margin: 0;
  color: var(--evi-text, #111827);
  font-family: 'World Condensed', 'Causten', system-ui, sans-serif;
  font-size: var(--evi-section-size, 1.08rem);
  font-weight: 400;
  line-height: 1.1;
  text-transform: uppercase;
}

.standings-live-pill {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  margin-inline-start: auto;
  min-height: 26px;
  padding: 5px 8px;
  border-radius: 8px;
  background: var(--evi-brand-strong);
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.standings-live-pill:hover,
.standings-live-pill:focus-visible {
  background: var(--evi-brand-strong);
  color: #fff;
}

.standings-card,
.standings-skeleton-card {
  overflow: hidden;
  padding: 1rem;
  border: 0;
  border-radius: 20px;
  background: var(--standings-bg);
}

.standings-scroll {
  width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.standings-feed .standings-table {
  width: 100%;
  min-width: 19rem;
  margin: 0;
  border-collapse: collapse;
  table-layout: fixed;
  color: var(--standings-text);
  font-size: .9rem;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

.standings-table th,
.standings-table td {
  padding: .3rem 0;
  border: 0;
  vertical-align: middle;
}

.standings-table thead th {
  padding-top: 0;
  padding-bottom: .45rem;
  color: var(--standings-muted);
  font-size: .72rem;
  font-weight: 600;
  text-transform: none;
}

.standings-table .standings-rank-col {
  width: var(--standings-rank-width);
  padding-right: .4rem;
  color: var(--standings-muted);
  text-align: left;
}

.standings-team-col {
  width: auto;
  text-align: left;
}

.standings-stat-col {
  width: var(--standings-stat-width);
  text-align: center;
}

.standings-goals-col {
  width: var(--standings-goals-width);
  text-align: center;
}

.standings-table .standings-stat-col,
.standings-table .standings-goals-col {
  color: var(--standings-muted);
}

.standings-table .standings-stat-col:nth-last-child(2) {
  width: var(--standings-difference-width);
}

.standings-table td.standings-stat-col,
.standings-table td.standings-goals-col {
  font-weight: 700;
}

.standings-table .standings-points-col {
  width: var(--standings-points-width);
}

.standings-table td.standings-points-col {
  color: var(--standings-text);
}

.standings-feed .standings-table .standings-rank {
  display: inline-flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: .2rem;
  color: inherit;
  font-weight: 400;
}

.standings-rank-move {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  width: auto;
  font-size: .56rem;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.standings-rank-move.is-up {
  color: #16a34a;
}

.standings-rank-move.is-down {
  color: #dc2626;
}

.standings-rank-move.is-static {
  display: none;
}

.standings-team {
  display: flex;
  align-items: center;
  gap: .4rem;
  min-width: 0;
}

.standings-team-logo,
.standings-team-fallback {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  object-fit: contain;
}

.standings-team-fallback {
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  background: #f3f4f6;
  font-size: .75rem;
  font-weight: 800;
}

.standings-team-link {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
}

.standings-team-name {
  overflow: hidden;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.standings-team-name.is-short {
  display: none;
}

.standings-team-link:hover,
.standings-team-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.standings-favorite {
  flex: 0 0 auto;
  color: #111827;
  font-size: .75rem;
  line-height: 1;
}

.standings-row.is-live {
  box-shadow: inset 3px 0 0 var(--evi-brand-strong);
}

.standings-feed .standings-table .standings-row.is-highlighted {
  background: rgba(var(--evi-brand-rgb), .08);
  box-shadow: none;
}

.standings-row.is-highlighted .standings-team-name {
  font-weight: 700;
}

.standings-all-link {
  display: inline-flex;
  gap: 5px;
  margin-top: .85rem;
  color: var(--evi-brand);
  font-size: .92rem;
  text-decoration: none;
}

.standings-message {
  margin: 0;
  padding: 1rem;
  border-radius: 20px;
  background: #fff;
  color: #667085;
}

.standings-message[hidden],
.standings-loading[hidden] {
  display: none;
}

.standings-error {
  color: #b42318;
}

.standings-skeleton-section + .standings-skeleton-section {
  margin-top: 1.5rem;
}

.standings-skeleton-rank,
.standings-skeleton-logo,
.standings-skeleton-name,
.standings-skeleton-stat {
  display: block;
  background: #eceff3;
}

.standings-skeleton-card {
  position: relative;
}

/* One moving layer per card, instead of animating every placeholder. */
.standings-skeleton-card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5), transparent);
  transform: translateX(-100%);
  animation: standings-shimmer 1.5s ease-in-out infinite;
}

html[data-theme="dark"] .standings-skeleton-card::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .04), transparent);
}

.standings-skeleton-rank,
.standings-skeleton-name,
.standings-skeleton-stat {
  height: 14px;
  border-radius: 6px;
}

.standings-skeleton-rank {
  width: 20px;
}

.standings-skeleton-logo {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 7px;
}

.standings-skeleton-name {
  width: min(170px, 72%);
}

.standings-skeleton-stat {
  width: min(18px, 80%);
  margin-inline: auto;
}

@keyframes standings-shimmer {
  to { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .standings-skeleton-card::after {
    display: none;
    animation: none;
  }
}

.standings-feed.is-panel .standings-card,
.standings-feed.is-panel .standings-skeleton-card {
  padding: 0;
  border-radius: 0;
  background: transparent;
}

@container standings (max-width: 520px) {
  .standings-section-head {
    min-height: 22px;
  }

  .standings-live-pill {
    min-height: 22px;
    padding: 4px 7px;
    font-size: .65rem;
  }

  .standings-card,
  .standings-skeleton-card {
    --standings-rank-width: 2.2rem;
    --standings-stat-width: 1.2rem;
    --standings-goals-width: 2.4rem;
    --standings-difference-width: 1.9rem;
    --standings-points-width: 1.4rem;
  }

  .standings-table {
    font-size: .86rem;
  }

  .standings-team-logo,
  .standings-team-fallback {
    width: 20px;
    height: 20px;
    flex-basis: 20px;
  }

  .standings-team-name.is-full {
    display: none;
  }

  .standings-team-name.is-short {
    display: block;
  }

  .standings-skeleton-logo {
    width: 20px;
    height: 20px;
    flex-basis: 20px;
  }
}

@media (min-width: 768px) {
  .standings-feed.is-panel,
  .standings-card,
  .standings-skeleton-card {
    padding: 1.5rem;
  }
}
