/* One card style for every series; all entries appear newest first. */
.game-series-sidebar {
  width: min(100%, 560px);
  min-width: 0;
  margin: 48px auto 0;
  padding-inline: var(--sidebar-inner-inset, 26px);
}

.game-series + .game-series { margin-top: 36px; }
.game-series-heading { margin-bottom: 17px; }
.game-series-kicker {
  margin: 0 0 7px;
  color: #718390;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.game-series-title-row { display: flex; align-items: center; gap: 12px; }
.game-series-title-row h2 {
  min-width: 0;
  margin: 0;
  color: #142231;
  font-size: 22px;
  font-weight: 670;
  line-height: 1.2;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
.game-series-count {
  flex: none;
  color: #81909c;
  font-size: 13px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.game-series-list { display: grid; gap: 3px; margin: 0; padding: 0; list-style: none; }
.game-series-list li { min-width: 0; margin: 0; padding: 0; }
.game-series-entry {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 7px;
  margin-inline: -7px;
  border-radius: var(--radius-control);
  color: #253946;
  text-decoration: none;
  transition: background-color .16s ease;
}
.game-series-cover {
  /* Match the secondary video thumbnails, including their 16:9 crop. */
  display: block;
  width: 112px;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-surface);
  background: #edf1f4;
  object-fit: cover;
}
.game-series-copy { display: grid; min-width: 0; gap: 5px; }
.game-series-name {
  font-size: 13px;
  font-weight: 620;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.game-series-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 7px;
  color: #71818f;
  font-size: 11px;
  line-height: 1.35;
}
.game-series-meta > span + span::before { content: '·'; margin-right: 7px; color: #a4b0b9; }
.game-series-year { font-variant-numeric: tabular-nums; }
.game-series-entry.is-current { background: #edf2f5; }
.game-series-entry.is-current .game-series-name { color: #142231; font-weight: 700; }
.game-series-current { color: #425f73; font-weight: 600; }
.game-series-entry[href]:hover { background: #f4f6f8; }
.game-series-entry[href]:hover .game-series-name { color: #101e2a; }
.game-series-entry:focus-visible, .game-series-title-link:focus-visible {
  outline: 2px solid #718b9e;
  outline-offset: 3px;
}
.game-series-title-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  color: inherit;
  text-decoration: none;
}
.game-series-title-link > span { min-width: 0; }
.game-series-title-link > .icon { width: 15px; height: 15px; flex: none; color: #97a8b3; stroke-width: 1.6; }
.game-series-title-link:hover > span { text-decoration: underline; text-decoration-color: #b8c7d1; text-underline-offset: 4px; }
.game-series-title-link:hover > .icon { color: #496779; }
.game-series-sidebar + .related-games { margin-top: 42px; }

/* Every sidebar series uses the same two-column gallery as discovery cards. */
:is(.game-series, .popular-games) { container: sidebar-discovery / inline-size; }
:is(.game-series, .popular-games) .game-series-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 16px;
}
:is(.game-series, .popular-games) .game-series-entry {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  align-items: start;
  gap: 9px;
  height: 100%;
  margin: 0;
  padding: 0;
  border-radius: var(--radius-control);
}
:is(.game-series, .popular-games) .game-series-cover {
  width: 100%;
  border-radius: var(--radius-surface);
  background: #edf2f5;
}
:is(.game-series, .popular-games) .game-series-copy {
  grid-template-rows: 1fr auto;
  gap: 6px;
  height: 100%;
}
:is(.game-series, .popular-games) .game-series-name {
  color: #304e62;
  font-weight: 550;
  line-height: 1.45;
}
:is(.game-series, .popular-games) .game-series-meta { color: #7a909f; line-height: 1.5; }
:is(.game-series, .popular-games) .game-series-entry:hover { background: transparent; }
:is(.game-series, .popular-games) .game-series-entry:hover .game-series-name { color: #1f6c8c; }
:is(.game-series, .popular-games) .game-series-entry:focus-visible { outline-color: #377da0; outline-offset: 5px; }
.game-series .game-series-entry.is-current {
  background: linear-gradient(145deg, #effbff, #e2f3fa);
  box-shadow: 0 0 0 5px #e8f7fc, 0 0 0 7px #2386ab, 0 8px 22px rgb(24 105 139 / 16%);
}
.game-series .game-series-entry.is-current .game-series-name { color: #10536f; font-weight: 700; }
.game-series .game-series-entry.is-current .game-series-meta { align-items: center; color: #557f93; }
.game-series .game-series-current {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: #147398;
  color: #fff;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.3;
  white-space: nowrap;
}
.game-series .game-series-current::before {
  content: '';
  width: 5px;
  height: 5px;
  flex: none;
  margin: 0;
  border-radius: var(--radius-round);
  background: currentColor;
  box-shadow: 0 0 0 2px rgb(255 255 255 / 25%);
}

@container sidebar-discovery (max-width: 280px) {
  .game-series .game-series-list { gap: 20px 12px; }
  .game-series .game-series-entry.is-current {
    box-shadow: 0 0 0 3px #e8f7fc, 0 0 0 5px #2386ab, 0 6px 16px rgb(24 105 139 / 16%);
  }
}

/* Popular games remain readable without large screenshot cards. */
.popular-games .game-series-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}
.popular-games .game-series-entry {
  grid-template-columns: 40px minmax(0, 1fr);
  grid-template-rows: auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  height: auto;
  padding: 4px 7px;
  margin-inline: -7px;
  border-radius: var(--radius-control);
}
.popular-game-icon {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: var(--radius-detail);
}
.popular-games .game-series-copy {
  grid-template-rows: auto auto;
  gap: 3px;
  height: auto;
}
.popular-games .game-series-name { font-size: 13px; line-height: 1.35; }
.popular-games .game-series-meta { line-height: 1.35; }
.popular-games .game-series-entry:hover { background: #f4f6f8; }

@container sidebar-discovery (max-width: 360px) {
  .popular-games .game-series-list { gap: 12px; }
  .popular-games .game-series-entry { grid-template-columns: 28px minmax(0, 1fr); gap: 8px; }
  .popular-game-icon { width: 28px; height: 28px; border-radius: var(--radius-detail); }
  .popular-games .game-series-name { font-size: 12px; }
  .popular-games .game-series-meta { font-size: 10px; gap: 2px 4px; }
  .popular-games .game-series-meta > span + span::before { margin-right: 4px; }
}

@container sidebar-discovery (max-width: 280px) {
  .popular-games .game-series-entry {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    align-items: start;
    gap: 6px;
    min-height: 0;
    height: 100%;
    padding: 4px 0;
    margin: 0;
  }
  .popular-games .game-series-copy { align-self: start; }
}

@media (max-width: 900px) {
  .game-series-sidebar { margin-top: 36px; }
}
@media (max-width: 540px) {
  .game-series-sidebar { margin-top: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .game-series-entry { transition: none; }
}
