/*
 * Course page v2, fold 3: exam and certificate (#exam, .ex-*).
 * Desktop: head (eyebrow, H2 up to 960px, lead up to 780px) then a 7fr/5fr grid: the facts table and the ink certificate card.
 * No confirmed rows (.ex-solo): centred head and the card in a centred 560px column.
 * Content cap 540px at 1366x768 (page.css --cv2-cap). Tokens only. Amber is only the card's one "Enquire now".
 * Hidden start states apply only under html.hv-motion + .cv2-armed (page.js), so crawlers and no-JS visitors never see blanks.
 */

/* ---------- Head ---------- */
.course-v2 .ex-head.v3-head-left { max-width: 1100px; }
.course-v2 .ex-head.v3-head { max-width: 960px; }
.course-v2 .ex-head .v3-lead { max-width: 780px; }
.course-v2 .ex-head.v3-head .v3-lead { margin-left: auto; margin-right: auto; }
.course-v2 .ex-head .v3-h2 { text-wrap: balance; }

/* ---------- Grid ---------- */
.course-v2 .ex-grid { display: grid; gap: 24px; }
@media (min-width: 1024px) {
    .course-v2 .ex-has-table .ex-grid { grid-template-columns: minmax(0, 1fr) minmax(320px, 360px); gap: 32px; align-items: start; }
}
.course-v2 .ex-solo .ex-grid { max-width: 560px; margin: 0 auto; }

/* ---------- Facts table ---------- */
.course-v2 .ex-table-card { align-self: start; }
.course-v2 .ex-table .ex-col-label { width: 28%; }
.course-v2 .ex-two .ex-table .ex-col-label { width: 34%; }
.course-v2 .ex-table tbody tr { height: 43px; }
.course-v2 .ex-table tbody th, .course-v2 .ex-table tbody td { padding: 9px 16px; }
.course-v2 .ex-table tbody th[scope="row"] { font-weight: 600; color: var(--ink); }
.course-v2 .ex-table tbody td { color: var(--ink-2); overflow-wrap: anywhere; }
.course-v2 .ex-table tbody tr > * { transition: background-color 150ms ease; }
.course-v2 .ex-table tbody tr:hover > *, .course-v2 .ex-table tbody tr:focus-within > * { background: var(--l100); }
.course-v2 .ex-table .ex-num { font-family: 'Outfit', sans-serif; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.course-v2 .ex-table thead th { font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 16px; color: var(--ink); background: var(--l100); height: 40px; }
.course-v2 .ex-table thead .ex-corner { background: var(--l100); border-bottom: var(--cv2-border); }
.course-v2 .ex-table .ex-colhead { cursor: default; }
.course-v2 .ex-table .ex-colhead:focus-visible { outline: var(--focus-light); outline-offset: -3px; }
.course-v2 .ex-table .ex-none { color: var(--mute); }
.course-v2 .ex-table .ex-caption { caption-side: bottom; padding: 8px 14px 10px; font-size: 16px; line-height: 1.5; text-align: left; color: var(--mute); border-top: var(--cv2-border); }
.course-v2 .ex-table .ex-caption-i { width: 18px; height: 18px; margin-right: 6px; vertical-align: -3px; color: var(--brand); }
/* Two exams: column focus tints the column (pointer and keyboard only; the content does not change) */
.course-v2 .ex-table[data-col="1"] [data-c="1"], .course-v2 .ex-table[data-col="2"] [data-c="2"] { background: var(--l50); }
.course-v2 .ex-table[data-col="1"] thead [data-c="1"], .course-v2 .ex-table[data-col="2"] thead [data-c="2"] { background: var(--l200); }

/* Exam fee chips (never amber). The picked format gets a brand outline and a tick. */

.course-v2 .ex-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.course-v2 .ex-chip { position: relative; display: inline-flex; align-items: center; gap: 4px; min-height: 30px; padding: 1px 9px; border-radius: var(--r-chip); border: 1.5px solid transparent; background: var(--l100); color: var(--brand-deep); font-size: 16px; font-weight: 600; line-height: 1.4; transition: border-color 200ms var(--ease), background-color 200ms var(--ease); }
.course-v2 .ex-chip-tick { width: 0; height: 16px; opacity: 0; transform: scale(.9); transition: width 200ms var(--ease), opacity 200ms var(--ease), transform 200ms var(--ease); }
.course-v2 .ex-chip.is-picked { border-color: var(--brand); background: var(--white); }
.course-v2 .ex-chip.is-picked .ex-chip-tick { width: 16px; opacity: 1; transform: none; }

/* ---------- Certificate card (ink) ---------- */
.course-v2 .ex-card { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; align-self: start; padding: 28px 24px; border-radius: 20px; background: var(--ink); color: var(--on-dark); box-shadow: var(--shadow-panel); }
.course-v2 .ex-glow { position: absolute; inset: -30% -30% auto auto; width: 90%; height: 90%; z-index: -1; pointer-events: none; background: radial-gradient(closest-side, rgba(162, 73, 237, .34), transparent 70%); }
html.hv-motion .course-v2 .ex-glow { animation: v3Drift 18s ease-in-out infinite alternate; }
.course-v2 .ex-card.ex-paused .ex-glow { animation-play-state: paused; }
.course-v2 .ex-seal { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 16px; background: rgba(255, 255, 255, .08); color: var(--l300); }
.course-v2 .ex-seal .v3-i { width: 32px; height: 32px; }
.course-v2 .ex-card-h3 { margin: 20px 0 8px; font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 22px; line-height: 1.3; color: var(--on-dark); }
.course-v2 .ex-cert-line { margin: 0; font-size: 17px; line-height: 1.5; color: var(--on-dark); }
.course-v2 .ex-fee-line { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 0; font-size: 16px; line-height: 1.5; color: var(--on-dark-2); }
.course-v2 .ex-fee-line .v3-i { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--l300); }
.course-v2 .ex-card .ex-cta { margin-top: 20px; }
.course-v2 .ex-ato { margin: 12px 0 0; font-size: 16px; line-height: 1.5; color: var(--on-dark-2); }

