/* Torah page styles */

.cm-page-torah {
  background:
    radial-gradient(circle at top left, rgba(107,140,42,.12), transparent 28%),
    linear-gradient(180deg, #f5f0e7 0%, #fbf8f2 100%);
}

/* Torah detail — share the visual language and hierarchy of sermon detail. */
.cm-page-torah-detail .torah-watch-shell {
  padding: calc(var(--nav-h) + 28px) 0 80px;
  background:
    radial-gradient(circle at top right, rgba(107, 140, 42, .12), transparent 26%),
    linear-gradient(180deg, #f5f0e7 0%, #fbf8f2 100%);
}

.cm-page-torah-detail .torah-watch-shell > .container {
  width: 100%;
  max-width: 1480px;
  margin-inline: auto;
  padding-inline: 24px;
}

.cm-page-torah-detail .torah-watch__back {
  min-height: 34px;
  margin: 0 0 18px;
  font-size: 14px;
  font-weight: 700;
}

.cm-page-torah-detail .torah-watch__layout {
  grid-template-columns: minmax(0, 1fr) clamp(380px, 33vw, 468px);
  gap: 32px;
}

.cm-page-torah-detail .torah-watch__main {
  gap: 24px;
}

.cm-page-torah-detail .torah-watch__hero-card,
.cm-page-torah-detail .torah-watch__description,
.cm-page-torah-detail .torah-watch__playlist-card,
.cm-page-torah-detail .torah-watch__nav-card {
  background: rgba(255, 255, 255, .92) !important;
  border: 1px solid rgba(26, 47, 16, .08);
  box-shadow: 0 18px 46px rgba(26, 47, 16, .08);
  backdrop-filter: blur(16px);
}

.cm-page-torah-detail .torah-watch__hero-card,
.cm-page-torah-detail .torah-watch__description,
.cm-page-torah-detail .torah-watch__playlist-card {
  border-radius: 12px;
}

.cm-page-torah-detail .torah-watch__hero-card {
  overflow: hidden;
}

.cm-page-torah-detail .torah-watch__video,
.cm-page-torah-detail .torah-watch__video iframe,
.cm-page-torah-detail .torah-watch__video .cm-video-lite {
  border-radius: 12px 12px 0 0;
}

.cm-page-torah-detail .torah-watch__video {
  box-shadow: none;
}

.cm-page-torah-detail .torah-watch__video .cm-video-lite__play {
  width: 68px;
  height: 68px;
  border: 2px solid rgba(255, 255, 255, .55);
  box-shadow: 0 10px 28px rgba(8, 17, 25, .25);
}

.cm-page-torah-detail .torah-watch__header {
  gap: 16px;
  padding: 28px 32px 32px;
}

.cm-page-torah-detail .torah-watch__eyebrow-row {
  gap: 8px 10px;
}

.cm-page-torah-detail .torah-watch__badge {
  min-height: 30px;
  padding: 0 12px;
  background: var(--navy);
  font-size: 10px;
  letter-spacing: 1.5px;
}

.cm-page-torah-detail .torah-watch__eyebrow {
  min-height: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(30, 61, 24, .64);
  font-size: 11px;
}

.cm-page-torah-detail .torah-watch__eyebrow + .torah-watch__eyebrow::before {
  content: '\00b7';
  margin-right: 10px;
  color: rgba(30, 61, 24, .3);
}

.cm-page-torah-detail .torah-watch__title-row {
  display: grid;
  grid-template-columns: auto auto minmax(150px, 1fr);
  justify-content: start;
  align-items: center;
  gap: 10px 16px;
}

.cm-page-torah-detail .torah-watch__title {
  font-size: clamp(36px, 4vw, 50px);
}

.cm-page-torah-detail .torah-watch__title-row .torah-title-note__word {
  border: 1px solid rgba(107, 140, 42, .18);
  background: rgba(107, 140, 42, .08);
  color: var(--navy);
  font-size: 20px;
}

.cm-page-torah-detail .torah-watch__title-row .torah-title-note__value {
  color: rgba(30, 61, 24, .64);
}

.cm-page-torah-detail .torah-watch__caption-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding-top: 2px;
}

.cm-page-torah-detail .torah-watch__caption {
  min-width: 0;
  max-width: none;
  font-size: 19px;
  line-height: 1.5;
}

.cm-page-torah-detail .torah-watch__actions .torah-watch__nav-btn {
  min-width: 0;
  min-height: 36px;
  padding-inline: 14px;
  border-radius: 999px;
  font-size: 10px;
  white-space: nowrap;
}

.cm-page-torah-detail .torah-watch__description {
  padding: 28px 32px 32px;
}

.cm-page-torah-detail .torah-watch__playlist-card {
  top: calc(var(--nav-h) + 20px);
  max-height: calc(100vh - var(--nav-h) - 40px);
  padding: 20px 18px 16px;
  overflow: hidden;
}

.admin-bar.cm-page-torah-detail .torah-watch__playlist-card {
  top: calc(var(--nav-h) + 52px);
  max-height: calc(100vh - var(--nav-h) - 72px);
}

.cm-page-torah-detail .torah-watch__sidebar-progress {
  margin: 0 0 18px;
  padding: 18px;
  border: 1px solid rgba(26, 47, 16, .08);
  border-radius: 10px;
  background: rgba(255, 255, 255, .72);
}

.cm-page-torah-detail .torah-watch__sidebar-progress-head strong {
  color: var(--navy);
  font-family: var(--font-head);
  font-size: 28px;
  line-height: 1;
}

.cm-page-torah-detail .torah-watch__sidebar-progress p {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.45;
}

.cm-page-torah-detail .torah-watch__playlist-head {
  padding-inline: 2px;
}

.cm-page-torah-detail .torah-watch__playlist-title {
  margin: 6px 0 4px;
  font-size: 26px;
}

.cm-page-torah-detail .torah-watch__playlist-sub {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.cm-page-torah-detail .torah-watch__playlist-filters {
  display: flex !important;
  gap: 6px !important;
  margin-top: 14px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter {
  flex: 0 0 auto;
  width: auto !important;
  min-width: 40px !important;
  min-height: 34px !important;
  padding: 0 11px !important;
  border: 1px solid rgba(30, 61, 24, .12);
  border-radius: 999px;
  background: transparent;
}

.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter__icon {
  width: auto;
  height: auto;
  padding: 0;
  background: transparent;
  font-size: 11px;
}

.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter__content,
.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter__count {
  display: none;
}

.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter.is-active {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.cm-page-torah-detail .torah-watch__tracklist {
  gap: 6px;
  margin-top: 12px;
  padding: 2px 4px 2px 0;
}

.cm-page-torah-detail .torah-watch__playlist-card .torah-track,
.cm-page-torah-detail .torah-watch__playlist-card .torah-track:visited {
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  min-height: 64px;
  padding: 9px 10px;
  border-radius: 8px;
  box-shadow: none;
}

.cm-page-torah-detail .torah-watch__playlist-card .torah-track__index {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  font-size: 12px;
}

.cm-page-torah-detail .torah-watch__playlist-card .torah-track__body p {
  display: none;
}

.cm-page-torah-detail .torah-watch__playlist-card .torah-track__topline strong {
  font-size: 14px;
  line-height: 1.25;
}

.cm-page-torah-detail .torah-watch__sidebar-cta {
  display: none;
}

@media (max-width: 1100px) {
  .cm-page-torah-detail .torah-watch__layout {
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
  }

  .cm-page-torah-detail .torah-watch__title-row {
    grid-template-columns: auto auto;
  }

  .cm-page-torah-detail .torah-watch__title-pronunciation {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .cm-page-torah-detail .torah-watch-shell {
    padding-bottom: 60px;
  }

  .cm-page-torah-detail .torah-watch__layout {
    grid-template-columns: 1fr;
  }

  .cm-page-torah-detail .torah-watch__playlist-card,
  .admin-bar.cm-page-torah-detail .torah-watch__playlist-card {
    position: static;
    max-height: none;
  }

  .cm-page-torah-detail .torah-watch__tracklist {
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 640px) {
  .cm-page-torah-detail .torah-watch-shell {
    padding-top: calc(var(--nav-h) + 14px);
  }

  .cm-page-torah-detail .torah-watch-shell > .container {
    padding-inline: 14px;
  }

  .cm-page-torah-detail .torah-watch__back {
    margin-bottom: 10px;
    font-size: 13px;
  }

  .cm-page-torah-detail .torah-watch__header,
  .cm-page-torah-detail .torah-watch__description {
    padding: 20px 18px 22px;
  }

  .cm-page-torah-detail .torah-watch__video,
  .cm-page-torah-detail .torah-watch__video iframe,
  .cm-page-torah-detail .torah-watch__video .cm-video-lite {
    border-radius: 10px 10px 0 0;
  }

  .cm-page-torah-detail .torah-watch__title-row {
    display: flex;
    align-items: center;
  }

  .cm-page-torah-detail .torah-watch__title {
    flex-basis: 100%;
    font-size: clamp(32px, 11vw, 42px);
  }

  .cm-page-torah-detail .torah-watch__title-pronunciation {
    flex: 1 1 150px;
  }

  .cm-page-torah-detail .torah-watch__caption-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .cm-page-torah-detail .torah-watch__caption {
    font-size: 17px;
  }

  .cm-page-torah-detail .torah-watch__nav-band,
  .cm-page-torah-detail .torah-watch__actions {
    width: 100%;
  }

  .cm-page-torah-detail .torah-watch__actions .torah-watch__nav-btn {
    flex: 1 1 0;
    justify-content: center;
  }

  .cm-page-torah-detail .torah-watch__nav {
    grid-template-columns: 1fr;
  }

  .cm-page-torah-detail .torah-watch__playlist-card {
    padding: 16px 14px;
  }
}

/* Fit the longest book name without changing the equal tab widths. */
body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter[data-watch-book-filter="deuteronomy"] {
  padding-left: 3px !important;
  padding-right: 3px !important;
}

body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter[data-watch-book-filter="deuteronomy"] .torah-filter__title {
  font-size: 8px !important;
  letter-spacing: .05px !important;
}

/* Align the section copy with the portion rows' inner content rail. */
body.cm-page-torah-detail .torah-watch__playlist-head {
  padding-left: 20px !important;
  padding-right: 20px !important;
}

body.cm-page-torah-detail .torah-watch__sidebar-label,
body.cm-page-torah-detail .torah-watch__playlist-title,
body.cm-page-torah-detail .torah-watch__playlist-sub {
  text-align: left !important;
}

@media (max-width: 640px) {
  body.cm-page-torah-detail .torah-watch__playlist-head {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }
}

/* Put portion number badges on the same outer rail as the selector. */
body.cm-page-torah-detail .torah-watch__playlist-card .torah-track,
body.cm-page-torah-detail .torah-watch__playlist-card .torah-track:visited {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Keep every book tab in a fixed box across default, active, hover and focus states. */
body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter,
body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter:hover,
body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter:focus,
body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter:focus-visible,
body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter.is-active,
body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter.is-active:hover,
body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter.is-active:focus-visible {
  position: relative !important;
  inset: auto !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  margin: 0 !important;
  border-width: 1px !important;
  transform: none !important;
  outline: none !important;
  box-sizing: border-box !important;
}

body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter.is-active,
body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter.is-active:hover,
body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter.is-active:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .22) !important;
}

body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter:focus-visible:not(.is-active) {
  box-shadow: inset 0 0 0 2px rgba(107, 140, 42, .46) !important;
}

/* Seven-row portion viewport with predictable internal scrolling. */
body.cm-page-torah-detail .torah-watch__tracklist {
  --torah-visible-row-height: 74px;
  display: grid !important;
  grid-auto-rows: var(--torah-visible-row-height) !important;
  gap: 0 !important;
  flex: 0 0 auto !important;
  height: calc(var(--torah-visible-row-height) * 7) !important;
  min-height: calc(var(--torah-visible-row-height) * 7) !important;
  max-height: calc(var(--torah-visible-row-height) * 7) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  scroll-padding-block: 8px;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(30, 61, 24, .28) transparent;
}

body.cm-page-torah-detail .torah-watch__tracklist::-webkit-scrollbar {
  width: 7px;
}

body.cm-page-torah-detail .torah-watch__tracklist::-webkit-scrollbar-track {
  background: transparent;
}

body.cm-page-torah-detail .torah-watch__tracklist::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(30, 61, 24, .28);
  background-clip: padding-box;
}

body.cm-page-torah-detail .torah-watch__playlist-card .torah-track,
body.cm-page-torah-detail .torah-watch__playlist-card .torah-track:visited {
  height: var(--torah-visible-row-height) !important;
  min-height: var(--torah-visible-row-height) !important;
  max-height: var(--torah-visible-row-height) !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

body.cm-page-torah-detail .torah-watch__playlist-card .torah-track__index {
  width: 48px !important;
  height: 48px !important;
  border-radius: 10px !important;
}

@media (max-width: 640px) {
  body.cm-page-torah-detail .torah-watch__tracklist {
    --torah-visible-row-height: 68px;
  }
}

/* Show the complete Torah book description; do not truncate it to two lines. */
body.cm-page-torah-detail .torah-watch__playlist-sub {
  display: block !important;
  overflow: visible !important;
  max-height: none !important;
  text-align: justify !important;
  -webkit-box-orient: initial !important;
  -webkit-line-clamp: unset !important;
  line-clamp: unset !important;
  text-overflow: clip !important;
  white-space: normal !important;
}

.torah-playlist-shell {
  position: relative;
  --torah-playlist-sticky-gap: 0px;
}

.torah-detail-hero {
  position: relative;
  overflow: hidden;
}

.torah-playlist-shell {
  padding-top: var(--nav-h);
  padding-bottom: 0;
}
/* WP admin bar: html gets margin-top:32px automatically, so shell padding stays the same */

.torah-playlist-shell::before,
.torah-detail-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.torah-playlist-shell::before {
  background:
    radial-gradient(circle at 15% 20%, rgba(12,30,10,.08) 0%, transparent 24%),
    radial-gradient(circle at 85% 10%, rgba(107,140,42,.16) 0%, transparent 26%);
}

.torah-playlist-board {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 0;
  align-items: start;
}


.torah-player,
.torah-detail__card,
.torah-detail__nav-card,
.torah-watch__description,
.torah-watch__playlist-card,
.torah-watch__nav-card {
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(26,47,16,.08);
  box-shadow: 0 18px 46px rgba(26,47,16,.08);
  backdrop-filter: blur(16px);
}

.torah-player,
.torah-watch__description,
.torah-watch__playlist-card {
  border-radius: var(--r-lg);
}

.torah-player {
  order: 2;
  padding: clamp(22px, 2.8vw, 30px);
  margin: 36px 0 72px 32px;
  min-height: calc(100vh - var(--nav-h));
}

.torah-player__intro {
  margin-bottom: 20px;
}

.torah-player__topline,
.torah-player__stats,
.torah-player__actions,
.torah-playlist-panel__filters,
.torah-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.torah-player__badge,
.torah-player__bookline,
.torah-playlist-panel__label,
.torah-player__context-label,
.torah-detail-hero__badge,
.torah-detail__label,
.torah-detail__nav-label,
.torah-watch__description-label,
.torah-watch__section-label,
.torah-watch__playlist-label,
.torah-watch__nav-label {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.torah-player__badge {
  color: var(--off);
  background: var(--navy);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.4px;
}

.torah-player__bookline {
  color: var(--navy);
  background: rgba(107,140,42,.12);
  border: 1px solid rgba(107,140,42,.18);
  border-radius: 999px;
  padding: 8px 14px;
}

.torah-player__title,
.torah-detail-hero__title,
.torah-playlist-panel__title,
.torah-player__portion,
.torah-detail__book,
.torah-cta__title,
.torah-detail__nav-card strong,
.torah-watch__title,
.torah-watch__description-title,
.torah-watch__playlist-title,
.torah-watch__book-title,
.torah-watch__nav-card strong {
  font-family: var(--font-head);
}

.torah-player__title {
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.04;
  color: var(--navy);
  margin: 14px 0 12px;
}

.torah-player__desc {
  max-width: 680px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--body);
  margin-bottom: 14px;
}

.torah-player__stats span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(12,30,10,.05);
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
}

.torah-player__progress {
  margin-bottom: 20px;
}

.torah-player__progress-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: rgba(12,30,10,.08);
  overflow: hidden;
}

.torah-player__progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--olive), var(--olive-l));
}

.torah-player__progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--light);
}

.torah-player__video,
.torah-detail__video {
  position: relative;
  overflow: hidden;
  background: #09151e;
  box-shadow: 0 18px 42px rgba(8,17,25,.18);
}

.torah-player__video {
  border-radius: 0;
}

.torah-detail__video {
  border-radius: var(--r-lg);
}

.torah-player__video::before,
.torah-detail__video::before {
  content: '';
  display: block;
  padding-top: 56.25%;
}

.torah-player__video iframe,
.torah-detail__video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.torah-player__video-link {
  position: relative;
  display: block;
  color: inherit;
  text-decoration: none;
}

.torah-player__video-link img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.torah-player__video-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7,16,23,.05) 0%, rgba(7,16,23,.02) 36%, rgba(7,16,23,.28) 100%);
}

.torah-player__video-duration {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(7,16,23,.82);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .8px;
  line-height: 1;
}

.torah-player__video-cta {
  position: absolute;
  right: 22px;
  bottom: 20px;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  background: rgba(12,30,10,.84);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.torah-player__video-link:hover .torah-player__video-cta,
.torah-player__video-link:focus-visible .torah-player__video-cta {
  background: var(--olive);
}

.torah-player__content {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}

.torah-player__summary-stack {
  display: grid;
  gap: 14px;
}

.torah-player__summary {
  padding: 18px 20px;
  border-radius: var(--r-md);
  background: rgba(12,30,10,.04);
  border: 1px solid rgba(26,47,16,.08);
}

.torah-player__summary p {
  margin: 0;
  color: var(--body);
  line-height: 1.72;
}

.torah-points {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
  color: var(--body);
}

.torah-points li {
  line-height: 1.65;
}

.torah-points li::marker {
  color: var(--olive);
}

.torah-player__eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: 8px;
}

.torah-player__portion {
  font-size: clamp(26px, 3.8vw, 40px);
  line-height: 1.08;
  color: var(--navy);
  margin-bottom: 8px;
}

.torah-title-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin: 2px 0 12px;
}

.torah-title-note__word {
  font-family: var(--font-head);
  font-size: 18px;
  line-height: 1.2;
  color: var(--navy);
  direction: rtl;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(107,140,42,.1);
  border: 1px solid rgba(107,140,42,.16);
}

.torah-title-note__meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.torah-title-note__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--olive);
}

.torah-title-note__value {
  font-size: 15px;
  line-height: 1.35;
  color: var(--light);
}

.torah-player__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.torah-player__meta span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(12,30,10,.05);
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

.torah-player__caption {
  max-width: 720px;
  font-size: 18px;
  line-height: 1.5;
  color: var(--navy);
  margin: 0;
}

.torah-player__context {
  padding: 18px 20px;
  border-radius: var(--r-md);
  background: rgba(107,140,42,.08);
  border: 1px solid rgba(107,140,42,.14);
}

.torah-player__context--above {
  margin-top: 22px;
  margin-bottom: 20px;
}

.torah-player__context-label {
  color: var(--olive);
  margin-bottom: 12px;
}

.torah-player__context-title {
  font-family: var(--font-head);
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.08;
  color: var(--navy);
  margin: 0 0 10px;
}

.torah-player__context p {
  margin: 0;
  color: var(--body);
  line-height: 1.7;
}

.torah-player__actions .btn,
.torah-detail__actions .btn {
  min-width: 180px;
}

.torah-player__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: start;
}

.torah-player__actions .btn {
  width: auto;
  min-width: 220px;
}

.torah-playlist-panel {
  order: 1;
  padding: 0;
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h) - var(--torah-playlist-sticky-gap) + 1px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #0a2410;
  border: none;
  box-shadow: none;
  border-radius: 0;
  backdrop-filter: none;
}

/* When WP admin bar is visible (logged in), offset sticky top */
.admin-bar .torah-playlist-panel {
  top: calc(var(--nav-h) + 32px);
  height: calc(100vh - var(--nav-h) - 32px - var(--torah-playlist-sticky-gap) + 1px);
}
@media screen and (max-width: 782px) {
  .admin-bar .torah-playlist-panel {
    top: calc(var(--nav-h) + 46px);
    height: calc(100vh - var(--nav-h) - 46px - var(--torah-playlist-sticky-gap) + 1px);
  }
}

/* Dark sidebar: header block */
.torah-playlist-panel__head {
  padding: 22px 18px 16px;
  background: #0a2410;
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}

/* Scrollable track list */
.torah-playlist-panel > .torah-tracklist {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  max-height: none;
  padding: 8px 0 32px;
  margin-top: 0;
  gap: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.12) transparent;
}
.torah-playlist-panel > .torah-tracklist::-webkit-scrollbar { width: 4px; }
.torah-playlist-panel > .torah-tracklist::-webkit-scrollbar-track { background: transparent; }
.torah-playlist-panel > .torah-tracklist::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 2px; }

/* Dark label / title / sub */
.torah-playlist-panel .torah-playlist-panel__label {
  color: #7f9c2a;
  margin-bottom: 4px;
}
.torah-playlist-panel .torah-playlist-panel__title {
  color: #fff;
  font-size: clamp(18px, 1.8vw, 22px);
  margin-bottom: 4px;
}
.torah-playlist-panel .torah-playlist-panel__sub {
  color: rgba(255,255,255,.4);
  font-size: 12px;
  margin-bottom: 0;
}

/* Dark filter buttons — pinned below header, does NOT scroll */
.torah-playlist-panel .torah-playlist-panel__filters {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 18px 14px;
  background: #0a2410;
  border-bottom: 1px solid rgba(255,255,255,.06);
  margin-top: 0;
}
.torah-playlist-panel .torah-filter {
  background: transparent;
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.45);
  border-radius: 2px;
  padding: 5px 10px;
}
.torah-playlist-panel .torah-filter:hover,
.torah-playlist-panel .torah-filter:focus {
  background: rgba(255,255,255,.08);
  color: #fff;
  transform: none;
}
.torah-playlist-panel .torah-filter.is-active {
  background: #7f9c2a;
  border-color: #7f9c2a;
  color: #fff;
}

.torah-playlist-panel__footer,
.torah-watch__playlist-footer {
  flex-shrink: 0;
  min-height: 44px;
  background: linear-gradient(180deg, #08210d 0%, #041506 100%);
  border-top: 1px solid rgba(255,255,255,.06);
}

.torah-watch__playlist-footer {
  margin: 14px -18px -18px;
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}

.torah-playlist-panel__footer {
  border-top-color: rgba(255,255,255,.08);
}

/* Dark track rows */
.torah-playlist-panel .torah-track,
.torah-playlist-panel .torah-track:visited {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 0;
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  box-shadow: none;
  color: rgba(255,255,255,.75);
  transition: background .15s, border-color .15s;
  overflow: visible;
}
.torah-playlist-panel .torah-track__body {
  flex: 1;
  min-width: 0;
}
.torah-playlist-panel .torah-track:hover,
.torah-playlist-panel .torah-track:focus-visible {
  background: rgba(255,255,255,.05);
  border-color: transparent;
  box-shadow: none;
  transform: none;
  color: #fff;
}
.torah-playlist-panel .torah-track.is-active,
.torah-playlist-panel .torah-track.is-active:visited,
.torah-playlist-panel .torah-track.is-active:hover,
.torah-playlist-panel .torah-track.is-active:focus-visible {
  background: rgba(127,156,42,.1);
  border-left-color: #7f9c2a;
  box-shadow: none;
  color: #fff;
}

.torah-playlist-panel .torah-track__index {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.65);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
}
.torah-playlist-panel .torah-track.is-active .torah-track__index {
  background: rgba(127,156,42,.2);
  color: #b5d45e;
}
.torah-playlist-panel .torah-track:not(.is-active):hover .torah-track__index,
.torah-playlist-panel .torah-track:not(.is-active):focus-visible .torah-track__index {
  background: rgba(255,255,255,.1);
  color: #fff;
}

