/* ============================================================
   Single course page — "Course Page v2 / 1d"
   Dark navy hero + tabbed content + overlapping course-first rail.

   Calm Workspace: tokens only (no hardcoded hex/px colors), white cards on a
   pale page, the navy hero is the one sanctioned dark (player-dark) surface.
   Structure: single-sfwd-courses.php → hero, then .sf-course-cols
   (main tabs + related | sticky rail). All values reference tokens.css.
   ============================================================ */

.sf-course-wrap {
  background: var(--page);
  /* Size container (mobile r1): sections adapt to the width the page
     actually gets (viewport minus the portal sidebar/padding), not the
     viewport. The fixed sticky bar is rendered OUTSIDE this wrapper
     (single-sfwd-courses.php). */
  container: sf-course / inline-size;
}

/* Logged-in portal shell, non-owned course: the funnel's dark hero sits
   flush against the top nav and the sidebar — the shell's .portal__content
   padding would otherwise frame it in page-background whitespace (the hero
   carries its own inner max-width/padding). Compound selector outranks
   portal-shell.css's mobile `.soofos-portal .portal__content` padding
   override regardless of stylesheet order. Enrolled course home keeps the
   normal portal content padding (modifier not printed for owners). */
.soofos-portal .portal__content.portal__content--flush {
  padding: 0;
}

/* Native anchor navigation for the section nav + the hero "(N reviews)" link
   — no JS required. Respects prefers-reduced-motion (spec hard rule). */
@media (prefers-reduced-motion: no-preference) {
  html:has(.sf-course-wrap) {
    scroll-behavior: smooth;
  }
}

/* Shared inner width for hero and columns so they align horizontally. */
.sf-course-hero__inner,
.sf-course-cols {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
  box-sizing: border-box;
}

/* ----------------------------------------------------------- Dark hero */
.sf-course-hero {
  background: var(--player-dark);
  padding-top: 30px;
  padding-bottom: 36px; /* compact — the rail is pulled up to overlap it */
}

.sf-course-hero__inner {
  /* keep the hero copy clear of the overlapping 340px rail on the right */
  padding-right: 400px;
}

.sf-course-breadcrumb {
  font-size: 13px;
  font-weight: 700;
  color: var(--on-navy-faint);
  /* Links are 44px tap targets (below); the negative top margin and the
     reduced bottom margin absorb that extra height so the hero keeps its
     visual rhythm. */
  margin: -14px 0 -2px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 6px;
}

.sf-course-breadcrumb a {
  color: var(--on-navy-strong);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.sf-course-breadcrumb a:hover {
  color: var(--on-navy);
  text-decoration: underline;
}

.sf-course-breadcrumb__sep {
  color: var(--on-navy-faint);
}

.sf-course-title {
  margin: 0;
  font-size: 34px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--on-navy);
}

/* Sits at up to 320 characters (roughly three sentences, the instructor
   editor's cap), so it needs a measure that keeps that to about four lines
   next to the purchase rail instead of a six-line wall. */
.sf-course-subtitle {
  font-size: 15px;
  line-height: 1.6;
  color: var(--on-navy-muted);
  margin: 12px 0 16px;
  max-width: 660px;
}

.sf-course-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 14px;
}

.sf-instructor-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sf-instructor-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--on-navy-fill);
  color: var(--on-navy);
  font-weight: 900;
  font-size: 13px;
  display: grid;
  place-items: center;
}

.sf-instructor-avatar--photo {
  background: none;
  object-fit: cover;
}

.sf-instructor-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--on-navy);
  text-decoration: none;
  /* Never break the instructor's name over two lines ("Lena / Hart"). */
  white-space: nowrap;
  /* 44px tap target without growing the row: the negative block margin
     gives the extra height back to the layout (30px avatar row). */
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: -7px 0;
}

.sf-instructor-name:hover {
  text-decoration: underline;
  color: var(--on-navy);
}

.sf-instructor-callout {
  font-size: 13px;
  font-weight: 600;
  color: var(--on-navy-faint);
}

.sf-course-rating {
  font-size: 14px;
  font-weight: 800;
  color: var(--star);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sf-course-rating__star {
  color: var(--star);
}

.sf-course-rating__count {
  color: var(--on-navy-faint);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
}

.sf-course-rating__count:hover {
  color: var(--on-navy-strong);
  text-decoration: underline;
}

.sf-course-enrolled {
  font-size: 13px;
  font-weight: 700;
  color: var(--on-navy-faint);
}

.sf-course-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sf-course-pills .sf-pill {
  font-size: 13px;
  font-weight: 800;
  color: var(--on-navy);
  border: 1px solid var(--on-navy-line);
  border-radius: var(--r-pill);
  padding: 7px 14px;
  background: none;
}

/* ------------------------------------------------------- Columns layout */
.sf-course-cols {
  display: flex;
  gap: 36px;
  align-items: flex-start;
  padding-top: 24px;
  padding-bottom: 64px;
}

.sf-course-main {
  flex: 1;
  min-width: 0;
  /* Stretch across the column even when .sf-course-cols switches to
     flex-direction: column on stacked layouts — with the container's
     align-items: flex-start the main column otherwise shrink-wraps to its
     content's min-content width and can overflow the screen. */
  align-self: stretch;
}

.sf-course-rail {
  width: 340px;
  flex: none;
  /* The rail is FIRST in the DOM (keyboard/screen-reader order = stacked
     visual order); on the two-column layout `order` keeps it on the right. */
  order: 2;
  margin-top: -250px; /* pull the rail up so its top sits near the hero top */
  position: sticky;
  /* Clears the sticky #sf-nav + .sf-section-nav header stack (same ~138px
     clearance as .sf-section's scroll-margin-top below) so the fixed headers
     never overlay the top of the price card while scrolling on desktop. */
  top: 150px;
  /* Classic sales-page pattern: the price card floats OVER the white sticky
     section-nav bar (z-index 40 below) instead of being overlaid by it, both
     at rest (overlapping the hero) and while scrolling. Stays under the fixed
     site header #sf-nav (z-index 800, shell.css) so it never covers that. */
  z-index: 45;
}

/* #sf-buy landing (R1-D14): LearnDash's locked-unit bounce lands on the
   price card (soofos-portal CourseEntryPoints). Clear the fixed site header
   plus the sticky section-nav strip (44px, same stack as .sf-section's
   scroll-margin-top) with a 12px breathing gap, so the card's top is never
   hidden under them. Admin-bar offsets mirror .sf-section-nav's. */
#sf-buy {
  scroll-margin-top: calc(var(--sf-nav-h) + 44px + 12px);
}

body.admin-bar #sf-buy {
  scroll-margin-top: calc(var(--sf-nav-h) + 32px + 44px + 12px);
}

@media (max-width: 782px) {
  body.admin-bar #sf-buy {
    scroll-margin-top: calc(var(--sf-nav-h) + 46px + 44px + 12px);
  }
}

/* --------------------------------------------------------------- Cards */
.sf-course-card {
  background: var(--white);
  border: 1px solid var(--card-border);
  border-radius: var(--r-card);
  padding: 24px 28px;
  margin-bottom: 20px;
}

.sf-course-card__heading {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 900;
  color: var(--ink);
}

.sf-course-card__heading.screen-reader-text {
  margin: 0;
}

/* Anchor targets (#sf-overview / #sf-content / #sf-reviews / #sf-faq) clear
   the sticky nav + section-nav bar when jumped to: --sf-nav-h (75px, the
   site header, shell.css) + 44px (the section-nav tab strip's own height,
   set by .sf-section-nav__link's min-height below, since .sf-section-nav
   itself carries no extra padding) = 119px. The previous flat 140px was a
   guess that landed an anchor jump ~20px past the header stack. */
.sf-section {
  scroll-margin-top: calc(var(--sf-nav-h) + 44px);
}

