/* Bitchuu — shared styles.
   Palette and type lifted from the live Webflow build:
   teal #006e6d, gold #dfae58, cream #fdf9f4, card #f6efe6, mint #acd7d2.
   Headings: Fraunces (standing in for Alverata). Body: Inter. */

/* Colours, spacing, radii, shadows and type come from tokens.css, which is
   generated from tokens.json by tools/build-tokens.mjs. Only layout
   constants that are not design tokens are declared here. */
:root {
  /* 1160 of content inside 1180 + 2x22 padding = the live site's column: it
     starts at x=140 in a 1440 window, and every page head lines up with it. */
  --wrap: 1204px;
  /* The nav is in the flow, not floating over the page. Every hero and page
     head clears it by this plus --head-gap, so the distance from the nav to
     the first line of text is the same on all ten pages. */
  --nav-h: 78px;
  --head-gap: 100px;
  --line-teal: rgba(253, 249, 244, 0.26);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Every page is header / main / footer. Making the body a column and letting
   main grow pins the footer to the bottom of the viewport on short pages -- a
   shiur with no description, an error state, a filtered-to-nothing library --
   instead of leaving it floating halfway up with cream below it. */
body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); }

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 24, "WONK" 0, "opsz" 72;
  line-height: 1.13;
  letter-spacing: -0.012em;
  margin: 0 0 16px;
  color: var(--heading);
}

/* A weight scale rather than one bold for everything: the page should have
   a loud voice and a quieter one. A headline is one weight unless it is
   genuinely two statements (see .soft); `balance` keeps the lines even
   rather than leaving one word stranded. */
h1 { font-size: clamp(2.75rem, 5.2vw, 4rem); font-weight: 600; text-wrap: balance; }
h2 { font-size: clamp(1.65rem, 3.2vw, 2.45rem); font-weight: 600; }
h3 { font-size: 1.1rem; font-weight: 600; line-height: 1.35; letter-spacing: -0.005em; }

/* Lets a headline carry two weights — "Build Real Bitachon." loud,
   "One Shiur at a Time" soft. Only for a headline that is two statements;
   the break and the breath between them come from here, not from a <br>. */
.soft { font-weight: 400; }
h1 .soft { display: block; margin-top: 0.1em; font-size: 0.92em; text-wrap: balance; }
/* A break that only exists on a phone, where the line cannot hold. */
.br-mob { display: none; }
.soft-500 { font-weight: 500; }
.display-xl { font-size: clamp(2.3rem, 5vw, 3.9rem); font-weight: 700; line-height: 1.06; }
.display-lg { font-size: clamp(1.9rem, 3.8vw, 2.8rem); font-weight: 600; }
.display-sm { font-size: 1.32rem; font-weight: 600; font-family: var(--font-display); line-height: 1.3; }

p { margin: 0 0 15px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
/* the key section's container is 1376px wide on the live site */
.wrap-wide { width: 100%; max-width: 1420px; margin: 0 auto; padding: 0 22px; }
/* the learn collage column is a fixed 564px there, not a half-split */
.split-learn { display: grid; grid-template-columns: 564px 1fr; gap: 54px; align-items: center; }
@media (max-width: 1080px) { .split-learn { grid-template-columns: 1fr; gap: 32px; } }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin: 0 0 10px;
}
.lead { font-size: 1.03rem; color: var(--muted); max-width: 60ch; }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  border: 0;
  border-radius: 999px;
  padding: 13px 28px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, transform .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: var(--on-gold); }
.btn-gold:hover { background: var(--gold-dark); }
.btn-teal { background: var(--teal); color: var(--cream); }
.btn-teal:hover { background: var(--teal-dark); }
/* Default to ink on the page's own cream, which is where most of these sit
   (the library's "Show more", the daily archive's "Load earlier months").
   Cream-on-cream was invisible until hover. */
.btn-outline { border: 1.5px solid var(--gold-dark); color: var(--heading); background: transparent; }
.btn-outline:hover { background: var(--gold); color: var(--on-gold); border-color: var(--gold); }
/* On the teal panel it is the other way round: ink would vanish there. */
.panel .btn-outline { border-color: var(--gold); color: var(--cream); }
.panel .btn-outline:hover { background: var(--gold); color: var(--on-gold); }
.btn-block { display: block; width: 100%; text-align: center; }

/* ---------- header ---------- */

.site-header { position: absolute; top: 0; left: 0; right: 0; z-index: 60; }
.site-header.solid { position: sticky; background: var(--cream); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; gap: 26px; min-height: var(--nav-h); padding: 0 22px; max-width: var(--wrap); margin: 0 auto; }
/* The lockup is 215x48, so width sets the badge height: 200px gives ~45px,
   about 1.5x what it was. Capped again on a phone, where the header also has
   to hold the menu toggle and the Get Started button. */
.nav-logo img { width: 200px; }
.nav-links { display: flex; gap: 24px; margin-left: auto; list-style: none; padding: 0; }
.nav-links a { color: var(--ink); text-decoration: none; font-size: 14.5px; font-weight: 500; }
.nav-links a:hover { color: var(--teal); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 9px; padding: 7px 11px; font-size: 17px; cursor: pointer; }

@media (max-width: 920px) {
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--cream);
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px 22px 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links li { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: block; }
  .nav > .btn { display: none; }
}

/* ---------- sections ---------- */

section { padding: 76px 0; }
.section-tight { padding: 44px 0; }

/* mint → cream gradient hero, as on the live site */
.hero {
  position: relative;
  padding: calc(var(--nav-h) + var(--head-gap)) 0 96px;
  background: linear-gradient(180deg, var(--mint) 0%, var(--mint-soft) 46%, var(--cream) 100%);
}
.hero-grid { display: grid; grid-template-columns: 663fr 465fr; gap: 32px; align-items: center; }
.hero h1 { max-width: 15ch; }
@media (max-width: 920px) { .hero { padding: calc(var(--nav-h) + 48px) 0 64px; } .hero-grid { grid-template-columns: 1fr; gap: 36px; } }

/* ---------- blob cluster ----------
   Overlapping, varied sizes, soft shadows — a cluster rather than a grid.
   Positions are percentages inside a fixed-ratio box, so it scales. */

/* A spaced grid of mixed shapes — circles, squircle tiles, and wide ovals
   that span two columns. Deliberately no overlap and no drop shadows: the
   artwork is flat on the mint wash. */
.shape-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: center;
}
/* Artwork carries its own silhouette in the file, so nothing here rounds or
   crops it. Column ratios and the zero gaps are taken from the live site. */
.art-grid { display: grid; gap: 0; }
/* Live site lets most of these sit at their natural size inside the cell;
   only two carry width:100% (.image-2 / .image-3 there). */
.art-grid img { width: auto; max-width: 100%; height: auto; display: block; }
.art-grid .fill img { width: 100%; }

/* hero, right column — max-width 465px on the live site */
.hero-art { width: 100%; max-width: 465px; margin-left: auto; }
.hero-g1 { grid-template-columns: 1fr .5fr 1fr; }
.hero-g1 > *:nth-child(1) { grid-area: 1 / 1 / 2 / 3; }
.hero-g1 > *:nth-child(2) { grid-area: 1 / 3 / 2 / 4; }
.hero-g1 > *:nth-child(3) { grid-area: 2 / 1 / 3 / 2; }
.hero-g1 > *:nth-child(4) { grid-area: 2 / 2 / 3 / 4; }
.hero-g2 { grid-template-columns: 1fr .75fr .75fr; }

/* "Learn How It Works" — two grids, mirrored, max-width 564px */
.learn-art { width: 100%; max-width: 564px; }
.learn-g1 { grid-template-columns: 1.5fr 1fr; }
.learn-g2 { grid-template-columns: 1fr 1.5fr; }

@media (max-width: 920px) {
  .hero-art { margin-inline: auto; }
  .learn-art { margin-inline: auto; }
}

.shape-grid img:nth-child(1) { animation-delay: -0.4s; }
.shape-grid img:nth-child(2) { animation-delay: -2.4s; }
.shape-grid img:nth-child(3) { animation-delay: -4.1s; }
.shape-grid img:nth-child(4) { animation-delay: -1.5s; }
.shape-grid img:nth-child(5) { animation-delay: -5.2s; }
.shape-grid img:nth-child(6) { animation-delay: -3.3s; }
.shape-grid img:nth-child(7) { animation-delay: -6.0s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}

@media (max-width: 620px) {
  .shape-grid { gap: 12px; }
  .sh-oval { aspect-ratio: 1.5; }
}

/* Feature artwork. The clover, oval and rounded-rect silhouettes are baked
   into the files themselves, so this only sizes them — no mask, no crop. */
.art { width: 100%; height: auto; display: block; }
.art-center { margin-inline: auto; }

/* ---------- teal panel ---------- */

.panel {
  background: var(--teal);
  color: var(--cream);
  border-radius: var(--radius-2xl);
  padding: 58px 48px;
}
.panel > .center h2, .panel > .center h3, .panel > h2 { color: var(--cream); }
/* Cards sitting on the panel keep their own ink — otherwise the speaker
   names render cream on cream and vanish. */
.panel .speaker h3, .panel .card h3 { color: var(--heading); }
.panel .lead { color: var(--on-teal-soft); }
.panel .eyebrow { color: var(--mint); }
@media (max-width: 720px) { .panel { padding: 40px 24px; border-radius: var(--radius-lg); } }

/* ---------- grids & cards ---------- */

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 54px; align-items: center; }

/* Same two columns, wider gutter: the interior sections that pair a block of
   imagery with a block of text. This exists as a class because these sections
   used to carry `style="grid-template-columns:550fr 550fr"`, and an inline
   style outranks every media query - which left five of them holding two
   135px columns of body copy on a 375px screen. Never set a grid template
   inline on anything that has to reflow. */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
@media (max-width: 980px) { .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .grid-2, .grid-3, .grid-4, .split, .pair { grid-template-columns: 1fr; gap: 30px; } }