.torah-playlist-panel .torah-track__topline strong {
  color: rgba(255,255,255,.85);
  font-size: 14px;
}
.torah-playlist-panel .torah-track.is-active .torah-track__topline strong {
  color: #fff;
}
.torah-playlist-panel .torah-track:hover .torah-track__topline strong,
.torah-playlist-panel .torah-track:focus-visible .torah-track__topline strong {
  color: #fff;
}

.torah-playlist-panel .torah-track__book {
  color: #7f9c2a;
  font-size: 10px;
}
.torah-playlist-panel .torah-track.is-active .torah-track__book { color: #b5d45e; }

.torah-playlist-panel .torah-track__duration {
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.35);
  font-size: 10px;
  padding: 5px 7px;
}
.torah-playlist-panel .torah-track.is-active .torah-track__duration {
  background: rgba(127,156,42,.15);
  color: #b5d45e;
}
.torah-playlist-panel .torah-track:hover .torah-track__duration,
.torah-playlist-panel .torah-track:focus-visible .torah-track__duration {
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.7);
}

.torah-playlist-panel .torah-track__body p {
  color: rgba(255,255,255,.3);
  font-size: 11px;
}

.torah-playlist-panel__head {
  display: grid;
  gap: 8px;
  margin-bottom: 0;
  flex-shrink: 0;
}

.torah-playlist-panel__label {
  color: var(--olive);
  margin: 0;
  margin-bottom: 8px;
}

.torah-playlist-panel__title {
  font-size: clamp(20px, 2.6vw, 28px);
  line-height: 1.02;
  letter-spacing: -.02em;
  color: var(--navy);
  margin: 0;
  max-width: 12ch;
}

.torah-playlist-panel__sub {
  font-size: 14px;
  color: var(--body);
  line-height: 1.5;
  margin: 0;
  max-width: 28ch;
}

.torah-playlist-panel .torah-playlist-panel__filters {
  gap: 8px;
  margin-top: 2px;
}

.torah-filter {
  border: 0;
  border-radius: 999px;
  background: rgba(12,30,10,.05);
  color: var(--navy);
  padding: 7px 11px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s, color .2s, transform .2s;
}

.torah-filter:hover,
.torah-filter:focus {
  background: rgba(12,30,10,.12);
  transform: translateY(-1px);
}

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

.torah-tracklist {
  display: grid;
  gap: 12px;
  max-height: 760px;
  margin-top: 16px;
  padding: 4px 4px 4px 4px;
  overflow: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.torah-tracklist::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.torah-track,
.torah-track:visited {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border-radius: var(--r-md);
  background: rgba(12,30,10,.03);
  border: 1px solid rgba(26,47,16,.08);
  color: var(--navy);
  text-decoration: none;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s, border-color .2s, background .2s, color .2s;
}

.torah-track:hover,
.torah-track:focus-visible {
  transform: translateY(-2px);
  color: var(--navy);
  background: linear-gradient(135deg, rgba(17,40,55,.045) 0%, rgba(13,31,43,.09) 100%);
  border-color: rgba(17,40,55,.18);
  box-shadow: 0 14px 30px rgba(17,40,55,.10);
}

.torah-track.is-active,
.torah-track.is-active:visited,
.torah-track.is-active:hover,
.torah-track.is-active:focus-visible {
  color: var(--white);
  background: linear-gradient(135deg, #112837 0%, #0d1f2b 100%);
  border-color: rgba(107,140,42,.26);
  box-shadow: 0 18px 36px rgba(8,17,25,.2);
}

.torah-track__index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(107,140,42,.14);
  color: var(--olive);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  transition: background .25s, color .25s;
}

.torah-track.is-active .torah-track__index {
  background: rgba(107,140,42,.18);
  color: #d7e5a8;
}

.torah-track__body {
  min-width: 0;
}

.torah-track__topline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.torah-track__topline strong {
  font-family: var(--font-head);
  font-size: 17px;
  line-height: 1.15;
  color: var(--navy);
  transition: color .2s;
}

.torah-track__duration {
  flex-shrink: 0;
  align-self: flex-start;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--navy);
  background: rgba(17,40,55,.08);
  border-radius: 999px;
  padding: 6px 8px;
  transition: color .2s, background .2s;
}

.torah-track__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.torah-track__book {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--olive);
  transition: color .2s;
}

.torah-track__body p {
  margin: 0;
  font-size: 12px;
  color: var(--light);
  line-height: 1.55;
  transition: color .2s;
}

.torah-track:not(.is-active):hover .torah-track__index,
.torah-track:not(.is-active):focus-visible .torah-track__index {
  background: var(--olive);
  color: #fff;
}

.torah-track:hover .torah-track__topline strong,
.torah-track:focus-visible .torah-track__topline strong,
.torah-track:hover .torah-track__duration,
.torah-track:focus-visible .torah-track__duration {
  color: #112837;
}

.torah-track:hover .torah-track__duration,
.torah-track:focus-visible .torah-track__duration {
  background: rgba(17,40,55,.12);
}

.torah-track:hover .torah-track__book,
.torah-track:focus-visible .torah-track__book {
  color: var(--navy);
}

.torah-track.is-active .torah-track__topline strong,
.torah-track.is-active .torah-track__body p {
  color: var(--white);
}

.torah-track.is-active .torah-track__duration {
  color: #d7e5a8;
  background: rgba(107,140,42,.16);
}

.torah-track.is-active .torah-track__book {
  color: #d7e5a8;
}

.torah-track[hidden] {
  display: none;
}

@media (min-width: 1024px) {
  .torah-playlist-board {
    gap: 0;
  }

  .torah-playlist-panel .torah-track__body p {
    font-size: 11px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }
}

.torah-cta {
  background: var(--navy);
  padding: 72px 0;
  text-align: center;
}

.torah-cta__title {
  font-size: clamp(24px, 3vw, 36px);
  color: var(--white);
  margin-bottom: 12px;
}

.torah-cta__sub {
  max-width: 700px;
  margin: 0 auto 32px;
  color: rgba(255,255,255,.62);
  line-height: 1.75;
}

.torah-watch-shell {
  padding: calc(var(--nav-h) + 28px) 0 80px;
}

.cm-page-torah-detail .torah-watch-shell .container {
  max-width: 1480px;
  padding-left: 24px;
  padding-right: 24px;
}

.torah-watch__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(400px, 31vw, 470px);
  gap: 32px;
  align-items: start;
}

.cm-page-torah-detail .torah-watch__layout {
  grid-template-columns: minmax(0, 1fr) clamp(430px, 33vw, 540px);
  gap: 30px;
}

.torah-watch__main {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.torah-watch__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--navy);
  text-decoration: none;
  margin-bottom: 18px;
}

.torah-watch__back:hover {
  color: var(--olive);
}

.torah-watch__video {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  background: #09151e;
  box-shadow: 0 18px 42px rgba(8,17,25,.18);
  padding: 0;
}

.torah-watch__video::before {
  content: '';
  display: block;
  padding-top: 56.25%;
}

.torah-watch__video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
}

.torah-watch__header {
  display: grid;
  gap: 10px;
}

.torah-watch__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

.torah-watch__caption-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.torah-watch__eyebrow-row,
.torah-watch__chips,
.torah-watch__actions,
.torah-watch__description-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.torah-watch__badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--navy);
  color: var(--olive-l);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.torah-watch__eyebrow,
.torah-watch__chips span,
.torah-watch__description-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(12,30,10,.05);
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

.torah-watch__title {
  font-size: clamp(32px, 4.8vw, 48px);
  line-height: 1.08;
  color: var(--navy);
  margin: 0;
}

.torah-watch__title-pronunciation {
  display: inline-grid;
  gap: 2px;
  min-width: 0;
  align-self: center;
}

.torah-watch__title-row .torah-title-note__word {
  min-height: 0;
  padding: 8px 14px;
}

.torah-watch__title-row .torah-title-note__label {
  font-size: 10px;
  line-height: 1;
}

.torah-watch__title-row .torah-title-note__value {
  font-size: 16px;
  line-height: 1.3;
  color: var(--light);
  white-space: nowrap;
}

.torah-watch__caption {
  flex: 1 1 520px;
  max-width: 760px;
  margin: 0;
  font-size: 20px;
  line-height: 1.55;
  color: var(--body);
}

.torah-watch__header .torah-title-note {
  margin-bottom: 0;
}

.torah-watch__actions .btn {
  min-width: 180px;
}

.cm-page-torah-detail .torah-watch__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  width: auto;
  flex: 0 0 auto;
}

.torah-watch__actions .torah-watch__nav-btn {
  min-width: 124px;
}

.torah-watch__actions .torah-watch__nav-btn:last-child {
  justify-content: flex-end;
  text-align: right;
}

.torah-watch__nav-btn--disabled,
.torah-watch__nav-btn--disabled:hover,
.torah-watch__nav-btn--disabled:focus {
  opacity: .5;
  cursor: not-allowed;
  pointer-events: none;
  background: transparent;
  color: var(--navy);
  border-color: rgba(30,61,24,.2);
  transform: none;
}

.torah-watch__description {
  padding: 24px 26px;
}

.torah-watch__nav-band {
  display: flex;
  justify-content: flex-end;
  flex: 0 0 auto;
  margin: 0;
}

.torah-watch__actions--band {
  justify-content: flex-end;
}

@media (min-width: 769px) {
  .cm-page-torah-detail .torah-watch__caption {
    flex: 0 1 auto;
    max-width: none;
    min-width: 0;
  }

  .cm-page-torah-detail .torah-watch__caption-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: 16px;
    row-gap: 8px;
  }

  .cm-page-torah-detail .torah-watch__nav-band {
    align-self: start;
    justify-self: end;
    margin: 0;
  }

  .cm-page-torah-detail .torah-watch__actions {
    flex-wrap: nowrap;
    width: auto;
    flex: 0 0 auto;
    justify-content: flex-end;
    gap: 6px;
    margin-left: 0;
  }

  .cm-page-torah-detail .torah-watch__actions .torah-watch__nav-btn {
    min-width: 0;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 10px;
    letter-spacing: .6px;
    white-space: nowrap;
  }
}

.torah-watch__description-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.torah-watch__description-label,
.torah-watch__section-label,
.torah-watch__playlist-label,
.torah-watch__nav-label {
  color: var(--olive);
}

.torah-watch__description-title {
  font-size: clamp(22px, 2.8vw, 30px);
  line-height: 1.08;
  color: var(--navy);
  margin: 8px 0 0;
}

.torah-watch__description-main,
.torah-watch__description-body,
.torah-watch__description-section p {
  margin: 0;
  color: var(--body);
  line-height: 1.78;
}

.torah-watch__description-main {
  color: var(--navy);
  margin-bottom: 16px;
}

.torah-watch__description-main strong {
  color: var(--olive);
}

.torah-watch__description-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(26,47,16,.08);
}

.torah-watch__points {
  margin-top: 12px;
}

.torah-watch__book-title {
  font-size: 28px;
  color: var(--navy);
  margin: 10px 0 8px;
}

.torah-watch__sidebar {
  align-self: start;
}

.torah-watch__playlist-card {
  padding: 22px 18px 18px;
  position: sticky;
  top: calc(var(--nav-h) + 20px);
  max-height: calc(100vh - var(--nav-h) - 28px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.torah-watch__playlist-title {
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.08;
  color: var(--navy);
  margin: 6px 0;
}

.torah-watch__playlist-sub {
  margin: 0;
  color: var(--body);
  line-height: 1.45;
  font-size: 14px;
}

.torah-watch__playlist-filters {
  margin-top: 14px;
}

.torah-watch__tracklist {
  display: grid;
  gap: 10px;
  align-content: start;
  margin-top: 14px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 4px 4px 4px;
}

.cm-page-torah-detail .torah-watch__playlist-card {
  background: #faf8f4 !important;
  max-height: calc(100vh - var(--nav-h) - 20px);
  padding-bottom: 14px;
}

.cm-page-torah-detail .torah-watch__tracklist {
  background: #faf8f4 !important;
  padding-bottom: 0;
}

.cm-page-torah-detail .torah-watch__playlist-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(120px, 1.18fr);
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  align-items: stretch;
}

.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter {
  min-height: 34px;
  min-width: 0;
  padding: 0 8px;
  box-sizing: border-box;
  font-size: 9px;
  letter-spacing: 0.2px;
  white-space: nowrap;
  text-align: center;
}

.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter[data-watch-book-filter="deuteronomy"] {
  padding-left: 12px;
  padding-right: 12px;
}

.cm-page-torah-detail .torah-watch__playlist-footer {
  display: none !important;
}

.cm-page-torah-detail .torah-watch__playlist-card .torah-track,
.cm-page-torah-detail .torah-watch__playlist-card .torah-track:visited {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.cm-page-torah-detail .torah-watch__playlist-card .torah-track.is-active,
.cm-page-torah-detail .torah-watch__playlist-card .torah-track.is-active:visited,
.cm-page-torah-detail .torah-watch__playlist-card .torah-track.is-active:hover,
.cm-page-torah-detail .torah-watch__playlist-card .torah-track.is-active:focus-visible {
  background: #152b39 !important;
  box-shadow: 0 10px 24px rgba(8, 17, 25, 0.14) !important;
}

.cm-page-torah-detail .torah-watch__playlist-card .torah-track__body,
.cm-page-torah-detail .torah-watch__playlist-card .torah-track__topline,
.cm-page-torah-detail .torah-watch__playlist-card .torah-track__body p {
  background: transparent !important;
  box-shadow: none !important;
}

.cm-page-torah-detail .torah-watch__playlist-card .torah-track__index {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  align-self: center;
}

.cm-page-torah-detail .torah-watch__playlist-card .torah-track__body {
  display: grid;
  gap: 4px;
  align-content: center;
}

.cm-page-torah-detail .torah-watch__playlist-card .torah-track__topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
  margin-bottom: 0;
}

.cm-page-torah-detail .torah-watch__playlist-card .torah-track__topline strong {
  min-width: 0;
  line-height: 1.15;
}

.cm-page-torah-detail .torah-watch__playlist-card .torah-track__body p {
  line-height: 1.35;
  margin: 0;
}

.torah-watch__playlist-card .torah-track,
.torah-watch__playlist-card .torah-track:visited {
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-height: 86px;
  padding: 12px;
  border-radius: var(--r-md);
}

.torah-watch__playlist-card .torah-track__index {
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  font-size: 12px;
}

.torah-watch__playlist-card .torah-track__body {
  display: grid;
  gap: 6px;
  align-content: start;
}

.torah-watch__playlist-card .torah-track__topline {
  align-items: start;
  margin-bottom: 0;
}

.torah-watch__playlist-card .torah-track__topline strong {
  font-size: 18px;
  line-height: 1.15;
}

.torah-watch__playlist-card .torah-track__duration {
  font-size: 10px;
  padding: 6px 8px;
}

.torah-watch__playlist-card .torah-track__meta {
  margin-bottom: 0;
}

.torah-watch__playlist-card .torah-track__book {
  font-size: 10px;
}

.torah-watch__playlist-card .torah-track__body p {
  font-size: 12px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
}

@media (min-width: 1280px) {
  .torah-watch__playlist-card {
    padding: 24px 20px 20px;
  }
}

.torah-watch__nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.torah-watch__nav-card {
  display: block;
  padding: 22px 24px;
  border-radius: var(--r-md);
  color: var(--navy);
  text-decoration: none;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}

.torah-watch__nav-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(26,47,16,.1);
  border-color: rgba(107,140,42,.24);
}

.torah-watch__nav-card strong {
  display: block;
  font-size: 24px;
  line-height: 1.2;
}

.torah-watch__nav-card--muted {
  opacity: .7;
}

.torah-detail-hero {
  background:
    linear-gradient(180deg, rgba(14,32,45,.96) 0%, rgba(14,32,45,.92) 100%);
  padding: calc(var(--nav-h) + 64px) 0 56px;
}

.torah-detail-hero::before {
  background:
    radial-gradient(circle at 18% 30%, rgba(107,140,42,.18) 0%, transparent 36%),
    radial-gradient(circle at 82% 10%, rgba(255,255,255,.06) 0%, transparent 24%);
}

.torah-detail-hero .container {
  position: relative;
  z-index: 1;
}

.torah-detail-hero__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: rgba(255,255,255,.74);
  text-decoration: none;
}

.torah-detail-hero__back:hover {
  color: var(--white);
}

.torah-detail-hero__badge {
  color: var(--olive-l);
  background: rgba(107,140,42,.14);
  border: 1px solid rgba(107,140,42,.32);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 14px;
}

.torah-detail-hero__eyebrow {
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  margin-bottom: 8px;
}

.torah-detail-hero__title {
  max-width: 720px;
  font-size: clamp(36px, 6vw, 60px);
  line-height: 1.08;
  color: var(--white);
  margin-bottom: 14px;
}

.torah-detail-hero__caption {
  max-width: 640px;
  font-size: 19px;
  line-height: 1.7;
  color: rgba(255,255,255,.72);
}

.torah-detail-hero--missing {
  min-height: 60vh;
  display: flex;
  align-items: center;
}

.torah-detail {
  padding: 56px 0 80px;
}

.torah-detail__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr);
  gap: 28px;
  align-items: start;
}

.torah-detail__sidebar {
  display: grid;
  gap: 18px;
}

.torah-detail__card {
  border-radius: var(--r-md);
  padding: 24px;
}

.torah-detail__label {
  color: var(--olive);
  margin-bottom: 12px;
}

.torah-detail__lead {
  font-size: 23px;
  line-height: 1.4;
  color: var(--navy);
  margin: 0;
}

.torah-detail__book {
  font-size: 28px;
  color: var(--navy);
  margin-bottom: 8px;
}

.torah-detail__book-desc {
  margin: 0;
  color: var(--body);
  line-height: 1.75;
}

.torah-detail__summary {
  margin: 0;
  color: var(--body);
  line-height: 1.72;
}

.torah-detail__overview {
  margin: 0;
  color: var(--body);
  line-height: 1.72;
}

.torah-detail__points {
  margin: 0;
}

.torah-detail__nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 28px;
}

.torah-detail__nav-card {
  display: block;
  padding: 22px 24px;
  border-radius: var(--r-md);
  text-decoration: none;
  color: var(--navy);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}

.torah-detail__nav-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(26,47,16,.1);
  border-color: rgba(107,140,42,.24);
}

.torah-detail__nav-card strong {
  display: block;
  font-size: 24px;
  line-height: 1.2;
}

.torah-detail__nav-label {
  color: var(--olive);
  margin-bottom: 10px;
}

.torah-detail__nav-card--muted {
  opacity: .7;
}

@media (max-width: 1280px) {
  .torah-playlist-board {
    grid-template-columns: minmax(280px, .58fr) minmax(0, 1.42fr);
    gap: 18px;
  }

  .torah-player {
    padding: 24px;
  }

  .torah-player__title {
    font-size: clamp(30px, 4.1vw, 44px);
  }

  .torah-player__desc,
  .torah-player__caption {
    font-size: 15px;
  }

  .torah-player__content {
    gap: 16px;
    margin-top: 16px;
  }
}

