/* ============================================
   StoryBrand Page Styles - Code Blue Academy
   The family stylesheet for every StoryBrand page,
   loaded by templates/layouts/story.html. Sections
   follow the StoryBrand narrative flow. This file is
   the canonical visual reference for marketing pages.

   Shared cards, tiles and pills live in
   _components.css (glow-card, icon-ring, chip,
   format-badge, program-tile).
   ============================================ */

/* ===== PAGE ACCENT =====
   layouts/story.html renders <main class="story" data-accent="...">.
   Components read the accent through --cc (an R, G, B triplet).
   Values live only in _tokens.css. */

.story { --cc: var(--accent-red-rgb); }
.story[data-accent="blue"]   { --cc: var(--accent-blue-rgb); }
.story[data-accent="gold"]   { --cc: var(--accent-gold-rgb); }
.story[data-accent="green"]  { --cc: var(--accent-green-rgb); }
.story[data-accent="purple"] { --cc: var(--accent-purple-rgb); }
.story[data-accent="cyan"]   { --cc: var(--accent-cyan-rgb); }

/* ===== 1. HERO SECTION: css/pages/hero.css (shared with the catalogs and About) ===== */

/* A text button after the hero's two buttons (the CE page's See How It
   Works): no side padding, so on its own row it lines up with them. */
.hero__actions .btn--ghost {
    padding-inline: 0;
}

/* ===== 2. THE PROBLEM (StoryBrand: 3-Layer Problem) ===== */

.problem {
    padding-block: 6rem;
    background-color: var(--color-midnight-950);
}

.problem__lead {
    color: var(--color-slate-400);
    max-width: 50ch;
    margin-inline: auto;
    text-align: center;
    line-height: var(--leading-relaxed);
    margin-block-start: var(--space-4);
}

.problem__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-10);
    margin-block-start: var(--space-20);
    align-items: stretch;
}

@media (max-width: 64em) {
    .problem__grid {
        grid-template-columns: 1fr;
        max-width: 32rem;
        margin-inline: auto;
    }
}

/* Middle card floats above the other two */
.problem__grid > :nth-child(2) {
    position: relative;
    top: -2.5rem;
    z-index: 2;
}

@media (max-width: 64em) {
    .problem__grid > :nth-child(2) {
        top: 0;
    }
}

.problem__card {
    background-color: var(--color-midnight-800);
    border: 2px solid var(--color-cb-red);
    border-radius: var(--radius-xl);
    padding: var(--space-8) var(--space-6);
    text-align: center;
    box-shadow: 0 0 50px rgba(193, 0, 0, 0.3), 0 0 100px rgba(193, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform var(--duration-normal) var(--ease-default),
                border-color var(--duration-normal) var(--ease-default),
                box-shadow var(--duration-normal) var(--ease-default),
                background-color var(--duration-normal) var(--ease-default);
}

/* Per-card default colors */
.problem__card[data-layer="internal"] {
    border-color: var(--neon-blue);
    box-shadow:
        0 0 50px rgba(var(--accent-blue-rgb), 0.3),
        0 0 100px rgba(var(--accent-blue-rgb), 0.1),
        0 25px 50px rgba(0, 0, 0, 0.4);
}

.problem__card[data-layer="philosophical"] {
    border-color: var(--neon-gold);
    box-shadow: 0 0 50px rgba(var(--accent-gold-rgb), 0.3), 0 0 100px rgba(var(--accent-gold-rgb), 0.1);
}

/* Hover: lift, scale, intensified glow, lighter background */
.problem__card:hover {
    transform: translateY(-8px) scale(1.03);
    background-color: var(--color-midnight-700);
    box-shadow: 0 0 80px rgba(193, 0, 0, 0.5), 0 0 140px rgba(193, 0, 0, 0.2);
}

.problem__card[data-layer="internal"]:hover {
    box-shadow: 0 0 80px rgba(var(--accent-blue-rgb), 0.5), 0 0 140px rgba(var(--accent-blue-rgb), 0.2);
}

.problem__card[data-layer="philosophical"]:hover {
    box-shadow: 0 0 80px rgba(var(--accent-gold-rgb), 0.5), 0 0 140px rgba(var(--accent-gold-rgb), 0.2);
}

.problem__icon-wrap {
    width: 72px;
    height: 72px;
    margin-inline: auto;
    margin-block-end: var(--space-5);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-midnight-800);
    border: 2px solid rgb(193, 0, 0);
    border-radius: var(--radius-full);
    box-shadow: 0 0 30px rgba(193, 0, 0, 0.35), 0 0 60px rgba(193, 0, 0, 0.12);
    animation: icon-pulse-red 3s ease-in-out infinite;
}

@keyframes icon-pulse-red {
    0%, 100% {
        box-shadow: 0 0 30px rgba(193, 0, 0, 0.35), 0 0 60px rgba(193, 0, 0, 0.12);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 45px rgba(193, 0, 0, 0.55), 0 0 90px rgba(193, 0, 0, 0.25);
        transform: scale(1.06);
    }
}

.problem__icon {
    width: 32px;
    height: 32px;
    color: rgb(193, 0, 0);
}

/* Match icon colors to card accent */
[data-layer="internal"] .problem__icon-wrap {
    border-color: rgb(59, 130, 246);
    box-shadow: 0 0 30px rgba(var(--accent-blue-rgb), 0.35), 0 0 60px rgba(var(--accent-blue-rgb), 0.12);
    animation: icon-pulse-blue 3s ease-in-out infinite;
}

@keyframes icon-pulse-blue {
    0%, 100% {
        box-shadow: 0 0 30px rgba(var(--accent-blue-rgb), 0.35), 0 0 60px rgba(var(--accent-blue-rgb), 0.12);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 45px rgba(var(--accent-blue-rgb), 0.55), 0 0 90px rgba(var(--accent-blue-rgb), 0.25);
        transform: scale(1.06);
    }
}

[data-layer="internal"] .problem__icon {
    color: var(--neon-blue);
}

[data-layer="philosophical"] .problem__icon-wrap {
    border-color: rgb(245, 158, 11);
    box-shadow: 0 0 30px rgba(var(--accent-gold-rgb), 0.35), 0 0 60px rgba(var(--accent-gold-rgb), 0.12);
    animation: icon-pulse-orange 3s ease-in-out infinite;
}

@keyframes icon-pulse-orange {
    0%, 100% {
        box-shadow: 0 0 30px rgba(var(--accent-gold-rgb), 0.35), 0 0 60px rgba(var(--accent-gold-rgb), 0.12);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 45px rgba(var(--accent-gold-rgb), 0.55), 0 0 90px rgba(var(--accent-gold-rgb), 0.25);
        transform: scale(1.06);
    }
}

[data-layer="philosophical"] .problem__icon {
    color: var(--neon-gold);
}

@media (prefers-reduced-motion: reduce) {
    .problem__icon-wrap {
        animation: none;
    }
}

.problem__layer-label {
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--color-cb-red-300);
    margin-block-end: var(--space-3);
}

.problem__headline {
    font-size: var(--text-xl);
    color: var(--color-white);
    margin-block-end: var(--space-3);
}

.problem__description {
    font-size: var(--text-sm);
    color: var(--color-slate-400);
    line-height: var(--leading-relaxed);
    max-width: 30ch;
    margin-inline: auto;
    flex-grow: 1;
}

/* ===== 3. THE GUIDE (StoryBrand: Empathy + Authority) ===== */

.guide {
    padding-block: 6rem;
    background-color: var(--surface-dark);
}

.guide__layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    align-items: center;
}

@media (max-width: 64em) {
    .guide__layout {
        grid-template-columns: 1fr;
        gap: var(--space-10);
    }
}

/* No stat tile has a value yet (Become an Instructor with no published
   course): the empathy text stands alone, centred, as on For Organizations. */
.guide__layout--solo {
    grid-template-columns: 1fr;
    max-width: 48rem;
    margin-inline: auto;
}

.guide__empathy-text {
    font-size: var(--text-lg);
    color: var(--color-slate-300);
    line-height: var(--leading-relaxed);
    font-style: italic;
    border-inline-start: 3px solid;
    border-image: var(--gradient-brand-vertical) 1;
    padding-inline-start: var(--space-6);
}

.guide__stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
}

.guide__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    text-align: center;
    padding: var(--space-6);
    background-color: var(--color-midnight-800);
    border: 2px solid var(--color-cb-red);
    border-radius: var(--radius-lg);
    box-shadow: 0 0 40px rgba(193, 0, 0, 0.25), 0 0 80px rgba(193, 0, 0, 0.08);
    transition: transform var(--duration-normal) var(--ease-default),
                border-color var(--duration-normal) var(--ease-default),
                box-shadow var(--duration-normal) var(--ease-default),
                background-color var(--duration-normal) var(--ease-default);
}

