/* =========================================================================================
   Course detail pages  /courses/<slug>                       (Cassi's 15 Nov 2026 pack)
   Renderer: public/courses/route.php. Styles follow Cassi's approved previews, scoped to
   .cpx so the shared header and footer keep the site's own styles.
   Locked tier accents (START_HERE.md): Express #2BB8FF, Expert #35EDC3, Mastery #C286F4,
   Diagnostic #B2B6BE; enrolment button text #09234B. Declared once here as tokens.
   ========================================================================================= */
@font-face {
  font-family: "Manrope";
  src: url("/fd-assets/fonts/manrope-latin-wght-normal.woff2") format("woff2-variations"),
       url("/fd-assets/fonts/manrope-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
}
:root {
  --cp-xs: #2bb8ff; --cp-xp: #35edc3; --cp-ma: #c286f4; --cp-dx: #b2b6be;
  --cp-btn-ink: #09234b;
  --cp-ink: #f5f8ff; --cp-muted: #c8d8ee; --cp-line: #4c6992; --cp-panel: #142f54; --cp-deep: #0a1e39;
  --cp-bg: linear-gradient(155deg, #081a35 10%, #102e55 55%, #0b2342 100%);
}
body.cpx-body { background: #081a35; background-image: var(--cp-bg); color: var(--cp-ink); }
.cpx--xs { --tier-accent: var(--cp-xs); }
.cpx--xp { --tier-accent: var(--cp-xp); }
.cpx--ma { --tier-accent: var(--cp-ma); }
.cpx--dx { --tier-accent: var(--cp-dx); }

/* staging bar (only on pages that are not public yet) */
.cpx-staging { position: relative; z-index: 5; margin-top: var(--nav-h, 70px); padding: 8px 20px; text-align: center; font: 600 .85rem/1.4 Manrope, system-ui, sans-serif; color: var(--cp-btn-ink); background: #ffd166; }
.cpx-staging + .cpx { padding-top: 8px; }

/* ---- page frame ---- */
.cpx { max-width: 1180px; margin: 0 auto; padding: calc(var(--nav-h, 70px) + 8px) clamp(20px, 5vw, 64px) 0;
  font: 500 1rem/1.65 Manrope, system-ui, sans-serif; color: var(--cp-ink); }
.cpx :where(*, *::before, *::after) { box-sizing: border-box; }
.cpx section { padding-block: clamp(36px, 7vw, 80px); border-top: 1px solid var(--cp-line); }
.cpx section.hero { border: 0; padding-top: 40px; min-height: 0; display: block; overflow: visible; background: none; }
.cpx section.hero.split { display: grid; place-items: initial; align-items: center; }   /* the site's global .hero is the full-screen home hero */
.cpx :where(h1, h2, h3, p, figure) { margin: 0; }
.cpx :is(h1, h2, h3) { font-family: Manrope, system-ui, sans-serif; font-weight: 800; line-height: 1.13; letter-spacing: -.035em; color: var(--cp-ink); }
.cpx h1 { font-size: clamp(2.25rem, 4.5vw, 3.75rem); text-wrap: balance; }
.cpx h2 { font-size: clamp(1.85rem, 3.5vw, 3rem); }
.cpx h3 { font-size: 1.35rem; }
.cpx :is(p, ul) { margin-top: 14px; }
.cpx p { max-width: 67ch; }
.cpx .lead { font-size: 1.19rem; color: var(--cp-muted); }
.cpx .grid, .cpx .split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 4vw, 40px); align-items: start; }
.cpx .hero .grid, .cpx .hero.split { align-items: center; }
.cpx .stack { margin-top: 24px; }
.cpx .meta, .cpx figcaption { font-size: .92rem; color: var(--cp-muted); }
.cpx figcaption { margin-top: 8px; }
.cpx .card, .cpx .feedback { border: 1px solid var(--cp-line); border-radius: 16px; padding: clamp(18px, 3vw, 28px); background: var(--cp-panel); }
.cpx .end { padding-bottom: 72px; }

/* ---- short text sections ("Is … right for you?", the Diagnostic US$39 credit), Cassi 25 Nov 2026 ----
   One component: less space above and below (and in the sections either side of it), and the heading and body
   share one readable column, so a large heading no longer spans the page above a narrow paragraph. */
.cpx section.fit { padding-block: clamp(28px, 4.5vw, 52px); }
.cpx section:has(+ section.fit) { padding-bottom: clamp(28px, 4.5vw, 52px); }
.cpx section.fit + section { padding-top: clamp(28px, 4.5vw, 52px); }
.cpx section.fit > * { max-width: 44rem; }
.cpx section.fit h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); text-wrap: balance; }
.cpx section.fit p { max-width: 44rem; }
.cpx section.fit--credit h2 { font-size: clamp(1.55rem, 2.6vw, 2.1rem); }