@media (max-width: 1120px) {
  .torah-playlist-shell {
    padding-bottom: 0;
  }

  .torah-playlist-board,
  .torah-watch__layout,
  .torah-detail__grid {
    grid-template-columns: 1fr;
  }

  .cm-page-torah-detail .torah-watch__layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

.torah-player {
    position: static;
    order: 1;
  }

  .torah-playlist-panel {
    order: 2;
    position: static;
    height: auto;
    background: rgba(255,255,255,.9);
    border: 1px solid rgba(26,47,16,.08);
    box-shadow: 0 18px 46px rgba(26,47,16,.08);
    border-radius: var(--r-lg);
  }
  .torah-playlist-panel__head {
    background: transparent;
    border-bottom: 1px solid rgba(26,47,16,.08);
    padding: 20px 20px 16px;
  }
  .torah-playlist-panel .torah-playlist-panel__label { color: var(--olive); }
  .torah-playlist-panel .torah-playlist-panel__title { color: var(--navy); }
  .torah-playlist-panel .torah-playlist-panel__sub { color: var(--body); }
  .torah-playlist-panel .torah-playlist-panel__filters {
    background: transparent;
    border-bottom: 1px solid rgba(26,47,16,.08);
    padding: 10px 20px 14px;
  }
  .torah-playlist-panel .torah-filter {
    background: rgba(12,30,10,.07);
    border: none;
    color: #1b3417;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .8px;
  }
  .torah-playlist-panel .torah-filter.is-active {
    background: var(--navy);
    color: #fff;
    border-color: transparent;
  }
  .torah-playlist-panel > .torah-tracklist {
    padding: 4px;
    max-height: none;
  }
  .torah-playlist-panel .torah-track,
  .torah-playlist-panel .torah-track:visited {
    background: rgba(12,30,10,.03);
    border: 1px solid rgba(26,47,16,.08);
    border-left: 1px solid rgba(26,47,16,.08);
    color: var(--navy);
    border-radius: var(--r-md);
    padding: 12px;
  }
  .torah-playlist-panel .torah-track.is-active,
  .torah-playlist-panel .torah-track.is-active:visited {
    background: linear-gradient(135deg, #112837 0%, #0d1f2b 100%);
    border-color: rgba(107,140,42,.26);
  }
  .torah-playlist-panel .torah-track__index {
    background: rgba(107,140,42,.14);
    color: var(--olive);
    border-radius: 14px;
  }
  .torah-playlist-panel .torah-track__topline strong { color: var(--navy); }
  .torah-playlist-panel .torah-track__book { color: var(--olive); }
  .torah-playlist-panel .torah-track__duration {
    background: rgba(17,40,55,.08);
    color: var(--navy);
  }
  .torah-playlist-panel .torah-track__body p { color: var(--light); }
  .torah-player { margin: 36px 0 72px 0; }

  .torah-watch__sidebar {
    position: static;
  }

  .torah-watch__playlist-card {
    position: static;
    max-height: none;
  }

  .torah-player__content {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "summary"
      "context"
      "actions";
  }

  .torah-tracklist {
    max-height: none;
  }
}

@media (max-width: 768px) {
  .torah-playlist-shell {
    padding-top: var(--nav-h);
  }

  .torah-player,
  .torah-watch__description,
  .torah-watch__playlist-card,
  .torah-watch__nav-card,
  .torah-detail__card,
  .torah-detail__nav-card {
    border-radius: var(--r-lg);
  }

  .torah-player__caption {
    font-size: 19px;
  }

  .torah-track {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .torah-track__index {
    width: 48px;
    height: 48px;
    border-radius: var(--r-md);
  }

  .torah-watch__nav {
    grid-template-columns: 1fr;
  }

  .torah-track__topline {
    flex-direction: column;
  }

  /* Torah detail: compact playlist panel + horizontal swipe categories */
  .cm-page-torah-detail .torah-watch__playlist-card {
    padding: 16px 14px 14px;
  }

  .cm-page-torah-detail .torah-watch__playlist-head {
    gap: 4px;
  }

  .cm-page-torah-detail .torah-watch__playlist-title {
    font-size: 28px;
    line-height: 1.05;
    margin: 2px 0;
  }

  .cm-page-torah-detail .torah-watch__playlist-sub {
    font-size: 13px;
    line-height: 1.4;
  }

  .cm-page-torah-detail .torah-watch__playlist-filters {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;
    margin-top: 10px;
    padding: 0 0 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .cm-page-torah-detail .torah-watch__playlist-filters::-webkit-scrollbar {
    display: none;
  }

  .cm-page-torah-detail .torah-watch__playlist-filters .torah-filter {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 12px;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: none;
    white-space: nowrap;
  }

  .cm-page-torah-detail .torah-watch__playlist-card .torah-track,
  .cm-page-torah-detail .torah-watch__playlist-card .torah-track:visited {
    min-height: 0;
    padding: 10px;
    border-radius: 14px;
    gap: 10px;
  }

  .cm-page-torah-detail .torah-watch__playlist-card .torah-track__index {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 11px;
  }

  .cm-page-torah-detail .torah-watch__playlist-card .torah-track__topline {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
  }

  .cm-page-torah-detail .torah-watch__playlist-card .torah-track__topline strong {
    min-width: 0;
    font-size: 18px;
    line-height: 1.2;
  }

  .cm-page-torah-detail .torah-watch__playlist-card .torah-track__duration {
    margin-left: auto;
    font-size: 10px;
    padding: 4px 7px;
  }

  .cm-page-torah-detail .torah-watch__playlist-card .torah-track__body p {
    font-size: 13px;
    line-height: 1.4;
    -webkit-line-clamp: 1;
  }

  .torah-player__meta {
    margin-bottom: 12px;
  }

  .torah-title-note {
    gap: 8px 12px;
  }

  .torah-title-note__word {
    min-height: 38px;
    padding: 0 12px;
    font-size: 16px;
  }

  .torah-title-note__label {
    font-size: 9px;
  }

  .torah-title-note__value {
    font-size: 13px;
  }

  .torah-detail__nav {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .torah-player,
  .torah-watch__description,
  .torah-watch__playlist-card {
    padding: 20px;
  }

  .torah-player__title {
    font-size: 36px;
  }

  .torah-player__progress-meta,
  .torah-player__actions,
  .torah-detail__actions,
  .torah-watch__toolbar,
  .torah-watch__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .torah-player__actions .btn,
  .torah-detail__actions .btn,
  .torah-watch__actions .btn {
    width: 100%;
    min-width: 0;
  }

  .torah-detail__video,
  .torah-watch__video {
    border-radius: var(--r-md);
  }

  .torah-player__video {
    border-radius: 0;
  }

  .torah-player__video-cta {
    right: 16px;
    bottom: 16px;
    min-height: 42px;
    padding: 0 16px;
    letter-spacing: 1.1px;
  }

  .torah-player__video-duration {
    top: 16px;
    right: 16px;
  }

  .torah-watch__description-head {
    flex-direction: column;
  }

  .torah-playlist-panel .torah-filter {
    font-size: 12px;
    letter-spacing: 0.6px;
    color: #1a3016;
  }

  .torah-detail {
    padding-top: 40px;
  }

  .torah-detail__card {
    padding: 20px;
  }
}

@media (max-width: 768px) {
  body.cm-page-torah-detail {
    overflow-x: hidden;
  }

  .cm-page-torah-detail .torah-watch-shell {
    padding-top: calc(var(--nav-h) + 14px);
    padding-bottom: 84px;
    overflow-x: clip;
  }

  .cm-page-torah-detail .torah-watch-shell .container {
    padding-left: 14px;
    padding-right: 14px;
    max-width: 100%;
  }

  .cm-page-torah-detail .torah-watch__layout {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 16px !important;
    max-width: 100%;
  }

  .cm-page-torah-detail .torah-watch__layout > * {
    min-width: 0;
    max-width: 100%;
  }

  .cm-page-torah-detail .torah-watch__main {
    gap: 14px;
  }

  .cm-page-torah-detail .torah-watch__back {
    margin-bottom: 10px;
  }

.cm-page-torah-detail .torah-watch__video {
    position: sticky;
    top: calc(var(--nav-h) + 8px);
    z-index: 24;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 9;
  }

  .cm-page-torah-detail .torah-watch__video::before {
    display: none;
  }

.cm-page-torah-detail .torah-watch__video iframe {
    display: block;
    width: 100%;
    height: 100%;
  }

  .cm-page-torah-detail .torah-watch__playlist-card {
    background: #faf8f4 !important;
  }

  .cm-page-torah-detail .torah-watch__tracklist {
    background: #faf8f4 !important;
  }

  .cm-page-torah-detail .torah-watch__playlist-footer {
    min-height: 0 !important;
    margin: 0 !important;
    background: #faf8f4 !important;
    border-top: none !important;
  }

  .admin-bar.cm-page-torah-detail .torah-watch__video {
    top: calc(var(--nav-h) + 40px);
  }

  .cm-page-torah-detail .torah-watch__header {
    gap: 8px;
  }

  .cm-page-torah-detail .torah-watch__eyebrow-row,
  .cm-page-torah-detail .torah-watch__chips {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;
    align-items: center;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .cm-page-torah-detail .torah-watch__eyebrow-row::-webkit-scrollbar,
  .cm-page-torah-detail .torah-watch__chips::-webkit-scrollbar {
    display: none;
  }

  .cm-page-torah-detail .torah-watch__eyebrow,
  .cm-page-torah-detail .torah-watch__chips span {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 0 10px;
    font-size: 10px;
    letter-spacing: .6px;
    white-space: nowrap;
  }

  .cm-page-torah-detail .torah-watch__title {
    font-size: 34px;
    line-height: 1.08;
  }

  .cm-page-torah-detail .torah-watch__caption {
    font-size: 17px;
    line-height: 1.5;
    flex: 0 1 auto;
    max-width: none;
    min-width: 0;
  }

  .cm-page-torah-detail .torah-watch__caption-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: 16px;
    row-gap: 8px;
  }

  .cm-page-torah-detail .torah-watch__actions {
    flex-wrap: nowrap;
    width: auto;
    flex: 0 0 auto;
    justify-content: flex-end;
    margin-left: 16px;
    gap: 6px;
  }

  .cm-page-torah-detail .torah-watch__nav-band {
    align-self: start;
    justify-self: end;
  }

  .cm-page-torah-detail .torah-watch__actions .torah-watch__nav-btn {
    min-width: 0;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 10px;
    letter-spacing: .6px;
    white-space: nowrap;
  }

  .cm-page-torah-detail .torah-watch__playlist-card {
    padding: 14px 12px 12px;
  }

  .cm-page-torah-detail .torah-watch__playlist-title {
    font-size: 24px;
  }

  .cm-page-torah-detail .torah-watch__playlist-filters {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;
    padding-bottom: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .cm-page-torah-detail .torah-watch__playlist-filters::-webkit-scrollbar {
    display: none;
  }

  .cm-page-torah-detail .torah-watch__playlist-filters .torah-filter {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

@media (max-width: 560px) {
  .cm-page-torah-detail .torah-watch__caption-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .cm-page-torah-detail .torah-watch__nav-band {
    margin: 0 0 16px;
  }

  .cm-page-torah-detail .torah-watch__actions {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
  }

  .cm-page-torah-detail .torah-watch__actions .btn {
    width: auto;
    min-width: 0;
  }
}

@media (max-width: 782px) {
  .admin-bar.cm-page-torah-detail .torah-watch__video {
    top: calc(var(--nav-h) + 54px);
  }
}

/* ─────────────────────────────────────────────────────────────
   LIGHT CLEAN SIDEBAR LAYOUT  (Torah index page)
   Mirrors the sermons "Light Clean Ministry Side-Nav" design
   ───────────────────────────────────────────────────────────── */

/* Override shell padding — handled by the layout below */
.cm-page-torah-index .torah-playlist-shell {
  padding-top: 0;
  padding-bottom: 0;
}

/* #main background + push below fixed nav */
.cm-page-torah-index #main {
  padding-top: var(--nav-h);
  background: var(--cream, #f7f2eb);
}
.admin-bar.cm-page-torah-index #main {
  padding-top: var(--nav-h);
}
@media (max-width: 782px) {
  .cm-page-torah-index #main {
    padding-top: 0 !important;
    padding-bottom: calc(24px + env(safe-area-inset-bottom)) !important;
    background: var(--cream, #f7f2eb) !important;
  }

  .cm-page-torah-index .torah-playlist-shell {
    padding: 24px 0 20px !important;
  }
}

/* Two-column grid: sidebar left, body right */
.cm-torah-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 900px);
  align-items: start;
  background: var(--cream, #f7f2eb);
  max-width: 1440px;
  min-height: calc(100vh - var(--nav-h));
}

/* ── Sidebar ── */
.cm-torah-sidebar {
  background: #fff;
  border-right: 1px solid #e6e1d8;
  padding: 10px 0 48px;
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  scrollbar-width: none;
}
.admin-bar .cm-torah-sidebar {
  top: calc(var(--nav-h) + 32px);
  height: calc(100vh - var(--nav-h) - 32px);
}
@media screen and (max-width: 782px) {
  .admin-bar .cm-torah-sidebar {
    top: calc(var(--nav-h) + 46px);
    height: calc(100vh - var(--nav-h) - 46px);
  }
}
.cm-torah-sidebar::-webkit-scrollbar { display: none; }

/* Sidebar group labels — reuse same class as sermons */
.cm-torah-sidebar .cm-sidebar__group-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #b5b0a8;
  padding: 14px 18px 4px;
  margin: 0;
}

/* Collapsible group toggle button */
.cm-torah-sidebar__group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 10px 18px 4px;
  background: none !important;
  border: none !important;
  border-radius: 0;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #b5b0a8;
  transition: color .15s;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  font-family: inherit;
}
.cm-torah-sidebar__group-toggle:hover {
  color: #8a857e;
}
.cm-torah-sidebar__group-toggle:focus {
  outline: none;
  color: #8a857e;
}
.cm-torah-sidebar__group-toggle svg {
  transition: transform .2s ease;
  flex-shrink: 0;
}
.cm-torah-sidebar__group-toggle[aria-expanded="false"] svg {
  transform: rotate(-90deg);
}

/* ── Book accordion groups ── */
.cm-torah-book-group {
  border-bottom: 1px solid #f0ede7;
}
.cm-torah-book-group:last-child { border-bottom: none; }

/* Book header button (acts like a nav-item + toggle) */
.cm-torah-book-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 14px 8px 18px;
  background: none;
  border: none;
  border-left: 3px solid transparent;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  color: #4a4540;
  gap: 6px;
  transition: background .15s, border-color .15s, color .15s;
  appearance: none;
  -webkit-appearance: none;
}
.cm-torah-book-header:hover {
  background: var(--cream, #f7f2eb);
  color: var(--navy, #1a2e44);
}
.cm-torah-book-header.is-active,
.cm-torah-book-header[aria-expanded="true"] {
  background: #f0ede7;
  border-left-color: #6b8c2a;
  color: var(--navy, #1a2e44);
  font-weight: 600;
}

/* Chevron rotates when expanded */
.cm-torah-book-chevron svg {
  transition: transform .2s ease;
  display: block;
  color: #9b9690;
}
.cm-torah-book-header[aria-expanded="true"] .cm-torah-book-chevron svg {
  transform: rotate(180deg);
  color: #6b8c2a;
}
.cm-torah-book-header .cm-torah-sidebar__nav-badge {
  font-size: 11px;
  font-weight: 600;
  color: #b5b0a8;
  background: #f0ede7;
  border-radius: 10px;
  padding: 1px 7px;
  flex-shrink: 0;
  line-height: 1.6;
}
.cm-torah-book-header.is-active .cm-torah-sidebar__nav-badge {
  background: #e4eccc;
  color: #4d6a15;
}

/* Portions list — hidden by default, slides open */
.cm-torah-portions-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height .28s ease;
  background: #faf8f4;
}
.cm-torah-portions-list.is-open {
  max-height: 1200px;
}

/* Individual portion links inside the accordion */
.cm-torah-portion-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 14px 6px 30px;
  text-decoration: none;
  color: #5a5550;
  font-size: 12.5px;
  transition: background .12s, color .12s;
  border-left: 3px solid transparent;
}
.cm-torah-portion-item:hover {
  background: #f0ede7;
  color: var(--navy, #1a2e44);
}
.cm-torah-portion-item.is-active {
  background: #eef5da;
  border-left-color: #6b8c2a;
  color: #4d6a15;
  font-weight: 600;
}
.cm-torah-portion-item__num {
  font-size: 10px;
  font-weight: 700;
  color: #c0bbb3;
  flex-shrink: 0;
  min-width: 18px;
}
.cm-torah-portion-item.is-active .cm-torah-portion-item__num { color: #7fa832; }
.cm-torah-portion-item__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cm-torah-portion-item__dur {
  font-size: 11px;
  color: #c0bbb3;
  flex-shrink: 0;
}

/* Sidebar nav buttons */
.cm-torah-sidebar__nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 14px 8px 18px;
  background: none;
  border: none;
  border-left: 3px solid transparent;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  color: #4a4540;
  transition: background .15s, border-color .15s, color .15s;
  gap: 6px;
}
.cm-torah-sidebar__nav-item:hover {
  background: var(--cream, #f7f2eb);
  color: var(--navy, #1a2e44);
}
.cm-torah-sidebar__nav-item.is-active {
  background: #f0ede7;
  border-left-color: #6b8c2a;
  color: var(--navy, #1a2e44);
  font-weight: 600;
}

.cm-torah-sidebar__nav-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cm-torah-sidebar__nav-ico {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  color: #9b9690;
}
.cm-torah-sidebar__nav-item.is-active .cm-torah-sidebar__nav-ico {
  color: #6b8c2a;
}
.cm-torah-sidebar__nav-badge {
  font-size: 11px;
  font-weight: 600;
  color: #b5b0a8;
  background: #f0ede7;
  border-radius: 10px;
  padding: 1px 7px;
  flex-shrink: 0;
  line-height: 1.6;
}
.cm-torah-sidebar__nav-item.is-active .cm-torah-sidebar__nav-badge {
  background: #e4eccc;
  color: #4d6a15;
}

/* ── Main body ── */
.cm-torah-body {
  padding: 20px 32px 80px;
  min-width: 0;
  max-width: 900px;
}

/* Compact heading */
.cm-torah-body__hdr {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}
.cm-torah-body__title {
  font-family: var(--font-head, 'Playfair Display', serif);
  font-size: clamp(18px, 1.8vw, 24px);
  color: var(--navy, #1a2e44);
  line-height: 1.2;
  margin: 0;
}

/* Tracklist in the body (light theme) */
.cm-torah-tracklist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
  margin-top: 24px;
}
.cm-torah-tracklist .torah-track {
  background: #fff;
  border: 1px solid #e8e3db;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-decoration: none;
  color: #3a3530;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
/* CRITICAL: allow JS filter to hide tracks (overrides display:flex) */
.cm-torah-tracklist .torah-track[hidden] { display: none !important; }
.cm-torah-tracklist .torah-track:hover {
  border-color: #c8d8a0;
  box-shadow: 0 2px 8px rgba(107,140,42,.1);
  background: #fafef4;
}
.cm-torah-tracklist .torah-track.is-active {
  border-color: #6b8c2a;
  background: #f4f9e8;
  box-shadow: 0 0 0 2px rgba(107,140,42,.15);
}
.cm-torah-tracklist .torah-track__index {
  font-size: 11px;
  font-weight: 700;
  color: #b5b0a8;
  flex-shrink: 0;
  min-width: 20px;
  padding-top: 2px;
}
.cm-torah-tracklist .torah-track.is-active .torah-track__index { color: #6b8c2a; }
.cm-torah-tracklist .torah-track__body { flex: 1; min-width: 0; }
.cm-torah-tracklist .torah-track__topline {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
}
.cm-torah-tracklist .torah-track__topline strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy, #1a2e44);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cm-torah-tracklist .torah-track.is-active .torah-track__topline strong { color: #4d6a15; }
.cm-torah-tracklist .torah-track__duration {
  font-size: 11px;
  color: #b5b0a8;
  flex-shrink: 0;
}
.cm-torah-tracklist .torah-track__book {
  font-size: 11px;
  color: #9b9690;
}
.cm-torah-tracklist .torah-track__body p {
  font-size: 12px;
  color: #8a857e;
  margin: 4px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── INDEX PAGE: compact horizontal player card ──────────────── */
.cm-page-torah-index .torah-playlist-board { display: block; }

/* ── Full-width landscape card ── */
.cm-page-torah-index .torah-player {
  display: grid;
  grid-template-columns: 340px 1fr;
  grid-template-rows: auto auto 1fr;
  background: #fff;
  border: 1px solid #e6e1d8;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
  padding: 0;
  margin: 0;
  max-width: 100%;
  min-height: 320px;   /* guarantees the image column is never crushed */
  order: unset;
}

/* Image — column 1, spans ALL rows so it fills the full card height */
.cm-page-torah-index .torah-player__video-link {
  grid-column: 1;
  grid-row: 1 / -1;
  display: block;
  position: relative;   /* already set by base; img is absolute inside */
  /* grid stretches this to full card height automatically */
}

/* The <a> also carries .torah-player__video — neutralise its own sizing */
.cm-page-torah-index .torah-player__video {
  height: 100%;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}

/* Kill the 16:9 padding-top trick so it doesn't fight the grid height */
.cm-page-torah-index .torah-player__video::before { display: none !important; }

/* img: base CSS already does position:absolute;inset:0;object-fit:cover —
   add !important so nothing overrides it when in the grid context */
.cm-page-torah-index .torah-player__video-link img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center top !important;
}

/* Right column: intro block — row 1 */
.cm-page-torah-index .torah-player__intro {
  grid-column: 2;
  grid-row: 1;
  padding: 22px 24px 10px;
  margin-bottom: 0;
}

/* Right column: progress bar — row 2 */
.cm-page-torah-index .torah-player__progress {
  grid-column: 2;
  grid-row: 2;
  padding: 0 24px 12px;
  margin: 0;
}

/* Right column: portion name + details — row 3, fills remaining space */
.cm-page-torah-index .torah-player__content {
  grid-column: 2;
  grid-row: 3;
  padding: 0 24px 22px;
  margin-top: 0;
}

/* Compact text sizes */
.cm-page-torah-index .torah-player__title  { display: none; } /* in heading */
.cm-page-torah-index .torah-player__desc   { font-size: 12.5px; line-height: 1.55; margin-bottom: 8px; }
.cm-page-torah-index .torah-player__stats  { gap: 6px; }
.cm-page-torah-index .torah-player__stats span {
  font-size: 11px;
  padding: 3px 10px;
  background: var(--cream, #f7f2eb);
  border-radius: 20px;
}
.cm-page-torah-index .torah-player__portion {
  font-size: clamp(14px, 1.3vw, 17px);
  margin-bottom: 4px;
}
.cm-page-torah-index .torah-player__eyebrow { font-size: 10px; margin-bottom: 2px; }
.cm-page-torah-index .torah-player__caption { font-size: 12px; margin-top: 4px; }
.cm-page-torah-index .torah-player__summary { gap: 4px; }
.cm-page-torah-index .torah-player__summary p { font-size: 12.5px; line-height: 1.55; }
.cm-page-torah-index .torah-player__context-label { font-size: 9px; }
/* CTA button smaller */
.cm-page-torah-index .torah-player__video-cta {
  font-size: 10px;
  min-height: 34px;
  padding: 0 14px;
  right: 10px;
  bottom: 10px;
  letter-spacing: 1px;
}
.cm-page-torah-index .torah-player__video-duration {
  top: 10px;
  right: 10px;
  font-size: 10px;
  min-height: 24px;
  padding: 0 8px;
}
/* Progress bar compact */
.cm-page-torah-index .torah-player__progress-meta { font-size: 10px; margin-top: 4px; }
.cm-page-torah-index .torah-player__progress-track { height: 4px; border-radius: 2px; }
.cm-page-torah-index .torah-player__progress-fill  { border-radius: 2px; }

/* ── Mobile: stack layout ── */
@media (max-width: 900px) {
  .cm-torah-layout {
    grid-template-columns: 1fr;
  }
  .cm-torah-sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid #e6e1d8;
    padding: 10px 0 12px;
    overflow: visible;
  }
  .cm-torah-sidebar::-webkit-scrollbar { display: none; }
  .cm-torah-tracklist { grid-template-columns: 1fr; }
  .cm-torah-body { padding: 16px 16px 60px; }
}

.torah-series-overview {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(107,140,42,.14) 0%, transparent 24%),
    radial-gradient(circle at 88% 12%, rgba(201,166,92,.13) 0%, transparent 22%),
    linear-gradient(180deg, #f8f6ed 0%, #f2f4e8 100%);
  border-bottom: 1px solid rgba(42, 59, 36, 0.08);
  padding: clamp(32px, 5vw, 64px) 0 clamp(24px, 4vw, 42px);
}

.torah-series-overview__hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .85fr);
  gap: 22px;
  align-items: stretch;
  margin-bottom: 18px;
}

.torah-series-overview__hero-copy {
  max-width: 840px;
}

.torah-series-overview__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #3f5f28;
  font-weight: 700;
}

.torah-series-overview__title {
  margin: 8px 0 8px;
  font-family: var(--font-head);
  color: var(--navy);
  line-height: 1.12;
  font-size: clamp(30px, 5vw, 46px);
}

.torah-series-overview__lead {
  margin: 0;
  color: var(--body);
  line-height: 1.7;
  font-size: 16px;
}

.torah-series-overview__warmth {
  margin: 14px 0 0;
  max-width: 760px;
  color: #465544;
  line-height: 1.78;
  font-size: 15px;
}

.torah-series-overview__stats {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.torah-series-overview__stats span {
  border: 1px solid rgba(63, 95, 40, 0.18);
  background: rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 12px;
  color: #2a3b24;
  font-weight: 600;
}

.torah-series-overview__actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.torah-series-overview__spotlight {
  border: 1px solid rgba(42, 59, 36, 0.1);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 34px rgba(42, 59, 36, 0.08);
  backdrop-filter: blur(10px);
  border-radius: 22px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.torah-series-overview__spotlight-label {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #516b36;
  font-weight: 700;
}

.torah-series-overview__spotlight-title {
  margin: 0;
  font-family: var(--font-head);
  font-size: clamp(24px, 3.2vw, 34px);
  line-height: 1.08;
  color: var(--navy);
}

.torah-series-overview__spotlight-text {
  margin: 0;
  color: var(--body);
  line-height: 1.72;
  font-size: 14px;
}

.torah-series-overview__spotlight-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.torah-series-overview__spotlight-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(63, 95, 40, 0.08);
  color: #365028;
  font-size: 11px;
  font-weight: 700;
}

.torah-series-overview__journey {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 22px;
}

.torah-series-overview__journey-stop {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(63, 95, 40, 0.14);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  padding: 0 14px;
  color: #31492a;
  font-size: 12px;
  font-weight: 700;
}

.torah-series-overview__section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 420px);
  gap: 18px;
  align-items: end;
  margin-bottom: 16px;
}

.torah-series-overview__section-title {
  margin: 8px 0 0;
  font-family: var(--font-head);
  color: var(--navy);
  line-height: 1.12;
  font-size: clamp(24px, 3.5vw, 36px);
}

.torah-series-overview__section-copy {
  margin: 0;
  color: #536451;
  line-height: 1.7;
  font-size: 14px;
}

.torah-series-overview__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.torah-series-overview__card {
  border: 1px solid rgba(42, 59, 36, 0.1);
  background: linear-gradient(180deg, rgba(255,255,255,.96) 0%, rgba(252,252,248,.96) 100%);
  border-radius: 20px;
  padding: 16px;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  box-shadow: 0 12px 28px rgba(42, 59, 36, 0.06);
}

.torah-series-overview__card-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.torah-series-overview__book-num {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(63, 95, 40, 0.12);
  color: #355326;
  font-size: 12px;
  font-weight: 700;
}

.torah-series-overview__book-name {
  margin: 0 0 10px;
  font-family: var(--font-head);
  color: var(--navy);
  line-height: 1.2;
  font-size: 22px;
}

.torah-series-overview__book-meta {
  margin: 3px 0 0;
  color: #55674e;
  font-size: 11px;
  line-height: 1.4;
}

.torah-series-overview__book-summary {
  margin: 0;
  color: var(--body);
  line-height: 1.58;
  font-size: 13px;
  flex-grow: 1;
}

.torah-series-overview__book-stats {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px dashed rgba(42, 59, 36, 0.16);
  padding-top: 8px;
}

.torah-series-overview__book-stats span {
  font-size: 11px;
  color: #3d4f35;
  font-weight: 600;
}

.torah-series-overview__footer-note {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(42, 59, 36, 0.08);
}

.torah-series-overview__footer-note p {
  margin: 0;
  color: #4f5f4b;
  line-height: 1.7;
  font-size: 14px;
}

.torah-playlist-shell__intro {
  padding: 24px 0 0;
}

.torah-playlist-shell__title {
  margin: 8px 0 8px;
  font-family: var(--font-head);
  color: var(--navy);
  line-height: 1.12;
  font-size: clamp(24px, 3vw, 34px);
}

.torah-playlist-shell__copy {
  margin: 0;
  max-width: 760px;
  color: #4f6150;
  line-height: 1.72;
  font-size: 15px;
}

@media (max-width: 1240px) {
  .torah-series-overview__hero,
  .torah-series-overview__section-head {
    grid-template-columns: 1fr;
  }

  .torah-series-overview__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .torah-series-overview__grid {
    grid-template-columns: 1fr;
  }

  .torah-series-overview__spotlight {
    padding: 18px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   TORAH PAGE REDESIGN — Natural Flow (Mockup Match)
   Added: 2026-03-31
   ═══════════════════════════════════════════════════════════════ */

/* ── DESIGN TOKENS ── */
.cm-page-torah-index {
  --olive-900: #1c2b16;
  --olive-800: #2a3f22;
  --olive-700: #3a5530;
  --olive-600: #4a6a3e;
  --olive-500: #5a7f4c;
  --olive-100: #e8efe4;
  --olive-50: #f4f7f2;
  --gold-500: #c8a44e;
  --gold-400: #d4b562;
  --gold-300: #e0c87e;
  --gold-100: #f5edd4;
  --gold-50: #faf6ea;
  --ink: #1a1a1a;
  --text-rds: #3a3a3a;
  --text-muted-rds: #6e6e6e;
  --text-light-rds: #9a9a9a;
  --border-rds: #e4e0d8;
  --bg-warm: #faf8f4;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
}

/* ── SECTION 1: HERO — Dark olive gradient ── */
.cm-page-torah-index .torah-series-overview {
  background: linear-gradient(165deg, var(--olive-900) 0%, var(--olive-800) 40%, var(--olive-700) 100%) !important;
  padding: 80px 0 72px !important;
  position: relative;
  overflow: hidden;
  color: #fff !important;
}
.cm-page-torah-index .torah-series-overview::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 30%, rgba(200,164,78,0.1) 0%, transparent 50%);
  pointer-events: none;
}
.cm-page-torah-index .torah-series-overview .container {
  position: relative;
  z-index: 2;
}
.cm-page-torah-index .torah-series-overview__hero-copy {
  position: relative;
}
.cm-page-torah-index .torah-series-overview__watermark {
  position: absolute;
  right: -24px;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Frank Ruhl Libre', serif;
  font-size: clamp(180px, 22vw, 320px);
  line-height: 1;
  color: rgba(255,255,255,0.03);
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.cm-page-torah-index .torah-series-overview__hero-copy > *:not(.torah-series-overview__watermark) {
  position: relative;
  z-index: 1;
}

/* Hero layout: two columns */
.cm-page-torah-index .torah-series-overview__hero {
  display: grid !important;
  grid-template-columns: 1fr 400px !important;
  gap: 60px !important;
  align-items: center !important;
}

/* Hero text */
.cm-page-torah-index .torah-series-overview__eyebrow {
  font-size: 12px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 3px !important;
  color: var(--gold-400) !important;
  margin-bottom: 10px !important;
  display: block !important;
}
.cm-page-torah-index .torah-series-overview__eyebrow-note {
  margin: 0 0 18px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  text-transform: uppercase !important;
  letter-spacing: 2.4px !important;
  color: rgba(255,255,255,0.48) !important;
}
.cm-page-torah-index .torah-series-overview__title {
  font-size: clamp(36px, 5vw, 58px) !important;
  font-weight: 600 !important;
  line-height: 1.08 !important;
  margin-bottom: 20px !important;
  color: #fff !important;
}
.cm-page-torah-index .torah-series-overview__title em {
  font-style: italic;
  color: var(--gold-300);
}
.cm-page-torah-index .torah-series-overview__lead {
  font-size: 18px !important;
  line-height: 1.7 !important;
  color: rgba(255,255,255,0.7) !important;
  max-width: 520px !important;
  margin-bottom: 32px !important;
}

/* Hero actions */
.cm-page-torah-index .torah-series-overview__actions {
  display: flex !important;
  gap: 12px !important;
}
.cm-page-torah-index .torah-series-overview__actions .btn {
  border-radius: 10px !important;
  font-weight: 700 !important;
  transition: all 0.25s !important;
}
.cm-page-torah-index .torah-series-overview__actions .btn--olive {
  background: var(--gold-500) !important;
  color: var(--olive-900) !important;
  box-shadow: 0 4px 16px rgba(200,164,78,0.25) !important;
  border: none !important;
}
.cm-page-torah-index .torah-series-overview__actions .btn--olive:hover {
  background: var(--gold-400) !important;
  transform: translateY(-1px) !important;
}
.cm-page-torah-index .torah-series-overview__actions .btn--outline-dark {
  background: transparent !important;
  color: rgba(255,255,255,0.8) !important;
  border: 1px solid rgba(255,255,255,0.2) !important;
}
.cm-page-torah-index .torah-series-overview__actions .btn--outline-dark:hover {
  background: rgba(255,255,255,0.08) !important;
  color: #fff !important;
}

/* Hero Stats Card (replaces spotlight) */
.cm-page-torah-index .torah-series-overview__stats-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-xl);
  padding: 32px;
  backdrop-filter: blur(8px);
}
.cm-page-torah-index .torah-series-overview__stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
.cm-page-torah-index .torah-series-overview__stat {
  text-align: center;
}
.cm-page-torah-index .torah-series-overview__stat-num {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 36px;
  font-weight: 700;
  color: var(--gold-400);
  line-height: 1.1;
  display: block;
}
.cm-page-torah-index .torah-series-overview__stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.4);
  margin-top: 4px;
  display: block;
}
.cm-page-torah-index .torah-series-overview__hero-quote {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 17px;
  font-style: italic;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin: 0;
}

/* ── SECTION 2: FIVE BOOKS — Separate warm section ── */
.cm-page-torah-index .torah-books-section {
  background: #faf8f4;
  padding: 72px 0 40px;
  border-bottom: 0;
}
.cm-page-torah-index .torah-books-section .torah-series-overview__eyebrow {
  color: var(--olive-600) !important;
  display: block;
  margin-bottom: 8px;
}
.cm-page-torah-index .torah-books-section .torah-series-overview__section-title {
  color: #1a1a1a !important;
}
.cm-page-torah-index .torah-books-section .torah-series-overview__section-sub {
  color: #6e6e6e;
  margin: 0 auto;
  max-width: 560px;
  display: block;
}

.cm-page-torah-index .torah-series-overview__section-head {
  text-align: center !important;
  margin-bottom: 48px !important;
  display: block !important;
}
.cm-page-torah-index .torah-series-overview__section-head .torah-series-overview__eyebrow {
  color: var(--olive-600) !important;
}
.cm-page-torah-index .torah-series-overview__section-title {
  font-size: 36px !important;
  font-weight: 600 !important;
  color: var(--ink) !important;
  margin-bottom: 10px !important;
}
.cm-page-torah-index .torah-series-overview__section-sub {
  font-size: 16px;
  color: var(--text-muted-rds);
  max-width: 560px;
  margin: 0 auto;
}

/* Book cards grid: 5 columns */
.cm-page-torah-index .torah-books-section .torah-series-overview__grid,
.cm-page-torah-index .torah-series-overview__grid {
  display: grid !important;
  grid-template-columns: repeat(5, 1fr) !important;
  gap: 16px !important;
  align-items: stretch !important;
}
.cm-page-torah-index .torah-books-section .torah-series-overview__card,
.cm-page-torah-index .torah-series-overview__card {
  background: #fff !important;
  border-radius: var(--radius-lg) !important;
  padding: 28px 24px !important;
  box-shadow: var(--shadow-sm) !important;
  transition: all 0.3s !important;
  border: 1px solid transparent !important;
  color: inherit !important;
  text-decoration: none !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
}
.cm-page-torah-index .torah-books-section .torah-series-overview__card:hover,
.cm-page-torah-index .torah-series-overview__card:hover {
  transform: translateY(-4px) !important;
  box-shadow: var(--shadow-lg) !important;
  border-color: var(--olive-100) !important;
}
.cm-page-torah-index .torah-series-overview__card.is-active {
  border-color: var(--olive-600) !important;
  box-shadow: var(--shadow-md), 0 0 0 1px var(--olive-600) !important;
}

/* ── SECTION 3: EXPLORER — Sidebar + Study Card ── */
.cm-page-torah-index .torah-playlist-shell {
  background: #faf8f4 !important;
  padding-top: 0 !important;
  padding-bottom: 80px !important;
}
.cm-page-torah-index .torah-playlist-shell::before {
  display: none !important;
}

/* Explorer layout */
.cm-page-torah-index .cm-torah-layout {
  display: grid !important;
  grid-template-columns: 300px 1fr !important;
  gap: 40px !important;
  min-height: 80vh !important;
}

/* Sidebar sticky */
.cm-page-torah-index .cm-torah-sidebar {
  position: sticky !important;
  top: 80px !important;
  height: calc(100vh - 96px) !important;
  overflow-y: auto !important;
  padding-left: 14px !important;
  padding-right: 14px !important;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overflow-x: hidden !important;
}
.cm-page-torah-index .cm-torah-sidebar::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
  background: transparent !important;
}

.cm-page-torah-index .cm-torah-sidebar__sticky-head {
  position: sticky;
  top: -4px;
  z-index: 4;
  margin: -4px 0 8px;
  padding: 4px 0 8px;
  background: #fff;
}
.cm-page-torah-index .cm-torah-sidebar::-webkit-scrollbar-track {
  display: none !important;
  background: transparent !important;
}
.cm-page-torah-index .cm-torah-sidebar::-webkit-scrollbar-thumb {
  display: none !important;
  background: transparent !important;
}
.cm-page-torah-index .cm-torah-sidebar__progress,
.cm-page-torah-index .cm-torah-book-header,
.cm-page-torah-index .cm-torah-portions-list,
.cm-page-torah-index .cm-torah-portion-item {
  box-sizing: border-box;
}
.cm-page-torah-index .cm-torah-sidebar__progress {
  background: var(--olive-50);
  border: 1px solid var(--olive-100);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 20px;
  position: relative;
  top: auto;
  z-index: auto;
  flex: 0 0 auto;
}
.cm-page-torah-index .cm-torah-sidebar__progress-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted-rds);
}
.cm-page-torah-index .cm-torah-sidebar__progress-count {
  color: var(--olive-700);
}
.cm-page-torah-index .cm-torah-sidebar__progress-bar {
  height: 4px;
  background: var(--border-rds);
  border-radius: 999px;
  margin-top: 12px;
  overflow: hidden;
}
.cm-page-torah-index .cm-torah-sidebar__progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--olive-700), var(--gold-500));
}
.cm-page-torah-index .cm-torah-sidebar__progress-note {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted-rds);
}

