/* ════════════════════════════════════════════════════════════
   ILORA Academy — catalog + branded player
   Loaded only by /{lang}/academy/ pages (see acadHeadExtra in
   build.js). Uses the design tokens from css/main.css.
   ════════════════════════════════════════════════════════════ */

/* ── the hidden attribute must actually hide ──────────────────
   BUG FIX: several player parts (.acad-vid__bigplay, __overlay,
   __speedmenu …) carry a `display:` rule, and a `display` declaration beats
   the UA's `[hidden] { display: none }`. The JS toggles those elements
   through el.hidden, so they stayed on screen for ever — a play button
   frozen over a playing video and a speed menu that never closed. This
   single rule restores the meaning of `hidden` for every element on an
   academy page; academy.css is loaded on academy pages only. */
[hidden] { display: none !important; }

/* Measured from the real fixed site header by js/academy.js; the literal is
   only the pre-measurement floor. */
:root { --acad-navh: 70px; }

/* ── hero search ─────────────────────────────── */
.acad-search {
  max-width: 560px;
  margin: 2.2rem auto 0;
}
.acad-search input {
  width: 100%;
  border: 1.5px solid rgba(240, 236, 225, 0.28);
  border-radius: 999px;
  padding: 0.95rem 1.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--cream);
  background: rgba(240, 236, 225, 0.07);
  transition: border-color 0.25s, background 0.25s;
}
.acad-search input::placeholder { color: var(--text-cream-dim); }
.acad-search input:focus {
  outline: none;
  border-color: var(--mint-soft);
  background: rgba(240, 236, 225, 0.12);
}

/* ── catalog layout ──────────────────────────── */
.acad-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: clamp(1.6rem, 3vw, 3rem);
  align-items: start;
}
@media (max-width: 860px) {
  .acad-layout { grid-template-columns: 1fr; }
}

