/* packlist — tabbed, tickable checklists. */
.packlist .sec__inner { display: flex; flex-direction: column; align-items: flex-start; }

/* ---- tab bar ---------------------------------------------------------- */
.packlist__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  margin-top: 32px;
}

/* The bar is only a control surface once the script runs; before that the
   panels are all open and the buttons would do nothing. */
.packlist:not(.packlist--js) .packlist__tabs { display: none; }
.packlist--single .packlist__bar { border-bottom: 0; }

/* A segmented group rather than an underlined row. The underline was the one
   place on the page using that device, so it read as borrowed browser chrome;
   a filled segment says "one of these is on" with the same language as the age
   chips and the field specs, which is now the site's way of setting a small
   fact apart. Pastel #140. */
.packlist__tabs {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  /* Four labels do not fit on a phone, so the row scrolls rather than wraps:
     a wrapped tab row reads as two rows of unrelated buttons. */
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.packlist__tabs::-webkit-scrollbar { display: none; }

.packlist__tab {
  flex-shrink: 0;
  appearance: none;
  background: none;
  border: 0;
  border-radius: 4px;
  padding: 9px 16px;
  cursor: pointer;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: var(--weight-poster-heavy);
  text-transform: uppercase;
  font-size: var(--fs-body-sm);
  letter-spacing: .02em;
  line-height: 1.2;
  white-space: nowrap;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}
.packlist__tab:hover { background: #00205b0d; color: var(--accent-deep); }
.packlist__tab[aria-selected="true"] {
  background: var(--color-navy);
  color: var(--color-white);
}
.packlist__tab[aria-selected="true"]:hover { background: var(--color-navy); }

/* On navy the group inverts, so the filled segment still reads as the one
   that is on rather than disappearing into the panel. */
.tone--navy .packlist__tabs { border-color: #ffffff33; }
.tone--navy .packlist__tab:hover { background: #ffffff14; color: var(--color-white); }
.tone--navy .packlist__tab[aria-selected="true"],
.tone--navy .packlist__tab[aria-selected="true"]:hover {
  background: var(--color-white);
  color: var(--color-navy);
}

.packlist__print {
  flex-shrink: 0;
  appearance: none;
  background: none;
  border: 0;
  padding: 12px 0;
  cursor: pointer;
  color: var(--text-muted);
  font-size: var(--fs-body-sm);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}
.packlist__print:hover { color: var(--accent-deep); }

/* ---- panels ----------------------------------------------------------- */
.packlist__panels { width: 100%; }
.packlist__panel { padding-top: 32px; }
.packlist__panel[hidden] { display: none; }
.packlist__panel:focus-visible { outline: 2px solid var(--accent-decor); outline-offset: 4px; }

/* With the script running the tab already names the panel; without it, each
   panel needs its own heading or the lists run together. */
.packlist--js .packlist__panel-label { display: none; }
.packlist__panel-label {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-weight: var(--weight-poster-heavy);
  text-transform: uppercase;
  font-size: var(--fs-h3);
  line-height: 1.2;
}
.packlist:not(.packlist--js) .packlist__panel + .packlist__panel {
  margin-top: 16px;
  border-top: 1px solid var(--rule);
}

.packlist__cols { display: grid; gap: 40px; }
@media (min-width: 768px) {
  .packlist__cols--2 { grid-template-columns: 1fr 1fr; gap: 56px; }
}

.packlist__col-title {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-weight: var(--weight-poster-heavy);
  text-transform: uppercase;
  font-size: var(--fs-body-sm);
  letter-spacing: .04em;
  color: var(--text-subtle);
}

.packlist__items { list-style: none; margin: 0; padding: 0; }
.packlist__item + .packlist__item { border-top: 1px solid var(--rule); }

/* Items are plain text, not controls (#141). The rule between rows and the
   row's own padding carry the list; a bullet on top of both is noise. */
.packlist__item {
  display: block;
  padding: 12px 0;
}
.packlist__text {
  font-size: var(--fs-body);
  line-height: 1.5;
}

/* ---- print ------------------------------------------------------------ */
/* A printed list is for carrying to the car, so it shows every tab at once,
   drops the controls, and keeps a list from splitting across a page break. */
@media print {
  .packlist__bar { display: none; }
  .packlist__panel[hidden] { display: block; }
  .packlist__panel-label,
  .packlist--js .packlist__panel-label { display: block; }
  .packlist__panel { padding-top: 20px; break-inside: avoid; }
  .packlist__col { break-inside: avoid; }
  .packlist__item { break-inside: avoid; }
}

/* On a phone the print link and four tab labels cannot share a line: the tabs
   were left 224px of a 375px screen, so the scroll showed one label and a
   sliver of the next. Below 600px the link moves above and the tabs take the
   full width, which fits two labels and reads as a row worth scrolling. The
   bar's rule moves with them so the active tab's underline still sits on it. */
@media (max-width: 599px) {
  .packlist__bar { flex-wrap: wrap; align-items: flex-start; }
  .packlist__tabs { order: 2; width: 100%; }
  .packlist__print { order: 1; margin-left: auto; padding-top: 0; }
}