.card { background: var(--card); border-radius: var(--radius-lg); padding: 26px; }
.card-white { background: #fff; border: 1px solid var(--line); }

/* speaker cards sit on the teal panel */
.speaker { background: var(--cream); border-radius: var(--radius-md); overflow: hidden; display: flex; flex-direction: column; padding: 0; }
.speaker img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top center; }
.speaker-body { padding: 16px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.speaker .tag { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: 6px; }
.speaker h3 { font-size: 1.02rem; margin-bottom: 6px; }
.speaker p { color: var(--muted); font-size: 13.5px; line-height: 1.55; }
/* The sefer under the maggid shiur's name, and the way out of a card grid. */
.speaker .sefer-line { color: var(--gold-dark); font-weight: 600; font-size: 12.5px; margin-bottom: 6px; }
.speaker.is-soon { opacity: .9; }
.speaker.is-soon img { filter: grayscale(.35); }
/* Two words, one choice: the language a visitor learns in. */
.lang-switch { display: flex; justify-content: center; gap: 10px; margin: 0 0 28px; }
.lang-btn {
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  padding: 9px 22px; border-radius: 999px;
  border: 1px solid var(--line, rgba(26, 46, 44, .18));
  background: transparent; color: var(--muted);
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.lang-btn:hover { color: var(--heading); border-color: var(--teal); }
.lang-btn.is-on { background: var(--teal); border-color: var(--teal); color: #fff; }
@media (prefers-reduced-motion: reduce) { .lang-btn { transition: none; } }
/* On the dark panel a teal fill is invisible, so the chosen one goes light. */
.panel .lang-btn { border-color: rgba(255, 255, 255, .34); color: var(--on-teal-soft); }
.panel .lang-btn:hover { border-color: var(--gold); color: var(--cream); }
.panel .lang-btn.is-on { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }

/* The panel's closing call to action. Stacked, not a centred row: with the
   button and the secondary link side by side the PAIR is centred, which puts
   the button itself ~84px left of the panel's axis and reads as misaligned.
   Stacking centres the button on the panel at every width, and makes the
   primary/secondary order explicit instead of implying they are equals. */
.grid-cta {
  display: flex; flex-direction: column; align-items: center;
  gap: 14px; margin: 36px 0 0;
}

/* Read about the track, or just start it. Both sit at the foot of the card. */
.speaker-actions { margin-top: auto; padding-top: 16px; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
.speaker-actions .more { margin-top: 0; }
.btn-sm { padding: 9px 18px; font-size: 13.5px; }

.speaker .more { margin-top: auto; font-size: 13.5px; font-weight: 600; color: var(--teal); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.speaker .more::after {
  content: "→"; display: grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--gold); color: var(--on-gold); font-size: 12px;
}

/* ---------- numbered steps ---------- */

.steps-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
@media (max-width: 860px) { .steps-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .steps-row { grid-template-columns: 1fr; } }
.step-num {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--card); color: var(--ink);
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 17px;
  margin-bottom: 14px;
}
.step-row p { font-size: 15px; color: var(--ink); margin: 0; }

.step-list { display: grid; gap: 12px; }
.step-item { background: var(--card); border-radius: var(--radius-md); padding: 18px 22px; display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; }
.step-item .n { font-family: var(--font-display); font-weight: 700; color: var(--gold-dark); }
.step-item h3 { margin: 0 0 3px; font-size: 1rem; }
.step-item p { margin: 0; font-size: 14.5px; color: var(--muted); }

/* ---------- benefits ---------- */

.benefit { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; }
.benefit::before {
  content: "✓"; width: 26px; height: 26px; border-radius: 50%;
  background: var(--mint-soft); color: var(--teal);
  display: grid; place-items: center; font-size: 13px; font-weight: 700; margin-top: 2px;
}
.benefit p { margin: 0; font-size: 15px; }

/* ---------- large cream surface ---------- */

/* Matches .key-container on the live site: 40px radius, 120px/108px padding,
   max-width 1376, image and copy pushed apart. */
.surface {
  background: var(--card);
  border-radius: 40px;
  max-width: 1376px;
  margin-inline: auto;
  padding: 120px 108px;
}
@media (max-width: 1100px) { .surface { padding: 72px 56px; } }
@media (max-width: 760px) { .surface { padding: 36px 24px; border-radius: 26px; } }

/* the key image runs at its own size — 465x580 on the live site */
.key-art { width: 100%; max-width: 465px; height: auto; display: block; }

/* benefits: two columns, three rows, 28px/24px gaps, 48px icons */
.benefit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 28px; }
@media (max-width: 760px) { .benefit-grid { grid-template-columns: 1fr; gap: 20px; } }
.benefit2 { display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: start; }
.benefit2 img { width: 48px; height: 48px; display: block; }
.benefit2 p { margin: 0; font-size: 15px; line-height: 1.5; }

/* Hover shifts the badge from beige/gold to mint/teal. The icons are SVGs
   with the circle baked in, so a hue rotation recolours both at once. */
.benefit2 img { transition: filter .3s ease, transform .3s ease; }
.benefit2:hover img,
.benefit2:focus-within img { filter: hue-rotate(150deg) saturate(1.05); transform: translateY(-2px); }

/* signup: two equal columns, 32px gap */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; margin-top: 44px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-art { width: 100%; max-width: 564px; height: auto; display: block; margin-inline: auto; }

/* ---------- carousel arrows ---------- */

.carousel-nav { display: flex; gap: 18px; margin-top: 44px; }
.cbtn {
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--mint-soft); color: var(--teal);
  border: 0; display: grid; place-items: center;
  font-size: 18px; cursor: pointer;
  transition: background-color .25s ease, transform .25s ease;
}
.cbtn:hover { background: var(--mint); transform: translateY(-2px); }

/* horizontally scrollable testimonial rail */
/* Two full cards in view. Sized a few px under half so rounding, a
   scrollbar or a sub-pixel column width can never clip the second one. */
.rail {
  display: flex; gap: 20px; overflow-x: auto;
  scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: none;
}
.rail > * { flex: 0 0 calc(50% - 12px); }
@media (max-width: 860px) { .rail > * { flex: 0 0 calc(100% - 34px); } }

/* ---------- speakers rail ----------
   One row that scrolls, instead of a grid that grows. On a phone the section
   ran several screens deep and you had to scroll past every track to reach
   what follows; now it is one card tall and you swipe.

   The card width is the whole trick: three fit on a wide screen, so with the
   usual three tracks it looks exactly like the grid it replaced and does not
   scroll at all. Add a fourth and it starts scrolling on its own. */
.track-rail {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  /* Mandatory, so an arrow advances exactly one card. Proximity was tried and
     is worse here: it pulls past to a further snap point, moving two cards at
     a time.

     The smoothness lives in CSS rather than in scrollBy({behavior:"smooth"}).
     A programmatic smooth scroll is cancelled outright by some engines when
     snap is mandatory, and the rail then moves nothing at all -- which is
     exactly how the testimonial arrows below have been silently failing. With
     it in CSS the scroll always happens; smooth is the enhancement, not the
     mechanism. */
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  /* room above and below for the card's hover lift and its shadow, which an
     overflow container would otherwise clip */
  padding: 4px 0 10px;
}
.track-rail::-webkit-scrollbar { display: none; }
.track-rail > * { flex: 0 0 calc((100% - 44px) / 3); scroll-snap-align: start; }

@media (max-width: 900px) {
  .track-rail > * { flex: 0 0 calc((100% - 22px) / 2); }
}
@media (max-width: 640px) {
  /* Deliberately not 100%: the sliver of the next card is what tells somebody
     there is more to swipe to, without needing an arrow or a hint. */
  .track-rail > * { flex: 0 0 86%; }
  /* The blurb is the longest thing on the card and the first to be skipped on
     a phone. Dropping it keeps speaker, sefer and both buttons on one screen,
     so a swipe compares cards instead of scrolling through one. It stays on
     the track pages, where there is room to read it. */
  .track-rail .speaker-blurb { display: none; }
}

/* Under the cards, bottom right: the rail is the thing being read, so the
   controls sit after it rather than above the first card. */
.rail-nav { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
/* Swipe is the interaction on a touch screen; arrows there are clutter. */
@media (max-width: 860px) { .rail-nav { display: none !important; } }

/* testimonials: narrow copy column, wide rail */
.split-quotes { display: grid; grid-template-columns: 360px 1fr; gap: 40px; align-items: center; }
@media (max-width: 1000px) { .split-quotes { grid-template-columns: 1fr; gap: 28px; } }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }

/* ---------- testimonials ---------- */

.quote {
  /* blockquote ships with a 40px side margin by default, which silently
     added 80px between cards and pushed the second one out of view */
  margin: 0;
  background: var(--card);
  border-radius: 20px;
  padding: 32px;
  transition: background-color .3s ease, color .3s ease;
}
.quote .mark {
  font-family: var(--font-display); font-size: 54px; line-height: .72;
  color: var(--gold-dark); display: block; margin-bottom: 20px;
  transition: color .3s ease;
}
.quote p { font-size: 17px; line-height: 1.45; font-weight: 500; margin-bottom: 20px; }
.quote cite { font-style: normal; font-weight: 700; display: block; font-size: 15px; margin-bottom: 2px; }
.quote footer { color: var(--muted); font-size: 15px; transition: color .3s ease; }

/* Hover fills the card gold with white type — no lift. */
.quote:hover { background: var(--gold); color: var(--on-gold); transform: none; box-shadow: none; }
.quote:hover .mark { color: var(--on-gold); }
.quote:hover cite { color: var(--on-gold); }
.quote:hover footer { color: rgba(35, 32, 28, .72); }

/* ---------- video poster ---------- */

.video { position: relative; display: block; border-radius: var(--radius-2xl); overflow: hidden; max-width: 1160px; margin: 0 auto; cursor: pointer; }
.video iframe, .video video { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: #000; }
.video.playing::after, .video.playing .play { display: none; }
.video::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(0,0,0,.12), rgba(0,0,0,.28));
}
.video .play {
  position: absolute; z-index: 2; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 72px; height: 72px; border-radius: 50%;
  background: rgba(253,249,244,.9); color: var(--teal);
  display: grid; place-items: center; font-size: 24px; padding-left: 5px;
}

/* ---------- forms ---------- */

.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px; }
.panel .form-card { background: transparent; border: 0; padding: 0; }

/* Two forms on one page, and they were the wrong way round: the signup sat
   in half a column while "suggest a speaker" ran wide. Signing up is the
   thing we are asking for, so it gets the room and the weight. */
