/**
 * F1GMAT Mentor · f1gmat-mentor-slides.css
 * {{slides: key}}: HTML slides, the voice note player and the text.
 *
 * The slide is one template drawn in CSS, sized in container units (cqw)
 * so it scales like a square image: paper background, gold two-digit
 * number, teal label, gold rule, serif title, optional italic line on a
 * warm card with a teal bar, and the site name at the foot. Same tokens
 * as the F1GMAT Instagram carousel guide and style.css.
 *
 * Sizes in cqw refer to the stage (the container), so every slide
 * scales with it.
 *
 * Wide containers put the slides and player on the left and the text on
 * the right; narrow ones stack them.
 */

.f1-mentor-slides {
  --vs-paper: var(--fg-paper, #FBFAF7);
  --vs-warm: var(--fg-paper-warm, #F5EFDF);
  --vs-ink: var(--fg-ink, #1A1A1A);
  --vs-ink-soft: var(--fg-ink-soft, #3D3D3D);
  --vs-muted: var(--fg-ink-muted, #525252);
  --vs-teal: var(--fg-teal, #0E7490);
  --vs-teal-wash: #E4F0F2;
  --vs-gold: var(--fg-gold-dark, #8A6B1F);
  --vs-gold-wash: #F4EBD2;
  --vs-hair: var(--fg-hairline, #D4CFC4);
  --vs-white: #FFFFFF;
  --vs-serif: Georgia, 'Times New Roman', serif;
  --vs-sans: Arial, Helvetica, sans-serif;

  container-type: inline-size;
  margin: 24px 0;
  color: var(--vs-ink);
  font-family: var(--vs-serif);
}

.f1-mentor-slides *,
.f1-mentor-slides *::before,
.f1-mentor-slides *::after {
  box-sizing: border-box;
}

.f1-mentor-slides :focus-visible {
  outline: 2px solid var(--vs-teal);
  outline-offset: 2px;
}

.f1-mentor-slides__in > * + * {
  margin-top: 16px;
}

/* ---------- Two columns when there is room ---------- */

@container (min-width: 820px) {
  /* One centred column: the slide is the primary visual, with the call to
     action, the captions and the player under it; the text then reads below
     it (not beside it) in the same centred measure, and the transcript last.
     The text used to take a wide second column, which pushed the slide into
     a narrow sidebar; it now reads under the slide so the slide and audio
     stay the primary visual whether or not there is text. */
  /* On a tall window the column grows with the window's height, up to
     720 px, keeping about 540 px for the session's header, the strip, the
     captions and the player: 560 px up to a 1100 px tall window, 720 px
     from 1260 px. It never grows wider than the session, so the slide fills
     the view and the text keeps a readable measure. */
  .f1-mentor-slides__in {
    display: grid;
    grid-template-columns: minmax(0, clamp(560px, calc(100vh - 540px), 720px));
    grid-template-areas:
      "stage"
      "cta"
      "captions"
      "player"
      "body"
      "tx";
    justify-content: center;
  }

  .f1-mentor-slides__in > * + * {
    margin-top: 0;
  }

  .f1-mentor-slides__stage {
    grid-area: stage;
  }

  .f1-mentor-slides__in > .f1-mentor-player {
    grid-area: player;
    margin-top: 16px;
  }

  .f1-mentor-slides__body {
    grid-area: body;
    margin-top: 28px;
  }

  .f1-mentor-slides__in > .f1-mentor-slides__cta {
    grid-area: cta;
    margin-top: 10px;
  }

  .f1-mentor-slides__in > .f1-mentor-slides__captions {
    grid-area: captions;
    margin-top: 10px;
  }

  .f1-mentor-slides__tx {
    grid-area: tx;
    margin-top: 32px;
  }
}

/* ---------- Fit to content (data-shape="fit") ----------
 * Square is the default and is untouched. Fit makes the stage a one-cell
 * grid: every slide sits in the same cell, so the stage stands as tall as
 * the tallest slide and a wide "Edit this slide" card has no empty paper
 * below it. The slides still crossfade (opacity), and a hidden slide keeps
 * its size (visibility: hidden, not display: none), so the height is steady
 * as slides change and the player below does not jump. No script sizes it.
 * Without JavaScript the slides stack in normal flow, each at its own
 * content height (fit clears the 1:1 shape below, so a no-script fit record
 * is content-height, not square). */

.f1-mentor-slides--js[data-shape="fit"] .f1-mentor-slides__stage {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  aspect-ratio: auto;
}

.f1-mentor-slides--js[data-shape="fit"] .f1-mentor-slides__slide {
  position: static;
  inset: auto;
  grid-column: 1;
  grid-row: 1;
}

/* The slide hugs its content: the middle section no longer grows to fill a
   square, so the frame collapses to the card height. The content sits at
   the top as on a slide. */
.f1-mentor-slides--js[data-shape="fit"] .f1-mentor-slides__slide {
  align-self: start;
}

/* Clear the 1:1 shape every slide carries, so in fit a slide is as tall as
   its content (this square is what pinned the frame to 520 px). */
.f1-mentor-slides[data-shape="fit"] .f1-mentor-slides__slide {
  aspect-ratio: auto;
}

.f1-mentor-slides[data-shape="fit"] .f1-mentor-slides__mid {
  flex: 0 0 auto;
  justify-content: flex-start;
}

/* Fit shows the whole card, so nothing is clipped and an image sizes by its
   width (a square image keeps the stage square). */
.f1-mentor-slides[data-shape="fit"] .f1-mentor-slides__content {
  overflow: visible;
}

.f1-mentor-slides[data-shape="fit"] .f1-mentor-slides__img {
  height: auto;
}

/* ---------- Stage and slides ---------- */

.f1-mentor-slides__stage {
  container-type: inline-size;
  display: grid;
  gap: 16px;
}

.f1-mentor-slides__slide {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  padding: 8.9cqw;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--vs-hair);
  border-radius: 4px;
  background: var(--vs-paper);
  overflow: hidden;
}

/* With JavaScript the slides sit on top of each other and fade. */
.f1-mentor-slides--js .f1-mentor-slides__stage {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--vs-hair);
  border-radius: 4px;
  overflow: hidden;
  background: var(--vs-paper);
  cursor: pointer;
}

.f1-mentor-slides--js .f1-mentor-slides__slide {
  position: absolute;
  inset: 0;
  border: 0;
  border-radius: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s, visibility 0s linear 0.45s;
}

.f1-mentor-slides--js .f1-mentor-slides__slide.is-on {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.45s;
}

/* An image slide: the uploaded image fills the square, whole (a 16:9
   image sits in the middle with paper above and below). */
.f1-mentor-slides__slide.is-image {
  padding: 0;
}

.f1-mentor-slides__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* An image the player has not loaded yet (no src). Without JavaScript the
   noscript copy beside it shows instead. */
.f1-mentor-slides__img[data-src] {
  display: none;
}

.f1-mentor-slides__top {
  display: flex;
  align-items: flex-end;
  gap: 2.4cqw;
}

.f1-mentor-slides__num {
  font-family: var(--vs-serif);
  font-weight: 700;
  font-size: 11.8cqw;
  line-height: 0.85;
  color: var(--vs-gold);
}

.f1-mentor-slides__eyebrow {
  padding-bottom: 0.8cqw;
  font-family: var(--vs-sans);
  font-weight: 700;
  font-size: 2.3cqw;
  letter-spacing: 0.55cqw;
  text-transform: uppercase;
  color: var(--vs-teal);
}

.f1-mentor-slides__rule {
  width: 8.9cqw;
  height: 0.3cqw;
  margin: 4cqw 0 0;
  background: var(--vs-gold);
}

.f1-mentor-slides__mid {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3cqw;
  min-height: 0;
}

.f1-mentor-slides__title {
  margin: 0;
  font-family: var(--vs-serif);
  font-weight: 700;
  font-size: 6.2cqw;
  line-height: 1.1;
  color: var(--vs-ink);
  text-wrap: balance;
}

.f1-mentor-slides__slide.is-long .f1-mentor-slides__title {
  font-size: 5cqw;
}

.f1-mentor-slides__line {
  margin: 0;
  padding: 2cqw 2.6cqw;
  border-left: 0.7cqw solid var(--vs-teal);
  background: var(--vs-warm);
  font-family: var(--vs-serif);
  font-style: italic;
  font-size: 3.3cqw;
  line-height: 1.35;
  color: var(--vs-ink-soft);
}

.f1-mentor-slides__slide.is-longline .f1-mentor-slides__line {
  font-size: 2.8cqw;
}

/* Content written for one slide ("Edit this slide"), through its text
 * format, sized to the square slide: images at most a third of its height,
 * and what does not fit is cut off (the Mark sections preview warns). The
 * heading, list and link rules carry !important against the theme's. */
.f1-mentor-slides .f1-mentor-slides__content {
  min-height: 0;
  overflow: hidden;
  font-family: var(--vs-serif);
  font-size: 3.4cqw;
  line-height: 1.45;
  color: var(--vs-ink-soft);
}

.f1-mentor-slides .f1-mentor-slides__content::after {
  content: "";
  display: block;
  clear: both;
}

.f1-mentor-slides .f1-mentor-slides__content > :first-child {
  margin-top: 0;
}

.f1-mentor-slides .f1-mentor-slides__content :is(p, ul, ol, blockquote, figure, table) {
  margin: 0 0 1.8cqw;
}

.f1-mentor-slides .f1-mentor-slides__content :is(ul, ol) {
  padding-left: 4.5cqw;
}

.f1-mentor-slides .f1-mentor-slides__content :is(h2, h3, h4, h5, h6) {
  margin: 0 0 1.6cqw;
  font-family: var(--vs-serif) !important;
  font-size: 4.2cqw !important;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: normal !important;
  text-transform: none !important;
  color: var(--vs-ink) !important;
}

.f1-mentor-slides .f1-mentor-slides__content blockquote {
  padding: 1.6cqw 2.4cqw;
  border-left: 0.7cqw solid var(--vs-teal);
  background: var(--vs-warm);
  font-style: italic;
}

.f1-mentor-slides .f1-mentor-slides__content a {
  color: var(--vs-teal) !important;
}

.f1-mentor-slides .f1-mentor-slides__content img {
  display: block;
  max-width: 100%;
  max-height: 34cqw;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 0 1.8cqw;
}

.f1-mentor-slides .f1-mentor-slides__content figure img {
  margin-bottom: 0.8cqw;
}

.f1-mentor-slides .f1-mentor-slides__content figcaption {
  font-family: var(--vs-sans);
  font-size: 2.2cqw;
  color: var(--vs-muted);
}

/* Image placement from the editor: the class from Drupal's "Align images"
 * filter, or the editor's data-align when the format does not run it. */
.f1-mentor-slides .f1-mentor-slides__content :is(img, figure):is(.align-left, [data-align="left"]) {
  float: left;
  max-width: 45%;
  margin: 0 3cqw 1.8cqw 0;
}

.f1-mentor-slides .f1-mentor-slides__content :is(img, figure):is(.align-right, [data-align="right"]) {
  float: right;
  max-width: 45%;
  margin: 0 0 1.8cqw 3cqw;
}

.f1-mentor-slides .f1-mentor-slides__content :is(img, figure):is(.align-center, [data-align="center"]) {
  margin-left: auto;
  margin-right: auto;
}

.f1-mentor-slides .f1-mentor-slides__content .text-align-left { text-align: left; }
.f1-mentor-slides .f1-mentor-slides__content .text-align-center { text-align: center; }
.f1-mentor-slides .f1-mentor-slides__content .text-align-right { text-align: right; }
.f1-mentor-slides .f1-mentor-slides__content .text-align-justify { text-align: justify; }

.f1-mentor-slides .f1-mentor-slides__content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 2.8cqw;
}

.f1-mentor-slides .f1-mentor-slides__content :is(th, td) {
  padding: 0.8cqw 1.2cqw;
  border: 0.2cqw solid var(--vs-hair);
  text-align: left;
}

.f1-mentor-slides__foot {
  margin: 0;
  padding-top: 1.8cqw;
  border-top: 0.2cqw solid var(--vs-hair);
  text-align: right;
  font-family: var(--vs-sans);
  font-size: 2.2cqw;
  color: var(--vs-teal);
}

/* ---------- Text ---------- */

.f1-mentor-slides__body {
  font-size: 18px;
  line-height: 1.65;
}

.f1-mentor-slides__body > :first-child {
  margin-top: 0;
}

.f1-mentor-slides__linked {
  position: relative;
  padding-left: 12px;
  border-left: 3px solid var(--vs-gold-wash);
  border-radius: 3px;
  transition: background-color 0.2s, border-color 0.2s;
}

.f1-mentor-slides__linked.is-lit {
  background: var(--vs-teal-wash);
  border-left-color: var(--vs-gold);
}

/* Play-from-here button at the start of a linked paragraph: 28px disc,
 * 44px hit area. */
.f1-mentor-slides .f1-mentor-slides__jump {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: 0 8px 0 0;
  padding: 0;
  border: 1px solid var(--vs-hair);
  border-radius: 50%;
  background: var(--vs-white);
  color: var(--vs-ink);
  vertical-align: -6px;
  cursor: pointer;
}

.f1-mentor-slides .f1-mentor-slides__jump::after {
  content: "";
  position: absolute;
  inset: -8px;
}

.f1-mentor-slides .f1-mentor-slides__jump:hover,
.f1-mentor-slides__linked.is-lit .f1-mentor-slides__jump {
  border-color: var(--vs-teal);
  background: var(--vs-teal);
  color: var(--vs-white);
}

.f1-mentor-slides .f1-mentor-slides__jump svg {
  width: 11px;
  height: 11px;
}

/* ---------- Transcript ----------
 * Open below the slides, the player and the text, full width, for reading
 * in full. Slide titles are headings (h2 on a Mentor page). Restated with
 * the block's class, so a theme's heading styles (uppercase, colour,
 * letter-spacing) do not change them. */

.f1-mentor-slides__tx {
  max-width: 46rem;
  padding-top: 20px;
  border-top: 1px solid var(--vs-hair, #D4CFC4);
  font-family: var(--vs-serif, Georgia, 'Times New Roman', serif);
  font-size: 17px;
  line-height: 1.65;
  color: var(--vs-ink-soft);
}

.f1-mentor-slides .f1-mentor-slides__tx .f1-mentor-slides__tx-label {
  margin: 0 0 4px;
  font-family: var(--vs-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--vs-teal);
}

.f1-mentor-slides .f1-mentor-slides__tx .f1-mentor-slides__tx-title {
  margin: 28px 0 8px;
  font-family: var(--vs-serif, Georgia, 'Times New Roman', serif);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: normal;
  text-transform: none;
  color: var(--vs-ink);
}

.f1-mentor-slides__tx p {
  margin: 0 0 12px;
}

/* The hidden caption source, printed when the transcript is turned off
 * (the reading text is in the body instead). It stays in the DOM, out of
 * view, so the live captions still read the timed sentences from it. */
.f1-mentor-slides .f1-mentor-slides__tx-src {
  display: none;
}

/* A slide's own content again in the transcript ("On the slide"), so it
 * stays readable after the slide moves on. Images are smaller here. */
.f1-mentor-slides .f1-mentor-slides__tx-slide {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-left: 3px solid var(--vs-gold);
  border-radius: 0 4px 4px 0;
  background: var(--vs-warm);
  overflow: hidden;
}

.f1-mentor-slides .f1-mentor-slides__tx .f1-mentor-slides__tx-slide-label {
  margin: 0 0 4px;
  font-family: var(--vs-sans) !important;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  /* Darker than --vs-gold: 4.5:1 on the warm background at 11 px. */
  color: #725818 !important;
}

.f1-mentor-slides .f1-mentor-slides__tx-slide-body :is(p, ul, ol, blockquote, figure, table) {
  margin: 0 0 8px;
}

.f1-mentor-slides .f1-mentor-slides__tx-slide-body > :last-child {
  margin-bottom: 0;
}

.f1-mentor-slides .f1-mentor-slides__tx-slide-body :is(h2, h3, h4, h5, h6) {
  margin: 0 0 6px;
  font-family: var(--vs-serif) !important;
  font-size: 17px !important;
  line-height: 1.3;
  letter-spacing: normal !important;
  text-transform: none !important;
  color: var(--vs-ink) !important;
}

.f1-mentor-slides .f1-mentor-slides__tx-slide-body img {
  display: block;
  float: none;
  width: auto;
  max-width: min(100%, 280px);
  height: auto;
  margin: 4px 0 8px;
}

.f1-mentor-slides .f1-mentor-slides__tx-slide-body figure {
  float: none;
  max-width: none;
  margin: 0 0 8px;
}

.f1-mentor-slides .f1-mentor-slides__tx-slide-body .text-align-center { text-align: center; }
.f1-mentor-slides .f1-mentor-slides__tx-slide-body .text-align-right { text-align: right; }

/* ---------- Call to action strip ----------
 * A mentor session's call to action under the slide: eyebrow, heading and
 * a button. The heading and link colours carry the !important flag: a
 * theme's heading and link rules (uppercase gold headings, blue underlined
 * links on f1gmat.com) would otherwise win. */

.f1-mentor-slides__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 12px 14px;
  border: 1px solid var(--vs-hair, #D4CFC4);
  border-left: 4px solid var(--vs-teal);
  border-radius: 6px;
  background: #FFFFFF;
}

.f1-mentor-slides__cta-text {
  flex: 1 1 14rem;
  min-width: 0;
}

.f1-mentor-slides .f1-mentor-slides__cta .f1-mentor-slides__cta-eyebrow {
  margin: 0 0 2px;
  font-family: var(--vs-sans) !important;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  color: #0B5F75 !important;
}

.f1-mentor-slides .f1-mentor-slides__cta .f1-mentor-slides__cta-heading {
  margin: 0;
  font-family: var(--vs-serif, Georgia, 'Times New Roman', serif) !important;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: normal !important;
  text-transform: none !important;
  color: var(--vs-ink) !important;
}

.f1-mentor-slides .f1-mentor-slides__cta a.f1-mentor-slides__cta-button {
  flex: 0 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 4px;
  background: var(--vs-teal) !important;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.25);
  font-family: var(--vs-sans) !important;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none !important;
  color: #FFFFFF !important;
}

.f1-mentor-slides .f1-mentor-slides__cta a.f1-mentor-slides__cta-button:hover,
.f1-mentor-slides .f1-mentor-slides__cta a.f1-mentor-slides__cta-button:focus-visible {
  background: #0B5F75 !important;
}

/* A narrow strip puts the button on its own line, full width. */
@container (max-width: 420px) {
  .f1-mentor-slides .f1-mentor-slides__cta a.f1-mentor-slides__cta-button {
    flex: 1 1 100%;
  }
}

/* ---------- Captions ----------
 * Two still lines under the slide, drawn by the script: words darken as
 * they are spoken (the current word underlined in teal), and the text rolls
 * up two lines at a time. Hidden from screen readers; the transcript below
 * holds the same words. Restated with the block's class so a theme's span
 * rules do not change them. */

.f1-mentor-slides__captions {
  padding: 12px 16px;
  border: 1px solid var(--vs-hair, #D4CFC4);
  border-radius: 6px;
  background: #FFFFFF;
}

.f1-mentor-slides__captions-win {
  height: 60px;
  overflow: hidden;
}

.f1-mentor-slides .f1-mentor-slides__captions-text {
  font-family: var(--vs-serif, Georgia, 'Times New Roman', serif);
  font-size: 19px;
  line-height: 30px;
  color: #6B6457;
  transition: transform 0.45s ease;
}

.f1-mentor-slides .f1-mentor-slides__captions-text span {
  display: inline;
  margin: 0;
  padding: 0;
  background: none;
  color: inherit;
  transition: color 0.25s linear;
}

.f1-mentor-slides .f1-mentor-slides__captions-text span.is-said,
.f1-mentor-slides .f1-mentor-slides__captions-text span.is-now {
  color: var(--vs-ink);
}

.f1-mentor-slides .f1-mentor-slides__captions-text span.is-now {
  background: linear-gradient(transparent 70%, #CFE6EC 70%);
}

@media (max-width: 480px) {
  .f1-mentor-slides__captions-win {
    height: 52px;
  }

  .f1-mentor-slides .f1-mentor-slides__captions-text {
    font-size: 17px;
    line-height: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .f1-mentor-slides--js .f1-mentor-slides__slide,
  .f1-mentor-slides__linked,
  .f1-mentor-slides .f1-mentor-slides__captions-text,
  .f1-mentor-slides .f1-mentor-slides__captions-text span {
    transition: none;
  }
}

/* ---------- Lighter embed modes ----------
 * {{slides: key | voice}}, {{slides: key | captions}} and
 * {{slides: key | slides}} (SlidesBuilder::MODES): one centred column with
 * a row of controls under the captions (under the slides when there are
 * none), drawn by the script: "Turn on sound" in the voice mode, then
 * Play / Pause, Previous, the slide count and Next. Touch targets are
 * 44 px. The transcript is folded under them. */

@container (min-width: 820px) {
  .f1-mentor-slides:not(.f1-mentor-slides--full) > .f1-mentor-slides__in {
    grid-template-areas: "stage" "cta" "captions" "ctl" "player" "tx";
  }

  .f1-mentor-slides__in > .f1-mentor-slides__ctl {
    grid-area: ctl;
    margin-top: 10px;
  }

  .f1-mentor-slides:not(.f1-mentor-slides--full) .f1-mentor-slides__tx {
    margin-top: 16px;
  }
}

.f1-mentor-slides__ctl {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  font-family: var(--vs-sans);
}

.f1-mentor-slides .f1-mentor-slides__ctl button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--vs-hair);
  border-radius: 6px;
  background: var(--vs-white);
  color: var(--vs-ink);
  font-family: var(--vs-sans);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  cursor: pointer;
}

.f1-mentor-slides .f1-mentor-slides__ctl .f1-mentor-slides__ctl-btn {
  padding: 0;
  font-size: 22px;
}

.f1-mentor-slides .f1-mentor-slides__ctl .f1-mentor-slides__ctl-play {
  color: var(--vs-teal);
}

.f1-mentor-slides .f1-mentor-slides__ctl button:disabled {
  color: #9A958B;
  cursor: default;
}

.f1-mentor-slides .f1-mentor-slides__ctl button:hover:not(:disabled) {
  border-color: var(--vs-teal);
}

.f1-mentor-slides .f1-mentor-slides__ctl svg {
  width: 16px;
  height: 16px;
}

/* "Turn on sound": first in the row and the strongest control, teal on a
   teal wash, so a reader watching the silent run sees where the voice is. */
.f1-mentor-slides .f1-mentor-slides__ctl .f1-mentor-slides__sound {
  margin-right: auto;
  padding: 0 16px;
  border-color: var(--vs-teal);
  background: var(--vs-teal-wash);
  color: var(--vs-teal);
}

.f1-mentor-slides .f1-mentor-slides__ctl button[hidden] {
  display: none;
}

.f1-mentor-slides__ctl-count {
  min-width: 7.5em;
  font-size: 13px;
  text-align: center;
  color: var(--vs-muted);
}

/* Narrow blocks (phones): "Turn on sound" takes its own row, and the four
   slide controls stay together under it, centred. */
@container (max-width: 479px) {
  .f1-mentor-slides .f1-mentor-slides__ctl {
    justify-content: center;
  }

  .f1-mentor-slides .f1-mentor-slides__ctl .f1-mentor-slides__sound {
    flex: 1 1 100%;
    margin-right: 0;
  }
}

/* The voice mode's slide plays the sound on a click. */
.f1-mentor-slides--voice.is-silent:not(.is-sound) .f1-mentor-slides__stage {
  cursor: pointer;
}

/* The folded transcript: its label is the button that opens it. */
.f1-mentor-slides .f1-mentor-slides__tx--folded {
  padding-top: 0;
}

.f1-mentor-slides .f1-mentor-slides__tx--folded > summary.f1-mentor-slides__tx-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin: 0;
  list-style: none;
  cursor: pointer;
}

.f1-mentor-slides .f1-mentor-slides__tx--folded > summary::-webkit-details-marker {
  display: none;
}

.f1-mentor-slides .f1-mentor-slides__tx--folded > summary::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid currentColor;
  transition: transform 0.2s ease;
}

.f1-mentor-slides .f1-mentor-slides__tx--folded[open] > summary::before {
  transform: rotate(90deg);
}

@media (prefers-reduced-motion: reduce) {
  .f1-mentor-slides .f1-mentor-slides__tx--folded > summary::before {
    transition: none;
  }
}

/* ---------- Listening rewards ----------
 * Icons on the waveform: the next reward in colour with a thin gold line
 * down the wave at its spot, later ones grey with dark outlines, opened
 * ones in colour with two sparkles. The open reward's link shows in the
 * strip. Drawn by f1gmat-mentor-slides.js. Display, list and link rules
 * carry !important: the theme hides spans and i elements, adds list
 * bullets, and colours and underlines links. */

.f1-mentor-slides .f1-mentor-player.has-rewards .f1-mentor-player__top {
  padding-top: 30px;
}

/* The play button stays level with the wave under the icons. */
.f1-mentor-slides .f1-mentor-player.has-rewards .f1-mentor-player__play {
  align-self: flex-end;
  margin-bottom: 4px;
}

.f1-mentor-slides .f1-mentor-slides__rw-marks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.f1-mentor-slides .f1-mentor-slides__rw-mark {
  position: absolute !important;
  display: block !important;
  visibility: visible !important;
  top: -31px;
  width: 26px;
  height: 26px;
  margin: 0;
  padding: 0;
}

.f1-mentor-slides .f1-mentor-slides__rw-line {
  position: absolute !important;
  display: none !important;
  top: -4px;
  bottom: -4px;
  width: 0;
  margin-left: -1px;
  border-left: 2px dashed var(--vs-gold);
}

.f1-mentor-slides .f1-mentor-slides__rw-line.is-next {
  display: block !important;
}

.f1-mentor-slides .f1-mentor-slides__rw svg,
.f1-mentor-slides .f1-mentor-slides__rw-mark svg {
  display: block !important;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.f1-mentor-slides .f1-mentor-slides__rw-mark:not(.is-got):not(.is-next) svg {
  filter: grayscale(1) contrast(1.15);
}

.f1-mentor-slides .f1-mentor-slides__rw-spark {
  display: none;
}

.f1-mentor-slides .f1-mentor-slides__rw-mark.is-got .f1-mentor-slides__rw-spark,
.f1-mentor-slides .f1-mentor-slides__rw .f1-mentor-slides__rw-spark {
  display: inline;
}

.f1-mentor-slides .f1-mentor-slides__rw {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding-top: 10px;
  border-top: 1px solid var(--vs-hair);
}

.f1-mentor-slides .f1-mentor-slides__rw[hidden],
.f1-mentor-slides .f1-mentor-slides__rw [hidden] {
  display: none !important;
}

.f1-mentor-slides .f1-mentor-slides__rw-icon {
  display: block !important;
  flex: none;
  width: 48px;
  height: 48px;
}

.f1-mentor-slides .f1-mentor-slides__rw a.f1-mentor-slides__rw-go {
  flex: 1 1 14rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 14px;
  border: 2px solid var(--vs-gold);
  border-radius: 4px;
  background: var(--vs-warm) !important;
  font-family: var(--vs-sans) !important;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none !important;
  color: var(--vs-ink) !important;
}

.f1-mentor-slides .f1-mentor-slides__rw a.f1-mentor-slides__rw-go:hover,
.f1-mentor-slides .f1-mentor-slides__rw a.f1-mentor-slides__rw-go:focus-visible {
  background: var(--vs-gold-wash) !important;
}

.f1-mentor-slides .f1-mentor-slides__rw-found {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.f1-mentor-slides .f1-mentor-slides__rw-found li {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.f1-mentor-slides .f1-mentor-slides__rw-found li::before,
.f1-mentor-slides .f1-mentor-slides__rw-found li::marker {
  content: none !important;
}

.f1-mentor-slides .f1-mentor-slides__rw-pick {
  display: block;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 5px;
  border: 1px solid var(--vs-hair);
  border-radius: 6px;
  background: var(--vs-white);
  cursor: pointer;
}

.f1-mentor-slides .f1-mentor-slides__rw-pick[aria-pressed="true"] {
  border-color: var(--vs-gold);
  background: var(--vs-warm);
}

.f1-mentor-slides .f1-mentor-slides__rw-said {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.f1-mentor-slides .f1-mentor-slides__rw-mark.is-got,
.f1-mentor-slides .f1-mentor-slides__rw.is-new .f1-mentor-slides__rw-icon {
  animation: f1-mentor-rw-open 0.6s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.f1-mentor-slides .f1-mentor-slides__rw.is-new .f1-mentor-slides__rw-go {
  animation: f1-mentor-rw-rise 0.45s ease-out 0.15s both;
}

.f1-mentor-slides .f1-mentor-slides__rw-spark path {
  transform-box: fill-box;
  transform-origin: center;
  animation: f1-mentor-rw-twinkle 1.6s ease-in-out infinite;
}

.f1-mentor-slides .f1-mentor-slides__rw-spark path + path {
  animation-delay: 0.6s;
}

@keyframes f1-mentor-rw-open {
  from { opacity: 0; transform: scale(0.4) rotate(-8deg); }
  to { opacity: 1; transform: none; }
}

@keyframes f1-mentor-rw-rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@keyframes f1-mentor-rw-twinkle {
  0%, 100% { opacity: 0.35; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.1); }
}

@media (prefers-reduced-motion: reduce) {
  .f1-mentor-slides .f1-mentor-slides__rw-mark.is-got,
  .f1-mentor-slides .f1-mentor-slides__rw.is-new .f1-mentor-slides__rw-icon,
  .f1-mentor-slides .f1-mentor-slides__rw.is-new .f1-mentor-slides__rw-go,
  .f1-mentor-slides .f1-mentor-slides__rw-spark path {
    animation: none;
  }
}
