/* Programs page: opening, commitment ledger, filters, pale bands of different heights, closing hand-off. */
.pg-title { font-size: clamp(1.9rem, 3vw, 2.75rem); line-height: 1.1; }
.grp__aside { align-self: start; max-width: 40em; font-size: 1.0625rem; }
.band { padding-block: clamp(1.5rem, 5vh, 3.25rem); }
[hidden].led, [hidden].pb, [data-group][hidden] { display: none; }

/* Opening: as tall as its content, so the ledger heading follows close after the caption */
.open { padding-bottom: clamp(1.5rem, 5vh, 2.5rem); }
.open__key { display: grid; gap: 0.75rem; align-content: start; }
.open__key .note { font-size: 1.0625rem; max-width: 34em; }
.open__pic { margin: 0; }

/* Passes on listings: trained ones are solid, the others clearly dimmed */
.led .passes li:not(.is-off), .pb .passes li:not(.is-off) { background: var(--fg); color: var(--bg); }
.led .passes li.is-pass, .pb .passes li.is-pass { outline-color: var(--fg); }
.led .passes .is-off, .pb .passes .is-off { border-style: dotted; opacity: 0.6; text-decoration: line-through; }
.pb .passes .is-off { opacity: 0.75; }

/* Filters */
.filters { display: flex; gap: 0.5rem; overflow-x: auto; padding: 0.45rem; scrollbar-width: thin; scrollbar-color: var(--ink) var(--ground); }
.filters:empty { display: none; }
.filters .pill { flex: 0 0 auto; min-height: 2.75rem; padding-inline: 1.1rem; font-size: 1rem; white-space: nowrap; }
#filter-status { font-size: 1rem; }

/* Ledger: on a phone each row is one column - name, passes, then price - so nothing shares a line */
.ledger { display: grid; }
.led {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.5rem 1rem;
  align-items: center;
  padding-block: 0.9rem;
}
.led__main { display: grid; gap: 0.1rem; min-width: 0; }
.led__name { font-family: var(--display); font-style: italic; font-size: clamp(1.375rem, 1.9vw, 1.625rem); line-height: 1.15; overflow-wrap: anywhere; }
.led__kind { font-size: var(--t-small); }
.led__price { min-width: 0; text-align: left; font-size: 1.0625rem; line-height: 1.3; overflow-wrap: anywhere; }
.led__dots { display: none; }
.led__price .pill { min-height: 2.75rem; padding-inline: 1rem; }

/* Bands: pale panels, picture flush to one side, heights clearly different */
.pb { display: grid; grid-template-columns: minmax(0, 1fr); padding: 0; overflow: hidden; border-radius: var(--r); }
.pb.panel > * + * { margin-top: 0; }
.pb__pic { position: relative; margin: 0; aspect-ratio: 16 / 10; }
.pb__pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pb__txt { display: flex; flex-direction: column; justify-content: center; gap: 1.25rem; padding: clamp(1.5rem, 3vw, 3rem); }
.pb__id { display: grid; gap: 0.75rem; justify-items: start; align-content: center; min-width: 0; }
/* Every card: passes on their own line, then price and button together on the next */
.pb__buy { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; min-width: 0; }
.pb__buy .passes { flex: 0 0 100%; }
.pb__buy .price { flex: 0 1 auto; min-width: 0; max-width: min(100%, 13em); }
.pb__buy .pill { flex: 0 0 auto; max-width: 100%; }
.pb__when { max-width: 34em; font-size: 1.0625rem; }
.pb h3 a { text-decoration-thickness: 0.05em; }
.pb__facts { padding: 0 clamp(1.5rem, 3vw, 3rem) clamp(1.5rem, 3vw, 3rem); min-width: 0; }
.pb .facts { width: 100%; }
.pb .passes li { border-color: var(--fg); }
.pb--xl h3 { font-size: clamp(1.9rem, 3vw, 2.75rem); line-height: 1.1; }
.pb--xl .price { font-size: clamp(1.5rem, 2.2vw, 2rem); }

/* Closing hand-off */
.close { display: grid; gap: clamp(1.25rem, 3vw, 2.5rem); }
.close.panel > * + * { margin-top: 0; }
.close__cols { display: grid; gap: clamp(1.5rem, 4vw, 4rem); }
.close__col { display: grid; gap: 0.75rem; justify-items: start; align-content: start; }
.close__col p { max-width: 30em; }

@media (min-width: 48rem) {
  .open { min-height: 0; grid-template-rows: auto auto 1fr; align-items: start; }
  .open__pic { grid-column: 7 / -1; grid-row: 1 / span 3; }
  .open .poster-title { font-size: min(6vw, 6.5rem); }
  /* The key sits at the foot of the left column, its passes level with the caption pill */
  .open__key { align-self: end; }
  .led { grid-template-columns: minmax(0, 1fr) minmax(0, 13rem); }
  .led__main { grid-column: 1; grid-row: 1; }
  .led__price { grid-column: 2; grid-row: 1; text-align: right; }
  .led .passes { grid-column: 1 / -1; grid-row: 2; }
  .pb { grid-template-columns: var(--cols, 7fr 5fr); }
  .pb__pic { aspect-ratio: auto; }
  .pb--flip .pb__pic { order: 2; }
  .pb--lg { --cols: 7fr 5fr; min-height: 29rem; }
  .pb--md { --cols: 5fr 7fr; min-height: 23rem; }
  .pb--sm { --cols: 4fr 8fr; min-height: 15rem; }
  .pb--sm.pb--flip { --cols: 8fr 4fr; }

  /* Two-Year card: the picture is capped; its facts sit under it, the text runs down the other side */
  .pb--xl { --cols: 7fr 5fr; grid-template-rows: auto 1fr; }
  .pb--xl .pb__pic { grid-column: 1; grid-row: 1; align-self: start; aspect-ratio: 16 / 10; max-height: 29rem; width: 100%; }
  .pb--xl .pb__txt { grid-column: 2; grid-row: 1 / span 2; }
  .pb--xl .pb__facts { grid-column: 1; grid-row: 2; align-self: center; padding: clamp(1.25rem, 2.5vw, 2rem) clamp(1.5rem, 3vw, 3rem); }

  .close__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 64rem) {
  .filters { flex-wrap: wrap; overflow: visible; }
}

@media (min-width: 75rem) {
  .led { grid-template-columns: minmax(15rem, 24rem) auto minmax(1.5rem, 1fr) minmax(10rem, 13rem); gap: 0 1rem; }
  .led__main { grid-column: 1; grid-row: 1; }
  .led .passes { grid-column: 2; grid-row: 1; }
  .led__dots { grid-column: 3; grid-row: 1; display: block; height: 0; align-self: center; border-bottom: var(--line) dotted var(--ink); }
  .led--plain .led__dots { grid-column: 2 / 4; }
  .led__price { grid-column: 4; grid-row: 1; }
}

@media (max-width: 47.99rem) {
  .led__price { font-size: 1rem; }
}
