/* ============================================================================
   Coach Classroom Page — /c/{slug}/classroom
   Skool-style 3-column week-card grid. Cards click into a per-week detail
   page (sidebar + Bunny player). Locked vs unlocked driven by the viewer's
   content subscription status.
   ============================================================================ */

body.coach-classroom-page {
    background: var(--bg-base);
    color: var(--text-primary);
    margin: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.cc-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 4rem;
}

/* ---------- Hero strip ---------- */

.cc-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    padding-bottom: 1.25rem;
    margin-bottom: 1.75rem;
    border-bottom: 1px solid var(--border-subtle);
    flex-wrap: wrap;
}
.cc-hero__inner { min-width: 0; flex: 1; }
.cc-hero__back {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    text-decoration: none;
    display: inline-block;
    margin-bottom: 0.5rem;
}
@media (hover: hover) and (pointer: fine) {
    .cc-hero__back:hover { color: var(--accent-text); }
}
.cc-hero__title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    margin: 0 0 0.375rem;
    line-height: 1.2;
}
.cc-hero__suffix { color: var(--text-tertiary); font-weight: 500; }
.cc-hero__sub {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin: 0;
}
.cc-hero__cta {
    background: var(--accent);
    color: var(--text-on-accent);
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
    white-space: nowrap;
}
@media (hover: hover) and (pointer: fine) {
    .cc-hero__cta:hover { background: var(--accent-hover); }
}
.cc-hero__cta:focus-visible {
    outline: 2px solid var(--accent-text);
    outline-offset: 2px;
}

/* ---------- Next live call ---------- */
/* Populated entirely by coach-classroom-livecall.js (window.CCLiveCall);
   stays `hidden` (no empty shell) when nothing is scheduled — see that
   file's header comment for the wire contract + locked-state rules. */

/* MUST come before the .cc-livecall display rule below and carry !important.
   `[hidden]` (UA sheet) and `.cc-livecall { display:flex }` have the SAME
   specificity (0,1,0), so source order decides — and page CSS always loses to
   nothing and wins over the UA sheet, meaning display:flex would override the
   hidden attribute. The card ships `hidden` and re-hides itself whenever the
   endpoint returns {"call": null} (no call scheduled, or it ended), so without
   this guard a coach with no live call gets a permanently visible EMPTY
   bordered box. Latent while the card lived inside #cgPanelClassroom (the
   panel hid it on other tabs); exposed the moment it moved above the tab strip
   and became visible on every tab — first seen on Ellee's classroom, which has
   no coach_live_calls doc at all. Same class as the in-studio-signup and
   coach-pricing `[hidden]` traps in gotchas-frontend.md. */
.cc-livecall[hidden] { display: none !important; }
.cc-livecall {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1.1rem 1.5rem;
    margin-bottom: 1.75rem;
}
.cc-livecall__body { min-width: 0; }
.cc-livecall__eyebrow {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin: 0 0 0.2rem;
}
.cc-livecall__title {
    font-size: 1.0625rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: var(--text-primary);
}
.cc-livecall__time {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}
/* aria-hidden (visual only — the <time> above carries the accessible
   datetime); ticked in place by coach-classroom-livecall.js, never
   re-rendered — see that file's header comment. */
.cc-livecall__countdown {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin: 0.2rem 0 0;
}
.cc-livecall__join,
.cc-livecall__unlock,
.cc-livecall__upgrade {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
    padding: 0 1.25rem;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    background: var(--accent);
    color: var(--text-on-accent);
    transition: background 0.15s ease;
    flex-shrink: 0;
}
@media (hover: hover) and (pointer: fine) {
    .cc-livecall__join:hover,
    .cc-livecall__unlock:hover,
    .cc-livecall__upgrade:hover { background: var(--accent-hover); }
}
.cc-livecall__join:focus-visible,
.cc-livecall__unlock:focus-visible,
.cc-livecall__upgrade:focus-visible {
    outline: 2px solid var(--accent-text);
    outline-offset: 2px;
}
/* Disabled ("Opens <time>") — the label text itself carries the meaning,
   never relying on color alone. Exempt from the 4.5:1 text-contrast floor
   per WCAG 1.4.3's own "inactive user interface component" exception. */
.cc-livecall__join--disabled {
    background: var(--bg-hover);
    color: var(--text-secondary);
    cursor: not-allowed;
}
.cc-livecall--locked .cc-livecall__unlock-badge,
.cc-livecall--upgrade .cc-livecall__upgrade-badge {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    /* No opacity dimming here — opacity on foreground text caps contrast
       (documented WCAG trap in quality-checks.md); size + case is the
       de-emphasis instead, color stays the full-contrast --text-on-accent. */
}
@media (max-width: 600px) {
    .cc-livecall {
        flex-direction: column;
        align-items: stretch;
    }
    .cc-livecall__join,
    .cc-livecall__unlock,
    .cc-livecall__upgrade { width: 100%; }
}

/* ---------- Card grid ---------- */

.cc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}
@media (max-width: 960px) {
    .cc-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .cc-grid { grid-template-columns: 1fr; }
}

/* Each grid cell is now a wrapper holding the week card + an "Add to your
   schedule" button below it (the card is a <button>, so the add control
   can't nest inside — it's a sibling). Transparent positioning context;
   stacks card over button. */
.cc-card-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}
.cc-card-wrap > .cc-card { width: 100%; }
.cc-card__add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--accent);
    border-radius: 8px;
    color: var(--accent);
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
@media (hover: hover) and (pointer: fine) {
    .cc-card__add:hover {
        background: var(--accent);
        color: var(--text-on-accent);
    }
}
.cc-card__add:focus-visible {
    outline: 2px solid var(--accent-text);
    outline-offset: 2px;
}

.cc-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    text-align: left;
    padding: 0;
    color: inherit;
    font: inherit;
    display: flex;
    flex-direction: column;
    transition: transform 0.15s ease, border-color 0.15s ease;
}
@media (hover: hover) and (pointer: fine) {
    .cc-card:hover {
        border-color: var(--border-medium);
        transform: translateY(-2px);
    }
}
.cc-card:focus-visible {
    outline: 2px solid var(--accent-text);
    outline-offset: 2px;
}

.cc-card__cover {
    position: relative;
    /* Match the source thumbnail dimensions (Greg's Skool covers are 1460×752,
       ~1.94:1) so background-size:cover doesn't crop the green "FOUNDATIONS"
       stencil text on the left/right edges. Forcing 16:9 here clipped ~4%
       from each side.

       Height is set via a padding-ratio (752/1460 = 51.5%), NOT `aspect-ratio`:
       Safari 18.x collapses an `aspect-ratio`'d FLEX ITEM to 0 height inside the
       flex-column `.cc-card` <button>, which made EVERY classroom thumbnail
       vanish (Greg's classroom, 2026-06-08). A padding-top percentage is a
       definite height in every browser and does not depend on flexbox
       aspect-ratio resolution. The rendered height is identical to the old
       aspect-ratio (51.5% of width == 1460:752). Children (lock badge, fallback)
       are absolutely positioned so the 0 content-box height can't hide them. */
    width: 100%;
    height: 0;
    padding-top: 51.5%;
    background: var(--bg-elevated);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

/* Bottom scrim — soften the transition from the busy baked-in thumbnail text
   (e.g. the green "AOC CURRICULUM WEEK N" stencil on a partner's covers) into
   the clean card body below, so our own "Week N" title has a calm edge to sit
   against instead of butting hard against the image. Purely decorative (no text
   sits on it → no WCAG contrast concern); absolutely positioned over the
   padding-ratio cover with pointer-events:none so it never eats the card click.
   Universal + gentle, so Greg's photo covers get the same subtle settling. */
.cc-card__cover::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 42%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
}

