/* ==========================================================================
   course-3d.css — /courses/<slug>/
   ========================================================================== */
.page-course { --x-line: rgb(255 255 255 / .1); --x-card: rgb(255 255 255 / .04); }
.theme-light .page-course { --x-line: rgb(15 18 26 / .13); --x-card: rgb(15 18 26 / .03); }

/* ── CTA ────────────────────────────────────────────────────────────────── */
.cxCta { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.cxCta [data-enrol] { position: relative; overflow: hidden; }
/* A sweep across the primary button — the one control the page exists to get
   pressed should look alive without demanding attention. */
.cxCta [data-enrol]::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / .45) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: cxSweep 3.4s ease-in-out infinite;
}
@keyframes cxSweep { 0%, 62% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.cxCta [data-enrol]:disabled { opacity: .7; cursor: progress; }
.cxCta [data-enrol]:disabled::after { animation: none; }

.cxOwned {
  display: inline-flex; align-items: center; gap: .5ch;
  font-size: var(--fs-sm); color: rgb(150 235 190);
}
.cxOwned::before { content: ''; width: .5rem; height: .5rem; border-radius: 50%; background: rgb(80 220 140); }
.cxSafe { margin: var(--s-3) 0 0; font-size: var(--fs-xs); color: var(--text-lo); }
.cxErr {
  margin-top: var(--s-3); padding: var(--s-3) var(--s-4);
  border-radius: var(--radius); border: 1px solid rgb(255 92 92 / .45);
  background: rgb(255 92 92 / .1); color: rgb(255 175 160);
}
.cxErr[hidden] { display: none; }
.cxErr p { margin: 0; font-size: var(--fs-sm); }

/* ── CURRICULUM ─────────────────────────────────────────────────────────── */
/* Now the first thing under the hero, so it has to carry more weight than a
   flat <details> list. Each section lifts on hover and the marker rotates. */
.page-course .curriculum > details {
  border: 1px solid var(--x-line); border-radius: var(--radius-lg);
  background: var(--x-card); margin-bottom: var(--s-3); overflow: hidden;
  transition: border-color .3s, box-shadow .35s, transform .3s;
}
.page-course .curriculum > details[open] {
  border-color: rgb(240 198 74 / .4);
  box-shadow: 0 16px 44px -20px rgb(0 0 0 / .7);
}
.page-course .curriculum > details:hover { transform: translateY(-2px); border-color: rgb(240 198 74 / .35); }
.page-course .curriculum summary { cursor: pointer; padding: var(--s-4) var(--s-5); }

/* ── HUB CARDS (loaded on /courses/ too via courses-3d.css sibling) ─────── */
@media (prefers-reduced-motion: reduce) {
  .cxCta [data-enrol]::after { animation: none; }
  .page-course .curriculum > details { transition: none; }
}

/* ── ABOUT: two columns ─────────────────────────────────────────────────────
   The description ran as a single narrow measure down the left with the right
   half of the page empty for its entire height — and because the source data
   is one short line per paragraph, it stretched to roughly two screens. Prose
   left, a sticky enrol card right. */
.cxAbout {
  display: grid; gap: clamp(var(--s-6), 4vw, var(--s-12));
  grid-template-columns: minmax(0, 1fr) minmax(0, 20rem);
  align-items: start;
}
@media (max-width: 62rem) { .cxAbout { grid-template-columns: 1fr; } }

.cxAbout__prose { color: var(--text-mid); line-height: var(--lh-relaxed); }
.cxAbout__prose p { margin: 0 0 var(--s-4); max-width: 62ch; }
/* Two columns of bullets on wide screens — ten single-line items stacked is a
   column of orphans, which is what this looked like. */
.cxAbout__list {
  list-style: none; padding: 0; margin: 0 0 var(--s-5);
  display: grid; gap: var(--s-2);
}
@media (min-width: 44rem) { .cxAbout__list { grid-template-columns: 1fr 1fr; column-gap: var(--s-6); } }
.cxAbout__list li {
  position: relative; padding-left: 1.5rem;
  font-size: var(--fs-sm); line-height: var(--lh-snug);
}
.cxAbout__list li::before {
  content: ''; position: absolute; left: 0; top: .5em;
  width: .5rem; height: .5rem; border-radius: 50%;
  background: var(--y-yellow); box-shadow: 0 0 0 3px rgb(240 198 74 / .15);
}

/* ── STICKY ENROL CARD ──────────────────────────────────────────────────── */
.cxAside { position: sticky; top: calc(var(--nav-h, 4.5rem) + 1rem); }
@media (max-width: 62rem) { .cxAside { position: static; } }
.cxAside__card {
  display: grid; gap: var(--s-3);
  padding: var(--s-5); border-radius: var(--radius-lg);
  border: 1px solid var(--x-line);
  background: linear-gradient(160deg, rgb(255 255 255 / .07), rgb(255 255 255 / .015) 62%), var(--surface-1);
  box-shadow: 0 24px 60px -26px rgb(0 0 0 / .8);
  transition: transform .4s cubic-bezier(.22,1,.36,1), box-shadow .4s;
}
.theme-light .cxAside__card { background: linear-gradient(160deg, #fff, #f7f7f9 62%); }
.cxAside__card:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px rgb(240 198 74 / .3), 0 30px 70px -26px rgb(0 0 0 / .85); }
.cxAside__thumb { width: 100%; height: auto; border-radius: var(--radius); display: block; }
.cxAside__price {
  margin: 0; font-family: var(--font-display); font-size: 2rem; line-height: 1;
  color: var(--text-hi); font-variant-numeric: tabular-nums;
}
.cxAside__facts { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-2); }
.cxAside__facts li { font-size: var(--fs-sm); color: var(--text-mid); }
.cxAside__facts b { color: var(--y-yellow); font-variant-numeric: tabular-nums; }
.cxAside__go { width: 100%; justify-content: center; }

/* ── HERO SPACING ───────────────────────────────────────────────────────────
   The badge row (.deck__meta) and the CTA row had no vertical separation, so
   the pills sat directly on the buttons. .deck__meta is shared with other
   pages, so the spacing is applied HERE under .page-course rather than to the
   shared rule — the notes and flashcards heroes stack differently and do not
   want this gap. */
.page-course .deck__meta {
  display: flex; flex-wrap: wrap; gap: var(--s-2);
  margin: var(--s-5) 0 var(--s-6);
}
.page-course .cxCta { margin-top: 0; row-gap: var(--s-3); }
.page-course .cxSafe { margin-top: var(--s-4); }
.page-course .cxErr { margin-top: var(--s-4); }

/* ── PREVIEW LECTURE ROWS ───────────────────────────────────────────────── */
/* The row keeps padding: 0 so the button's hover fill can run to the left
   edge. The DURATION is not part of the button, so it carries the right
   inset itself — otherwise it sat flush against the panel boundary and the
   last digit was clipped. */
.cur__lec.is-preview { padding: 0; }
.cur__lec.is-preview > .cur__d { padding-right: var(--s-5); }

.cur__play {
  display: flex; align-items: center; gap: var(--s-3);
  /* `flex: 1`, NOT `width: 100%`. As a flex item, 100% means "all of the
     row", so the button claimed the full width and pushed the duration that
     follows it past the container's right edge — visible as "12:53" striking
     the boundary on every preview row. flex:1 takes what is left instead. */
  flex: 1; min-width: 0;
  padding: var(--s-3) var(--s-5);
  border: 0; background: none; cursor: pointer; text-align: left;
  color: var(--text-mid); font: inherit; font-size: var(--fs-sm);
  transition: background .25s, color .25s;
}
.cur__play:hover { background: rgb(240 198 74 / .07); color: var(--text-hi); }
.cur__playIcon {
  flex: none; display: grid; place-items: center;
  width: 1.6rem; height: 1.6rem; border-radius: 50%;
  border: 1px solid rgb(240 198 74 / .5); background: rgb(240 198 74 / .12);
  transition: transform .25s, background .25s;
}
.cur__playIcon::after {
  content: ''; width: 0; height: 0; margin-left: 2px;
  border-left: 6px solid var(--y-yellow);
  border-top: 4px solid transparent; border-bottom: 4px solid transparent;
}
.cur__play:hover .cur__playIcon { transform: scale(1.12); background: rgb(240 198 74 / .22); }
.cur__play .cur__lt { flex: 1; min-width: 0; }

/* ── PLAYER DIALOG ──────────────────────────────────────────────────────── */
.pvPlayer { border: none; padding: 0; background: transparent; max-width: min(60rem, 94vw); width: 100%; }
.pvPlayer::backdrop { background: rgb(6 6 8 / .88); backdrop-filter: blur(6px); }
.pvPlayer__shell {
  border-radius: var(--radius-lg); border: 1px solid var(--x-line);
  background: var(--surface-1); overflow: hidden;
  box-shadow: 0 40px 110px -30px rgb(0 0 0 / .95);
  animation: pvIn .38s cubic-bezier(.22,1,.36,1);
}
@keyframes pvIn { from { opacity: 0; transform: translateY(16px) scale(.96); } }
.pvPlayer__bar {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--x-line);
}
.pvPlayer__k {
  flex: none; padding: .18rem .55rem; border-radius: 999px;
  background: rgb(240 198 74 / .16); color: var(--y-yellow);
  font-family: var(--font-mono); font-size: .58rem;
  letter-spacing: var(--tracking-eyebrow); text-transform: uppercase;
}
/* THE MEASURE CAP. site.css sets `p { max-width: var(--measure) }`, and this
   title is a <p>. `flex: 1` then grows it only as far as the prose measure —
   about 270px short of the header's right edge on a 60rem dialog — and since
   free space in a flex row collects at the END, the close button stopped in
   the middle of the bar instead of sitting in its corner. */
.pvPlayer__name { flex: 1; min-width: 0; max-width: none; margin: 0;
  color: var(--text-hi); font-size: var(--fs-sm);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Pin the close to the corner whatever else the bar ends up holding. */
.pvPlayer__bar .pvPlayer__x { margin-left: auto; }
.pvPlayer__x {
  flex: none; width: 2rem; height: 2rem; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--x-line); background: none; color: var(--text-mid);
  font-size: 1.3rem; line-height: 1; transition: transform .2s, color .2s;
}
.pvPlayer__x:hover { transform: rotate(90deg); color: var(--text-hi); }
.pvPlayer__stage { background: #000; }
.pvPlayer__stage video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.pvPlayer__foot {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  flex-wrap: wrap; padding: var(--s-4) var(--s-5); border-top: 1px solid var(--x-line);
}
.pvPlayer__foot p { margin: 0; color: var(--text-mid); font-size: var(--fs-sm); }
@media (prefers-reduced-motion: reduce) {
  .pvPlayer__shell { animation: none; }
  .cur__play, .cur__playIcon { transition: none; }
}