/* Per-card accent colors */
.guide__stat:nth-child(2) {
    border-color: var(--neon-blue);
    box-shadow: 0 0 40px rgba(var(--accent-blue-rgb), 0.25), 0 0 80px rgba(var(--accent-blue-rgb), 0.08);
}

.guide__stat:nth-child(3) {
    border-color: var(--neon-gold);
    box-shadow: 0 0 40px rgba(var(--accent-gold-rgb), 0.25), 0 0 80px rgba(var(--accent-gold-rgb), 0.08);
}

.guide__stat:nth-child(4) {
    border-color: var(--accent-green);
    box-shadow: 0 0 40px rgba(var(--accent-green-rgb), 0.25), 0 0 80px rgba(var(--accent-green-rgb), 0.08);
}

/* Hover: lift + intensified glow */
.guide__stat:hover {
    transform: translateY(-6px) scale(1.03);
    background-color: var(--color-midnight-700);
    box-shadow: 0 0 60px rgba(193, 0, 0, 0.45), 0 0 120px rgba(193, 0, 0, 0.15);
}

.guide__stat:nth-child(2):hover {
    box-shadow: 0 0 60px rgba(var(--accent-blue-rgb), 0.45), 0 0 120px rgba(var(--accent-blue-rgb), 0.15);
}

.guide__stat:nth-child(3):hover {
    box-shadow: 0 0 60px rgba(var(--accent-gold-rgb), 0.45), 0 0 120px rgba(var(--accent-gold-rgb), 0.15);
}

.guide__stat:nth-child(4):hover {
    box-shadow: 0 0 60px rgba(var(--accent-green-rgb), 0.45), 0 0 120px rgba(var(--accent-green-rgb), 0.15);
}

/* Per-card icon colors */
.guide__stat-icon {
    width: 28px;
    height: 28px;
    color: var(--color-cb-red-400);
}

.guide__stat:nth-child(2) .guide__stat-icon {
    color: var(--neon-blue);
}

.guide__stat:nth-child(3) .guide__stat-icon {
    color: var(--neon-gold);
}

.guide__stat:nth-child(4) .guide__stat-icon {
    color: var(--accent-green);
}

.guide__stat-value {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: var(--weight-semibold);
    color: var(--color-white);
    line-height: 1;
}

.guide__stat-label {
    font-size: var(--text-sm);
    color: var(--color-slate-400);
}

.guide__logos {
    margin-block-start: var(--space-16);
    text-align: center;
}

.guide__logos-label {
    font-size: var(--text-sm);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    margin-block-end: var(--space-6);
}

.guide__logos-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-10);
    flex-wrap: wrap;
}

/* guide__logo-img moved to _components.css (shared across pages) */

/* ===== 4. THE PLAN (StoryBrand: Simple 3-Step Process) ===== */

.plan {
    padding-block: 6rem;
    background-color: var(--color-midnight-950);
    overflow: hidden;
}

/* ── Progress track (desktop only) ── */
.plan__track {
    display: none;
}

@media (min-width: 64em) {
    .plan__track {
        display: block;
        position: absolute;
        /* 40px = centre of the 80px icon circles */
        top: 40px;
        left: calc(100% / 6);
        right: calc(100% / 6);
        height: 2px;
        z-index: 0;
        transform: translateY(-50%);
    }

    .plan__track-line {
        position: absolute;
        inset: 0;
        background: linear-gradient(90deg, var(--color-cb-red), var(--neon-blue), var(--neon-gold));
        border-radius: 2px;
        opacity: 0.6;
    }

    .plan__track-glow {
        position: absolute;
        inset: -4px 0;
        background: linear-gradient(90deg, var(--color-cb-red), var(--neon-blue), var(--neon-gold));
        border-radius: 8px;
        filter: blur(8px);
        opacity: 0.4;
        animation: plan-track-pulse 3s ease-in-out infinite;
    }
}

@keyframes plan-track-pulse {
    0%, 100% { opacity: 0.25; filter: blur(8px); }
    50%      { opacity: 0.6;  filter: blur(12px); }
}

/* ── Step grid ── */
.plan__steps {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

@media (min-width: 64em) {
    .plan__steps {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-8);
        max-width: 100%;
        position: relative;
    }
}

/* ── Individual step ── */
.plan__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 24rem;
}

/* ── Icon wrap (ring + number badge) ── */
.plan__step-icon-wrap {
    position: relative;
    margin-block-end: var(--space-5);
    z-index: 1;
}

.plan__step-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    background-color: var(--color-midnight-800);
    border: 2px solid var(--step-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 0 30px color-mix(in srgb, var(--step-color) 30%, transparent),
        0 0 60px color-mix(in srgb, var(--step-color) 10%, transparent);
    transition: transform var(--duration-normal) var(--ease-default),
                box-shadow var(--duration-normal) var(--ease-default);
}

.plan__step-icon svg {
    width: 36px;
    height: 36px;
    color: var(--step-color);
}

.plan__step-number {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background-color: var(--step-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--color-white);
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

/* White numerals pass on the red of step 1 only (6.43:1): on the blue of
   step 2 they are 3.68:1 and on the yellow of step 3 1.53:1, so those two
   take the dark ink (5.12:1 and 12.3:1). Every plan uses these three step
   colours in this order. */
.plan__step[data-step="2"] .plan__step-number,
.plan__step[data-step="3"] .plan__step-number {
    color: var(--color-midnight-950);
}

/* ── Mobile connector ── */
.plan__connector-mobile {
    width: 2px;
    height: 40px;
    margin-block: var(--space-2);
    position: relative;
}

.plan__connector-mobile svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 4px color-mix(in srgb, var(--step-color) 50%, transparent));
}

.plan__connector-line {
    stroke: var(--step-color);
    stroke-dasharray: 6 4;
    opacity: 0.5;
}

@media (min-width: 64em) {
    .plan__connector-mobile {
        display: none;
    }
}

/* ── Step card ── */
.plan__step-card {
    background-color: var(--color-midnight-800);
    border: 2px solid var(--step-color);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    width: 100%;
    flex-grow: 1;
    box-shadow:
        0 0 40px color-mix(in srgb, var(--step-color) 25%, transparent),
        0 0 80px color-mix(in srgb, var(--step-color) 8%, transparent);
    transition: transform var(--duration-normal) var(--ease-default),
                border-color var(--duration-normal) var(--ease-default),
                box-shadow var(--duration-normal) var(--ease-default),
                background-color var(--duration-normal) var(--ease-default);
}

.plan__step-card:hover {
    transform: translateY(-6px) scale(1.03);
    background-color: var(--color-midnight-700);
    box-shadow:
        0 0 60px color-mix(in srgb, var(--step-color) 45%, transparent),
        0 0 120px color-mix(in srgb, var(--step-color) 15%, transparent);
}

.plan__step-card:hover ~ .plan__step-icon-wrap .plan__step-icon,
.plan__step:hover .plan__step-icon {
    transform: scale(1.1);
    box-shadow:
        0 0 50px color-mix(in srgb, var(--step-color) 45%, transparent),
        0 0 90px color-mix(in srgb, var(--step-color) 18%, transparent);
}

.plan__step-title {
    font-size: var(--text-lg);
    color: var(--color-white);
    margin-block-end: var(--space-2);
    font-weight: var(--weight-semibold);
}

.plan__step-description {
    font-size: var(--text-sm);
    color: var(--color-slate-400);
    line-height: var(--leading-relaxed);
}

/* ── Desktop: equal-height cards ── */
@media (min-width: 64em) {
    .plan__steps {
        align-items: stretch;
    }

    .plan__step-card {
        flex-grow: 1;
    }
}

/* ── Plan CTA button ── */
/* Plain statements under the steps (Become an Instructor: where the CAPCE
   application stands, how royalties are set). */
.plan__notes {
    position: relative;
    z-index: var(--z-raised);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    margin: var(--space-12) 0 0;
    padding: 0;
    list-style: none;
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
    text-align: center;
    color: var(--color-slate-300);
}

.plan__notes + .plan__cta {
    margin-block-start: var(--space-8);
}

.plan__cta {
    text-align: center;
    margin-block-start: var(--space-16);
    position: relative;
    z-index: 2;
}

/* The address behind Apply to Teach (Become an Instructor), printed beside
   each button so it can be read and copied where no mail program is set
   up. One click selects the whole address. */
.apply-email {
    flex-basis: 100%;
    max-width: none;
    margin: var(--space-3) 0 0;
    font-size: var(--text-sm);
    color: var(--color-slate-300);
}

.hero__actions .apply-email {
    margin: 0;
}