/* ── STUDY CARD — Stacked: video on top, info below ── */
.cm-page-torah-index .torah-player__study-grid {
  display: block !important;
  grid-template-columns: unset !important;
  background: #fff !important;
  border: 1px solid #e6e1d8 !important;
  border-radius: var(--radius-xl) !important;
  overflow: hidden !important;
  box-shadow: 0 2px 16px rgba(0,0,0,.06) !important;
  margin-bottom: 32px !important;
  outline: none !important;
  isolation: isolate !important;
}

/* Video: full-width 16:9 on top */
.cm-page-torah-index .torah-player__video-link {
  display: block !important;
  position: relative !important;
  width: 100% !important;
  min-height: 0 !important;
  height: auto !important;
  border-radius: 0 !important;
  grid-column: unset !important;
  grid-row: unset !important;
  align-self: unset !important;
  overflow: hidden !important;
}
.cm-page-torah-index .torah-player__video {
  border-radius: 0 !important;
  box-shadow: none !important;
  height: auto !important;
}
/* Re-enable 16:9 aspect ratio trick */
.cm-page-torah-index .torah-player__video::before {
  display: block !important;
  content: '' !important;
  padding-top: 56.25% !important;
}
/* Thumbnail fills the 16:9 box */
.cm-page-torah-index .torah-player__video-link img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  background: linear-gradient(135deg, var(--olive-800), var(--olive-600)) !important;
}

/* Overlay gradient */
.cm-page-torah-index .torah-player__video-shade {
  background: linear-gradient(to top,
    rgba(20,36,16,0.72) 0%,
    rgba(20,36,16,0.10) 50%,
    transparent 100%) !important;
}

/* Duration badge — bottom-right */
.cm-page-torah-index .torah-player__video-duration {
  top: auto !important;
  bottom: 14px !important;
  right: 16px !important;
  background: rgba(0,0,0,0.6) !important;
  color: #fff !important;
  padding: 4px 10px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

/* CTA — bottom-centre */
.cm-page-torah-index .torah-player__video-cta {
  top: auto !important;
  bottom: 18px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  white-space: nowrap !important;
  font-size: 12px !important;
}

/* ── Study Info Grid (below video) ── */
.cm-page-torah-index .torah-player__info-grid {
  display: grid !important;
  grid-template-columns: 1fr auto !important;
  gap: 0 40px !important;
  padding: 28px 32px !important;
  width: 100% !important;
  height: auto !important;
  min-height: unset !important;
  grid-column: unset !important;
  grid-row: unset !important;
}
.cm-page-torah-index .torah-player__content {
  margin-top: 0 !important;
  gap: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* Left column: title, question, main point */
.cm-page-torah-index .torah-player__info-left {
  grid-column: 1 !important;
}
.cm-page-torah-index .torah-player__info-left .torah-player__eyebrow {
  font-size: 15px !important;
  color: var(--olive-600) !important;
  font-weight: 600 !important;
  margin-bottom: 2px !important;
}
.cm-page-torah-index .torah-player__info-left .torah-player__portion {
  font-size: clamp(28px, 3.6vw, 36px) !important;
  font-weight: 700 !important;
  color: var(--ink) !important;
  line-height: 1.1 !important;
  margin-bottom: 14px !important;
}
.cm-page-torah-index .torah-player__question {
  background: var(--bg-warm);
  border-left: 3px solid var(--gold-500);
  padding: 12px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 14px;
}
.cm-page-torah-index .torah-player__question p {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 17px;
  font-style: italic;
  color: var(--olive-800);
  margin: 0;
}
.cm-page-torah-index .torah-player__info-left .torah-player__context-label {
  font-size: 10px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 1.5px !important;
  color: var(--text-light-rds) !important;
  margin-bottom: 6px !important;
}
.cm-page-torah-index .torah-player__main-point {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-muted-rds);
}

/* Right column: Hebrew badge + CTAs */
.cm-page-torah-index .torah-player__info-right {
  grid-column: 2 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch;
  justify-content: flex-start;
  gap: 16px;
  min-width: 220px;
}
.cm-page-torah-index .torah-player__hebrew-block {
  text-align: center;
  background: var(--gold-50);
  border: 1px solid var(--gold-100);
  border-radius: var(--radius-md);
  padding: 16px 24px;
  width: 100%;
}
.cm-page-torah-index .torah-player__hebrew-badge {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 32px;
  color: var(--gold-500);
  display: block;
  margin-bottom: 4px;
  line-height: 1.2;
}
.cm-page-torah-index .torah-player__hebrew-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-light-rds);
  margin-bottom: 2px;
  display: block;
}
.cm-page-torah-index .torah-player__pronunciation {
  font-size: 13px;
  color: var(--text-muted-rds);
  font-style: italic;
  display: block;
}
.cm-page-torah-index .torah-player__cta-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
.cm-page-torah-index .torah-player__btn-study {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--olive-700);
  color: #fff;
  padding: 13px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  width: 100%;
}
.cm-page-torah-index .torah-player__btn-study:hover {
  background: var(--olive-800);
  transform: translateY(-1px);
}

/* ── Expandable section ── */
.cm-page-torah-index .torah-player__expandable {
  border-top: 1px solid #e6e1d8;
  padding: 24px 32px;
  background: transparent;
}
.cm-page-torah-index .torah-player__expand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: default;
}
.cm-page-torah-index .torah-player__expand-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.cm-page-torah-index .torah-player__expand-toggle {
  font-size: 12px;
  color: var(--olive-600);
  font-weight: 500;
}
.cm-page-torah-index .torah-player__expand-content {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-muted-rds);
}
.cm-page-torah-index .torah-player__expand-content .torah-points {
  margin-top: 16px;
  list-style: none;
  padding-left: 0 !important;
}
.cm-page-torah-index .torah-player__expand-content .torah-points li {
  padding: 8px 0 8px 20px;
  position: relative;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted-rds);
  border-bottom: 1px solid var(--bg-warm);
}
.cm-page-torah-index .torah-player__expand-content .torah-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--olive-100);
  border: 2px solid var(--olive-500);
}

/* ── Progress bar — thinner, gradient ── */
.cm-page-torah-index .torah-player__progress-fill {
  background: linear-gradient(90deg, var(--olive-700), var(--gold-500)) !important;
}

/* ── Hide landing block (removed from PHP) ── */
.cm-page-torah-index .torah-player__landing {
  display: none !important;
}

/* ── Hide old highlights block (moved into expandable) ── */
.cm-page-torah-index .torah-player__highlights {
  display: none !important;
}

/* ── Neutralize old grid rules that conflict ── */
.cm-page-torah-index .torah-player__study-grid > .torah-player__video-link,
.cm-page-torah-index .torah-player__study-grid > .torah-player__content,
.cm-page-torah-index .torah-player__study-grid > .torah-player__info-grid {
  grid-column: unset !important;
  grid-row: unset !important;
}

/* ═══════════════════════════════════════════════════════════════
   REDESIGN RESPONSIVE BREAKPOINTS
   (keyed to real desktop/tablet widths)
   ═══════════════════════════════════════════════════════════════ */