.cc-card__cover-fallback {
    /* Shown when no cover_image_url is set on the package. Absolutely
       positioned because the cover's content-box is 0px tall (padding-ratio). */
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--text-tertiary);
    font-size: 0.875rem;
    background: linear-gradient(135deg, #1e1f21 0%, #2a2b2e 100%);
}

.cc-card__lock-badge {
    position: absolute;
    top: 0.625rem;
    right: 0.625rem;
    background: rgba(0, 0, 0, 0.65);
    color: #ffffff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.75rem;
    backdrop-filter: blur(4px);
}

/* Follow Along drip: a locked week that unlocks on a schedule shows its
   CONCRETE unlock date as a pill (padlock + "Unlocks Fri, Jul 12") instead of
   the bare icon, so the wait is a known date rather than an unknown. White on a
   dark scrim clears WCAG AA against the photo cover in both light + dark. */
.cc-card__unlock-badge {
    position: absolute;
    top: 0.625rem;
    right: 0.625rem;
    max-width: calc(100% - 1.25rem);
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.3125rem 0.625rem;
    background: rgba(0, 0, 0, 0.72);
    color: #ffffff;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    /* The label is variable-length: a drip date ("Unlocks Fri, Aug 8", ~146px),
       a tier name ("Premium", ~90px), or Greg's two-plan label ("Follow Along
       or Inner Circle", ~200px — measured at the 280px card width). All fit
       today, but `nowrap` + `max-width` alone would PAINT OUTSIDE the pill on a
       narrower card rather than clip, so clip explicitly. `min-width: 0` on the
       span is required for ellipsis to engage inside a flex container. */
    overflow: hidden;
    backdrop-filter: blur(4px);
}
.cc-card__unlock-badge svg { display: block; flex: none; }
.cc-card__unlock-badge span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cc-card__body {
    /* Tight top padding on purpose: the title is the card's headline and should
       read as a caption BELONGING to the cover above it, not as a separate
       block floating in the body. The scrim on .cc-card__cover::after gives it
       a calm edge to sit against. */
    padding: 0.625rem 1rem 0.875rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.cc-card__title {
    /* Deliberately kept OUT of the cover image. Overlaying it on the artwork
       would read better on Ellee's stencilled covers but puts white text over
       an arbitrary coach-uploaded photo — unverifiable per-coach contrast
       (WCAG 1.4.3). On --bg-card it always clears AA. */
    /* 1.5rem was too heavy in the grid: Greg's week names are long
       ("Week 33: Head-Fighting to Underhooks, Half-Guard Armpit Control, and
       Recovering from Back Mount") and wrapped to 5 lines of 24px bold, so the
       title dwarfed the cover art it was meant to label. 1.125rem keeps a clear
       type hierarchy over .cc-card__meta (0.8125rem) while letting the artwork
       lead. Owner call 2026-07-25. */
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.cc-card__meta {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    display: flex;
    gap: 0.5rem;
}
.cc-card__meta-dot { color: var(--text-quaternary); }

.cc-card__progress {
    background: var(--bg-elevated);
    height: 4px;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 0.25rem;
}
.cc-card__progress-fill {
    height: 100%;
    background: var(--accent-success);
    transition: width 0.3s ease;
}
.cc-card__progress-label {
    font-size: 0.6875rem;
    color: var(--text-tertiary);
    margin-top: 0.125rem;
}

/* Skeleton state */
@keyframes cc-skel-shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: 200px 0; }
}
.cc-card--skeleton {
    cursor: default;
    pointer-events: none;
}
.cc-card--skeleton .cc-card__cover {
    background: linear-gradient(90deg, #1e1f21 0%, #25262a 50%, #1e1f21 100%);
    background-size: 400px 100%;
    animation: cc-skel-shimmer 1.4s ease-in-out infinite;
}
.cc-card__title-skel {
    height: 14px;
    width: 70%;
    background: linear-gradient(90deg, #1e1f21 0%, #25262a 50%, #1e1f21 100%);
    background-size: 400px 100%;
    animation: cc-skel-shimmer 1.4s ease-in-out infinite;
    border-radius: 3px;
}
.cc-card__progress-skel {
    height: 4px;
    width: 40%;
    background: var(--bg-elevated);
    border-radius: 2px;
    margin-top: 0.5rem;
}

/* ---------- Empty / Error states ---------- */

.cc-empty,
.cc-error {
    text-align: center;
    padding: 4rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
}
.cc-empty h2,
.cc-error h2 {
    font-size: 1.25rem;
    margin: 0 0 0.5rem;
}
.cc-empty p,
.cc-error p {
    color: var(--text-secondary);
    margin: 0 0 1.25rem;
}
.cc-error__retry {
    background: var(--accent);
    color: var(--text-on-accent);
    border: none;
    border-radius: 8px;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
    .cc-error__retry:hover { background: var(--accent-hover); }
}

/* ---------- Paywall modal ---------- */

.cc-paywall-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-modal);
    display: grid;
    place-items: center;
    z-index: 200;
    padding: 1.5rem;
}
.cc-paywall-overlay[hidden] { display: none; }

.cc-paywall {
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: 14px;
    padding: 2rem;
    max-width: 420px;
    width: 100%;
    position: relative;
    text-align: center;
}
.cc-paywall__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    font-size: 1.5rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
}
@media (hover: hover) and (pointer: fine) {
    .cc-paywall__close:hover { color: var(--text-primary); background: var(--bg-hover); }
}
.cc-paywall__title {
    font-size: 1.25rem;
    margin: 0 0 0.5rem;
}
.cc-paywall__body {
    color: var(--text-secondary);
    margin: 0 0 1.5rem;
}
.cc-paywall__cta {
    background: var(--accent);
    color: var(--text-on-accent);
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
}
@media (hover: hover) and (pointer: fine) {
    .cc-paywall__cta:hover { background: var(--accent-hover); }
}
.cc-paywall__cta[hidden] { display: none; }

/* Two-tier upgrade preview (Greg paywall — Follow Along / Inner Circle) */
.cc-paywall:has(.cc-paywall__tiers) { max-width: 620px; }
.cc-paywall__tiers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
    margin: 1.1rem 0 0.25rem;
}
@media (max-width: 560px) { .cc-paywall__tiers { grid-template-columns: 1fr; } }
/* Single-tier variant (the live-call upsell — Inner Circle only, because
   Follow Along cannot unlock a live call). The base rule is a 2-up grid, so a
   lone child lands in column 1 and reads as left-aligned rather than centred.
   Collapse to ONE centred track and cap the width so it doesn't stretch the
   full 620px modal into a letterbox. */
.cc-paywall__tiers--single {
    grid-template-columns: minmax(0, 320px);
    justify-content: center;
}
/* The "why am I seeing this" line above the tier — muted via a real token,
   never opacity (opacity on foreground text caps contrast below WCAG, the
   documented trap in quality-checks.md). */
