

.page-list-packs .pack-selector {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
  align-items: stretch; /* make children fill the available width so buttons align left */
  transition: background-color 250ms ease, transform 250ms ease;
}

.page-list-packs .pack-selector button {
  font-family: "Lexend Deca", sans-serif;
  font-size: 1rem;
  padding:  1rem;
  background-color: var(--color-background);
  color: var(--color-on-background);
  border: 5px solid color-mix(in srgb, var(--color-on-background) 10%, transparent);
  border-radius: 0 1.5rem 1.5rem 0;
  display: block;
  width: 100%;
  text-align: left;
  box-sizing: border-box;
  transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease, transform 200ms ease;
  transform: translateX(0);
}

.page-list-packs .pack-selector button:hover {
  background-color: var(--color-background-hover);
  color: var(--color-on-background-hover);
  
}

.page-list-packs .pack-selector button.active {
  background-color: white;
  color: black;
  border-color: darkgrey;
}

.pack-list {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap; /* badges wrap nicely if too long */
}

.page-list-packs {
  display: grid;
  /* give the main content more room so pack-name can be wider */
  grid-template-columns: 1.5fr 1.5fr 11fr;
  column-gap: 2rem;
  margin: 0 auto;
  height: 100%;
  padding-block: 2rem;
  position: relative; /* allow absolutely positioned header elements */
}

.pack-selector {
  max-height: 85vh;    
  padding-right: 1rem;
  overflow-y: scroll;
}

.page-list-packs .list-container {
  padding-inline: 0.5rem;
  width: 17rem;
}

.page-list-packs .list-header {
  padding: 1rem;
  margin-bottom: 1rem;
}



.page-list-packs .list {
  width: 100%;
  table-layout: auto;
}

.page-list-packs .list .rank {
  text-align: end;
  padding-right: 1rem;
}

.page-list-packs .list .level {
  width: 100%;
}

.page-list-packs .list .level button {
  width: 100%;
  text-align: start;
  background-color: var(--color-background);
  color: var(--color-on-background);
  border: none;
  padding: 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.page-list-packs .list .level button:hover {
  background-color: var(--color-background-hover);
  color: var(--color-on-background-hover);
}

.page-list-packs .list .level.active button {
  background-color: var(--color-primary);
  color: var(--color-on-primary);
}

.page-list-packs .level-container {
  white-space: nowrap;
  padding-right: 2rem;
  padding-top: 1rem; /* ensure top heading isn't visually cut off by header */
  max-width: 48rem;
  position: relative;
  z-index: 1; /* keep main content above the wide pack-name */
  
}

.page-list-packs .level {
    white-space: nowrap;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.page-list-packs .level-authors {
  display: grid;
  grid-template-columns: max-content 1fr;
  grid-auto-rows: max-content;
  gap: 1rem;
}

.page-list-packs .video {
  aspect-ratio: 16/9;
  width: 100%;
}

.page-list-packs .stats {
  display: flex;
  justify-content: space-evenly;
  text-align: center;
  gap: 2rem;
}

.page-list-packs .stats li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/* Anchor pack buttons to the left edge of the left column.
   Using overrides so this is minimal and non-visual beyond alignment. */