/* ── 5-book grid: stay 5-col down to 1100px, then 3-col ── */
@media (max-width: 1100px) {
  .cm-page-torah-index .torah-series-overview__grid,
  .cm-page-torah-index .torah-books-section .torah-series-overview__grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* ── Hero: stay 2-col (text | stats card) down to 960px ── */
@media (max-width: 960px) {
  .cm-page-torah-index .torah-series-overview__hero {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  .cm-page-torah-index .torah-series-overview__watermark {
    opacity: 0.45;
    right: -12px;
    font-size: clamp(120px, 28vw, 220px);
  }
  /* Make the stacked stats card compact when single-column */
  .cm-page-torah-index .torah-series-overview__stats-card {
    padding: 20px 24px !important;
  }
  .cm-page-torah-index .torah-series-overview__stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
    margin-bottom: 16px !important;
  }
  .cm-page-torah-index .torah-series-overview__stat-num {
    font-size: 26px !important;
  }
  .cm-page-torah-index .torah-series-overview {
    padding: 60px 0 52px !important;
  }
}

/* ── Sidebar collapses below 1080px ── */
@media (max-width: 1080px) {
  .cm-page-torah-index .cm-torah-layout {
    grid-template-columns: 1fr !important;
  }
  .cm-page-torah-index .cm-torah-sidebar {
    position: static !important;
    height: auto !important;
    max-height: 420px !important;
    overflow-y: auto !important;
  }
}

/* ── Study card info: stack at 860px ── */
@media (max-width: 860px) {
  .cm-page-torah-index .torah-player__info-grid {
    grid-template-columns: 1fr !important;
    padding: 20px 20px !important;
  }
  .cm-page-torah-index .torah-player__info-right {
    grid-column: 1 !important;
    flex-direction: row !important;
    align-items: stretch !important;
    min-width: 0 !important;
    gap: 12px !important;
  }
  .cm-page-torah-index .torah-player__hebrew-block { flex: 1; }
  .cm-page-torah-index .torah-player__cta-stack { flex: 1; }
}

/* ── Mobile ── */
@media (max-width: 640px) {
  .cm-page-torah-index .torah-series-overview__grid,
  .cm-page-torah-index .torah-books-section .torah-series-overview__grid {
    grid-template-columns: 1fr !important;
  }
  .cm-page-torah-index .torah-series-overview__watermark {
    display: none !important;
  }
  .cm-page-torah-index .torah-player__info-right {
    flex-direction: column !important;
  }
  .cm-page-torah-index .torah-series-overview {
    padding: 40px 0 36px !important;
  }
  .cm-page-torah-index .torah-books-section {
    padding: 40px 0 !important;
  }
  .cm-page-torah-index .torah-player__expandable {
    padding: 0 !important;
  }

  .cm-page-torah-index .torah-player__expand-header {
    padding: 20px 0 !important;
  }

  .cm-page-torah-index .torah-player__expand-content {
    padding: 8px 0 28px !important;
  }
}

/* Final spacing contract for the cleaned Torah explorer. */
.cm-page-torah-index .torah-playlist-shell {
  padding: clamp(54px, 6vw, 84px) 0 clamp(72px, 8vw, 112px) !important;
  border-top: 1px solid #ebe5da !important;
}

.cm-page-torah-index .torah-playlist-shell > .container {
  max-width: 1440px !important;
  padding-inline: clamp(20px, 3vw, 40px) !important;
}

.cm-page-torah-index .cm-torah-layout {
  grid-template-columns: 290px minmax(0, 1fr) !important;
  gap: clamp(32px, 4vw, 56px) !important;
}

.cm-page-torah-index .torah-player__study-grid {
  margin: 0 !important;
  box-shadow: 0 18px 55px rgba(34, 45, 27, .09) !important;
}

.cm-page-torah-index .torah-player__expandable {
  padding: 0 !important;
}

@media (max-width: 1080px) {
  .cm-page-torah-index .cm-torah-layout {
    grid-template-columns: 1fr !important;
  }

  .cm-page-torah-index .cm-torah-sidebar {
    position: static !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
}

/* Final Torah layout contract (kept last to prevent legacy overrides). */
.cm-page-torah-index .torah-playlist-shell {
  padding: clamp(54px, 6vw, 84px) 0 clamp(72px, 8vw, 112px) !important;
  background: #fff !important;
  border-top: 1px solid #ebe5da !important;
}

.cm-page-torah-index .torah-playlist-shell > .container {
  max-width: 1440px !important;
  padding-inline: clamp(20px, 3vw, 40px) !important;
}

.cm-page-torah-index .cm-torah-layout {
  grid-template-columns: 290px minmax(0, 1fr) !important;
  gap: clamp(32px, 4vw, 56px) !important;
}

.cm-page-torah-index .torah-player__study-grid {
  margin: 0 !important;
  box-shadow: 0 18px 55px rgba(34, 45, 27, .09) !important;
}

.cm-page-torah-index .torah-player__expandable {
  padding: 0 !important;
}

@media (max-width: 1080px) {
  .cm-page-torah-index .cm-torah-layout {
    grid-template-columns: 1fr !important;
  }

  .cm-page-torah-index .cm-torah-sidebar {
    position: static !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
}

@media (max-width: 640px) {
  .cm-page-torah-index .torah-playlist-shell > .container {
    padding-inline: 18px !important;
  }
}

/* Torah index polish: one calm, authoritative presentation layer. */
.cm-page-torah-index {
  background: #f7f4ed;
}

.cm-page-torah-index .torah-series-overview {
  padding: clamp(72px, 8vw, 112px) 0 clamp(64px, 7vw, 92px) !important;
  background:
    radial-gradient(circle at 82% 20%, rgba(208, 177, 101, .16), transparent 32%),
    linear-gradient(145deg, #172914 0%, #2d4727 58%, #405d35 100%) !important;
}

.cm-page-torah-index .torah-series-overview__hero {
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 380px) !important;
  gap: clamp(40px, 7vw, 96px) !important;
}

.cm-page-torah-index .torah-series-overview__title {
  max-width: 720px;
  font-size: clamp(46px, 6vw, 76px) !important;
  letter-spacing: -.035em;
}

.cm-page-torah-index .torah-series-overview__lead {
  max-width: 650px !important;
  font-size: clamp(17px, 1.5vw, 20px) !important;
}

.cm-page-torah-index .torah-series-overview__stats-card {
  padding: clamp(26px, 3vw, 38px);
  border-color: rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .075);
  box-shadow: 0 24px 70px rgba(8, 20, 7, .2);
}

.cm-page-torah-index .torah-books-section {
  padding: clamp(64px, 7vw, 88px) 0 !important;
}

.cm-page-torah-index .torah-series-overview__card {
  min-height: 238px;
  border-color: #e8e2d7 !important;
}

.cm-page-torah-index .torah-series-overview__book-num {
  flex: 0 0 auto;
}

.cm-page-torah-index .torah-series-overview__book-summary {
  margin-top: 22px;
  line-height: 1.65;
}

.cm-page-torah-index .torah-playlist-shell {
  padding: clamp(54px, 6vw, 84px) 0 clamp(72px, 8vw, 112px) !important;
  background: #fff !important;
  border-top: 1px solid #ebe5da;
}

.cm-page-torah-index .torah-playlist-shell > .container {
  max-width: 1440px !important;
}

.cm-page-torah-index .cm-torah-layout {
  grid-template-columns: 290px minmax(0, 1fr) !important;
  gap: clamp(32px, 4vw, 56px) !important;
}

.cm-page-torah-index .cm-torah-sidebar {
  padding-right: 12px !important;
  scrollbar-width: thin !important;
  scrollbar-color: #d6d0c4 transparent !important;
}

.cm-page-torah-index .cm-torah-sidebar::-webkit-scrollbar {
  display: block !important;
  width: 5px !important;
}

.cm-page-torah-index .cm-torah-sidebar::-webkit-scrollbar-thumb {
  display: block !important;
  border-radius: 99px;
  background: #d6d0c4 !important;
}

.cm-page-torah-index .cm-torah-sidebar__progress {
  border: 1px solid #e4eadf !important;
}

.cm-page-torah-index .torah-player__study-grid {
  border-color: #e7e1d7 !important;
  box-shadow: 0 18px 55px rgba(34, 45, 27, .09) !important;
}

.cm-page-torah-index .torah-player__video-link:focus-visible,
.cm-page-torah-index .torah-series-overview__card:focus-visible,
.cm-page-torah-index .cm-torah-book-header:focus-visible,
.cm-page-torah-index .cm-torah-portion-item:focus-visible,
.cm-page-torah-index .torah-player__expand-header:focus-visible {
  outline: 3px solid rgba(200, 164, 78, .72) !important;
  outline-offset: 3px;
}

.cm-page-torah-index .torah-player__info-grid {
  gap: 32px 52px !important;
  padding: clamp(26px, 3.5vw, 44px) !important;
}

.cm-page-torah-index .torah-player__expandable {
  padding: 0 !important;
}

.cm-page-torah-index .torah-player__expand-header {
  width: 100%;
  padding: 22px clamp(26px, 3.5vw, 44px);
  border: 0;
  background: #fbfaf7;
  text-align: left;
}

.cm-page-torah-index .torah-player__expand-header:hover {
  background: #f6f3ec;
}

.cm-page-torah-index .torah-player__expand-content {
  margin: 0;
  padding: 26px clamp(26px, 3.5vw, 44px) 34px;
}

@media (max-width: 1080px) {
  .cm-page-torah-index .cm-torah-layout {
    grid-template-columns: 1fr !important;
  }

  .cm-page-torah-index .cm-torah-sidebar {
    max-height: none !important;
    padding-right: 0 !important;
    overflow: visible !important;
  }
}

@media (max-width: 960px) {
  .cm-page-torah-index .torah-series-overview__hero {
    grid-template-columns: 1fr !important;
  }

  .cm-page-torah-index .torah-series-overview__stats-card {
    max-width: 560px;
  }
}

@media (max-width: 640px) {
  .cm-page-torah-index .torah-series-overview__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .cm-page-torah-index .torah-series-overview__actions .btn {
    justify-content: center;
    width: 100%;
  }

  .cm-page-torah-index .torah-series-overview__card {
    min-height: 0;
  }

  .cm-page-torah-index .torah-player__info-grid {
    padding: 24px 20px !important;
  }

  .cm-page-torah-index .torah-player__expand-header {
    padding: 20px;
  }

  .cm-page-torah-index .torah-player__expand-content {
    padding: 22px 20px 28px;
  }
}

@media (min-width: 1200px) {
  .cm-page-torah-index .torah-books-section {
    padding-bottom: 8px !important;
  }

  .cm-page-torah-index .torah-playlist-shell {
    padding-top: 0 !important;
    padding-bottom: 56px !important;
  }

  .cm-page-torah-index .torah-playlist-shell > .container {
    max-width: 1800px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .cm-page-torah-index .cm-torah-layout {
    grid-template-columns: 290px minmax(0, 1fr) !important;
    gap: 20px !important;
  }

  .cm-page-torah-index .cm-torah-sidebar {
    top: calc(var(--nav-h) + 4px) !important;
    height: calc(100vh - var(--nav-h) - 8px) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .admin-bar.cm-page-torah-index .cm-torah-sidebar {
    top: calc(var(--nav-h) + 36px) !important;
    height: calc(100vh - var(--nav-h) - 40px) !important;
  }

  .cm-page-torah-index .cm-torah-body {
    padding: 0 !important;
  }

  .cm-page-torah-index .torah-player,
  .cm-page-torah-index .torah-player__study-grid {
    margin-top: 0 !important;
  }
}


/* Match the sermon library's centered desktop proportion. */
@media (min-width: 1081px) {
  body.cm-page-torah-index .torah-playlist-shell > .container {
    width: min(100%, 1240px) !important;
    max-width: 1240px !important;
    margin-inline: auto !important;
    padding-inline: 0 !important;
  }

  body.cm-page-torah-index .cm-torah-layout {
    grid-template-columns: 236px minmax(0, 1fr) !important;
    gap: 36px !important;
    width: 100% !important;
    max-width: 1240px !important;
    margin-inline: auto !important;
  }
}

@media (min-width: 1081px) and (max-width: 1295px) {
  body.cm-page-torah-index .torah-playlist-shell > .container {
    width: 100% !important;
    padding-inline: 28px !important;
  }
}

/* Tighter rhythm for the always-open study overview. */
.cm-page-torah-index .torah-player__expand-content > p {
  margin: 0 !important;
}

.cm-page-torah-index .torah-player__expand-content .torah-points {
  gap: 0 !important;
  margin-top: 10px !important;
}

.cm-page-torah-index .torah-player__expand-content .torah-points li {
  padding-top: 7px !important;
  padding-bottom: 7px !important;
}

.cm-page-torah-index .torah-player__expand-title {
  font-size: 16px !important;
}

.cm-page-torah-index .torah-player__expand-content,
.cm-page-torah-index .torah-player__expand-content .torah-points li {
  font-size: 16px !important;
}
/* True final desktop Torah index layout */
@media (min-width: 1200px) {
  .cm-page-torah-index .torah-books-section {
    padding-bottom: 0 !important;
  }

  .cm-page-torah-index .torah-playlist-shell {
    background: #fff !important;
    padding: 0 0 56px !important;
  }

  .cm-page-torah-index .torah-playlist-shell > .container {
    max-width: 1800px !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  .cm-page-torah-index .cm-torah-layout {
    display: grid !important;
    grid-template-columns: 300px minmax(0, 1fr) !important;
    gap: 12px !important;
    align-items: start !important;
    max-width: none !important;
  }

  .cm-page-torah-index .cm-torah-sidebar {
    position: sticky !important;
    top: var(--nav-h) !important;
    left: auto !important;
    width: auto !important;
    height: calc(100vh - var(--nav-h)) !important;
    margin: 0 !important;
    padding: 0 2px 0 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-right: 0 !important;
    box-shadow: none !important;
    z-index: auto !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  .admin-bar.cm-page-torah-index .cm-torah-sidebar {
    top: calc(var(--nav-h) + 32px) !important;
    height: calc(100vh - var(--nav-h) - 32px) !important;
  }

  .cm-page-torah-index .cm-torah-body {
    margin-left: 0 !important;
    padding: 0 !important;
    min-width: 0 !important;
  }

  .cm-page-torah-index .torah-player,
  .cm-page-torah-index .torah-player__study-grid {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
  }
}

/* Last-word desktop Torah index layout */
@media (min-width: 1200px) {
  .cm-page-torah-index .torah-books-section {
    background: #faf8f4 !important;
    padding-bottom: 32px !important;
    border-bottom: 0 !important;
  }

  .cm-page-torah-index .torah-playlist-shell {
    background: #faf8f4 !important;
    padding: 0 0 56px !important;
  }

  .cm-page-torah-index .torah-playlist-shell > .container {
    max-width: 1800px !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  .cm-page-torah-index .cm-torah-layout {
    display: grid !important;
    grid-template-columns: 300px minmax(0, 1fr) !important;
    gap: 12px !important;
    align-items: start !important;
    max-width: none !important;
  }

  .cm-page-torah-index .cm-torah-sidebar {
    position: sticky !important;
    top: var(--nav-h) !important;
    left: auto !important;
    width: auto !important;
    height: calc(100vh - var(--nav-h)) !important;
    margin: 0 !important;
    padding: 0 2px 0 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-right: 0 !important;
    box-shadow: none !important;
    z-index: auto !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  .admin-bar.cm-page-torah-index .cm-torah-sidebar {
    top: calc(var(--nav-h) + 32px) !important;
    height: calc(100vh - var(--nav-h) - 32px) !important;
  }

  .cm-page-torah-index .cm-torah-body {
    margin-left: 0 !important;
    padding: 0 !important;
    min-width: 0 !important;
  }

  .cm-page-torah-index .torah-player,
  .cm-page-torah-index .torah-player__study-grid {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
  }
}

/* Torah detail sidebar refresh: ministries-inspired nav while keeping layout */
.cm-page-torah-detail {
  background:
    radial-gradient(circle at 12% 12%, rgba(109, 142, 44, 0.14) 0%, transparent 24%),
    radial-gradient(circle at 88% 8%, rgba(201, 173, 91, 0.09) 0%, transparent 18%),
    linear-gradient(180deg, #f4efe4 0%, #fbf8f2 48%, #f7f1e7 100%) !important;
}

.cm-page-torah-detail .torah-watch-shell {
  position: relative;
  overflow: hidden;
  padding-top: calc(var(--nav-h) + 8px) !important;
}

.cm-page-torah-detail .torah-watch-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(42, 69, 27, 0.06) 0, rgba(42, 69, 27, 0.06) clamp(430px, 33vw, 540px), transparent clamp(430px, 33vw, 540px)),
    linear-gradient(180deg, rgba(255,255,255,0.3), transparent 30%);
}

.cm-page-torah-detail .torah-watch-shell .container {
  position: relative;
  z-index: 1;
}

.cm-page-torah-detail .torah-watch__playlist-card {
  background: linear-gradient(180deg, #f7f1e5 0%, #f4eee2 100%) !important;
  border: 1px solid rgba(53, 79, 36, 0.08) !important;
  box-shadow: 0 18px 42px rgba(53, 79, 36, 0.08) !important;
  max-height: calc(100vh - var(--nav-h) - 20px);
  padding: 18px 0 0 !important;
  overflow: hidden;
}

.cm-page-torah-detail .torah-watch__tracklist {
  background: transparent !important;
  margin-top: 0 !important;
  padding: 0 !important;
  gap: 0 !important;
}

.cm-page-torah-detail .torah-watch__sidebar-progress,
.cm-page-torah-detail .torah-watch__playlist-head,
.cm-page-torah-detail .torah-watch__sidebar-cta {
  margin-left: 18px;
  margin-right: 18px;
}

.cm-page-torah-detail .torah-watch__sidebar-progress {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255,255,255,0.58);
  border: 1px solid rgba(53, 79, 36, 0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.45);
  margin-bottom: 16px;
}

.cm-page-torah-detail .torah-watch__sidebar-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.cm-page-torah-detail .torah-watch__sidebar-progress-head strong {
  font-family: var(--font-head);
  font-size: 28px;
  line-height: 1;
  color: var(--navy);
}

.cm-page-torah-detail .torah-watch__sidebar-progress-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(53, 79, 36, 0.1);
  overflow: hidden;
}

.cm-page-torah-detail .torah-watch__sidebar-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7b9628 0%, #234d1f 100%);
}

.cm-page-torah-detail .torah-watch__sidebar-progress p {
  margin: 14px 0 0;
  color: var(--body);
  line-height: 1.6;
}

.cm-page-torah-detail .torah-watch__sidebar-label {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: #6b7c55;
}

.cm-page-torah-detail .torah-watch__playlist-head {
  display: grid;
  gap: 8px;
  padding: 0 0 16px;
}

.cm-page-torah-detail .torah-watch__playlist-filters {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 0 !important;
  width: 100%;
  margin-top: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border-bottom: 1px solid rgba(53, 79, 36, 0.08);
}

.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter {
  display: grid !important;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 82px;
  padding: 14px 18px !important;
  border-radius: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(53, 79, 36, 0.08) !important;
  background: transparent !important;
  box-sizing: border-box;
  text-align: left !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  white-space: normal !important;
}

.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter:hover,
.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter:focus {
  background: rgba(255,255,255,0.4) !important;
  transform: none !important;
}

.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter.is-active {
  background: #1f4918 !important;
}

.cm-page-torah-detail .torah-filter__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(122, 150, 40, 0.12);
  color: #7b9628;
  font-family: var(--font-head);
  font-size: 20px;
  line-height: 1;
}

.cm-page-torah-detail .torah-filter__content {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.cm-page-torah-detail .torah-filter__title {
  font-family: var(--font-head);
  font-size: 19px;
  line-height: 1.1;
  color: #55615b;
}

.cm-page-torah-detail .torah-filter__meta {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  color: #7a8073;
}

.cm-page-torah-detail .torah-filter__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(53, 79, 36, 0.06);
  color: #89917f;
  font-size: 14px;
  font-weight: 700;
}

.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter.is-active .torah-filter__icon {
  background: rgba(255,255,255,0.12);
  color: #eef4dc;
}

.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter.is-active .torah-filter__title,
.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter.is-active .torah-filter__meta,
.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter.is-active .torah-filter__count {
  color: #fff;
}

.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter.is-active .torah-filter__count {
  background: rgba(255,255,255,0.1);
}

.cm-page-torah-detail .torah-watch__playlist-card .torah-track,
.cm-page-torah-detail .torah-watch__playlist-card .torah-track:visited {
  min-height: 78px;
  padding: 14px 18px !important;
  border-radius: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(53, 79, 36, 0.08) !important;
  box-shadow: none !important;
  background: transparent !important;
}

.cm-page-torah-detail .torah-watch__playlist-card .torah-track:hover,
.cm-page-torah-detail .torah-watch__playlist-card .torah-track:focus-visible {
  background: rgba(255,255,255,0.45) !important;
  transform: none !important;
}

.cm-page-torah-detail .torah-watch__playlist-card .torah-track.is-active,
.cm-page-torah-detail .torah-watch__playlist-card .torah-track.is-active:visited,
.cm-page-torah-detail .torah-watch__playlist-card .torah-track.is-active:hover,
.cm-page-torah-detail .torah-watch__playlist-card .torah-track.is-active:focus-visible {
  background: rgba(44, 80, 30, 0.1) !important;
  box-shadow: inset 4px 0 0 #234d1f !important;
}

.cm-page-torah-detail .torah-watch__playlist-card .torah-track__index {
  background: rgba(122, 150, 40, 0.12) !important;
  color: #7b9628 !important;
}

.cm-page-torah-detail .torah-watch__playlist-card .torah-track__topline strong {
  color: #55615b !important;
}

.cm-page-torah-detail .torah-watch__playlist-card .torah-track__body p {
  color: #7a8073 !important;
}

.cm-page-torah-detail .torah-watch__playlist-card .torah-track__duration {
  background: rgba(53, 79, 36, 0.06) !important;
  color: #7a8073 !important;
}

.cm-page-torah-detail .torah-watch__playlist-card .torah-track.is-active .torah-track__index {
  background: #1f4918 !important;
  color: #eef4dc !important;
}

.cm-page-torah-detail .torah-watch__playlist-card .torah-track.is-active .torah-track__topline strong {
  color: #234d1f !important;
}

.cm-page-torah-detail .torah-watch__playlist-card .torah-track.is-active .torah-track__body p,
.cm-page-torah-detail .torah-watch__playlist-card .torah-track.is-active .torah-track__duration {
  color: #5c694d !important;
}

.cm-page-torah-detail .torah-watch__sidebar-cta {
  margin-top: 18px;
  margin-bottom: 18px;
  padding: 24px 22px;
  border-radius: 28px;
  background: linear-gradient(180deg, #234d1f 0%, #183a14 100%);
  text-align: center;
}

.cm-page-torah-detail .torah-watch__sidebar-cta p {
  margin: 0 0 18px;
  color: rgba(255,255,255,0.82);
  font-size: 17px;
  line-height: 1.6;
}

.cm-page-torah-detail .torah-watch__sidebar-cta .btn {
  min-width: 200px;
}

@media (max-width: 1024px) {
  .cm-page-torah-detail .torah-watch__layout {
    grid-template-columns: 1fr !important;
  }

  .cm-page-torah-detail .torah-watch__playlist-card {
    position: static;
    max-height: none;
  }

  .cm-page-torah-detail .torah-watch__tracklist {
    overflow: visible;
  }
}

/* Tighten the visible gap under the fixed header on the Torah index featured-player view */
.cm-page-torah-index .torah-playlist-shell {
  padding-top: 12px !important;
}

@media (max-width: 782px) {
  .cm-page-torah-index .torah-playlist-shell {
    padding-top: 12px !important;
  }
}

/* ChatGPT-style pinned left rail for the Torah index page */
@media (min-width: 1200px) {
  .cm-page-torah-index .torah-playlist-shell {
    padding: 12px 0 80px !important;
  }

  .cm-page-torah-index .torah-playlist-shell > .container {
    max-width: none !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
  }

  .cm-page-torah-index .cm-torah-layout {
    display: block !important;
    max-width: none !important;
  }

  .cm-page-torah-index .cm-torah-sidebar {
    position: fixed !important;
    top: var(--nav-h) !important;
    left: 0 !important;
    z-index: 20 !important;
    width: 320px !important;
    height: calc(100vh - var(--nav-h)) !important;
    padding: 18px 18px 28px !important;
    background: #f7f2e8 !important;
    border-right: 1px solid rgba(46, 67, 33, 0.08) !important;
    box-shadow: 10px 0 30px rgba(34, 50, 25, 0.06) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  .admin-bar.cm-page-torah-index .cm-torah-sidebar {
    top: calc(var(--nav-h) + 32px) !important;
    height: calc(100vh - var(--nav-h) - 32px) !important;
  }

  .cm-page-torah-index .cm-torah-body {
    margin-left: 344px !important;
    padding-right: 24px !important;
  }

  .cm-page-torah-index .torah-player {
    max-width: 1240px !important;
  }
}

/* Final desktop cleanup for Torah index: stable left nav + right content */
@media (min-width: 1200px) {
  .cm-page-torah-index .torah-playlist-shell {
    background: #fff !important;
    padding: 12px 0 72px !important;
  }

  .cm-page-torah-index .torah-playlist-shell > .container {
    max-width: 1800px !important;
    padding-left: 32px !important;
    padding-right: 32px !important;
  }

  .cm-page-torah-index .cm-torah-layout {
    display: grid !important;
    grid-template-columns: 300px minmax(0, 1fr) !important;
    gap: 36px !important;
    align-items: start !important;
    max-width: none !important;
  }

  .cm-page-torah-index .cm-torah-sidebar {
    position: sticky !important;
    top: calc(var(--nav-h) + 16px) !important;
    left: auto !important;
    z-index: auto !important;
    width: auto !important;
    height: calc(100vh - var(--nav-h) - 32px) !important;
    margin: 0 !important;
    padding: 0 2px 0 0 !important;
    background: transparent !important;
    border-right: 0 !important;
    box-shadow: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  .admin-bar.cm-page-torah-index .cm-torah-sidebar {
    top: calc(var(--nav-h) + 32px + 16px) !important;
    height: calc(100vh - var(--nav-h) - 32px - 32px) !important;
  }

  .cm-page-torah-index .cm-torah-body {
    margin-left: 0 !important;
    padding: 0 !important;
    min-width: 0 !important;
  }

  .cm-page-torah-index .torah-player {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
  }

  .cm-page-torah-index .torah-player__study-grid {
    width: 100% !important;
  }
}

/* Final cleanup: authoritative Torah index explorer styles */
.cm-page-torah-index .torah-explorer-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 460px);
  gap: 32px;
  align-items: end;
  margin: 0 0 38px;
  padding: 0 0 28px;
  border-bottom: 1px solid #ebe5da;
}

.cm-page-torah-index .torah-explorer-head__eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--olive-600);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2.4px;
  text-transform: uppercase;
}

.cm-page-torah-index .torah-explorer-head__title {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-head);
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1.08;
  letter-spacing: -.02em;
}

.cm-page-torah-index .torah-explorer-head__copy {
  max-width: 440px;
  margin: 0;
  color: var(--text-muted-rds);
  font-size: 15px;
  line-height: 1.7;
}

.cm-page-torah-index .torah-books-section .torah-series-overview__grid,
.cm-page-torah-index .torah-series-overview__grid {
  grid-template-columns: repeat(5, 1fr) !important;
  gap: 16px !important;
}

.cm-page-torah-index .torah-books-section .torah-series-overview__card,
.cm-page-torah-index .torah-series-overview__card {
  background: #fff !important;
  border-radius: var(--radius-lg) !important;
  border: 1px solid transparent !important;
  box-shadow: var(--shadow-sm) !important;
  padding: 28px 24px !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease !important;
}

.cm-page-torah-index .torah-books-section .torah-series-overview__card:hover,
.cm-page-torah-index .torah-series-overview__card:hover {
  transform: translateY(-4px) !important;
  box-shadow: var(--shadow-lg) !important;
  border-color: var(--olive-100) !important;
}

.cm-page-torah-index .torah-series-overview__card.is-active {
  border-color: var(--olive-600) !important;
  box-shadow: var(--shadow-md), 0 0 0 1px var(--olive-600) !important;
}

.cm-page-torah-index .torah-playlist-shell {
  background: #fff !important;
  padding: clamp(42px, 4vw, 64px) 0 clamp(72px, 7vw, 104px) !important;
  border-top: 0 !important;
}

.cm-page-torah-index .torah-playlist-shell > .container {
  width: 100% !important;
  max-width: none !important;
  padding-inline: clamp(24px, 3vw, 64px) !important;
}

.cm-page-torah-index .torah-playlist-shell::before,
.cm-page-torah-index .torah-playlist-shell::after {
  display: none !important;
}

.cm-page-torah-index .cm-torah-layout {
  display: grid !important;
  grid-template-columns: 280px minmax(0, 1fr) !important;
  gap: clamp(38px, 3.4vw, 64px) !important;
  align-items: start !important;
  min-height: 0 !important;
  max-width: none !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.cm-page-torah-index .cm-torah-layout::before,
.cm-page-torah-index .cm-torah-layout::after {
  display: none !important;
}

.cm-page-torah-index .cm-torah-sidebar,
.cm-page-torah-index .cm-torah-body,
.cm-page-torah-index .torah-player {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.cm-page-torah-index .cm-torah-sidebar {
  position: sticky !important;
  top: 80px !important;
  align-self: start !important;
  height: auto !important;
  max-height: calc(100vh - 104px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 4px 30px 4px 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-right: 1px solid #dfdfd5 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  scrollbar-width: thin !important;
  scrollbar-color: #d8d1c4 transparent !important;
  -ms-overflow-style: none !important;
}

.cm-page-torah-index .cm-torah-sidebar::-webkit-scrollbar {
  width: 5px !important;
  height: 0 !important;
  display: block !important;
}

.cm-page-torah-index .cm-torah-body {
  padding: 0 !important;
  width: 100% !important;
  max-width: none !important;
  justify-self: stretch !important;
}

.cm-page-torah-index .cm-torah-sidebar__progress {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 0 20px !important;
  margin: 0 0 22px !important;
  border-bottom: 1px solid #dfdbd1 !important;
  position: relative !important;
}

.cm-page-torah-index .cm-torah-sidebar__progress-label {
  display: flex !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin-bottom: 10px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  color: var(--text-muted-rds) !important;
}

.cm-page-torah-index .cm-torah-sidebar__progress-count {
  color: var(--olive-700) !important;
}

.cm-page-torah-index .cm-torah-sidebar__progress-bar {
  height: 4px !important;
  margin-top: 0 !important;
  background: var(--border-rds) !important;
  border-radius: 2px !important;
  overflow: hidden !important;
}

.cm-page-torah-index .cm-torah-sidebar__progress-fill {
  background: linear-gradient(90deg, var(--olive-600), var(--gold-500)) !important;
}

.cm-page-torah-index .cm-torah-sidebar__progress-note {
  display: none !important;
}

.cm-page-torah-index .cm-sidebar__group-label {
  margin: 0 0 8px !important;
  padding: 0 8px !important;
  color: var(--olive-600) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
}

.cm-page-torah-index .cm-torah-book-group {
  margin: 0 0 4px !important;
  border: none !important;
  background: transparent !important;
}

.cm-page-torah-index .cm-torah-book-filters {
  display: grid !important;
  gap: 4px !important;
  margin: 0 0 14px !important;
}

.cm-page-torah-index .cm-torah-book-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  min-height: 44px !important;
  padding: 10px 12px !important;
  border: none !important;
  border-radius: 7px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #465044 !important;
  font-size: 14px !important;
  font-weight: 650 !important;
  transition: background 0.2s ease, color 0.2s ease !important;
}

.cm-page-torah-index .cm-torah-book-header:hover {
  background: #f4f6f1 !important;
  color: var(--olive-800) !important;
}

.cm-page-torah-index .cm-torah-book-header[aria-expanded="true"],
.cm-page-torah-index .cm-torah-book-header.is-active {
  background: rgba(76, 105, 61, .09) !important;
  color: var(--olive-700) !important;
}

.cm-page-torah-index .cm-torah-sidebar__nav-left {
  gap: 10px !important;
}

.cm-page-torah-index .cm-torah-book-chevron {
  color: var(--text-light-rds) !important;
}

.cm-page-torah-index .cm-torah-book-header[aria-expanded="true"] .cm-torah-book-chevron {
  color: var(--olive-700) !important;
}

.cm-page-torah-index .cm-torah-sidebar__nav-badge {
  min-width: 0 !important;
  padding: 2px 10px !important;
  border-radius: 10px !important;
  background: #f0f1ed !important;
  color: #778073 !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  box-shadow: none !important;
}

.cm-page-torah-index .cm-torah-book-header[aria-expanded="true"] .cm-torah-sidebar__nav-badge,
.cm-page-torah-index .cm-torah-book-header.is-active .cm-torah-sidebar__nav-badge {
  background: rgba(107, 140, 42, 0.16) !important;
  color: var(--olive-700) !important;
}

.cm-page-torah-index .cm-torah-portions-list {
  --torah-sidebar-portion-row-height: 50px;
  padding: 0 0 0 6px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.cm-page-torah-index .cm-torah-portions-list.is-open {
  max-height: calc(var(--torah-sidebar-portion-row-height) * 7) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(70, 80, 68, .28) transparent;
  padding-top: 6px !important;
  padding-bottom: 8px !important;
}

.cm-page-torah-index .cm-torah-portions-list.is-open::-webkit-scrollbar {
  width: 5px;
}

.cm-page-torah-index .cm-torah-portions-list.is-open::-webkit-scrollbar-track {
  background: transparent;
}

.cm-page-torah-index .cm-torah-portions-list.is-open::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(70, 80, 68, .28);
}

.cm-page-torah-index .cm-torah-portion-item {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  height: var(--torah-sidebar-portion-row-height) !important;
  min-height: var(--torah-sidebar-portion-row-height) !important;
  box-sizing: border-box !important;
  padding: 9px 10px !important;
  border: none !important;
  border-left: 2px solid transparent !important;
  border-radius: 6px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text-muted-rds) !important;
  text-decoration: none !important;
}

.cm-page-torah-index .cm-torah-portion-item:hover {
  background: var(--olive-50) !important;
  color: var(--ink) !important;
}

.cm-page-torah-index .cm-torah-portion-item.is-active {
  background: rgba(107, 140, 42, 0.12) !important;
  border-left-color: var(--olive-600) !important;
  color: var(--olive-800) !important;
  box-shadow: none !important;
}

.cm-page-torah-index .cm-torah-portion-item__num,
.cm-page-torah-index .cm-torah-portion-item__dur {
  color: var(--text-light-rds) !important;
  font-variant-numeric: tabular-nums !important;
}

.cm-page-torah-index .cm-torah-portion-item.is-active .cm-torah-portion-item__num,
.cm-page-torah-index .cm-torah-portion-item.is-active .cm-torah-portion-item__name {
  color: var(--olive-700) !important;
  font-weight: 600 !important;
}

.cm-page-torah-index .torah-player {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
}

.cm-page-torah-index .torah-player__study-grid {
  display: block !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  overflow: visible !important;
  box-shadow: none !important;
  margin: 0 0 32px !important;
}

.cm-page-torah-index .torah-player__video-link,
.cm-page-torah-index .torah-player__video {
  display: block !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}

.cm-page-torah-index .torah-player__video-link {
  position: relative !important;
  overflow: hidden !important;
  box-shadow: 0 10px 28px rgba(25, 40, 20, .09) !important;
}

.cm-page-torah-index .torah-player__video::before {
  content: "" !important;
  display: block !important;
  padding-top: 56.25% !important;
}

.cm-page-torah-index .torah-player__video-link img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
}

.cm-page-torah-index .torah-player__video-duration {
  bottom: 14px !important;
  right: 16px !important;
  top: auto !important;
}

.cm-page-torah-index .torah-player__content,
.cm-page-torah-index .torah-player__info-grid {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.cm-page-torah-index .torah-player__info-grid {
  display: grid !important;
  grid-template-columns: 1fr auto !important;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 270px) !important;
  gap: 30px 56px !important;
  padding: 42px 4px 36px !important;
}

.cm-page-torah-index .torah-player__question {
  background: transparent !important;
  border-left: 3px solid var(--gold-500) !important;
  border-radius: 0 !important;
  padding: 4px 0 4px 20px !important;
  margin: 20px 0 24px !important;
}

.cm-page-torah-index .torah-player__question p {
  font-size: clamp(18px, 1.5vw, 22px) !important;
  line-height: 1.55 !important;
}

.cm-page-torah-index .torah-player__hebrew-block {
  padding: 4px 0 20px !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  text-align: left !important;
}

.cm-page-torah-index .torah-player__hebrew-badge {
  margin: 6px 0 18px !important;
  color: #a98635 !important;
}

.cm-page-torah-index .torah-player__btn-study {
  border-radius: 7px !important;
  box-shadow: none !important;
}

.cm-page-torah-index .torah-player__expandable {
  background: transparent !important;
  border-top: 1px solid #dfdbd1 !important;
  padding: 0 !important;
}

.cm-page-torah-index .torah-player__expand-header {
  padding: 22px 4px !important;
  background: transparent !important;
  border-radius: 0 !important;
}

.cm-page-torah-index .torah-player__expand-header:hover {
  background: transparent !important;
  color: var(--olive-700) !important;
}

.cm-page-torah-index .torah-player__expand-content {
  padding: 8px 4px 36px !important;
}

@media (min-width: 1200px) {
  .cm-page-torah-index .torah-playlist-shell {
    background: #fff !important;
    padding: clamp(54px, 6vw, 84px) 0 clamp(72px, 8vw, 112px) !important;
  }

  .cm-page-torah-index .torah-playlist-shell > .container {
    width: 100% !important;
    max-width: none !important;
    padding-left: clamp(32px, 3vw, 64px) !important;
    padding-right: clamp(32px, 3vw, 64px) !important;
  }

  .cm-page-torah-index .cm-torah-layout {
    display: grid !important;
    grid-template-columns: 280px minmax(0, 1fr) !important;
    gap: clamp(38px, 3.4vw, 64px) !important;
    align-items: start !important;
    max-width: none !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    width: auto !important;
    margin-left: 0 !important;
  }

  .cm-page-torah-index .cm-torah-sidebar {
    position: sticky !important;
    top: calc(var(--nav-h) + 16px) !important;
    left: auto !important;
    width: auto !important;
    height: calc(100vh - var(--nav-h) - 32px) !important;
    min-height: calc(100vh - var(--nav-h) - 32px) !important;
    max-height: calc(100vh - var(--nav-h) - 32px) !important;
    margin: 0 !important;
    padding: 4px 30px 4px 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-right: 1px solid #dfdfd5 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    z-index: auto !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  .admin-bar.cm-page-torah-index .cm-torah-sidebar {
    top: calc(var(--nav-h) + 48px) !important;
    height: calc(100vh - var(--nav-h) - 64px) !important;
    min-height: calc(100vh - var(--nav-h) - 64px) !important;
    max-height: calc(100vh - var(--nav-h) - 64px) !important;
  }

  .cm-page-torah-index .cm-torah-body {
    margin-left: 0 !important;
    padding: 0 !important;
    min-width: 0 !important;
  }

  .cm-page-torah-index .torah-player,
  .cm-page-torah-index .torah-player__study-grid {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
  }
}

@media (max-width: 1100px) {
  .cm-page-torah-index .torah-series-overview__grid,
  .cm-page-torah-index .torah-books-section .torah-series-overview__grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

@media (max-width: 1080px) {
  .cm-page-torah-index .torah-explorer-head {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .cm-page-torah-index .cm-torah-layout {
    grid-template-columns: 1fr !important;
  }

  .cm-page-torah-index .cm-torah-sidebar {
    position: static !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    max-height: none !important;
    padding: 0 0 22px !important;
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid #dfdbd1 !important;
  }

  .cm-page-torah-index .cm-torah-sidebar__sticky-head {
    position: static;
    margin-top: 0;
    padding-top: 0;
  }
}

@media (max-width: 860px) {
  .cm-page-torah-index .torah-player__info-grid {
    grid-template-columns: 1fr !important;
    padding: 32px 0 !important;
  }

  .cm-page-torah-index .torah-player__info-right {
    grid-column: 1 !important;
    min-width: 0 !important;
    flex-direction: row !important;
    gap: 12px !important;
  }

  .cm-page-torah-index .torah-player__hebrew-block,
  .cm-page-torah-index .torah-player__cta-stack {
    flex: 1 1 0 !important;
  }
}

@media (max-width: 640px) {
  .cm-page-torah-index .torah-explorer-head {
    margin-bottom: 26px;
    padding-bottom: 22px;
  }

  .cm-page-torah-index .torah-series-overview__grid,
  .cm-page-torah-index .torah-books-section .torah-series-overview__grid {
    grid-template-columns: 1fr !important;
  }

  .cm-page-torah-index .torah-player__info-right {
    flex-direction: column !important;
  }

  .cm-page-torah-index .torah-player__expandable {
    padding: 0 !important;
  }

  .cm-page-torah-index .torah-player__expand-header {
    padding: 20px 0 !important;
  }

  .cm-page-torah-index .torah-player__expand-content {
    padding: 8px 0 28px !important;
  }
}

/* Two-part desktop layout: navigation plus one unified reading column. */
@media (min-width: 1200px) {
  .cm-page-torah-index .torah-player {
    max-width: 1080px !important;
    margin-inline: auto !important;
  }

  .cm-page-torah-index .torah-player__study-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    margin-bottom: 32px !important;
  }

  .cm-page-torah-index .torah-player__video-link {
    align-self: start !important;
    aspect-ratio: 16 / 9 !important;
  }

  .cm-page-torah-index .torah-player__media-column {
    width: min(100%, 680px) !important;
    min-width: 0 !important;
  }

  .cm-page-torah-index .torah-player__info-grid {
    width: 100% !important;
    display: block !important;
    padding: 34px 0 28px !important;
  }

  .cm-page-torah-index .torah-player__question {
    margin: 16px 0 20px !important;
  }

  .cm-page-torah-index .torah-player__question p {
    font-size: clamp(17px, 1.2vw, 20px) !important;
  }

  .cm-page-torah-index .torah-player__info-right {
    display: grid !important;
    grid-template-columns: minmax(220px, .7fr) minmax(280px, 1fr) !important;
    align-items: end !important;
    gap: 28px !important;
    margin-top: 24px !important;
  }

  .cm-page-torah-index .torah-player__hebrew-block {
    padding: 0 !important;
  }

  .cm-page-torah-index .torah-player__hebrew-badge {
    margin: 4px 0 12px !important;
  }

  .cm-page-torah-index .torah-player__expandable {
    width: 100% !important;
    margin-top: 0 !important;
  }
}

/* Keep the study explorer on the same horizontal rails as the site header:
   logo on the left, account/login control on the right. */
body.cm-page-torah-index .torah-playlist-shell > .container {
  width: 100% !important;
  max-width: var(--max) !important;
  margin-inline: auto !important;
  padding-inline: 32px !important;
}

@media (max-width: 480px) {
  body.cm-page-torah-index .torah-playlist-shell > .container {
    padding-inline: 12px !important;
  }
}

/* Compact desktop study feature: media and key details share the first row. */
@media (min-width: 1200px) {
  .cm-page-torah-index .torah-player {
    max-width: none !important;
  }

  .cm-page-torah-index .torah-player__study-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1.35fr) minmax(340px, .85fr) !important;
    align-items: start !important;
    column-gap: clamp(32px, 3vw, 52px) !important;
    row-gap: 16px !important;
    margin-bottom: 20px !important;
  }

  .cm-page-torah-index .torah-player__media-column {
    grid-column: 1 !important;
    width: 100% !important;
  }

  .cm-page-torah-index .torah-player__video-link {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
  }

  .cm-page-torah-index .torah-player__info-grid {
    grid-column: 2 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 16px !important;
    min-height: 100% !important;
    padding: 6px 0 !important;
  }

  .cm-page-torah-index .torah-player__info-left .torah-player__portion {
    font-size: clamp(34px, 3vw, 48px) !important;
    margin-bottom: 12px !important;
  }

  .cm-page-torah-index .torah-player__question {
    margin: 14px 0 18px !important;
    padding: 3px 0 3px 16px !important;
  }

  .cm-page-torah-index .torah-player__main-point {
    line-height: 1.6 !important;
    margin: 0 !important;
  }

  .cm-page-torah-index .torah-player__info-right {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 16px !important;
    margin-top: 0 !important;
    min-width: 0 !important;
  }

  .cm-page-torah-index .torah-player__hebrew-block {
    display: grid !important;
    grid-template-columns: auto 1fr !important;
    align-items: center !important;
    gap: 3px 16px !important;
    padding: 11px 14px !important;
    background: #faf8f1 !important;
    border: 1px solid #ebe4d2 !important;
    border-radius: 8px !important;
  }

  .cm-page-torah-index .torah-player__hebrew-label,
  .cm-page-torah-index .torah-player__hebrew-badge,
  .cm-page-torah-index .torah-player__pronunciation {
    margin: 0 !important;
  }

  .cm-page-torah-index .torah-player__hebrew-badge {
    font-size: 25px !important;
  }

  .cm-page-torah-index .torah-player__btn-study {
    min-height: 46px !important;
    padding-block: 10px !important;
  }

  .cm-page-torah-index .torah-player__expandable {
    grid-column: 1 / -1 !important;
    margin-top: 0 !important;
  }
}

/* Final Torah detail cascade: keep this after legacy detail/index refinements. */
body.cm-page-torah-detail .torah-watch-shell {
  padding: calc(var(--nav-h) + 28px) 0 80px !important;
  background: radial-gradient(circle at top right, rgba(107,140,42,.12), transparent 26%), linear-gradient(180deg, #f5f0e7 0%, #fbf8f2 100%) !important;
}
body.cm-page-torah-detail .torah-watch-shell > .container { max-width: 1480px !important; padding-inline: 24px !important; }
body.cm-page-torah-detail .torah-watch__layout { grid-template-columns: minmax(0,1fr) clamp(380px,33vw,468px) !important; gap: 32px !important; }
body.cm-page-torah-detail .torah-watch__main { gap: 24px !important; }
body.cm-page-torah-detail .torah-watch__hero-card,
body.cm-page-torah-detail .torah-watch__description,
body.cm-page-torah-detail .torah-watch__playlist-card,
body.cm-page-torah-detail .torah-watch__nav-card { background: rgba(255,255,255,.92) !important; border: 1px solid rgba(26,47,16,.08) !important; box-shadow: 0 18px 46px rgba(26,47,16,.08) !important; }
body.cm-page-torah-detail .torah-watch__hero-card { overflow: hidden !important; border-radius: 12px !important; }
body.cm-page-torah-detail .torah-watch__video { border-radius: 12px 12px 0 0 !important; box-shadow: none !important; }
body.cm-page-torah-detail .torah-watch__header { gap: 16px !important; padding: 28px 32px 32px !important; }
body.cm-page-torah-detail .torah-watch__title-row { display: grid !important; grid-template-columns: auto auto minmax(150px,1fr) !important; }
body.cm-page-torah-detail .torah-watch__caption-row { display: grid !important; grid-template-columns: minmax(0,1fr) auto !important; align-items: center !important; }
body.cm-page-torah-detail .torah-watch__caption { max-width: none !important; min-width: 0 !important; }
body.cm-page-torah-detail .torah-watch__description { padding: 28px 32px 32px !important; border-radius: 12px !important; }
body.cm-page-torah-detail .torah-watch__playlist-card { top: calc(var(--nav-h) + 20px) !important; max-height: calc(100vh - var(--nav-h) - 40px) !important; padding: 20px 18px 16px !important; border-radius: 12px !important; overflow: hidden !important; }
body.cm-page-torah-detail .torah-watch__playlist-filters { display: flex !important; grid-template-columns: none !important; gap: 6px !important; overflow-x: auto !important; }
body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter { flex: 0 0 auto !important; width: auto !important; min-width: 40px !important; min-height: 34px !important; padding: 0 11px !important; border-radius: 999px !important; }
body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter__content,
body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter__count { display: none !important; }
body.cm-page-torah-detail .torah-watch__playlist-card .torah-track { grid-template-columns: 42px minmax(0,1fr) !important; gap: 12px !important; min-height: 64px !important; padding: 9px 10px !important; border-radius: 8px !important; }
body.cm-page-torah-detail .torah-watch__playlist-card .torah-track__index { width: 40px !important; height: 40px !important; border-radius: 8px !important; }
body.cm-page-torah-detail .torah-watch__playlist-card .torah-track__body p,
body.cm-page-torah-detail .torah-watch__sidebar-cta { display: none !important; }

@media (max-width: 1100px) {
  body.cm-page-torah-detail .torah-watch__layout { grid-template-columns: minmax(0,1fr) 360px !important; gap: 24px !important; }
  body.cm-page-torah-detail .torah-watch__title-row { grid-template-columns: auto auto !important; }
  body.cm-page-torah-detail .torah-watch__title-pronunciation { grid-column: 1 / -1 !important; }
}
@media (max-width: 860px) {
  body.cm-page-torah-detail .torah-watch__layout { grid-template-columns: 1fr !important; }
  body.cm-page-torah-detail .torah-watch__playlist-card { position: static !important; max-height: none !important; }
  body.cm-page-torah-detail .torah-watch__tracklist { max-height: none !important; overflow: visible !important; }
}
@media (max-width: 640px) {
  body.cm-page-torah-detail .torah-watch-shell { padding-top: calc(var(--nav-h) + 14px) !important; }
  body.cm-page-torah-detail .torah-watch-shell > .container { padding-inline: 14px !important; }
  body.cm-page-torah-detail .torah-watch__header,
  body.cm-page-torah-detail .torah-watch__description { padding: 20px 18px 22px !important; }
  body.cm-page-torah-detail .torah-watch__title-row { display: flex !important; }
  body.cm-page-torah-detail .torah-watch__title { flex-basis: 100% !important; }
  body.cm-page-torah-detail .torah-watch__caption-row { grid-template-columns: 1fr !important; }
  body.cm-page-torah-detail .torah-watch__nav-band,
  body.cm-page-torah-detail .torah-watch__actions { width: 100% !important; }
  body.cm-page-torah-detail .torah-watch__actions .torah-watch__nav-btn { flex: 1 1 0 !important; justify-content: center !important; }
  body.cm-page-torah-detail .torah-watch__nav { grid-template-columns: 1fr !important; }
}

/* Use readable Torah book names instead of ambiguous single-letter filters. */
body.cm-page-torah-detail .torah-watch__playlist-filters {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  overflow: visible !important;
}

body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter,
body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter[data-watch-book-filter="deuteronomy"] {
  display: flex !important;
  justify-content: center !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 38px !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  text-align: center !important;
}

body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter__icon,
body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter__meta,
body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter__count {
  display: none !important;
}

body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter__content,
body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter__title {
  display: block !important;
  min-width: 0 !important;
}

body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter__title {
  overflow: hidden !important;
  color: inherit !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .45px !important;
  line-height: 1.2 !important;
  text-overflow: ellipsis !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

@media (max-width: 420px) {
  body.cm-page-torah-detail .torah-watch__playlist-filters {
    grid-template-columns: 1fr !important;
  }
}

/* Dedicated Torah mobile detail, following the sermon mobile content model. */
.torah-watch__mobile-detail {
  display: none;
}

@media (max-width: 768px) {
  body.cm-page-torah-detail #main {
    padding-top: var(--nav-h) !important;
  }

  body.admin-bar.cm-page-torah-detail #main {
    padding-top: calc(var(--nav-h) + 46px) !important;
  }

  body.cm-page-torah-detail .torah-watch__header,
  body.cm-page-torah-detail .torah-watch__description,
  body.cm-page-torah-detail .torah-watch__nav,
  body.cm-page-torah-detail .torah-watch__sidebar {
    display: none !important;
  }

  body.cm-page-torah-detail .torah-watch__layout,
  body.cm-page-torah-detail .torah-watch__main {
    display: block !important;
  }

  body.cm-page-torah-detail .torah-watch__video {
    position: relative !important;
    top: auto !important;
  }

  body.cm-page-torah-detail .torah-watch__mobile-detail {
    display: block;
    width: calc(100% - 24px);
    max-width: 680px;
    margin: 8px auto 0;
    padding: 12px 18px 24px;
    box-sizing: border-box;
    color: #243023;
  }

  body.cm-page-torah-detail .torah-watch__mobile-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
  }

  body.cm-page-torah-detail .torah-watch__mobile-meta > span:not(.torah-watch__badge) {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(227, 228, 205, .72);
    color: #66702e;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .8px;
    text-transform: uppercase;
  }

  body.cm-page-torah-detail .torah-watch__mobile-title {
    margin: 0 0 10px;
    color: var(--navy);
    font-family: var(--font-head);
    font-size: clamp(26px, 8vw, 34px);
    line-height: 1.04;
    letter-spacing: 0;
  }

  body.cm-page-torah-detail .torah-watch__mobile-language {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 16px;
    padding: 12px 0 14px;
    border-bottom: 1px solid rgba(181, 188, 135, .25);
  }

  body.cm-page-torah-detail .torah-watch__mobile-hebrew {
    flex: 0 0 auto;
    padding: 7px 14px 9px;
    border: 1px solid rgba(107, 140, 42, .22);
    border-radius: 999px;
    background: rgba(223, 230, 198, .5);
    color: #294a20;
    font-family: var(--font-head);
    font-size: 24px;
    line-height: 1;
  }

  body.cm-page-torah-detail .torah-watch__mobile-pronunciation {
    display: grid;
    gap: 2px;
    min-width: 0;
  }

  body.cm-page-torah-detail .torah-watch__mobile-pronunciation small {
    color: var(--olive);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
  }

  body.cm-page-torah-detail .torah-watch__mobile-pronunciation strong {
    overflow-wrap: anywhere;
    color: #64733b;
    font-size: 14px;
    line-height: 1.25;
  }

  body.cm-page-torah-detail .torah-watch__mobile-caption {
    margin: 0 0 14px;
    color: #243023;
    font-size: 15px;
    line-height: 1.6;
  }

  body.cm-page-torah-detail .torah-watch__mobile-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin: 0 calc(50% - 50vw) 24px;
    padding: 10px max(12px, env(safe-area-inset-right)) 10px max(12px, env(safe-area-inset-left));
    border-block: 1px solid rgba(93, 110, 34, .10);
    background: #f3ecdf;
  }

  body.cm-page-torah-detail .torah-watch__mobile-actions a,
  body.cm-page-torah-detail .torah-watch__mobile-actions span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 38px;
    padding: 6px 8px;
    border: 1px solid rgba(93, 110, 34, .14);
    border-radius: 12px;
    background: #f8f1e6;
    color: #34452d;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
  }

  body.cm-page-torah-detail .torah-watch__mobile-actions span[aria-disabled="true"] {
    opacity: .42;
  }

  body.cm-page-torah-detail .torah-watch__mobile-summary,
  body.cm-page-torah-detail .torah-watch__mobile-notes section {
    padding: 22px 0;
    border-bottom: 1px solid rgba(181, 188, 135, .22);
  }

  body.cm-page-torah-detail .torah-watch__mobile-summary {
    padding-top: 0;
  }

  body.cm-page-torah-detail .torah-watch__mobile-summary p,
  body.cm-page-torah-detail .torah-watch__mobile-notes p,
  body.cm-page-torah-detail .torah-watch__mobile-notes li {
    color: #243023;
    font-size: 15px;
    line-height: 1.8;
    text-align: left !important;
  }

  body.cm-page-torah-detail .torah-watch__mobile-summary p {
    margin: 10px 0 0;
  }

  body.cm-page-torah-detail .torah-watch__mobile-notes section:last-child {
    border-bottom: 0;
  }

  body.cm-page-torah-detail .torah-watch__mobile-notes .torah-points {
    margin: 12px 0 0;
  }
}