/* ---------------------------------------------------------- Section nav
   Sticky underline tab strip. Two rules keep it looking finished:

   1. The bar's hairline is painted as an inset shadow instead of a
      border-bottom, and the active tab's 3px underline is an inset shadow on
      the tab's own bottom edge. Both are anchored to the same edge, so the
      underline covers the hairline exactly at any device pixel ratio — no
      `margin-bottom: -1px`, which used to bleed one pixel out of a
      horizontally scrollable box (overflow-x: auto makes overflow-y `auto`
      too, so that pixel was clip/scroll bait).
   2. The strip is bounded to the main content column (the purchase rail owns
      the right side of the same 1200px grid, see .sf-course-hero__inner's
      matching 400px), so the tabs read as the header of the column they
      belong to instead of trailing off into an open bar. */
.sf-section-nav {
  background: var(--white);
  box-shadow:
    inset 0 -1px 0 var(--card-border),
    var(--shadow-soft);
  position: sticky;
  /* Pinned flush against the site header's own height (--sf-nav-h,
     shell.css) instead of a hand-picked pixel value, so the two can never
     drift apart again. */
  top: var(--sf-nav-h);
  z-index: 40;
}

/* Admin-bar offset: WP core's fixed #wpadminbar sits at the true top of the
   viewport (32px desktop / 46px <=782px), independent of the html
   margin-top compensation WP adds for normal-flow content (that margin
   only offsets the initial paint, not a sticky element's stuck position
   once scrolled past it) -- see assets/css/player.css's admin-bar note for
   the full explanation and the same pattern applied to .player__topbar. */
body.admin-bar .sf-section-nav {
  top: calc(var(--sf-nav-h) + 32px);
}

/* WP core switches #wpadminbar from 32px to 46px tall below 783px
   viewports (same breakpoint player.css's admin-bar query mirrors). */
@media (max-width: 782px) {
  body.admin-bar .sf-section-nav {
    top: calc(var(--sf-nav-h) + 46px);
  }
}

.sf-section-nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  /* 340px rail + 36px column gutter + 24px grid padding — same offset the
     hero copy uses, reset with it at the stacked breakpoints below. */
  padding-right: 400px;
  box-sizing: border-box;
  display: flex;
  gap: 2px;
  /* Narrow viewports genuinely need to scroll (Overview / Course content /
     Reviews / FAQ), but the scrollbar chrome must never be painted: on
     desktop nothing overflows, and macOS "always show scroll bars" drew a
     bar across the empty half of the strip. */
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* legacy Edge */
}

.sf-section-nav__inner::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.sf-section-nav__link {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  box-sizing: border-box;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  padding: 14px 16px;
  border-radius: var(--r-btn) var(--r-btn) 0 0;
  box-shadow: inset 0 -3px 0 transparent;
  scroll-snap-align: start;
}

@media (prefers-reduced-motion: no-preference) {
  .sf-section-nav__link {
    transition:
      color 0.15s ease,
      background-color 0.15s ease,
      box-shadow 0.15s ease;
  }
}

.sf-section-nav__link:hover {
  color: var(--ink);
  background: var(--blue-fill);
}

.sf-section-nav__link.is-active {
  color: var(--ink);
  font-weight: 800;
  box-shadow: inset 0 -3px 0 var(--blue);
}

.sf-section-nav__link:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
  border-radius: 4px;
}

.sf-anchor-legacy {
  display: block;
  position: relative;
  visibility: hidden;
}

/* ------------------------------------------------ Overview: outcomes */
.sf-outcomes-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
}

.sf-outcome-item {
  display: flex;
  gap: 10px;
  font-size: 14px;
  color: var(--body-2);
  line-height: 1.5;
}

.sf-outcome-check {
  color: var(--green);
  font-weight: 900;
  flex: none;
}

/* >6 outcomes: course-page.js adds this class + reveals the toggle. Without
   JS every outcome stays visible (no-JS = expanded). */
.sf-outcomes-grid.is-collapsed .sf-outcome-item:nth-child(n+7) {
  display: none;
}

.sf-outcomes-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 4px;
  background: none;
  border: none;
  padding: 4px 0;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 800;
  color: var(--deep-blue);
  cursor: pointer;
}

/* The display:inline-flex above would otherwise override the UA
   [hidden]{display:none}, leaving a dead "Show all"/"Read more" button
   visible before course-page.js decides the toggle is needed. */
.sf-outcomes-toggle[hidden],
.sf-course-about__toggle[hidden],
.sf-course-content__toggle-all[hidden] {
  display: none;
}

.sf-outcomes-toggle:hover {
  text-decoration: underline;
}

.sf-outcomes-toggle:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ------------------------------------------------- Overview: about */
.sf-course-about__body {
  font-size: 15px;
  color: var(--body-2);
  line-height: 1.65;
  max-width: 720px;
}

/* Clamp + gradient fade, applied only by course-page.js once it confirms the
   content overflows ~5 lines. No-JS: the full description is visible. */
.sf-course-about__body.is-clamped {
  max-height: 132px;
  overflow: hidden;
  position: relative;
}

.sf-course-about__body.is-clamped::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 48px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--white));
  pointer-events: none;
}

.sf-course-about__toggle {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 4px;
  background: none;
  border: none;
  padding: 4px 0;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 800;
  color: var(--deep-blue);
  cursor: pointer;
}

.sf-course-about__toggle:hover {
  text-decoration: underline;
}

.sf-course-about__toggle:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

.sf-course-about__body h2,
.sf-course-about__body h3 {
  color: var(--ink);
  font-weight: 900;
}

.sf-course-about__body h3 {
  font-size: 16px;
  margin: 18px 0 8px;
}

.sf-course-about__body p {
  margin: 0 0 12px;
}

.sf-course-about__body a {
  color: var(--deep-blue);
  font-weight: 700;
}

.sf-course-about__body ul,
.sf-course-about__body ol {
  margin: 0 0 12px;
  padding-left: 20px;
}

.sf-course-about__body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--r-card-sm);
}

/* Skill chips at foot of the About card */
.sf-course-skills-block {
  margin-top: 18px;
  border-top: 1px solid var(--strip);
  padding-top: 14px;
}

/* About card with no description (e.g. it only repeated the hero subtitle):
   the skills block is the card's only content, so no divider above it. */
.sf-course-skills-block:first-child {
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
}

.sf-course-skills-block__label {
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 8px;
}

.sf-course-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sf-course-skill-chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  box-sizing: border-box;
  font-size: 13px;
  font-weight: 800;
  color: var(--deep-blue);
  background: var(--blue-fill);
  border-radius: var(--r-btn);
  padding: 6px 14px;
  text-decoration: none;
}

.sf-course-skill-chip:hover {
  background: var(--blue);
  color: var(--white);
}

/* ---------------------------------------------- Overview: instructor card */
.sf-instructor-card {
  display: flex;
  gap: 20px;
}

.sf-instructor-card__avatar {
  width: 58px;
  height: 58px;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--blue), var(--blue-hover));
  color: var(--white);
  font-weight: 900;
  font-size: 22px;
  display: grid;
  place-items: center;
}

.sf-instructor-card__avatar--photo {
  background: none;
  object-fit: cover;
}

.sf-instructor-card__body {
  flex: 1;
  min-width: 0;
}

.sf-instructor-card__name {
  font-size: 16px;
  font-weight: 900;
  color: var(--ink);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.sf-instructor-card__name a {
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.sf-instructor-card__name a:hover {
  text-decoration: underline;
}

.sf-instructor-badge {
  font-size: 13px;
  font-weight: 800;
  color: var(--deep-blue);
  background: var(--blue-fill);
  border-radius: 6px;
  padding: 2px 8px;
}

.sf-instructor-card__callout {
  font-size: 13px;
  /* Plain text, not link-styled: the link is "View all courses by …" below
     (C-r2-6). */
  font-weight: 600;
  color: var(--body-2);
  margin-top: 6px;
}

.sf-instructor-card__bio {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin: 6px 0 0;
}

.sf-instructor-card__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--deep-blue);
  text-decoration: none;
}

.sf-instructor-card__link:hover {
  text-decoration: underline;
}

/* ---------------------------------------------------- Who this is for */
.sf-audience-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sf-audience-item {
  display: flex;
  gap: 10px;
  font-size: 15px;
  color: var(--body-2);
  line-height: 1.5;
}

.sf-audience-item__icon {
  color: var(--blue);
  flex: none;
  display: inline-flex;
  margin-top: 1px;
}

.sf-audience-item__icon svg { width: 16px; height: 16px; }