.apply-email__address {
    font-weight: var(--weight-semibold);
    color: var(--color-white);
    overflow-wrap: anywhere;
    user-select: all;
}

/* ===== 5. SUCCESS (StoryBrand: Transformation Outcome) ===== */

.success {
    padding-block: 6rem;
    background-color: var(--surface-dark);
}

.success__layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: var(--space-16);
    align-items: center;
}

@media (max-width: 64em) {
    .success__layout {
        grid-template-columns: 1fr;
        gap: var(--space-10);
    }
}

.success__copy h2 {
    color: var(--color-white);
    margin-block-end: var(--space-6);
}

.success__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    margin-block-end: var(--space-6);
}

.success__list-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    font-size: var(--text-base);
    color: var(--color-slate-300);
    line-height: var(--leading-relaxed);
}

.success__check {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin-block-start: 2px;
}

/* Mock window (shared with dashboard) */
.mock-window {
    background-color: var(--color-midnight-800);
    border: 2px solid rgb(16, 185, 129);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transform: perspective(1200px) rotateY(-3deg) rotateX(2deg);
    transition: transform var(--duration-slow) var(--ease-default),
                box-shadow var(--duration-slow) var(--ease-default),
                background-color var(--duration-slow) var(--ease-default);
    box-shadow:
        0 0 40px rgba(var(--accent-green-rgb), 0.25),
        0 0 80px rgba(var(--accent-green-rgb), 0.08);
}

.mock-window:hover {
    transform: perspective(1200px) rotateY(0deg) rotateX(0deg);
    background-color: var(--color-midnight-700);
    box-shadow:
        0 0 60px rgba(var(--accent-green-rgb), 0.45),
        0 0 120px rgba(var(--accent-green-rgb), 0.15);
}

.mock-window__chrome {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: var(--space-3) var(--space-4);
    background-color: var(--color-midnight-900);
    border-bottom: 1px solid var(--color-midnight-700);
    position: relative;
}

/* Gradient top accent removed — clashed with the window border */

.mock-window__dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
}

.mock-window__dot--red    { background-color: #FF5F57; }
.mock-window__dot--yellow { background-color: #FEBC2E; }
.mock-window__dot--green  { background-color: #28C840; }

/* The window's caption: says the dashboard inside is an example, so its
   numbers are not read as the site's. Styled as the hero card's title. */
.mock-window__title {
    margin-inline-start: var(--space-2);
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--color-slate-400);
}

.mock-window__body {
    padding: var(--space-6);
}

/* Dashboard stats inside the mock */
.mock-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
    margin-block-end: var(--space-6);
}

.mock-stat {
    background-color: var(--color-midnight-900);
    border: 1px solid var(--color-midnight-700);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
}

.mock-stat__label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    margin-block-end: var(--space-2);
}

.mock-stat__value {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: var(--weight-semibold);
    color: var(--color-white);
    line-height: 1;
}

.mock-stat__trend {
    font-size: var(--text-xs);
    color: var(--color-success-600);
    margin-block-start: var(--space-1);
}

/* Progress bars inside mock */
.mock-progress {
    margin-block-end: var(--space-4);
}

.mock-progress__header {
    display: flex;
    justify-content: space-between;
    font-size: var(--text-sm);
    margin-block-end: var(--space-2);
}

.mock-progress__label {
    color: var(--color-slate-300);
}

.mock-progress__value {
    color: var(--color-cb-blue-400);
    font-weight: var(--weight-semibold);
}

.mock-progress__track {
    height: 8px;
    background-color: var(--color-midnight-700);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.mock-progress__fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: var(--gradient-brand);
    width: 0;
    transition: width 1.5s var(--ease-out);
}

.mock-progress__fill--success {
    background: var(--color-success-600);
}

/* ===== 6. FAILURE (StoryBrand: Stakes Comparison) ===== */

.failure {
    padding-block: 6rem;
    background-color: var(--color-midnight-950);
    /* The columns slide in from the sides; clip them so phones never get a
       sideways scroll before the reveal plays. */
    overflow-x: clip;
}

.failure__comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
}

@media (max-width: 48em) {
    .failure__comparison {
        grid-template-columns: 1fr;
    }
}

.failure__column {
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    background-color: var(--color-midnight-800);
    transition: transform var(--duration-normal) var(--ease-default),
                box-shadow var(--duration-normal) var(--ease-default),
                background-color var(--duration-normal) var(--ease-default);
}

.failure__column:hover {
    transform: translateY(-6px) scale(1.03);
    background-color: var(--color-midnight-700);
}

.failure__column--without {
    border: 2px solid var(--color-cb-red);
    box-shadow:
        0 0 40px rgba(193, 0, 0, 0.25),
        0 0 80px rgba(193, 0, 0, 0.08);
}

.failure__column--without:hover {
    box-shadow:
        0 0 60px rgba(193, 0, 0, 0.45),
        0 0 120px rgba(193, 0, 0, 0.15);
}

.failure__column--with {
    border: 2px solid rgb(16, 185, 129);
    box-shadow:
        0 0 40px rgba(var(--accent-green-rgb), 0.25),
        0 0 80px rgba(var(--accent-green-rgb), 0.08);
}

.failure__column--with:hover {
    box-shadow:
        0 0 60px rgba(var(--accent-green-rgb), 0.45),
        0 0 120px rgba(var(--accent-green-rgb), 0.15);
}

.failure__column-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    margin-block-end: var(--space-6);
    padding-block-end: var(--space-4);
    border-bottom: 1px solid var(--color-midnight-700);
}

.failure__column-header h3 {
    color: var(--color-white);
    font-size: var(--text-lg);
}

.failure__column-header-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.failure__column--without .failure__column-header-icon {
    color: var(--color-cb-red-400);
}

.failure__column--with .failure__column-header-icon {
    color: var(--color-success-600);
}

.failure__item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    transition: background-color var(--duration-fast) var(--ease-default);
}

.failure__item:hover {
    background-color: var(--color-midnight-900);
}

.failure__item-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-block-start: 2px;
}

.failure__item-icon--negative {
    color: var(--color-cb-red-400);
}

.failure__item-icon--positive {
    color: var(--color-success-600);
}

.failure__item-title {
    font-size: var(--text-base);
    color: var(--color-white);
    font-weight: var(--weight-semibold);
    margin-block-end: var(--space-1);
}

.failure__item-desc {
    font-size: var(--text-sm);
    color: var(--color-slate-400);
    line-height: var(--leading-relaxed);
}

/* ===== 7. TESTIMONIALS ===== */
/* Marquee styles moved to _components.css (shared with pricing page).
   Here: how the rows stop, so every quote can be read to its end.
   - Pause (the button under the heading) and keyboard focus on a row hold
     both rows, as hover does.
   - A touch screen (no hover) and reduced motion get no moving rows: each
     row is a strip to swipe or scroll, with one copy of its cards.
   - A row the keyboard has focused becomes that strip too, so the arrow
     keys bring every card into view. */
.testimonials__pause {
    margin-block-start: var(--space-6);
}

.marquee.is-paused .marquee__row,
.marquee:focus-within .marquee__row {
    animation-play-state: paused;
}

/* The focus ring is drawn inside the row, which spans the screen. */
.marquee__row:focus-visible {
    outline-offset: -3px;
}

/* While it moves, a row is as wide as its two sets of cards and
   .testimonials clips what is off the screen, so holding it still is not
   enough for a keyboard: the focused row becomes the scrolling strip below
   (one set of cards, from the first). Its block padding leaves room for
   the cards' glow and is taken back by an equal negative margin, so
   nothing under it moves; the edge fades step aside. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .marquee__row:focus-visible {
        width: auto;
        margin-block: calc(-1 * var(--space-6));
        padding: var(--space-6) var(--space-4);
        overflow-x: auto;
        scroll-snap-type: x proximity;
        scroll-padding-inline: var(--space-4);
        animation: none;
    }

    .marquee__row:focus-visible .marquee__track {
        padding-inline-end: 0;
    }

    .marquee__row:focus-visible .marquee__track[aria-hidden="true"],
    .marquee__row:focus-visible ~ .marquee__fade {
        display: none;
    }

    .marquee__row:focus-visible .marquee__card {
        scroll-snap-align: start;
    }
}

@media (hover: none), (prefers-reduced-motion: reduce) {
    .testimonials__pause {
        display: none;
    }

    .marquee {
        gap: 0;
    }

    /* The block padding leaves room for the cards' glow, which the
       scrolling row would otherwise cut off at its edge. */
    .marquee__row {
        width: auto;
        padding: var(--space-6) var(--space-4);
        overflow-x: auto;
        scroll-snap-type: x proximity;
        scroll-padding-inline: var(--space-4);
        animation: none;
    }

    .marquee__track {
        padding-inline-end: 0;
    }

    .marquee__track[aria-hidden="true"],
    .marquee__fade {
        display: none;
    }

    .marquee__card {
        scroll-snap-align: start;
    }
}