@media (max-width: 420px) {
  body.cm-page-torah-detail .torah-watch__mobile-detail {
    padding-inline: 14px;
  }

  body.cm-page-torah-detail .torah-watch__mobile-language {
    align-items: flex-start;
  }

  body.cm-page-torah-detail .torah-watch__mobile-actions a,
  body.cm-page-torah-detail .torah-watch__mobile-actions span {
    font-size: 9px;
    letter-spacing: .2px;
  }
}

/* Preserve every thumbnail edge; Torah artwork must never be cropped. */
.cm-page-torah-index .torah-player__video-link img,
.cm-page-torah-detail .torah-watch__video .cm-video-lite__image {
  object-fit: contain !important;
  object-position: center !important;
  background: #0b1811;
}

.cm-page-torah-index .torah-player__hebrew-block--under-video {
  margin-top: 16px !important;
}

@media (min-width: 1200px) {
  .cm-page-torah-index .torah-player__hebrew-block--under-video {
    width: 100% !important;
    grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr) !important;
    gap: 6px 14px !important;
    padding: 12px 16px !important;
  }

  .cm-page-torah-index .torah-player__info-right {
    margin-top: auto !important;
  }
}

/* Keep previous/next portion cards inside the Torah palette in every link state. */
body.cm-page-torah-detail a.torah-watch__nav-card,
body.cm-page-torah-detail a.torah-watch__nav-card:link,
body.cm-page-torah-detail a.torah-watch__nav-card:visited {
  color: var(--navy) !important;
  text-decoration: none !important;
}