.sf-audience-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--blue-fill);
  border-radius: var(--r-card-sm);
  font-size: 14px;
  color: var(--deep-blue);
  line-height: 1.5;
}

.sf-audience-note__icon {
  flex: none;
  margin-top: 1px;
}

.sf-audience-note__icon svg { width: 16px; height: 16px; }

/* ------------------------------------------- Content: try it free first */
.sf-tryfree {
  background: var(--blue-fill);
  border-color: var(--blue-border);
}

.sf-tryfree__heading {
  font-size: 14px;
  font-weight: 900;
  color: var(--ink);
  margin-bottom: 12px;
}

.sf-tryfree__item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: var(--white);
  border: 1px solid var(--blue-border);
  border-radius: var(--r-card-sm);
  padding: 12px 16px;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font);
  transition: box-shadow .12s ease;
}

.sf-tryfree__item:hover {
  box-shadow: var(--shadow-card);
}

.sf-tryfree__play {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 50%;
  background: var(--blue-fill);
  color: var(--deep-blue);
  display: grid;
  place-items: center;
}

.sf-tryfree__play svg { width: 16px; height: 16px; }

.sf-tryfree__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sf-tryfree__title {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}

.sf-tryfree__meta {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.sf-tryfree__badge {
  margin-left: auto;
  font-size: 13px;
  font-weight: 800;
  color: var(--green-ink);
  background: var(--green-fill);
  border-radius: 6px;
  padding: 2px 8px;
  white-space: nowrap;
}

/* -------------------------------------------------- Content: accordion */
.sf-course-content__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.sf-course-content__tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 8px;
}

.sf-course-content__counts {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.sf-course-content__toggle-all {
  font-size: 13px;
  font-weight: 800;
  color: var(--deep-blue);
  background: none;
  border: none;
  cursor: pointer;
  /* 44px touch target; the negative inline margin keeps the label aligned
     with the card edge. */
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
  margin-right: -8px;
  font-family: var(--font);
}

.sf-course-content__toggle-all:hover {
  text-decoration: underline;
}

.sf-chapters {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sf-chapter {
  border: 1px solid var(--card-border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--white);
}

.sf-chapter__header {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 13px 16px;
  min-height: 44px;
  box-sizing: border-box;
  list-style: none;
}

.sf-chapter__header::-webkit-details-marker { display: none; }

.sf-chapter__header:hover {
  background: var(--page);
}

.sf-chapter__title {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}

.sf-chapter__count {
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.sf-chapter__chevron {
  color: var(--muted-2);
  display: inline-flex;
  transition: transform .15s ease;
}

.sf-chapter__chevron svg { width: 18px; height: 18px; }

.sf-chapter[open] .sf-chapter__chevron {
  transform: rotate(180deg);
}

.sf-chapter__lessons {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 16px 12px;
  border-top: 1px solid var(--strip);
}

.sf-lesson-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  box-sizing: border-box;
  font-size: 14px;
  color: var(--body-2);
  padding: 6px 0;
  text-decoration: none;
}

.sf-lesson-row:hover .sf-lesson-title {
  color: var(--deep-blue);
}

/* Free-preview rows render as <button> triggers for the preview modal —
   reset UA button chrome to match the anchor rows exactly. */
button.sf-lesson-row--preview {
  width: 100%;
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

button.sf-lesson-row--preview .sf-lesson-icon {
  color: var(--blue);
}

.sf-lesson-icon {
  color: var(--faint);
  display: inline-flex;
  flex: none;
}

.sf-lesson-icon svg { width: 14px; height: 14px; }

.sf-lesson-title {
  font-weight: 600;
  color: var(--body-2);
}

.sf-lesson-free {
  font-size: 13px;
  font-weight: 800;
  color: var(--green-ink);
  background: var(--green-fill);
  border-radius: 6px;
  padding: 2px 8px;
  white-space: nowrap;
}

.sf-lesson-dur {
  margin-left: auto;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

/* The first free-preview row gets the elevated tinted-card treatment. */
.sf-lesson-row--elevated {
  background: var(--blue-fill);
  border-radius: var(--r-card-sm);
  padding-left: 10px;
  padding-right: 10px;
  margin: 0 -10px;
}

.sf-lesson-row--elevated .sf-lesson-icon {
  color: var(--blue);
}

/* Footer checks row (worksheets/certificate/own pace) */
.sf-course-content__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--strip);
}

.sf-content-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.sf-content-check__icon {
  display: inline-flex;
  color: var(--green);
}

.sf-content-check__icon svg { width: 15px; height: 15px; }

/* -------------------------------------------------------------- Reviews */
.sf-reviews-summary {
  display: flex;
  gap: 32px;
  margin-bottom: 18px;
}

.sf-reviews-summary__left {
  text-align: center;
  flex: none;
}

.sf-reviews-score {
  font-size: 44px;
  font-weight: 900;
  color: var(--ink);
  line-height: 1;
  display: block;
}

.sf-reviews-stars {
  font-size: 15px;
  color: var(--star);
  font-weight: 800;
  margin: 4px 0 2px;
}

.sf-star--empty {
  color: var(--star-track);
}

.sf-reviews-count {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}

.sf-reviews-count--truncated {
  margin-top: 2px;
}

.sf-reviews-histogram {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-width: 420px;
}

.sf-histogram-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.sf-histogram-label {
  width: 30px;
  text-align: right;
  color: var(--muted);
}

.sf-histogram-bar {
  flex: 1;
  height: 8px;
  background: var(--strip);
  border-radius: var(--r-pill);
  overflow: hidden;
}

.sf-histogram-fill {
  height: 100%;
  background: var(--star);
  border-radius: var(--r-pill);
}

.sf-histogram-count {
  width: 20px;
  color: var(--muted);
}

.sf-reviews-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sf-review {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--strip);
}

.sf-review__body {
  flex: 1;
  min-width: 0;
}

.sf-review__avatar {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  background: var(--strip);
  color: var(--muted);
  font-weight: 900;
  font-size: 14px;
  display: grid;
  place-items: center;
}

.sf-review__author {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}

.sf-review__date {
  font-weight: 600;
  color: var(--muted);
  font-size: 13px;
}

.sf-review__stars {
  font-size: 13px;
  color: var(--star);
  font-weight: 800;
  margin: 2px 0;
}

.sf-review__content {
  font-size: 14px;
  color: var(--body-2);
  line-height: 1.55;
  margin: 0;
}

.sf-review-reply {
  margin-top: 10px;
  padding: 10px 14px;
  background: var(--page);
  border-radius: var(--r-card-sm);
  border: 1px solid var(--card-border);
}

.sf-review-reply__author {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}

.sf-review-reply__badge {
  font-size: 11px;
  font-weight: 800;
  color: var(--deep-blue);
  background: var(--blue-fill);
  border-radius: 6px;
  padding: 2px 7px;
  margin-left: 6px;
}

.sf-review-reply__date {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  margin-left: 6px;
}

.sf-review-reply__content {
  font-size: 14px;
  color: var(--body-2);
  line-height: 1.5;
  margin: 6px 0 0;
}

/* Review pager (built by course-page.js) */
.sf-reviews-pager {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  border-top: 1px solid var(--strip);
  padding-top: 16px;
  flex-wrap: wrap;
}

.sf-reviews-pager__btn {
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--card-border);
  border-radius: var(--r-btn);
  background: var(--white);
  color: var(--ink);
  font: 700 13px var(--font);
  cursor: pointer;
}

.sf-reviews-pager__btn:hover:not(:disabled) {
  background: var(--page);
}

.sf-reviews-pager__btn.is-current {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
  font-weight: 800;
  cursor: default;
}

.sf-reviews-pager__btn:disabled {
  opacity: .5;
  cursor: default;
}

.sf-reviews-pager__status {
  margin-left: auto;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

/* ----------------------------------------------------------------- FAQ */
.sf-faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sf-faq-item {
  border: 1px solid var(--card-border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--white);
}

.sf-faq-item__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  padding: 14px 18px;
  min-height: 44px;
  box-sizing: border-box;
  list-style: none;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}

.sf-faq-item__question::-webkit-details-marker { display: none; }

.sf-faq-item__question:hover {
  background: var(--page);
}

