/* ============ Series Hub ============ */

.series-hub {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
}

/* Per-series accent via CSS variables */
.series-hub {
  --series-accent: var(--brand, #00b3a4);
}

.series-hub--sl1 { --series-accent: #0fb9a5; }
.series-hub--sl2 { --series-accent: #10b3dc; }
.series-hub--fs1 { --series-accent: #e81e36; }
.series-hub--fs2 { --series-accent: #ff7d00; }
.series-hub--aca { --series-accent: #7927a8; }

.series-hub__header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
  align-items: center;
}

.series-hub__title-block {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.series-hub__logo img {
  display: block;
  width: 64px;
  height: auto;
}

.series-hub__eyebrow {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted-ink, #6b7280);
  margin: 0 0 .25rem;
}

.series-hub__title {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0;
}

.series-hub__season {
  font-size: .9rem;
  font-weight: 400;
  margin-left: .75rem;
  padding: .2rem .5rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, .5);
}

.series-hub__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
  font-size: .9rem;
}

.series-hub__meta-item {
  color: var(--muted-ink, #6b7280);
}

/* Tabs */

.series-hub__tabs {
  margin-top: .25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(148, 163, 184, .4);
}

.series-hub__tabs-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
}

.series-hub__tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .5rem 1rem;
  border-radius: 999px 999px 0 0;
  text-decoration: none;
  font-size: .9rem;
  border: 1px solid transparent;
  border-bottom: none;
  margin-bottom: -1px;
  color: var(--muted-ink, #6b7280);
  background: transparent;
}

.series-hub__tab--active {
  color: var(--ink, #111827);
  border-color: transparent;
  border-bottom-color: #f3f4f6;
  background: #f3f4f6;
  font-weight: 500;
}

/* Panels */

.series-hub__content {
  background: var(--page, #ffffff);
  border-radius: 1.25rem;
  padding: 1.75rem 1.5rem 2rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .06);
}

.series-hub__panel + .series-hub__panel {
  margin-top: 2rem;
}

.series-hub__section-title {
  font-size: 1.1rem;
  margin: 0 0 1rem;
}

/* Cards (overview) */

.series-hub__panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr);
  gap: 1.5rem;
}

.series-hub__card {
  background: var(--card, #ffffff);
  border-radius: 1rem;
  padding: 1.25rem 1.25rem 1.35rem;
  border: 1px solid rgba(148, 163, 184, .3);
}

.series-hub__card--standings {
  grid-column: 1 / -1;
}

.series-hub__card-title {
  font-size: 1rem;
  margin: 0 0 .75rem;
}

.series-hub__next-round {
  font-weight: 500;
  margin: 0 0 .4rem;
  display: flex;
  gap: .5rem;
  align-items: baseline;
}

.series-hub__round-label {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted-ink, #6b7280);
}

.series-hub__round-name {
  font-size: 1.05rem;
}

.series-hub__next-meta {
  font-size: .9rem;
  color: var(--muted-ink, #6b7280);
  margin: 0 0 .25rem;
}

.series-hub__next-date {
  font-size: .95rem;
  font-weight: 500;
  margin: 0 0 .6rem;
}

.series-hub__next-link a,
.series-hub__more-link a {
  font-size: .9rem;
  text-decoration: none;
  color: var(--series-accent);
}

.series-hub__standings-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.series-hub__mini-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.series-hub__mini-list li {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  font-size: .9rem;
  padding: .3rem 0;
}

.series-hub__mini-pos {
  min-width: 2ch;
  font-variant-numeric: tabular-nums;
}

.series-hub__mini-points {
  font-variant-numeric: tabular-nums;
  color: var(--muted-ink, #6b7280);
}

/* Tables */

.series-hub__table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.series-hub__table-wrapper--wide {
  margin-top: .75rem;
}

.series-hub__table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  min-width: 100%;
}

.series-hub__table th,
.series-hub__table td {
  padding: .35rem .5rem;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, .25);
}

.series-hub__table th {
  font-weight: 500;
  font-size: .85rem;
  color: var(--muted-ink, #6b7280);
  white-space: nowrap;
}

.series-hub__table--compact th,
.series-hub__table--compact td {
  padding: .25rem .45rem;
}

/* Calendar statuses */

.series-hub__status-pill {
  display: inline-flex;
  align-items: center;
  padding: .15rem .55rem;
  border-radius: 999px;
  font-size: .75rem;
  border: 1px solid rgba(148, 163, 184, .4);
}

.series-hub__round--completed .series-hub__status-pill {
  background: rgba(34, 197, 94, .08);
  border-color: rgba(34, 197, 94, .5);
}

.series-hub__round--current .series-hub__status-pill {
  background: rgba(249, 115, 22, .08);
  border-color: rgba(249, 115, 22, .5);
}

.series-hub__round--upcoming .series-hub__status-pill {
  background: rgba(59, 130, 246, .08);
  border-color: rgba(59, 130, 246, .5);
}

/* Results list */

.series-hub__results-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.series-hub__race {
  border-radius: .9rem;
  border: 1px solid rgba(148, 163, 184, .4);
  padding: .9rem 1rem;
  background: var(--card, #ffffff);
}

.series-hub__race-header {
  list-style: none;
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: baseline;
}

.series-hub__race-round {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted-ink, #6b7280);
}

.series-hub__race-name {
  font-weight: 500;
}

.series-hub__race-date {
  font-size: .85rem;
  color: var(--muted-ink, #6b7280);
}

/* Competitors */

.series-hub__teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.series-hub__team {
  background: var(--card, #ffffff);
  border-radius: 1rem;
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, .35);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
  position: relative;
}

.series-hub__team::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border-top: 3px solid var(--team-colour, var(--series-accent));
  opacity: .9;
}

.series-hub__team-header {
  display: flex;
  gap: .9rem;
  align-items: center;
  margin-bottom: .75rem;
}

.series-hub__team-logo img {
  width: 48px;
  height: auto;
  display: block;
}

.series-hub__team-name {
  font-size: 1rem;
  margin: 0;
}

.series-hub__team-meta {
  font-size: .85rem;
  color: var(--muted-ink, #6b7280);
  margin: .15rem 0 0;
}

.series-hub__team-car img {
  width: 100%;
  height: auto;
  display: block;
  margin: .3rem 0 .4rem;
}

.series-hub__drivers-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid rgba(148, 163, 184, .3);
  padding-top: .5rem;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

.series-hub__driver {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: .4rem;
  font-size: .9rem;
}

.series-hub__driver-helmet img {
  width: 22px;
  height: auto;
  display: block;
}

.series-hub__driver-number {
  font-variant-numeric: tabular-nums;
  min-width: 2.5ch;
  color: var(--muted-ink, #6b7280);
}

.series-hub__driver-name {
  font-weight: 500;
}

.series-hub__driver-flag {
  font-size: .8rem;
  color: var(--muted-ink, #6b7280);
}

/* Standings sections */

.series-hub__standings-section {
  margin-top: 1.5rem;
}

.series-hub__subheading {
  font-size: 1rem;
  margin: 0 0 .75rem;
}

/* Empty / muted */

.series-hub__empty {
  font-size: .9rem;
  color: var(--muted-ink, #6b7280);
  margin: .5rem 0;
}

.series-hub__empty--small {
  font-size: .8rem;
}

.series-hub__muted {
  color: var(--muted-ink, #6b7280);
  font-size: .8rem;
}

/* Responsiveness */

@media (max-width: 900px) {
  .series-hub {
    padding-inline: 1rem;
  }

  .series-hub__panel-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .series-hub__standings-split {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .series-hub__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .series-hub__tabs-list {
    gap: .1rem;
  }

  .series-hub__tab {
    padding-inline: .7rem;
  }
}