/* Pass-mark ring(s) */
.course-v2 .ex-rings { display: flex; gap: 20px; }
.course-v2 .ex-ring-item { display: flex; align-items: center; gap: 16px; transition: opacity 200ms ease; }
.course-v2 .ex-rings-2 .ex-ring-item { flex: 1 1 0; flex-direction: column; align-items: flex-start; gap: 8px; }
.course-v2 .ex-ring { position: relative; display: inline-flex; flex: none; width: 96px; height: 96px; }
.course-v2 .ex-rings-2 .ex-ring { width: 80px; height: 80px; }
.course-v2 .ex-ring svg { width: 100%; height: 100%; fill: none; stroke-width: 8; }
.course-v2 .ex-ring-track { stroke: rgba(255, 255, 255, .14); }
.course-v2 .ex-ring-arc { stroke: var(--l300); stroke-linecap: round; stroke-dasharray: var(--ex-c); stroke-dashoffset: var(--ex-off); }
.course-v2 .ex-ring-pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 26px; color: var(--on-dark); font-variant-numeric: tabular-nums; }
.course-v2 .ex-rings-2 .ex-ring-pct { font-size: 22px; }
.course-v2 .ex-ring-text { display: grid; gap: 2px; margin: 0; }
.course-v2 .ex-ring-k { font-size: 16px; line-height: 1.4; color: var(--on-dark-2); }
.course-v2 .ex-ring-v { font-size: 18px; line-height: 1.4; color: var(--on-dark); }
.course-v2 .ex-two .ex-card .ex-ring-item { opacity: 1; }
.course-v2 .ex-two .ex-card[data-col] .ex-ring-item { opacity: .55; }
.course-v2 .ex-card[data-col="1"] .ex-ring-item[data-c="1"], .course-v2 .ex-card[data-col="2"] .ex-ring-item[data-c="2"] { opacity: 1; }
.course-v2 .ex-two .ex-card { padding: 24px; }

