/* livefix v1.4 (livefix_01 v1.4, 4 Nov 2026) = v1.3 + static hole in the "Open the book" button over "See the course" (link takes the click from the first frame of the opening). v1.3 = v1.2 + rack-book "See the course" above the book-overlay button at all widths. v1.2 = v1.1 + flat open book below 768px (LF-01). v1.1 = v1 + locked Fully booked buttons show a default cursor. Was: livefix v1 (livefix_01, 4 Nov 2026) · QA-01 live FAIL fixes for 16f2cca4. Loaded after all existing CSS. No copy, link, price or status changes.
   1. Fully booked = visible, greyed out, still marked "Fully booked" (livefix.js adds .lf-booked; nothing is hidden or disabled).
      Grey = grayscale + #EEF0F4 fill + #4A5578 text (contrast about 6.6:1, so text stays readable).
   2. Tap targets at least 44px on phones (max-width:768px or coarse pointer). Inline links inside sentences keep their size (WCAG 2.5.8 inline exception).
   3. Music Studio only: keeps its v1 swipe-row spacing after the move to mobswipe v1.2 (v1.2 defaults are v1.1's 18px bottom / 4px top). */

/* 1 · Fully booked greying */
.lf-booked{filter:grayscale(1)}
.ap-buy .ap-tl.lf-booked{color:#4A5578!important;background:#EEF0F4;border-radius:8px;padding:2px 8px;margin-left:-8px;margin-right:-8px}
li.lf-booked>.pp-day,.pp-day.lf-booked-btn{background:#EEF0F4!important;color:#4A5578!important;border-color:#D5D9E2!important;box-shadow:none!important}
li.lf-booked>.pp-day *{color:#4A5578!important}
li.lf-booked>.pp-day.today{border:2px solid #4A5578!important} /* keeps the 'today' marker readable once greyed */
/* course-page main buttons: beats pp-course.css's white [data-pp-booked] rule (it set filter:none!important); the button stays clickable */
html body a.btn.lf-booked.av-booked[data-pp-booked],html body a.btn.lf-booked.av-booked,html body .sbar-go.lf-booked.av-booked[data-pp-booked],a.ch-go1.lf-booked,a.fmt-go.lf-booked{filter:grayscale(1)!important;background:#EEF0F4!important;background-image:none!important;color:#4A5578!important;border-color:#C9CEDA!important;box-shadow:none!important;translate:none!important;transform:none!important}
article.fmt-card.lf-booked{background-color:#F4F5F8}
label.ch-opt.av-off.lf-booked{background-color:#EEF0F4}

/* 2 · 44px tap targets on phones */
@media (max-width:768px),(pointer:coarse){
  p.ch-links a.text-link,.fgrid p>a,.ap-buy .ap-more>a,.ps-top-link>a{display:inline-flex;align-items:center;min-height:44px}
  a.av-ri,.hb-pill,.sg-chip,.obook .ex{min-height:44px;box-sizing:border-box}
  .obook .ex{display:inline-flex;align-items:center;justify-content:center}
  .ap-cf .ap-book.is-c>.ap-enroll{min-height:44px;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box}
  .ap-cf .ap-book.is-c>.ap-see{min-height:44px;display:flex;align-items:center;justify-content:center}
  .pp-days{gap:1px!important}
  .pp-days .pp-day{min-width:44px}
  .v-check label{min-height:44px}
  .ap-ob-x,.ap-x,.hb-chipx,.hb-shx,.mc-tip-x,.ps3-hint-x{min-width:44px!important;min-height:44px!important}
  p.pol-q>a,#contact p>a{display:inline-flex;align-items:center;min-height:44px}
  .ps3-bubble .ps3-hint-x{min-width:48px!important;min-height:48px!important} /* bubble is drawn at scale(.92): 48px renders as 44px */
}

/* 3 · Music Studio swipe spacing unchanged after mobswipe v1.2 */
@media (max-width:768px){
  .th-music [data-mobswipe]:not([style*="--mobswipe-pb"]){--mobswipe-pb:6px;padding-top:0;border-radius:0}
  .th-music .mobswipe-dots{margin-top:2px}
}

/* v1.1 · locked Fully booked buttons (livefix.js): not clickable, so no pointer cursor (beats pp-course.css cursor:pointer!important) */
html body a.btn[data-lf-locked],html body .sbar-go[data-lf-locked],html body a.btn[data-lf-locked][data-pp-booked]{cursor:default!important}

/* v1.2 · LF-01 (Growth QA-01 v1.1) · Web Designer option 1 (Relay 01:50): below 768px the course-rack "open book" (.nr-rack .obook)
   lies flat. No rotateX/rotateY/scale on the book (it keeps only its existing 14px lift, as a flat 2D shift), the lid sits exactly at rotateY(-180deg) so its inside page (with "See the course")
   is drawn untransformed and keeps its full 44px tap box. The 3D open animation becomes a simple opacity fade when the section comes
   into view (rk-in / rk-open from the rack script); with reduced motion the book is shown at once, no fade.
   At 768px and up nothing below applies: the 3D effect is exactly as before. Text, links, covers and labels are unchanged. */
@media (max-width:767.98px){
  .nr-rack .stage{perspective:none!important}
  .nr-rack .obook,.nr-rack .scene .obook,.nr-rack .scene.rk-in .obook,.nr-rack .scene.rk-open .obook{transform:translateY(-14px)!important;opacity:0;transition:opacity .5s ease!important}
  .nr-rack .scene.rk-in .obook,.nr-rack .scene.rk-open .obook{opacity:1}
  .nr-rack .obook .lid,.nr-rack .scene.rk-open .obook .lid{transform:rotateY(-180deg)!important;transition:none!important}
  .nr-rack .obook .edge{transform:none!important}
  /* (v1.3: the pass-through rules that were here now apply at every width, see the v1.3 block below.)
     The real cover on the link: allprograms.js lays a transparent .ap-bookbtn ("Open the … book", inset:-10px, z-index:5) over each
     scene book, so a tap on "See the course" hit the button, not the link (hit-test 0/64 on live and v1.1). The book now sits above
     that button but lets taps through (pointer-events:none), so any tap on the book still opens the book overlay as before. Only the
     link takes taps itself. */
}
@media (max-width:767.98px) and (prefers-reduced-motion:reduce){
  .nr-rack .obook,.nr-rack .scene .obook,.nr-rack .scene.rk-in .obook,.nr-rack .scene.rk-open .obook{opacity:1;transition:none!important}
}

/* v1.3 (Relay 02:07): at every width (v1.2 had this below 768px only) the rack book sits above the transparent .ap-bookbtn
   ("Open the … book", allprograms.js, z-index 5) but lets taps/clicks pass through, so a click anywhere on the book still opens
   the book overlay. Only "See the course" (a.ex) takes the click itself and goes to its course page. No visual change: the 3D
   look and animation at 768px and up are untouched (no transform, transition or size rule here). */
.nr-rack .bookfig .obook{z-index:6;pointer-events:none}
.nr-rack .bookfig .obook .inner a.ex{pointer-events:auto}

/* v1.4 (Relay 02:31, Designer: layering set once in static CSS, never tied to the animation state).
   "See the course" stays above the "Open the … book" button at all times (v1.3 rules above). On top of that, the button now ignores
   clicks in the area where the link sits once the book is open: a clip-path hole (evenodd) cut out of the button. The outer edge
   reaches 12px past the button so its keyboard focus ring is never clipped. While the cover is still turning (the link is not
   drawn in that spot yet, up to ~1.7s at 768px+), a click in the hole lands on the book figure and livefix.js sends it to the
   link's own href, so the area takes the link's click from the first frame. Everywhere else on the book the button still opens the
   book. Hole = the link's measured final box (bookfig coords + 10px button inset, rounded outward):
     rack phone layout (<=760px): 24–131 x 115–159 (all 3 books)
     761px and up (flat 761–767, 3D 768+; same box): 21–131 x 169–214; AI for Mathematics (title wraps to 2 lines) 21–131 x 183–228
   The boxes follow the current rack layout and titles; re-measure if the rack CSS or a course title changes. No animation, size,
   colour or text change. */
.nr-rack .bookfig .ap-bookbtn{--lfh-l:31px;--lfh-r:141px;--lfh-t:179px;--lfh-b:224px;
  clip-path:polygon(evenodd,-12px -12px,calc(100% + 12px) -12px,calc(100% + 12px) calc(100% + 12px),-12px calc(100% + 12px),-12px -12px,
    var(--lfh-l) var(--lfh-t),var(--lfh-r) var(--lfh-t),var(--lfh-r) var(--lfh-b),var(--lfh-l) var(--lfh-b),var(--lfh-l) var(--lfh-t))}
.nr-rack #ai-mathematics .bookfig .ap-bookbtn{--lfh-t:193px;--lfh-b:238px}
@media (max-width:760px){
  .nr-rack .bookfig .ap-bookbtn,.nr-rack #ai-mathematics .bookfig .ap-bookbtn{--lfh-l:34px;--lfh-r:141px;--lfh-t:125px;--lfh-b:169px}
}
.nr-rack .bookfig:has(.obook .inner a.ex[href]){cursor:pointer}