/* ===== 8. COURSE CATEGORIES — 3D Flip Cards ===== */

.featured-courses {
    padding-block: 6rem;
    background-color: var(--color-midnight-950);
}

/* ── Grid (3×2 desktop, 2-col tablet, 1-col mobile) ── */
.courses__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
}

@media (max-width: 64em) {
    .courses__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 30em) {
    .courses__grid {
        grid-template-columns: 1fr;
    }
}

/* ── Card wrapper (perspective) ── */
/* 400 px: the front holds the card's link as well as its count and hint. */
.courses__card-wrap {
    --cc: 68, 120, 204; /* fallback, overridden by inline style */
    /* The category colour as text and as the link's fill: 40% of it in
       white, as on the course tiles. 5:1 or better on the card whatever
       colour staff pick (the raw colour was 2.28:1 for red). */
    --cc-text: color-mix(in srgb, rgb(var(--cc)) 40%, var(--color-white));
    perspective: 1000px;
    min-height: 400px;
}

/* ── Card (3D flip container) ── */
.courses__card {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 400px;
    transform-style: preserve-3d;
    transition: transform var(--duration-slow) ease;
}

/* The card turns for a pointer over it and for a tap (storybrand.js). */
.courses__card-wrap:hover .courses__card,
.courses__card-wrap.is-flipped .courses__card {
    transform: rotateY(180deg);
}

/* And when the keyboard reaches the link on its back, so focus is never on
   a face turned away; the link on the front keeps the front showing. Its
   own rule: a browser without :has() would drop the whole list above. */
.courses__card-wrap:has(.courses__card-back :focus-visible) .courses__card {
    transform: rotateY(180deg);
}

/* ── Shared face styles ── */
.courses__card-front,
.courses__card-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: var(--radius-lg);
    background-color: var(--color-midnight-800);
    border: 2px solid rgb(var(--cc));
    box-shadow:
        0 0 40px rgba(var(--cc), 0.25),
        0 0 80px rgba(var(--cc), 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-6);
    transition: box-shadow var(--duration-slow) ease;
}

.courses__card-wrap:hover .courses__card-front,
.courses__card-wrap:hover .courses__card-back {
    box-shadow:
        0 0 60px rgba(var(--cc), 0.45),
        0 0 120px rgba(var(--cc), 0.15);
}

/* ── FRONT FACE ── */
.courses__card-front {
    text-align: center;
    justify-content: center;
    gap: var(--space-3);
}

/* Icon ring — large, glowing, pulsing */
.courses__card-icon-ring {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-full);
    border: 2px solid rgb(var(--cc));
    display: flex;
    align-items: center;
    justify-content: center;
    /* The icon takes the card's text tint (the raw colour was 2.28:1 for
       red, under 3:1 for a graphic). The ring around it is decoration and
       keeps the category colour, as the card's own border does. */
    color: var(--cc-text);
    box-shadow:
        0 0 30px rgba(var(--cc), 0.35),
        0 0 60px rgba(var(--cc), 0.12);
    margin-block-end: var(--space-3);
    /* @keyframes icon-pulse is in _components.css (ICON RING) */
    animation: icon-pulse 3s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .courses__card-icon-ring {
        animation: none;
    }
}

/* Category title */
.courses__card-title {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    color: var(--color-white);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-tight);
    letter-spacing: -0.01em;
}

/* Tagline */
.courses__card-tagline {
    font-size: var(--text-sm);
    color: var(--color-slate-400);
    line-height: var(--leading-relaxed);
    max-width: 22ch;
}

/* Course count */
.courses__card-count {
    display: flex;
    align-items: baseline;
    gap: var(--space-2);
    margin-block-start: var(--space-2);
}

.courses__card-count-number {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: var(--weight-semibold);
    color: var(--cc-text);
    line-height: 1;
}

.courses__card-count-label {
    font-size: var(--text-sm);
    color: var(--text-muted);
    font-weight: var(--weight-medium);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Hint text */
.courses__card-hint {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-block-start: auto;
}

.courses__card-hint svg {
    color: rgba(var(--cc), 0.6);
}

/* The front says how to turn the card: by hover, or on a touch screen by
   a tap. The back's way home shows on touch only. */
.courses__card-hint--back,
.courses__card-hint-touch {
    display: none;
}

/* On the front the link sits above the hint, both at the foot. */
.courses__card-front .courses__card-enroll + .courses__card-hint {
    margin-block-start: 0;
}

/* ── BACK FACE ── */
.courses__card-back {
    transform: rotateY(180deg);
    text-align: left;
    align-items: flex-start;
    justify-content: center;
    gap: var(--space-3);
    background-color: var(--color-midnight-900);
}

.courses__card-back-title {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    color: var(--cc-text);
    font-weight: var(--weight-semibold);
    letter-spacing: -0.01em;
}

.courses__card-back-desc {
    font-size: var(--text-sm);
    color: var(--color-slate-400);
    line-height: var(--leading-relaxed);
}

/* Topic list */
.courses__card-topics {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    width: 100%;
}

.courses__card-topics li {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-slate-300);
}

.courses__card-topics svg {
    color: rgb(var(--cc));
    flex-shrink: 0;
}

/* Browse button */
.courses__card-enroll {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-md);
    /* Dark text on the light mix: 6.5:1 or better for any category colour
       (white on the raw colour was 2.15:1 for gold). */
    background-color: var(--cc-text);
    border: 1px solid var(--cc-text);
    color: var(--color-midnight-950);
    font-family: inherit;
    font-weight: var(--weight-semibold);
    font-size: var(--text-sm);
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--duration-normal) ease, box-shadow var(--duration-normal) ease, filter var(--duration-normal) ease;
    margin-block-start: auto;
}

.courses__card-enroll:hover {
    background-color: var(--cc-text);
    box-shadow: 0 0 24px rgba(var(--cc), 0.5);
    filter: brightness(1.15);
}

/* ── Touch devices: "Tap for Topics" on the front, the back hint shown ── */
@media (hover: none) {
    .courses__card-hint-hover {
        display: none;
    }

    .courses__card-hint-touch {
        display: inline;
    }

    .courses__card-hint--back {
        display: flex;
    }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .courses__card {
        transition: none;
    }
}

/* ── Featured CE course tiles (below the flip cards) ── */
.featured-courses__tiles {
    margin-block-start: var(--space-16);
}

.featured-courses__tiles-title {
    margin-block-end: var(--space-8);
    text-align: center;
    color: var(--color-white);
}

/* ===== COURSE TILE GRID (program and CE course tiles) ===== */
/* Same 3 / 2 / 1 columns as the flip cards */
.tiles__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
}

@media (max-width: 64em) {
    .tiles__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 30em) {
    .tiles__grid {
        grid-template-columns: 1fr;
    }
}

/* ===== 9. CTA SECTION ===== */
/* CTA styles moved to _components.css (shared across pages) */


/* ===== SECTION BLENDING ===== */
/* Smooth gradient transitions between alternating 950/900 backgrounds.
   Each section names the background of the section below it:
   data-blend="900" fades its bottom edge into midnight-900 (--surface-dark),
   data-blend="950" into midnight-950. */

[data-blend] {
    position: relative;
}

/* → 900: bottom fades into lighter */
[data-blend="900"]::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, transparent, var(--surface-dark));
    pointer-events: none;
    z-index: 0;
}

/* → 950: bottom fades into darker (the shared CTA always sits above the
   950 footer) */
[data-blend="950"]::after,
.story .cta-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, transparent, var(--color-midnight-950));
    pointer-events: none;
    z-index: 0;
}

/* Sections that need position:relative for the blend pseudo-elements */
.problem,
.guide,
.plan,
.success,
.failure,
.testimonials,
.featured-courses {
    position: relative;
}

/* ===== SHARED SECTION STYLES ===== */

.section-header {
    text-align: center;
    margin-block-end: var(--space-16);
    max-width: 48rem;
    margin-inline: auto;
}

.section-header h2 {
    color: var(--color-white);
}

.section-header .subheading {
    display: block;
    text-align: center;
}

/* ===== PROGRAMS GRID (home page, id="programs") ===== */

.programs {
    padding-block: 6rem;
    background-color: var(--surface-dark);
}

.programs__lead,
.formats__lead,
.tiles__lead,
.faq__lead {
    margin: var(--space-4) auto 0;
    max-width: 40rem;
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
    color: var(--color-slate-300);
}

.programs__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
}