.sf-faq-item__chevron {
  color: var(--muted-2);
  flex: none;
  display: inline-flex;
  transition: transform .15s ease;
}

.sf-faq-item__chevron svg { width: 18px; height: 18px; }

.sf-faq-item[open] .sf-faq-item__chevron {
  transform: rotate(180deg);
}

.sf-faq-item__answer {
  padding: 0 18px 16px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--body-2);
  border-top: 1px solid var(--strip);
  padding-top: 12px;
}

.sf-faq-item__answer a {
  color: var(--deep-blue);
  font-weight: 700;
}

/* ----------------------------------------------------------- Purchase rail */
.sf-rail-card {
  background: var(--white);
  border: 1px solid var(--card-border);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: 0 16px 44px rgba(33, 52, 75, .16);
}

.sf-rail-thumb {
  display: block;
  position: relative;
  height: 190px;
  background: var(--blue-fill);
  border: none;
  padding: 0;
  width: 100%;
  cursor: default;
  overflow: hidden;
}

.sf-rail-thumb--btn,
a.sf-rail-thumb {
  cursor: pointer;
}

.sf-rail-thumb__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sf-rail-thumb__ph {
  width: 100%;
  height: 100%;
}

.sf-rail-thumb__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(33, 52, 75, .12);
}

.sf-rail-thumb__play {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--white);
  color: var(--blue);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(33, 52, 75, .18);
}

.sf-rail-thumb__play svg { width: 20px; height: 20px; }

.sf-rail-thumb__pill {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  /* A token that turns with the theme: fixed white left light text on a
     white pill in dark mode. */
  background: var(--glass-white);
  border-radius: var(--r-pill);
  padding: 4px 12px;
}

/* Flash sale — red "Sale" band + dark days/hours/min/sec segments (soofos.nl reference). */
.sf-rail-flash {
  margin: 12px 16px 0;
  border-radius: var(--r-card);
  overflow: hidden;
}

.sf-rail-flash__band {
  background: var(--red);
  color: var(--white);
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
}

.sf-flash-countdown {
  display: flex;
  align-items: stretch;
  gap: 6px;
  background: var(--ink);
  padding: 10px;
}

.sf-rail-flash__seg {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: var(--soofos-on-navy-surface);
  border: 1px solid var(--soofos-on-navy-border);
  border-radius: var(--r-btn);
  padding: 6px 2px;
  min-width: 0;
}

.sf-rail-flash__num {
  font-size: 16px;
  font-weight: 900;
  color: var(--soofos-on-navy);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.sf-rail-flash__unit {
  font-size: 11px;
  font-weight: 600;
  color: var(--soofos-on-navy-muted);
  text-transform: lowercase;
}

/* Save control */
.sf-rail-save {
  padding: 12px 22px 0;
}

.sf-rail-save__btn,
.sf-rail-save__login-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font);
  padding: 0;
}

.sf-rail-save__btn:hover,
.sf-rail-save__login-link:hover {
  color: var(--deep-blue);
}

.sf-rail-save__icon {
  display: inline-flex;
}

.sf-rail-save__icon svg { width: 15px; height: 15px; }

.sf-rail-save__btn.is-wishlisted {
  color: var(--red);
}

/* Saving in flight (wishlist-toggle.js disables the button for the AJAX
   round trip): show it, instead of a button that just stops responding. */
.sf-rail-save__btn[disabled] {
  opacity: .6;
  cursor: progress;
}

/* Error outcome of a save (role="status", filled by wishlist-toggle.js). */
.sf-rail-save__status {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--error);
}

.sf-rail-save__status:empty {
  display: none;
}

.sf-rail-save__btn.is-wishlisted .sf-rail-save__icon svg {
  fill: var(--red);
}

/* Rail body */
.sf-rail-body {
  padding: 14px 22px 20px;
}

.sf-rail-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.sf-rail-price__amount {
  font-size: 32px;
  font-weight: 900;
  color: var(--ink);
}

.sf-rail-price__sub {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.sf-rail-price__regular {
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: line-through;
}

.sf-rail-includes {
  list-style: none;
  margin: 13px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.sf-rail-includes li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  color: var(--body-2);
  font-weight: 700;
}

.sf-rail-check {
  color: var(--green);
  font-weight: 900;
  flex: none;
  display: inline-flex;
}

.sf-rail-check svg { width: 14px; height: 14px; }

/* AI study kit perk rows (Task 11) — same row as the other checks, with a
   "Pro" chip pushed to the row end so the upgrade value reads clearly
   without adding visual weight above the Buy CTA.
   Bugfix: `justify-content: space-between` here used to distribute all THREE
   flex items in the <li> (the check icon, the label text node, and the badge)
   evenly across the row — with exactly 3 items that puts the middle one (the
   label) visually centered instead of left-aligned like every other perk row.
   Left the <li> on its inherited flex-start alignment (matching
   .sf-rail-includes li above) and push only the badge to the row end. */
.sf-rail-includes__ai-perk .badge-blue {
  flex: none;
  margin-left: auto;
}

.btn-buy--rail,
.btn-primary.btn-buy--rail {
  width: 100%;
  padding: 15px;
  font-size: 15px;
  justify-content: center;
}

.btn-ghost--rail {
  width: 100%;
  margin-top: 9px;
  padding: 13px;
  border: 1.5px solid var(--input-border);
  border-radius: var(--r-btn);
  background: var(--white);
  color: var(--ink);
  font: 800 14px var(--font);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.btn-ghost--rail:hover {
  border-color: var(--blue);
}

.sf-btn-icon {
  display: inline-flex;
}

.sf-btn-icon svg { width: 14px; height: 14px; }

.sf-rail-guarantee {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 10px;
  font-weight: 600;
}

/* Team-license quantity stepper (b2b-license-block.php) */
.sf-qty-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin: 4px 0 12px;
}

.sf-qty-field__label {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}

.sf-qty-stepper {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--card-border);
  border-radius: var(--r-btn);
  background: var(--white);
  overflow: hidden;
}

.sf-qty-stepper__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  padding: 0;
}

.sf-qty-stepper__btn:first-child {
  border-right: 1px solid var(--card-border);
}

.sf-qty-stepper__btn:last-child {
  border-left: 1px solid var(--card-border);
}

.sf-qty-stepper__btn:hover {
  background: var(--blue-fill);
  color: var(--deep-blue);
}

.sf-qty-stepper__btn svg {
  width: 16px;
  height: 16px;
}

.sf-qty-stepper__input {
  width: 64px;
  height: 44px;
  border: none;
  background: var(--white);
  color: var(--ink);
  font: 800 14px var(--font);
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}

.sf-qty-stepper__input::-webkit-outer-spin-button,
.sf-qty-stepper__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.sf-qty-stepper__btn:focus-visible,
.sf-qty-stepper__input:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}

/* Enrolled variant — neutral brand chip for "you have access"; green only
   once the course is completed (semantic colour rule). */
.sf-rail-enrolled-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  font: 800 13px var(--font);
  color: var(--deep-blue);
  background: var(--blue-fill);
  border-radius: var(--r-pill);
  padding: 4px 10px;
}

.sf-rail-enrolled-badge--done {
  color: var(--green-ink);
  background: var(--green-fill);
}

.sf-rail-enrolled-badge__icon {
  display: inline-flex;
}

.sf-rail-enrolled-badge__icon svg { width: 14px; height: 14px; }

.sf-rail-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.sf-rail-progress__track {
  flex: 1;
  height: 8px;
  background: var(--strip);
  border-radius: var(--r-pill);
  overflow: hidden;
}

.sf-rail-progress__fill {
  height: 100%;
  background: var(--blue);
  border-radius: var(--r-pill);
}

.sf-rail-progress__fill--done {
  background: var(--green);
}

.sf-rail-progress__text {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}

.sf-rail-progress__meta {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin: 4px 0 12px;
}

.sf-rail-progress__duration {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  margin: 10px 0 0;
}

/* Upsell footer */
.sf-rail-upsell {
  border-top: 1px solid var(--card-border);
  background: var(--page);
  padding: 16px 22px;
}

.sf-rail-upsell__heading {
  font-size: 12px;
  font-weight: 900;
  color: var(--deep-blue);
  margin-bottom: 6px;
}