/* sidebar filters */
.acad-side { position: sticky; top: 5.5rem; }
@media (max-width: 860px) {
  .acad-side { position: static; }
  /* collapsed by default on mobile — tap a facet to open it */
  .acad-facet:not([data-keep-open]) { }
}
.acad-facet {
  border: 1px solid rgba(17, 33, 32, 0.1);
  border-radius: 14px;
  background: #fff;
  margin-bottom: 0.9rem;
  overflow: hidden;
}
.acad-facet summary {
  cursor: pointer;
  list-style: none;
  padding: 0.85rem 1.1rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  color: var(--text-ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.acad-facet summary::-webkit-details-marker { display: none; }
.acad-facet summary::after {
  content: "▾";
  color: var(--teal);
  font-size: 0.8rem;
  transition: transform 0.25s var(--ease-out);
}
.acad-facet:not([open]) summary::after { transform: rotate(-90deg); }
[dir="rtl"] .acad-facet:not([open]) summary::after { transform: rotate(90deg); }
.acad-facet__opts { padding: 0.2rem 1.1rem 0.95rem; display: grid; gap: 0.45rem; }
.acad-facet__opt {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.88rem;
  color: var(--text-dim);
  cursor: pointer;
}
.acad-facet__opt input {
  accent-color: var(--teal);
  width: 1rem;
  height: 1rem;
  cursor: pointer;
}
.acad-clear {
  width: 100%;
  border: 1px dashed rgba(17, 33, 32, 0.25);
  border-radius: 12px;
  background: transparent;
  padding: 0.65rem 1rem;
  font-family: var(--font-body);
  font-size: 0.84rem;
  color: var(--text-dim);
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s;
}
.acad-clear:hover { border-color: var(--teal); color: var(--teal); }

/* result count + grid */
.acad-count {
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 1.2rem;
}
.acad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.1rem;
}
.acad-empty {
  padding: 3.5rem 1rem;
  text-align: center;
  color: var(--text-dim);
  border: 1px dashed rgba(17, 33, 32, 0.18);
  border-radius: var(--radius);
}

/* ── pager ───────────────────────────────────────
   Every number is a real <a href> to a pre-rendered /academy/page/N/ (or to a
   ?q=…&page=N URL while a filter is on), so it is crawlable and
   middle-clickable. Flow order mirrors itself in RTL for free. */
.acad-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: clamp(2rem, 4vw, 3rem);
}
.acad-pager__num,
.acad-pager__nav {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 2.4rem;
  height: 2.4rem;
  padding-inline: 0.7rem;
  justify-content: center;
  border: 1px solid rgba(17, 33, 32, 0.14);
  border-radius: 999px;
  background: #fff;
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.acad-pager__num:hover,
.acad-pager__nav:hover { color: var(--teal); border-color: var(--teal); }
.acad-pager__num.is-current {
  background: var(--ink-3);
  border-color: var(--ink-3);
  color: var(--cream);
  cursor: default;
}
.acad-pager__num.is-current:hover { color: var(--cream); border-color: var(--ink-3); }
.acad-pager__arrow { font-size: 1rem; line-height: 1; }
.acad-pager__gap {
  min-width: 1.4rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.84rem;
}
@media (max-width: 560px) {
  .acad-pager__nav span:not(.acad-pager__arrow) {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .acad-pager__nav { padding-inline: 0.5rem; }
}

/* ── course card ─────────────────────────────── */
.acad-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(17, 33, 32, 0.1);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s, border-color 0.3s;
}
.acad-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 48px -24px rgba(4, 32, 29, 0.3);
  border-color: rgba(47, 127, 120, 0.4);
}
.acad-card__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--ink-2);
  overflow: hidden;
}
.acad-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.acad-card__thumbph {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--mint-soft);
  font-size: 2rem;
}
.acad-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
}
.acad-card__thumb .acad-badge { position: absolute; top: 0.7rem; }
.acad-card__thumb .acad-badge--type { inset-inline-start: 0.7rem; background: rgba(4, 32, 29, 0.78); color: var(--cream); }
.acad-card__thumb .acad-badge--open,
.acad-card__thumb .acad-badge--lock { inset-inline-end: 0.7rem; }
/* Access, not price: "No sign-in needed" vs a locked "Sign-in required". */
.acad-badge--open { background: var(--mint); color: var(--ink-3); }
.acad-badge--lock { background: rgba(240, 236, 225, 0.92); color: var(--ink-3); }
.acad-badge--open,
.acad-badge--lock { display: inline-flex; align-items: center; gap: 0.3rem; max-width: calc(100% - 1.4rem); }
.acad-badge__lock { font-size: 0.78em; line-height: 1; }
.acad-card__body { padding: 1.1rem 1.2rem 1.25rem; display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }
.acad-card__body h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; color: var(--text-ink); }
.acad-card__body p {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.acad-card__meta {
  margin-top: auto;
  padding-top: 0.7rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.acad-chip {
  background: rgba(47, 127, 120, 0.12);
  color: var(--teal);
  border-radius: 999px;
  padding: 0.22rem 0.65rem;
}

/* ══════════════════════════════════════════════════════════════
   COURSE PAGE — the video is the page
   Sticky site header · slim episode bar · full-bleed theater ·
   then title / meta / summary / lessons. No dark hero block.
   ══════════════════════════════════════════════════════════════ */

/* 1 — the site's OWN header stays pinned (it is already position:fixed;
   this only stops site.js's scroll-down auto-hide and keeps it opaque).
   :has() covers the very first paint; the html class is the fallback and
   also the path the client-rendered course takes. */
html.acad-course-page .nav.is-hidden,
body:has(.acad-theater) .nav.is-hidden { transform: none; }
html.acad-course-page .nav,
body:has(.acad-theater) .nav {
  background: var(--ink);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(240, 236, 225, 0.08);
}

/* 2 — slim dark episode bar, directly under the pinned header */
.acad-bar {
  background: var(--ink-2);
  color: var(--cream);
  border-bottom: 1px solid rgba(240, 236, 225, 0.09);
  padding-top: var(--acad-navh, 70px);
}
.acad-bar__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  min-height: 52px;
  padding-block: 0.5rem;
}
.acad-bar__side { display: flex; min-width: 0; }
/* logical end — lands on the left in RTL, where "next" belongs */
.acad-bar__side--next { justify-content: flex-end; }
.acad-bar__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
  border: 1px solid rgba(240, 236, 225, 0.18);
  border-radius: 999px;
  background: transparent;
  padding: 0.45rem 0.95rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-cream-dim);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.acad-bar__btn:hover {
  color: var(--cream);
  border-color: var(--mint-soft);
  background: rgba(240, 236, 225, 0.07);
}
.acad-bar__arrow { font-size: 1rem; line-height: 1; }
.acad-bar__btntxt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acad-bar__now { min-width: 0; display: grid; gap: 0.1rem; text-align: center; }
.acad-bar__count {
  font-family: var(--font-display);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mint-soft);
}
.acad-bar__title {
  font-size: 0.9rem;
  color: var(--cream);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 760px) {
  /* arrows only — the lesson title keeps the room */
  .acad-bar__btntxt {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .acad-bar__btn { padding: 0.4rem 0.6rem; }
  .acad-bar__inner { gap: 0.55rem; }
}

/* 3 — the theater: full-bleed dark band, player centred and above the fold.
   The width cap is the smaller of a comfortable reading width, the viewport,
   and whatever 16:9 still fits under the header + bar on this screen. */
.acad-theater {
  background: #030f0e;
  padding: clamp(0.85rem, 1.6vw, 1.5rem) 0 clamp(1.1rem, 2vw, 1.8rem);
}
.acad-theater__inner {
  margin-inline: auto;
  width: min(1180px, 94vw);
  width: min(1180px, 94vw, calc((100svh - var(--acad-navh, 70px) - 9rem) * 16 / 9));
}
.acad-player {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 0 1px rgba(240, 236, 225, 0.09), 0 40px 90px -40px rgba(0, 0, 0, 0.9);
}
.acad-player__poster {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.acad-player__noscript { color: var(--cream); padding: 1.5rem 2rem; }

/* 4 — everything below the video.
   NOTE: pageShell loads academy.css BEFORE main.min.css, so anything that
   also exists in main.css (.section--paper, .kicker) needs the extra class
   in the selector to win the cascade. */
.acad-below.section--paper { padding: clamp(2.4rem, 4.5vw, 3.6rem) 0 clamp(4rem, 8vw, 6rem); }
.acad-crumb.kicker {
  margin-bottom: 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  gap: 0.6rem;
}
.acad-crumb.kicker span { min-width: 1.8rem; height: 1.8rem; font-size: 0.6rem; }
.acad-h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 3.2vw, 2.5rem);
  line-height: 1.22;
  color: var(--ink);
  max-width: 26ch;
}
.acad-coursemeta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.acad-coursemeta .acad-badge--type { background: rgba(12, 74, 68, 0.1); color: var(--ink-3); }
.acad-coursemeta .acad-badge--lock { background: rgba(12, 74, 68, 0.08); }