@media (max-width: 64em) {
    .programs__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 36em) {
    .programs__grid {
        grid-template-columns: 1fr;
    }
}

/* Two across (36em to 64em): an odd card left over is centred as well.
   Four half-columns, each card spans two, and the last one starts one
   half-column in. */
@media (min-width: 36.0625em) and (max-width: 64em) {
    .programs__grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .programs__grid > * {
        grid-column: span 2;
    }

    .programs__grid > :nth-child(2n + 1):last-child {
        grid-column: 2 / span 2;
    }
}

/* Three across: a last row that is not full is centred, as the format
   cards are (.feature-grid). Six half-columns, each card spans two; two
   cards left over start one half-column in, one left over sits in the
   middle. The CE page's category cards too: a category with no public
   course has no card, so their count varies. */
@media (min-width: 64.0625em) {
    .programs__grid,
    .courses__grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .programs__grid > *,
    .courses__grid > * {
        grid-column: span 2;
    }

    .programs__grid > :nth-child(3n + 1):nth-last-child(2),
    .courses__grid > :nth-child(3n + 1):nth-last-child(2) {
        grid-column: 2 / span 2;
    }

    .programs__grid > :nth-child(3n + 1):last-child,
    .courses__grid > :nth-child(3n + 1):last-child {
        grid-column: 3 / span 2;
    }
}

/* Career path rail above the program cards: three numbered stages joined
   by a dashed connector. Markers run red, purple, blue (the brand
   progression); program links keep their own colours. No gradient lines. */
.pathway {
    --pathway-marker: 3.5rem;
    --pathway-gap: var(--space-8);
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--pathway-gap);
    margin: 0 0 var(--space-16);
    padding: 0;
    list-style: none;
}

.pathway::before {
    content: '';
    position: absolute;
    top: calc(var(--pathway-marker) / 2 - 1px);
    left: calc((100% - 2 * var(--pathway-gap)) / 6);
    right: calc((100% - 2 * var(--pathway-gap)) / 6);
    height: 2px;
    background: repeating-linear-gradient(90deg, var(--color-slate-500) 0 8px, transparent 8px 16px);
}

.pathway__stage {
    --cc: var(--accent-red-rgb);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    text-align: center;
}

.pathway__stage--advanced {
    --cc: var(--accent-purple-rgb);
}

.pathway__stage--recert {
    --cc: var(--accent-blue-rgb);
}

.pathway__marker {
    display: grid;
    place-items: center;
    width: var(--pathway-marker);
    height: var(--pathway-marker);
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: var(--weight-semibold);
    color: var(--color-white);
    background-color: var(--color-midnight-800);
    border: 2px solid rgb(var(--cc));
    border-radius: var(--radius-full);
    box-shadow:
        0 0 30px rgba(var(--cc), 0.35),
        0 0 60px rgba(var(--cc), 0.12);
    animation: icon-pulse 3s ease-in-out infinite;
}

.pathway__title {
    margin: var(--space-2) 0 0;
    font-size: var(--text-xl);
    line-height: var(--leading-tight);
    color: var(--color-white);
}

.pathway__desc {
    max-width: 22rem;
    margin: 0;
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    color: var(--color-slate-300);
}

.pathway__programs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-2) var(--space-5);
    margin: var(--space-1) 0 0;
    padding: 0;
    list-style: none;
}

.pathway__program {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--color-slate-200);
    text-decoration: none;
    text-underline-offset: 4px;
}

.pathway__program:hover,
.pathway__program:focus-visible {
    color: var(--color-white);
    text-decoration: underline;
    text-decoration-color: rgb(var(--cc));
}

.pathway__program:hover .navbar__dot {
    box-shadow: 0 0 14px rgba(var(--cc), 0.9);
}

/* Phones: a vertical path, markers on the left */
@media (max-width: 48em) {
    .pathway {
        --pathway-gap: var(--space-8);
        grid-template-columns: 1fr;
        margin-block-end: var(--space-12);
    }

    /* One dashed segment per gap, from each marker down to the next, so
       the line never runs past the last step. */
    .pathway::before {
        content: none;
    }

    .pathway__stage:not(:last-child)::after {
        content: '';
        position: absolute;
        top: var(--pathway-marker);
        bottom: calc(-1 * var(--pathway-gap));
        left: calc(var(--pathway-marker) / 2 - 1px);
        width: 2px;
        background: repeating-linear-gradient(180deg, var(--color-slate-500) 0 8px, transparent 8px 16px);
    }

    .pathway__stage {
        display: grid;
        grid-template-columns: var(--pathway-marker) 1fr;
        column-gap: var(--space-4);
        row-gap: var(--space-2);
        align-items: start;
        text-align: start;
    }

    .pathway__marker {
        grid-row: 1 / span 3;
    }

    .pathway__title {
        margin-block-start: var(--space-3);
    }

    .pathway__programs {
        justify-content: flex-start;
        row-gap: 0;
    }

    /* Touch: each program link is a 44 px row. */
    .pathway__program {
        min-height: var(--tap-min);
        padding-block: var(--space-2);
    }
}

.program-card {
    --cc-text: color-mix(in srgb, rgb(var(--cc)) 40%, var(--color-white));
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
    height: 100%;
    padding: var(--space-8) var(--space-6) var(--space-6);
    color: inherit;
    text-decoration: none;
}

.program-card:focus-visible {
    outline: 2px solid rgb(var(--cc));
    outline-offset: 4px;
}

.program-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    width: 100%;
}

.program-card .icon-ring {
    width: 64px;
    height: 64px;
}

.program-card .icon-ring svg {
    width: 28px;
    height: 28px;
}

/* Course counter, top right of every card */
.program-card__count {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: end;
}

.program-card__count-value {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: var(--weight-semibold);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: var(--cc-text);
    text-shadow: 0 0 24px rgba(var(--cc), 0.45);
}

.program-card__count-label {
    margin-block-start: var(--space-1);
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--color-slate-300);
}

.program-card__title {
    margin: 0;
    font-size: var(--text-xl);
    line-height: var(--leading-tight);
    color: var(--color-white);
}

.program-card__desc {
    flex-grow: 1;
    max-width: none;
    margin: 0;
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    color: var(--color-slate-300);
}

/* A status line under the description (IBSC: application pending) */
.program-card__note {
    max-width: none;
    margin: calc(var(--space-2) * -1) 0 0;
    font-size: var(--text-xs);
    font-style: italic;
    line-height: var(--leading-relaxed);
    color: var(--cc-text);
}

.feature-card__chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: 0;
    padding: 0;
    list-style: none;
}

.feature-card__chips li {
    padding: 2px var(--space-3);
    font-size: var(--text-xs);
    color: var(--cc-text);
    background: rgba(var(--cc), 0.08);
    border: 1px solid rgba(var(--cc), 0.35);
    border-radius: var(--radius-full);
}

.program-card__footer {
    display: flex;
    align-items: center;
    width: 100%;
    padding-block-start: var(--space-4);
    border-top: 1px solid var(--color-midnight-700);
}

.program-card__more {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    margin-inline-start: auto;
    font-family: var(--font-display);
    font-weight: var(--weight-semibold);
    color: var(--cc-text);
}

.program-card__more svg,
.feature-card__cta svg {
    transition: transform var(--duration-fast) var(--ease-default);
}

.program-card:hover .program-card__more svg,
.feature-card__cta:hover svg {
    transform: translateX(4px);
}

/* 'Not sure where to start?' with two buttons */
.programs__footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    margin-block-start: var(--space-12);
    text-align: center;
}

.programs__prompt {
    margin: 0;
    max-width: none;
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    color: var(--color-slate-200);
}

.programs__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-4);
}

/* ===== FORMATS (where we train: home and program pages) ===== */

.formats {
    padding-block: 6rem;
    background-color: var(--surface-dark);
}

/* Cards wrap and centre, so five formats read 3 + 2 on desktop */
.feature-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-6);
}

.feature-card {
    --cc-text: color-mix(in srgb, rgb(var(--cc)) 40%, var(--color-white));
    flex: 1 1 20rem;
    max-width: 24rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-8) var(--space-6);
    text-align: center;
}

/* Exactly four cards (the AHA page's formats and course options) read 2 + 2
   instead of 3 + 1: a half-width basis leaves room for two per row. */
@media (min-width: 48em) {
    .feature-grid:has(> .feature-card:nth-child(4):last-child) > .feature-card {
        flex-basis: calc(50% - var(--space-6));
        max-width: 30rem;
    }
}

.feature-card .icon-ring {
    margin-block-end: var(--space-2);
}

.feature-card__title {
    margin: 0;
    font-size: var(--text-xl);
    color: var(--color-white);
}