.cc-paywall__reason {
    margin: 0.35rem 0 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.cc-paywall__tier {
    border: 1px solid var(--border-medium);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    text-align: left;
}
.cc-paywall__tier--featured { border-color: var(--accent); }
.cc-paywall__tier-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}
.cc-paywall__tier-name { font-weight: 700; font-size: 1rem; }
.cc-paywall__tier-price { font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.cc-paywall__tier-price s { color: var(--text-tertiary); font-weight: 500; font-size: 0.82em; margin-right: 0.2rem; }
.cc-paywall__tier-price small { color: var(--text-tertiary); font-weight: 500; font-size: 0.68em; }
.cc-paywall__tier-blurb { color: var(--text-secondary); font-size: 0.85rem; line-height: 1.45; margin: 0; flex: 1; }
.cc-paywall__tier-cta {
    background: transparent;
    color: var(--accent-text, var(--accent));
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
}
@media (hover: hover) and (pointer: fine) {
    .cc-paywall__tier-cta:hover { background: var(--accent); color: var(--text-on-accent); }
}
.cc-paywall__tier-cta--primary { background: var(--accent); color: var(--text-on-accent); }
@media (hover: hover) and (pointer: fine) {
    .cc-paywall__tier-cta--primary:hover { background: var(--accent-hover); }
}

/* Per-instructional buy paywall (single-product CTA — greg-access.js
   instructionalPaywallHtml). The primary CTA here is an <a> (progressive-
   enhancement href to the storefront), and anchors are display:inline by
   default — without display:block its width:100% is ignored and its vertical
   padding paints OVER the blurb text instead of pushing it apart (the
   2026-07-23 overlap bug). Everything is scoped under
   .cc-paywall__instructional so the two-tier grid stays byte-identical. */
.cc-paywall__body:has(.cc-paywall__instructional) { margin-bottom: 0; }
.cc-paywall__instructional {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.25rem;
}
.cc-paywall__instructional .cc-paywall__tier-blurb {
    flex: none;
    font-size: 0.9rem;
    text-align: center;
}
.cc-paywall__instructional .cc-paywall__tier-cta {
    display: block;
    text-align: center;
    text-decoration: none;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
}
.cc-paywall__sub-link {
    align-self: center;
    background: transparent;
    border: none;
    color: var(--accent-text, var(--accent));
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    padding: 0.25rem 0.5rem;
}
@media (hover: hover) and (pointer: fine) {
    .cc-paywall__sub-link:hover { color: var(--text-primary); }
}

/* ---------- Topbar links inherit from header.css ---------- */
/* Topbar markup is identical to coach-profile.html so styles cascade
   from styles/components/header.css. No overrides needed here. */


/* ============================================================================
   WEEK DETAIL PAGE — coach-classroom-week.html
   Sidebar of lessons (left, ~280px) + main detail area (right) with title +
   Bunny iframe player + structured body (chips, win-condition lists).
   ============================================================================ */

.ccw-header {
    margin-bottom: 1.25rem;
    padding-bottom: 0.875rem;
    border-bottom: 1px solid var(--border-subtle);
    /* Back link on its own row, then title (left) + Add-to-schedule
       button (right) on the next row. */
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}
.ccw-back {
    flex-basis: 100%;
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    text-decoration: none;
    margin-bottom: 0.375rem;
}
@media (hover: hover) and (pointer: fine) {
    .ccw-back:hover { color: var(--accent-text); }
}
.ccw-week-title {
    font-size: clamp(1.375rem, 2.5vw, 1.75rem);
    font-weight: 700;
    margin: 0;
    line-height: 1.25;
}
/* "Add to your schedule" — week-detail header (primary affordance). */
.ccw-add-schedule {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    background: var(--accent);
    color: var(--text-on-accent);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease;
}
@media (hover: hover) and (pointer: fine) {
    .ccw-add-schedule:hover { background: var(--accent-hover); }
}
.ccw-add-schedule:focus-visible {
    outline: 2px solid var(--accent-text);
    outline-offset: 2px;
}
.ccw-add-schedule[hidden] { display: none; }

/* Skeleton placeholders shown until cache hydration or API fills them.
   Reuse the cc-skel-shimmer keyframes defined above. */
.ccw-skel {
    display: inline-block;
    background: linear-gradient(90deg, #1e1f21 0%, #25262a 50%, #1e1f21 100%);
    background-size: 400px 100%;
    border-radius: 4px;
    animation: cc-skel-shimmer 1.4s ease-in-out infinite;
}
.ccw-skel--title {
    height: 1.6rem;
    width: 280px;
    max-width: 60%;
    vertical-align: middle;
}
.ccw-skel--lesson {
    height: 38px;
    width: 100%;
    margin-bottom: 0.125rem;
    border-radius: 6px;
}
.ccw-skel--lesson-title {
    height: 1.4rem;
    width: 60%;
    vertical-align: middle;
}
.ccw-skel--player {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
}

.ccw-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
    align-items: start;
}
@media (max-width: 768px) {
    .ccw-layout { grid-template-columns: 1fr; }
}

/* ---------- Sidebar of lessons ---------- */
.ccw-lessons {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 0.75rem;
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
}
/* Single-column mobile stack: the lesson list flows ABOVE the detail. A
   sticky sidebar here pins to the viewport top and paints OVER the detail
   scrolling beneath it (a positioned element paints above its static
   siblings) — that was the lesson-title-over-win-condition overlap bug.
   Reset to static flow + drop the inner scroll box so the list sits
   naturally above the lesson detail. MUST come AFTER the base .ccw-lessons
   rule above (same specificity → later wins), NOT in the earlier
   .ccw-layout media block. */
@media (max-width: 768px) {
    .ccw-lessons {
        position: static;
        top: auto;
        max-height: none;
        overflow-y: visible;
    }
}
.ccw-lessons__progress {
    height: 4px;
    background: var(--bg-elevated);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}
.ccw-lessons__progress-fill {
    height: 100%;
    background: var(--accent-success);
    transition: width 0.3s ease;
}
.ccw-lessons__list { display: flex; flex-direction: column; gap: 0.125rem; }
/* Headed groups (a real set_title boundary carrying a portion_title/
   set_title) render as a disclosure <button> — collapsible once a week
   crosses the ~12-lesson / 3+-group shape (see COLLAPSE_LESSON_THRESHOLD
   in coach-classroom-week-render.js). Below that shape every group starts
   expanded, so this reads visually near-identical to the old static
   divider — same font/spacing, plus a subtle chevron. Ungrouped runs
   (empty set_title) still render with NO header at all, unchanged. */
.ccw-lessons__group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    background: transparent;
    border: none;
    font: inherit;
    text-align: left;
    cursor: pointer;
    padding: 0.75rem 0.75rem 0.375rem;
    border-radius: 8px;
}
@media (hover: hover) and (pointer: fine) {
    .ccw-lessons__group-toggle:hover { background: var(--bg-hover); }
}
.ccw-lessons__group-toggle:focus-visible {
    outline: 2px solid var(--accent-text);
    outline-offset: -2px;
}
.ccw-lessons__group-title {
    /* Title Case descriptive portion titles (e.g. "Inside Heel Hook
       Entry Control") — NOT all-caps. The portion_title is already
       stored Title-Cased; do not re-add text-transform:uppercase. */
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
    flex: 1;
    min-width: 0;
}
.ccw-lessons__group-chev {
    flex-shrink: 0;
    font-size: 0.75rem;
    line-height: 1;
    color: var(--text-tertiary);
    transform: rotate(0deg);
    transition: transform 0.15s ease;
}
.ccw-lessons__group-toggle[aria-expanded="false"] .ccw-lessons__group-chev {
    transform: rotate(-90deg);
}
.ccw-lessons__group-count {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
    background: var(--bg-elevated);
    border-radius: 999px;
    padding: 0.125rem 0.5rem;
}

.ccw-lesson {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.625rem 0.75rem;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    text-align: left;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.15s ease;
}
@media (hover: hover) and (pointer: fine) {
    .ccw-lesson:hover { background: var(--bg-hover); }
}
.ccw-lesson:focus-visible { outline: 2px solid var(--accent-text); outline-offset: -2px; }
.ccw-lesson--active {
    background: rgba(245, 158, 11, 0.15);
    color: var(--text-primary);
}
@media (hover: hover) and (pointer: fine) {
    .ccw-lesson--active:hover { background: rgba(245, 158, 11, 0.22); }
}
.ccw-lesson--locked .ccw-lesson__title { color: var(--text-tertiary); }
.ccw-lesson__title { font-size: 0.875rem; flex: 1; line-height: 1.3; }
.ccw-lesson__lock { font-size: 0.875rem; opacity: 0.6; }
/* Leading watched-✓ slot. Fixed basis is ALWAYS rendered (empty when not
   watched) so lesson titles stay left-aligned whether or not the row has a
   ✓. The ✓ glyph shape + the aria-label are the non-color cue (WCAG 2.2
   SC 1.4.1). --accent-success is theme-aware (#10b981 dark / #0F7B3F light)
   and clears WCAG contrast in BOTH themes; --accent-success-bright is NOT
   overridden for light (~2:1 on white) so it must not be used here. */