.sf-rail-upsell__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0 12px;
  padding: 0;
}

.sf-rail-upsell__label {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.sf-rail-upsell__label:hover {
  color: var(--deep-blue);
}

.sf-rail-upsell__price {
  font-size: 14px;
  font-weight: 900;
  color: var(--ink);
  text-align: right;
}

.sf-rail-upsell__per {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}

.sf-rail-upsell__sub {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin: 4px 0 0;
}

.sf-rail-upsell__sub a {
  font-weight: 800;
  color: var(--deep-blue);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* Plus-first fallback: lifetime strip (no trial badge — Plus never uses trial copy) */
.sf-rail-lifetime {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding: 12px 16px;
  border: 1px solid var(--card-border);
  border-radius: var(--r-card-sm);
  background: var(--white);
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
}

.sf-rail-lifetime__price {
  font-weight: 900;
}

/* Save-for-later link + social proof, both below the card (not inside it). */
.sf-rail-save--under {
  padding: 12px 6px 0;
  text-align: center;
}

.sf-rail-save--under .sf-rail-save__btn,
.sf-rail-save--under .sf-rail-save__login-link {
  font-size: 13px;
}

/* ----------------------------------------------------- Discover more */
.sf-course-related {
  margin-top: 4px;
}

/* ---------------------------------------------------------- Preview modal */
.sf-preview-modal {
  border: none;
  border-radius: var(--r-card);
  box-shadow: var(--shadow-pop);
  padding: 0;
  max-width: 720px;
  width: 94vw;
  background: var(--white);
}

.sf-preview-modal::backdrop {
  background: var(--overlay);
}

.sf-preview-modal__inner {
  display: flex;
  flex-direction: column;
}

.sf-preview-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--card-border);
}

.sf-preview-modal__labels {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sf-preview-modal__tag {
  display: inline-flex;
  align-self: flex-start;
}

/* Brand badge at a readable size (the shared .badge-blue is 10px). */
.sf-preview-modal__tag.badge-blue {
  font-size: 13px;
}

.sf-preview-modal__title {
  font-size: 17px;
  font-weight: 900;
  color: var(--ink);
  margin: 0;
  line-height: 1.25;  overflow-wrap: anywhere;
}

.sf-preview-modal__close {
  /* 44px outline-icon close (was a 30px light-grey text glyph). The
     negative margin keeps the icon aligned with the header padding. */
  min-width: 44px;
  min-height: 44px;
  display: inline-grid;
  place-items: center;
  margin: -10px -12px 0 0;
  color: var(--muted);
  background: none;
  border: none;
  border-radius: var(--r-btn);
  cursor: pointer;
  padding: 0;
  flex: none;
  transition: color .15s;
}

.sf-preview-modal__close svg {
  width: 20px;
  height: 20px;
}

.sf-preview-modal__close:hover {
  color: var(--ink);
}

.sf-preview-modal__video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--player-dark);
}

.sf-preview-modal__video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.sf-preview-modal__foot {
  padding: 14px 24px;
  font-size: 14px;
  color: var(--muted-2);
  text-align: center;
  margin: 0;
}

.sf-preview-modal__foot a {
  color: var(--blue);
  font-weight: 800;
}

/* Open animation — skipped for reduced-motion users. */
@media (prefers-reduced-motion: no-preference) {
  .sf-preview-modal[open] {
    animation: sf-preview-modal-in .18s ease-out;
  }

  @keyframes sf-preview-modal-in {
    from {
      opacity: 0;
      transform: translateY(8px) scale(.98);
    }

    to {
      opacity: 1;
      transform: none;
    }
  }
}

/* Scroll lock while the preview modal is open (toggled by
   course-preview-modal.js — native <dialog> does not lock the page). */
html.sf-modal-open,
html.sf-modal-open body {
  overflow: hidden;
}

/* --------------------------------------- Preview modal: end-of-lesson CTA */

/* Ended state: the video block gives way to the conversion panel
   (Presentation/course.html pv:2), header + close stay. */
.sf-preview-modal--ended .sf-preview-modal__video,
.sf-preview-modal--ended .sf-preview-modal__foot {
  display: none;
}

.sf-preview-end {
  padding: 36px 44px;
  text-align: center;
  background: var(--blue-tint);
}

.sf-preview-end__emoji {
  display: block;
  font-size: 36px;
  line-height: 1;
  margin-bottom: 8px;
}

.sf-preview-end__title {
  font-size: 22px;
  font-weight: 900;
  color: var(--ink);
  margin: 0;
}

.sf-preview-end__sub {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
  margin: 8px auto 20px;
  max-width: 400px;
}

.sf-preview-end__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 340px;
  margin: 0 auto;
}

.sf-preview-end__cta {
  padding: 14px;
  font-size: 15px;
}

/* "Play next free unit" — secondary action (reuses .btn .btn-ghost from
   components.css), sized to match the primary CTA above it. */
.sf-preview-end__next {
  padding: 14px;
  font-size: 15px;
}

.sf-preview-end__replay {
  border: none;
  background: none;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  cursor: pointer;
  text-decoration: underline;
  padding: 6px;
  min-height: 32px;
}

.sf-preview-end__replay:hover {
  color: var(--blue-hover);
}

@media (max-width: 480px) {
  .sf-preview-end {
    padding: 28px 18px;
  }
}

/* --------------------------------------------------------- Sticky bars */
/* Bottom purchase / resume bar for STACKED layouts (TASK: desktop
   floating-bar overlay fix; mobile r1 breakpoint alignment). The two-column
   desktop layout needs no bar — its purchase rail is sticky. course-page.js
   decides "stacked" from the rail's own computed position (so the funnel's
   <=1000px media query / portal <=1000px column container query and the enrolled page's container
   query are all honoured without duplicating a pixel breakpoint), puts
   `sf-sticky-active` on <html> while stacked, and adds .is-visible only while
   none of the primary CTAs is on screen. Hidden = visibility:hidden, so the
   bar's link is also out of the tab order until it is shown. Fixed
   positioning means it never affects layout. `--sf-sticky-left` (set by the
   JS) starts it at the portal content column so the static sidebar stays
   uncovered; `--sf-sticky-h` is its measured height (footer reserve below). */
.sf-sticky-bottom {
  position: fixed;
  left: var(--sf-sticky-left, 0px);
  right: 0;
  z-index: 60;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s;
  display: flex;
  bottom: 0;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom)); /* clear home-indicator devices */
  background: var(--white);
  border-top: 1px solid var(--card-border);
  box-shadow: 0 -8px 24px rgba(33, 52, 75, .10);
  transform: translateY(8px);
}

@media (prefers-reduced-motion: reduce) {
  .sf-sticky-bottom {
    transition: none;
  }
}

.sf-sticky-bottom.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  transition-delay: 0s;
}

.sf-sticky-bottom__info {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
}

/* One line, always (an enrolled "Next: <long unit title>" used to wrap to
   four lines and make the bar ~120px tall). */