.feature-card__desc {
    max-width: none;
    margin: 0;
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    color: var(--color-slate-300);
}

.feature-card__best {
    max-width: none;
    margin: 0;
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    color: var(--color-slate-400);
}

.feature-card__best-label {
    display: block;
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--cc-text);
}

.feature-card__chips {
    justify-content: center;
}

.feature-card__cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    margin-block-start: auto;
    padding-block-start: var(--space-3);
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--cc-text);
    text-decoration: none;
}

.feature-card__cta:hover {
    color: var(--color-white);
}

/* ===== REQUEST FORM ('Request a Date' / 'Request Training', in the one modal) ===== */

.request-form__intro {
    max-width: none;
    margin: 0 0 var(--space-5);
    font-size: var(--text-sm);
    color: var(--color-slate-300);
}

/* The course a tile preselected ('Request a Date' on a course tile). */
.request-form__course {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--space-2);
    max-width: none;
    margin: calc(-1 * var(--space-2)) 0 var(--space-5);
    padding: var(--space-3) var(--space-4);
    background: rgba(var(--cc), 0.10);
    border: 1px solid rgba(var(--cc), 0.30);
    border-radius: var(--radius-md);
}

.request-form__course-label {
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--color-slate-400);
}

.request-form__course-title {
    font-family: var(--font-display);
    font-weight: var(--weight-semibold);
    color: var(--color-white);
}

.request-form__alert {
    margin-block-end: var(--space-4);
}

.request-form__alert:focus {
    outline: 2px solid var(--color-cb-red-300);
    outline-offset: 2px;
}

.request-form__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.request-form__grid .form-group {
    margin: 0;
}

.request-form__full {
    grid-column: 1 / -1;
}

@media (max-width: 36em) {
    .request-form__grid {
        grid-template-columns: 1fr;
    }
}

.request-form .form-label {
    color: var(--color-slate-300);
}

.request-form .form-error {
    color: var(--color-cb-red-300);
}

/* Honeypot: off-screen for people, still in the form for bots */
.request-form__hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.request-form__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: var(--space-3);
    margin-block-start: var(--space-6);
}

/* Send Request while busy: the spinner takes the arrow's place. */
.request-form .btn.is-busy svg {
    display: none;
}

.request-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    padding-block: var(--space-6);
    text-align: center;
}

.request-success__icon {
    color: var(--accent-green);
}

.request-success__title {
    margin: 0;
    font-size: var(--text-xl);
    color: var(--color-white);
}

.request-success__title:focus {
    outline: none;
}

.request-success__text {
    max-width: none;
    margin: 0 0 var(--space-3);
    color: var(--color-slate-300);
}

/* The address the reply goes to, repeated so a typo is seen; a long one
   wraps inside the panel. */
.request-success__email {
    color: var(--color-white);
    overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: reduce) {
    .program-card__more svg,
    .feature-card__cta svg {
        transition: none;
    }

    .pathway__marker {
        animation: none;
    }
}


/* ===== PROGRAM PAGES (/training/<program>/, programs/program.html) =====
   Hero in the program colour with the next available dates, course tiles
   grouped by category, and the FAQ section. Section backgrounds alternate
   with the neighbours: tiles 950, FAQ 900 (see SECTION BLENDING). */

/* Hero: the left glow takes the page accent instead of CAPCE red. */
.hero--program::after {
    background: radial-gradient(ellipse, rgba(var(--cc), 0.10) 0%, transparent 70%);
}

/* Program badge(s) above the title. Carries .hero__subheading so the hero
   timeline animates it; the pills set their own type. */
.hero__pills {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

/* ── Status note (IBSC: the pending review-course application) ──
   A gold notice at the foot of the hero; stacks on phones. */

.status-note {
    --cc-text: color-mix(in srgb, rgb(var(--cc)) 40%, var(--color-white));
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    max-width: 56rem;
    margin: var(--space-12) auto 0;
    padding: var(--space-6);
}

@media (min-width: 48em) {
    .status-note {
        flex-direction: row;
        align-items: flex-start;
        gap: var(--space-5);
        padding: var(--space-6) var(--space-8);
    }
}

.status-note .icon-ring {
    flex-shrink: 0;
}

.status-note__title {
    margin: 0 0 var(--space-2);
    font-size: var(--text-xl);
    color: var(--color-white);
}

.status-note__text,
.status-note__disclaimer {
    max-width: none;
    margin: 0;
    line-height: var(--leading-relaxed);
}

.status-note__text {
    color: var(--color-slate-300);
}

.status-note__disclaimer {
    margin-block-start: var(--space-3);
    font-size: var(--text-sm);
    color: var(--color-slate-400);
}

.status-note__link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    margin-block-start: var(--space-3);
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--cc-text);
    text-decoration: none;
}

.status-note__link:hover {
    color: var(--color-white);
}

/* ── Hero card: next available dates ── */

.hero-card--dates {
    --cc-text: color-mix(in srgb, rgb(var(--cc)) 40%, var(--color-white));
    max-width: 26rem;
}

.hero-card__dates {
    display: grid;
    gap: var(--space-3);
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Each date is a link to its own row in the course page's date list. */
.hero-card__date-row {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    padding: var(--space-3);
    background-color: var(--color-midnight-900);
    border: 1px solid var(--color-midnight-700);
    border-radius: var(--radius-md);
    color: inherit;
    text-decoration: none;
    transition:
        border-color var(--duration-fast) var(--ease-default),
        background-color var(--duration-fast) var(--ease-default);
}

.hero-card__date-row:hover,
.hero-card__date-row:focus-visible {
    border-color: rgba(var(--cc), 0.75);
    background-color: var(--color-midnight-950);
}

.hero-card__date-arrow {
    flex: none;
    align-self: center;
    margin-inline-start: auto;
    color: var(--cc-text);
}

@media (prefers-reduced-motion: reduce) {
    .hero-card__date-row {
        transition: none;
    }
}

.hero-card__date {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 3.25rem;
    padding-block: var(--space-2);
    background: rgba(var(--cc), 0.12);
    border: 1px solid rgba(var(--cc), 0.35);
    border-radius: var(--radius-md);
}

.hero-card__date-month {
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--cc-text);
}

.hero-card__date-day {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: var(--weight-semibold);
    line-height: 1;
    color: var(--color-white);
}

.hero-card__date-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-1);
    min-width: 0;
}

.hero-card__date-course {
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-snug);
    color: var(--color-white);
}

.hero-card__date-meta {
    font-size: var(--text-sm);
    color: var(--color-slate-400);
}

.hero-card__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    padding-block: var(--space-4);
    text-align: center;
}

.hero-card__empty-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    color: var(--color-white);
}

.hero-card__empty-text {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--color-slate-400);
}

/* ── Course tiles (id="courses") ── */

.tiles {
    padding-block: var(--space-24);
    background-color: var(--color-midnight-950);
    scroll-margin-top: var(--space-24);
}

/* Red eyebrows on these dark sections are red-300: 9.92:1 on midnight-950
   and 9.41:1 on midnight-900 (red-400 is 4.36:1 and 4.13:1). */
.tiles__subheading,
.story .subheading--red {
    color: var(--color-cb-red-300);
}

/* A line under the lead (EMS: the Paramedic status and the link to the CE
   catalog), so the lead itself stays two sentences. */
.tiles__note {
    margin: var(--space-3) auto 0;
    max-width: 40rem;
    line-height: var(--leading-relaxed);
    color: var(--color-slate-400);
}

/* Program course durations run long ('16 hours · 2 days, or hybrid...'),
   so the duration takes its own line and every tile ends with the price on
   the left and the button on the right. */
.tiles .program-tile__meta {
    flex-basis: 100%;
}

.tiles__group + .tiles__group {
    margin-block-start: var(--space-16);
}

.tiles__group-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-block-end: var(--space-6);
}

.tiles__group-title {
    margin: 0;
    font-size: var(--text-2xl);
    color: var(--color-white);
}

.tiles__group-desc {
    max-width: 40rem;
    margin: var(--space-1) 0 0;
    font-size: var(--text-base);
    color: var(--color-slate-400);
}

.tiles__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    max-width: 36rem;
    margin-inline: auto;
    padding: var(--space-10) var(--space-8);
    text-align: center;
    outline: 1px dashed rgba(var(--cc), 0.4);
    outline-offset: -8px;
}

.tiles__empty-title {
    margin: 0;
    font-size: var(--text-xl);
    color: var(--color-white);
}

.tiles__empty-text {
    margin: 0;
    color: var(--color-slate-400);
}

/* ── FAQ ── */

.faq {
    padding-block: var(--space-24);
    background-color: var(--surface-dark);
}