body.cm-page-torah-detail a.torah-watch__nav-card strong,
body.cm-page-torah-detail a.torah-watch__nav-card:visited strong {
  color: var(--navy) !important;
}

body.cm-page-torah-detail a.torah-watch__nav-card:hover,
body.cm-page-torah-detail a.torah-watch__nav-card:focus-visible {
  color: var(--navy) !important;
  border-color: rgba(107, 140, 42, .42) !important;
  background: #fbfcf7 !important;
  box-shadow: 0 14px 32px rgba(26, 47, 16, .12) !important;
  transform: translateY(-2px);
}

body.cm-page-torah-detail a.torah-watch__nav-card:hover strong,
body.cm-page-torah-detail a.torah-watch__nav-card:focus-visible strong {
  color: var(--olive) !important;
}

body.cm-page-torah-detail a.torah-watch__nav-card:focus-visible {
  outline: 3px solid rgba(107, 140, 42, .28);
  outline-offset: 3px;
}

/* Increase contrast for the primary Torah book badge. */
body.cm-page-torah-detail .torah-watch__badge {
  color: #fffdf7 !important;
  background: #173f1a !important;
  font-weight: 800 !important;
  letter-spacing: 1.6px !important;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .18);
}

/* Remove the legacy left-column tint that creates a vertical background seam. */
body.cm-page-torah-detail .torah-watch-shell::before {
  content: none !important;
  display: none !important;
  background: none !important;
}

/* Compact book navigation rail: clear hierarchy without a bulky button grid. */
body.cm-page-torah-detail .torah-watch__playlist-filters {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 18px 0 4px !important;
  padding: 4px !important;
  overflow-x: auto !important;
  border: 1px solid rgba(30, 61, 24, .09) !important;
  border-radius: 10px !important;
  background: rgba(30, 61, 24, .035) !important;
  box-shadow: none !important;
  scrollbar-width: none;
}

body.cm-page-torah-detail .torah-watch__playlist-filters::-webkit-scrollbar {
  display: none;
}

body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter,
body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter[data-watch-book-filter="deuteronomy"] {
  flex: 1 0 auto !important;
  width: auto !important;
  min-width: max-content !important;
  min-height: 36px !important;
  padding: 0 10px !important;
  border: 1px solid transparent !important;
  border-radius: 7px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: rgba(30, 61, 24, .68) !important;
  transition: color .18s ease, background-color .18s ease, box-shadow .18s ease !important;
}

body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter__title {
  overflow: visible !important;
  font-family: inherit !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: .55px !important;
  text-overflow: clip !important;
}

body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter:hover,
body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter:focus-visible {
  background: rgba(255, 255, 255, .8) !important;
  color: var(--navy) !important;
}

body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter.is-active,
body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter.is-active:hover,
body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter.is-active:focus-visible {
  border-color: #1b4b1d !important;
  background: #1b4b1d !important;
  color: #fffdf7 !important;
  box-shadow: 0 5px 12px rgba(27, 75, 29, .18) !important;
}

body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter:focus-visible {
  outline: 2px solid rgba(107, 140, 42, .4) !important;
  outline-offset: 2px !important;
}

@media (max-width: 420px) {
  body.cm-page-torah-detail .torah-watch__playlist-filters {
    display: flex !important;
    grid-template-columns: none !important;
  }
}

/* Prevent the book rail and first portion row from clipping each other. */
body.cm-page-torah-detail .torah-watch__playlist-filters {
  min-height: 52px !important;
  margin-bottom: 16px !important;
  padding: 6px 4px !important;
  box-sizing: border-box !important;
}

body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter,
body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter[data-watch-book-filter="deuteronomy"] {
  min-height: 38px !important;
  line-height: 1 !important;
}

body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter__content,
body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter__title {
  line-height: 1.2 !important;
}

body.cm-page-torah-detail .torah-watch__tracklist {
  margin-top: 0 !important;
}

/* Equal-width, consistently aligned Torah book tabs. */
body.cm-page-torah-detail .torah-watch__playlist-filters {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  column-gap: 4px !important;
}

body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter,
body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter[data-watch-book-filter="deuteronomy"] {
  display: flex !important;
  flex: none !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 6px !important;
  box-sizing: border-box !important;
}

body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter__content,
body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter__title {
  width: 100% !important;
  min-width: 0 !important;
  text-align: center !important;
}

body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter__title {
  font-size: clamp(8px, .7vw, 10px) !important;
  letter-spacing: .35px !important;
  white-space: nowrap !important;
}

body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter:focus-visible {
  outline: none !important;
  box-shadow: inset 0 0 0 3px rgba(171, 194, 125, .72) !important;
}

body.cm-page-torah-detail .torah-watch__playlist-filters .torah-filter.is-active:focus-visible {
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .32), 0 4px 10px rgba(27, 75, 29, .16) !important;
}

@media (max-width: 520px) {
  body.cm-page-torah-detail .torah-watch__playlist-filters {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(78px, 1fr)) !important;
    overflow-x: auto !important;
  }
}

/* One shared alignment rail for every element in the Torah sidebar. */
body.cm-page-torah-detail .torah-watch__playlist-card {
  padding: 24px !important;
  box-sizing: border-box !important;
}

body.cm-page-torah-detail .torah-watch__sidebar-progress,
body.cm-page-torah-detail .torah-watch__playlist-head,
body.cm-page-torah-detail .torah-watch__playlist-filters,
body.cm-page-torah-detail .torah-watch__tracklist {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box !important;
}

body.cm-page-torah-detail .torah-watch__sidebar-progress {
  margin-top: 0 !important;
  margin-bottom: 30px !important;
  padding: 22px !important;
}

body.cm-page-torah-detail .torah-watch__playlist-head {
  padding: 0 !important;
}

body.cm-page-torah-detail .torah-watch__playlist-filters {
  margin-top: 20px !important;
  margin-bottom: 22px !important;
}

body.cm-page-torah-detail .torah-watch__tracklist {
  padding: 0 !important;
}