.ccw-lesson__check {
    flex: 0 0 0.875rem;
    width: 0.875rem;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    color: var(--accent-success);
}

/* ---------- Detail (right column) ---------- */
.ccw-detail {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1.25rem;
}
.ccw-detail[hidden] { display: none; }
.ccw-detail__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 1rem;
    line-height: 1.3;
}
.ccw-detail__player {
    aspect-ratio: 16 / 9;
    background: var(--bg-base);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.25rem;
    position: relative;
}
.ccw-player__iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
.ccw-player--placeholder,
.ccw-player--locked {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #1e1f21 0%, #2a2b2e 100%);
    color: var(--text-secondary);
    flex-direction: column;
    gap: 0.75rem;
}
.ccw-player__msg { padding: 1rem 1.5rem; text-align: center; }
.ccw-player__cta {
    background: var(--accent);
    color: var(--text-on-accent);
    border: none;
    border-radius: 8px;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
    .ccw-player__cta:hover { background: var(--accent-hover); }
}

/* ---------- Inline PDF viewer (a document-only lesson) ----------
   A PDF page is PORTRAIT, so reading one inside the video box's 16/9 slot
   letterboxes it into an unreadable sliver. When the player is holding a
   document, the box switches to a tall document shape instead.

   `aspect-ratio` is deliberately NOT used here (it collapses to 0 height on
   a flex item in Safari 18.x — see the padding-ratio gotcha on the classroom
   cover cards); a viewport-relative height with a fixed floor sizes reliably
   everywhere and is what a reader actually wants on a long guide. */
.ccw-detail__player--doc {
    aspect-ratio: auto;
    height: min(78vh, 900px);
    min-height: 420px;
}
.ccw-player__pdf {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: var(--bg-card);
}
/* Lane B has no client-visible URL — this shell holds the slot while the
   gated endpoint mints a signed one, then is REPLACED by the iframe. It is
   never a permanent spinner: a failure swaps in a short message and the
   Resources row below stays the guaranteed way to open the file. */
.ccw-player--pdf-pending {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    background: var(--bg-card);
    color: var(--text-secondary);
}

/* On a phone a tall in-page PDF frame competes with the page's own scroll,
   and mobile Safari does not render an embedded PDF reliably at all — so
   shrink it to a preview strip. The Resources row is always rendered and
   remains the real open/download path there. */
@media (max-width: 768px) {
    .ccw-detail__player--doc {
        height: min(52vh, 480px);
        min-height: 280px;
    }
}

/* ---------- Structured body ---------- */
.ccw-detail__body {
    display: flex;
    flex-direction: column;
    gap: 1.125rem;
    /* Space the first STARTING POSITION label away from the
       Discuss/Watched button row above it (2026-05-21 user feedback —
       label was sitting right on top of the buttons with no breathing
       room). 1.5rem (~24px) matches the gap between body sections
       below, so the whole stack reads as evenly spaced. */
    margin-top: 1.5rem;
}
.ccw-body__section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.ccw-body__label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
}
.ccw-body__label--win { color: var(--accent-success); }

.ccw-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}
.ccw-chip {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.8125rem;
}

.ccw-wins {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}
.ccw-wins li {
    padding: 0.5rem 0.75rem 0.5rem 2rem;
    background: rgba(16, 185, 129, 0.08);
    border-left: 3px solid var(--accent-success);
    border-radius: 4px;
    font-size: 0.9375rem;
    line-height: 1.5;
    position: relative;
}
.ccw-wins li::before {
    content: "✓";
    position: absolute;
    left: 0.625rem;
    color: var(--accent-success);
    font-weight: 700;
}

.ccw-body__meta {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}
.ccw-body__desc p {
    margin: 0 0 0.75rem;
    line-height: 1.55;
    color: var(--text-secondary);
}
.ccw-body__empty {
    color: var(--text-tertiary);
    font-size: 0.875rem;
    font-style: italic;
}

/* ---------- Downloadable resources (PDFs / external links) ---------- */
.ccw-resource-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
/* Shared by the pdf <button> and the link <a> — same visual treatment so a
   coach can't tell (or need to care) which resource is a download vs a link. */
.ccw-resource {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    width: 100%;
    min-height: 44px; /* touch-target floor */
    box-sizing: border-box;
    padding: 0.625rem 0.875rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
}
@media (hover: hover) and (pointer: fine) {
    .ccw-resource:hover { background: var(--bg-hover); border-color: var(--accent); }
}
/* No opacity dimming on the loading state — opacity caps text contrast
   below WCAG on a dark surface (see gotchas-frontend.md). The "Loading…"
   text swap + aria-busy are the only loading signal. */
.ccw-resource:disabled { cursor: wait; }
.ccw-resource__icon {
    flex-shrink: 0;
    display: flex;
    color: var(--accent);
}
.ccw-resource__title { flex: 1; }
/* "PDF, 519 KB" — a SIBLING of __title, not nested inside it, so a selector
   reading the title element gets the title and nothing else. De-emphasized
   with a real color token + weight, never `opacity` (opacity composites the
   foreground into the surface before WCAG measures it and silently fails
   SC 1.4.3 on a dark card). The full "Download {title}, PDF, 519 KB" string
   lives on the control's aria-label, so this is decorative for AT. */
.ccw-resource__meta {
    flex-shrink: 0;
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 0.875rem;
}

/* ============================================================================
   Phase C — Classroom + Discussion as one surface (Skool "3 C's" model)
   Reuses the EXACT .cg-tabs / .cg-tab / .cg-panel[data-active] / [data-tab]
   markup the community-discussions module's selectors depend on
   (community-discussions/index.js showPanel/applyTierGate/bindTabClicks).
   Restyle only — never rename these classes.
   ============================================================================ */

/* Program sub-tabs — Foundations | All Levels | Instructionals.
   Pill-style, distinct from the underline .cg-tabs peer strip above so the
   two tab levels read as a hierarchy. */
.cc-subtabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 auto 1.25rem;
    max-width: 1280px;
    padding: 0 1rem;
}
.cc-subtabs[hidden],
.cc-subtab[hidden] { display: none !important; }
.cc-subtab {
    appearance: none;
    background: var(--bg-card, rgba(255,255,255,0.04));
    border: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
    border-radius: 999px;
    color: var(--text-secondary);
    cursor: pointer;
    font: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    padding: 0.4rem 1rem;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
@media (hover: hover) and (pointer: fine) {
    .cc-subtab:hover { color: var(--text-primary); }
}
.cc-subtab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cc-subtab--active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text-on-accent, #fff);
}

/* Peer tab strip — Classroom | Discussion */
.cg-tabs {
    display: flex;
    gap: 0.25rem;
    margin: 0 auto 1.5rem;
    max-width: 1280px;
    padding: 0 1rem;
    border-bottom: 1px solid var(--border-subtle);
}
.cg-tab {
    appearance: none;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.75rem 1rem;
    margin-bottom: -1px;
    text-decoration: none;
    transition: color 0.15s ease, border-color 0.15s ease;
}
/* The `hidden` attribute's UA `display:none` is overridden by the
   `.cg-tabs { display:flex }` author rule above — restore it so the
   strip actually hides on non-Greg classrooms (revealDiscussionTab
   never fires there). Same guard for an individually-hidden tab. */
.cg-tabs[hidden],
.cg-tab[hidden] { display: none !important; }

@media (hover: hover) and (pointer: fine) {
    .cg-tab:hover { color: var(--text-primary); }
}
.cg-tab:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}
.cg-tab--active,
.cg-tab[aria-selected="true"] {
    color: var(--text-primary);
    border-bottom-color: var(--accent);
}

