/* Watch player, schedule, archive and program pages, including responsive layouts. */
.watch-hero {
  background: var(--navy-700);
  color: var(--white);
}

.watch-layout {
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.live-player {
  background: linear-gradient(145deg, #234361, #102840);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  min-height: 500px;
  overflow: hidden;
}

.live-player__top,
.live-player__footer {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: var(--space-5);
}

.live-player__stage {
  align-items: center;
  display: flex;
  flex: 1;
  justify-content: center;
}

.live-player__footer {
  background: rgb(5 20 38 / 55%);
}

.live-player__footer h1 {
  color: var(--white);
  font-size: 24px;
  margin: 0;
}

.live-player__footer p {
  margin: 0;
}

.live-badge {
  background: var(--series-watch);
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 800;
  padding: 9px 16px;
}

.schedule h2 {
  color: var(--gold-500);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.schedule-list {
  list-style: none;
  margin: var(--space-5) 0;
  padding: 0;
}

.schedule-list li {
  /* Contain the absolutely positioned screen-reader label inside the scroller. */
  position: relative;
  background: rgb(255 255 255 / 7%);
  border-radius: var(--radius-sm);
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 80px 1fr;
  margin-bottom: var(--space-3);
  padding: var(--space-4);
}

.schedule-list time {
  color: var(--gold-200);
  font-family: monospace;
}

.archive-tools {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.archive-search {
  border: 1px solid var(--sand);
  border-radius: var(--radius-pill);
  font: inherit;
  font-size: var(--fs-action);
  min-height: 44px;
  padding: 10px 20px;
}

.section.program-archive { padding-block: 32px 48px; }
.program-archive h2 { margin: 0 0 24px; }
.program-archive__search { margin-bottom: 20px; }
.program-archive__search label { font-size: var(--fs-action); display: block; margin-bottom: 8px; }
.program-archive__search .button-row { align-items: center; }
.program-archive__search .archive-search { min-width: 0; }
#program-archive-heading { scroll-margin-top: 96px; }
.archive-categories { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.archive-category { font-size: var(--fs-action); --filter-color: var(--navy-700); display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 18px; border: 1px solid var(--filter-color); border-radius: var(--radius-pill); color: var(--filter-color); background: var(--white); font-weight: 700; text-decoration: none; }
.archive-category--meetings { --filter-color: var(--series-civic); }
.archive-category--lectures { --filter-color: #865b12; }
.archive-category--sports { --filter-color: var(--series-watch); }
.archive-category:hover { background: var(--cream); text-decoration: none; }
.archive-category.is-active { background: var(--filter-color); color: var(--white); }
.archive-category:focus-visible { outline: 3px solid var(--navy-500); outline-offset: 3px; }
.archive-clear { margin-top: 20px; }
.archive-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--divider); }
.archive-pagination .page-numbers { font-size: var(--fs-action); display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--sand); border-radius: var(--radius-sm); color: var(--navy-700); background: var(--white); font-weight: 700; text-decoration: none; }
.archive-pagination .current { background: var(--navy-700); border-color: var(--navy-700); color: var(--white); }
.archive-pagination a:hover { background: var(--cream); border-color: var(--navy-700); }
.archive-pagination a:focus-visible { outline: 3px solid var(--navy-500); outline-offset: 3px; }
.archive-pagination .dots { border-color: transparent; min-width: 24px; padding-inline: 0; }

.filter-button {
  background: transparent;
  border-color: var(--navy-500);
  color: var(--navy-500);
}

.filter-button.is-active {
  background: var(--navy-700);
  color: var(--white);
}

.prototype-note {
  background: var(--gold-200);
  border-left: 5px solid var(--gold-600);
  color: var(--ink);
  font-size: 14px;
  padding: var(--space-4) var(--space-5);
}

/* Watch archive handoff: scoped so homepage cards retain their own treatment. */
.program-archive h2 {
  align-items: center;
  display: flex;
  gap: 14px;
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.program-archive h2::before { background: var(--gold-500); border-radius: 3px; content: ''; flex: 0 0 28px; height: 3px; }
.program-archive .archive-tools { gap: 12px; margin-bottom: 18px; }
.program-archive__search { flex: 0 1 350px; margin: 0; }
.program-archive__search .button-row { flex-wrap: nowrap; gap: 8px; }
.program-archive__search .archive-search { width: 100%; }
.program-archive__search button { padding: 10px 14px; }
.program-archive .archive-categories { gap: 10px; margin: 0; }
.program-archive .archive-card { border-radius: 12px; }
.archive-card__image {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--card-color), color-mix(in srgb, var(--card-color), #000 28%));
  position: relative;
}
.archive-card__play { align-items: center; background: rgb(0 0 0 / 35%); border-radius: 50%; color: white; display: flex; font-size: 18px; height: 44px; justify-content: center; left: 50%; position: absolute; top: 50%; transform: translate(-50%, -50%); width: 44px; }
.archive-card__duration { background: rgb(0 0 0 / 65%); border-radius: 5px; bottom: 10px; color: white; font-size: 13px; font-variant-numeric: tabular-nums; padding: 2px 7px; position: absolute; right: 10px; }
.program-archive .archive-card .video-card__body { padding: 16px; }
.program-archive .archive-card h3 { font-size: var(--fs-card-title); }
.program-archive .archive-card p { color: var(--ink-3); margin-top: 6px; }
.program-archive .archive-card > a:focus-visible { outline: 3px solid var(--series-civic); outline-offset: -3px; }
.archive-social { align-items: center; background: var(--cream); border-radius: 16px; display: flex; flex-wrap: wrap; gap: 24px; margin-top: 28px; padding: 24px; }
.archive-social__item { align-items: center; display: flex; flex: 1 1 340px; gap: 12px; min-width: 0; }
.archive-social__item + .archive-social__item { border-left: 1px solid var(--divider); padding-left: 24px; }
.archive-social__icons { display: flex; }
.archive-social__icon { align-items: center; color: var(--navy-700); display: inline-flex; flex: 0 0 44px; height: 44px; justify-content: center; width: 44px; }
.archive-social__icon svg { height: 25px; width: 25px; }
.archive-social h3 { font-size: var(--fs-card-title); line-height: 1.25; margin: 0; }
.archive-social p { color: var(--ink-3); font-size: var(--fs-small); line-height: 1.4; margin: 4px 0 0; }
.archive-social__follow { background: var(--navy-700); color: white; margin-left: auto; white-space: nowrap; }
@media (max-width: 800px) {
  .archive-social__item { flex-basis: 100%; }
  .archive-social__item + .archive-social__item { border-left: 0; border-top: 1px solid var(--divider); padding: 20px 0 0; }
}
@media (max-width: 600px) {
  .program-archive__search { flex-basis: 100%; }
  .program-archive h2 { letter-spacing: .15em; }
  .archive-social { gap: 18px; padding: 20px 16px; }
  .archive-social__item { align-items: flex-start; gap: 8px; }
  .archive-social__icons { flex-direction: column; }
}

.program-archive .archive-card__image img { display: block; height: 100%; left: 0; object-fit: cover; position: absolute; top: 0; width: 100%; }

.program-archive__search .archive-search-submit { align-items: center; display: inline-flex; flex: 0 0 46px; height: 46px; justify-content: center; padding: 0; width: 46px; }
.program-archive .archive-categories { border-left: 1px solid var(--divider); padding-left: 16px; }
@media (max-width: 600px) {
  .program-archive .archive-categories { border-left: 0; border-top: 1px solid var(--divider); padding: 14px 0 0; width: 100%; }
}

/* Compact Watch preview and focused, bookmarkable archive. */
.program-archive--full { min-height: 50vh; }
.program-archive--full h1 { margin: 16px 0 24px; }
.archive-back { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.archive-results-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; }
.archive-results-context { color: var(--ink-3); font-size: var(--fs-small); margin: 0; }
.archive-browse { display: inline-flex; align-items: center; justify-content: flex-end; min-height: 44px; margin-left: auto; text-align: right; font-size: var(--fs-action); font-weight: 700; }
.program-archive .archive-card .archive-card__date { margin: 8px 0 0; }
@media (max-width: 600px) {
  .program-archive .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .program-archive .archive-card .video-card__body { padding: 10px; }
  .program-archive .archive-card h3 { font-size: 16px; overflow-wrap: anywhere; }
  .program-archive .archive-card p { font-size: 14px; overflow-wrap: anywhere; }
  .archive-card__play { height: 36px; width: 36px; font-size: 15px; }
  .archive-card__duration { font-size: 12px; bottom: 6px; right: 6px; }
}

.program-archive--preview .archive-category { max-width: 100%; overflow-wrap: anywhere; text-align: center; }
.program-archive--preview .archive-category:first-child { background: var(--navy-700); color: var(--white); }

/* Approved compact archive controls: one submit applies all choices. */
.archive-toolbar { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(150px, 185px) auto minmax(210px, 224px); gap: 10px; align-items: center; margin-bottom: 16px; }
.archive-toolbar__search,
.archive-toolbar__select { position: relative; min-width: 0; }
.archive-toolbar input,
.archive-toolbar select,
.archive-toolbar button { height: 40px; min-height: 40px; border-radius: var(--radius-pill); font: inherit; font-size: 14px; }
.archive-toolbar input,
.archive-toolbar select { width: 100%; min-width: 0; border: 1px solid var(--sand); color: var(--ink); background: var(--white); }
.archive-toolbar input { padding: 0 12px 0 35px; }
.archive-toolbar select { appearance: none; padding: 0 38px 0 12px; }
.archive-toolbar__search > svg { position: absolute; left: 12px; top: 11px; color: var(--ink-3); pointer-events: none; }
.archive-toolbar__select > svg { position: absolute; right: 14px; top: 12px; color: var(--ink-3); pointer-events: none; }
.archive-toolbar button { padding: 0 15px; font-weight: 700; white-space: nowrap; }
.program-archive--full .archive-results-header { min-height: 24px; }
@media (max-width: 760px) {
  .archive-toolbar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
  .archive-toolbar__search { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
  .archive-toolbar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
  .archive-toolbar button { grid-column: 1 / -1; }
  .archive-toolbar input,
.archive-toolbar select,
.archive-toolbar button { height: 44px; min-height: 44px; font-size: 16px; }
  .archive-toolbar__search > svg { top: 13px; }
  .archive-toolbar__select > svg { top: 14px; }
}
@media (pointer: coarse) {
  .archive-toolbar input,
.archive-toolbar select,
.archive-toolbar button { min-height: 44px; }
}
@media (forced-colors: active) {
  .archive-toolbar select { appearance: auto; }
  .archive-toolbar__select > svg { display: none; }
}

/* Reuse the full archive's search geometry without its category/sort columns. */
.archive-toolbar--preview { flex: 1 1 360px; grid-template-columns: minmax(0, 1fr) auto; margin-bottom: 0; min-width: 0; }
.archive-toolbar--preview .archive-toolbar__search { grid-column: auto; }
.archive-toolbar--preview button { grid-column: auto; }
@media (max-width: 600px) {
  .archive-toolbar--preview { flex-basis: 100%; }
}
@media (max-width: 900px) {
  .watch-layout {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {

  .live-player {
    min-height: 390px;
  }

  .live-player__footer {
    align-items: flex-start;
    flex-direction: column;
    gap: var(--space-4);
  }
}
.cablecast-live iframe { border: 0; }
.cablecast-vod { width: 100%; max-height: 75vh; background: black; }
.watch-layout { margin-top: 28px; }

/* Keep the Watch heading visible and its controls close to the page title. */
.watch-hero { padding-block: clamp(24px, 3vw, 40px); }
.watch-hero > .site-container > h1 { color: var(--white); margin: 0 0 24px; font-size: clamp(40px, 4.5vw, var(--fs-h1)); }

/* Keep the daily schedule from stretching the live video row. */
.watch-layout > .schedule { display: flex; flex-direction: column; min-height: 0; }
.watch-layout > .schedule h2 { margin: 0 0 12px; }
.watch-layout > .schedule > p { margin: 0 0 16px; }
.watch-layout .schedule-list { overflow-y: auto; min-height: 0; margin: 0; padding-right: 10px; scrollbar-gutter: stable; }
.watch-layout .schedule-list:focus-visible { outline: 2px solid var(--gold-500); }

/* The player sets the desktop row height; the schedule scrolls inside that row. */
.watch-layout { align-items: stretch; }
.watch-layout > .cablecast-live { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; min-height: 0; min-width: 0; width: 100%; align-self: start; background: #000; }
.cablecast-live iframe { position: absolute; inset: 0; display: block; width: 100%; height: 100%; min-height: 0; }
.cablecast-live > p { padding: 24px; text-align: center; }
.watch-layout > .schedule { min-width: 0; }
.watch-layout .schedule-list li { grid-template-columns: 68px minmax(0, 1fr); gap: 8px; padding: 9px 10px; margin-bottom: 6px; font-size: 13px; line-height: 1.35; }
.watch-layout .schedule-list strong { font-weight: 600; overflow-wrap: anywhere; }
.watch-layout .schedule-list time { white-space: nowrap; }
.watch-layout .schedule-list:focus-visible { outline-offset: -2px; }
.channel-switcher .channel-switcher__link { background: transparent; border: 1px solid rgb(255 255 255 / 30%); color: var(--white); }
.channel-switcher .channel-switcher__link.is-active { background: var(--gold-500); border-color: var(--gold-500); color: var(--navy-700); }
.channel-switcher .channel-switcher__link:hover { border-color: var(--gold-500); }
@media (max-width: 900px) {
  .watch-layout > .schedule { height: auto; max-height: none; }
}

/* A compact TV viewing card replaces the player when no stream is configured. */
.watch-unavailable { align-self: start; padding: clamp(24px, 4vw, 40px); border: 1px solid rgb(255 255 255 / 22%); border-radius: var(--radius-card); background: linear-gradient(145deg, #234361, #102840); }
.watch-unavailable__eyebrow { color: var(--gold-500); font-size: var(--fs-small); font-weight: 600; margin: 0 0 16px; }
.watch-unavailable h2 { color: var(--white); margin: 0 0 16px; font-size: clamp(26px, 3vw, 36px); }
.watch-unavailable > p { max-width: 52ch; }
.watch-unavailable .button { margin-top: 8px; }

.program-page { padding-top: clamp(24px, 3vw, 40px); }
.program-page .back-link { margin-bottom: 18px; }
.program-page__title { font-size: clamp(28px, 3.5vw, 44px); line-height: 1.18; margin: 0 0 28px; max-width: 36ch; }

.watch-layout .schedule-list li.is-current { background: var(--gold-500); color: var(--navy-700); }
.watch-layout .schedule-list li.is-current time { color: inherit; font-weight: 700; }
.channel-switcher > .button { max-width: min(100%, calc(100vw - 40px)); }
.channel-switcher > .button { width: 270px; }

/* Full archive: labelled filters with a subordinate board row. */
.archive-toolbar__board[hidden] { display: none; }
.program-archive--full .archive-toolbar { display: grid; grid-template-columns: minmax(220px, 420px) auto minmax(12px, 1fr) 230px 170px; gap: 12px; align-items: end; margin-bottom: 32px; }
.program-archive--full .archive-toolbar__search-group { grid-column: 1; grid-row: 1; min-width: 0; }
.program-archive--full .archive-toolbar > button { grid-column: 2; grid-row: 1; }
.archive-toolbar__category { grid-column: 4; grid-row: 1; width: 100%; max-width: 230px; min-width: 0; }
.archive-toolbar__sort { grid-column: 5; grid-row: 1; min-width: 0; }
.archive-toolbar__board { grid-column: 4 / 6; grid-row: 2; display: flex; align-items: center; gap: 8px; margin-left: 16px; width: min(340px, calc(100% - 16px)); min-width: 0; }
.archive-toolbar__board > .archive-toolbar__select { flex: 1; }
.archive-toolbar__search-group > label,
.archive-toolbar__category > label,
.archive-toolbar__sort > label,
.archive-toolbar__board > label { display: block; margin: 0 0 6px 12px; font-size: 13px; line-height: 1.4; color: var(--ink-3); }
.archive-toolbar__board > label { margin: 0; flex: 0 0 auto; }
@media (max-width: 900px) {
  .program-archive--full .archive-toolbar { grid-template-columns: 230px 170px minmax(0, 1fr); }
  .program-archive--full .archive-toolbar__search-group { grid-column: 1 / 3; grid-row: 1; min-width: 0; }
  .program-archive--full .archive-toolbar > button { grid-column: 3; grid-row: 1; justify-self: start; }
  .archive-toolbar__category { grid-column: 1; grid-row: 2; margin-left: 0; }
  .archive-toolbar__sort { grid-column: 2; grid-row: 2; }
  .archive-toolbar__board { grid-column: 1 / 3; grid-row: 3; margin-left: 16px; }
}
@media (min-width: 461px) and (max-width: 600px) {
  .program-archive--full .archive-toolbar__search-group { grid-column: 1 / -1; margin-right: 94px; }
  .program-archive--full .archive-toolbar > button { grid-column: 1 / -1; justify-self: end; }
}
@media (max-width: 460px) {
  .program-archive--full .archive-toolbar { grid-template-columns: minmax(0, 1fr) auto; }
  .program-archive--full .archive-toolbar__search-group { grid-column: 1; }
  .program-archive--full .archive-toolbar > button { grid-column: 2; }
  .archive-toolbar__category { grid-column: 1 / -1; }
  .archive-toolbar__board { grid-column: 1 / -1; grid-row: 3; }
  .archive-toolbar__sort { grid-column: 1 / -1; grid-row: 4; width: 170px; justify-self: start; }
}

/* Both channel schedules remain visible when the live-player selection changes. */
.schedule-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.watch-layout .schedule-heading h2 { margin: 0 0 12px; letter-spacing: .14em; }
.schedule-heading > time { color: var(--navy-100); font: 12px monospace; text-transform: uppercase; }
.schedule-channels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.schedule-channel { display: flex; flex-direction: column; min-width: 0; gap: 8px; }
.schedule-channel h3 { color: var(--white); font-size: 16px; margin: 0; padding-bottom: 8px; border-bottom: 2px solid var(--gold-500); }
.watch-layout .schedule-channel .schedule-list { height: 230px; flex: 1 1 230px; padding-right: 4px; }
.watch-layout .schedule-list .schedule-empty { display: block; }
.schedule-pdf { display: flex; justify-content: center; align-items: center; gap: 8px; padding: 10px; border-radius: 10px; background: var(--series-watch); color: var(--white); font-size: 13px; font-weight: 700; text-align: center; text-decoration: none; }
.schedule-pdf svg { flex-shrink: 0; }
.schedule-pdf:hover { filter: brightness(1.12); }
@media (max-width: 520px) {
  .schedule-channels { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

.watch-layout > .schedule > .watch-platforms-label { color: var(--navy-100); font-size: 13px; margin: 14px 0 6px; }
.watch-platforms { display: flex; flex-wrap: wrap; gap: 8px; }
.watch-platforms a { display: inline-flex; align-items: center; justify-content: center; padding: 7px 11px; background: var(--white); color: var(--navy-700); border-radius: 8px; font-size: 13px; font-weight: 700; text-decoration: none; }
.watch-platforms a:hover { background: var(--gold-200); }
@media (min-width: 901px) {
  .channel-switcher { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: calc((100% - 28px) / 2); }
  .channel-switcher > .button { width: 100%; min-width: 0; font-size: 14px; padding: 10px 12px; }
}

/* The left panel ends exactly where the platform-button row begins. */
@media (min-width: 901px) {
  .watch-layout { grid-template-rows: auto auto auto auto; row-gap: 0; }
  .watch-layout > .schedule { display: grid; grid-template-rows: subgrid; grid-column: 2; grid-row: 1 / 5; }
  .watch-layout > .cablecast-live,
  .watch-layout > .watch-unavailable { grid-column: 1; grid-row: 1 / 4; align-self: stretch; height: 100%; box-sizing: border-box; }
  .watch-layout > .cablecast-live { aspect-ratio: auto; }
  .watch-layout > .cablecast-live iframe { inset: 50% 0 auto; transform: translateY(-50%); height: auto; aspect-ratio: 16 / 9; }
}