.acad-cols {
  margin-top: clamp(1.8rem, 3.5vw, 2.6rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.6rem, 3vw, 2.6rem);
  align-items: start;
}
/* only a multi-lesson course earns the second column */
.acad-cols:has(> .acad-eps:not([hidden])) {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
}
@media (max-width: 900px) {
  .acad-cols:has(> .acad-eps:not([hidden])) { grid-template-columns: minmax(0, 1fr); }
}
.acad-sectitle {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.8rem;
}
.acad-summary p {
  max-width: 72ch;
  color: var(--text-dim);
  line-height: 1.8;
  font-size: 1rem;
  white-space: pre-line;
}

/* lesson list */
.acad-eps {
  background: #fff;
  border: 1px solid rgba(17, 33, 32, 0.1);
  border-radius: var(--radius);
  padding: 1.1rem;
  max-height: min(70vh, 560px);
  overflow-y: auto;
}
.acad-eps__title {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.9rem;
}
.acad-eps__list { list-style: none; display: grid; gap: 0.45rem; }
.acad-ep {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  padding: 0.65rem 0.7rem;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--text-ink);
  text-align: start;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.acad-ep:hover { background: rgba(47, 127, 120, 0.07); }
.acad-ep.is-current {
  background: rgba(47, 127, 120, 0.1);
  border-color: rgba(47, 127, 120, 0.35);
}
.acad-ep__num {
  flex: none;
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  border: 1px solid rgba(17, 33, 32, 0.2);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
}
.acad-ep.is-current .acad-ep__num { border-color: var(--teal); background: var(--teal); color: #fff; }
.acad-ep__name { flex: 1; line-height: 1.35; }
.acad-ep__dur { flex: none; font-size: 0.74rem; color: var(--text-dim); font-variant-numeric: tabular-nums; }

/* ── the branded player ──────────────────────── */
/* Every part the JS toggles with el.hidden, spelled out. The blanket
   [hidden] rule at the top of this file already wins, but these keep the
   contract visible next to the `display:` declarations that broke it. */
.acad-vid__bigplay[hidden],
.acad-vid__overlay[hidden],
.acad-vid__speedmenu[hidden],
.acad-vid__spinner[hidden],
.acad-vid__badge[hidden],
.acad-bar__btn[hidden],
.acad-eps[hidden],
.acad-empty[hidden] { display: none !important; }

.acad-vid {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  outline: none;
}
.acad-vid video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}
.acad-vid.is-idle { cursor: none; }