/* Panel show/hide — module's showPanel() sets data-active="true" on the
   active [data-panel] and strips it from the rest. */
.cg-panel { display: none; }
.cg-panel[data-active="true"] { display: block; }

/* ---- Hard-paywall teaser feed (consumed by community-discussions/feed.js
   when PaginatedPosts.is_teaser === true) ----
   The post BODY is replaced by a blurred skeleton — feed.js never emits
   real body text for a teaser card (server-side omitted, Phase A), so this
   is a visual treatment over placeholder text, not a CSS lock over real
   data. Title + author render unblurred (the hook). */
.cd-card__body--blurred {
    filter: blur(6px);
    user-select: none;
    pointer-events: none;
}
.cd-card__body--blurred,
.cd-teaser-skel {
    /* placeholder lines so the blur has shape even with no text */
    --skel: var(--bg-hover);
}
.cd-teaser-skel {
    height: 0.75rem;
    border-radius: 4px;
    background: var(--bg-hover);
    margin: 0.5rem 0;
}
.cd-teaser-skel--short { width: 55%; }

/* Cut-line "Unlock" CTA — anchored where bodies would begin, carries
   social proof (member/activity count). Real <button>, WCAG-compliant
   contrast (accent text on accent bg — NOT dimmed). */
.cd-paywall-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    margin: 1.5rem auto;
    max-width: 560px;
    padding: 1.5rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    border-radius: 12px;
}
.cd-paywall-cta__proof {
    color: var(--text-secondary);
    font-size: 0.875rem;
}
.cd-paywall-cta__btn {
    appearance: none;
    border: none;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    background: var(--accent);
    color: var(--text-on-accent);
}
@media (hover: hover) and (pointer: fine) {
    .cd-paywall-cta__btn:hover { background: var(--accent-hover); }
}
.cd-paywall-cta__btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* C.5 note: NO greyed-locked-week CSS here. coach-classroom-render.js
   already renders locked weeks as visible greyed cards (.cc-card--locked
   + the original .cc-card__lock-badge at the top of this file) with
   click→paywall — the classroom-side "teaser" was already implemented.
   A speculative .cc-card--locked-teaser / duplicate .cc-card__lock-badge
   block was removed to avoid a cascade conflict with line ~134. The
   novel hard-paywall treatment is the DISCUSSION blur above, not the
   classroom grid. */