/* ---------- Motion (only below the first screen, only with motion on) ---------- */
html.hv-motion .course-v2 .ex-section .ex-row > * { transition: opacity 360ms var(--ease), transform 360ms var(--ease), background-color 150ms ease; transition-delay: calc(200ms + var(--i, 0) * 60ms), calc(200ms + var(--i, 0) * 60ms), 0s; }
html.hv-motion .course-v2 .ex-section.cv2-armed:not(.cv2-in) .ex-row > * { opacity: 0; transform: translate3d(-12px, 0, 0); }
html.hv-motion .course-v2 .ex-section.cv2-done .ex-row > * { opacity: 1; transform: none; transition-delay: 0s; }
html.hv-motion .course-v2 .ex-section .ex-ring-arc { transition: stroke-dashoffset 1100ms var(--ease) 700ms; }
html.hv-motion .course-v2 .ex-section.cv2-armed:not(.cv2-in) .ex-ring-arc { stroke-dashoffset: var(--ex-c); }

/* ---------- Phones and tablets ---------- */
@media (max-width: 1023px) {
    .course-v2 .ex-section { padding: 48px 0; }
    .course-v2 .ex-head .v3-h2 { font-size: 26px; line-height: 1.2; }
    .course-v2 .ex-head .v3-lead { font-size: 16px; }
    .course-v2 .ex-head { margin-bottom: 24px; }
}
@media (max-width: 767px) {
    .course-v2 .ex-table .ex-col-label { width: 40%; }
    .course-v2 .ex-two .ex-table .ex-col-label { width: 34%; }
    .course-v2 .ex-table tbody th, .course-v2 .ex-table tbody td { padding: 12px 12px; }
    .course-v2 .ex-two .ex-table .ex-col-suffix { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
    .course-v2 .ex-card { padding: 24px; border-radius: 16px; }
    .course-v2 .ex-ring { width: 80px; height: 80px; }
    .course-v2 .ex-rings-2 .ex-ring { width: 68px; height: 68px; }
    .course-v2 .ex-ring-pct { font-size: 22px; }
    .course-v2 .ex-rings-2 .ex-ring-pct { font-size: 18px; }
    .course-v2 .ex-card-h3 { font-size: 20px; }
    .course-v2 .ex-cert-line { font-size: 16px; }
    .course-v2 .ex-cta { min-height: 52px; }
}

/* ---------- Reduced motion, print, forced colours ---------- */
@media (prefers-reduced-motion: reduce) {
    .course-v2 .ex-section .ex-row > *, .course-v2 .ex-ring-arc, .course-v2 .ex-chip, .course-v2 .ex-chip-tick { transition: none !important; opacity: 1; transform: none !important; }
    .course-v2 .ex-section .ex-ring-arc { stroke-dashoffset: var(--ex-off) !important; }
    .course-v2 .ex-glow { animation: none !important; }
}
@media print {
    .course-v2 .ex-glow { display: none; }
    .course-v2 .ex-section .ex-ring-arc { stroke-dashoffset: var(--ex-off) !important; }
}
@media (forced-colors: active) {
    .course-v2 .ex-card { border: 1px solid CanvasText; }
    .course-v2 .ex-chip.is-picked { outline: 2px solid Highlight; }
    .course-v2 .ex-ring-arc { stroke: Highlight; }
}

/* ---------- No confirmed figures (.ex-solo): three-step route beside the certificate card ---------- */
.course-v2 .ex-path { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.course-v2 .ex-step { display: flex; gap: 16px; align-items: flex-start; padding: 20px 22px; background: var(--white); border: var(--cv2-border); border-radius: var(--r-card); box-shadow: var(--shadow-card); }
.course-v2 .ex-step-n { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: var(--l100); color: var(--brand-deep); font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 18px; }
.course-v2 .ex-step-t { display: grid; gap: 4px; font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.course-v2 .ex-step-t strong { font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 19px; line-height: 1.3; color: var(--ink); }
@media (min-width: 1024px) {
    .course-v2 .ex-solo .ex-grid { max-width: 1040px; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); gap: 32px; align-items: center; }
    .course-v2 .ex-solo .ex-card { align-self: stretch; justify-content: center; }
}
@media (min-width: 1024px) and (min-height: 620px) and (max-height: 700px) {
    .course-v2 .ex-step { padding: 14px 18px; }
    .course-v2 .ex-path { gap: 10px; }
}