.form-card-wide {
  max-width: 920px; margin-inline: auto;
  background: var(--card); border-color: transparent; border-radius: 28px;
  padding: 42px clamp(22px, 4vw, 52px);
  box-shadow: 0 18px 46px rgba(26, 46, 44, .10);
}
.form-card-wide .form-grid { gap: 18px; }
.form-card-wide .btn { width: 100%; max-width: 320px; margin-inline: auto; display: block; text-align: center; }
.form-card-narrow { max-width: 560px; margin-inline: auto; padding: 24px; }
.form-card-narrow .form-grid { grid-template-columns: 1fr; }
.lead.small { font-size: 1rem; }
@media (max-width: 700px) { .form-card-wide { padding: 26px 20px; border-radius: 22px; } }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 680px) { .form-grid { grid-template-columns: 1fr; } }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }
.panel .field label { color: rgba(253,249,244,.85); }
.field .hint { font-weight: 400; opacity: .8; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"],
.field input[type="number"], .field select, .field textarea {
  width: 100%; padding: 15px 18px; font: inherit; font-size: 15px;
  color: var(--ink); background: #fff;
  border: 0; border-radius: 16px;
}
.field input::placeholder, .field textarea::placeholder { color: #9b958c; }
.field textarea { resize: vertical; min-height: 120px; line-height: 1.5; }

/* "Starting Week" sits as one white row: hint on the left, number on the right */
.field-inline {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; background: #fff; border-radius: 16px; padding: 13px 18px;
}
.field-inline > span:first-child { color: #9b958c; font-size: 15px; }
.field-inline .wk { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; }
.field-inline .wk input {
  width: 46px; padding: 4px 6px; font: inherit; font-size: 15px; font-weight: 700;
  text-align: center; border: 0; background: transparent; color: var(--ink);
}
.field-inline .wk input:focus { outline: 2px solid var(--gold-dark); border-radius: 8px; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--gold-dark); outline-offset: 1px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.5; }
.panel .check { color: rgba(253,249,244,.9); }
.check input { margin-top: 4px; flex: 0 0 auto; }

.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.form-msg { border-radius: var(--radius-md); padding: 13px 16px; margin-bottom: 16px; font-size: 14.5px; }
.form-msg[hidden] { display: none; }
.form-msg.ok { background: #e6f2ef; color: #00514f; border: 1px solid #b9dad5; }
.form-msg.err { background: #fdeceb; color: #8c2f2f; border: 1px solid #f2c6c4; }

/* ---------- pill link row ---------- */

.pill-row { display: grid; grid-template-columns: repeat(3, auto); gap: 14px; justify-content: center; }
@media (max-width: 680px) { .pill-row { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */

/* [hidden] must win. An inline `display:` beats the UA stylesheet's
   [hidden]{display:none}, which is how an empty <video> ended up showing on
   every shiur page. Cheap insurance against repeating it. */
/* The (240) 248-2488 hotline is not live yet -- it becomes a phone system
   later, so the markup stays and is only hidden. TO BRING THE NUMBER BACK:
   delete this one rule. Nothing else needs touching; every place the number
   appears carries .is-phone-hidden. The Worker's emails have their own
   switch, SUPPORT_PHONE_LIVE in src/index.js. */
.is-phone-hidden { display: none !important; }

/* Direct WhatsApp to the team is off: contact is by email for now. Kept
   separate from .is-phone-hidden on purpose -- turning the hotline back on is
   not the same decision as reopening WhatsApp as a support channel.
   TO BRING IT BACK: delete this one rule. */
.is-contact-hidden { display: none !important; }

/* Listener reviews on Tracks & Speakers, all five blocks -- four with real
   quotes and one "coming soon". Hidden until there is a settled position on
   showing them. No markup was touched: the quotes and their styling are
   exactly as designed.
   TO BRING THEM BACK: delete this one rule. */
.track-quotes { display: none !important; }

[hidden] { display: none !important; }

body > main { flex: 1 0 auto; }
body > .site-footer { margin-top: auto; }

.site-footer { background: var(--teal); color: var(--cream); padding: 60px 0 26px; }
.site-footer a { color: var(--cream); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.3fr .8fr .8fr 1.2fr; gap: 36px; padding-bottom: 30px; border-bottom: 1px solid var(--line-teal); }
@media (max-width: 940px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }
.footer-grid h4 { font-family: var(--font-body); font-size: 14px; margin: 0 0 14px; color: var(--cream); font-weight: 700; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 9px; font-size: 14.5px; }
.footer-tag { font-family: var(--font-display); font-size: 1.02rem; line-height: 1.35; margin-bottom: 16px; }
.footer-contact { font-size: 14.5px; line-height: 2; }
.newsletter { background: var(--cream); color: var(--ink); border-radius: var(--radius-lg); padding: 20px; }
.newsletter h4 { color: var(--ink); margin-bottom: 6px; }
.newsletter p { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.newsletter form { display: flex; gap: 8px; }
.newsletter input { flex: 1; min-width: 0; padding: 11px 14px; font: inherit; font-size: 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.newsletter button { flex: 0 0 auto; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--gold); color: var(--on-gold); font-size: 16px; cursor: pointer; }
.footer-bottom { padding-top: 20px; font-size: 13px; color: rgba(253,249,244,.72); display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }

/* The build credit. Quieter than the lines beside it -- present if you look
   for it, never competing with the copyright. */
.footer-credit { color: rgba(253,249,244,.5); }
.footer-credit a { color: inherit; letter-spacing: .02em; }
.footer-credit a:hover { color: var(--cream); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- motion ----------
   Everything eases rather than snaps. Elements rise into place once, when
   they first scroll into view; `.in` is added by signup.js. */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .75s cubic-bezier(.22, .61, .36, 1),
              transform .75s cubic-bezier(.22, .61, .36, 1);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }

/* Children of a .stagger container come in one after another. */
.stagger > * { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1); }
.stagger.in > * { opacity: 1; transform: none; }
.stagger.in > *:nth-child(1) { transition-delay: .00s; }
.stagger.in > *:nth-child(2) { transition-delay: .07s; }
.stagger.in > *:nth-child(3) { transition-delay: .14s; }
.stagger.in > *:nth-child(4) { transition-delay: .21s; }
.stagger.in > *:nth-child(5) { transition-delay: .28s; }
.stagger.in > *:nth-child(6) { transition-delay: .35s; }

/* softer surfaces + gentler hovers */
.card, .quote, .form-card, .speaker, .step-item {
  transition: transform .35s cubic-bezier(.22,.61,.36,1), box-shadow .35s ease;
}
.card, .quote, .form-card { box-shadow: 0 2px 10px rgba(26, 46, 44, .04); }
.speaker { box-shadow: 0 10px 26px rgba(0, 0, 0, .12); }
.speaker:hover, .card:hover, .quote:hover { transform: translateY(-4px); box-shadow: 0 18px 38px rgba(26, 46, 44, .12); }
.step-item:hover { transform: translateX(4px); }
.petal { transition: transform .6s cubic-bezier(.22,.61,.36,1); }
.petal:hover { transform: scale(1.02) rotate(1.2deg); }
.video img { transition: transform .8s cubic-bezier(.22,.61,.36,1); }
.video:hover img { transform: scale(1.03); }
.video .play { transition: transform .3s cubic-bezier(.22,.61,.36,1), background-color .3s ease; }
.video:hover .play { transform: translate(-50%, -50%) scale(1.08); background: var(--cream); }
.nav-links a { transition: color .2s ease; }
.btn { transition: background-color .25s ease, transform .25s cubic-bezier(.22,.61,.36,1), box-shadow .25s ease; }
.btn-gold:hover, .btn-teal:hover { box-shadow: 0 10px 22px rgba(201, 157, 84, .3); }

@media (prefers-reduced-motion: reduce) {
  .reveal, .stagger > * { opacity: 1; transform: none; transition: none; }
  .cluster img { animation: none; }
  html { scroll-behavior: auto; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ===================================================================
   Interior pages
   Geometry below was measured against the live Webflow site at 1440px,
   so these pages line up with the ones already signed off.
   =================================================================== */

/* ---------- page heads ----------
   Three shapes the live site uses: centred (About), a headline beside a
   paragraph column (Tracks, Resources, Sponsorship), and a wide headline with
   a narrow note column (Community). All sit on the same mint wash as the home
   hero, so the pages feel like one site. */

.page-head { padding: calc(var(--nav-h) + var(--head-gap)) 0 80px; background: linear-gradient(180deg, var(--mint) 0%, var(--mint-soft) 52%, var(--cream) 100%); }
/* .tall is for a head that a panel climbs into: the extra bottom padding is
   what .pull-up eats, so the panel rises into empty ground rather than over
   the headline. Change one and change the other. */
.page-head.tall { padding-bottom: 300px; }
.page-head h1 { margin-bottom: 0; }

/* centred: eyebrow, headline, one paragraph, optional button */
.head-center { max-width: 760px; margin-inline: auto; text-align: center; }
.head-center .lead { margin-inline: auto; }

/* headline left, paragraphs right — 663 / 465 on the live site */
.head-split { display: grid; grid-template-columns: 663fr 465fr; gap: 32px; align-items: center; }
.head-split .notes { display: grid; gap: 14px; }
.head-split .notes p { margin: 0; }
.lead.strong, .head-split .notes .strong { font-weight: 500; color: var(--ink); }

/* Community: wide headline, narrow note column */
.head-wide { display: grid; grid-template-columns: 737fr 328fr; gap: 55px; align-items: center; }
.head-wide .notes { display: grid; gap: 16px; align-content: start; }
.head-wide .notes p { margin: 0; }

@media (max-width: 920px) {
  .page-head { padding: calc(var(--nav-h) + 48px) 0 56px; }
  .head-split, .head-wide { grid-template-columns: 1fr; gap: 26px; }
}

/* A panel that climbs into the page head above it, the way the live
   Resources and Tracks pages do. The head carries the matching bottom pad. */
.pull-up { margin-top: -200px; }
@media (max-width: 920px) {
  .page-head.tall { padding-bottom: 190px; }
  .pull-up { margin-top: -118px; }
}

/* ---------- prose (Privacy, Terms) ---------- */

.prose { max-width: 820px; margin-inline: auto; }
.prose h2 { font-size: 1.38rem; line-height: 1.3; margin: 40px 0 12px; }
.prose h2:first-of-type { margin-top: 34px; }
.prose p, .prose li { color: var(--muted); font-size: 1.01rem; line-height: 1.68; }
.prose p { margin: 0 0 14px; }
.prose ul { margin: 0 0 16px; padding-left: 20px; }
.prose li { margin-bottom: 7px; }
.prose a { color: var(--teal); font-weight: 600; }
.prose strong { color: var(--ink); }
.prose .effective { font-size: 14px; letter-spacing: .04em; text-transform: uppercase; color: var(--gold-dark); font-weight: 700; }

/* ---------- link card (Resources) ----------
   Image, then title and blurb, then the link pinned to the bottom so the
   buttons line up across a row of cards of unequal text length. */

.link-card { background: var(--tint); border-radius: 28px; padding: 28px; display: flex; flex-direction: column; gap: 28px; }
.link-card > img { width: 100%; height: auto; border-radius: 14px; }
.link-card .body { display: flex; flex-direction: column; gap: 12px; }
.link-card h3 { font-family: var(--font-body); font-size: 1.32rem; font-weight: 500; line-height: 1.27; margin: 0; }
.link-card p { margin: 0; font-size: 1.06rem; line-height: 1.33; }
.link-card .go { margin-top: auto; }

/* on the teal panel */
.panel .link-card h3 { color: var(--on-teal); }
.panel .link-card p { color: var(--on-teal-soft); }

/* underlined text link with a chevron, the panel's secondary action */
.go { display: inline-flex; align-items: center; gap: 10px; font-size: 1.06rem; font-weight: 500; text-decoration: none; color: var(--ink); border-bottom: 1px solid currentColor; padding-bottom: 2px; width: fit-content; transition: color .15s ease; }
.go img { width: 20px; height: 20px; }
.go:hover { color: var(--teal); }
.panel .go { color: var(--on-teal); }
.panel .go:hover { color: var(--mint); }

/* a filled pill used inside cards — the card-level action, not a page CTA */
.btn-card { display: flex; align-items: center; justify-content: center; gap: 12px; background: var(--gold); color: var(--on-gold); border-radius: 32px; padding: 14px 20px; font-size: 15px; font-weight: 600; text-decoration: none; transition: background-color .15s ease; }
.btn-card:hover { background: var(--gold-dark); }
.btn-card img { width: 18px; height: 18px; }

/* ---------- book card (Resources) ---------- */

.book-card { display: flex; flex-direction: column; gap: 24px; }
.book-card > img { width: 100%; height: auto; }
.book-card .body { display: flex; flex-direction: column; gap: 12px; }
.book-card h3 { font-family: var(--font-body); font-size: 1.32rem; font-weight: 500; line-height: 1.27; margin: 0; max-width: 310px; }
.book-card p { margin: 0; color: var(--muted); }
.book-card .btn-card { margin-top: auto; }

/* ---------- shiur card (Resources): image beside the details ---------- */

.shiur-card { background: var(--tint); border-radius: 28px; padding: 24px; display: flex; gap: 28px; }
.shiur-card > img { width: 250px; flex: 0 0 250px; border-radius: 15px; object-fit: cover; }
.shiur-card .body { display: flex; flex-direction: column; justify-content: space-between; gap: 20px; flex: 1; }
.shiur-card .meta { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--muted); }
.shiur-card .meta span + span::before { content: "·"; margin-right: 6px; }
.shiur-card h3 { font-family: var(--font-body); font-size: 1.1rem; font-weight: 500; line-height: 1.33; margin: 10px 0 0; }
.shiur-card .by { font-size: 14px; font-weight: 500; color: var(--muted); margin: 0; }
@media (max-width: 620px) {
  .shiur-card { flex-direction: column; }
  .shiur-card > img { width: 100%; flex: none; }
}

/* ---------- track block (Tracks & Speakers) ----------
   Four columns on the live site: the speaker spans the first three, the track
   details sit in the fourth, and the testimonials fill the row beneath. With
   two testimonials instead of three the grid goes to six columns so each one
   can span two. Both variants are below. */

/* The way back from a single track to the index. */
.crumb { color: inherit; text-decoration: none; }
.crumb:hover { text-decoration: underline; }
.upcoming.one { max-width: 420px; margin-inline: auto; }


.track-meta { grid-column: 4; grid-row: span 2; margin-left: 20px; }
.track-aside { margin-left: 20px; }

/* the speaker: portrait beside name, blurb and the join button */
/* The deeper gold, not the button gold. The live site runs two: #c99d54 for
   this card and #ffc858 for its buttons. Over a card this size the lighter
   fill goes washy and stops reading as a distinct surface against the cream
   container behind it, which is the difference the two golds exist for. Ink
   on this measures 6.5:1. */
/* Matched to the live site exactly: fill #c99d54, text #333, button #f9fafa.
   Measured from bitchuu.com rather than approximated. #333 on this gold is
   5.07:1, so the original treatment already clears AA - no trade to make. */

/* the details: a label column and a value column */
.track-meta, .track-quote, .track-aside { background: var(--cream); border-radius: 28px; padding: 24px; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.card-head img { width: 24px; height: 24px; }
.card-head h3 { font-family: var(--font-body); font-size: 1.32rem; font-weight: 500; line-height: 1.27; margin: 0; }
.track-meta dl { display: grid; grid-template-columns: 115px 1fr; gap: 16px 20px; margin: 0; align-items: baseline; }
.track-meta dt { font-size: 14px; font-weight: 500; line-height: 1.43; text-transform: uppercase; color: var(--muted); }
.track-meta dd { margin: 0; font-weight: 600; font-size: 15px; }

/* a short testimonial, quote mark on top, name and town at the foot */
.track-quote { display: flex; flex-direction: column; justify-content: space-between; gap: 12px; padding: 16px; }
.track-quote > img { width: 28px; height: 28px; }
.track-quote p { margin: 0; font-size: 1rem; line-height: 1.38; }
.track-quote .who { font-weight: 600; font-size: 15px; margin: 0; }
.track-quote .where { color: var(--muted); font-size: 14px; margin: 0; }

.track-aside { display: flex; flex-direction: column; gap: 12px; }

@media (max-width: 1100px) {
  .track-meta { grid-column: span 2; grid-row: auto; margin-left: 0; }
  .track-aside { grid-column: span 2; margin-left: 0; }
}
@media (max-width: 700px) {
  .track-meta,
  .track-quote,
  .track-aside { grid-column: span 1; }
}

/* ---------- audio sample ---------- */

.audio { background: #fff; border-radius: 28px; padding: 14px; display: flex; align-items: center; gap: 12px; }
.audio button { flex: 0 0 34px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--teal); color: #fff; font-size: 13px; cursor: pointer; display: grid; place-items: center; padding: 0; }
.audio button:hover { background: var(--teal-dark); }
.audio .t { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--muted); flex: 0 0 auto; }
.audio input[type="range"] { flex: 1; min-width: 0; height: 4px; appearance: none; border-radius: 2px; background: var(--line); cursor: pointer; }
.audio input[type="range"]::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--teal); }
.audio input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--teal); }
.audio-note { font-size: 14px; color: var(--muted); margin: 0; }

/* ---------- upcoming speakers ---------- */

.upcoming { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.upcoming-card { background: var(--card); border-radius: 28px; padding: 32px; display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.upcoming-card img { width: 100%; max-width: 250px; aspect-ratio: 1; border-radius: 50%; object-fit: cover; object-position: top center; }
.upcoming-card .sefer, .upcoming-card .lang { font-size: 14px; font-weight: 500; color: var(--muted); margin: 0; letter-spacing: .04em; }
.upcoming-card h3 { font-family: var(--font-body); font-size: 1.32rem; font-weight: 500; margin: 0; }
.upcoming-card .body { display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 900px) { .upcoming { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .upcoming { grid-template-columns: 1fr; } }

/* ---------- sponsorship tiers ---------- */

.tier { background: var(--tint); border-radius: 28px; padding: 32px; display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.tier .who { display: flex; align-items: center; gap: 20px; }
.tier .who img { width: 64px; height: 64px; flex: none; }
.tier h3 { font-family: var(--font-body); font-size: 1.32rem; font-weight: 500; margin: 0 0 4px; color: var(--on-teal); }
.tier p { margin: 0; color: var(--on-teal-soft); font-size: 1.01rem; line-height: 1.4; }
.tier .btn-card { flex: 0 0 184px; padding: 16px 40px; }
.tier .rates { display: flex; flex-wrap: wrap; gap: 40px; margin-top: 24px; width: 100%; }
.tier .rates span { display: flex; align-items: center; gap: 8px; color: var(--on-teal); font-size: 15px; }
.tier .rates img { width: 22px; height: 22px; }
@media (max-width: 760px) {
  .tier { flex-direction: column; align-items: stretch; }
  .tier .btn-card { flex: none; }
  .tier .rates { gap: 14px; flex-direction: column; }
}

/* On a narrow phone the 64px icon beside the tier copy leaves the copy 143px
   - about eighteen characters a line. Put the icon above it instead. */
@media (max-width: 480px) {
  .tier .who { flex-direction: column; align-items: flex-start; gap: 14px; }
}

/* ---------- sponsorship form ---------- */

.choices { display: flex; flex-wrap: wrap; gap: 16px; }
.choices.compact { gap: 12px; }
.choice { background: #fff; color: var(--ink); border: 1px solid transparent; border-radius: 16px; padding: 13px 18px; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.choice[aria-pressed="true"] { background: var(--gold); color: var(--on-gold); }
.choices.compact .choice { border-radius: 999px; padding: 11px 20px; }
.text-label { display: block; font-size: 13.5px; font-weight: 600; margin: 26px 0 10px; color: var(--on-teal-soft); }
.text-label:first-child { margin-top: 0; }
.pay-grid { display: flex; flex-wrap: wrap; gap: 28px; }
.pay-grid label { display: flex; align-items: center; gap: 9px; font-size: 15px; color: var(--on-teal); cursor: pointer; }
.zelle { background: rgba(255, 255, 255, .08); border-radius: 16px; padding: 16px; margin-top: 16px; }
.zelle h4 { margin: 0 0 4px; font-family: var(--font-body); font-size: 14px; font-weight: 600; color: var(--on-teal); }
.zelle p { margin: 0; color: var(--mint); font-weight: 600; }
.office { display: flex; flex-wrap: wrap; gap: 32px; }
.office div { display: flex; align-items: center; gap: 12px; }
.office img { width: 44px; height: 44px; }
.office .k { font-size: 13px; color: var(--on-teal-soft); margin: 0; }
.office .v { font-size: 15px; font-weight: 600; color: var(--on-teal); margin: 0; }
.office a { color: inherit; text-decoration: none; }

/* ---------- community ---------- */

.community-hero-art { width: 100%; max-width: 1120px; height: auto; display: block; margin: 36px auto 0; border-radius: 28px; }
.split-form { display: grid; grid-template-columns: 480fr 640fr; gap: 40px; align-items: stretch; }
.split-form > img { width: 100%; height: 100%; object-fit: cover; border-radius: 28px; }
.form-panel { background: var(--teal); color: var(--on-teal); border-radius: 32px; padding: 64px; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.form-panel h2 { color: var(--on-teal); margin: 0; }
.form-panel > p { color: var(--on-teal-soft); margin: 0 0 12px; }
@media (max-width: 920px) {
  .split-form { grid-template-columns: 1fr; }
  .form-panel { padding: 40px 28px; }
}

/* the WhatsApp band: a centred block with an image at each shoulder */
.flanked { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.flanked > img { flex: none; height: auto; }
.flanked .middle { max-width: 700px; text-align: center; }
.flanked .middle p { color: var(--muted); margin: 0 auto 20px; }
@media (max-width: 1000px) { .flanked > img { display: none; } .flanked .middle { margin-inline: auto; } }

/* ---------- contact ---------- */

.connect { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.connect-card { background: var(--card); border-radius: 24px; padding: 28px; display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }
.connect-card h3 { font-family: var(--font-body); font-size: 1.1rem; font-weight: 600; margin: 0 0 6px; }
.connect-card p { margin: 0; color: var(--muted); font-size: 14.5px; }
.connect-card img { width: 96px; height: 96px; transition: transform .25s ease; }
.connect-card:hover img { transform: translateY(-3px) scale(1.03); }
.connect-card .btn-card { width: 100%; margin-top: auto; }
@media (max-width: 900px) { .connect { grid-template-columns: 1fr; } }

.upload { display: flex; flex-direction: column; gap: 8px; }
.upload input[type="file"] { font: inherit; font-size: 14px; color: var(--on-teal); }
.upload input[type="file"]::file-selector-button { font: inherit; font-size: 14px; font-weight: 600; background: #fff; color: var(--ink); border: 0; border-radius: 999px; padding: 9px 18px; margin-right: 12px; cursor: pointer; }

/* ---------- small helpers these pages need ---------- */

.collage { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.collage img { width: 100%; height: 100%; object-fit: cover; border-radius: 20px; }
.collage img.tall { grid-row: span 3; }
/* Two-up at every width. Unrolling four photographs into four full-width rows
   costs a phone four screenfuls of scrolling to get past one collage; the live
   site keeps it two-up as well. */
@media (max-width: 760px) { .collage { gap: 16px; } .collage img.tall { grid-row: auto; } }

.pointers { display: grid; gap: 24px; max-width: 1000px; margin-inline: auto; }
.pointer { display: flex; align-items: center; gap: 16px; }
.pointer img { width: 44px; height: 44px; flex: none; }
.pointer p { margin: 0; color: var(--on-teal); font-size: 1.01rem; line-height: 1.5; }

.checks { display: grid; gap: 32px; max-width: 564px; }
.check-row { display: flex; align-items: flex-start; gap: 14px; }
.check-row img { width: 24px; height: 24px; flex: none; margin-top: 2px; }
.check-row p { margin: 0; font-size: 1.01rem; line-height: 1.5; }

.inline-note { display: flex; align-items: flex-start; gap: 12px; margin-top: 24px; }
.inline-note img { width: 28px; height: 28px; flex: none; }
.inline-note p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }

.row-form { display: flex; gap: 16px; }
.row-form .field { flex: 1; margin: 0; }
.row-form .btn { flex: none; }
@media (max-width: 620px) { .row-form { flex-direction: column; } .row-form .btn { width: 100%; } }

.wide-panel { max-width: 1376px; margin-inline: auto; padding: 100px 108px; }
@media (max-width: 1000px) { .wide-panel { padding: 56px 32px; } }
@media (max-width: 620px) { .wide-panel { padding: 40px 20px; border-radius: 28px; } }

/* ---------- numbered step card (About) ----------
   Each card ships two sets of artwork, a resting one and a hover one. Rather
   than recolour the SVGs we cross-fade between them, which is what the live
   site does and keeps the drawn detail intact. */

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.step-card { background: var(--card); border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 12px; transition: transform .35s cubic-bezier(.22,.61,.36,1), box-shadow .35s ease; }
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.step-card h3 { font-family: var(--font-body); font-size: 1.06rem; font-weight: 600; margin: 0; }
.step-card p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.step-ico { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.swap { position: relative; display: inline-block; line-height: 0; }
.swap img { display: block; }
.swap .b { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .2s ease; }
.step-card:hover .swap .b, .connect-card:hover .swap .b { opacity: 1; }
@media (max-width: 1000px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* two collages that butt together with no gap, as on About and Sponsorship */
.stack { display: grid; gap: 0; align-content: start; }
.band { display: grid; gap: 0; }
/* height:100% makes the tiles in a band meet exactly, with no hairline gap
   between them; object-fit keeps them from stretching to get there. */
.band img { width: 100%; height: 100%; object-fit: cover; display: block; }
.band.two { grid-template-columns: 330fr 220fr; }
.band.three { grid-template-columns: 211fr 169fr 169fr; }

/* the decorative star that sits beside the About headline */

/* Tracks page hero art: two zero-gap bands inside a 455px box, measured off
   the live page. The first band's left tile spans two of three columns. */
.tracks-art { width: 100%; max-width: 455px; margin-left: auto; }
.tracks-g1 { grid-template-columns: 182fr 91fr 182fr; }
.tracks-g1 > *:nth-child(1) { grid-column: span 2; }
.tracks-g2 { grid-template-columns: 182fr 136.5fr 136.5fr; }
@media (max-width: 920px) { .tracks-art { margin-inline: auto; } }

/* .track-quote is a <blockquote>, which ships with a 40px side margin by
   default — the same trap that broke the home-page rail. Zero it explicitly. */
.track-quote { margin: 0; }
.track-quote footer { display: contents; }

/* A track with no testimonials of its own: the audio card takes the whole
   bottom row instead of leaving a hole where the quotes would be. */


/* ---------- phones ----------
   Two deliberate departures from the desktop layout.

   Headings. The clamp floors were set for desktop and bottom out near 34px and
   26px on a phone, where a section heading reads as body copy. The live site
   sets 44 and 36 flat below its tablet breakpoint; we match it, so the first
   heading on every page carries the same weight it does on bitchuu.com.

   Imagery. Each page keeps its first set of pictures - the hero art, or the
   opening collage - and drops the decorative sets that come after it. Stacked
   one per screenful, those sets put five or six photographs between a visitor
   and the next sentence. Anything carrying information is never hidden:
   speaker portraits, sefarim, shiur thumbnails, icons and the logo all stay.
   Add `extra-art` to a decorative group to opt it out of phone layouts. */
@media (max-width: 620px) {
  h1 { font-size: 2.75rem; }
  /* The home hero is the page on a phone — give it the room. */
  .hero-home h1 { font-size: 3.25rem; }
  .br-mob { display: inline; }
  h2 { font-size: 2.25rem; }
  .display-xl { font-size: 2.75rem; }
  .display-lg { font-size: 2.25rem; }

  .extra-art { display: none; }
}

/* A panel that sets its desktop padding per instance through --pad and steps
   down to a phone-safe gutter below. The desktop value must not be an inline
   `padding` declaration: an inline style outranks every media query, so a
   `padding:80px 100px` left the contact form 131px wide on a 375px screen.
   Setting --pad inline is safe - the rules below override `padding` itself.
   This sits at the end of the file so that `.roomy` owns the padding of
   whatever carries it, rather than losing a specificity tie to .panel or
   .surface further up. */
.roomy { padding: var(--pad, 58px 48px); }
@media (max-width: 1000px) { .roomy { padding: 56px 40px; } }
@media (max-width: 620px) { .roomy { padding: 40px 22px; } }

/* ---------- the library ----------
   Built on the site's own tokens, not the ones in the Claude Design bundle:
   that export predates the lighter gold and the softened heading black, and
   still carries on-gold: #ffffff, which fails contrast at 2.0:1.

   Shiur titles arrive from the database in Yiddish, Hebrew or English, so
   every element that renders one sets dir="auto" in the markup and these
   rules stay direction-agnostic - padding-inline rather than padding-left. */

.lib-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.lib-head h2 { margin: 0; font-size: clamp(1.5rem, 2.4vw, 1.9rem); }
.lib-count { font-size: 15px; color: var(--muted); }

/* --- series --- */
.series-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; margin-top: 20px; }
.series-card {
  text-align: start; font: inherit; color: inherit; cursor: pointer;
  background: var(--card); border: 2px solid transparent; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); padding: 22px; display: flex; flex-direction: column;
  transition: box-shadow .22s ease, transform .22s ease, border-color .15s ease;
}
.series-card:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }

/* --- telling one series from another ---------------------------------
   A dozen cards of identical cream with only the wording to separate them
   is hard to read and, as the client put it, dizzying. Two things fix it:
   the speaker's face, and a colour for the language.

   The language shows as a bar down the leading edge rather than a tinted
   background. A background would fight the selected state, which is already
   --mint-soft, and tinting every card would trade one flat wall for a
   busier one. The bar is drawn as a pseudo-element, not a border, because
   the selected state sets border-color on all four sides and would recolour
   it; and not as an inset shadow, because :hover replaces the shadow.

   Colours come from the palette, so both themes follow automatically. */
.series-card {
  position: relative;
  overflow: hidden;
  /* The gap between the portrait and its language ring. It has to match
     whatever the card is sitting on, so it follows the selected state
     instead of being hard-wired to the resting colour and leaving a cream
     halo on a selected card. */
  --art-gap: var(--card);
}
.series-card[aria-pressed="true"] { --art-gap: var(--mint-soft); }
.series-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--line);          /* a series with no language set */
}
.series-card.is-lang-yiddish::before { background: var(--teal); }
.series-card.is-lang-english::before { background: var(--gold-deep); }

.series-art {
  width: 56px; height: 56px; flex: none;
  border-radius: 50%; object-fit: cover;
  background: var(--tint);          /* while it loads, and behind a transparent png */
  /* Two rings: the inner one in the card colour separates the portrait from
     the outer one, which carries the language. */
  box-shadow: 0 0 0 2px var(--art-gap), 0 0 0 4px var(--line);
}
.series-card.is-lang-yiddish .series-art { box-shadow: 0 0 0 2px var(--art-gap), 0 0 0 4px var(--mint); }
.series-card.is-lang-english .series-art { box-shadow: 0 0 0 2px var(--art-gap), 0 0 0 4px var(--gold); }

/* A card with a portrait no longer needs the title pushed as far down. */
.series-card .series-top:has(.series-art) + h3 { margin-top: 14px; }
.series-card[aria-pressed="true"] { background: var(--mint-soft); border-color: var(--teal); }
.series-card.is-empty { cursor: default; opacity: .72; }
.series-card.is-empty:hover { box-shadow: var(--shadow-card); transform: none; }
.series-card h3 { font-size: 1.15rem; line-height: 1.3; margin: 16px 0 0; text-wrap: pretty; }
.series-meta { font-size: 14px; color: var(--muted); margin: 6px 0 0; }
.series-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 56px; }
.series-badge {
  font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  background: var(--mint-soft); color: var(--teal); border-radius: 999px; padding: 5px 11px;
}
/* Three states, set on the series, never inferred: a series can be complete
   with ten shiurim or ongoing with none uploaded yet. */
.series-badge.is-ongoing { background: var(--mint-soft); color: var(--teal); }
.series-badge.is-complete,
.series-badge.is-completed { background: var(--card); color: var(--muted); border: 1px solid var(--line); }
.series-badge.is-coming_soon { background: var(--line); color: var(--muted); }
.series-who { font-size: 13.5px; color: var(--ink); margin: 8px 0 0; font-weight: 500; }
.series-topics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.topic {
  font-size: 12px; font-weight: 600; color: var(--teal);
  background: var(--tint); border-radius: 999px; padding: 3px 9px;
}
.shiur-meta .topic { font-size: 11.5px; }

/* Skeletons: the archive is a network call, so the grid has a shape before it lands. */
.series-card.is-skeleton { pointer-events: none; gap: 12px; }
.sk { display: block; background: var(--line); border-radius: 8px; animation: libPulse 1.4s ease-in-out infinite; }
.sk-dot { width: 86px; height: 22px; border-radius: 999px; }
.sk-line { height: 20px; width: 80%; }
.sk-line.short { height: 15px; width: 50%; }
@keyframes libPulse { 0%, 100% { opacity: .5 } 50% { opacity: 1 } }

/* --- filters --- */
.filter-bar { position: sticky; top: 0; z-index: 15; background: var(--cream); padding: 14px 0; margin-top: 18px; border-bottom: 1px solid var(--line); }
/* One row on desktop. Flex rather than fixed columns because the language and
   topic selects only exist once the archive has something to put in them, so
   the number of controls here is 3, 4 or 5 depending on the data. */
.filter-grid { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.filter-grid > .lib-search { flex: 2 1 200px; }
.filter-grid > select { flex: 1 1 140px; min-width: 0; }
.lib-search, .filter-grid select {
  font: inherit; font-size: 15px; width: 100%; box-sizing: border-box; height: 48px;
  padding: 0 16px; border: 1px solid var(--line); border-radius: var(--radius-md);
  background: var(--white); color: var(--ink);
}
.lib-search:focus-visible, .filter-grid select:focus-visible { outline: 2px solid var(--gold-dark); outline-offset: 2px; }
.pills { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.pill {
  font: inherit; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  background: var(--mint-soft); color: var(--teal); border: 0; border-radius: 999px; padding: 7px 14px;
}
.pill .x { font-size: 16px; line-height: 1; }
.pill-clear { font: inherit; font-size: 15px; font-weight: 600; color: var(--teal); background: none; border: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.series-strip { margin-top: 20px; background: var(--teal); color: var(--on-teal); border-radius: var(--radius-lg); padding: 20px 24px; }

/* --- the list --- */
.shiur-list { list-style: none; padding: 0; margin: 8px 0 0; }
.shiur-row {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 14px 12px; margin: 0 -12px; border-bottom: 1px solid var(--line);
  border-radius: var(--radius-sm); transition: background .15s ease;
}
.shiur-row:hover { background: var(--card); }
.shiur-row.is-current { background: var(--card); }
.shiur-n { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: var(--muted); text-align: end; font-variant-numeric: tabular-nums; }
.shiur-row.is-current .shiur-n { color: var(--teal); }
.shiur-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
/* dir="auto" per title gets the characters in the right order - without it a
   Yiddish title renders its "#1" at the wrong end. But it also makes an RTL
   title align right while its English series line below stays left, which
   splits every row down the middle. Ordering is per-string; alignment follows
   the page. */
.shiur-title { font-family: var(--font-display); font-size: 1.08rem; font-weight: 600; line-height: 1.35; color: var(--heading); text-wrap: pretty; text-align: left; }
.series-card h3, .mini-title { text-align: left; }
/* What the shiur covers, under its title. Smaller and quieter than the title
   so the two read as a pair rather than competing. text-align: left for the
   same reason .shiur-title has it: dir="auto" must order the characters of a
   Hebrew line without dragging that line to the other side of the row. */
.shiur-desc {
  font-size: 13px; line-height: 1.45; color: var(--muted); text-align: left;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.shiur-meta { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.shiur-lang { white-space: nowrap; }
/* The part of the sefer a run of shiurim belongs to — "Shaar HaBechina" and
   the rest. A heading inside the list rather than above it, so an 85-week
   series reads as the handful of shaarim it actually is. role="presentation"
   keeps it out of the numbering: it sits in an <ol> whose numbers are the
   shiurim, and it is not one. */
.shiur-section {
  list-style: none;
  margin: 26px 0 2px;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--teal);
}
.shiur-section:first-child { margin-top: 4px; }
/* The run length. Tabular figures so the minute columns line up down the
   list, and a touch darker than the rest of the meta line because it is the
   one fact on it that people scan for rather than read. */
.shiur-len {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  font-weight: 600;
}
/* Fixed columns, so every row's buttons sit under the row above's. The video
   and summary columns only exist when something in the current result set has
   one — see render() in library.js, which sets these classes and renders a
   matching number of slots. */
.shiur-list { --acts: 40px 40px 40px; }
.shiur-list.has-video { --acts: 40px 40px 40px 66px; }
.shiur-list.has-pdf { --acts: 40px 40px 40px 56px; }
.shiur-list.has-video.has-pdf { --acts: 40px 40px 40px 66px 56px; }
.shiur-acts { display: grid; grid-template-columns: var(--acts); gap: 6px; align-items: center; }
.shiur-acts > .icon-btn, .shiur-acts > .play-btn { width: 100%; min-width: 0; padding: 0; }
.act-gap { display: block; }

/* The shiur's picture, in place of the running number. */
.shiur-icon {
  width: 40px; height: 40px; border-radius: 10px; object-fit: cover;
  background: var(--card); display: block;
}

.play-btn {
  width: 40px; height: 40px; flex: none; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--teal); color: var(--on-teal); font-size: 13px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; transition: background .15s ease;
}
.play-btn:hover { background: var(--teal-dark); }
.icon-btn {
  min-width: 40px; height: 40px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  font: inherit; font-size: 13px; font-weight: 600; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; transition: background .15s ease;
}
.icon-btn:hover { background: var(--card); color: var(--ink); }
/* A video that lives on another site says so before it is clicked: the arrow
   is the same convention the rest of the web uses for leaving a page. */
.icon-btn .ext-mark { margin-inline-start: 5px; font-size: 11px; line-height: 1; opacity: .75; }
.icon-btn.is-external { border-style: dashed; }
.icon-btn.is-external:hover .ext-mark { opacity: 1; }
/* "Copied" floats above the button instead of widening it, so confirming a
   copy never nudges the row's other buttons out of line. */
.icon-btn.is-link { position: relative; }
.copied {
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--teal); color: var(--on-teal); font-size: 12px; font-weight: 600;
  padding: 4px 9px; border-radius: 6px; white-space: nowrap; pointer-events: none; z-index: 5;
}

.lib-empty { background: var(--card); border-radius: var(--radius-lg); padding: 48px 32px; text-align: center; margin-top: 20px; }
.lib-empty h3 { font-size: 1.25rem; margin: 0 0 8px; }
.lib-empty p { margin: 0 auto; max-width: 42ch; color: var(--muted); font-size: 15px; }
.lib-empty .btn { margin-top: 20px; }
.lib-error { color: var(--muted); }
.lib-more { display: flex; justify-content: center; margin-top: 28px; }
/* .btn sets an explicit display, which beats the [hidden] attribute's
   display:none — so "Show more" stayed on screen for every series shorter
   than one page, reading "Show -13 more". The wrapper goes too, or its 28px
   of margin would leave a gap under the last shiur. */
#more[hidden] { display: none; }
.lib-more:has(> #more[hidden]) { display: none; }

/* --- the player --- */
/* Fixed to the bottom, so the page needs room to scroll past it. */
body:has(.mini:not([hidden])) { padding-bottom: 132px; }
.mini {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--cream); border-top: 1px solid var(--line);
  box-shadow: 0 -8px 30px rgba(26, 46, 44, .08);
}
.mini-inner { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; padding-bottom: 12px; }
.mini-top { display: flex; align-items: center; gap: 14px; }
.mini-play {
  width: 48px; height: 48px; flex: none; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--teal); color: var(--on-teal); font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center; transition: background .15s ease;
}
.mini-play:hover { background: var(--teal-dark); }
.mini-meta { min-width: 0; flex: 1 1 200px; }
.mini-title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; line-height: 1.3; color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-sub { font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-controls { display: flex; align-items: center; gap: 6px; }
/* The where-you-left-off line, in the mini player and on a shiur's own page.
   Quiet by design: it explains a seek that already happened, and carries the
   way out of it for anyone who wanted the beginning. */
.shiur-audio-only { margin: 0 0 8px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.mini-resume { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.mini-resume .linkish, .linkish {
  background: none; border: 0; padding: 0; font: inherit; color: var(--teal);
  text-decoration: underline; cursor: pointer;
}
.linkish:hover { color: var(--teal-dark); }

.mini-seek { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mini-seek input { flex: 1; margin: 0; cursor: pointer; height: 20px; accent-color: var(--teal); }
.mini-seek .t { width: 40px; }
.mini-seek .t:last-child { text-align: end; }

@media (max-width: 860px) {
  /* Search takes its own row, the selects pair up beneath it. */
  .filter-grid > .lib-search { flex: 1 1 100%; }
  .filter-grid > select { flex: 1 1 calc(50% - 6px); }
}
@media (max-width: 620px) {
  /* One card per row on a phone. Two columns meant each card was about
     150px wide, which the portrait, the status badge and a title like
     "Rabbi Ephraim Wachsman — Building a Life of Bitachon" cannot share.
     Full width gives the title room to breathe and the portrait somewhere
     to sit. Desktop keeps auto-fill, so it is unaffected. */
  .series-grid { grid-template-columns: 1fr; gap: 14px; }
  .series-card { padding: 16px; }
  .series-card h3 { font-size: 1rem; }
  /* Filters deliberately keep the 920px layout here — search on its own row,
     the selects two-up. One per row would stack four 48px controls into a
     sticky bar nearly a third of a phone screen tall. (A `.filter-grid > *`
     rule would not have applied anyway: `.filter-grid > select` is the more
     specific selector and a media query adds no specificity.) */
  /* The row's buttons wrap under the title rather than squeezing it. */
  .shiur-row { grid-template-columns: 32px minmax(0, 1fr); row-gap: 10px; }
  .shiur-acts { grid-column: 2; }
  /* Transport controls are desktop-only; play, seek and close remain. */
  .mini-controls #m-back, .mini-controls #m-fwd, .mini-controls #m-rate, .mini-controls #m-dl { display: none; }
  body:has(.mini:not([hidden])) { padding-bottom: 150px; }
}

/* ---------- daily inspiration ----------
   The posters are the content: every word of Hebrew, Yiddish and English is
   inside the image. So this is a frame around a picture, and the only job the
   CSS has is to stay out of its way and keep the picture legible.

   Square-ish tiles with object-fit: contain, not cover - a poster cropped is
   a poster with its last line cut off. */

.chizuk { background: var(--card); border-radius: var(--radius-2xl); padding: clamp(28px, 4vw, 56px); text-align: center; }


.chizuk-head h2 { margin: 6px 0 0; }
.chizuk-date { color: var(--muted); font-size: 15px; margin: 8px 0 0; }

.chizuk-pills { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 22px 0 0; }
.pill-lang {
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  background: transparent; color: var(--ink);
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 18px;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.pill-lang:hover { background: var(--white); }
.pill-lang.is-on { background: var(--teal); border-color: var(--teal); color: var(--on-teal); }

.chizuk-figure { margin: 24px 0 0; }
/* The poster is a button: at this size the Hebrew is not readable, so the
   whole thing opens full size. The hover lift is the only cue that it is
   clickable - a poster needs no caption telling you to look at it. */
.chizuk-figure { margin: 24px 0 0; }
.chizuk-zoom {
  display: block; margin: 0 auto; padding: 0; border: 0; background: none;
  cursor: zoom-in; width: 100%; max-width: min(520px, 100%); position: relative;
}
.chizuk-figure img {
  display: block; margin: 0 auto; border-radius: var(--radius-lg);
  width: 100%; height: auto;
  background: var(--white); box-shadow: var(--shadow-card);
  transition: transform .25s ease, box-shadow .25s ease;
}
.chizuk-zoom:hover img,
.chizuk-zoom:focus-visible img { transform: scale(1.04); box-shadow: var(--shadow-lift); }
.chizuk-zoom:focus-visible { outline: 2px solid var(--gold-dark); outline-offset: 6px; border-radius: var(--radius-lg); }

/* A small hint that rides in on hover, for anyone who does not try clicking. */
.chizuk-hint {
  position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%) translateY(4px);
  background: rgba(35, 32, 28, .78); color: var(--cream);
  font-size: 12px; font-weight: 600; border-radius: 999px; padding: 5px 12px;
  opacity: 0; transition: opacity .2s ease, transform .2s ease; pointer-events: none;
}
.chizuk-zoom:hover .chizuk-hint,
.chizuk-zoom:focus-visible .chizuk-hint { opacity: 1; transform: translateX(-50%) translateY(0); }

.chizuk-meta { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; margin: 20px 0 0; font-size: 15px; }
.chizuk-num { background: var(--tint); color: var(--teal); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 700; }
.chizuk-src { color: var(--teal); }
.chizuk-sponsor { color: var(--muted); font-size: 14px; margin: 10px 0 0; }
.chizuk-actions { display: flex; gap: 18px; align-items: center; justify-content: center; flex-wrap: wrap; margin: 26px 0 0; }
.chizuk-more { font-weight: 600; color: var(--teal); text-decoration: none; }
.chizuk-more:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Desktop reads it as a row: the poster beside its details rather than under
   them. Stacked and full width it swallowed most of a screen, which is more
   room than a daily extra deserves next to the weekly shiur. Placement is by
   grid-area so the DOM order - heading, pills, poster, details - is untouched,
   which is the order that reads correctly when it stacks again on a phone. */
@media (min-width: 900px) {
  .chizuk {
    display: grid;
    /* 980 rather than the full 1160: at full width the copy ran out around
       450px and left a void before the poster, which read as bad alignment
       when it was really just too much column. Narrower block, bigger poster,
       and the two sides now balance. */
    max-width: 980px;
    margin-inline: auto;
    grid-template-columns: minmax(0, 1fr) 360px;
    /* Words left, poster right. The empty first and last rows are flexible, so
       the details sit centred against the poster rather than stacking at its
       top with dead space beneath. */
    grid-template-areas:
      ". fig"
      "head fig"
      "pills fig"
      "meta fig"
      "sponsor fig"
      "actions fig"
      ". fig";
    grid-template-rows: 1fr auto auto auto auto auto 1fr;
    column-gap: 48px;
    text-align: left;
    padding: 40px;
  }
  .chizuk-figure { grid-row: 1 / -1; align-self: center; margin: 0; }
  .chizuk-figure img { max-width: 360px; }
  .chizuk-head h2 { font-size: clamp(1.5rem, 2.2vw, 2rem); }
  .chizuk-pills { justify-content: flex-start; margin-top: 18px; }
  .chizuk-meta { justify-content: flex-start; margin-top: 18px; }
  .chizuk-actions { justify-content: flex-start; margin-top: 22px; align-self: start; }
}


/* --- archive --- */
.arch-count { color: var(--muted); font-size: 15px; margin: 0 0 8px; }
.arch-month { font-size: 1.25rem; margin: 36px 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.arch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 20px; }
.arch-tile {
  font: inherit; color: inherit; cursor: pointer; text-align: start;
  background: none; border: 0; padding: 0; display: flex; flex-direction: column; gap: 8px;
}
.arch-tile img {
  width: 100%; aspect-ratio: 1; object-fit: contain;
  background: var(--white); border-radius: var(--radius-md);
  box-shadow: var(--shadow-card); transition: box-shadow .22s ease, transform .22s ease;
}
.arch-tile:hover img { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.arch-tile-foot { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; color: var(--muted); }
.arch-n { font-weight: 600; color: var(--ink); }

/* --- lightbox --- */
.poster-modal {
  position: fixed; inset: 0; z-index: 60; background: rgba(35, 32, 28, .72);
  display: flex; align-items: center; justify-content: center; padding: clamp(14px, 3vw, 44px);
}
/* An explicit display beats the [hidden] attribute's display:none, so the
   overlay has to be told to stay shut. Without this it covers every page it
   is on, permanently. */
.poster-modal[hidden], .poster-close[hidden] { display: none; }
.poster-inner { background: var(--cream); border-radius: var(--radius-xl); padding: 18px; max-width: min(760px, 100%); max-height: 100%; overflow: auto; }
/* As large as the screen allows, but capped so the date and source below it
   are always in view - the caption is how you know which day you are looking
   at while stepping through with the arrows. */
.poster-inner img {
  display: block; margin: 0 auto; width: auto; max-width: 100%;
  max-height: 74vh; height: auto; object-fit: contain;
  border-radius: var(--radius-md); background: var(--white);
}
.poster-meta { text-align: center; margin-top: 14px; }
.poster-date { font-weight: 600; margin: 0; }
.poster-src { margin: 6px 0 0; font-size: 15px; }
.poster-src a { color: var(--teal); }
.poster-sponsor { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
.poster-close {
  position: fixed; top: 18px; right: 20px; z-index: 61;
  width: 42px; height: 42px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--cream); color: var(--ink); font-size: 15px;
}

/* Step through the archive without closing. The arrows hide at either end
   rather than sitting there disabled, so their presence always means there is
   something to go to. Arrow keys do the same. */
.poster-nav {
  position: fixed; top: 50%; transform: translateY(-50%); z-index: 61;
  width: 52px; height: 52px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--cream); color: var(--ink);
  font-size: 30px; line-height: 1; padding: 0 0 4px;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(26, 46, 44, .25);
  transition: background .15s ease;
}
.poster-nav:hover { background: var(--white); }
.poster-nav.prev { left: 18px; }
.poster-nav.next { right: 18px; }
.poster-nav[hidden] { display: none; }

@media (max-width: 620px) {
  /* No room beside the poster on a phone, so the arrows sit under it. */
  .poster-nav { top: auto; bottom: 18px; transform: none; width: 46px; height: 46px; font-size: 26px; }
  .poster-nav.prev { left: 24px; }
  .poster-nav.next { right: 24px; }
  .poster-inner { margin-bottom: 56px; }
}

@media (max-width: 620px) {
  .arch-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .chizuk { padding: 24px 16px; }
}

/* ---------- bigger header, louder heroes ----------
   The nav logo and the page headlines were both set conservatively. These
   lift the logo to ~45px and the h1 to the display-xl end of the scale, and
   give the standfirst under it a step up so the hero reads as one loud block
   rather than a heading with small print beneath. */
.page-head .lead, .hero .lead { font-size: clamp(1.02rem, 1.4vw, 1.2rem); }

@media (max-width: 920px) {
  /* The phone header carries a logo, a toggle and a button; the logo yields
     first so nothing wraps or spills. */
  .nav-logo img { width: 150px; }
}
@media (max-width: 420px) {
  .nav-logo img { width: 128px; }
}

/* ---------- Join This Track, as a dialog ----------
   The signup form comes to the reader rather than sending them down a page.
   Native <dialog>, so Esc, the backdrop and the focus trap are the browser's
   job, not ours. Teal, because this is the one thing on the page we are
   asking them to do. */

.join-modal {
  width: min(640px, calc(100vw - 32px));
  max-height: min(88vh, 900px);
  padding: 0;
  border: 0;
  border-radius: 28px;
  background: var(--teal);
  color: var(--cream);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .34);
  overflow: hidden;
}
.join-modal::backdrop { background: rgba(14, 28, 27, .62); backdrop-filter: blur(2px); }
.join-modal-body { padding: 34px 34px 38px; max-height: inherit; overflow-y: auto; }
.join-modal .eyebrow { color: var(--mint); }
.join-modal h2 { color: var(--cream); font-size: clamp(1.6rem, 3.4vw, 2.1rem); margin-bottom: 10px; }
.join-modal .lead { color: var(--on-teal-soft); font-size: 1rem; margin-bottom: 24px; }
.join-modal .check span { color: var(--on-teal-soft); }
.join-modal .field-inline { background: rgba(253, 249, 244, .1); }
.join-modal .field-inline > span:first-child,
.join-modal .field-inline .wk { color: var(--cream); }
.join-modal .btn-gold { width: 100%; margin-top: 6px; }

.join-modal-close-form { position: sticky; top: 0; height: 0; text-align: right; z-index: 2; }
.join-modal-close {
  position: relative; top: 14px; right: 14px;
  width: 36px; height: 36px; line-height: 1;
  font-size: 22px; cursor: pointer;
  border-radius: 50%; border: 1px solid rgba(253, 249, 244, .3);
  background: rgba(253, 249, 244, .1); color: var(--cream);
}
.join-modal-close:hover { background: rgba(253, 249, 244, .22); }

@media (max-width: 560px) {
  .join-modal { width: calc(100vw - 20px); max-height: 92vh; border-radius: 22px; }
  .join-modal-body { padding: 26px 20px 30px; }
  .join-modal .form-grid { grid-template-columns: 1fr; }
}

/* ---------- Tracks & Speakers: one row per track ----------
   Five full-screen sections became eight rows. Everything a visitor needs to
   choose is on the line; the details table, the samples and the quotes open
   underneath, in the page. No second page to go to and come back from. */

.track-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.track-row {
  background: var(--card); border-radius: 22px; overflow: hidden;
  transition: box-shadow .18s ease;
}
.track-row:hover { box-shadow: 0 14px 34px rgba(26, 46, 44, .10); }
.track-row.is-open { box-shadow: 0 16px 40px rgba(26, 46, 44, .13); }
.track-row.is-soon .track-row-photo { filter: grayscale(.35); }

.track-row-main {
  display: grid; grid-template-columns: 132px minmax(0, 1fr) auto;
  gap: 22px; align-items: center; padding: 16px 22px 16px 16px;
}
.track-row-photo {
  width: 132px; height: 108px; object-fit: cover; object-position: top center;
  border-radius: 16px; display: block;
}
.track-row-text h3 { font-size: 1.12rem; margin-bottom: 4px; }
.track-row-meta { color: var(--gold-dark); font-weight: 600; font-size: 12.5px; margin: 0 0 6px; }
.track-row-desc {
  color: var(--muted); font-size: 13.5px; line-height: 1.5; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.track-row-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

.track-row-panel { padding: 4px 22px 24px 22px; border-top: 1px solid var(--line); margin: 0 22px; }
.track-row-panel[hidden] { display: none; }
.track-row-panel > div { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.track-row-panel .track-meta,
.track-row-panel .track-aside { background: transparent; padding: 18px 0 0; }
.track-row-panel .track-quotes { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.track-row-panel .track-quote { margin: 0; }

@media (max-width: 860px) {
  .track-row-main { grid-template-columns: 92px minmax(0, 1fr); gap: 14px; padding: 14px; }
  .track-row-photo { width: 92px; height: 92px; }
  .track-row-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .track-row-panel { margin: 0 14px; padding: 4px 0 18px; }
  .track-row-panel > div,
  .track-row-panel .track-quotes { grid-template-columns: 1fr; }
}

/* "Coming soon" is a state, not another fact about the track, so it sits on
   its own line rather than trailing the sefer and the language. */
.track-soon {
  display: inline-block; margin: 2px 0 0;
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px;
}
.speaker-body .track-soon { margin-bottom: 8px; }

/* The reviews ride along inside an open row — smaller than they were when
   each track had a page to itself. */
.track-row-panel .track-quotes { gap: 12px; }
.track-row-panel .track-quote { padding: 12px 14px; gap: 8px; border-radius: 16px; }
.track-row-panel .track-quote > img { width: 20px; height: 20px; }
.track-row-panel .track-quote p { font-size: 13.5px; line-height: 1.45; }
.track-row-panel .track-quote .who { font-size: 13px; }
.track-row-panel .track-quote .where { font-size: 12.5px; }
.track-row-panel .track-meta dl { font-size: 13.5px; }
.track-row-panel .card-head h3 { font-size: 1rem; }
.track-row-panel .track-quotes { grid-column: 1 / -1; align-items: start; }
.track-row-panel .track-quote { justify-content: flex-start; }

/* These blocks were laid out by the old four-column track grid, which placed
   .track-meta in column 4. Inside a row they are plain grid items again,
   otherwise the panel grows phantom columns and squeezes the reviews. */
.track-row-panel .track-meta,
.track-row-panel .track-aside {
  grid-column: auto; grid-row: auto; margin-left: 0;
}

/* "M.L. · Boro Park" on one line: inside a row the attribution does not need
   two lines of its own. */
.track-row-panel .track-quote footer {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px;
}
.track-row-panel .track-quote .where::before { content: "·"; margin-right: 6px; }

/* The details list was sized for a full-width card of its own; inside a row it
   needs a tighter measure and a smaller label. */
.track-row-panel .track-meta dl {
  grid-template-columns: 96px 1fr;
  gap: 10px 16px;
}
.track-row-panel .track-meta dt {
  font-size: 11px; font-weight: 700; letter-spacing: .07em; line-height: 1.5;
}
.track-row-panel .track-meta dd { font-size: 13.5px; font-weight: 600; line-height: 1.45; }
.track-row-panel .card-head { gap: 9px; margin-bottom: 10px; }
.track-row-panel .card-head img { width: 19px; height: 19px; }

/* Both actions on a card are buttons now, so they sit together rather than at
   opposite ends of the row. */
.speaker-actions { justify-content: flex-start; }

/* On a card narrow enough to be the whole screen, "See more" and "Join this
   track" wrapped onto separate lines and made every card taller than it
   needed to be. Tighter padding and a slightly smaller label fit both on one
   row; nowrap keeps them there, and the flex basis lets them share the width
   evenly rather than one hugging its text. */
/* The outline button carries a 1.5px border and the gold one does not, so the
   pair sat 3px out of line wherever they appear together. A transparent
   border of the same width costs nothing and makes them equal. */
.speaker-actions .btn-gold { border: 1.5px solid transparent; }

@media (max-width: 640px) {
  .speaker-actions { flex-wrap: nowrap; gap: 8px; }
  .speaker-actions .btn-sm {
    padding: 9px 10px;
    font-size: 12.5px;
    white-space: nowrap;
    flex: 1 1 0;
    text-align: center;
  }
}

/* A row opened from a link on another page must clear the fixed nav. */
.track-row { scroll-margin-top: calc(var(--nav-h) + 18px); }

/* ---------- "Start from" ----------
   Was a bordered sub-panel holding a question and two radios, which read as a
   different KIND of thing from the fields around it. It is now an ordinary
   select with an ordinary revealed number input, so the column reads as one
   form. The common answer is still the default, and the number only appears
   for the few who want it. */

.week-pick { margin-top: 10px; }
.week-pick[hidden] { display: none; }
.field-note { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }

.join-modal .field-note,
.panel .field-note { color: var(--on-teal-soft); }

/* A card sits on the dark panel but is itself cream, so `.panel .btn-outline`
   (cream text, for buttons on the teal) made "See more" invisible on it. */
.speaker .btn-outline, .track-row .btn-outline {
  border-color: var(--gold-dark); color: var(--heading);
}
.speaker .btn-outline:hover, .track-row .btn-outline:hover {
  background: var(--gold); color: var(--on-gold); border-color: var(--gold);
}
/* The revealed number input is deliberately NOT narrowed to a digit-sized
   box: "a matching number input" means it lines up with the select above it
   and the fields around it, so it keeps the full-width `.field` styling. */

/* Where a series stands: running, finished, or not started. Every card says
   so now — "coming soon" alone left the other two indistinguishable. */
.track-soon.is-ongoing { color: var(--teal); border-color: var(--teal); }
.track-soon.is-completed { color: var(--gold-dark); border-color: var(--gold-dark); }
.track-soon.is-coming_soon { color: var(--muted); border-color: var(--line); }
.panel .track-soon.is-ongoing { color: var(--teal); border-color: var(--teal); }

/* The status is a quiet note under the description, not a badge competing
   with the speaker's name. Same muted treatment whatever the state. */
.track-soon,
.track-soon.is-ongoing,
.track-soon.is-completed,
.track-soon.is-coming_soon {
  display: block; margin: 10px 0 0; padding: 0;
  border: 0; background: none;
  font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
}
.speaker-body .track-soon { margin: 10px 0 0; }
.panel .track-soon { color: rgba(26, 46, 44, .55); }

/* A track with no reviews yet says so across the full quotes row,
   rather than leaving two empty columns beside one line of text. */
.track-quotes .quotes-soon { grid-column: 1 / -1; }
.track-quotes .card-head.quotes-soon { margin: 0 0 2px; }

/* Every track's details panel links through to that track's shiurim in the
   library. It sits above the audio snippets, where the eye already is after
   the details table, and reads as a way out of the row rather than a button
   competing with "Join this track". */
.library-link { margin: 18px 0 14px; font-size: 13.5px; font-weight: 600; }
.library-link a { color: var(--gold-dark); text-decoration: none; border-bottom: 1px solid transparent; }
.library-link a:hover,
.library-link a:focus-visible { border-bottom-color: currentColor; }
.library-link span { display: inline-block; transition: transform .15s ease; }
.library-link a:hover span { transform: translateX(3px); }
.track-row-panel .library-link { margin-top: 18px; }

/* ---------- the video player ----------
   The same teal shell as the join dialog, so the site has one kind of modal.

   Laid out as a flex column — head, stage, footnote — rather than by
   subtracting a guessed header height from the viewport. The first version
   did the latter and it broke twice over: a two-line Hebrew title made the
   real head taller than the guess, so the dialog either overflowed into a
   scrollbar or left the picture smaller than it needed to be. */
.video-modal {
  width: min(1280px, 96vw);
  height: min(92vh, 960px);
  max-height: 92vh;
  padding: 0; border: 0; border-radius: 26px;
  background: var(--teal); color: var(--cream);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .42);
  overflow: hidden;
}
.video-modal::backdrop { background: rgba(8, 24, 23, .78); backdrop-filter: blur(3px); }
.video-modal-body {
  display: flex; flex-direction: column;
  height: 100%; min-height: 0;
  padding: 0 0 14px;
  overflow: hidden;            /* the dialog never scrolls; the stage flexes */
}

.video-modal-close-form { position: sticky; top: 0; height: 0; text-align: right; z-index: 2; }
.video-modal-close {
  position: relative; top: 14px; right: 14px;
  width: 36px; height: 36px; line-height: 1;
  font-size: 22px; cursor: pointer;
  border-radius: 50%; border: 1px solid rgba(253, 249, 244, .3);
  background: rgba(253, 249, 244, .1); color: var(--cream);
}
.video-modal-close:hover { background: rgba(253, 249, 244, .22); }

.video-modal-head { flex: 0 0 auto; padding: 18px 24px 14px; border-bottom: 1px solid rgba(253, 249, 244, .14); }
.video-modal-eyebrow {
  margin: 0 0 6px; color: var(--mint);
  font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}
.video-modal-title {
  font-family: var(--font-body); font-size: 1.12rem; font-weight: 700;
  color: var(--cream); margin: 0; line-height: 1.3;
}
.video-modal-sub { font-size: 13px; color: var(--on-teal-soft); margin: 4px 0 0; }

/* The stage takes whatever height is left and centres the picture in it. */
.video-modal-stage {
  flex: 1 1 auto; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 14px 16px 0;
  /* A size container, so the embed below can measure both of the stage's
     dimensions and pick whichever one limits it. */
  container-type: size;
}

/* Fill the stage, keeping the recording's own shape.

   max-width/max-height alone only ever shrinks: a 640x360 upload sat at
   640x360 in the middle of a 1200px dialog. Filling the stage and letting
   object-fit letterbox means the picture scales up to the room available,
   and where the shapes do not match the gap is the dialog's teal rather
   than a black band — no painted background behind the video. */
.video-modal video {
  display: block;
  width: 100%; height: 100%;
  object-fit: contain;
  background: transparent;
  border: 0; border-radius: 14px;
}

/* An embed cannot report its ratio from outside, so it does need a box.
   YouTube, Vimeo and TorahAnytime all serve 16:9, and the box is capped to
   the stage so a tall window never pushes it past the edge. */
/* The embed, with its host's chrome clipped off.

   TorahAnytime's embed page is a 24px "← Back" bar with the video beneath
   it, always 16:9 and always that same 24px at any width. Dropped straight
   into a 16:9 frame their page is therefore 24px too tall, so it scrolled —
   the bar showed until you pushed it off, and then you could push the video
   off too.

   So the window is 16:9 and the frame inside it is 24px taller, lifted by
   exactly that much. What shows is the picture alone, with nothing left to
   scroll. Height first, width derived: setting both to 100% would override
   aspect-ratio and stretch the frame, which is what made their player
   letterbox its own picture in black earlier. */
.video-embed {
  position: relative; overflow: hidden;
  /* Fit a 16:9 box inside the stage, whichever way the stage is shaped.
     Neither single declaration does this: driving from the height is right
     on a wide short stage and collapses to a 0.69 ratio on a tall narrow
     one, and driving from the width fails the other way round — in both
     cases the max-* clamps one axis while the explicit 100% pins the other.
     The container units measure both axes, so min() picks the binding one. */
  width: min(100cqw, calc(100cqh * 16 / 9));
  height: auto;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  border-radius: 14px;
  background: transparent;
}
.video-embed iframe {
  position: absolute; left: 0; top: -24px;
  width: 100%; height: calc(100% + 24px);
  display: block; border: 0;
}
.video-modal [hidden] { display: none; }

.video-modal-note { flex: 0 0 auto; margin: 10px 0 0; padding: 0 24px; font-size: 12.5px; }
.video-modal-note a { color: var(--mint); text-decoration: none; border-bottom: 1px solid transparent; }
.video-modal-note a:hover,
.video-modal-note a:focus-visible { border-bottom-color: currentColor; }

/* The page behind a modal dialog still scrolls on its own; this holds it. */
body.has-video-modal { overflow: hidden; }

/* On a phone the stage is taller than any landscape recording needs, so
   stretching it puts the gap above and below the picture instead of beside
   it. Hug the video instead: the dialog takes its height from the content
   and the picture runs the full width. */
@media (max-width: 560px) {
  /* fit-content, not auto. A modal <dialog> is laid out with inset:0 and
     margin:auto, and with both top and bottom at 0 an auto height stretches
     to the containing block instead of shrinking to the content — capped by
     max-height, which is why the phone dialog sat at exactly 92vh with the
     video stranded at the top. fit-content is a definite size, so it sizes
     to the content and margin:auto still centres it. */
  .video-modal { width: calc(100vw - 16px); height: fit-content; max-height: 92vh; border-radius: 18px; }
  .video-modal-body { height: auto; }
  .video-modal-head { padding: 16px 16px 12px; }
  .video-modal-title { font-size: 1rem; }
  /* The phone stage takes its height from the content, and a size container
     needs a definite one — left on, it would collapse to nothing. */
  .video-modal-stage { flex: 0 0 auto; padding: 12px 12px 0; container-type: normal; }
  .video-modal video {
    width: 100%; height: auto; max-height: 64vh; object-fit: contain;
  }
  .video-embed {
    width: 100%; height: auto; aspect-ratio: 16 / 9; max-height: 64vh;
  }
  .video-modal-note { padding: 0 16px; }
}

/* The video button carries an icon, not a word: it has to sit square and
   centre its glyph the way the round play button does. */
.icon-btn.is-video { display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.icon-btn.is-video svg { display: block; }


/* "Full Series" and "Coming soon" were the same muted grey, so a finished
   series and one that has not started looked alike — the opposite of what
   each is telling you. The finished one keeps the quiet weight of the other
   labels and takes the gold, which on this site means "there is something
   here". "Coming soon" stays grey, because there isn't. */
.track-soon.is-completed,
.panel .track-soon.is-completed { color: var(--gold-deep); }
.series-badge.is-complete,
.series-badge.is-completed {
  background: rgba(223, 174, 88, .16);
  color: var(--gold-deep);
  border: 1px solid rgba(223, 174, 88, .42);
}

/* "Listen to the audio instead" — a quiet link inside the video dialog's
   header, not a button competing with the video. Its twin is the small video
   icon in the audio bar, so a reader can move between the two media without
   going back to find the row again. */
.video-modal-switch {
  margin: 10px 0 0; padding: 0;
  background: none; border: 0; cursor: pointer;
  color: var(--mint); font: inherit; font-size: 12.5px; font-weight: 600;
  border-bottom: 1px solid transparent;
}
.video-modal-switch:hover,
.video-modal-switch:focus-visible { border-bottom-color: currentColor; }
.video-modal-switch[hidden] { display: none; }

/* ---------- the per-shiur page ----------
   One shiur on its own, opened from a WhatsApp button or an email link. It is
   a landing page for someone who came to listen to one thing, so it carries
   the player and the summary and almost nothing else. */

.shiur-page-meta {
  margin: 12px 0 0;
  font-size: 14px; font-weight: 600; color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* The player sits on --tint rather than the page cream, so the native audio
   control reads as one object with the buttons under it. */
.shiur-player {
  background: var(--tint);
  border-radius: var(--radius-xl, 28px);
  padding: 22px;
  display: flex; flex-direction: column; gap: 18px;
  max-width: 720px; margin: 0 auto;
}

.shiur-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.shiur-actions .btn[hidden] { display: none; }

.shiur-back { text-align: center; margin: 22px 0 0; font-size: 14px; font-weight: 600; }
.shiur-back a { color: var(--teal); }

@media (max-width: 620px) {
  .shiur-player { padding: 16px; border-radius: var(--radius-lg, 20px); }
  /* Full-width targets: this page is opened on a phone from WhatsApp far more
     often than on a desktop. */
  .shiur-actions { flex-direction: column; }
  .shiur-actions .btn { width: 100%; text-align: center; }
}

/* The daily date line carries two calendars on one row. The Hebrew half is
   its own element with dir="rtl" (set in daily.js), so the gershayim and the
   separator stay where they belong instead of being reordered by bidi. */
.chizuk-date-sep { margin: 0 8px; opacity: 0.55; }
.chizuk-date-he { unicode-bidi: isolate; }

/* On the /daily hero the line sits under the h1 rather than beside a poster. */
#daily-hero-date { margin: 12px 0 0; }