/* ===== COURSE PAGES (/training/<program>/<slug>/, programs/course.html) =====
   Hero with breadcrumbs and a facts row, the overview beside its 'At a
   Glance' card, the date list (id="sessions") and more courses from the
   program. Backgrounds alternate: hero 950, overview 900, dates 950, FAQ
   900, related 950. No gradient strip on any card's top edge. */

/* The breadcrumb trail sits where the hero's top padding was (course pages,
   and the program pages' trail, #137). */
.hero--course,
.hero--crumbs {
    padding-block-start: var(--space-8);
}

.course-hero__crumbs {
    position: relative;
    z-index: 2;
    margin-block-end: var(--space-6);
}

.course-hero__crumbs .breadcrumbs {
    flex-wrap: wrap;
    padding-block: 0;
    color: var(--color-slate-300);
}

.course-hero__crumbs .breadcrumbs a {
    color: var(--color-slate-400);
}

.course-hero__crumbs .breadcrumbs a:hover {
    color: var(--color-white);
}

.course-hero__crumbs .breadcrumbs__separator {
    color: var(--color-midnight-700);
}

/* The Refund and Cancellation Policy link under the hero's buttons, once
   the policy is published (#132). */
.course-hero__policy {
    margin: var(--space-3) 0 0;
    font-size: var(--text-sm);
}

.course-hero__policy a {
    color: var(--color-slate-300);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.course-hero__policy a:hover,
.course-hero__policy a:focus-visible {
    color: var(--color-white);
}

/* Course titles run long ('... (DICO-C) Refresher Course'), so the hero
   title is a step smaller than on the program pages. */
.course-hero__title {
    font-size: clamp(2rem, 4.5vw, 3rem);
}

.hero--course .hero__pills {
    align-items: center;
}

/* Duration, credential and price under the buttons. */
.hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3) var(--space-6);
    margin: var(--space-8) 0 0;
    padding: var(--space-4) 0 0;
    list-style: none;
    border-top: 1px solid var(--color-midnight-800);
}

.hero__meta-item {
    display: inline-flex;
    align-items: flex-start;
    gap: var(--space-2);
    font-size: var(--text-sm);
    line-height: var(--leading-snug);
    color: var(--color-slate-300);
}

.hero__meta-item svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-block-start: 1px;
    color: rgb(var(--cc));
}

/* The price with its card and bank prices and their note (review stop 13c
   v2, components/_price_pair.html): the item takes the row's width on a
   phone, and the note wraps under the prices. */
.hero__meta-item--prices {
    flex: 1 1 16rem;
    min-width: 0;
}

.hero__meta-prices {
    display: grid;
    gap: var(--space-1);
    min-width: 0;
}

/* ── Overview and the 'At a Glance' card ── */

/* clip, not hidden: the aside slides in from the right without widening
   the page, and a clip keeps position: sticky working. */
.course-detail {
    padding-block: var(--space-24);
    background-color: var(--surface-dark);
    overflow-x: clip;
}

.course-detail__layout {
    position: relative;
    z-index: 1;
    display: grid;
    gap: var(--space-10);
}

@media (min-width: 64em) {
    .course-detail__layout {
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
        gap: var(--space-16);
    }

    /* Below the two-row sticky header (_navigation.css ANCHOR OFFSET). */
    .course-detail__aside {
        position: sticky;
        top: calc(var(--space-24) + var(--space-12));
        align-self: start;
    }

    /* The pinned card never runs past the bottom of a short screen, where
       its buttons could not be reached: it takes the room under the header
       and scrolls inside when it holds more. */
    .course-detail__aside .course-glance {
        max-height: calc(100dvh - var(--space-24) - var(--space-12) - var(--space-6));
        overflow-y: auto;
        overscroll-behavior: contain;
    }
}

.course-detail__title {
    margin: 0 0 var(--space-4);
    color: var(--color-white);
}

.course-detail__heading {
    margin: var(--space-10) 0 var(--space-4);
    font-size: var(--text-xl);
    color: var(--color-white);
}

.course-detail__prose p,
.course-detail__text {
    max-width: 65ch;
    margin: 0 0 var(--space-4);
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
    color: var(--color-slate-300);
}

.course-detail__list {
    display: grid;
    gap: var(--space-3);
    margin: 0;
    padding: 0;
    list-style: none;
}

.course-detail__item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    max-width: 65ch;
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: var(--color-slate-300);
}

.course-detail__check {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin-block-start: 1px;
}

.course-detail__check circle {
    fill: rgba(var(--cc), 0.14);
}

.course-detail__check path {
    stroke: rgb(var(--cc));
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Prerequisites: a plain bulleted list in the page accent. */
.course-detail__list--plain .course-detail__item::before {
    content: '';
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    margin-block-start: 0.6em;
    border-radius: var(--radius-full);
    background: rgb(var(--cc));
    box-shadow: 0 0 8px rgba(var(--cc), 0.6);
}

/* Course Instructors: one card per person at the end of the overview,
   photo (or initials) beside name, credentials, job title and bio. One
   column on a phone, as many 18rem columns as fit above. The border and
   glow come from glow-card; no strip on the top edge. */
.instructor-strip {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
    gap: var(--space-4);
    margin: 0;
    padding: 0;
    list-style: none;
}

.instructor-chip {
    --cc-text: color-mix(in srgb, rgb(var(--cc)) 40%, var(--color-white));
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    padding: var(--space-4);
}

@media (min-width: 36em) {
    .instructor-chip {
        padding: var(--space-5);
    }
}

/* The size of .avatar--lg, in the page accent. */
.instructor-chip__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    overflow: hidden;
    border: 2px solid rgba(var(--cc), 0.4);
    border-radius: var(--radius-full);
    background-color: var(--color-midnight-900);
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    color: var(--cc-text);
}

.instructor-chip__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.instructor-chip__text {
    display: grid;
    gap: var(--space-1);
    min-width: 0;
}

/* Name, title and bio each take overflow-wrap: anywhere (the reset gives
   every p break-word), so a long name or a link in a bio wraps rather than
   widening the overview column on a phone. */
.instructor-chip__name {
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-snug);
    color: var(--color-white);
    overflow-wrap: anywhere;
}

.instructor-chip__creds {
    font-weight: var(--weight-regular);
    color: var(--cc-text);
}

.instructor-chip__title {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--color-slate-300);
    overflow-wrap: anywhere;
}

.instructor-chip__bio {
    margin: 0;
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    color: var(--color-slate-400);
    overflow-wrap: anywhere;
}

.course-glance {
    --cc-text: color-mix(in srgb, rgb(var(--cc)) 40%, var(--color-white));
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    padding: var(--space-6);
}

@media (min-width: 36em) {
    .course-glance {
        padding: var(--space-8);
    }
}

.course-glance__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--color-slate-400);
}

.course-glance__credential {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    padding-block-end: var(--space-6);
    border-bottom: 1px solid var(--color-midnight-700);
}

.course-glance__credential .icon-ring {
    flex-shrink: 0;
}

.course-glance__credential-label {
    margin: 0 0 var(--space-1);
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--cc-text);
}

.course-glance__credential-value {
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-snug);
    color: var(--color-white);
}

.course-glance__credential-body {
    margin: var(--space-1) 0 0;
    font-size: var(--text-sm);
    color: var(--color-slate-400);
}

.course-glance__facts {
    display: grid;
    gap: var(--space-4);
    margin: 0;
}

.course-glance__fact {
    display: grid;
    gap: var(--space-1);
}

.course-glance__fact dt {
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--color-slate-400);
}

.course-glance__fact dd {
    margin: 0;
    color: var(--color-slate-200);
}

.course-glance__price {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    color: var(--cc-text);
}

/* The Price fact with its card and bank prices under it (review stop 13c
   v2). */
.course-glance__fact dd > .course-glance__price {
    display: block;
}

.course-glance__fact dd > .price-pair-block {
    margin-block-start: var(--space-2);
}

.course-glance__formats {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: var(--space-1) 0 0;
    padding: 0;
    list-style: none;
}

/* The card's buttons: the next date over the filled button to the dates,
   then the private class request. */
.course-glance__actions {
    display: grid;
    gap: var(--space-3);
}

.course-glance__next {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    max-width: none;
    margin: 0;
    font-size: var(--text-sm);
    color: var(--cc-text);
}

.course-glance__next svg {
    flex: none;
}

.course-glance__cta {
    justify-content: center;
    width: 100%;
}

/* ── Upcoming dates (id="sessions") ── */

.course-dates {
    padding-block: var(--space-24);
    background-color: var(--color-midnight-950);
    scroll-margin-top: var(--space-24);
}

.course-dates .container {
    position: relative;
    z-index: 1;
}