/* ============================================================================
   Discuss + Composer (moved from community-discussions.css on 2026-05-21)
   ============================================================================
   Lives here, NOT in community-discussions.css, because that file is lazy-
   loaded only on coach-classroom.html — but the Discuss button also mounts
   on coach-classroom-week.html, where the lazy CSS never fires. Without
   this move the button rendered unstyled on the week page (icon stacked
   above label, no border). coach-classroom.css is statically loaded on
   BOTH host pages so the button looks right everywhere.

   The button mounts as a SIBLING of #ccwPlayer (never a child — the
   player container is aspect-ratio + overflow:hidden which clips an
   injected child invisibly, same gotcha class as greg-video-complete).
   Sits NEXT TO the .gvc-mark Watched badge — margin-right is the
   horizontal gap to that sibling (they don't share a flex parent, so
   `gap` on a wrapper isn't an option).
*/
.ccw-discuss-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 14px 16px 0 0;
    padding: 9px 16px;
    background: var(--bg-card, #1e293b);
    border: 1px solid var(--accent, #3b82f6);
    border-radius: 8px;
    color: var(--accent, #3b82f6);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
    /* Min tap target — Apple HIG 44pt iOS / WCAG 2.5.5 AAA */
    min-height: 36px;
}
@media (hover: hover) and (pointer: fine) {
    .ccw-discuss-btn:hover {
        background: var(--accent, #3b82f6);
        color: var(--text-on-accent, #fff);
        border-color: var(--accent, #3b82f6);
    }
}
.ccw-discuss-btn:active { transform: translateY(1px); }
.ccw-discuss-btn:focus-visible {
    outline: 2px solid var(--accent, #3b82f6);
    outline-offset: 2px;
}
.ccw-discuss-btn__icon {
    display: inline-flex;
    align-items: center;
}
.ccw-discuss-btn__icon svg {
    /* The svg already declares width/height=16 — this guard handles
       parent stylesheets that try to force a different size. */
    width: 16px;
    height: 16px;
}

/* "Discuss again" state — coach has already posted at least one video
   comment on this game. Check glyph rendered before the bubble icon in
   --accent-success (the theme-aware token that clears WCAG 4.5:1 in
   both themes — NEVER --accent-success-bright per documented contrast
   rule). Button shape unchanged so the row reads as the same affordance,
   just with the "you've done this" cue. */
.ccw-discuss-btn__check {
    display: inline-flex;
    align-items: center;
    color: var(--accent-success);
    margin-right: -2px; /* tighten against the bubble icon */
}
.ccw-discuss-btn__check svg {
    width: 14px;
    height: 14px;
}
@media (hover: hover) and (pointer: fine) {
    .ccw-discuss-btn--discussed:hover .ccw-discuss-btn__check {
        /* The button hover flips text + icon to white-on-accent; flip the
           check too so it stays readable + visually unified. */
        color: var(--text-on-accent, #fff);
    }
}

/* Persistent "Your comments on this video" section — rendered under the
   Discuss button at attach() time (no click needed). Each row is a
   clickable body (opens the full thread on the Discussion tab) + an
   Edit button (inline editor). 2026-05-21. */
.ccw-my-comments {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ccw-my-comments__heading {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-tertiary, #94a3b8);
}
.ccw-my-comment {
    display: flex;
    align-items: stretch;
    gap: 8px;
    background: var(--bg-elevated, rgba(255, 255, 255, 0.03));
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.06));
    border-radius: 8px;
    overflow: hidden;
}
/* The body is a button so the whole comment is keyboard-activatable —
   click/Enter opens the thread. Reset button chrome to read as text. */
.ccw-my-comment__open {
    flex: 1;
    min-width: 0;
    text-align: left;
    background: none;
    border: 0;
    padding: 10px 12px;
    cursor: pointer;
    font: inherit;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: background 0.12s ease;
}
@media (hover: hover) and (pointer: fine) {
    .ccw-my-comment__open:hover {
        background: var(--bg-hover, rgba(255, 255, 255, 0.04));
    }
}
.ccw-my-comment__open:focus-visible {
    outline: 2px solid var(--accent, #3b82f6);
    outline-offset: -2px;
}
.ccw-my-comment__body {
    font-size: 13px;
    color: var(--text-secondary, #cbd5e1);
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.45;
}
.ccw-my-comment__meta {
    font-size: 11px;
    color: var(--accent, #3b82f6);
}
.ccw-my-comment__row-actions {
    flex: 0 0 auto;
    align-self: flex-start;
    display: flex;
    gap: 6px;
    margin: 8px 8px 0 0;
}
.ccw-my-comment__edit,
.ccw-my-comment__delete {
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary, #94a3b8);
    background: none;
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
    border-radius: 6px;
    cursor: pointer;
    transition: color 0.12s ease, border-color 0.12s ease;
}
@media (hover: hover) and (pointer: fine) {
    .ccw-my-comment__edit:hover {
        color: var(--accent, #3b82f6);
        border-color: var(--accent, #3b82f6);
    }
}
@media (hover: hover) and (pointer: fine) {
    .ccw-my-comment__delete:hover {
        color: var(--accent-danger, #ef4444);
        border-color: var(--accent-danger, #ef4444);
    }
}
/* Inline editor — replaces the read view while editing. */
.ccw-my-comment__editor {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ccw-my-comment__textarea {
    width: 100%;
    min-height: 70px;
    padding: 8px 10px;
    background: var(--bg-input, rgba(0, 0, 0, 0.25));
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
    border-radius: 6px;
    color: var(--text-primary, #f1f5f9);
    font: inherit;
    font-size: 13px;
    resize: vertical;
}
.ccw-my-comment__editor-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}
.ccw-my-comment__cancel,
.ccw-my-comment__save {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
    background: transparent;
    color: var(--text-secondary, #94a3b8);
}
.ccw-my-comment__save {
    background: var(--accent, #3b82f6);
    color: var(--text-on-accent, #fff);
    border-color: transparent;
}
.ccw-my-comment__save:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Inline composer that opens under the Discuss button on click. */
.ccw-discuss-composer {
    margin-top: 8px;
    padding: 12px;
    background: var(--bg-card, #1e293b);
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ccw-discuss-composer[hidden] { display: none; }
.ccw-discuss-composer__textarea {
    width: 100%;
    min-height: 80px;
    padding: 8px 10px;
    background: var(--bg-input, rgba(0, 0, 0, 0.25));
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
    border-radius: 6px;
    color: var(--text-primary, #f1f5f9);
    font: inherit;
    font-size: 14px;
    resize: vertical;
}
.ccw-discuss-composer__actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}
.ccw-discuss-composer__submit,
.ccw-discuss-composer__cancel {
    appearance: none;
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
    background: transparent;
    color: var(--text-secondary, #94a3b8);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}
.ccw-discuss-composer__submit {
    background: var(--accent, #1d4ed8);
    color: var(--text-on-accent, #fff);
    border-color: transparent;
}
.ccw-discuss-composer__submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================================
   Start Here tab (.csh-*) — admin-preview free-tier front door.
   Click-to-load YouTube facades: thumbnail + play button until
   clicked, then the nocookie iframe fills the same media box.
   ============================================================ */
.csh { max-width: 880px; margin: 0 auto; padding: 8px 0 32px; }
.csh-intro { margin: 8px 0 20px; }
.csh-intro__title { margin: 0 0 6px; font-size: 1.35rem; color: var(--text-primary); }
.csh-intro__sub { margin: 0; color: var(--text-secondary); max-width: 60ch; }
.csh-grid { display: flex; flex-direction: column; gap: 20px; }
.csh-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    overflow: hidden;
}
/* Padding-ratio media box (NEVER aspect-ratio — Safari 18.x flex collapse). */
.csh-card__media {
    position: relative;
    width: 100%;
    height: 0;
    padding-top: 56.25%; /* 16:9 */
    background: #000;
}
.csh-card__media img,
.csh-card__iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 0;
}
/* YouTube-style play button: red rounded-rect SVG, dimmed until hover —
   mirrors YouTube's own embed facade so the card reads as a standard player. */
.csh-card__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(212, 28, 28, 0.92); /* visible at rest like YouTube's embed; full red on hover */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.15s ease;
}
.csh-card__play:focus-visible { color: #f00; }

@media (hover: hover) and (pointer: fine) {
    .csh-card:hover .csh-card__play,
    .csh-card__play:hover { color: #f00; }
}
.csh-card__play:focus-visible { outline: 3px solid #fff; outline-offset: 2px; border-radius: 10px; }
.csh-card__body { padding: 14px 16px 16px; }
.csh-card__step {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent-text);
    margin-bottom: 4px;
}
.csh-card__title { margin: 0 0 6px; font-size: 1.05rem; color: var(--text-primary); }
.csh-card__blurb { margin: 0; color: var(--text-secondary); line-height: 1.5; }

/* ============================================================
   Challenge tab (.cch-*) — the Rounds Club constraint-of-the-week.
   ============================================================ */
.cch { max-width: 720px; margin: 0 auto; padding: 8px 0 32px; }
.cch-intro { margin: 8px 0 20px; }
.cch-intro__title { margin: 0 0 6px; font-size: 1.35rem; color: var(--text-primary); }
.cch-intro__sub { margin: 0; color: var(--text-secondary); max-width: 60ch; }
.cch-theme {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--accent);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 20px;
}
.cch-theme__label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent-text);
    margin-bottom: 4px;
}
.cch-theme__name { margin: 0 0 8px; font-size: 1.3rem; color: var(--text-primary); }
.cch-theme__what { margin: 0 0 8px; color: var(--text-primary); font-weight: 500; }
.cch-theme__effect { margin: 0 0 10px; color: var(--text-secondary); line-height: 1.55; }
.cch-theme__example { margin: 0; color: var(--text-secondary); line-height: 1.55; }
.cch-theme__example strong { color: var(--text-primary); }
.cch-steps {
    margin: 0 0 20px;
    padding-left: 22px;
    color: var(--text-secondary);
    line-height: 1.6;
}
.cch-steps li { margin-bottom: 8px; }
.cch-steps strong { color: var(--text-primary); }
.cch-cta {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 22px;
    border: 0;
    border-radius: 8px;
    background: var(--accent);
    color: var(--text-on-accent);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
    .cch-cta:hover { filter: brightness(1.1); }
}
.cch-cta:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 2px; }
.cch-next { margin: 16px 0 0; color: var(--text-tertiary); font-size: 0.9rem; }
.cch-next strong { color: var(--text-secondary); }

/* ── Lesson search (CCSearch, 2026-06-12) ───────────────────────────────── */
.cc-search { margin: 0 0 1rem 0; }
.cc-search__input {
    width: 100%;
    max-width: 520px;
    padding: 10px 14px;
    font-size: 0.9rem;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
}
.cc-search__input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}
.cc-search__facets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 0.625rem;
}
.cc-facet-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
@media (hover: hover) and (pointer: fine) {
    .cc-facet-chip:hover { border-color: var(--accent); color: var(--text-primary); }
}
.cc-facet-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cc-facet-chip.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text-on-accent, #fff);
}
/* Size-only de-emphasis — never opacity on foreground text (WCAG trap). */
.cc-facet-chip__count { font-size: 0.7rem; }
.cc-search__results {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 0.75rem;
}
.cc-search__count {
    font-size: 0.78rem;
    color: var(--text-tertiary);
}
.cc-search__empty {
    padding: 1rem 0.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}
.cc-search-result {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 44px; /* touch-target floor */
    padding: 10px 14px;
    text-align: left;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s ease;
}
@media (hover: hover) and (pointer: fine) {
    .cc-search-result:hover { border-color: var(--accent); }
}
.cc-search-result:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.cc-search-result__name { font-weight: 600; font-size: 0.875rem; }
.cc-search-result__meta {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-left: auto;
    text-align: right;
    flex-shrink: 0;
}
/* Locked rows stay readable (explicit muted tokens, NOT opacity) — the row
   is still a real, focusable button that opens the paywall. */
.cc-search-result--locked .cc-search-result__name { color: var(--text-secondary); }
.cc-search-result__lock { flex-shrink: 0; font-size: 0.8rem; }
.cc-search__more {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    padding: 4px 2px;
}

/* Game Lab (admin-only AI): "↵ Ask Game Lab" hint under the input + the AI
   answer paragraph above the returned game cards. The hint reuses the accent
   token; foreground stays a real color (never opacity) to clear WCAG. */
.cc-gamelab-hint {
    margin-top: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent);
}
.cc-gamelab__answer {
    padding: 10px 14px;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-secondary);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    white-space: pre-wrap;
}

/* Challenge tab v2: video placeholder + labeled sections + spaced loop. */
.cch-theme { margin-bottom: 16px; }
.cch-video {
    position: relative;
    width: 100%;
    height: 0;
    padding-top: 42%;
    border: 1px dashed var(--border-subtle);
    border-radius: 12px;
    background: var(--bg-elevated);
    margin-bottom: 20px;
    overflow: hidden;
}
.cch-video svg {
    position: absolute;
    top: calc(50% - 30px);
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-tertiary);
}
.cch-video__title {
    position: absolute;
    top: calc(50% + 14px);
    left: 0;
    right: 0;
    text-align: center;
    color: var(--text-primary);
    font-weight: 600;
}
.cch-video__badge {
    position: absolute;
    top: calc(50% + 40px);
    left: 0;
    right: 0;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.cch-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 4px 20px;
    margin-bottom: 24px;
}
.cch-sec { padding: 14px 0; }
.cch-sec + .cch-sec { border-top: 1px solid var(--border-subtle); }
.cch-sec__label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent-text);
    margin-bottom: 6px;
}
.cch-sec__body { margin: 0; color: var(--text-secondary); line-height: 1.6; }
.cch-loop { margin-bottom: 24px; }
.cch-loop__title {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 10px;
}
.cch-steps { counter-reset: cchstep; list-style: none; padding-left: 0; }
.cch-steps li {
    position: relative;
    padding-left: 42px;
    margin-bottom: 14px;
}
.cch-steps li::before {
    counter-increment: cchstep;
    content: counter(cchstep);
    position: absolute;
    left: 0;
    top: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cch-submit { margin-bottom: 8px; }
.cch-submit__note { margin: 8px 0 0; color: var(--text-tertiary); font-size: 0.85rem; }

/* Week-order toggle (asc/desc, persisted). Compact pill, right-aligned. */
/* `:not([hidden])` is load-bearing — a bare `display:block` overrides the UA
   `[hidden]{display:none}`, so the toggle showed on classrooms with no
   week-numbered sections (Ellee) even though renderSortToggle() set hidden.
   Scoping display to :not([hidden]) lets the hidden attribute win. */
.cc-sort-toggle:not([hidden]) {
    display: block;
    margin: 0 0 14px auto;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
    .cc-sort-toggle:hover { color: var(--text-primary); background: var(--bg-hover); }
}
.cc-sort-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Completion progress (Skool parity): count beside meta + 100% badge. */
.cc-card__progress-count {
    margin-left: auto;
    padding-left: 8px;
    color: var(--text-tertiary);
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}
.cc-card__meta { display: flex; align-items: center; }
/* "✓ Completed" pill over the cover top-right (mirrors the lock badge spot). */
.cc-card__done {
    position: absolute;
    top: 8px;
    right: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--accent-success);
    color: var(--text-on-accent);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    z-index: 1;
}
.cc-card__done svg { display: block; }
/* The whole card gets a subtle success ring when complete. */
.cc-card--done .cc-card__cover { box-shadow: inset 0 0 0 2px var(--accent-success); }

/* ============================================================
   Discussion two-column layout: feed (main) + Challenge rail.
   Stacks on mobile (rail above feed).
   ============================================================ */
.cd-disc-layout { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 980px) {
    /* 340px rail (was 300) — the Weekly Challenge card needs the room for
       its portrait video + hero header (owner design pass 2026-07-02). */
    .cd-disc-layout { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
    .cd-disc-rail { position: sticky; top: 12px; }
}
.cd-disc-main { min-width: 0; }
.cd-disc-rail:empty { display: none; }

/* Rounds Club rail card (compact — lives beside the feed). */
.cch-rail {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--accent);
    border-radius: 12px;
    padding: 16px 18px;
}
.cch-rail__eyebrow {
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--accent-text); margin-bottom: 10px;
}
.cch-rail__name { margin: 2px 0 6px; font-size: 1.15rem; color: var(--text-primary); }
.cch-rail__what { margin: 0 0 12px; color: var(--text-secondary); line-height: 1.5; font-size: 0.92rem; }
.cch-video--rail { padding-top: 50%; margin-bottom: 12px; }
.cch-video--rail svg { top: calc(50% - 12px); }
.cch-video--rail .cch-video__badge { top: calc(50% + 16px); font-size: 0.72rem; }
.cch-sec--rail { padding: 0 0 12px; }
.cch-cta--rail { width: 100%; justify-content: center; }

/* Weekly Challenge (live card, 2026-07-02) — the facade is a real <button>
   (keyboard + screen-reader reachable); the playing state swaps in the
   server-signed Bunny iframe. Children of the padding-ratio box must be
   absolutely positioned (the content-box is 0px tall). */
/* Centered hero header (owner design pass 2026-07-02): bigger centered
   eyebrow + name, with the countdown as a quiet centered pill below. */
.cch-rail__eyebrow--hero {
    text-align: center;
    font-size: 0.95rem;
    margin-bottom: 6px;
}
.cch-rail__name--hero {
    text-align: center;
    font-size: 1.65rem;
    margin: 0 0 10px;
}
/* Quiet countdown pill — informational, not shouting. */
.cch-countdown {
    display: table;
    margin: 0 auto 14px;
    font-size: 0.72rem; font-weight: 500;
    color: var(--text-tertiary);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    padding: 2px 9px;
    white-space: nowrap;
}
/* Greg's challenge videos are iPhone PORTRAIT (720×1280) — a centered
   EXACT-9:16 box so the player fills the frame with no letterbox drift
   (an off-ratio box makes the poster sit with a side bar). padding-top is
   16/9 of the box's own 80% width (80 × 16 ÷ 9 = 142.22). */
.cch-video--vertical {
    width: 80%;
    margin: 0 auto 14px;
    padding-top: 142.22%;
    border-radius: 12px;
}
/* Ellee's challenge videos are LANDSCAPE (1920×1080) — a full-width EXACT-16:9
   box (9 ÷ 16 = 56.25%). Chosen at render time from the /play response's
   source dimensions, never per-coach hardcoded. A portrait video in this box
   (or a landscape one in the 9:16 box above) renders as a pillarboxed sliver. */
.cch-video--landscape {
    width: 100%;
    margin: 0 auto 14px;
    padding-top: 56.25%;
    border-radius: 12px;
}
.cch-video--facade {
    display: block;
    cursor: pointer;
    border: 1px solid var(--border-subtle);
    color: inherit;
    font: inherit;
    text-align: center;
    background-size: cover;
    background-position: center;
}
.cch-video--facade svg { top: 50%; }
.cch-video--facade .cch-video__badge { top: calc(50% + 28px); font-size: 0.72rem; }
/* With a real poster behind them, the play icon + badge need to read on
   video content, not the flat card surface. */
.cch-video--has-poster { border-color: transparent; }
.cch-video--has-poster svg {
    color: rgba(255, 255, 255, 0.92);
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.7));
}
.cch-video--has-poster .cch-video__badge {
    color: #fff;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.85);
}
@media (hover: hover) and (pointer: fine) {
    .cch-video--facade:hover { border-color: var(--accent); }
}
@media (hover: hover) and (pointer: fine) {
    .cch-video--facade:hover svg { color: var(--accent); }
}
.cch-video--facade:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cch-video--playing { border: none; background: #000; }
.cch-video--playing iframe {
    position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.cch-done {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px; margin-bottom: 10px;
    border-radius: 8px;
    background: var(--bg-elevated);
    color: var(--accent-success);
    font-weight: 600; font-size: 0.92rem;
}
.cch-cta--entries { background: var(--bg-elevated); color: var(--text-primary); }
/* One clean line — the old flex layout split the label into two ragged
   columns ("Complete this / (+500 XP)"). */
.cch-cta--complete { white-space: nowrap; font-size: 1rem; padding: 12px 16px; }
/* Bigger-all-around pass: card padding + ask copy scale with the 340px rail. */
.cch-rail { padding: 20px 22px; }
.cch-rail .cch-sec__body { font-size: 0.98rem; line-height: 1.55; }

/* ============================================================
   About CLA tab (.acla-*) — level filter + intro videos + Q&A.
   Reuses .csh-* card styles for the videos.
   ============================================================ */
.acla { max-width: 880px; margin: 0 auto; padding: 8px 0 32px; }
.acla-intro { margin: 8px 0 16px; }
.acla-intro__title { margin: 0 0 6px; font-size: 1.35rem; color: var(--text-primary); }
.acla-intro__sub { margin: 0; color: var(--text-secondary); max-width: 62ch; }
.acla-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.acla-filter button {
    min-height: 38px; padding: 0 14px; border-radius: 999px;
    border: 1px solid var(--border-subtle); background: var(--bg-card);
    color: var(--text-secondary); font-size: 0.85rem; font-weight: 600; cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
    .acla-filter button:hover { color: var(--text-primary); }
}
.acla-filter button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.acla-filter--active { background: var(--accent) !important; color: var(--text-on-accent) !important; border-color: var(--accent) !important; }
.acla-section__title { font-size: 1.05rem; color: var(--text-primary); margin: 8px 0 12px; }
/* About CLA — tiles REUSE the classroom .cc-grid/.cc-card look (no extra tile
   CSS). Below: the in-tab course viewer (lesson list + single player). */
.acla-course-view__back { background: none; border: none; color: var(--text-secondary); cursor: pointer; font-size: .9rem; padding: 4px 0; margin-bottom: 8px; }
@media (hover: hover) and (pointer: fine) {
    .acla-course-view__back:hover { color: var(--text-primary); }
}
.acla-course-view__title { margin: 0 0 14px; font-size: 1.2rem; color: var(--text-primary); }
.acla-course-view__layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
.acla-course-view__main { min-width: 0; }
.acla-player { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; }
.acla-player__iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.acla-player__title { margin: 12px 0 4px; font-size: 1.1rem; color: var(--text-primary); }
.acla-player__blurb { margin: 0; color: var(--text-secondary); font-size: .92rem; }
.acla-course-view__lessons { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow-y: auto; }
.acla-lesson-row {
    display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer;
    background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: 10px;
    padding: 10px 12px; color: var(--text-secondary); font-size: .9rem;
}
@media (hover: hover) and (pointer: fine) {
    .acla-lesson-row:hover { color: var(--text-primary); border-color: var(--accent); }
}
.acla-lesson-row.is-active { border-color: var(--accent); color: var(--text-primary); background: var(--bg-elevated); }
.acla-lesson-row__num {
    flex: 0 0 24px; height: 24px; display: flex; align-items: center; justify-content: center;
    border-radius: 999px; background: var(--bg-elevated); font-size: .78rem; font-weight: 600;
}
.acla-lesson-row.is-active .acla-lesson-row__num { background: var(--accent); color: var(--text-on-accent); }
.acla-lesson-row__title { flex: 1 1 auto; }
@media (max-width: 720px) {
    .acla-course-view__layout { grid-template-columns: 1fr; }
    .acla-course-view__lessons { max-height: none; }
}

/* Start Here "coming soon" placeholder slot (no video id yet). */
.csh-card__media--soon {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 8px; background: var(--bg-elevated); color: var(--text-tertiary);
    border-bottom: 1px dashed var(--border-subtle);
}
.csh-card__soon {
    font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600;
}

/* ── Admin-only coach switcher (multi-coach classroom preview) ──────────────
   A segmented control above the tab strip that flips the whole classroom
   between coaches. Rendered ONLY for admins (coach-classroom.js gate). */
.cc-coach-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 0 0 0.75rem;
    padding: 0.375rem 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
}
.cc-coach-switcher__label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    padding: 0 0.25rem;
}
.cc-coach-switcher__btn {
    appearance: none;
    border: 1px solid var(--border-subtle);
    background: var(--bg-elevated, #14141a);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.375rem 0.875rem;
    border-radius: 7px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
@media (hover: hover) and (pointer: fine) {
    .cc-coach-switcher__btn:hover {
        border-color: var(--accent);
    }
}
.cc-coach-switcher__btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 40%, transparent);
}
.cc-coach-switcher__btn--active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text-on-accent, #fff);
}

/* Multi-coach shell: hide Start Here's "Begin the Beginner's Guide to CLA"
   CTA for a coach that has no About CLA tab (it would click a hidden tab). */
.ds-main.cc-no-about-cla .csh-cta { display: none; }

/* ============================================================
   Weekly Challenge editor (owner / admin only).
   The Edit control sits inside the rail's eyebrow row; the modal is
   body-appended and removed on close, so it needs no
   data-spa-permanent (that contract is for STATIC markup that must
   survive nav-spa's shell swap).
   ============================================================ */
.cch-rail__eyebrow--hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.cch-edit {
    /* reset.css flattens buttons, so state the whole look explicitly */
    padding: 4px 10px;
    min-height: 28px;
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
    .cch-edit:hover { color: var(--text-primary); border-color: var(--accent); }
}
.cch-edit:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.cch-edit-overlay {
    position: fixed;
    inset: 0;
    z-index: 9400;              /* above the thread modal's 9000 stack */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.65);
    overflow-y: auto;
}
.cch-edit-box {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    padding: 22px;
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    background: var(--bg-card);
}
.cch-edit-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-tertiary);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
    .cch-edit-close:hover { color: var(--text-primary); }
}
.cch-edit-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cch-edit-title {
    margin: 0 40px 16px 0;
    font-size: 1.15rem;
    color: var(--text-primary);
}
.cch-edit-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}
.cch-edit-input,
.cch-edit-textarea {
    width: 100%;
    margin-bottom: 16px;
    padding: 10px 12px;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background: var(--bg-elevated);
    color: var(--text-primary);
    font: inherit;
    font-size: 0.95rem;
}
.cch-edit-textarea { resize: vertical; min-height: 140px; line-height: 1.5; }
.cch-edit-input:focus-visible,
.cch-edit-textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.cch-edit-input--dt { max-width: 260px; }
.cch-edit-input:disabled { opacity: 1; color: var(--text-tertiary); cursor: not-allowed; }

.cch-edit-when {
    margin-bottom: 4px;
    padding: 12px 14px;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    background: var(--bg-elevated);
}
.cch-edit-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    color: var(--text-secondary);
    font-size: 0.92rem;
    cursor: pointer;
}
.cch-edit-radio input { accent-color: var(--accent); }
.cch-edit-note {
    margin: 10px 0 0;
    min-height: 1.2em;
    color: var(--text-secondary);
    font-size: 0.85rem;
}
.cch-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}
.cch-edit-cancel,
.cch-edit-save {
    min-height: 44px;
    padding: 0 18px;
    border-radius: 8px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.cch-edit-cancel {
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-secondary);
}
@media (hover: hover) and (pointer: fine) {
    .cch-edit-cancel:hover { color: var(--text-primary); }
}
.cch-edit-save {
    border: 1px solid var(--accent);
    background: var(--accent);
    color: var(--text-on-accent);
}
.cch-edit-save:disabled { opacity: 0.7; cursor: default; }
.cch-edit-cancel:focus-visible,
.cch-edit-save:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Challenge QUEUE — the list behind the rail's Edit control. Reuses the
   editor's overlay/box so the two read as one surface. */
.cch-q__intro {
    margin: -8px 0 16px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}
.cch-q__list { display: flex; flex-direction: column; gap: 8px; }
.cch-q__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 44px;
    padding: 12px 14px;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    background: var(--bg-elevated);
    color: var(--text-primary);
    font: inherit;
    text-align: left;
    cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
    .cch-q__row:hover { border-color: var(--accent); }
}
.cch-q__row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cch-q__row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cch-q__row-title { font-weight: 600; }
.cch-q__row-when { color: var(--text-tertiary); font-size: 0.82rem; }
.cch-q__pill {
    flex: 0 0 auto;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}
/* Status is carried by the LABEL text, never by colour alone (WCAG 1.4.1). */
.cch-q__pill--live { background: var(--accent-success); color: var(--text-on-accent); }
.cch-q__pill--scheduled { background: var(--accent); color: var(--text-on-accent); }
.cch-q__pill--ended,
.cch-q__pill--undated {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-tertiary);
}
.cch-q__empty { margin: 0; color: var(--text-secondary); font-size: 0.9rem; }