/* watermark — small, corner, never blocks clicks */
.acad-vid__mark {
  position: absolute;
  top: 0.9rem;
  inset-inline-end: 1rem;
  width: 74px;
  opacity: 0.55;
  pointer-events: none;
  filter: drop-shadow(0 1px 6px rgba(0, 0, 0, 0.6)) brightness(0) invert(1);
  z-index: 3;
}

/* language-fallback badge */
.acad-vid__badge {
  position: absolute;
  top: 0.9rem;
  inset-inline-start: 1rem;
  z-index: 3;
  background: rgba(4, 32, 29, 0.8);
  color: var(--mint-soft);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  pointer-events: none;
}

/* big centered play + spinner */
.acad-vid__bigplay {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 4.6rem;
  height: 4.6rem;
  border-radius: 50%;
  border: none;
  background: var(--teal);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 4;
  box-shadow: 0 14px 40px -8px rgba(4, 32, 29, 0.7);
  transition: transform 0.25s var(--ease-out), background 0.25s;
}
.acad-vid__bigplay:hover { transform: scale(1.07); background: var(--teal-bright); }
.acad-vid__bigplay svg { width: 30px; height: 30px; margin-inline-start: 3px; }
.acad-vid__spinner {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 3px solid rgba(240, 236, 225, 0.25);
  border-top-color: var(--mint-soft);
  animation: acadspin 0.9s linear infinite;
  z-index: 4;
  pointer-events: none;
}
@keyframes acadspin { to { transform: rotate(360deg); } }

/* control bar */
.acad-vid__controls {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 1.6rem 0.9rem 0.7rem;
  background: linear-gradient(to top, rgba(4, 32, 29, 0.88), transparent);
  opacity: 1;
  transition: opacity 0.3s;
}
.acad-vid.is-idle .acad-vid__controls { opacity: 0; pointer-events: none; }
.acad-vid__controls button {
  flex: none;
  border: none;
  background: transparent;
  color: var(--cream);
  cursor: pointer;
  padding: 0.35rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}
.acad-vid__controls button:hover { background: rgba(240, 236, 225, 0.14); color: #fff; }

/* timeline with buffered + played */
.acad-vid__timeline {
  position: relative;
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: rgba(240, 236, 225, 0.22);
  cursor: pointer;
  touch-action: none;
}
.acad-vid__timeline::before { /* fat invisible hit area */
  content: "";
  position: absolute;
  inset: -8px 0;
}
.acad-vid__buf,
.acad-vid__played {
  position: absolute;
  inset-block: 0;
  left: 0;
  width: 0;
  border-radius: 999px;
  pointer-events: none;
}
.acad-vid__buf { background: rgba(240, 236, 225, 0.35); }
.acad-vid__played { background: var(--teal-bright); }
.acad-vid__played::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(4, 32, 29, 0.35);
}
.acad-vid__time {
  flex: none;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--cream);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.acad-vid__vol {
  flex: none;
  width: 70px;
  accent-color: var(--teal-bright);
  cursor: pointer;
}
@media (max-width: 640px) {
  .acad-vid__vol { display: none; }
}

/* speed menu */
.acad-vid__speedwrap { position: relative; flex: none; display: grid; }
.acad-vid__speedmenu {
  position: absolute;
  bottom: calc(100% + 0.5rem);
  inset-inline-end: 0;
  display: grid;
  background: rgba(4, 32, 29, 0.95);
  border: 1px solid rgba(240, 236, 225, 0.18);
  border-radius: 12px;
  padding: 0.35rem;
  min-width: 5rem;
  z-index: 6;
}
.acad-vid__speedmenu button {
  padding: 0.45rem 0.9rem;
  text-align: center;
  border-radius: 8px;
}
.acad-vid__speedmenu button.is-on { color: var(--mint-soft); background: rgba(155, 217, 210, 0.12); }