body.cm-page-torah-detail .torah-watch__playlist-card .torah-track,
body.cm-page-torah-detail .torah-watch__playlist-card .torah-track:visited {
  width: 100% !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

@media (max-width: 640px) {
  body.cm-page-torah-detail .torah-watch__playlist-card {
    padding: 18px !important;
  }

  body.cm-page-torah-detail .torah-watch__sidebar-progress {
    margin-bottom: 24px !important;
    padding: 18px !important;
  }
}

/* Final playlist sizing — seven complete rows, unaffected by legacy rules above. */
body.cm-page-torah-detail .torah-watch__playlist-card {
  max-height: none !important;
}

body.cm-page-torah-detail .torah-watch__tracklist {
  --torah-row-size: 74px;
  display: grid !important;
  grid-auto-rows: var(--torah-row-size) !important;
  align-content: start !important;
  gap: 0 !important;
  height: calc(var(--torah-row-size) * 7) !important;
  min-height: calc(var(--torah-row-size) * 7) !important;
  max-height: calc(var(--torah-row-size) * 7) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

body.cm-page-torah-detail .torah-watch__playlist-card .torah-track,
body.cm-page-torah-detail .torah-watch__playlist-card .torah-track:visited {
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 14px !important;
  height: var(--torah-row-size) !important;
  min-height: var(--torah-row-size) !important;
  max-height: var(--torah-row-size) !important;
  padding: 8px 10px 8px 0 !important;
  overflow: hidden !important;
}

body.cm-page-torah-detail .torah-watch__playlist-card .torah-track__index {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  min-height: 48px !important;
}

@media (max-width: 640px) {
  body.cm-page-torah-detail .torah-watch__tracklist {
    --torah-row-size: 68px;
  }

  body.cm-page-torah-detail .torah-watch__playlist-card .torah-track__index {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
  }
}

/* Editorial alignment for long-form study copy. */
body.cm-page-torah-detail .torah-watch__description-main,
body.cm-page-torah-detail .torah-watch__description-body,
body.cm-page-torah-detail .torah-watch__description-section p,
body.cm-page-torah-detail .torah-watch__points li {
  text-align: justify !important;
  text-justify: inter-word;
  hyphens: auto;
  overflow-wrap: break-word;
}

@media (max-width: 640px) {
  body.cm-page-torah-detail .torah-watch__description-main,
  body.cm-page-torah-detail .torah-watch__description-body,
  body.cm-page-torah-detail .torah-watch__description-section p,
  body.cm-page-torah-detail .torah-watch__points li {
    text-align: left !important;
    hyphens: manual;
  }
}

/* Snap the portion scroller to complete rows. */
body.cm-page-torah-detail .torah-watch__tracklist {
  scroll-snap-type: y mandatory !important;
  scroll-behavior: smooth;
}

body.cm-page-torah-detail .torah-watch__playlist-card .torah-track,
body.cm-page-torah-detail .torah-watch__playlist-card .torah-track:visited {
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

/* Book filtering must override the forced grid display used for visible rows. */
body.cm-page-torah-detail .torah-watch__playlist-card .torah-track[hidden] {
  display: none !important;
}

/* Keep the book tabs and portion list at the same vertical position for every book. */
body.cm-page-torah-detail .torah-watch__playlist-head {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  min-height: 340px !important;
}

body.cm-page-torah-detail .torah-watch__playlist-sub {
  margin-bottom: 0 !important;
}

@media (max-width: 860px) {
  body.cm-page-torah-detail .torah-watch__playlist-head {
    min-height: 0 !important;
  }
}

/* Compact alignment: reserve only the description lines, not a tall heading panel. */
body.cm-page-torah-detail .torah-watch__playlist-head {
  min-height: 0 !important;
  flex: 0 0 auto !important;
}

body.cm-page-torah-detail .torah-watch__playlist-sub {
  min-height: 6em !important;
}

@media (max-width: 860px) {
  body.cm-page-torah-detail .torah-watch__playlist-sub {
    min-height: 0 !important;
  }
}

/* Overview playlist uses the same controls and seven-row sizing as the detail page. */
body.cm-page-torah-index .torah-watch__playlist-filters {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 6px !important;
  margin: 0 0 14px !important;
  overflow-x: auto !important;
  scrollbar-width: thin;
}

body.cm-page-torah-index .torah-watch__playlist-filters .torah-filter {
  flex: 1 1 0 !important;
  width: auto !important;
  min-width: 40px !important;
  min-height: 38px !important;
  height: 38px !important;
  padding: 0 10px !important;
  border: 1px solid rgba(30, 61, 24, .12) !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: var(--olive-700) !important;
}

body.cm-page-torah-index .torah-watch__playlist-filters .torah-filter__icon {
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  background: transparent !important;
  font-size: 11px !important;
}

body.cm-page-torah-index .torah-watch__playlist-filters .torah-filter__content,
body.cm-page-torah-index .torah-watch__playlist-filters .torah-filter__count {
  display: none !important;
}

body.cm-page-torah-index .torah-watch__playlist-filters .torah-filter.is-active {
  border-color: var(--navy) !important;
  background: var(--navy) !important;
  color: #fff !important;
}

body.cm-page-torah-index .torah-watch__tracklist {
  --torah-row-size: 74px;
  display: grid !important;
  grid-auto-rows: var(--torah-row-size) !important;
  align-content: start !important;
  gap: 0 !important;
  height: calc(var(--torah-row-size) * 7) !important;
  min-height: calc(var(--torah-row-size) * 7) !important;
  max-height: calc(var(--torah-row-size) * 7) !important;
  margin-top: 12px !important;
  padding: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scroll-snap-type: y mandatory !important;
}

body.cm-page-torah-index .torah-watch__playlist-card .torah-track,
body.cm-page-torah-index .torah-watch__playlist-card .torah-track:visited {
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 14px !important;
  height: var(--torah-row-size) !important;
  min-height: var(--torah-row-size) !important;
  max-height: var(--torah-row-size) !important;
  padding: 8px 10px 8px 0 !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  scroll-snap-align: start;
}

body.cm-page-torah-index .torah-watch__playlist-card .torah-track__index {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  min-height: 48px !important;
  border-radius: 10px !important;
}

body.cm-page-torah-index .torah-watch__playlist-card .torah-track__body {
  min-width: 0 !important;
}

body.cm-page-torah-index .torah-watch__playlist-card .torah-track__topline {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
}

body.cm-page-torah-index .torah-watch__playlist-card .torah-track__body p {
  display: none !important;
}

body.cm-page-torah-index .torah-watch__playlist-card .torah-track[hidden] {
  display: none !important;
}

/* Compact overview sidebar: keep progress and all five books visible; scroll rows only. */
@media (min-width: 1081px) {
  body.cm-page-torah-index .cm-torah-sidebar.torah-watch__playlist-card {
    display: flex !important;
    flex-direction: column !important;
    height: calc(100vh - var(--nav-h) - 32px) !important;
    min-height: 0 !important;
    max-height: calc(100vh - var(--nav-h) - 32px) !important;
    overflow: hidden !important;
  }

  body.admin-bar.cm-page-torah-index .cm-torah-sidebar.torah-watch__playlist-card {
    height: calc(100vh - var(--nav-h) - 64px) !important;
    max-height: calc(100vh - var(--nav-h) - 64px) !important;
  }

  body.cm-page-torah-index .cm-torah-sidebar__sticky-head,
  body.cm-page-torah-index .torah-watch__playlist-filters {
    flex: 0 0 auto !important;
  }

  body.cm-page-torah-index .torah-watch__tracklist {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin-bottom: 0 !important;
  }
}

@media (max-width: 1080px) {
  body.cm-page-torah-index .torah-watch__tracklist {
    height: calc(var(--torah-row-size) * 5) !important;
    min-height: calc(var(--torah-row-size) * 5) !important;
    max-height: calc(var(--torah-row-size) * 5) !important;
  }
}

/* Final compact playlist design for the Torah overview sidebar. */
body.cm-page-torah-index .cm-torah-book-filters {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 7px !important;
  margin: 0 0 16px !important;
}

body.cm-page-torah-index .cm-torah-book-header {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 10px !important;
  border: 1px solid #dfe3dc !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #53604f !important;
  font-family: inherit !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  line-height: 1 !important;
  box-shadow: none !important;
  transform: none !important;
}

body.cm-page-torah-index .cm-torah-book-header:last-child {
  grid-column: 1 / -1 !important;
}

body.cm-page-torah-index .cm-torah-book-header:hover,
body.cm-page-torah-index .cm-torah-book-header:focus-visible {
  border-color: #9baa94 !important;
  background: #f5f7f3 !important;
  color: var(--olive-800) !important;
}

body.cm-page-torah-index .cm-torah-book-header.is-active {
  border-color: var(--navy) !important;
  background: var(--navy) !important;
  color: #fff !important;
}

body.cm-page-torah-index .cm-torah-book-header .torah-filter__icon,
body.cm-page-torah-index .cm-torah-book-header .torah-filter__meta,
body.cm-page-torah-index .cm-torah-book-header .torah-filter__count {
  display: none !important;
}

body.cm-page-torah-index .cm-torah-book-header .torah-filter__content,
body.cm-page-torah-index .cm-torah-book-header .torah-filter__title {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.cm-page-torah-index .cm-torah-portions-list.is-open {
  display: block !important;
  padding: 0 4px 0 0 !important;
  background: transparent !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scrollbar-width: thin !important;
  scrollbar-color: #cbd2c7 transparent !important;
}

body.cm-page-torah-index .cm-torah-portion-item {
  display: grid !important;
  grid-template-columns: 38px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 11px !important;
  width: 100% !important;
  height: 58px !important;
  min-height: 58px !important;
  margin: 0 0 5px !important;
  padding: 6px 10px 6px 6px !important;
  border: 1px solid transparent !important;
  border-left: 3px solid transparent !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #61695e !important;
  font-family: inherit !important;
  box-shadow: none !important;
}

body.cm-page-torah-index .cm-torah-portion-item:hover,
body.cm-page-torah-index .cm-torah-portion-item:focus-visible {
  background: #f4f6f1 !important;
  color: var(--olive-800) !important;
}

body.cm-page-torah-index .cm-torah-portion-item.is-active {
  border-color: rgba(67, 96, 55, .12) !important;
  border-left-color: var(--olive-700) !important;
  background: #edf2e8 !important;
  color: var(--olive-800) !important;
}

body.cm-page-torah-index .cm-torah-portion-item__num {
  display: grid !important;
  place-items: center !important;
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  border-radius: 7px !important;
  background: #eef1ea !important;
  color: #7e877a !important;
  font-size: 11px !important;
  font-weight: 700 !important;
}

body.cm-page-torah-index .cm-torah-portion-item.is-active .cm-torah-portion-item__num {
  background: #dce6d2 !important;
  color: var(--olive-800) !important;
}

body.cm-page-torah-index .cm-torah-portion-item__body,
body.cm-page-torah-index .cm-torah-portion-item__topline {
  display: contents !important;
}

body.cm-page-torah-index .cm-torah-portion-item__name {
  min-width: 0 !important;
  overflow: hidden !important;
  color: inherit !important;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.cm-page-torah-index .cm-torah-portion-item__dur {
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #92998f !important;
  font-family: inherit !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  font-variant-numeric: tabular-nums !important;
}

body.cm-page-torah-index .cm-torah-portion-item__body p {
  display: none !important;
}

body.cm-page-torah-index .cm-torah-portion-item[hidden] {
  display: none !important;
}

@media (min-width: 1081px) {
  body.cm-page-torah-index .cm-torah-sidebar {
    display: flex !important;
    flex-direction: column !important;
    height: calc(100vh - var(--nav-h) - 32px) !important;
    min-height: 0 !important;
    max-height: calc(100vh - var(--nav-h) - 32px) !important;
    overflow: hidden !important;
  }

  body.cm-page-torah-index .cm-torah-sidebar__sticky-head,
  body.cm-page-torah-index .cm-torah-book-filters {
    flex: 0 0 auto !important;
  }

  body.cm-page-torah-index .cm-torah-portions-list.is-open {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }
}

@media (max-width: 1080px) and (min-width: 641px) {
  body.cm-page-torah-index .cm-torah-book-filters {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }

  body.cm-page-torah-index .cm-torah-book-header:last-child {
    grid-column: auto !important;
  }

  body.cm-page-torah-index .cm-torah-portions-list.is-open {
    max-height: 315px !important;
  }
}

@media (max-width: 640px) {
  body.cm-page-torah-index .cm-torah-portions-list.is-open {
    max-height: 315px !important;
  }
}

/* Book switcher: full names in a compact selector with adjacent navigation. */
body.cm-page-torah-index .cm-torah-book-filters {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: stretch !important;
  gap: 7px !important;
}

body.cm-page-torah-index .cm-torah-book-select-wrap {
  position: relative !important;
  display: block !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

body.cm-page-torah-index .cm-torah-book-select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 13px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #64705f;
  border-bottom: 1.5px solid #64705f;
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

body.cm-page-torah-index .cm-torah-book-select {
  display: block !important;
  width: 100% !important;
  height: 44px !important;
  padding: 0 34px 0 14px !important;
  border: 1px solid #d9dfd5 !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: var(--olive-800) !important;
  font-family: inherit !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  line-height: 44px !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  cursor: pointer !important;
  outline: none !important;
}

body.cm-page-torah-index .cm-torah-book-select:hover,
body.cm-page-torah-index .cm-torah-book-select:focus-visible {
  border-color: #8d9e87 !important;
  box-shadow: 0 0 0 3px rgba(76, 105, 61, .1) !important;
}

body.cm-page-torah-index .cm-torah-book-step {
  display: grid !important;
  place-items: center !important;
  flex: 0 0 44px !important;
  width: 44px !important;
  height: 44px !important;
  padding: 0 !important;
  border: 1px solid #d9dfd5 !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: var(--olive-700) !important;
  box-shadow: none !important;
  cursor: pointer !important;
}

body.cm-page-torah-index .cm-torah-book-step svg {
  width: 17px !important;
  height: 17px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

body.cm-page-torah-index .cm-torah-book-step:hover,
body.cm-page-torah-index .cm-torah-book-step:focus-visible {
  border-color: var(--olive-700) !important;
  background: #f3f6f0 !important;
}

body.cm-page-torah-index .cm-torah-book-step:disabled {
  border-color: #e6e9e3 !important;
  background: #f8f9f7 !important;
  color: #c4cac1 !important;
  cursor: default !important;
}

/* Simplified book control: one calm, full-width selector. */
body.cm-page-torah-index .cm-torah-book-filters {
  display: block !important;
  margin-bottom: 18px !important;
}

body.cm-page-torah-index .cm-torah-book-select {
  height: 46px !important;
  padding: 0 76px 0 15px !important;
  border-color: #dfe4dc !important;
  border-radius: 7px !important;
  color: #34482f !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  line-height: 46px !important;
}

body.cm-page-torah-index .cm-torah-book-select-wrap::after {
  right: 16px !important;
  width: 6px !important;
  height: 6px !important;
}

body.cm-page-torah-index .cm-torah-book-select-count {
  position: absolute !important;
  top: 50% !important;
  right: 34px !important;
  display: grid !important;
  place-items: center !important;
  min-width: 25px !important;
  height: 22px !important;
  padding: 0 7px !important;
  border-radius: 999px !important;
  background: #edf1e9 !important;
  color: #667461 !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  transform: translateY(-50%) !important;
  pointer-events: none !important;
}

body.cm-page-torah-index .cm-torah-portions-list.is-open::-webkit-scrollbar {
  width: 4px !important;
}

body.cm-page-torah-index .cm-torah-portions-list.is-open::-webkit-scrollbar-thumb {
  background: #cdd4ca !important;
}

body.cm-page-torah-index .cm-torah-portion-item {
  grid-template-columns: 34px minmax(0, 1fr) auto !important;
  gap: 10px !important;
  height: 52px !important;
  min-height: 52px !important;
  margin-bottom: 3px !important;
  padding: 5px 9px 5px 5px !important;
  border-radius: 7px !important;
}

body.cm-page-torah-index .cm-torah-portion-item__num {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  border-radius: 6px !important;
  font-size: 10px !important;
}

body.cm-page-torah-index .cm-torah-portion-item__name {
  font-size: 12.5px !important;
}

body.cm-page-torah-index .cm-torah-portion-item__dur {
  font-size: 10.5px !important;
}

/* Seven-row book accordion with a clear continuation cue. */
body.cm-page-torah-index .cm-torah-book-accordion {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  padding-right: 4px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}

body.cm-page-torah-index .cm-torah-book-accordion::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

body.cm-page-torah-index .cm-torah-book-group {
  position: relative !important;
  margin: 0 0 5px !important;
  border: 0 !important;
  background: transparent !important;
}

body.cm-page-torah-index .cm-torah-book-header,
body.cm-page-torah-index .cm-torah-book-header:last-child {
  display: flex !important;
  grid-column: auto !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 11px !important;
  border: 1px solid transparent !important;
  border-radius: 7px !important;
  background: transparent !important;
  color: #556151 !important;
  font-family: inherit !important;
  font-size: 12.5px !important;
  font-weight: 650 !important;
  box-shadow: none !important;
}

body.cm-page-torah-index .cm-torah-book-header:hover,
body.cm-page-torah-index .cm-torah-book-header:focus-visible {
  border-color: #e1e5de !important;
  background: #f5f7f3 !important;
}

body.cm-page-torah-index .cm-torah-book-header.is-active {
  border-color: #dce4d7 !important;
  background: #edf2e9 !important;
  color: var(--olive-800) !important;
}

body.cm-page-torah-index .cm-torah-book-header__main {
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
  min-width: 0 !important;
}

body.cm-page-torah-index .cm-torah-book-header__main svg {
  width: 13px !important;
  height: 13px !important;
  flex: 0 0 13px !important;
  fill: none !important;
  stroke: #879281 !important;
  stroke-width: 2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  transition: transform .2s ease !important;
}

body.cm-page-torah-index .cm-torah-book-header.is-active .cm-torah-book-header__main svg {
  stroke: var(--olive-700) !important;
  transform: rotate(90deg) !important;
}

body.cm-page-torah-index .cm-torah-book-header__count {
  display: grid !important;
  place-items: center !important;
  min-width: 28px !important;
  height: 22px !important;
  padding: 0 7px !important;
  border-radius: 999px !important;
  background: #eef1ec !important;
  color: #7c8678 !important;
  font-size: 10px !important;
  font-weight: 700 !important;
}

body.cm-page-torah-index .cm-torah-book-header.is-active .cm-torah-book-header__count {
  background: #dbe6d2 !important;
  color: var(--olive-800) !important;
}

body.cm-page-torah-index .cm-torah-portions-shell {
  position: relative !important;
  display: none !important;
  margin: 5px 0 7px !important;
}

body.cm-page-torah-index .cm-torah-book-group.is-open .cm-torah-portions-shell {
  display: block !important;
}

body.cm-page-torah-index .cm-torah-book-group .cm-torah-portions-list,
body.cm-page-torah-index .cm-torah-book-group .cm-torah-portions-list.is-open {
  display: block !important;
  height: calc(52px * 7) !important;
  min-height: calc(52px * 7) !important;
  max-height: calc(52px * 7) !important;
  padding: 0 4px 0 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scroll-behavior: smooth !important;
  scrollbar-width: thin !important;
  scrollbar-color: #cbd2c7 transparent !important;
}

body.cm-page-torah-index .cm-torah-portions-more {
  position: absolute !important;
  right: 4px !important;
  bottom: 0 !important;
  left: 0 !important;
  display: flex !important;
  align-items: flex-end !important;
  justify-content: center !important;
  gap: 0 !important;
  height: 58px !important;
  padding: 0 0 7px !important;
  border: 0 !important;
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,.96) 62%, #fff 100%) !important;
  color: var(--olive-700) !important;
  font-family: inherit !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  letter-spacing: .06em !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
}

body.cm-page-torah-index .cm-torah-portions-more span {
  display: none !important;
}

body.cm-page-torah-index .cm-torah-portions-more[hidden] {
  display: none !important;
}

body.cm-page-torah-index .cm-torah-portions-more svg {
  width: 30px !important;
  height: 30px !important;
  padding: 8px !important;
  border: 1px solid #b9c5b3 !important;
  border-radius: 50% !important;
  background: #fff !important;
  box-shadow: 0 3px 10px rgba(31, 57, 24, .16) !important;
  box-sizing: border-box !important;
  fill: none !important;
  stroke: var(--olive-800) !important;
  stroke-width: 2.4 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

/* Floating scroll controls: colored circle and arrow only. */
body.cm-page-torah-index .cm-torah-portions-arrow,
body.cm-page-torah-index .cm-torah-portions-more {
  position: absolute !important;
  right: auto !important;
  left: 50% !important;
  z-index: 3 !important;
  display: grid !important;
  place-items: center !important;
  width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: #edf2e9 !important;
  color: #536b4d !important;
  box-shadow: 0 4px 12px rgba(30, 61, 24, .14) !important;
  opacity: 0 !important;
  transform: translateX(-50%) !important;
  transition: opacity .18s ease, background-color .18s ease, box-shadow .18s ease !important;
  pointer-events: none !important;
  cursor: pointer !important;
}

body.cm-page-torah-index .cm-torah-portions-shell:hover .cm-torah-portions-arrow,
body.cm-page-torah-index .cm-torah-portions-shell:focus-within .cm-torah-portions-arrow {
  opacity: 1 !important;
  pointer-events: auto !important;
}

body.cm-page-torah-index .cm-torah-portions-arrow--up {
  top: 8px !important;
  bottom: auto !important;
}

body.cm-page-torah-index .cm-torah-portions-arrow--down,
body.cm-page-torah-index .cm-torah-portions-more {
  top: auto !important;
  bottom: 8px !important;
}

body.cm-page-torah-index .cm-torah-portions-arrow:hover,
body.cm-page-torah-index .cm-torah-portions-arrow:focus-visible {
  background: #dfe8da !important;
  color: #3f5b39 !important;
  box-shadow: 0 5px 14px rgba(30, 61, 24, .18) !important;
}

body.cm-page-torah-index .cm-torah-portions-arrow[hidden] {
  display: none !important;
}

body.cm-page-torah-index .cm-torah-portions-arrow svg,
body.cm-page-torah-index .cm-torah-portions-more svg {
  width: 17px !important;
  height: 17px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2.5 !important;
}

@media (hover: none) {
  body.cm-page-torah-index .cm-torah-portions-arrow {
    opacity: 1 !important;
    pointer-events: auto !important;
    width: 44px !important;
    height: 44px !important;
  }
}

/* Non-obstructive continuation hint: visible scrollbar plus a fading lower edge. */
body.cm-page-torah-index .cm-torah-portions-shell::after {
  content: "" !important;
  position: absolute !important;
  right: 7px !important;
  bottom: 0 !important;
  left: 0 !important;
  z-index: 2 !important;
  height: 38px !important;
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,.94)) !important;
  opacity: 0 !important;
  transition: opacity .18s ease !important;
  pointer-events: none !important;
}

body.cm-page-torah-index .cm-torah-portions-shell.has-more-below::after {
  opacity: 1 !important;
}

body.cm-page-torah-index .cm-torah-book-group .cm-torah-portions-list,
body.cm-page-torah-index .cm-torah-book-group .cm-torah-portions-list.is-open {
  padding-right: 8px !important;
  scrollbar-gutter: stable !important;
  scrollbar-width: thin !important;
  scrollbar-color: #aeb9aa #eef1ec !important;
}

body.cm-page-torah-index .cm-torah-portions-list::-webkit-scrollbar {
  display: block !important;
  width: 6px !important;
}

body.cm-page-torah-index .cm-torah-portions-list::-webkit-scrollbar-track {
  border-radius: 999px !important;
  background: #eef1ec !important;
}

body.cm-page-torah-index .cm-torah-portions-list::-webkit-scrollbar-thumb {
  border-radius: 999px !important;
  background: #aeb9aa !important;
}

/* ============================================================
   MOBILE TORAH INDEX — unified books / search / position / list
   Desktop keeps the established overview and explorer.
   ============================================================ */
.torah-mobile-index-library { display: none; }

@media (max-width: 782px) {
  body.cm-page-torah-index .torah-books-section,
  body.cm-page-torah-index .torah-playlist-shell {
    display: none !important;
  }

  body.cm-page-torah-index .torah-series-overview__actions .btn--outline-dark {
    display: none !important;
  }

  body.cm-page-torah-index .torah-series-overview__actions .btn--olive {
    width: 100%;
    min-height: 48px;
    justify-content: center;
  }

  body.cm-page-torah-index .torah-mobile-index-library {
    display: block;
    padding: 30px 0 calc(var(--cm-mobile-bottom-nav-height, 82px) + 34px);
    background: #f0ede5;
  }

  .torah-mobile-index-library__head {
    padding: 0 20px;
  }

  .torah-mobile-index-library__eyebrow {
    display: block;
    margin-bottom: 7px;
    color: #6d7f3d;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .17em;
    text-transform: uppercase;
  }

  .torah-mobile-index-library__head h2 {
    margin: 0;
    color: var(--navy);
    font-family: var(--font-head);
    font-size: 29px;
    line-height: 1.12;
  }

  .torah-mobile-index-library__head p {
    margin: 8px 0 0;
    color: #6b746e;
    font-size: 13px;
  }

  .torah-mobile-index-books {
    display: flex;
    gap: 12px;
    box-sizing: border-box;
    width: calc(100% - 20px);
    margin-left: 20px;
    margin-top: 18px;
    padding: 0 20px 6px 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .torah-mobile-index-books::-webkit-scrollbar { display: none; }

  .torah-mobile-index-book {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    align-content: center;
    align-items: center;
    column-gap: 12px;
    /* Fill the mobile row while leaving a small cue that more books follow. */
    flex: 0 0 calc(100% - 32px);
    box-sizing: border-box;
    min-height: 132px;
    padding: 16px;
    border: 1px solid rgba(22,52,38,.09);
    border-radius: 12px;
    background: #fffefa;
    color: #203029;
    text-align: left;
    cursor: pointer;
    scroll-snap-align: start;
  }

  .torah-mobile-index-book.is-active {
    border-color: #687c36;
    background: #f3f6ed;
    box-shadow: inset 0 0 0 1px #687c36;
  }

  .torah-mobile-index-book:focus-visible {
    outline: 2px solid #687c36;
    outline-offset: 2px;
  }

  .torah-mobile-index-book__num {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e8eee0;
    color: #687c36;
    font-size: 11px;
    font-weight: 800;
  }

  .torah-mobile-index-book strong {
    display: block;
    margin: 0;
    color: var(--navy);
    font-family: var(--font-head);
    font-size: 20px;
    line-height: 1.15;
  }

  .torah-mobile-index-book > span:last-child {
    display: -webkit-box;
    grid-column: 1 / -1;
    margin-top: 10px;
    overflow: hidden;
    color: #6b746e;
    font-size: 12px;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .torah-mobile-index-library__swipe {
    margin: 7px 20px 0;
    color: #858c87;
    font-size: 10px;
    text-align: right;
  }

  .torah-mobile-index-playlist {
    margin: 12px 14px 0;
    overflow: hidden;
    border: 1px solid rgba(22,52,38,.09);
    border-radius: 13px;
    background: #fffefa;
    box-shadow: 0 12px 32px rgba(22,52,38,.07);
  }

  .torah-mobile-index-search {
    position: relative;
    padding: 12px;
    border-bottom: 1px solid #dfe4dc;
  }

  .torah-mobile-index-search svg {
    position: absolute;
    top: 50%;
    left: 27px;
    width: 17px;
    height: 17px;
    fill: none;
    stroke: #7b857d;
    stroke-width: 2;
    transform: translateY(-50%);
    pointer-events: none;
  }

  .torah-mobile-index-search input {
    width: 100%;
    min-height: 48px;
    padding: 0 13px 0 40px;
    border: 1px solid #ccd5c8;
    border-radius: 9px;
    background: #f8f8f4;
    color: #203029;
    font-size: 16px;
  }

  .torah-mobile-index-position {
    padding: 13px 15px;
    border-bottom: 1px solid #dfe4dc;
    background: #edf1e7;
  }

  .torah-mobile-index-position > div:first-child {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--navy);
    font-size: 11px;
    font-weight: 800;
  }

  .torah-mobile-index-position__track {
    height: 5px;
    margin-top: 8px;
    overflow: hidden;
    border-radius: 99px;
    background: #d4dccd;
  }

  .torah-mobile-index-position__track span {
    display: block;
    width: 8.33%;
    height: 100%;
    background: #687c36;
    transition: width .2s ease;
  }

  .torah-mobile-index-position p {
    margin: 7px 0 0;
    color: #6b746e;
    font-size: 10px;
  }

  .torah-mobile-index-list-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 15px 5px;
    color: #6b746e;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
  }

  .torah-mobile-index-list {
    max-height: 325px;
    padding: 7px 10px 8px;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-width: thin;
    scrollbar-color: #b8c2b2 transparent;
    -webkit-overflow-scrolling: touch;
  }

  .torah-mobile-index-row,
  .torah-mobile-index-row:visited {
    display: grid;
    grid-template-columns: 42px minmax(0,1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 62px;
    padding: 7px 5px;
    border-bottom: 1px solid #ecefe9;
    color: #203029;
  }

  .torah-mobile-index-row[hidden] { display: none !important; }
  .torah-mobile-index-row:last-child { border-bottom: 0; }

  .torah-mobile-index-row.is-active {
    margin: 2px 0;
    padding-inline: 8px;
    border: 0;
    border-radius: 8px;
    background: #edf2e8;
  }

  .torah-mobile-index-row__num {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #eef0eb;
    color: #788078;
    font-size: 11px;
    font-weight: 800;
  }

  .torah-mobile-index-row.is-active .torah-mobile-index-row__num {
    background: #dce7d2;
    color: #687c36;
  }

  .torah-mobile-index-row__copy { min-width: 0; }

  .torah-mobile-index-row__copy strong,
  .torah-mobile-index-row__copy span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .torah-mobile-index-row__copy strong {
    color: var(--navy);
    font-size: 14px;
  }

  .torah-mobile-index-row__copy span {
    color: #6b746e;
    font-size: 11px;
  }

  .torah-mobile-index-row__duration {
    color: #8a918b;
    font-size: 11px;
  }

  .torah-mobile-index-empty {
    margin: 0;
    padding: 22px 18px;
    color: #6b746e;
    font-size: 13px;
    text-align: center;
  }

  .torah-mobile-index-more {
    width: calc(100% - 20px);
    min-height: 44px;
    margin: 4px 10px 12px;
    border: 1px solid #cfd7ca;
    border-radius: 8px;
    background: #fff;
    color: var(--navy);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
  }
}

/* Torah detail: use the sermon detail page's calm, edge-to-edge mobile rhythm. */
.cm-page-torah-detail .torah-watch__video-back {
  display: none;
}

@media (max-width: 768px) {
  body.cm-page-torah-detail .cm-nav {
    z-index: 1210;
    background: rgba(244, 238, 228, .96);
    box-shadow: 0 8px 20px rgba(36, 42, 24, .06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  body.cm-page-torah-detail .torah-watch-shell {
    padding: 0 0 44px !important;
    background: radial-gradient(circle at top center, rgba(183, 190, 116, .16), transparent 32%), linear-gradient(180deg, #f2ebdf 0%, #f8f3ea 100%) !important;
  }

  body.cm-page-torah-detail .torah-watch-shell > .container {
    max-width: none !important;
    padding-inline: 0 !important;
  }

  body.cm-page-torah-detail .torah-watch__layout,
  body.cm-page-torah-detail .torah-watch__main {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100vw !important;
  }

  body.cm-page-torah-detail .torah-watch__layout {
    gap: 18px !important;
  }

  body.cm-page-torah-detail .torah-watch__main {
    gap: 18px !important;
  }

  body.cm-page-torah-detail .torah-watch__hero-card {
    width: 100% !important;
    max-width: 100vw !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body.cm-page-torah-detail .torah-watch__video {
    position: sticky !important;
    top: var(--bar-offset, var(--nav-h)) !important;
    z-index: 1200 !important;
    width: 100% !important;
    max-width: 100vw !important;
    border-radius: 0 !important;
    box-shadow: 0 10px 24px rgba(36, 42, 24, .14) !important;
  }

  body.cm-page-torah-detail .torah-watch__video .cm-video-lite,
  body.cm-page-torah-detail .torah-watch__video iframe {
    border-radius: 0 !important;
  }

  body.cm-page-torah-detail .torah-watch__video-back {
    position: absolute;
    top: 12px;
    left: max(12px, env(safe-area-inset-left));
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(0, 0, 0, .32);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
    color: #fff;
    text-decoration: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  body.cm-page-torah-detail .torah-watch__header {
    width: calc(100% - 24px) !important;
    margin: 6px auto 0 !important;
    padding: 14px 18px 18px !important;
    gap: 12px !important;
  }

  body.cm-page-torah-detail .torah-watch__eyebrow-row {
    gap: 7px !important;
  }

  body.cm-page-torah-detail .torah-watch__badge,
  body.cm-page-torah-detail .torah-watch__eyebrow {
    font-size: 9px !important;
    letter-spacing: 1px !important;
  }

  body.cm-page-torah-detail .torah-watch__title-row {
    gap: 6px 10px !important;
  }

  body.cm-page-torah-detail .torah-watch__title {
    font-size: clamp(25px, 8vw, 34px) !important;
    line-height: 1.04 !important;
  }

  body.cm-page-torah-detail .torah-title-note__word {
    font-size: 22px !important;
  }

  body.cm-page-torah-detail .torah-watch__caption {
    font-size: 15px !important;
    line-height: 1.7 !important;
  }

  body.cm-page-torah-detail .torah-watch__description,
  body.cm-page-torah-detail .torah-watch__nav,
  body.cm-page-torah-detail .torah-watch__sidebar {
    width: calc(100% - 24px) !important;
    max-width: calc(100% - 24px) !important;
    margin-inline: auto !important;
    box-sizing: border-box !important;
  }

  body.cm-page-torah-detail .torah-watch__description {
    padding: 22px 18px 24px !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 30px rgba(26, 47, 16, .06) !important;
  }

  body.cm-page-torah-detail .torah-watch__nav-card {
    padding: 17px 18px !important;
  }

  body.cm-page-torah-detail .torah-watch__nav-card strong {
    font-size: 18px !important;
  }

  body.cm-page-torah-detail .torah-watch__playlist-card {
    padding: 18px !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 30px rgba(26, 47, 16, .06) !important;
  }
}

@media (max-width: 420px) {
  body.cm-page-torah-detail .torah-watch__header {
    padding-inline: 14px !important;
  }

  body.cm-page-torah-detail .torah-watch__title-pronunciation {
    width: 100% !important;
  }

  body.cm-page-torah-detail .torah-watch__actions {
    gap: 8px !important;
  }

  body.cm-page-torah-detail .torah-watch__actions .torah-watch__nav-btn {
    min-height: 42px !important;
    padding-inline: 10px !important;
  }
}

/* Keep the dedicated mobile layout authoritative over legacy detail rules above. */
@media (max-width: 768px) {
  body.cm-page-torah-detail .torah-watch__video {
    position: relative !important;
    top: auto !important;
  }

  body.cm-page-torah-detail .torah-watch__header,
  body.cm-page-torah-detail .torah-watch__description,
  body.cm-page-torah-detail .torah-watch__nav,
  body.cm-page-torah-detail .torah-watch__sidebar {
    display: none !important;
  }
}

@media (max-width: 768px) {
  body.cm-page-torah-detail .torah-watch__mobile-playlist {
    margin: 20px -4px 0;
    padding: 28px 0 0;
    border-top: 1px solid rgba(181, 188, 135, .24);
  }

  body.cm-page-torah-detail .torah-watch__mobile-playlist-head h2 {
    margin: 6px 0 6px;
    color: var(--navy);
    font-family: var(--font-head);
    font-size: 25px;
    line-height: 1.08;
  }

  body.cm-page-torah-detail .torah-watch__mobile-playlist-head p {
    margin: 0;
    color: #6f7467;
    font-size: 13px;
    line-height: 1.55;
  }

  body.cm-page-torah-detail .torah-watch__mobile-progress {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px 12px;
    margin-top: 20px;
    padding: 15px;
    border-radius: 12px 12px 0 0;
    background: #edf1e7;
    color: #29402b;
    font-size: 11px;
    font-weight: 800;
  }

  body.cm-page-torah-detail .torah-watch__mobile-progress > div {
    grid-column: 1 / -1;
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(41, 64, 43, .12);
  }

  body.cm-page-torah-detail .torah-watch__mobile-progress > div > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--olive);
  }

  body.cm-page-torah-detail .torah-watch__mobile-library {
    overflow: hidden;
    border: 1px solid rgba(35, 62, 36, .10);
    border-top: 0;
    border-radius: 0 0 12px 12px;
    background: rgba(255, 255, 255, .72);
  }

  body.cm-page-torah-detail .torah-watch__mobile-book-filters {
    display: flex;
    gap: 7px;
    padding: 12px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  body.cm-page-torah-detail .torah-watch__mobile-book-filters::-webkit-scrollbar {
    display: none;
  }

  body.cm-page-torah-detail .torah-watch__mobile-book-filters button {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid rgba(35, 62, 36, .13);
    border-radius: 999px;
    background: #fff;
    color: #29402b;
    font: inherit;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
  }

  body.cm-page-torah-detail .torah-watch__mobile-book-filters button.is-active {
    border-color: #173f1a;
    background: #173f1a;
    color: #fff;
  }

  body.cm-page-torah-detail .torah-watch__mobile-library-label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-block: 1px solid rgba(35, 62, 36, .08);
    color: #737a70;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.1px;
    text-transform: uppercase;
  }

  body.cm-page-torah-detail .torah-watch__mobile-tracklist {
    --torah-row-size: auto;
    display: grid !important;
    grid-auto-rows: auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: 430px !important;
    padding: 0 10px !important;
    overflow-y: auto !important;
    scroll-snap-type: y proximity !important;
  }

  body.cm-page-torah-detail .torah-watch__mobile-tracklist .torah-track,
  body.cm-page-torah-detail .torah-watch__mobile-tracklist .torah-track:visited {
    grid-template-columns: 42px minmax(0, 1fr) !important;
    gap: 11px !important;
    height: auto !important;
    min-height: 68px !important;
    max-height: none !important;
    padding: 10px 4px !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(35, 62, 36, .08) !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--navy) !important;
  }

  body.cm-page-torah-detail .torah-watch__mobile-tracklist .torah-track.is-active {
    margin-inline: -2px !important;
    padding-inline: 6px !important;
    border-bottom-color: transparent !important;
    border-radius: 9px !important;
    background: #edf2e8 !important;
  }

  body.cm-page-torah-detail .torah-watch__mobile-tracklist .torah-track__index {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    border-radius: 9px !important;
  }

  body.cm-page-torah-detail .torah-watch__mobile-tracklist .torah-track .torah-track__index,
  body.cm-page-torah-detail .torah-watch__mobile-tracklist .torah-track.is-active .torah-track__index {
    background: #dce7cc !important;
    color: #526b24 !important;
    font-weight: 800 !important;
    opacity: 1 !important;
  }

  body.cm-page-torah-detail .torah-watch__mobile-tracklist .torah-track__topline strong,
  body.cm-page-torah-detail .torah-watch__mobile-tracklist .torah-track.is-active .torah-track__topline strong {
    color: var(--navy) !important;
    font-size: 14px !important;
  }

  body.cm-page-torah-detail .torah-watch__mobile-tracklist .torah-track__duration,
  body.cm-page-torah-detail .torah-watch__mobile-tracklist .torah-track.is-active .torah-track__duration {
    padding: 0 !important;
    background: transparent !important;
    color: #858b80 !important;
    font-size: 10px !important;
  }

  body.cm-page-torah-detail .torah-watch__mobile-track-meta {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    color: #777d74;
    font-size: 10px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