.course-dates__lead {
    margin: var(--space-4) auto 0;
    max-width: 40rem;
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
    color: var(--color-slate-300);
}

.session-list {
    display: grid;
    gap: var(--space-4);
    max-width: 56rem;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

/* A month heading before the first date of each month, in a list that
   runs over several months. */
.session-list__month {
    margin-block-start: var(--space-4);
}

.session-list__month:first-child {
    margin-block-start: 0;
}

.session-list__month-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--color-slate-300);
}

/* Dates in more than one place: a pill per place above the list shows only
   that place's dates. No existing pill is a toggle of this size, so these
   are the list's own, in the page accent (--cc). */
.session-places {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-2);
    max-width: 56rem;
    margin: 0 auto var(--space-8);
}

.session-places__pill {
    min-height: var(--tap-min);
    padding: var(--space-2) var(--space-4);
    border: 1px solid rgba(var(--cc), 0.45);
    border-radius: var(--radius-full);
    background-color: rgba(var(--cc), 0.08);
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--color-slate-200);
    cursor: pointer;
    transition:
        border-color var(--duration-fast) var(--ease-default),
        background-color var(--duration-fast) var(--ease-default),
        color var(--duration-fast) var(--ease-default);
}

/* Phones: one line that scrolls sideways, so several places do not push
   the first date down the screen. */
@media (max-width: 48em) {
    .session-places {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .session-places::-webkit-scrollbar {
        display: none;
    }

    .session-places__pill {
        flex: none;
    }
}

.session-places__pill:hover {
    border-color: rgba(var(--cc), 0.85);
    color: var(--color-white);
}

.session-places__pill.is-active {
    border-color: rgb(var(--cc));
    background-color: rgba(var(--cc), 0.25);
    color: var(--color-white);
}

@media (prefers-reduced-motion: reduce) {
    .session-places__pill {
        transition: none;
    }
}

/* Date | details | price and button. Stacks on phones. */
.session-row {
    --cc-text: color-mix(in srgb, rgb(var(--cc)) 40%, var(--color-white));
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--space-4);
    padding: var(--space-5);
}

@media (min-width: 48em) {
    .session-row {
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: var(--space-6);
        padding: var(--space-5) var(--space-6);
    }
}

/* A row lifts on hover as a course tile does, so it is clickable as one:
   the button is the row's one link and its ::after covers the row. The
   button takes no transform of its own, which would make it the containing
   block of the ::after and shrink it back to the button. */
.session-row--link .session-row__cta,
.session-row--link .session-row__cta:hover,
.session-row--link .session-row__cta:active {
    transform: none;
}

.session-row--link .session-row__cta::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

/* The date a hero card link jumped to stands out from its neighbours. */
.session-row:target {
    background-color: var(--color-midnight-700);
    box-shadow:
        0 0 40px rgba(var(--cc), 0.25),
        0 0 80px rgba(var(--cc), 0.08);
}

.session-row__date {
    display: flex;
    flex-direction: column;
    align-items: center;
    align-self: start;
    width: 3.5rem;
    padding-block: var(--space-2);
    background: rgba(var(--cc), 0.12);
    border: 1px solid rgba(var(--cc), 0.35);
    border-radius: var(--radius-md);
}

.session-row__month {
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--cc-text);
}

.session-row__day {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: var(--weight-semibold);
    line-height: 1;
    color: var(--color-white);
}

.session-row__info {
    display: grid;
    gap: var(--space-1);
    min-width: 0;
}

.session-row__label {
    margin: 0;
    max-width: none;
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-snug);
    color: var(--color-white);
}

/* The place, in the headline beside the session's name. */
.session-row__place {
    color: var(--cc-text);
}

.session-row__when {
    margin: 0;
    max-width: none;
    color: var(--color-slate-300);
}

.session-row__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-1) var(--space-3);
    margin: var(--space-1) 0 0;
    max-width: none;
    font-size: var(--text-sm);
    /* slate-300: 6.97:1 on the row's hover background too. */
    color: var(--color-slate-300);
}

.session-row__pills {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: var(--space-2) 0 0;
}

/* Lab time: the visitor's own booked times in this block. */
.session-row__mine {
    margin: var(--space-2) 0 0;
    max-width: none;
    font-size: var(--text-sm);
    color: var(--color-slate-300);
}

.session-row__mine a {
    color: var(--color-white);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* An unpaid card hold among them: its Pay Now. */
.session-row__mine .session-row__pay {
    font-weight: var(--weight-semibold);
    white-space: nowrap;
}

.session-row__side {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding-block-start: var(--space-4);
    border-top: 1px solid var(--color-midnight-700);
}

@media (min-width: 48em) {
    .session-row__side {
        grid-column: auto;
        flex-direction: column;
        align-items: flex-end;
        padding-block-start: 0;
        border-top: 0;
    }
}

.session-row__price {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    color: var(--cc-text);
    white-space: nowrap;
}

/* The date's price with its card and bank prices (review stop 13c v2):
   under each other at the start of the row on a phone, right-aligned
   beside the button from tablets up. The note shows once under the
   list. */
.session-row__prices {
    display: grid;
    justify-items: start;
    gap: var(--space-1);
    min-width: 0;
}

@media (min-width: 48em) {
    .session-row__prices {
        justify-items: end;
        text-align: end;
    }

    .session-row__prices .price-pair {
        justify-content: flex-end;
    }
}

.session-list__more {
    max-width: 56rem;
    margin: var(--space-6) auto 0;
    text-align: center;
}

.session-list__more-toggle {
    list-style: none;
    cursor: pointer;
}

.session-list__more-toggle::-webkit-details-marker {
    display: none;
}

/* The toggle stays in place (and keeps focus) and reads Show Fewer once
   open. */
.session-list__fewer-label,
.session-list__more[open] .session-list__more-label {
    display: none;
}

.session-list__more[open] .session-list__fewer-label {
    display: inline;
}

.session-list__more[open] > .session-list {
    margin-block-start: var(--space-6);
}

.session-list__more .session-list {
    text-align: start;
}

.course-dates__note {
    max-width: 56rem;
    margin: var(--space-6) auto 0;
    font-size: var(--text-sm);
    text-align: center;
    color: var(--color-slate-400);
}

.course-dates__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    max-width: 48rem;
    margin-inline: auto;
    padding: var(--space-10) var(--space-8);
    text-align: center;
    outline: 1px dashed rgba(var(--cc), 0.4);
    outline-offset: -8px;
}

.course-dates__empty-title {
    margin: 0;
    font-size: var(--text-xl);
    color: var(--color-white);
}

.course-dates__empty-text {
    margin: 0;
    color: var(--color-slate-400);
}

/* ── Before You Enroll and Next Steps (#143) ──
   One row per linked course, in its program's colour (--cc on the link):
   the program's short label, the title and an arrow. */

.course-links {
    display: grid;
    gap: var(--space-3);
    margin: 0;
    padding: 0;
    list-style: none;
}

.course-links__link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border: 1px solid rgba(var(--cc), 0.35);
    border-radius: var(--radius-md);
    background: rgba(var(--cc), 0.06);
    color: var(--color-white);
    text-decoration: none;
    transition:
        border-color var(--duration-normal) var(--ease-default),
        background-color var(--duration-normal) var(--ease-default);
}

.course-links__link:hover,
.course-links__link:focus-visible {
    border-color: rgba(var(--cc), 0.75);
    background: rgba(var(--cc), 0.14);
}

.course-links__program {
    flex: none;
    min-width: 4.5rem;
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: color-mix(in srgb, rgb(var(--cc)) 45%, var(--color-white));
}

.course-links__title {
    flex: 1;
    min-width: 0;
    font-weight: var(--weight-medium);
}

.course-links__arrow {
    flex: none;
    color: color-mix(in srgb, rgb(var(--cc)) 45%, var(--color-white));
    transition: transform var(--duration-normal) var(--ease-default);
}

.course-links__link:hover .course-links__arrow {
    transform: translateX(3px);
}

@media (prefers-reduced-motion: reduce) {
    .course-links__link,
    .course-links__arrow {
        transition: none;
    }
}

/* The Request a Date form in place of the dates (#133): the card is as wide
   as the form's two columns, and the form reads left to right. */
.course-dates__request {
    align-self: stretch;
    margin-block-start: var(--space-2);
    text-align: start;
}

@media (max-width: 36em) {
    .course-dates__empty {
        padding: var(--space-8) var(--space-5);
    }
}

/* ── More courses in the program ── */

.tiles--related .tiles__grid {
    position: relative;
    z-index: 1;
}

.tiles__all {
    position: relative;
    z-index: 1;
    margin: var(--space-10) 0 0;
    max-width: none;
    text-align: center;
}