/* ---- enrolment button: tier accent, dark navy label. Measured (rest / hover / pressed): Express 6.9 / 7.7 / 5.5,
   Expert 10.4 / 10.8 / 8.0, Mastery 5.9 / 6.9 / 4.7, Diagnostic 7.6 / 8.5 / 6.0 : all AA for text ---- */
.cpx .cta { display: inline-flex; align-items: center; min-height: 48px; margin-top: 20px; padding: 13px 22px; border-radius: 8px;
  background: var(--tier-accent); color: var(--cp-btn-ink); font-weight: 800; text-decoration: none; border: 2px solid var(--tier-accent); }
.cpx .cta:hover { background: color-mix(in srgb, var(--tier-accent) 86%, white); color: var(--cp-btn-ink); }
.cpx .cta:active { background: color-mix(in srgb, var(--tier-accent) 86%, #09234b); color: var(--cp-btn-ink); }
.cpx .cta:focus-visible { outline: 3px solid var(--cp-ink); outline-offset: 3px; color: var(--cp-btn-ink); }
/* Diagnostic: the polished silver of the course-selection Diagnostic button (Cassi's 19 Nov audit: the flat grey
   read as disabled). Same gradient and pill as .cs3-btn--silver; navy label stays AA on every stop. */
.cpx--dx { --cp-dx-sheen: linear-gradient(170deg, #f4f6fa, #d9dde4 43%, var(--cp-dx) 78%, #cbd0d8); --cp-dx-hover: #e8ecf2; --cp-dx-press: #c9ced6; }
.cpx--dx .cta { background: var(--cp-dx-sheen); border-color: #cbd0d8; border-radius: 26px; box-shadow: 0 2px 10px rgba(0, 0, 0, .28); transition: background-color .2s, box-shadow .2s; }
.cpx--dx .cta:hover { background: var(--cp-dx-hover); box-shadow: 0 4px 16px rgba(0, 0, 0, .34); }
.cpx--dx .cta:active { background: var(--cp-dx-press); box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .cpx--dx .cta { transition: none; } }

/* ---- inline links: underlined, in the DESTINATION tier's accent ---- */
.cpx a:not(.cta) { color: var(--link-accent, var(--tier-accent)); text-decoration: underline; text-underline-offset: .19em; }
.cpx a:not(.cta):hover { text-decoration-thickness: 2px; }
.cpx a:not(.cta):focus-visible { outline: 3px solid var(--link-accent, var(--tier-accent)); outline-offset: 4px; border-radius: 2px; }
.cpx a[data-to="xs"] { --link-accent: var(--cp-xs); }
.cpx a[data-to="xp"] { --link-accent: var(--cp-xp); }
.cpx a[data-to="ma"] { --link-accent: var(--cp-ma); }
.cpx a[data-to="dx"] { --link-accent: var(--cp-dx); }
.cpx .secondary { display: inline-block; margin-top: 8px; font-weight: 800; }

/* ---- inclusion cards: 38 px outline icons, 2 px tinted borders ---- */
.cpx .inclusion-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; list-style: none; padding: 0; margin: 24px 0 0; }
.cpx :is(.expert-cards, .mastery-cards) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 24px; }   /* Mastery: Cassi's QA 1, 16 Nov */
.cpx .inclusion-cards li, .cpx :is(.expert-cards, .mastery-cards) .card { padding: 24px; border: 2px solid color-mix(in srgb, var(--tier-accent) 78%, #142f54); border-radius: 16px; background: var(--cp-panel); }
.cpx :is(.inclusion-cards, .expert-cards, .mastery-cards) svg { display: block; width: 38px; height: 38px; margin-bottom: 14px; color: var(--tier-accent); fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---- Diagnostic layout ---- */
.cpx .steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; list-style: none; padding: 0; margin: 22px 0 0; }
.cpx .steps li, .cpx .report { border: 1px solid var(--cp-line); border-radius: 16px; padding: 24px; background: var(--cp-panel); }
.cpx .steps h3 { color: var(--tier-accent); }
.cpx .report { border-left: 4px solid var(--tier-accent); }
.cpx .feedback-media { padding: 0; overflow: hidden; }
.cpx figure.media { width: 100%; }
.cpx figure.media .cpx-video__soon { border: 0; border-radius: 0; }
.cpx [hidden] { display: none !important; }

/* ---- FAQs: collapsed by default; the whole question row is the control ---- */
.cpx details { border-bottom: 1px solid var(--cp-line); padding: 0; }
.cpx summary { display: flex; align-items: flex-start; gap: 12px; min-height: 48px; padding: 14px 0; font-weight: 800; cursor: pointer; list-style: none; overflow-wrap: anywhere; }
.cpx summary::-webkit-details-marker { display: none; }
.cpx summary::before { content: ""; flex: 0 0 auto; width: 10px; height: 10px; margin-top: .5em; border-right: 2px solid var(--tier-accent); border-bottom: 2px solid var(--tier-accent); transform: rotate(-45deg); transition: transform .15s; }
.cpx details[open] > summary::before { transform: rotate(45deg); }
.cpx summary:focus-visible { outline: 3px solid var(--tier-accent); outline-offset: 2px; border-radius: 4px; }
.cpx details > p { padding-left: 22px; max-width: none; }
.cpx details > p:last-child { margin-bottom: 16px; }
@media (prefers-reduced-motion: reduce) { .cpx summary::before { transition: none; } }

/* ---- walkthrough video: poster + play, player loaded on click ---- */
.cpx-video { margin: 0; }
.cpx-video__btn, .cpx-video__frame, .cpx-video__soon { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--cp-deep); border: 1px solid var(--cp-line); }
.cpx-video__btn { padding: 0; cursor: pointer; }
.cpx-video__btn img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* One frame, one border (Cassi, 19 Nov 2026: the feedback video did not line up with its border). A video placed in a
   .report figure inherited that panel's border, 4px accent edge, padding and 16px radius around the player's own
   12px frame, so two edges showed. The figure is now a plain wrapper; the player frame alone draws the border. */
.cpx figure.cpx-video, .cpx figure.cpx-video.report { border: 0; border-radius: 0; padding: 0; background: none; box-shadow: none; overflow: visible; }
.cpx-video__btn, .cpx-video__frame { box-sizing: border-box; }
.cpx-video__btn:focus-visible { outline: 3px solid var(--tier-accent); outline-offset: 3px; }
.cpx-video__play { position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 50%; background: var(--tier-accent); box-shadow: 0 6px 24px rgba(0,0,0,.35); }
.cpx-video__play::after { content: ""; position: absolute; left: 29px; top: 22px; border-style: solid; border-width: 14px 0 14px 22px; border-color: transparent transparent transparent var(--cp-btn-ink); }
.cpx-video__btn:hover .cpx-video__play { background: color-mix(in srgb, var(--tier-accent) 86%, white); }
.cpx-video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cpx-video__soon { display: grid; place-items: center; align-content: center; gap: 12px; text-align: center; padding: 20px; border-style: dashed; }
.cpx-video__soon .cpx-video__play { position: relative; left: auto; top: auto; margin: 0; opacity: .55; }
.cpx-video__soon p { margin: 0; color: var(--cp-muted); font-size: .95rem; }

/* ---- footer on the navy page ---- */
body.cpx-body .footer { background: rgba(5, 14, 30, .55); border-top-color: var(--cp-line); color: var(--cp-ink); }
body.cpx-body .footer :is(p, span, a) { color: var(--cp-ink); }
body.cpx-body .footer ul { padding: 0; margin: 0; }

/* ---- tablet and phone ---- */
@media (max-width: 760px) {
  .cpx :is(.grid, .split, .steps, .inclusion-cards, .expert-cards, .mastery-cards) { grid-template-columns: 1fr; }
}

/* ---- staff only: copy the public will see once Writing Feedback Session booking opens (17 Nov 2026) ---- */
.cpx .cpx-pending { display: block; outline: 2px dashed #ffd166; outline-offset: 4px; border-radius: 4px; }
.cpx .cpx-pending::before { content: attr(data-pending); display: block; margin-bottom: 4px; font: 700 .75rem/1.3 Manrope, system-ui, sans-serif; color: #ffd166; letter-spacing: .02em; }
.cpx span.cpx-pending { display: inline; }
.cpx span.cpx-pending::before { display: inline; margin-right: 6px; }

/* =========================================================================================
   Writing Coaching page  /coaching-consultations         (Cassi's approved preview v4, 17 Nov 2026)
   Palette from the handover: navy #0B1D38, card #142F54, ink #F5F8FF, body #C8D8EE, pale blue #A8CCFF
   (15-minute session), mint #A9EDCF (30-minute), dividers #4C6992.
   ========================================================================================= */
body.cpco-body { background: #0b1d38; }
.cpco { --co-navy: #0b1d38; --co-panel: #142f54; --co-ink: #f5f8ff; --co-muted: #c8d8ee; --co-mint: #a9edcf; --co-blue: #a8ccff; --co-line: #4c6992;
  container-type: inline-size; padding-top: var(--nav-h, 70px); font: 500 1rem/1.65 Manrope, system-ui, sans-serif; color: var(--co-ink); background: var(--co-navy); }
.cpx-staging + .cpco { padding-top: 0; }
.cpco :where(*, *::before, *::after) { box-sizing: border-box; }
.cpco :where(h1, h2, h3, p, figure) { margin: 0; }
.cpco :is(h1, h2, h3) { font-family: Manrope, system-ui, sans-serif; line-height: 1.14; font-weight: 800; letter-spacing: -.035em; text-wrap: balance; color: var(--co-ink); }
.cpco h1 { font-size: clamp(2.1rem, 5cqw, 4.05rem); max-width: 18ch; }
.cpco h2 { font-size: clamp(1.55rem, 3cqw, 2.35rem); }
.cpco h3 { font-size: clamp(1.22rem, 2.25cqw, 1.6rem); }
.cpco p { color: var(--co-muted); }
.cpco a { color: var(--co-mint); text-underline-offset: .23em; }
.cpco :is(a, summary):focus-visible { outline: 3px solid var(--co-mint); outline-offset: 4px; }
.cpco .wrap { max-width: 1160px; margin-inline: auto; padding-inline: clamp(20px, 5cqw, 52px); }
.cpco .hero { background: radial-gradient(ellipse at 85% 5%, #1a435c 0%, transparent 63%), linear-gradient(135deg, #102b50, #0b1d38); border-bottom: 1px solid #294766; min-height: 0; display: block; overflow: visible; }
.cpco .hero .wrap { padding-block: clamp(24px, 3.5cqw, 44px); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; gap: 28px; }
.cpco .lead { font-size: clamp(1rem, 1.7cqw, 1.13rem); margin-top: 1rem; max-width: 52ch; }
.cpco .button { display: inline-flex; align-items: center; gap: .4em; min-height: 44px; margin-top: 1rem; padding: .55rem .95rem; border-radius: .55rem; background: var(--co-mint); color: #0b2531; font: 800 .92rem/1.3 Manrope, system-ui, sans-serif; text-decoration: none; }
.cpco .button:hover { background: #d3fbe9; color: #0b2531; }
.cpco .hero-media { width: 100%; --tier-accent: var(--co-mint); --cp-btn-ink: #0b2531; }
.cpco .block { padding-block: clamp(30px, 4.7cqw, 56px); }
.cpco .block + .block { border-top: 1px solid #294766; }
.cpco #sessions { padding-block-start: clamp(20px, 2.8cqw, 32px); scroll-margin-top: calc(var(--nav-h, 70px) + 12px); }
.cpco .cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.cpco .card { --accent: var(--co-mint); display: flex; flex-direction: column; align-items: start; gap: .75rem; padding: clamp(17px, 3cqw, 30px);
  border: 1px solid var(--co-line); border-top: 3px solid var(--accent); border-radius: 16px; background: var(--co-panel);
  scroll-margin-top: calc(var(--nav-h, 70px) + 12px); transition: transform 250ms ease-out, box-shadow 250ms ease-out; }
.cpco .card.feedback { --accent: var(--co-blue); }
.cpco .duration { color: var(--accent); background: #0e2745; border: 1px solid var(--co-line); border-radius: 999px; padding: .22rem .65rem; font-size: .875rem; font-weight: 800; }
.cpco .card-benefit { color: var(--co-ink); font-weight: 800; font-size: .92rem; }
.cpco .actions { width: 100%; border-top: 1px solid var(--co-line); padding-top: .9rem; margin-top: auto; }
.cpco .booking-status { display: inline-flex; align-items: center; min-height: 44px; padding: .55rem .95rem; border-radius: .55rem; background: var(--accent); color: var(--co-navy); font-size: .92rem; font-weight: 800; line-height: 1.3; }
.cpco .coaching-copy { border-left: 3px solid var(--co-mint); padding-left: clamp(14px, 2cqw, 24px); }
.cpco .coaching-copy p { margin-top: .65rem; max-width: 74ch; }
.cpco .faqs { margin-top: 1rem; max-width: 52rem; border-top: 1px solid var(--co-line); }
.cpco details { border-bottom: 1px solid var(--co-line); }
.cpco summary { display: list-item; width: 100%; min-height: 44px; cursor: pointer; font-weight: 800; padding: 1rem .25rem; color: var(--co-ink); }
.cpco summary::marker { color: var(--co-mint); }
.cpco details p { margin: 0 .25rem 1rem 1.1rem; max-width: 72ch; }
@media (hover: hover) and (pointer: fine) {
  .cpco .card:hover { transform: translateY(-12px); box-shadow: 0 30px 52px #010919eb, 0 10px 20px #010919a6; }
}
@media (prefers-reduced-motion: reduce) {
  .cpco .card { transition: none; }
  .cpco .card:hover { transform: none; box-shadow: none; }
}
@container (max-width: 680px) {
  .cpco .hero .wrap, .cpco .cards { grid-template-columns: 1fr; }
}