/* overlays: next-up countdown · end card · sign-in card */
.acad-vid__overlay {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: grid;
  place-items: center;
  background: rgba(4, 32, 29, 0.88);
  padding: 1.5rem;
}
.acad-vid__card {
  text-align: center;
  color: var(--cream);
  max-width: 420px;
  display: grid;
  justify-items: center;
  gap: 0.9rem;
}
.acad-vid__card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
}
.acad-vid__card p { color: var(--text-cream-dim); font-size: 0.92rem; line-height: 1.6; }
.acad-vid__card p b { color: var(--cream); }
.acad-vid__cardicon { color: var(--mint-soft); }
.acad-vid__cardrow { display: flex; gap: 0.8rem; flex-wrap: wrap; justify-content: center; }
.acad-vid__card .btn--ghost { color: var(--cream); border-color: rgba(240, 236, 225, 0.4); }

/* countdown ring — stroke runs down over exactly 5s (matches the JS timer) */
.acad-vid__ringwrap { position: relative; width: 60px; height: 60px; }
.acad-vid__ringbg,
.acad-vid__ring {
  fill: none;
  stroke-width: 3.5;
}
.acad-vid__ringbg { stroke: rgba(240, 236, 225, 0.2); }
.acad-vid__ring {
  stroke: var(--mint-soft);
  stroke-linecap: round;
  stroke-dasharray: 163.4;
  stroke-dashoffset: 0;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset 5s linear;
}
.acad-vid__ring.is-run { stroke-dashoffset: 163.4; }
.acad-vid__ringplay {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: none;
  background: var(--teal);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.acad-vid__ringplay svg { width: 16px; height: 16px; margin-inline-start: 2px; }

/* fullscreen: fill the screen, keep the frame */
.acad-vid:fullscreen { aspect-ratio: auto; width: 100%; height: 100%; border-radius: 0; }
.acad-vid:fullscreen video { height: 100%; }

/* ── RTL ─────────────────────────────────────── */
/* The control bar itself stays LTR (dir="ltr" in markup) — seek direction
   matches every player people know. Cards/episodes flow with the page. */
[dir="rtl"] .acad-card__body h3,
[dir="rtl"] .acad-eps__title { letter-spacing: 0; }
[dir="rtl"] .acad-badge { letter-spacing: 0; }
[dir="rtl"] .acad-count { letter-spacing: 0; }
[dir="rtl"] .acad-coursemeta { letter-spacing: 0; }

/* ══════════════════════════════════════════════════════════════
   locked-course gate — the page renders in full and stays readable
   behind a dimmed white sheet; no video is ever requested
   ══════════════════════════════════════════════════════════════ */
html.acad-gate-open,
html.acad-gate-open body { overflow: hidden; }

.acad-gate {
  position: fixed;
  inset: 0;
  /* above the now-pinned site header (.nav is z-index 1000) and the mobile
     menu (900) — the gate is the only thing that may sit on top */
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgba(248, 246, 240, 0.82);
  -webkit-backdrop-filter: blur(6px) saturate(1.05);
  backdrop-filter: blur(6px) saturate(1.05);
  animation: acadGateIn 0.28s ease-out both;
}
@keyframes acadGateIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.acad-gate__card {
  width: min(100%, 430px);
  display: grid;
  justify-items: center;
  gap: 1rem;
  text-align: center;
  padding: 2.4rem 2rem;
  border-radius: 20px;
  background: var(--paper);
  border: 1px solid rgba(4, 32, 29, 0.08);
  box-shadow: 0 24px 60px -20px rgba(4, 32, 29, 0.35), 0 2px 8px rgba(4, 32, 29, 0.06);
  animation: acadGateCardIn 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes acadGateCardIn {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

.acad-gate__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  color: var(--ink-3);
  background: rgba(47, 127, 120, 0.1);
}
.acad-gate__icon svg { width: 26px; height: 26px; }

.acad-gate__card h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.45rem;
  color: var(--ink);
  line-height: 1.3;
}
.acad-gate__card p {
  color: rgba(4, 32, 29, 0.7);
  font-size: 0.95rem;
  line-height: 1.65;
  margin: 0;
}
.acad-gate__cta { margin-top: 0.35rem; min-width: 180px; }
.acad-gate__alt {
  font-size: 0.88rem;
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.acad-gate__alt:hover { color: var(--ink-3); }

@media (max-width: 480px) {
  .acad-gate__card { padding: 2rem 1.4rem; border-radius: 16px; }
}