.sf-sticky-bottom__price {
  font-size: 16px;
  font-weight: 900;
  color: var(--ink);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

/* Readable (12px, --muted) and allowed to wrap to a second line instead of
   being cut off with an ellipsis on a 360px phone. */
.sf-sticky-bottom__micro {
  font-size: 13px;
  line-height: 1.35;
  color: var(--muted);
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sf-sticky-bottom__cta {
  flex: none;
  min-height: 44px;
  padding: 12px 22px;
  font-size: 14px;
}

/* While the bar can appear, reserve its MEASURED height under the footer
   (legal links stay reachable at the end of the scroll) and keep keyboard
   focus from scrolling a control in under it (WCAG 2.4.11). This stylesheet
   only loads on single course pages (soofos_resolve_page_style_slug() in
   functions.php), so scoping to #sf-footer is safe. */
html.sf-sticky-active {
  scroll-padding-bottom: calc(var(--sf-sticky-h, 68px) + 8px);
}

html.sf-sticky-active #sf-footer {
  padding-bottom: var(--sf-sticky-h, calc(68px + env(safe-area-inset-bottom)));
}

/* -------------------------------------------------------------- Responsive */
@media (max-width: 1000px) {
  .sf-course-hero {
    padding-bottom: 28px; /* rail no longer overlaps on narrow screens */
  }

  .sf-course-hero__inner,
  .sf-section-nav__inner {
    padding-right: 24px;
  }

  .sf-course-cols {
    flex-direction: column;
    padding-top: 20px;
  }

  /* Lead with the price/buy rail directly under the hero, then the tabs
     (the rail is already first in the DOM; order 0 = DOM order). */
  .sf-course-rail {
    width: auto;
    align-self: stretch;
    margin-top: 0;
    margin-bottom: 20px;
    position: static;
    order: 0;
    /* The 45 above only makes the sticky desktop rail float over the
       section nav; a static flex item keeps it and would scroll OVER the
       sticky nav (z 40) on stacked layouts (C-r2-1). */
    z-index: auto;
  }
}

/* ------------------------------------------------- Portal-wrapped variant
   The 1000px breakpoint above reacts to viewport width, but a logged-in,
   portal-wrapped course page (.soofos-portal body class,
   single-sfwd-courses.php) loses the side panel's width (268px open, 76px
   as an icon rail) before .sf-course-cols sees a pixel. So this variant
   asks the content column itself (the sf-course size container): the same
   stacked layout as above as soon as the COLUMN is 1000px or narrower. A
   member therefore gets the sticky price card beside the content at exactly
   the widths a visitor does, with the panel open or collapsed (was: stacked
   for every viewport up to 1320px, also with the panel collapsed). */
@container sf-course (max-width: 1000px) {
  .soofos-portal .sf-course-hero {
    padding-bottom: 28px;
  }

  .soofos-portal .sf-course-hero__inner,
  .soofos-portal .sf-section-nav__inner {
    padding-right: 24px;
  }

  .soofos-portal .sf-course-cols {
    flex-direction: column;
    padding-top: 20px;
  }

  .soofos-portal .sf-course-rail {
    width: auto;
    align-self: stretch;
    margin-top: 0;
    margin-bottom: 20px;
    position: static;
    order: 0;
    z-index: auto; /* see the 1000px block above (C-r2-1) */
  }

  
}

/* Stacked rail on a tablet-width column (>=600px): a full-width card with a
   fixed 190px-tall thumbnail cropped the 16:9 course art to ~3.8:1 and left
   the right half of the price block empty. Thumbnail left at its own 16:9,
   price/includes/CTA on the right; nothing moves out of the card. Scoped to
   the funnel rail (.sf-course-rail) — the enrolled rail hides its thumbnail
   when stacked. Two blocks because the funnel stacks at a <=1000px viewport,
   or at a <=1000px content column inside the portal shell. */
@media (max-width: 1000px) {
  @container sf-course (min-width: 600px) {
    .sf-course-rail .sf-rail-card {
      display: grid;
      grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
      /* Row 2 (the optional flash-sale countdown under the thumbnail) is
         flexible, so the price body spanning rows 1-2 only adds the height
         it actually needs there instead of being split evenly over both. */
      grid-template-rows: auto 1fr;
      align-items: start;
    }

    .sf-course-rail .sf-rail-card > * {
      grid-column: 1 / -1;
    }

    .sf-course-rail .sf-rail-card > .sf-rail-thumb {
      grid-column: 1;
      grid-row: 1;
      height: auto;
      aspect-ratio: 16 / 9;
    }

    .sf-course-rail .sf-rail-card > .sf-rail-flash {
      grid-column: 1;
      grid-row: 2;
    }

    .sf-course-rail .sf-rail-card > .sf-rail-body {
      grid-column: 2;
      grid-row: 1 / span 2;
    }
  }
}

@container sf-course (max-width: 1000px) {
  @container sf-course (min-width: 600px) {
    .soofos-portal .sf-course-rail .sf-rail-card {
      display: grid;
      grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
      /* Row 2 (the optional flash-sale countdown under the thumbnail) is
         flexible, so the price body spanning rows 1-2 only adds the height
         it actually needs there instead of being split evenly over both. */
      grid-template-rows: auto 1fr;
      align-items: start;
    }

    .soofos-portal .sf-course-rail .sf-rail-card > * {
      grid-column: 1 / -1;
    }

    .soofos-portal .sf-course-rail .sf-rail-card > .sf-rail-thumb {
      grid-column: 1;
      grid-row: 1;
      height: auto;
      aspect-ratio: 16 / 9;
    }

    .soofos-portal .sf-course-rail .sf-rail-card > .sf-rail-flash {
      grid-column: 1;
      grid-row: 2;
    }

    .soofos-portal .sf-course-rail .sf-rail-card > .sf-rail-body {
      grid-column: 2;
      grid-row: 1 / span 2;
    }
  }
}

/* Phone-width stacked rail: a shorter (2:1) thumbnail instead of the fixed
   190px block, so the price, includes and CTA come up into the first screen.
   Only ever applies stacked (the two-column rail is 340px wide, above 600px
   of container this never matches a side rail). */
@container sf-course (max-width: 599px) {
  .sf-course-rail .sf-rail-thumb {
    height: auto;
    aspect-ratio: 2 / 1;
  }
}

/* Hero instructor row on small phones: name on its own line (never split),
   the callout on the next line under it, without its leading "·". */
@media (max-width: 480px) {
  .sf-instructor-chip {
    flex-wrap: wrap;
    row-gap: 0;
  }

  .sf-instructor-callout {
    flex-basis: 100%;
    padding-left: 38px; /* 30px avatar + 8px gap: aligns under the name */
  }

  .sf-instructor-callout__sep {
    display: none;
  }

  /* Instructor card: avatar above the text instead of a narrow text column
     beside it (funnel + enrolled cards). */
  .sf-instructor-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* Chevrons rotate on open; no motion for reduced-motion users. */
@media (prefers-reduced-motion: reduce) {
  .sf-chapter__chevron,
  .sf-faq-item__chevron,
  .sf-tryfree__item {
    transition: none;
  }
}

@media (max-width: 680px) {
  .sf-course-title { font-size: 27px; }

  .sf-outcomes-grid {
    grid-template-columns: 1fr;
  }

  .sf-course-card {
    padding: 18px 18px;
  }

  .sf-reviews-summary {
    flex-direction: column;
    gap: 14px;
  }

  .sf-reviews-summary__left {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
  }
}

/* ----------------------------------------------------- Per-unit state
   Owner view (K5 A): done / next-up modifiers on the accordion's own
   .sf-lesson-row/.sf-lesson-icon (course/curriculum.php). */
.sf-lesson-row--done .sf-lesson-icon {
  color: var(--green);
}

.sf-lesson-row--done .sf-lesson-title {
  color: var(--muted);
}

/* Chapter whose every unit is done: check before its "x of y done" count. */
.sf-chapter__done-icon {
  display: inline-flex;
  color: var(--green);
}

.sf-chapter__done-icon svg { width: 14px; height: 14px; }

.sf-lesson-row--next {
  background: var(--blue-fill);
  border-radius: var(--r-card-sm);
  padding-left: 10px;
  padding-right: 10px;
  margin: 0 -10px;
}

.sf-lesson-row--next .sf-lesson-icon {
  color: var(--blue);
}

.sf-lesson-row--next .sf-lesson-title {
  color: var(--deep-blue);
}

.sf-lesson-next-badge {
  font-size: 13px;
  font-weight: 800;
  color: var(--deep-blue);
  background: var(--white);
  border-radius: 6px;
  padding: 2px 8px;
  white-space: nowrap;
}

/* ============================================================
   Mobile round 2 (lane course) — C-r2-* items. Tokens only.
   ============================================================ */

/* C-r2-4: locked-unit landing. LearnDash bounces a locked-unit tap to
   #sf-buy (R1-D14); the card is framed and a one-line note says why the
   page moved. Only under :target — no JS, nothing shown otherwise. */
.sf-rail-lock-note {
  display: none;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 12px;
  padding: 10px 12px;
  background: var(--blue-fill);
  color: var(--deep-blue);
  border-radius: var(--r-btn);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.sf-rail-lock-note__icon {
  flex: none;
  display: inline-flex;
  margin-top: 1px;
}

.sf-rail-lock-note__icon svg { width: 16px; height: 16px; }

#sf-buy:target .sf-rail-lock-note {
  display: flex;
}

#sf-buy:target .sf-rail-card {
  outline: 2px solid var(--deep-blue);
  outline-offset: 2px;
}

/* C-r2-6: the free-preview badge drops under the text on small phones
   instead of being squeezed into a 3-line column. */
@media (max-width: 480px) {
  .sf-tryfree__item {
    flex-wrap: wrap;
  }

  /* Text keeps the row beside the play disc; only the badge wraps. */
  .sf-tryfree__text {
    flex: 1 1 calc(100% - 50px);
    min-width: 0;
  }

  .sf-tryfree__badge {
    order: 3;
    margin-left: 50px; /* 38px play disc + 12px gap: aligned under the text */
  }
}

/* C-r2-6: related cards — the instructor initial never squashes to a
   sliver; a rating that doesn't fit beside the name gets its own line. The
   partial's inline style sets no flex-shrink/flex-wrap, so these apply. */
.sf-course-related .course-card__instructor {
  flex-wrap: wrap;
  row-gap: 2px;
}

.sf-course-related .course-card__instructor > span:first-child {
  flex-shrink: 0;
}

/* C-r2-6: stacked rail on a tablet-width column — the course art fills its
   cell (no white band under a 16:9 image when no flash-sale row sits
   there), and the Plus price follows its label instead of sitting ~600px
   away. Same two breakpoints as the rail grid above. */
@media (max-width: 1000px) {
  @container sf-course (min-width: 600px) {
    .sf-course-rail .sf-rail-card:not(:has(> .sf-rail-flash)) > .sf-rail-thumb {
      grid-row: 1 / span 2;
      align-self: stretch;
      aspect-ratio: auto;
    }

    .sf-course-rail .sf-rail-card:not(:has(> .sf-rail-flash)) > .sf-rail-thumb :is(.sf-rail-thumb__img, .sf-rail-thumb__ph) {
      position: absolute;
      inset: 0;
    }

    .sf-course-rail .sf-rail-upsell__row {
      justify-content: flex-start;
      gap: 0 16px;
    }
  }
}

@container sf-course (max-width: 1000px) {
  @container sf-course (min-width: 600px) {
    .soofos-portal .sf-course-rail .sf-rail-card:not(:has(> .sf-rail-flash)) > .sf-rail-thumb {
      grid-row: 1 / span 2;
      align-self: stretch;
      aspect-ratio: auto;
    }

    .soofos-portal .sf-course-rail .sf-rail-card:not(:has(> .sf-rail-flash)) > .sf-rail-thumb :is(.sf-rail-thumb__img, .sf-rail-thumb__ph) {
      position: absolute;
      inset: 0;
    }

    .soofos-portal .sf-course-rail .sf-rail-upsell__row {
      justify-content: flex-start;
      gap: 0 16px;
    }
  }
}

/* C-r2-10: a started chapter with units left stands out when collapsed —
   brand blue + play glyph (progress, not a warning). */
.sf-chapter--partial .sf-chapter__count {
  color: var(--deep-blue);
  font-weight: 800;
}

.sf-chapter__left-icon {
  display: inline-flex;
}

.sf-chapter__left-icon svg { width: 12px; height: 12px; }

/* C-r2-11: narrow enrolled column — chapter header on two rows (title +
   chevron, then the count), titles clamped to two lines (full text in the
   title attribute and for screen readers), and the "Continue here" badge
   under the unit title instead of beside it. */
@container sf-course (max-width: 480px) {
  .sf-chapter__header {
    flex-wrap: wrap;
    row-gap: 2px;
  }

  .sf-chapter__title {
    flex: 1 1 calc(100% - 40px);
    min-width: 0;
  }

  .sf-chapter__chevron {
    order: 2;
  }

  .sf-chapter__count {
    order: 3;
    flex-basis: 100%;
    margin-left: 0;
  }

  .sf-chapter__title,
  .sf-lesson-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .sf-lesson-title {
    min-width: 0;
  }

  .sf-lesson-row--next {
    flex-wrap: wrap;
  }

  .sf-lesson-row--next .sf-lesson-title {
    flex: 1 1 calc(100% - 64px);
  }

  .sf-lesson-row--next .sf-lesson-next-badge {
    order: 4;
    margin-left: 24px; /* 14px icon + 10px gap: aligned under the title */
  }
}

/* C-r2-12: enrolled resume bar on phones — the unit title gets two lines
   at a slightly smaller size instead of "Next: Unit 2: Kiez…", and the
   chapter subline (shown in the Continue card too) is dropped there. */
@media (max-width: 480px) {
  .sf-sticky-bottom--resume .sf-sticky-bottom__price {
    font-size: 14px;
    -webkit-line-clamp: 3;
  }

  /* "Next: " prefix hidden visually, still read by screen readers. */
  .sf-sticky-bottom__prefix {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .sf-sticky-bottom--resume .sf-sticky-bottom__micro {
    display: none;
  }
}

/* C-r2-17: one focus ring for the page's own controls (they fell back to
   the browser's 1px default). Controls inside an overflow-hidden box get an
   inset ring so it isn't clipped. The hero (navy) and .btn-primary/.btn-buy
   keep their existing rings. */
.sf-rail-save__btn:focus-visible,
.sf-rail-save__login-link:focus-visible,
.sf-rail-upsell a:focus-visible,
.sf-rail-lifetime:focus-visible,
.btn-ghost--rail:focus-visible,
.sf-course-content__toggle-all:focus-visible,
.sf-course-about__toggle:focus-visible,
.sf-course-skill-chip:focus-visible,
.sf-instructor-card a:focus-visible,
.sf-tryfree__item:focus-visible,
.sf-lesson-row:focus-visible,
.sf-reviews-pager__btn:focus-visible,
.sf-course-related a:focus-visible {
  outline: 2px solid var(--deep-blue);
  outline-offset: 2px;
}

.sf-chapter__header:focus-visible,
.sf-faq-item__question:focus-visible,
.sf-rail-thumb--btn:focus-visible,
a.sf-rail-thumb:focus-visible,
.sf-preview-modal__close:focus-visible {
  outline: 2px solid var(--deep-blue);
  outline-offset: -2px;
}

/* ============================================================
   Joris feedback wave — course page K1 B / K2 B / K3 A / K4 B / K5 A
   One page for buyers and owners. Tokens only.
   ============================================================ */

/* ---------------------------------------- K5 A: "You have access" bar */
.sf-access-banner {
  background: var(--blue-fill);
  border-bottom: 1px solid var(--blue-border);
}

.sf-access-banner__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 14px;
}

.sf-access-banner__icon {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--white);
  color: var(--blue);
  display: grid;
  place-items: center;
}

.sf-access-banner--done .sf-access-banner__icon { color: var(--green); }

.sf-access-banner__icon svg { width: 18px; height: 18px; }

.sf-access-banner__text { flex: 1; min-width: 0; }

.sf-access-banner__title {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
  color: var(--ink);
}

.sf-access-banner__sub {
  margin: 2px 0 0;
  font-size: 14px;
  color: var(--body-2);
}

.sf-access-banner__cta {
  flex: none;
  max-width: 340px;
  gap: 8px;
}

.sf-access-banner__cta-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .sf-access-banner__inner { flex-wrap: wrap; }
  .sf-access-banner__cta { flex: 1 1 100%; max-width: none; justify-content: center; }
}

/* ------------------------------------------ K1 B: hero social proof */
.sf-course-rating__stars {
  color: var(--star);
  letter-spacing: 1px;
}

.sf-course-rating__stars .sf-star--empty { color: var(--on-navy-line); }

.sf-course-rating__score { color: var(--on-navy); }

.sf-course-enrolled {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sf-course-enrolled b { color: var(--on-navy); }

.sf-course-enrolled__icon { display: inline-flex; }

.sf-course-enrolled__icon svg { width: 14px; height: 14px; }

/* ------------------------------- K1 B: What you'll learn + skills (J13) */
.sf-course-outcomes__box {
  background: var(--blue-tint);
  border-radius: var(--r-card-sm);
  padding: 18px 20px;
}

.sf-course-outcomes .sf-course-skills-block {
  border-top: 0;
  padding-top: 0;
  margin-top: 18px;
}

.sf-course-outcomes .sf-course-skills-block:first-child { margin-top: 0; }

h3.sf-course-skills-block__label {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}

.sf-course-skills {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sf-course-outcomes .sf-course-skill-chip {
  font-size: 14px;
  background: var(--white);
  border: 1px solid var(--blue-border);
}

.sf-course-outcomes .sf-course-skill-chip:hover {
  background: var(--blue);
  border-color: var(--blue);
}

/* ------------------------------- K1 B: course content locks + fold */
.sf-lesson-row--locked .sf-lesson-icon { color: var(--faint); }

.sf-chapter__lock {
  display: inline-flex;
  color: var(--faint);
  margin-left: 6px;
  vertical-align: middle;
}

.sf-chapter__lock svg { width: 13px; height: 13px; }

.sf-chapter[hidden] { display: none; }

.sf-chapters-more {
  display: flex;
  margin: 12px auto 0;
  min-height: 44px;
  align-items: center;
  padding: 0 18px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  color: var(--deep-blue);
  background: var(--white);
  border: 1px solid var(--card-border);
  border-radius: var(--r-btn);
  cursor: pointer;
}

.sf-chapters-more[hidden] { display: none; }

.sf-chapters-more:hover { border-color: var(--blue); }

/* ------------------------------------- K1 B: About the instructor */
.sf-instructor-block .sf-instructor-card {
  align-items: center;
  gap: 16px;
}

.sf-instructor-card__stats {
  font-size: 14px;
  color: var(--muted);
  font-weight: 700;
}

.sf-instructor-card__profile { flex: none; }

.sf-instructor-block .sf-instructor-card__bio { margin-top: 14px; }

@container sf-course (max-width: 599px) {
  .sf-instructor-block .sf-instructor-card {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    text-align: left;
  }

  .sf-instructor-block .sf-instructor-card__body { flex: 1 1 0; }

  .sf-instructor-block .sf-instructor-card__name { justify-content: flex-start; }

  .sf-instructor-card__profile { flex: 1 1 100%; justify-content: center; }
}

/* ----------------------------- K1 B / K7: You may also like + Plus row */
.sf-course-related { margin-bottom: 20px; }

.sf-related-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.sf-related-row {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--card-border);
  border-radius: var(--r-card-sm);
  padding: 10px 14px 10px 10px;
  text-decoration: none;
  color: var(--ink);
}

.sf-related-row:hover { border-color: var(--blue); }

.sf-related-row:hover .sf-related-row__title { color: var(--deep-blue); }

.sf-related-row__img {
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  overflow: hidden;
  background: var(--blue-fill);
  display: block;
}

.sf-related-row__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sf-related-row__img--plus {
  display: grid;
  place-items: center;
  color: var(--blue);
  background: var(--white);
}

.sf-related-row__img--plus svg { width: 30px; height: 30px; }

.sf-related-row__body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.sf-related-row__title {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
}

.sf-related-row__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.sf-related-row__star { color: var(--star); margin-right: -6px; }

.sf-related-row__price {
  display: grid;
  justify-items: end;
  gap: 2px;
  text-align: right;
}

.sf-related-row__now {
  font-size: 15px;
  font-weight: 900;
  color: var(--ink);
  white-space: nowrap;
}

.sf-related-row__was {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.sf-related-row__included {
  font-size: 13px;
  font-weight: 800;
  color: var(--deep-blue);
  background: var(--blue-fill);
  border-radius: 6px;
  padding: 3px 8px;
  white-space: nowrap;
}

.sf-related-row__link {
  font-size: 13px;
  font-weight: 800;
  color: var(--deep-blue);
}

.sf-related-row--plus {
  background: var(--blue-fill);
  border-color: var(--blue-border);
}

@container sf-course (max-width: 599px) {
  .sf-related-row {
    grid-template-columns: 80px minmax(0, 1fr);
  }

  .sf-related-row__price {
    grid-column: 2;
    justify-items: start;
    text-align: left;
    grid-auto-flow: column;
    justify-content: start;
    align-items: baseline;
    gap: 8px;
  }
}

/* ------------------------------------ K2 B: two-way choice purchase box */
.sf-plan-tiles {
  border: 0;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sf-plan-tile {
  position: relative;
  display: grid;
  gap: 1px;
  padding: 10px 12px;
  border: 2px solid var(--card-border);
  border-radius: var(--r-btn);
  cursor: pointer;
  background: var(--white);
}

.sf-plan-tile:hover { border-color: var(--blue-border); }

.sf-plan-tile__input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.sf-plan-tile:has(.sf-plan-tile__input:checked) {
  border-color: var(--blue);
  background: var(--blue-tint);
}

.sf-plan-tile:has(.sf-plan-tile__input:focus-visible) {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.sf-plan-tile__name {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}

.sf-plan-tile__price {
  font-size: 16px;
  font-weight: 900;
  color: var(--ink);
}

.sf-plan-tile__sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.sf-plan-pane .btn-buy--rail { width: 100%; }

/* Pane switch without JS: the checked tile decides which pane shows.
   Browsers without :has() show both panes (course first). */
.sf-plan-choice:has([data-plan="course"]:checked) .sf-plan-pane--plus,
.sf-plan-choice:has([data-plan="plus"]:checked) .sf-plan-pane--course {
  display: none;
}

.sf-plan-pane__lifetime {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  font-weight: 800;
  color: var(--deep-blue);
  text-decoration: none;
}

.sf-plan-pane__lifetime:hover { text-decoration: underline; }

.sf-plan-pane .sf-rail-guarantee {
  margin-top: 10px;
  text-align: center;
}

/* -------------------------- K3 A: preview modal with playlist + buy */
.sf-preview-modal:has(.sf-preview-list) { max-width: 980px; }

.sf-preview-modal__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.sf-preview-modal__body:has(.sf-preview-list) {
  grid-template-columns: minmax(0, 1fr) 280px;
}

.sf-preview-modal__stage { min-width: 0; }

.sf-preview-list {
  border-left: 1px solid var(--card-border);
  background: var(--page);
  max-height: 60vh;
  overflow-x: hidden;
  overflow-y: auto;
}

.sf-preview-list__items {
  list-style: none;
  margin: 0;
  padding: 8px;
  display: grid;
  gap: 4px;
}

.sf-preview-list__item {
  width: 100%;
  min-height: 44px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--r-btn);
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.sf-preview-list__item:hover { background: var(--white); }

.sf-preview-list__item[aria-current="true"] {
  background: var(--white);
  color: var(--deep-blue);
  box-shadow: inset 3px 0 0 var(--blue);
}

.sf-preview-list__icon {
  display: inline-flex;
  color: var(--blue);
}

.sf-preview-list__icon svg { width: 14px; height: 14px; }

/* Long (or unspaced) unit titles end in an ellipsis instead of running
   under the duration; the full title is in the button's title attribute. */
.sf-preview-list__title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sf-preview-list__dur {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.sf-preview-list__more {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}

.sf-preview-list__more .sf-preview-list__icon { color: var(--faint); }

.sf-preview-modal__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  border-top: 1px solid var(--card-border);
  text-align: left;
}

.sf-preview-modal__foot-text {
  margin: 0;
  font-size: 14px;
  color: var(--body-2);
}

.sf-preview-modal__foot-text b { color: var(--ink); }

.sf-preview-modal__foot .sf-preview-modal__buy { color: var(--white); }

@media (max-width: 760px) {
  .sf-preview-modal__body:has(.sf-preview-list) { grid-template-columns: minmax(0, 1fr); }

  .sf-preview-list {
    border-left: 0;
    border-top: 1px solid var(--card-border);
    max-height: 32vh;
  }

  .sf-preview-modal__foot .sf-preview-modal__buy { flex: 1 1 100%; justify-content: center; }
}

/* Staff/author notice in place of an external video/audio player once
 * soofos_hide_external_media is on (EmbedPolicy::removed_media_notice()).
 * Learners get nothing in its place. Amber = flagged. */
.soofos-media-removed {
    display: block;
    margin: 12px 0;
    padding: 12px 16px;
    border: 1px solid var(--card-border);
    border-radius: var(--r-btn);
    background: var(--amber-fill);
    color: var(--amber-text);
    font-size: 14px;
    line-height: 1.5;
}
