/* ════════════════════════════════════════════════════════════════════════════
   PIANOMODE — LEARN PAGE (2026 EDITORIAL REDESIGN)
   ----------------------------------------------------------------------------
   Mobile-first. Built on the global design tokens (assets/design-system.css)
   with local short aliases to keep selectors readable. Editorial dark hero +
   cinematic piano cabinet + Duolingo-style zig-zag path + typographic
   Specialized Courses list + monthly/yearly pricing.
   ════════════════════════════════════════════════════════════════════════════ */

/* ───────── LOCAL TOKENS (self-contained — never depend on a cached
   design-system.css that might be stale for logged-out visitors) ───────── */
.pm-learn-v4 {
    --gold:         #D7BF81;
    --gold-bright:  #E8CF92;
    --gold-deep:    #B8932F;
    --gold-soft:    rgba(215, 191, 129, 0.15);
    --gold-border:  rgba(215, 191, 129, 0.25);
    --gold-faint:   rgba(215, 191, 129, 0.08);

    --ink:          #0A0908;
    --ink-2:        #14110D;
    --ink-3:        #1F1A14;
    --ink-4:        #2A2622;

    --paper:        #FAF7F2;
    --paper-2:      #F3EEE5;
    --paper-3:      #E8E0D1;

    --text:         #18140F;
    --text-2:       #4A4236;
    --text-3:       #7D7567;
    --text-4:       #A89F8C;

    --line:         rgba(24, 20, 15, 0.10);
    --line-2:       rgba(24, 20, 15, 0.18);

    --beg:          #6FA37A;
    --ele:          #6F90C8;
    --int:          #C68F4E;
    --adv:          #A668B5;
    --exp:          #D85950;

    --serif:        'Fraunces', 'Times New Roman', Georgia, serif;
    --sans:         'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --mono:         'JetBrains Mono', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;

    --ease-out:     cubic-bezier(0.22, 1, 0.36, 1);
    --ease-inout:   cubic-bezier(0.65, 0, 0.35, 1);

    /* Force light scheme on the cream editorial body so OS-level
       "auto dark mode" (Edge / Brave / iOS Safari) never tries to
       invert the page. Dark sections explicitly opt back into
       color-scheme:dark on themselves. */
    color-scheme: light;
    background: #FAF7F2;
    color: #18140F;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}
.pm-learn-v4 *,
.pm-learn-v4 *::before,
.pm-learn-v4 *::after {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}
.pm-learn-v4 a { color: inherit; text-decoration: none; }
.pm-learn-v4 button { font: inherit; border: 0; background: 0; cursor: pointer; color: inherit; }

/* ───────── SECTION HEADER (eyebrow + serif title + sub) ───────── */
.pm-learn-v4 .pm-sec-header {
    text-align: center;
    margin: 0 auto 36px;
    max-width: 720px;
}
.pm-learn-v4 .pm-sec-header.pm-sec-header-left { text-align: left; margin-left: 0; }
.pm-learn-v4 .pm-sec-header .pm-badge {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--sans);
    font-size: 12px; letter-spacing: 0.10em; text-transform: uppercase;
    color: var(--gold-deep); font-weight: 600;
    padding: 7px 16px; border-radius: 100px;
    background: var(--gold-soft);
    border: 1px solid var(--gold-border);
    margin-bottom: 18px;
}
.pm-learn-v4 .pm-sec-header .pm-badge-dot {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%;
    background: var(--gold);
}
.pm-learn-v4 .pm-sec-header h2 {
    font-family: var(--serif); font-weight: 300;
    font-size: clamp(30px, 6vw, 60px); line-height: 1.04;
    letter-spacing: -0.025em;
    color: var(--ink);
    font-variation-settings: "opsz" 96;
    margin: 0 0 14px;
}
.pm-learn-v4 .pm-sec-header h2 span {
    /* Baseline (legacy / no-feature browsers): plain inline italic with the
       solid gold-deep colour. This is the safe failure mode — the previous
       attempt to paint a gradient on an inline-block + padded element in
       browsers without background-clip:text support filled the whole padded
       rectangle solid gold and turned "topics" / "journey" into a brick.
       Margin-inline-end keeps the next-line content from butting against
       the italic slope on these legacy paths. */
    display: inline;
    font-style: italic;
    color: var(--gold-deep);
    margin-inline-end: 0.14em;
}
/* Modern path — once we know background-clip:text actually works, we can
   safely widen the box (inline-block + padding-inline-end) so the italic
   slope of y/s/n/e/S sits INSIDE the gradient-filled region. Without this
   widening, the rightmost ~0.10-0.18em of every italic glyph rendered as
   transparent (the glyph shape extended past the box, so background-clip
   had nothing to fill there). */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .pm-learn-v4 .pm-sec-header h2 span {
        display: inline-block;
        padding-inline-end: 0.22em;
        margin-inline-end: 0;
        background: linear-gradient(135deg, var(--gold-deep), var(--gold));
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        /* Critical: keep the inline-block on the same baseline as its sibling
           text. Without this, "Modules &" and "Lessons" can drift apart by 1px
           when the inline-block box gets a different content-edge alignment. */
        vertical-align: baseline;
    }
}
.pm-learn-v4 .pm-sec-header h2 {
    overflow: visible;
    padding-bottom: 0.10em;
    /* Reserve a sliver of right padding so the italic span's overhang has
       room before any inherited overflow:hidden on a wider ancestor would
       crop it. 0.18em ≈ the worst-case slope on Fraunces 96 opsz italic. */
    padding-inline-end: 0.18em;
    line-height: 1.06;
}
.pm-learn-v4 .pm-sec-header p {
    font-family: var(--serif);
    font-size: clamp(15px, 2.4vw, 18px); font-weight: 300; line-height: 1.5;
    color: var(--text-2);
    max-width: 580px; margin: 0 auto;
}
.pm-learn-v4 .pm-sec-header.pm-sec-header-left p { margin-left: 0; }

/* ───────── BUTTONS ───────── */
.pm-learn-v4 .pm-btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 26px; border-radius: 100px;
    font-family: var(--sans);
    font-size: 13px; font-weight: 600; letter-spacing: 0.04em;
    transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), background .25s, color .25s, border-color .25s;
    cursor: pointer; white-space: nowrap;
}
.pm-learn-v4 .pm-btn-gold { background: var(--gold); color: var(--ink); box-shadow: 0 6px 24px rgba(215,191,129,0.25); }
.pm-learn-v4 .pm-btn-gold:hover { background: var(--gold-bright); transform: translateY(-2px); box-shadow: 0 12px 32px rgba(215,191,129,0.40); }
.pm-learn-v4 .pm-btn-dark { background: var(--ink); color: var(--paper); }
.pm-learn-v4 .pm-btn-dark:hover { background: var(--ink-3); transform: translateY(-2px); }
.pm-learn-v4 .pm-btn-outline { background: transparent; color: var(--ink); border: 1px solid var(--line-2); }
.pm-learn-v4 .pm-btn-outline:hover { border-color: var(--ink); }
.pm-learn-v4 .pm-btn-ghost { background: transparent; color: #F5EFE3; border: 1px solid rgba(245,239,227,0.25); }
.pm-learn-v4 .pm-btn-ghost:hover { background: rgba(245,239,227,0.06); border-color: var(--gold); color: var(--gold); }
.pm-learn-v4 .pm-btn[disabled],
.pm-learn-v4 .pm-btn[aria-disabled="true"] { opacity: 0.6; cursor: not-allowed; }

/* ════════════════════════════════════════════════════════════════════════════
   1.  LOGGED-IN TOPBAR — restyled with editorial tokens
   ----------------------------------------------------------------------------
   Background matches the top of the cinematic piano section beneath so the
   topbar visually continues into the dark scene with no seam.
   ════════════════════════════════════════════════════════════════════════════ */
.pm-learn-v4 .pm-topbar {
    /* Sticky bar at the top of the Learn page body. Full-bleed so it
       never leaves a cream side-band when Blocksy's content wrapper
       constrains the page below 100vw. */
    position: sticky; top: 0; z-index: 50;
    background: #1a1411;
    border: 0;
    color: #F5EFE3;
    color-scheme: dark;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    max-width: 100vw;
}
.pm-learn-v4 .pm-topbar-inner {
    max-width: 1280px; margin: 0 auto;
    padding: 10px clamp(14px, 4vw, 28px);
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    flex-wrap: wrap;
}
.pm-learn-v4 .pm-tb-group { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pm-learn-v4 .pm-tb-item {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 12px; border-radius: 100px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(215, 191, 129, 0.18);
    font-family: var(--sans); font-weight: 600;
    font-size: 11px; letter-spacing: 0.04em;
    color: rgba(245, 239, 227, 0.86);
    transition: background .2s, border-color .2s;
}
.pm-learn-v4 .pm-tb-item:hover { background: rgba(215, 191, 129, 0.08); border-color: rgba(215, 191, 129, 0.35); }
.pm-learn-v4 .pm-tb-icon { color: var(--gold); flex-shrink: 0; }
.pm-learn-v4 .pm-tb-val { font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--gold); font-weight: 500; }
.pm-learn-v4 .pm-tb-label { color: rgba(245, 239, 227, 0.5); }
.pm-learn-v4 .pm-tb-notes { padding: 6px 10px; gap: 3px; }
.pm-learn-v4 .pm-tb-note-icon { font-size: 14px; color: var(--gold); transition: opacity .2s; }
.pm-learn-v4 .pm-tb-note-icon.empty { opacity: 0.22; }
.pm-learn-v4 .pm-tb-notation-toggle { padding: 0; border: 0; background: transparent; }
.pm-learn-v4 .pm-notation-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px; border-radius: 100px;
    background: rgba(215, 191, 129, 0.08);
    border: 1px solid rgba(215, 191, 129, 0.32);
    color: var(--gold);
    font-family: var(--sans); font-weight: 600;
    font-size: 11px; letter-spacing: 0.06em;
    cursor: pointer; transition: all .2s;
}
.pm-learn-v4 .pm-notation-btn:hover { background: rgba(215, 191, 129, 0.16); }
.pm-learn-v4 .pm-tb-ring {
    position: relative; width: 28px; height: 28px; border-radius: 50%;
    background:
        conic-gradient(var(--gold) calc(var(--pct, 0) * 1%), rgba(245, 239, 227, 0.12) 0);
    display: grid; place-items: center;
}
.pm-learn-v4 .pm-tb-ring::before {
    content: ""; position: absolute; inset: 3px; border-radius: 50%;
    background: rgba(10, 9, 8, 0.92);
}
.pm-learn-v4 .pm-tb-ring span {
    position: relative; font-family: var(--mono); font-size: 10px; font-weight: 600;
    color: var(--gold);
}

/* ════════════════════════════════════════════════════════════════════════════
   2.  INTRO HERO (BEGIN NOW) — editorial redesign
   ════════════════════════════════════════════════════════════════════════════ */
.pm-learn-v4 .pm-intro-hero {
    /* Lives inside the dark .pm-piano-sec scene now. The container shares
       the floating-notes background with the keyboard below, but its
       inner surface is a softly-lit gold-tinted card so the welcome
       content reads cleanly on top of the cinematic dark. */
    position: relative; isolation: isolate;
    max-width: 1120px;
    width: calc(100% - clamp(20px, 4vw, 48px));
    margin: 0 auto clamp(28px, 5vw, 56px);
    padding: clamp(26px, 4.5vw, 48px) clamp(22px, 4vw, 48px);
    background:
        radial-gradient(ellipse at 12% -10%, rgba(215, 191, 129, 0.16), transparent 55%),
        radial-gradient(ellipse at 90% 110%, rgba(184, 147, 47, 0.12), transparent 60%),
        linear-gradient(140deg, rgba(34, 28, 22, 0.92) 0%, rgba(26, 22, 18, 0.88) 55%, rgba(20, 17, 13, 0.92) 100%);
    color-scheme: dark;
    border: 1px solid rgba(215, 191, 129, 0.22);
    border-radius: clamp(18px, 3vw, 24px);
    color: #F5EFE3;
    overflow: hidden;
    box-shadow:
        0 18px 48px -18px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(215, 191, 129, 0.06);
    transition: padding .4s var(--ease-out), max-height .4s var(--ease-out), border-radius .4s;
    z-index: 2;
}
.pm-learn-v4 .pm-intro-hero::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image:
        radial-gradient(circle at 18% 110%, rgba(198, 143, 78, 0.18), transparent 45%),
        radial-gradient(circle at 88% 18%, rgba(215, 191, 129, 0.14), transparent 50%);
    z-index: 0;
}
.pm-learn-v4 .pm-intro-hero::after {
    content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='120' viewBox='0 0 200 120'><g fill='none' stroke='%23D7BF81' stroke-opacity='0.10' stroke-width='0.5'><line x1='0' y1='30' x2='200' y2='30'/><line x1='0' y1='50' x2='200' y2='50'/><line x1='0' y1='70' x2='200' y2='70'/><line x1='0' y1='90' x2='200' y2='90'/></g></svg>");
    background-size: 200px 120px;
    opacity: 0.5;
    mask-image: linear-gradient(180deg, transparent, black 40%, black 80%, transparent);
}
.pm-learn-v4 .pm-intro-hero-inner {
    position: relative; z-index: 1;
    max-width: 880px;
}
.pm-learn-v4 .pm-intro-hero-eyebrow {
    display: inline-block;
    padding: 7px 14px;
    background: rgba(215, 191, 129, 0.10);
    border: 1px solid rgba(215, 191, 129, 0.30);
    border-radius: 100px;
    color: var(--gold);
    font-family: var(--sans);
    font-size: 11px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
    margin-bottom: 18px;
    align-self: flex-start;
}
.pm-learn-v4 .pm-intro-hero-inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
.pm-learn-v4 .pm-intro-hero h1 {
    font-family: var(--serif); font-weight: 300;
    font-size: clamp(34px, 6vw, 72px);
    line-height: 1.32; letter-spacing: -0.025em;
    color: #F5EFE3;
    font-variation-settings: "opsz" 96;
    margin: 0 0 18px;
    /* Reserve a column on the right for the absolute-positioned Hide
       toggle so the title never underflows it. The reservation lives
       on the h1 (not the inner) so siblings — features grid, rows —
       can use the full width of the card. */
    padding-right: clamp(0px, 12vw, 140px);
    overflow: visible;
    padding-bottom: 0.30em;
}
.pm-learn-v4 .pm-intro-hero h1 em {
    /* Legacy / no-feature browsers: solid gold italic, no gradient. */
    display: inline;
    font-style: italic;
    color: var(--gold);
    line-height: 1.32;
    padding-bottom: 0.06em;
}
/* Modern path: same gradient text-fill as before, but inline-block + a
   small padding-inline-end so the italic slope of "journey" / "topics"
   sits inside the gradient-painted box. Without the extra width the
   rightmost ~0.10em of every italic glyph rendered as transparent
   (background-clip:text had nothing to clip on the slope). */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .pm-learn-v4 .pm-intro-hero h1 em {
        display: inline-block;
        padding-inline-end: 0.18em;
        background: linear-gradient(135deg, var(--gold-bright) 10%, var(--gold) 55%, var(--gold-deep) 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        vertical-align: baseline;
    }
}
.pm-learn-v4 .pm-intro-hero-lead {
    font-family: var(--serif);
    font-size: clamp(15px, 2vw, 19px); font-weight: 300; line-height: 1.55;
    color: rgba(245, 239, 227, 0.78);
    max-width: 680px;
    margin: 0 0 32px;
}
.pm-learn-v4 .pm-intro-hero-lead em { font-style: italic; color: var(--gold); }
.pm-learn-v4 .pm-intro-hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin: 0 0 32px;
}
.pm-learn-v4 .pm-intro-feat {
    display: flex; flex-direction: column; gap: 4px;
    padding: 16px 18px;
    background: rgba(245, 239, 227, 0.04);
    border: 1px solid rgba(215, 191, 129, 0.14);
    border-radius: 14px;
    transition: background .25s, border-color .25s, transform .25s;
}
.pm-learn-v4 .pm-intro-feat:hover {
    background: rgba(215, 191, 129, 0.08);
    border-color: rgba(215, 191, 129, 0.36);
    transform: translateY(-2px);
}
.pm-learn-v4 .pm-intro-feat-num {
    font-family: var(--serif); font-style: italic; font-weight: 400;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1;
    color: var(--gold);
    font-variation-settings: "opsz" 96;
}
.pm-learn-v4 .pm-intro-feat-lbl {
    font-family: var(--mono); font-size: 11px; letter-spacing: 0.10em;
    color: rgba(245, 239, 227, 0.65);
    line-height: 1.35;
}
/* "Note." disclaimer + "Find my level" placement row are siblings of
   the SAME width, stacked vertically with a small gap. Both stretch to
   the full inner-content width (no toggle reservation here — that lives
   on the h1 only). The block-level + width:100% combination guarantees
   identical horizontal extent regardless of intrinsic content sizing
   (a <p> vs an <a> with display:flex would otherwise shrink-to-fit). */
.pm-learn-v4 .pm-intro-hero-rows {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 32px 0 22px; /* 32px top pushes the two rectangles down a notch */
    width: 100%;
}
.pm-learn-v4 .pm-intro-hero-rows > * {
    display: block;
    width: 100%;
    align-self: stretch;
    box-sizing: border-box;
}
.pm-learn-v4 .pm-intro-hero-rows > a.pm-intro-placement {
    /* Anchor needs flex for its inner layout but the outer dimensions
       must match the disclaimer paragraph. */
    display: flex;
}

.pm-learn-v4 .pm-intro-hero-disclaimer {
    font-family: var(--sans);
    font-size: 12.5px;
    line-height: 1.55;
    color: rgba(245, 239, 227, 0.55);
    background: rgba(245, 239, 227, 0.04);
    border: 1px solid rgba(215, 191, 129, 0.18);
    border-radius: 14px;
    padding: 12px 16px;
    margin: 0;
}
.pm-learn-v4 .pm-intro-hero-disclaimer strong {
    color: var(--gold);
    font-weight: 700;
    margin-right: 4px;
}

/* Footnote variant — used at the BOTTOM of the intro hero, after the CTAs.
   No border, no background card, soft text; it reads as a legal footnote
   rather than a competing CTA so the eye stays on Begin tour / Find my
   level / Don't show again above. */
.pm-learn-v4 .pm-intro-hero-disclaimer--footnote {
    margin: 28px 0 0;
    padding: 0;
    background: transparent;
    border: 0;
    color: rgba(245, 239, 227, 0.42);
    font-size: 11.5px;
    line-height: 1.55;
    border-top: 1px solid rgba(215, 191, 129, 0.10);
    padding-top: 18px;
}
.pm-learn-v4 .pm-intro-hero-disclaimer--footnote strong {
    color: rgba(245, 239, 227, 0.62);
    font-weight: 600;
}

/* Placement-test row. Whole row is an <a>, no logo, full width.
   The --featured modifier ramps up the visual weight: a glow halo, brighter
   gold accent, an "RECOMMENDED" eyebrow and stronger copy. The default
   variant (without --featured) keeps the original subdued look for any
   place we still want a quieter call-out. */
.pm-learn-v4 .pm-intro-placement {
    position: relative;
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px;
    padding: 14px 18px;
    background: rgba(245, 239, 227, 0.04);
    border: 1px solid rgba(215, 191, 129, 0.18);
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    transition: background .2s, border-color .2s, transform .2s, box-shadow .2s;
    overflow: hidden;
}
.pm-learn-v4 .pm-intro-placement:hover {
    background: rgba(215, 191, 129, 0.10);
    border-color: rgba(215, 191, 129, 0.35);
}

/* Featured variant — used inside the intro hero so the assessment CTA
   reads as the recommended next step, not as a footnote. */
.pm-learn-v4 .pm-intro-placement--featured {
    margin: 28px 0 24px;
    padding: 22px 24px;
    background: linear-gradient(135deg, rgba(215, 191, 129, 0.16) 0%, rgba(215, 191, 129, 0.06) 60%, rgba(245, 239, 227, 0.04) 100%);
    border: 1px solid rgba(215, 191, 129, 0.42);
    border-radius: 18px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(215, 191, 129, 0.06) inset;
}
.pm-learn-v4 .pm-intro-placement--featured:hover {
    background: linear-gradient(135deg, rgba(215, 191, 129, 0.24) 0%, rgba(215, 191, 129, 0.10) 60%, rgba(245, 239, 227, 0.06) 100%);
    border-color: rgba(215, 191, 129, 0.62);
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24), 0 0 0 1px rgba(215, 191, 129, 0.10) inset;
}
.pm-learn-v4 .pm-intro-placement-glow {
    position: absolute;
    inset: -40% -10% auto auto;
    width: 220px; height: 220px;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(215, 191, 129, 0.32), rgba(215, 191, 129, 0) 70%);
    pointer-events: none;
    opacity: 0.7;
    transition: opacity .35s ease;
}
.pm-learn-v4 .pm-intro-placement--featured:hover .pm-intro-placement-glow { opacity: 1; }

.pm-learn-v4 .pm-intro-placement-text {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column; gap: 4px;
    color: rgba(245, 239, 227, 0.78);
    font-family: var(--sans);
    font-size: 13.5px;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}
.pm-learn-v4 .pm-intro-placement-text strong {
    color: #F5EFE3;
    font-family: var(--serif);
    font-style: italic;
    font-weight: 500;
    font-size: 22px;
    line-height: 1.2;
    letter-spacing: 0.005em;
    /* Italic safety on the gold-deep gradient — same pattern as section
       header h2 spans, so the closing italic glyph isn't optically clipped. */
    padding-inline-end: 0.10em;
}
.pm-learn-v4 .pm-intro-placement-eyebrow {
    display: inline-block;
    align-self: flex-start;
    margin-bottom: 4px;
    padding: 3px 10px;
    border-radius: 100px;
    background: rgba(215, 191, 129, 0.16);
    border: 1px solid rgba(215, 191, 129, 0.40);
    color: var(--gold);
    font-family: var(--sans);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.pm-learn-v4 .pm-intro-placement-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 13px 22px; border-radius: 100px;
    background: var(--gold);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 13px; font-weight: 700; letter-spacing: 0.04em;
    flex-shrink: 0;
    position: relative; z-index: 1;
    transition: background .2s, transform .2s, box-shadow .2s;
    box-shadow: 0 8px 22px rgba(215, 191, 129, 0.32);
}
.pm-learn-v4 .pm-intro-placement:hover .pm-intro-placement-btn {
    background: var(--gold-bright);
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(215, 191, 129, 0.50);
}
@media (max-width: 600px) {
    .pm-learn-v4 .pm-intro-placement {
        flex-direction: column; align-items: stretch;
    }
    .pm-learn-v4 .pm-intro-placement-btn {
        width: 100%; justify-content: center;
    }
}

.pm-learn-v4 .pm-intro-hero-cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.pm-learn-v4 .pm-intro-hero-btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 26px;
    font-size: 13px; font-weight: 600; letter-spacing: 0.04em;
    border-radius: 100px;
    cursor: pointer; text-decoration: none;
    border: 0;
    transition: transform .22s var(--ease-out), box-shadow .22s, background .25s, color .25s, border-color .25s;
}
.pm-learn-v4 .pm-intro-hero-btn-primary {
    background: var(--gold);
    color: var(--ink);
    box-shadow: 0 8px 28px rgba(215, 191, 129, 0.32);
}
.pm-learn-v4 .pm-intro-hero-btn-primary:hover {
    transform: translateY(-2px);
    background: var(--gold-bright);
    box-shadow: 0 14px 36px rgba(215, 191, 129, 0.45);
}
.pm-learn-v4 .pm-intro-hero-btn-secondary {
    background: transparent;
    color: rgba(245, 239, 227, 0.78);
    border: 1px solid rgba(215, 191, 129, 0.30);
}
.pm-learn-v4 .pm-intro-hero-btn-secondary:hover {
    color: var(--gold); border-color: var(--gold);
    background: rgba(215, 191, 129, 0.06);
}
.pm-learn-v4 .pm-intro-hero-collapse-toggle {
    /* Always pinned to the top-right corner of the card, even on mobile.
       The inner padding-right reserves the space so the title never
       underflows the toggle. */
    position: absolute;
    top: 14px; right: 14px;
    z-index: 3;
    margin: 0;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 12px; border-radius: 100px;
    background: rgba(215, 191, 129, 0.10);
    border: 1px solid rgba(215, 191, 129, 0.30);
    color: var(--gold);
    font-family: var(--sans); font-size: 11px; font-weight: 600;
    letter-spacing: 0.10em; text-transform: uppercase;
    cursor: pointer;
    transition: background .2s, transform .2s;
}
.pm-learn-v4 .pm-intro-hero-collapse-toggle:hover { background: rgba(215, 191, 129, 0.20); }
@media (max-width: 480px) {
    .pm-learn-v4 .pm-intro-hero-collapse-toggle {
        font-size: 10px;
        padding: 6px 10px;
    }
}
.pm-learn-v4 .pm-intro-hero-collapse-toggle:hover { background: rgba(215, 191, 129, 0.20); }
.pm-learn-v4 .pm-intro-hero-collapse-toggle svg { transition: transform .25s; }

/* ─────────── COLLAPSED-STATE BAR ───────────
   Single horizontal band: eyebrow + intro phrase on the left, real gold
   CTA on the right. When the panel is collapsed (.is-collapsed), the
   inner full-content block is hidden and this bar takes its place.
   When expanded, the bar is hidden and the inner is shown.
   The whole pm-intro-hero outer card keeps its rounded border, padding
   and background in both states for visual stability. */
.pm-learn-v4 .pm-intro-hero-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
}
.pm-learn-v4 .pm-intro-hero-bar__text {
    display: flex; flex-direction: column; gap: 4px;
    flex: 1; min-width: 0;
}
.pm-learn-v4 .pm-intro-hero-bar__eyebrow {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
}
.pm-learn-v4 .pm-intro-hero-bar__lead {
    margin: 0;
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.45;
    color: rgba(245, 239, 227, 0.86);
}
.pm-learn-v4 .pm-intro-hero-cta-open {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 13px 22px;
    border-radius: 100px;
    border: 0;
    background: var(--gold);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 13px; font-weight: 700; letter-spacing: 0.04em;
    flex-shrink: 0;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(215, 191, 129, 0.32);
    transition: background .22s, transform .22s, box-shadow .22s;
}
.pm-learn-v4 .pm-intro-hero-cta-open:hover {
    background: var(--gold-bright);
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(215, 191, 129, 0.50);
}
.pm-learn-v4 .pm-intro-hero-cta-open:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}
@media (max-width: 600px) {
    .pm-learn-v4 .pm-intro-hero-bar { flex-direction: column; align-items: stretch; gap: 14px; }
    .pm-learn-v4 .pm-intro-hero-cta-open { width: 100%; justify-content: center; }
}

/* Collapsed state — show the bar instead of the full inner block. The
   outer card stays the same height and rounding so the surrounding layout
   doesn't jump on toggle. */
.pm-learn-v4 .pm-intro-hero.is-collapsed {
    padding: 22px clamp(20px, 4vw, 36px);
}
.pm-learn-v4 .pm-intro-hero.is-collapsed .pm-intro-hero-inner { display: none; }
.pm-learn-v4 .pm-intro-hero.is-collapsed .pm-intro-hero-bar { display: flex; }
.pm-learn-v4 .pm-intro-hero.is-collapsed .pm-intro-hero-collapse-toggle { display: none; }

/* Hide entirely when finished or after one lesson done */
.pm-learn-v4 .pm-intro-hero.is-finished { display: none; }

/* Wider tap targets on the new gold open CTA when the layout collapses to
   a column (small viewports) — the placement card pattern below. */
@media (max-width: 480px) {
    .pm-learn-v4 .pm-intro-hero.is-collapsed { padding: 18px 18px; }
}

/* ════════════════════════════════════════════════════════════════════════════
   3.  ASSESSMENT CTA — restyled with editorial tokens
   ════════════════════════════════════════════════════════════════════════════ */
.pm-learn-v4 .pm-assess-cta {
    /* Gold-contrast bg, harmonised with the dark piano section that
       comes right after. The PianoMode logo sits at the left, no ASCII
       keyboard anymore. */
    max-width: 1200px;
    margin: clamp(18px, 3vw, 36px) auto;
    padding: clamp(20px, 4vw, 36px) clamp(20px, 4vw, 48px);
    background: #14110D;
    background:
        radial-gradient(ellipse at 8% 50%, rgba(215, 191, 129, 0.18), transparent 55%),
        linear-gradient(135deg, #14110D 0%, #1F1A14 100%);
    color: #F5EFE3;
    color-scheme: dark;
    border: 1px solid rgba(215, 191, 129, 0.32);
    border-radius: 24px;
    overflow: hidden; position: relative;
}
.pm-learn-v4 .pm-assess-cta::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
    background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep));
}
.pm-learn-v4 .pm-assess-cta-inner {
    display: flex; align-items: center; gap: clamp(16px, 3vw, 32px);
    flex-wrap: wrap; justify-content: space-between;
}
.pm-learn-v4 .pm-assess-cta-mark {
    flex-shrink: 0;
    width: 64px; height: 64px;
    border-radius: 50%;
    background: rgba(215, 191, 129, 0.10);
    border: 1px solid rgba(215, 191, 129, 0.30);
    display: grid; place-items: center;
    overflow: hidden;
}
.pm-learn-v4 .pm-assess-cta-mark img {
    width: 44px; height: 44px;
    object-fit: contain;
    display: block;
}
.pm-learn-v4 .pm-assess-cta-text { flex: 1; min-width: 240px; }
.pm-learn-v4 .pm-assess-cta-text h2 {
    font-family: var(--serif); font-weight: 400;
    font-size: clamp(20px, 3vw, 28px); line-height: 1.1; letter-spacing: -0.015em;
    color: #F5EFE3; margin: 0 0 6px;
}
.pm-learn-v4 .pm-assess-cta-text p {
    font-family: var(--serif); font-size: 15px; font-weight: 300;
    color: rgba(245, 239, 227, 0.72); line-height: 1.5; margin: 0;
}
.pm-learn-v4 .pm-assess-cta-btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 26px; border-radius: 100px;
    background: var(--gold); color: var(--ink);
    font-size: 13px; font-weight: 600; letter-spacing: 0.06em;
    text-decoration: none;
    transition: transform .22s, box-shadow .22s, background .22s;
    flex-shrink: 0;
    box-shadow: 0 8px 22px rgba(215, 191, 129, 0.32);
}
.pm-learn-v4 .pm-assess-cta-btn:hover {
    background: var(--gold-bright);
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(215, 191, 129, 0.45);
}

/* ════════════════════════════════════════════════════════════════════════════
   4.  CINEMATIC PIANO STAGE
   ════════════════════════════════════════════════════════════════════════════ */
.pm-learn-v4 .pm-piano-sec {
    /* Full-bleed: break out of Blocksy's constrained content wrapper so
       the cinematic dark scene always spans the entire viewport, both
       logged-in and logged-out. Without this trick the parent wrapper
       caps the section width and leaves a cream band on the right.
       Hardcoded hex fallback + color-scheme:dark keep it dark even when
       the browser tries to force a light scheme. */
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    max-width: 100vw;
    background: #050403;
    background: radial-gradient(ellipse at 50% 0%, #1a1411 0%, #0a0807 55%, #050403 100%);
    color: #F5EFE3;
    color-scheme: dark;
    padding: clamp(56px, 8vw, 96px) 0 clamp(48px, 8vw, 96px);
    overflow: hidden;
    margin-top: 0;
    margin-bottom: 0;
}
.pm-learn-v4 .pm-piano-sec .pm-sec-header h2 { color: #F5EFE3; }
.pm-learn-v4 .pm-piano-sec .pm-sec-header p { color: rgba(245, 239, 227, 0.62); }
.pm-learn-v4 .pm-piano-sec .pm-badge { background: rgba(215, 191, 129, 0.10); color: var(--gold); border-color: rgba(215, 191, 129, 0.30); }

/* ambient room */
.pm-learn-v4 .pm-stage-room { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.pm-learn-v4 .pm-stage-beam {
    position: absolute; top: -10%; width: 200px; height: 140%;
    background: linear-gradient(180deg, transparent, rgba(215, 191, 129, 0.06), transparent);
    filter: blur(40px);
    transform: rotate(8deg);
}
.pm-learn-v4 .pm-stage-beam.b1 { left: 10%; }
.pm-learn-v4 .pm-stage-beam.b2 { left: 70%; transform: rotate(-8deg); }
.pm-learn-v4 .pm-stage-bg-note {
    position: absolute; font-family: var(--serif); font-style: italic;
    color: rgba(215, 191, 129, 0.18); font-size: 28px;
    animation: pmBgNoteDrift 18s linear infinite;
}
@keyframes pmBgNoteDrift {
    0%   { transform: translate(0, 30px) rotate(-6deg); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translate(var(--dx, 40px), -260px) rotate(6deg); opacity: 0; }
}
.pm-learn-v4 .pm-piano-glow {
    position: absolute; left: 50%; top: 55%;
    width: 700px; height: 360px;
    transform: translate(-50%, -50%);
    pointer-events: none; z-index: 0;
    filter: blur(90px); opacity: 0;
    background: radial-gradient(ellipse, var(--kc-aura, var(--gold)), transparent 65%);
    transition: background .6s var(--ease-out), opacity .6s;
}
.pm-learn-v4 .pm-piano-glow.on { opacity: 0.55; }

.pm-learn-v4 .pm-piano-stage {
    position: relative; z-index: 2;
    max-width: 1120px;
    margin: 18px auto 0;
    padding: 0 clamp(12px, 3vw, 32px);
}
.pm-learn-v4 .pm-stage-hint {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--mono); font-size: 10px; letter-spacing: 0.20em; text-transform: uppercase;
    color: var(--gold); font-weight: 600;
    padding: 6px 12px; border-radius: 100px;
    background: rgba(215, 191, 129, 0.08);
    border: 1px solid rgba(215, 191, 129, 0.25);
    margin: 0 auto 22px;
}
.pm-learn-v4 .pm-stage-hint__dot {
    width: 6px; height: 6px; border-radius: 50%; background: var(--gold);
    box-shadow: 0 0 0 0 var(--gold);
    animation: pmHintPulse 1.6s ease-out infinite;
}
@keyframes pmHintPulse {
    0%   { box-shadow: 0 0 0 0 rgba(215, 191, 129, 0.6); }
    100% { box-shadow: 0 0 0 12px rgba(215, 191, 129, 0); }
}

/* piano cabinet */
.pm-learn-v4 .pm-piano-cabinet {
    position: relative;
    background: linear-gradient(180deg, #2a1f17 0%, #1a120c 60%, #0c0805 100%);
    border-radius: 16px 16px 22px 22px;
    padding: 14px 10px 22px;
    box-shadow:
        0 80px 120px -50px rgba(0, 0, 0, 0.9),
        0 30px 60px -20px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(215, 191, 129, 0.12),
        inset 0 -1px 0 rgba(0, 0, 0, 0.6);
}
.pm-learn-v4 .pm-piano-cabinet::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent 5%, rgba(215, 191, 129, 0.4) 50%, transparent 95%);
}
.pm-learn-v4 .pm-piano-fallboard {
    display: flex; align-items: center; justify-content: space-between;
    padding: 4px 14px 10px;
    font-family: var(--serif); font-style: italic;
    font-size: 11px; letter-spacing: 0.22em;
    color: rgba(215, 191, 129, 0.55);
}
.pm-learn-v4 .pm-piano-fallboard__brand { display: flex; align-items: center; gap: 6px; }
.pm-learn-v4 .pm-piano-fallboard__brand::before { content: "♪"; color: var(--gold); font-size: 13px; }
.pm-learn-v4 .pm-piano-fallboard__streak {
    display: inline-flex; align-items: center; gap: 5px;
    font-family: var(--mono); font-size: 10px; letter-spacing: 0.15em;
    text-transform: uppercase; color: #FFB347; font-style: normal;
}
.pm-learn-v4 .pm-piano-felt {
    height: 6px; margin: 0 2px 6px;
    background: linear-gradient(180deg, #7a1c1c 0%, #4a1010 60%, #2a0808 100%);
    border-radius: 1px;
    box-shadow: inset 0 -1px 2px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 80, 80, 0.15);
}
.pm-learn-v4 .pm-keyboard-rim {
    background: linear-gradient(180deg, #050403 0%, #0a0806 100%);
    padding: 4px 4px 8px;
    border-radius: 4px 4px 14px 14px;
    box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.5);
}
.pm-learn-v4 .pm-piano-keyboard {
    position: relative;
    display: flex; gap: 2px;
    height: 240px;
}

/* white key. Explicit z-index keeps it above any decorative overlay
   (particles, beams) so taps always reach the key. */
.pm-learn-v4 .pm-pkey-white {
    flex: 1; min-width: 0;
    position: relative; cursor: pointer;
    z-index: 2;
    background: linear-gradient(180deg, #FEFCF6 0%, #F5F0DD 70%, #E0D7BC 100%);
    border-radius: 0 0 6px 6px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: space-between;
    padding: 10px 4px 16px;
    text-align: center;
    transition: transform .12s var(--ease-out), box-shadow .18s var(--ease-out), background .2s;
    box-shadow:
        inset 0 -2px 0 rgba(180, 168, 130, 0.18),
        inset 1px 0 0 rgba(0, 0, 0, 0.04),
        inset -1px 0 0 rgba(0, 0, 0, 0.04),
        0 6px 14px rgba(0, 0, 0, 0.45);
    -webkit-tap-highlight-color: transparent;
    border: 0;
}
.pm-learn-v4 .pm-pkey-white::before {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 30%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent);
    pointer-events: none;
}
.pm-learn-v4 .pm-pkey-white:hover {
    background: linear-gradient(180deg, #FFFFFF 0%, #F8F3E0 70%, #E5DBBF 100%);
    transform: translateY(2px);
    box-shadow:
        inset 0 -1px 0 rgba(180, 168, 130, 0.20),
        0 4px 10px rgba(0, 0, 0, 0.45),
        0 0 32px var(--kc, var(--gold));
}
.pm-learn-v4 .pm-pkey-white.active {
    background: linear-gradient(180deg, #FFFFFF 0%, #FDF8E5 70%, #F0E5BE 100%);
    transform: translateY(6px);
    box-shadow:
        inset 0 0 0 2px var(--kc, var(--gold)),
        inset 0 0 24px color-mix(in srgb, var(--kc, var(--gold)) 25%, transparent),
        0 0 60px var(--kc, var(--gold));
}
.pm-learn-v4 .pm-pkey-white.active::after {
    content: ""; position: absolute; inset: -8px -4px;
    border-radius: 0 0 12px 12px;
    background: radial-gradient(ellipse at top, var(--kc, var(--gold)), transparent 70%);
    filter: blur(20px); opacity: 0.5; z-index: -1;
    pointer-events: none;
}
.pm-learn-v4 .pm-pkey-surface {
    display: flex; flex-direction: column; align-items: center; justify-content: space-between;
    width: 100%; height: 100%; gap: 6px;
    position: relative; z-index: 1;
}
.pm-learn-v4 .pm-pkey-top-area { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pm-learn-v4 .pm-pkey-note {
    font-family: var(--serif); font-style: italic; font-weight: 400;
    font-size: clamp(28px, 7vw, 56px); line-height: 0.95;
    color: rgba(60, 50, 35, 0.4);
    letter-spacing: -0.03em;
    font-variation-settings: "opsz" 96;
    transition: color .25s, transform .3s var(--ease-out);
}
.pm-learn-v4 .pm-pkey-white:hover .pm-pkey-note { color: rgba(60, 50, 35, 0.7); }
.pm-learn-v4 .pm-pkey-white.active .pm-pkey-note { color: var(--kc, var(--gold)); transform: scale(1.08); }
.pm-learn-v4 .pm-pkey-bottom-area { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; }
.pm-learn-v4 .pm-pkey-title {
    font-family: var(--sans); font-size: 9px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.10em;
    color: var(--ink); white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.pm-learn-v4 .pm-pkey-white.active .pm-pkey-title { color: var(--kc, var(--gold)); }
.pm-learn-v4 .pm-pkey-sub {
    font-family: var(--mono); font-size: 8px; letter-spacing: 0.10em;
    color: var(--text-3); white-space: nowrap;
}
.pm-learn-v4 .pm-pkey-prog {
    display: flex; align-items: center; gap: 5px;
    width: 80%;
}
.pm-learn-v4 .pm-pkey-pbar {
    flex: 1; height: 3px; border-radius: 100px;
    background: rgba(0, 0, 0, 0.10);
    overflow: hidden;
}
.pm-learn-v4 .pm-pkey-pfill {
    height: 100%;
    background: linear-gradient(90deg, var(--kc, var(--gold)), color-mix(in srgb, var(--kc, var(--gold)) 60%, white));
    border-radius: 100px;
    transition: width .6s;
}
.pm-learn-v4 .pm-pkey-pnum {
    font-family: var(--mono); font-size: 8px; letter-spacing: 0.05em;
    color: var(--text-3); flex-shrink: 0;
}
.pm-learn-v4 .pm-pkey-soon {
    font-family: var(--mono); font-size: 8px; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--text-4);
}
.pm-learn-v4 .pm-pkey-front { display: none; }

/* black keys, purely decorative. pointer-events:none + z-index above
   the decorative layer so they sit visually on top but never intercept
   a tap. */
.pm-learn-v4 .pm-pkey-black {
    position: absolute; top: 0;
    width: 11.5%; height: 62%;
    z-index: 3;
    pointer-events: none !important;
    background: linear-gradient(180deg, #2c2520 0%, #161108 50%, #050403 100%);
    border-radius: 0 0 4px 4px;
    box-shadow:
        inset 0 -4px 0 #000,
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        inset -2px 0 4px rgba(0, 0, 0, 0.6),
        inset 2px 0 4px rgba(0, 0, 0, 0.6),
        0 6px 10px rgba(0, 0, 0, 0.7);
}
.pm-learn-v4 .pm-pkey-black::before {
    content: ""; position: absolute; top: 6px; left: 5px; right: 5px; height: 30%;
    background: linear-gradient(180deg, rgba(215, 191, 129, 0.08), transparent);
    border-radius: 0 0 3px 3px;
}
.pm-learn-v4 .pm-pkey-black::after {
    content: ""; position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%);
    width: 4px; height: 4px; border-radius: 50%;
    background: rgba(215, 191, 129, 0.3);
}
.pm-learn-v4 .pm-pkey-black.bk-1 { left: calc(20% - 5.75%); }
.pm-learn-v4 .pm-pkey-black.bk-2 { left: calc(40% - 5.75%); }
.pm-learn-v4 .pm-pkey-black.bk-3 { left: calc(80% - 5.75%); }

/* string vibration line */
.pm-learn-v4 .pm-piano-strings {
    display: flex; justify-content: space-around;
    height: 14px; padding: 4px 8px;
    margin-top: 4px;
    opacity: 0.5;
}
.pm-learn-v4 .pm-piano-strings span {
    width: 1px; background: rgba(215, 191, 129, 0.4);
    transition: transform .3s var(--ease-out);
}
.pm-learn-v4 .pm-piano-strings.vibrate span {
    animation: pmStringVib 0.8s ease-out;
}
@keyframes pmStringVib {
    0%, 100% { transform: scaleY(1); }
    20%      { transform: scaleY(0.4); background: var(--kc, var(--gold)); }
    60%      { transform: scaleY(1.4); }
}

/* particles + xp pop. The layer must never intercept clicks on the
   keys beneath it. */
.pm-learn-v4 .pm-piano-particles {
    position: absolute; inset: 0;
    pointer-events: none !important;
    overflow: visible;
    z-index: 4;
}
.pm-learn-v4 .pm-particle {
    position: absolute;
    pointer-events: none !important;
    font-family: var(--serif); font-style: italic; font-weight: 500;
    color: var(--gold); font-size: 18px;
    text-shadow: 0 0 12px var(--kc, var(--gold));
    animation: pmParticleBurst 1s var(--ease-out) forwards;
}
@keyframes pmParticleBurst {
    0%   { opacity: 0; transform: translate(0, 0) scale(0.4) rotate(0deg); }
    20%  { opacity: 1; transform: translate(calc(var(--dx) * 0.3), calc(var(--dy) * 0.3)) scale(1.2) rotate(20deg); }
    100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.6) rotate(60deg); }
}
.pm-learn-v4 .pm-xp-pop {
    position: absolute; top: 30%; left: 50%; transform: translate(-50%, 0);
    font-family: var(--mono); font-size: 13px; font-weight: 700;
    color: var(--gold);
    text-shadow: 0 0 16px var(--kc, var(--gold));
    letter-spacing: 0.05em;
    animation: pmXpPop 1s var(--ease-out) forwards;
    pointer-events: none; z-index: 10; white-space: nowrap;
}
@keyframes pmXpPop {
    0%   { opacity: 0; transform: translate(-50%, 10px) scale(0.7); }
    20%  { opacity: 1; transform: translate(-50%, -8px) scale(1.1); }
    100% { opacity: 0; transform: translate(-50%, -50px) scale(0.9); }
}

/* PIANO LEVEL CALLOUT (under the cabinet) */
.pm-learn-v4 .pm-piano-callout {
    margin: clamp(20px, 4vw, 32px) auto 0;
    text-align: center;
    max-width: 720px;
    padding: 0 16px;
}
.pm-learn-v4 .pm-piano-callout__chord {
    display: inline-flex; align-items: baseline; gap: 12px;
    color: #F5EFE3;
    margin-bottom: 6px;
    flex-wrap: wrap; justify-content: center;
}
.pm-learn-v4 .pm-piano-callout__note {
    font-family: var(--serif); font-style: italic; font-weight: 300;
    font-size: clamp(40px, 8vw, 80px); line-height: 1;
    color: var(--kc-aura, var(--gold));
    letter-spacing: -0.02em;
    font-variation-settings: "opsz" 144;
    transition: color .5s;
}
.pm-learn-v4 .pm-piano-callout__title {
    font-family: var(--serif); font-weight: 400;
    font-size: clamp(20px, 3vw, 32px); letter-spacing: -0.015em;
    overflow: visible;
    padding-bottom: 0.06em;
}
.pm-learn-v4 .pm-piano-callout__title em {
    display: inline;
    font-style: italic;
    color: #F5EFE3;
}
.pm-learn-v4 .pm-piano-callout__sub {
    font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
    color: rgba(245, 239, 227, 0.45); margin-bottom: 16px;
}

/* ════════════════════════════════════════════════════════════════════════════
   5.  WHAT YOU WILL LEARN — compact inline strip below the keyboard
   ----------------------------------------------------------------------------
   Lives inside the dark piano section. A single sticky toggle reveals a
   compact 4-up grid summarising what the learner unlocks at the active
   level. Never modal, never tall.
   ════════════════════════════════════════════════════════════════════════════ */
.pm-learn-v4 .pm-wyl-strip {
    position: relative; z-index: 3;
    max-width: 1120px;
    width: calc(100% - clamp(20px, 4vw, 64px));
    margin: clamp(20px, 3vw, 32px) auto 0;
    background: rgba(245, 239, 227, 0.04);
    border: 1px solid rgba(215, 191, 129, 0.18);
    border-radius: 16px;
    color: rgba(245, 239, 227, 0.86);
    overflow: hidden;
    transition: border-color .25s, background .25s;
}
.pm-learn-v4 .pm-wyl-strip:hover { border-color: rgba(215, 191, 129, 0.35); }

.pm-learn-v4 .pm-wyl-strip-toggle {
    width: 100%;
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px clamp(18px, 3vw, 26px);
    background: transparent; border: 0; cursor: pointer;
    color: rgba(245, 239, 227, 0.92);
}
.pm-learn-v4 .pm-wyl-strip-toggle__lbl {
    font-family: var(--sans);
    font-size: 12px; letter-spacing: 0.10em; text-transform: uppercase;
    font-weight: 600;
    color: var(--gold);
}
.pm-learn-v4 .pm-wyl-strip-toggle__lbl em {
    font-family: var(--serif); font-style: italic; font-weight: 400;
    font-size: 15px;
    letter-spacing: 0;
    text-transform: none;
    color: rgba(245, 239, 227, 0.95);
    margin-left: 4px;
    padding: 0 0.10em 0.04em 0;
}
.pm-learn-v4 .pm-wyl-strip-toggle__chev {
    color: var(--gold);
    transition: transform .3s var(--ease-out);
}
.pm-learn-v4 .pm-wyl-strip[data-open="true"] .pm-wyl-strip-toggle__chev { transform: rotate(180deg); }

.pm-learn-v4 .pm-wyl-strip-body {
    display: grid; grid-template-columns: 1fr; gap: 0;
    max-height: 0; overflow: hidden;
    transition: max-height .4s var(--ease-out);
}
.pm-learn-v4 .pm-wyl-strip[data-open="true"] .pm-wyl-strip-body {
    /* Set generous max-height; content rarely exceeds 320px on mobile. */
    max-height: 720px;
}
.pm-learn-v4 .pm-wyl-cat {
    padding: 14px clamp(18px, 3vw, 26px) 16px;
    border-top: 1px solid rgba(215, 191, 129, 0.10);
}
.pm-learn-v4 .pm-wyl-cat-line {
    display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
    margin-bottom: 4px;
}
.pm-learn-v4 .pm-wyl-cat-name {
    font-family: var(--sans); font-weight: 700;
    font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
    color: rgba(245, 239, 227, 0.95);
}
.pm-learn-v4 .pm-wyl-cat-count {
    font-family: var(--sans); font-weight: 500;
    font-size: 11px; letter-spacing: 0.06em;
    color: var(--gold);
}
.pm-learn-v4 .pm-wyl-cat-preview {
    font-family: var(--serif); font-weight: 300;
    font-size: 14px; line-height: 1.5;
    color: rgba(245, 239, 227, 0.72);
    margin: 0;
}
.pm-learn-v4 .pm-wyl-cat-preview em {
    font-style: italic; color: var(--gold);
}

/* ════════════════════════════════════════════════════════════════════════════
   6.  LEVEL DETAIL CARD
   ════════════════════════════════════════════════════════════════════════════ */
.pm-learn-v4 .pm-ld-panel {
    position: relative; z-index: 3;
    margin: clamp(28px, 5vw, 56px) auto 0;
    max-width: 1120px;
    width: calc(100% - clamp(20px, 4vw, 64px));
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: clamp(24px, 4vw, 40px);
    overflow: hidden;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .5s var(--ease-out), transform .5s var(--ease-out);
}
.pm-learn-v4 .pm-ld-panel.visible { opacity: 1; transform: translateY(0); }
.pm-learn-v4 .pm-ld-panel::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, transparent, var(--mc, var(--gold)), transparent);
}
.pm-learn-v4 .pm-ld-top {
    display: flex; gap: 18px; align-items: flex-start;
    flex-wrap: wrap; margin-bottom: 24px;
}
.pm-learn-v4 .pm-ld-left {
    display: flex; align-items: flex-start; gap: 16px;
    flex: 1; min-width: 240px;
}
.pm-learn-v4 .pm-ld-icon-wrap {
    flex-shrink: 0;
    width: 56px; height: 56px; border-radius: 16px;
    display: grid; place-items: center;
    background: var(--gold-soft);
    border: 1px solid var(--gold-border);
    color: var(--gold-deep);
}
.pm-learn-v4 .pm-ld-panel h3 {
    font-family: var(--serif); font-weight: 400;
    font-size: clamp(22px, 3vw, 32px); line-height: 1.1; letter-spacing: -0.015em;
    color: var(--ink); margin: 0 0 6px;
}
.pm-learn-v4 .pm-ld-panel p {
    font-family: var(--serif); font-size: 15.5px; font-weight: 300; line-height: 1.5;
    color: var(--text-2); margin: 0; max-width: 540px;
}
.pm-learn-v4 .pm-ld-btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 24px; border-radius: 100px;
    background: var(--ink); color: var(--gold);
    font-size: 13px; font-weight: 600; letter-spacing: 0.05em;
    transition: transform .22s, background .22s, box-shadow .22s;
    flex-shrink: 0;
}
.pm-learn-v4 .pm-ld-btn:hover { background: var(--ink-3); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,0.25); }
.pm-learn-v4 .pm-ld-stats {
    display: grid; grid-template-columns: repeat(2, 1fr);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 16px 0;
    margin-bottom: 20px;
}
.pm-learn-v4 .pm-ld-stat {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 12px;
    border-right: 1px solid var(--line);
}
.pm-learn-v4 .pm-ld-stat:nth-child(2n) { border-right: 0; }
.pm-learn-v4 .pm-ld-stat svg { color: var(--gold-deep); flex-shrink: 0; }
.pm-learn-v4 .pm-ld-stat-val {
    font-family: var(--serif); font-style: italic; font-weight: 500;
    font-size: 22px; color: var(--ink); line-height: 1;
}
.pm-learn-v4 .pm-ld-stat-lbl {
    font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--text-3); margin-left: auto;
}
.pm-learn-v4 .pm-ld-assess-link {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 14px; border-radius: 12px;
    background: var(--gold-soft); border: 1px solid var(--gold-border);
    color: var(--text-2); font-size: 13px;
}
.pm-learn-v4 .pm-ld-assess-link a { color: var(--gold-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ════════════════════════════════════════════════════════════════════════════
   7.  REASSURANCE GRID
   ════════════════════════════════════════════════════════════════════════════ */
.pm-learn-v4 .pm-reassurance {
    /* Match the Level Detail card width (1120px content + clamp gutter)
       so the reassurance grid sits perfectly aligned beneath it. */
    max-width: 1120px;
    margin: clamp(36px, 6vw, 72px) auto;
    padding: 0 clamp(20px, 4vw, 32px);
    width: calc(100% - clamp(20px, 4vw, 64px));
}
.pm-learn-v4 .pm-reassurance-grid {
    display: grid; grid-template-columns: 1fr; gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 18px; overflow: hidden;
}
.pm-learn-v4 .pm-reassure-item {
    padding: 28px 24px;
    background: #fff;
    display: flex; flex-direction: column; gap: 10px;
    transition: background .25s;
}
.pm-learn-v4 .pm-reassure-item:hover { background: var(--paper-2); }
.pm-learn-v4 .pm-reassure-item svg { color: var(--gold-deep); }
.pm-learn-v4 .pm-reassure-item h4 {
    font-family: var(--serif); font-size: 19px; font-weight: 500;
    color: var(--ink); letter-spacing: -0.01em; margin: 0;
}
.pm-learn-v4 .pm-reassure-item p { font-size: 13.5px; color: var(--text-2); line-height: 1.55; margin: 0; }

/* ════════════════════════════════════════════════════════════════════════════
   8.  MODULES (Duolingo zig-zag path)
   ════════════════════════════════════════════════════════════════════════════ */
.pm-learn-v4 .pm-modules-sec {
    max-width: 880px;
    margin: clamp(48px, 8vw, 96px) auto;
    padding: 0 clamp(16px, 4vw, 32px);
    position: relative;
}
.pm-learn-v4 .pm-modules-list {
    position: relative;
    max-width: 720px; margin: 0 auto;
    padding: clamp(20px, 4vw, 36px) 0;
}
.pm-learn-v4 .pm-modules-list::before {
    content: ""; position: absolute; left: 50%; top: 30px; bottom: 30px; width: 2px;
    background: repeating-linear-gradient(180deg, var(--line) 0, var(--line) 6px, transparent 6px, transparent 12px);
    transform: translateX(-50%);
    z-index: 0;
}

/* Show only the first 5 modules by default. The rest fade out under
   a soft paper gradient with a "Show all" CTA pinned at the bottom.
   Click the toggle to reveal everything. */
.pm-learn-v4 .pm-mod-hidden { display: none; }
.pm-learn-v4 .pm-modules-list.pm-modules-collapsed .pm-mod-wrapper:nth-of-type(5)::after {
    content: "";
    position: absolute; left: 0; right: 0; bottom: -28px; height: 200px;
    pointer-events: none;
    background: linear-gradient(180deg, transparent 0%, var(--paper) 70%);
    z-index: 4;
}
.pm-learn-v4 .pm-modules-list:not(.pm-modules-collapsed) .pm-mod-hidden {
    display: block;
    animation: pmFadeUp .35s var(--ease-out) both;
}
.pm-learn-v4 .pm-modules-fade {
    position: relative; height: 12px;
}
.pm-learn-v4 .pm-modules-list:not(.pm-modules-collapsed) .pm-modules-fade { display: none; }

.pm-learn-v4 .pm-modules-show-all {
    display: inline-flex; align-items: center; gap: 8px;
    margin: 18px auto 0;
    padding: 12px 22px; border-radius: 100px;
    background: var(--ink); color: var(--gold);
    font-family: var(--sans);
    font-size: 12px; font-weight: 600; letter-spacing: 0.06em;
    cursor: pointer;
    border: 0;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
    transition: transform .2s, box-shadow .2s;
    position: relative; z-index: 5;
}
.pm-learn-v4 .pm-modules-show-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.25);
}
.pm-learn-v4 .pm-modules-show-all svg { transition: transform .3s; }
.pm-learn-v4 .pm-modules-list:not(.pm-modules-collapsed) .pm-modules-show-all svg { transform: rotate(180deg); }
.pm-learn-v4 .pm-modules-list.pm-modules-collapsed .pm-modules-show-all-collapse,
.pm-learn-v4 .pm-modules-list:not(.pm-modules-collapsed) .pm-modules-show-all-label { display: none; }

/* Center the "Show all" button below the list. */
.pm-learn-v4 .pm-modules-list .pm-modules-show-all {
    display: flex;
    margin-left: auto; margin-right: auto;
    width: max-content;
}
.pm-learn-v4 .pm-mod-wrapper {
    position: relative; z-index: 1;
    margin-bottom: 14px;
}
.pm-learn-v4 .pm-mod-wrapper:nth-child(odd) .pm-mod-row { flex-direction: row; }
.pm-learn-v4 .pm-mod-wrapper:nth-child(even) .pm-mod-row { flex-direction: row-reverse; }
.pm-learn-v4 .pm-mod-wrapper:nth-child(even) .pm-mod-row .pm-mod-info { text-align: right; }
.pm-learn-v4 .pm-mod-wrapper:nth-child(even) .pm-mod-row .pm-mod-meta { justify-content: flex-end; }
.pm-learn-v4 .pm-mod-row {
    display: flex; align-items: center; gap: clamp(14px, 3vw, 24px);
    padding: 0;
    background: transparent; border: 0;
    text-decoration: none; color: inherit;
}
.pm-learn-v4 .pm-mod-num {
    flex: 0 0 64px; height: 64px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--mc, var(--gold));
    font-family: var(--serif); font-style: italic; font-weight: 500;
    font-size: 24px; color: var(--mc, var(--gold));
    box-shadow: 0 6px 0 color-mix(in srgb, var(--mc, var(--gold)) 25%, transparent), 0 12px 22px rgba(0, 0, 0, 0.07);
    transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out);
    position: relative;
}
.pm-learn-v4 .pm-mod-num.check {
    background: var(--mc, var(--gold)); color: #fff; border-color: var(--mc, var(--gold));
}
.pm-learn-v4 .pm-mod-row:hover .pm-mod-num {
    transform: translateY(-3px);
    box-shadow: 0 10px 0 color-mix(in srgb, var(--mc, var(--gold)) 30%, transparent), 0 16px 30px rgba(0, 0, 0, 0.10);
}
.pm-learn-v4 .pm-mod-row-gated .pm-mod-num {
    background: var(--paper-2); color: var(--text-4);
    border-color: var(--line-2);
    box-shadow: 0 4px 0 var(--line);
}
.pm-learn-v4 .pm-mod-info {
    flex: 1; min-width: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px 22px;
    transition: border-color .25s, transform .25s, box-shadow .25s;
}
.pm-learn-v4 .pm-mod-info-head {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin-bottom: 6px;
}
.pm-learn-v4 .pm-mod-info-head h3 { margin: 0; }
.pm-learn-v4 .pm-mod-actions {
    /* Two pill buttons (Explore module + Show lessons). Both must read as
       the same shape so the row looks intentional, not "primary CTA + a
       slightly-different secondary toggle". align-items:stretch + a shared
       height variable keeps them lockstep on desktop, and the @media
       (max-width:600px) block at the bottom of this file collapses them
       into a vertical stack. */
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}
.pm-learn-v4 .pm-mod-open-btn,
.pm-learn-v4 .pm-mod-show-lessons {
    /* Identical geometry so the two pills line up perfectly. Anything
       below this baseline is a per-button colour / hover override. */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 38px;
    padding: 0 18px;
    border-radius: 100px;
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1;
    text-decoration: none;
    box-sizing: border-box;
    transition: transform .2s, box-shadow .2s, filter .2s, background .2s, color .2s, border-color .2s;
}
.pm-learn-v4 .pm-mod-open-btn {
    background: var(--mc, var(--gold));
    color: var(--ink);
    border: 1px solid transparent;
}
.pm-learn-v4 .pm-mod-open-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
    box-shadow: 0 8px 18px color-mix(in srgb, var(--mc, var(--gold)) 40%, transparent);
}
.pm-learn-v4 .pm-mod-row-gated .pm-mod-open-btn { display: none; }
.pm-learn-v4 .pm-mod-row:hover .pm-mod-info {
    border-color: var(--mc, var(--gold));
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
}
.pm-learn-v4 .pm-mod-info h3 {
    font-family: var(--serif); font-weight: 500;
    font-size: 21px; line-height: 1.15; letter-spacing: -0.01em;
    color: var(--ink); margin: 0 0 6px;
}
.pm-learn-v4 .pm-mod-info p {
    font-size: 13.5px; color: var(--text-2); line-height: 1.5; margin: 0 0 10px;
}
.pm-learn-v4 .pm-mod-meta {
    display: inline-flex; gap: 14px; align-items: center;
    flex-wrap: wrap;
    font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em;
    color: var(--text-3);
}
.pm-learn-v4 .pm-mod-meta span { display: inline-flex; align-items: center; gap: 4px; }
.pm-learn-v4 .pm-mod-bar {
    margin-top: 10px; height: 4px;
    background: var(--paper-2); border-radius: 100px; overflow: hidden;
}
.pm-learn-v4 .pm-mod-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--mc, var(--gold)), color-mix(in srgb, var(--mc, var(--gold)) 60%, white));
    border-radius: 100px;
    transition: width .6s;
}
.pm-learn-v4 .pm-mod-coming-soon-badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-family: var(--mono); font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase;
    padding: 3px 8px; border-radius: 100px;
    background: var(--gold-soft); border: 1px solid var(--gold-border);
    color: var(--gold-deep); margin-left: 6px;
}
.pm-learn-v4 .pm-mod-arrow {
    flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
    display: grid; place-items: center;
    color: var(--text-3); transition: color .2s, transform .2s;
}
.pm-learn-v4 .pm-mod-row:hover .pm-mod-arrow { color: var(--mc, var(--gold)); transform: translateX(4px); }

/* show lessons toggle — shares geometry with .pm-mod-open-btn (height,
   padding, border-radius, transition). Only the visual identity (colours,
   border) is set here so the two pills sit on the same baseline with the
   same intrinsic height. */
.pm-learn-v4 .pm-mod-show-lessons {
    /* The button always renders on the white .pm-mod-info card, so its
       contrast must come from explicit (not token-driven) colors. Tokens
       like --paper-2 / --text-2 flip with prefers-color-scheme and would
       paint dark text on a still-white card in dark mode. We fix the
       palette here to gold-soft / gold-deep which read on white in either
       mode. */
    background: rgba(215, 191, 129, 0.12);
    border: 1px solid rgba(215, 191, 129, 0.32);
    color: #6b563d;
    cursor: pointer;
}
.pm-learn-v4 .pm-mod-show-lessons:hover {
    background: rgba(215, 191, 129, 0.22);
    color: #5a472f;
    border-color: rgba(215, 191, 129, 0.55);
    transform: translateY(-1px);
}
.pm-learn-v4 .pm-mod-show-lessons:focus-visible {
    outline: 2px solid #D7BF81;
    outline-offset: 2px;
}
.pm-learn-v4 .pm-mod-show-arrow { transition: transform .3s; }
.pm-learn-v4 .pm-mod-show-lessons.open .pm-mod-show-arrow,
.pm-learn-v4 .pm-mod-show-lessons[aria-expanded="true"] .pm-mod-show-arrow { transform: rotate(180deg); }

/* Lessons panel now lives INSIDE the white .pm-mod-info card so the card
   itself grows when expanded. No zigzag-side offset, the panel always
   spans the full inner width of the card. */
.pm-learn-v4 .pm-mod-info .pm-mod-lessons-panel {
    margin: 14px 0 0;
    overflow: hidden;
    transition: max-height .45s var(--ease-out), margin .3s, padding .3s;
    max-height: 4000px;
}
.pm-learn-v4 .pm-mod-info .pm-mod-lessons-panel.pm-collapsed { max-height: 0; margin-top: 0; }
/* Override the older zigzag-aware rules that pushed the panel outside the
   card on right-side modules. */
.pm-learn-v4 .pm-mod-wrapper:nth-child(even) .pm-mod-info .pm-mod-lessons-panel {
    margin: 14px 0 0;
}

/* Lesson cards always render in a single column inside the info card,
   so the title never gets clipped on either side. On wider screens we
   still show 2 columns but each card uses min-width:0 to wrap. */
.pm-learn-v4 .pm-mod-info .pm-lessons-grid {
    grid-template-columns: 1fr;
    padding-top: 12px;
    border-top: 1px dashed var(--line);
}
@media (min-width: 760px) {
    .pm-learn-v4 .pm-mod-info .pm-lessons-grid {
        grid-template-columns: 1fr 1fr;
    }
}
.pm-learn-v4 .pm-mod-info .pm-lcard {
    min-width: 0;
}
.pm-learn-v4 .pm-mod-info .pm-lcard-body { min-width: 0; }
/* Allow lesson titles to wrap to two lines without truncation. */
.pm-learn-v4 .pm-lcard-body h4 { white-space: normal; line-height: 1.35; }
.pm-learn-v4 .pm-lessons-grid {
    display: grid; grid-template-columns: 1fr; gap: 8px;
    padding-top: 12px; border-top: 1px dashed var(--line);
}

.pm-learn-v4 .pm-lcard {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    text-align: left; text-decoration: none; color: inherit;
    transition: border-color .2s, background .2s, transform .2s;
}
.pm-learn-v4 .pm-lcard:hover { border-color: var(--lc, var(--gold)); background: var(--paper); transform: translateY(-1px); }
.pm-learn-v4 .pm-lcard-num {
    width: 30px; height: 30px; border-radius: 50%;
    display: grid; place-items: center;
    font-family: var(--mono); font-size: 11px; font-weight: 600;
    background: #fff; border: 1.5px solid var(--lc, var(--gold)); color: var(--lc, var(--gold));
    flex-shrink: 0;
}
.pm-learn-v4 .pm-lcard-done .pm-lcard-num { background: var(--lc, var(--gold)); color: #fff; }
.pm-learn-v4 .pm-lcard-locked { opacity: 0.6; }
.pm-learn-v4 .pm-lcard-locked .pm-lcard-num { background: var(--paper-2); border-color: var(--line-2); color: var(--text-4); }
.pm-learn-v4 .pm-lcard-body { flex: 1; min-width: 0; }
.pm-learn-v4 .pm-lcard-body h4 {
    font-family: var(--sans); font-weight: 600; font-size: 13px;
    color: var(--ink);
    /* Always wrap to 2 lines max so long titles never truncate to "..." */
    white-space: normal;
    line-height: 1.35;
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.pm-learn-v4 .pm-lcard-meta {
    display: flex; gap: 12px; flex-wrap: wrap;
    font-family: var(--mono); font-size: 10px; letter-spacing: 0.04em;
    color: var(--text-3); margin-top: 3px;
}
.pm-learn-v4 .pm-lcard-meta span { display: inline-flex; align-items: center; gap: 3px; }
.pm-learn-v4 .pm-lcard-quiz { color: var(--gold-deep); font-weight: 600; }
.pm-learn-v4 .pm-lcard-arrow { color: var(--text-3); flex-shrink: 0; }

.pm-learn-v4 .pm-empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-3);
    background: var(--paper-2);
    border: 1px dashed var(--line-2);
    border-radius: 18px;
}
.pm-learn-v4 .pm-empty-state svg { color: var(--gold-deep); margin: 0 auto 16px; }
.pm-learn-v4 .pm-empty-state p { font-family: var(--serif); font-size: 16px; font-weight: 300; margin: 0; }

/* ════════════════════════════════════════════════════════════════════════════
   9.  SPECIALIZED COURSES (editorial typographic list)
   ════════════════════════════════════════════════════════════════════════════ */
.pm-learn-v4 .pm-bonus-modules-wrap {
    /* Full-bleed dark band for Specialized Courses. */
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    max-width: 100vw;
    background: #14110D;
    color: #F5EFE3;
    color-scheme: dark;
    padding: clamp(60px, 10vw, 120px) 0;
    overflow: hidden;
}
.pm-learn-v4 .pm-bonus-modules-sec {
    max-width: 1280px; margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 40px);
}
.pm-learn-v4 .pm-bonus-modules-sec .pm-sec-header h2 { color: #F5EFE3; }
.pm-learn-v4 .pm-bonus-modules-sec .pm-sec-header p { color: rgba(245, 239, 227, 0.62); }
.pm-learn-v4 .pm-bonus-modules-sec .pm-badge {
    background: rgba(215, 191, 129, 0.10); color: var(--gold);
    border-color: rgba(215, 191, 129, 0.30);
}

/* "Change level" pill — sits below the SC subtitle and scrolls back
   to the keyboard so the visitor can switch the active level. */
.pm-learn-v4 .pm-bonus-change-level {
    display: inline-flex; align-items: center; gap: 8px;
    margin: 16px auto 0;
    padding: 10px 18px; border-radius: 100px;
    background: rgba(215, 191, 129, 0.10);
    color: var(--gold);
    border: 1px solid rgba(215, 191, 129, 0.32);
    font-family: var(--sans);
    font-size: 12px; font-weight: 600; letter-spacing: 0.06em;
    cursor: pointer;
    transition: background .2s, border-color .2s, transform .2s;
}
.pm-learn-v4 .pm-bonus-change-level:hover {
    background: rgba(215, 191, 129, 0.20);
    border-color: var(--gold);
    transform: translateY(-1px);
}
.pm-learn-v4 .pm-bonus-modules-sec .pm-sec-header p strong {
    font-weight: 600; color: var(--gold);
}

.pm-learn-v4 .pm-bonus-cat { margin-bottom: clamp(28px, 5vw, 48px); }

/* SC categories: show max 2 courses by default; the rest fade behind
   a "Show all N courses" pill that mirrors the modules show-all
   pattern. Available on both /learn/ and the level taxonomy pages. */
.pm-learn-v4 .pm-bonus-cat.pm-bonus-cat-collapsed .pm-bonus-row:nth-of-type(n+3) {
    display: none;
}
.pm-learn-v4 .pm-bonus-cat-show-all {
    display: flex; align-items: center; gap: 8px; justify-content: center;
    margin: 14px auto 0;
    padding: 10px 22px; border-radius: 100px;
    background: rgba(215, 191, 129, 0.10);
    color: var(--gold);
    border: 1px solid rgba(215, 191, 129, 0.32);
    font-family: var(--sans);
    font-size: 12px; font-weight: 600; letter-spacing: 0.05em;
    cursor: pointer;
    transition: background .2s, transform .2s;
    width: max-content;
}
.pm-learn-v4 .pm-bonus-cat-show-all:hover {
    background: rgba(215, 191, 129, 0.20);
    transform: translateY(-1px);
}
.pm-learn-v4 .pm-bonus-cat-show-all svg { transition: transform .25s; }
.pm-learn-v4 .pm-bonus-cat:not(.pm-bonus-cat-collapsed) .pm-bonus-cat-show-all svg { transform: rotate(180deg); }
.pm-learn-v4 .pm-bonus-cat.pm-bonus-cat-collapsed .pm-bonus-cat-show-all-collapse,
.pm-learn-v4 .pm-bonus-cat:not(.pm-bonus-cat-collapsed) .pm-bonus-cat-show-all-label { display: none; }

/* Category head: number, italic name, hairline, count. No icons. */
.pm-learn-v4 .pm-bonus-cat-head {
    display: flex; align-items: baseline; gap: 14px;
    padding: 10px 4px 14px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(245, 239, 227, 0.10);
}
.pm-learn-v4 .pm-bonus-cat-num {
    font-family: var(--serif); font-style: italic; font-weight: 300;
    font-size: clamp(22px, 3vw, 30px); line-height: 1;
    color: var(--gold);
    font-variation-settings: "opsz" 96;
    flex-shrink: 0;
}
.pm-learn-v4 .pm-bonus-cat-name {
    font-family: var(--serif); font-style: italic; font-weight: 400;
    font-size: clamp(20px, 3vw, 28px); line-height: 1.1;
    color: #F5EFE3;
    margin: 0;
    padding: 0 0.10em 0.04em 0;
}
.pm-learn-v4 .pm-bonus-cat-rule {
    flex: 1; height: 1px;
    background: rgba(245, 239, 227, 0.10);
    align-self: center;
}
.pm-learn-v4 .pm-bonus-cat-count {
    font-family: var(--sans); font-weight: 600;
    font-size: 11px; letter-spacing: 0.10em; text-transform: uppercase;
    color: rgba(245, 239, 227, 0.50);
    flex-shrink: 0;
}

/* Course list inside a category. Each row is a button that toggles
   its own description. Compact by default. */
.pm-learn-v4 .pm-bonus-list {
    display: flex; flex-direction: column;
}
.pm-learn-v4 .pm-bonus-row {
    position: relative;
    border-bottom: 1px solid rgba(245, 239, 227, 0.08);
    color: #F5EFE3;
}
.pm-learn-v4 .pm-bonus-row.pm-bonus-row-locked { opacity: 0.55; }
.pm-learn-v4 .pm-bonus-row::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0;
    width: 0; background: var(--bc, var(--gold));
    transition: width .35s var(--ease-out);
    z-index: 0;
}
.pm-learn-v4 .pm-bonus-row[aria-expanded="true"]::before,
.pm-learn-v4 .pm-bonus-row:hover::before { width: 3px; }

.pm-learn-v4 .pm-bonus-row-head {
    width: 100%;
    display: grid;
    grid-template-columns: 32px 6px 1fr auto auto;
    align-items: center;
    gap: 14px;
    padding: 14px 14px;
    background: transparent; border: 0; cursor: pointer;
    text-align: left; color: inherit;
    transition: background .25s, padding-left .25s;
    position: relative; z-index: 1;
}
.pm-learn-v4 .pm-bonus-row-head:hover { background: rgba(245, 239, 227, 0.025); padding-left: 18px; }
.pm-learn-v4 .pm-bonus-row-num {
    font-family: var(--sans); font-weight: 500;
    font-size: 11px; letter-spacing: 0.10em;
    color: rgba(245, 239, 227, 0.40);
}
.pm-learn-v4 .pm-bonus-row-bar {
    width: 4px; height: 28px; border-radius: 2px;
    background: var(--bc, var(--gold));
    opacity: 0.45;
    transform: scaleY(0.7);
    transition: opacity .3s, transform .3s, height .3s;
}
.pm-learn-v4 .pm-bonus-row-head:hover .pm-bonus-row-bar,
.pm-learn-v4 .pm-bonus-row[aria-expanded="true"] .pm-bonus-row-bar {
    opacity: 1; transform: scaleY(1); height: 36px;
}
.pm-learn-v4 .pm-bonus-row-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pm-learn-v4 .pm-bonus-row-name {
    font-family: var(--serif); font-weight: 400;
    font-size: clamp(15px, 2vw, 19px); line-height: 1.25;
    letter-spacing: -0.005em;
    color: #F5EFE3;
    transition: color .3s;
}
.pm-learn-v4 .pm-bonus-row-head:hover .pm-bonus-row-name { color: var(--bc, var(--gold)); }
.pm-learn-v4 .pm-bonus-row-meta {
    display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap;
    font-family: var(--sans); font-weight: 500;
    font-size: 11px; letter-spacing: 0.04em;
    color: rgba(245, 239, 227, 0.50);
}
.pm-learn-v4 .pm-bonus-row-dot {
    width: 3px; height: 3px; border-radius: 50%;
    background: rgba(245, 239, 227, 0.25);
}
.pm-learn-v4 .pm-bonus-row-tag {
    font-family: var(--sans); font-weight: 600;
    font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
    padding: 4px 10px; border-radius: 100px;
    white-space: nowrap;
}
.pm-learn-v4 .pm-bonus-row-tag.tag-open      { background: rgba(111, 163, 122, 0.15); border: 1px solid rgba(111, 163, 122, 0.40); color: #9BC9A6; }
.pm-learn-v4 .pm-bonus-row-tag.tag-paid      { background: rgba(215, 191, 129, 0.12); border: 1px solid rgba(215, 191, 129, 0.35); color: var(--gold); }
.pm-learn-v4 .pm-bonus-row-tag.tag-account   { background: rgba(245, 239, 227, 0.06); border: 1px solid rgba(245, 239, 227, 0.18); color: rgba(245, 239, 227, 0.78); }
.pm-learn-v4 .pm-bonus-row-tag.tag-blocked   { background: rgba(245, 239, 227, 0.06); border: 1px solid rgba(245, 239, 227, 0.15); color: rgba(245, 239, 227, 0.50); }
.pm-learn-v4 .pm-bonus-row-chev {
    color: rgba(245, 239, 227, 0.50);
    transition: transform .3s, color .3s;
}
.pm-learn-v4 .pm-bonus-row[aria-expanded="true"] .pm-bonus-row-chev { transform: rotate(180deg); color: var(--gold); }

/* Expandable description. Compact, with CTA + progress bar. */
.pm-learn-v4 .pm-bonus-row-body {
    overflow: hidden;
    transition: max-height .4s var(--ease-out), padding .3s;
    max-height: 600px;
    padding: 0 18px 18px 56px;
    position: relative; z-index: 1;
}
.pm-learn-v4 .pm-bonus-row-body.pm-collapsed { max-height: 0; padding-top: 0; padding-bottom: 0; }
.pm-learn-v4 .pm-bonus-row-desc {
    font-family: var(--serif); font-weight: 300;
    font-size: 14.5px; line-height: 1.55;
    color: rgba(245, 239, 227, 0.78);
    margin: 0 0 12px;
    max-width: 720px;
}
.pm-learn-v4 .pm-bonus-row-bar2 {
    height: 3px; border-radius: 100px;
    background: rgba(245, 239, 227, 0.08);
    margin-bottom: 12px;
    overflow: hidden;
}
.pm-learn-v4 .pm-bonus-row-bar2-fill {
    height: 100%; border-radius: 100px;
    transition: width .6s var(--ease-out);
}
.pm-learn-v4 .pm-bonus-row-actions {
    display: flex; align-items: center; gap: 12px;
}
.pm-learn-v4 .pm-bonus-row-cta {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 16px; border-radius: 100px;
    background: var(--gold); color: var(--ink);
    font-family: var(--sans);
    font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s, filter .2s;
}
.pm-learn-v4 .pm-bonus-row-cta:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
    box-shadow: 0 8px 18px rgba(215, 191, 129, 0.30);
}
.pm-learn-v4 .pm-bonus-row-locked-msg {
    font-family: var(--sans); font-weight: 500;
    font-size: 12px; letter-spacing: 0.04em;
    color: rgba(245, 239, 227, 0.55);
}

/* ════════════════════════════════════════════════════════════════════════════
   10. SAVED LESSONS — kept, restyled
   ════════════════════════════════════════════════════════════════════════════ */
.pm-learn-v4 .pm-saved-sec {
    max-width: 1080px;
    margin: clamp(48px, 8vw, 96px) auto;
    padding: 0 clamp(20px, 4vw, 40px);
}
.pm-learn-v4 .pm-saved-grid {
    display: grid; grid-template-columns: 1fr; gap: 12px;
}

/* ════════════════════════════════════════════════════════════════════════════
   11. PRICING BLOCK
   ════════════════════════════════════════════════════════════════════════════ */
.pm-learn-v4 .pm-pricing-sec {
    max-width: 1080px;
    margin: clamp(48px, 8vw, 96px) auto;
    padding: 0 clamp(20px, 4vw, 40px);
}
.pm-learn-v4 .pm-pricing-toggle {
    display: inline-flex; margin: clamp(18px, 3vw, 28px) auto 0;
    padding: 4px;
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: 100px;
}
.pm-learn-v4 .pm-pricing-toggle button {
    padding: 10px 20px;
    border-radius: 100px;
    font-family: var(--sans);
    font-size: 13px; font-weight: 600; letter-spacing: 0.02em;
    color: var(--text-2);
    transition: background .25s, color .25s;
}
.pm-learn-v4 .pm-pricing-toggle button.active {
    background: var(--ink); color: var(--gold);
}
.pm-learn-v4 .pm-pricing-grid {
    display: grid; grid-template-columns: 1fr; gap: 14px;
    max-width: 880px; margin: 36px auto 0;
}
.pm-learn-v4 .pm-price-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: clamp(28px, 5vw, 40px) clamp(24px, 4vw, 36px);
    display: flex; flex-direction: column; gap: 16px;
    transition: transform .25s, box-shadow .25s;
}
.pm-learn-v4 .pm-price-card:hover { transform: translateY(-4px); }
.pm-learn-v4 .pm-price-card.featured {
    background: var(--ink); color: #F5EFE3; border: none;
    box-shadow: 0 30px 60px -20px rgba(10, 9, 8, 0.3);
}
.pm-learn-v4 .pm-price-card__ribbon {
    position: absolute; top: -12px; right: 24px;
    background: var(--gold); color: var(--ink);
    font-family: var(--mono); font-size: 10px; font-weight: 600;
    letter-spacing: 0.20em; text-transform: uppercase;
    padding: 6px 14px; border-radius: 100px;
}
.pm-learn-v4 .pm-price-card__name {
    font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em;
    text-transform: uppercase; color: var(--text-3); font-weight: 600;
}
.pm-learn-v4 .pm-price-card.featured .pm-price-card__name { color: var(--gold); }
.pm-learn-v4 .pm-price-card__price {
    display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
}
.pm-learn-v4 .pm-price-card__amount {
    font-family: var(--serif); font-weight: 300;
    font-size: clamp(48px, 7vw, 64px); line-height: 1.34; letter-spacing: -0.025em;
    color: var(--ink);
    font-variation-settings: "opsz" 96;
    overflow: visible;
    padding-right: 0.20em;
    padding-bottom: 0.34em;
}
.pm-learn-v4 .pm-price-card.featured .pm-price-card__amount { color: #F5EFE3; }
.pm-learn-v4 .pm-price-card__amount em {
    /* Inline italic with solid-gold fallback. The optional gradient
       gets layered over via background-clip:text on the featured card
       only (see below), where the dark surface absorbs any glitch.
       Italic Fraunces digits (3,5,7,9) and the "$" glyph have deeper
       descenders than upright counterparts — line-height 1.34 +
       padding-bottom 0.10em on the em itself prevents tail-clipping.
       padding-right gives the italic 9 / .99 tail room so the closing
       glyph isn't optically cropped against the /year tag. */
    display: inline-block;
    font-style: italic;
    color: var(--gold-deep);
    line-height: 1.34;
    padding-bottom: 0.10em;
    padding-inline-end: 0.10em;
    overflow: visible;
    vertical-align: baseline;
}
.pm-learn-v4 .pm-price-card__price {
    /* Make sure the price row never crops descenders if a parent ever
       inherits an overflow:hidden from a future redesign. */
    overflow: visible;
}
.pm-learn-v4 .pm-price-card.featured .pm-price-card__amount em {
    color: var(--gold);
    background: linear-gradient(135deg, var(--gold-bright), var(--gold));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.pm-learn-v4 .pm-price-card__per {
    font-family: var(--mono); font-size: 12px; color: var(--text-3); letter-spacing: 0.10em;
}
.pm-learn-v4 .pm-price-card.featured .pm-price-card__per { color: rgba(245, 239, 227, 0.5); }
.pm-learn-v4 .pm-price-card__hook {
    font-family: var(--serif);
    font-size: 16.5px; font-weight: 400; line-height: 1.4;
    color: var(--text-2); margin: -4px 0 0;
}
.pm-learn-v4 .pm-price-card.featured .pm-price-card__hook { color: rgba(245, 239, 227, 0.78); }
.pm-learn-v4 .pm-price-card__list { display: flex; flex-direction: column; gap: 10px; margin: 8px 0; padding: 0; list-style: none; }
.pm-learn-v4 .pm-price-card__list-item {
    display: flex; align-items: flex-start; gap: 10px;
    font-size: 13.5px; color: var(--text-2); line-height: 1.5;
}
.pm-learn-v4 .pm-price-card.featured .pm-price-card__list-item { color: rgba(245, 239, 227, 0.82); }
.pm-learn-v4 .pm-price-card__check {
    flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--gold-soft); color: var(--gold-deep);
    margin-top: 2px;
}
.pm-learn-v4 .pm-price-card.featured .pm-price-card__check {
    background: rgba(215, 191, 129, 0.18); color: var(--gold);
}
.pm-learn-v4 .pm-price-card__save {
    font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--gold-deep); font-weight: 600;
    padding: 5px 11px; border-radius: 100px;
    background: var(--gold-soft);
    align-self: flex-start;
}
.pm-learn-v4 .pm-price-card.featured .pm-price-card__save {
    background: rgba(215, 191, 129, 0.18); color: var(--gold);
}
.pm-learn-v4 .pm-price-card .pm-btn { width: 100%; justify-content: center; margin-top: auto; }
.pm-learn-v4 .pm-price-foot {
    text-align: center; margin-top: 24px;
    font-family: var(--serif); font-size: 14px; font-weight: 300; color: var(--text-3);
}
.pm-learn-v4 .pm-price-foot em { color: var(--gold-deep); font-style: normal; font-weight: 600; }

/* ════════════════════════════════════════════════════════════════════════════
   12. RESOURCES (Explore)
   ════════════════════════════════════════════════════════════════════════════ */
.pm-learn-v4 .pm-resources-sec {
    max-width: 1280px;
    margin: clamp(48px, 8vw, 96px) auto;
    padding: 0 clamp(20px, 4vw, 40px);
}
.pm-learn-v4 .pm-cats-grid {
    display: grid; grid-template-columns: 1fr; gap: 16px;
    margin-bottom: clamp(28px, 5vw, 48px);
}
.pm-learn-v4 .pm-cat-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 24px 26px;
    display: flex; flex-direction: column; gap: 10px;
    text-decoration: none; color: inherit;
    transition: border-color .25s, transform .25s, box-shadow .25s;
    position: relative;
    min-height: 160px;
}
.pm-learn-v4 .pm-cat-card:hover {
    border-color: var(--gold-border);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
}
.pm-learn-v4 .pm-cat-eyebrow {
    font-family: var(--sans); font-weight: 600;
    font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--gold-deep);
}
.pm-learn-v4 .pm-cat-card h3 {
    font-family: var(--serif); font-size: 22px; font-weight: 500;
    color: var(--ink); letter-spacing: -0.01em; line-height: 1.2;
    margin: 4px 0 0;
}
.pm-learn-v4 .pm-cat-link {
    margin-top: auto;
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--sans); font-weight: 600;
    font-size: 12px; letter-spacing: 0.06em;
    color: var(--gold-deep);
    transition: gap .25s, color .25s;
}
.pm-learn-v4 .pm-cat-card:hover .pm-cat-link { gap: 12px; color: var(--ink); }
.pm-learn-v4 .pm-cat-link svg { transition: transform .25s; }
.pm-learn-v4 .pm-cat-card:hover .pm-cat-link svg { transform: translateX(2px); }

/* Articles showcase */
.pm-learn-v4 .pm-articles-showcase { margin-top: clamp(28px, 5vw, 48px); }
.pm-learn-v4 .pm-articles-showcase-title {
    font-family: var(--serif); font-style: italic; font-weight: 400;
    font-size: clamp(20px, 3vw, 28px); color: var(--ink);
    margin: 0 0 18px;
}
.pm-learn-v4 .pm-articles-cards {
    display: grid; grid-template-columns: 1fr; gap: 16px;
}
.pm-learn-v4 .pm-art-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none; color: inherit;
    transition: border-color .25s, transform .25s;
}
.pm-learn-v4 .pm-art-card:hover { border-color: var(--gold-border); transform: translateY(-2px); }
.pm-learn-v4 .pm-art-img {
    position: relative; aspect-ratio: 16 / 10; overflow: hidden;
    background: var(--paper-2);
}
.pm-learn-v4 .pm-art-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.pm-learn-v4 .pm-art-placeholder { width: 100%; height: 100%; display: grid; place-items: center; }
.pm-learn-v4 .pm-art-cat {
    position: absolute; left: 12px; top: 12px;
    font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
    padding: 4px 10px; border-radius: 100px;
    background: rgba(10, 9, 8, 0.78); color: var(--gold);
    backdrop-filter: blur(8px);
}
.pm-learn-v4 .pm-art-body { padding: 16px 18px; }
.pm-learn-v4 .pm-art-body h4 {
    font-family: var(--serif); font-weight: 500;
    font-size: 18px; line-height: 1.25; letter-spacing: -0.01em;
    color: var(--ink); margin: 0 0 6px;
}
.pm-learn-v4 .pm-art-date { font-family: var(--mono); font-size: 11px; color: var(--text-3); }

/* ════════════════════════════════════════════════════════════════════════════
   13. FAQ
   ════════════════════════════════════════════════════════════════════════════ */
.pm-learn-v4 .pm-faq-sec {
    max-width: 880px;
    margin: clamp(48px, 8vw, 96px) auto;
    padding: 0 clamp(20px, 4vw, 40px);
}
.pm-learn-v4 .pm-faq-list { max-width: 820px; margin: 0 auto; }
.pm-learn-v4 .pm-faq-item {
    border-bottom: 1px solid var(--line);
}
.pm-learn-v4 .pm-faq-item:first-child { border-top: 1px solid var(--line); }
.pm-learn-v4 .pm-faq-question {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: 22px 0;
    font-family: var(--serif); font-size: clamp(17px, 2.4vw, 22px); font-weight: 500;
    color: var(--ink); letter-spacing: -0.01em; text-align: left;
    cursor: pointer; gap: 16px;
    background: transparent; border: 0;
    transition: color .2s;
}
.pm-learn-v4 .pm-faq-question:hover { color: var(--gold-deep); }
.pm-learn-v4 .pm-faq-chevron {
    flex-shrink: 0; width: 32px; height: 32px;
    border: 1px solid var(--line); border-radius: 50%;
    padding: 7px;
    color: var(--gold-deep);
    transition: transform .3s var(--ease-out), background .3s, color .3s, border-color .3s;
}
.pm-learn-v4 .pm-faq-question[aria-expanded="true"] .pm-faq-chevron {
    background: var(--ink); color: var(--gold); border-color: var(--ink);
    transform: rotate(180deg);
}
.pm-learn-v4 .pm-faq-answer {
    overflow: hidden;
    transition: max-height .45s var(--ease-out), padding .3s;
    max-height: 600px;
}
.pm-learn-v4 .pm-faq-answer.pm-collapsed { max-height: 0; }
.pm-learn-v4 .pm-faq-answer p {
    font-family: var(--serif); font-size: 16px; font-weight: 300; line-height: 1.55;
    color: var(--text-2); max-width: 680px;
    padding: 0 0 22px;
    margin: 0;
}

/* ════════════════════════════════════════════════════════════════════════════
   14. LOCKED GATE
   ════════════════════════════════════════════════════════════════════════════ */
.pm-learn-v4 .pm-locked-gate {
    max-width: 720px;
    margin: clamp(36px, 6vw, 72px) auto;
    padding: 0 clamp(20px, 4vw, 40px);
}
.pm-learn-v4 .pm-locked-inner {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: clamp(36px, 6vw, 64px) clamp(24px, 4vw, 48px);
    text-align: center;
    position: relative; overflow: hidden;
}
.pm-learn-v4 .pm-locked-inner::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.pm-learn-v4 .pm-locked-icon { margin: 0 auto 24px; }
.pm-learn-v4 .pm-locked-inner h2 {
    font-family: var(--serif); font-weight: 400;
    font-size: clamp(22px, 4vw, 32px); line-height: 1.1; letter-spacing: -0.015em;
    color: var(--ink); margin: 0 0 12px;
}
.pm-learn-v4 .pm-locked-inner p {
    font-family: var(--serif); font-size: 16px; font-weight: 300; line-height: 1.55;
    color: var(--text-2); max-width: 480px; margin: 0 auto 28px;
}
.pm-learn-v4 .pm-locked-btns {
    display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}
.pm-learn-v4 .pm-locked-btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 26px; border-radius: 100px;
    font-size: 13px; font-weight: 600; letter-spacing: 0.04em;
    cursor: pointer; text-decoration: none;
    border: 0;
    transition: transform .22s, background .22s, color .22s, border-color .22s;
}
.pm-learn-v4 .pm-locked-btn-primary {
    background: var(--ink); color: var(--gold);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}
.pm-learn-v4 .pm-locked-btn-primary:hover { background: var(--ink-3); transform: translateY(-2px); }
.pm-learn-v4 .pm-locked-btn-secondary {
    background: transparent; color: var(--ink);
    border: 1px solid var(--line-2);
}
.pm-learn-v4 .pm-locked-btn-secondary:hover { border-color: var(--ink); }

/* INTRO HERO DISCLAIMER — primary rule lives higher up alongside the
   pm-intro-hero-rows block so the disclaimer + placement row stay
   exactly the same width. */

/* ════════════════════════════════════════════════════════════════════════════
   GUIDED TOUR — full-screen overlay with spotlight + step card
   ----------------------------------------------------------------------------
   Driven entirely by learn-page.js. Hidden by default, revealed when the
   learner clicks "Begin guided tour" in the intro hero. Six steps:
   1) placement test, 2) keyboard, 3) Specialized Courses, 4) Explore,
   5) Pricing, 6) final welcome modal with disclaimer.
   ════════════════════════════════════════════════════════════════════════════ */
.pm-learn-v4 .pm-tour {
    position: fixed; inset: 0;
    z-index: 9000;
    color: #F5EFE3;
    display: block;
}
.pm-learn-v4 .pm-tour[hidden] { display: none; }
.pm-learn-v4 .pm-tour-bg {
    position: fixed; inset: 0;
    background: rgba(8, 6, 4, 0.20);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 1;
    pointer-events: auto;
    transition: opacity .25s var(--ease-out);
}
/* Spotlight: a transparent rectangle pinned over the target. The huge
   box-shadow darkens everything outside it, so the target reads as a
   spotlit area without needing a clip-path. position: fixed with viewport
   coords means scroll just re-anchors via JS, no offset math required. */
.pm-learn-v4 .pm-tour-spotlight {
    position: fixed;
    z-index: 9001;
    border-radius: 18px;
    border: 2px solid var(--gold);
    box-shadow:
        0 0 0 9999px rgba(8, 6, 4, 0.78),
        0 0 0 4px rgba(215, 191, 129, 0.32),
        0 24px 64px -8px rgba(0, 0, 0, 0.55);
    pointer-events: none;
    transition: top .25s var(--ease-out), left .25s var(--ease-out),
                width .25s var(--ease-out), height .25s var(--ease-out);
}
.pm-learn-v4 .pm-tour-card {
    position: fixed;
    z-index: 9002;
    width: min(420px, calc(100vw - 32px));
    background: var(--paper);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 24px 24px 18px;
    box-shadow: 0 30px 80px -16px rgba(0, 0, 0, 0.55);
    transition: top .25s var(--ease-out), left .25s var(--ease-out);
    pointer-events: auto;
}
.pm-learn-v4 .pm-tour-step {
    display: inline-block;
    font-family: var(--mono);
    font-size: 11px; font-weight: 600; letter-spacing: 0.18em;
    color: var(--gold-deep);
    background: var(--gold-soft);
    border: 1px solid var(--gold-border);
    border-radius: 100px;
    padding: 4px 12px;
    margin-bottom: 12px;
}
.pm-learn-v4 .pm-tour-step span { color: var(--text-3); margin-left: 2px; }
.pm-learn-v4 .pm-tour-title {
    font-family: var(--serif); font-weight: 400;
    font-size: 22px; line-height: 1.2; letter-spacing: -0.015em;
    color: var(--ink);
    margin: 0 0 10px;
    overflow: visible;
    padding-bottom: 0.04em;
}
.pm-learn-v4 .pm-tour-title em {
    display: inline;
    font-style: italic;
    color: var(--gold-deep);
}
.pm-learn-v4 .pm-tour-text {
    font-family: var(--serif); font-weight: 300;
    font-size: 14.5px; line-height: 1.55;
    color: var(--text-2);
    margin: 0 0 16px;
}
.pm-learn-v4 .pm-tour-nav {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px;
}
.pm-learn-v4 .pm-tour-skip {
    background: transparent; border: 0;
    color: var(--text-3);
    font-family: var(--sans); font-size: 12px; font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    padding: 6px 10px;
    transition: color .2s;
}
.pm-learn-v4 .pm-tour-skip:hover { color: var(--ink); }
.pm-learn-v4 .pm-tour-arrows { display: flex; gap: 8px; }
.pm-learn-v4 .pm-tour-prev,
.pm-learn-v4 .pm-tour-next {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 16px; border-radius: 100px;
    font-family: var(--sans); font-size: 12px; font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.pm-learn-v4 .pm-tour-prev {
    background: transparent;
    color: var(--text-2);
    border: 1px solid var(--line-2);
    width: 36px; padding: 9px;
    justify-content: center;
}
.pm-learn-v4 .pm-tour-prev:hover { border-color: var(--ink); color: var(--ink); }
.pm-learn-v4 .pm-tour-prev[disabled] { opacity: 0.35; cursor: not-allowed; }
.pm-learn-v4 .pm-tour-next {
    background: var(--ink); color: var(--gold);
    border: 0;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}
.pm-learn-v4 .pm-tour-next:hover { transform: translateY(-1px); }

/* Final welcome modal (step 6). Replaces the spotlight + card. */
.pm-learn-v4 .pm-tour-final {
    position: fixed;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    z-index: 4;
    width: min(640px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    background: var(--paper);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.55);
}
.pm-learn-v4 .pm-tour-final[hidden] { display: none; }
.pm-learn-v4 .pm-tour-final-inner { padding: clamp(28px, 5vw, 40px); }
.pm-learn-v4 .pm-tour-final-eyebrow {
    display: inline-block;
    font-family: var(--sans); font-weight: 600;
    font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--gold-deep);
    background: var(--gold-soft);
    border: 1px solid var(--gold-border);
    padding: 5px 12px; border-radius: 100px;
    margin-bottom: 16px;
}
.pm-learn-v4 .pm-tour-final h3 {
    font-family: var(--serif); font-weight: 400;
    font-size: clamp(24px, 4vw, 36px); line-height: 1.1; letter-spacing: -0.02em;
    color: var(--ink); margin: 0 0 14px;
    overflow: visible;
    padding-bottom: 0.06em;
}
.pm-learn-v4 .pm-tour-final h3 em {
    display: inline;
    font-style: italic;
    color: var(--gold-deep);
    background: linear-gradient(135deg, var(--gold-deep), var(--gold));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.pm-learn-v4 .pm-tour-final-lead {
    font-family: var(--serif); font-weight: 300;
    font-size: 15px; line-height: 1.55; color: var(--text-2);
    margin: 0 0 22px;
}
.pm-learn-v4 .pm-tour-final-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
    margin: 0 0 22px;
}
@media (min-width: 600px) { .pm-learn-v4 .pm-tour-final-grid { grid-template-columns: repeat(4, 1fr); } }
.pm-learn-v4 .pm-tour-final-cell {
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
    padding: 14px 14px;
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: 12px;
}
.pm-learn-v4 .pm-tour-final-num {
    font-family: var(--serif); font-style: italic; font-weight: 400;
    font-size: clamp(24px, 3vw, 30px);
    color: var(--gold-deep);
    line-height: 1;
}
.pm-learn-v4 .pm-tour-final-lbl {
    font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--text-3);
}
.pm-learn-v4 .pm-tour-final-disclaimer {
    font-family: var(--sans); font-size: 12.5px; line-height: 1.55;
    color: var(--text-2);
    background: var(--paper-2);
    border-left: 3px solid var(--gold-deep);
    padding: 12px 14px;
    border-radius: 8px;
    margin: 0 0 22px;
}
.pm-learn-v4 .pm-tour-final-disclaimer strong { color: var(--ink); margin-right: 4px; }
.pm-learn-v4 .pm-tour-final-cta { display: flex; justify-content: flex-end; }
.pm-learn-v4 .pm-tour-final-start {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 24px; border-radius: 100px;
    background: var(--gold); color: var(--ink);
    border: 0;
    font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: 0.04em;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(215, 191, 129, 0.32);
    transition: transform .2s, box-shadow .2s;
}
.pm-learn-v4 .pm-tour-final-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(215, 191, 129, 0.45);
}

/* ════════════════════════════════════════════════════════════════════════════
   LOCK TOAST — surfaced when a visitor clicks a locked module / lesson.
   Replaces the page-reload that the gated <a> would otherwise trigger.
   ════════════════════════════════════════════════════════════════════════════ */
.pm-lock-toast {
    position: fixed;
    left: 50%; bottom: 24px;
    transform: translate(-50%, 24px);
    z-index: 9500;
    display: flex; align-items: center; gap: 12px;
    max-width: calc(100vw - 32px);
    padding: 12px 16px;
    background: #14110D;
    color: #F5EFE3;
    border: 1px solid rgba(215, 191, 129, 0.32);
    border-radius: 14px;
    box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.45);
    font-family: var(--sans);
    font-size: 13px; line-height: 1.45;
    opacity: 0;
    pointer-events: none;
    transition: transform .25s var(--ease-out), opacity .25s;
}
.pm-lock-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
    pointer-events: auto;
}
.pm-lock-toast svg { color: var(--gold); flex-shrink: 0; }
.pm-lock-toast strong { color: var(--gold); font-weight: 700; margin-right: 4px; }
.pm-lock-toast-cta {
    display: inline-flex; align-items: center;
    padding: 8px 14px; border-radius: 100px;
    background: var(--gold); color: #14110D;
    font-weight: 600; font-size: 12px; letter-spacing: 0.05em;
    text-decoration: none;
    transition: background .2s;
    flex-shrink: 0;
}
.pm-lock-toast-cta:hover { background: var(--gold-bright); }

/* ════════════════════════════════════════════════════════════════════════════
   ANIMATIONS / UTILITIES
   ════════════════════════════════════════════════════════════════════════════ */
@keyframes pmFadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.pm-learn-v4 .pm-fade-in { animation: pmFadeUp .5s var(--ease-out) both; }

/* ════════════════════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS — mobile-first additions
   ════════════════════════════════════════════════════════════════════════════ */

/* ── ≥640 — small tablets ── */
@media (min-width: 640px) {
    .pm-learn-v4 .pm-piano-keyboard { height: 300px; }
    .pm-learn-v4 .pm-pkey-white { padding: 14px 6px 22px; }
    .pm-learn-v4 .pm-pkey-title { font-size: 10px; }
    .pm-learn-v4 .pm-pkey-sub { font-size: 9px; }
    .pm-learn-v4 .pm-reassurance-grid { grid-template-columns: repeat(2, 1fr); }
    .pm-learn-v4 .pm-cats-grid { grid-template-columns: repeat(2, 1fr); }
    .pm-learn-v4 .pm-articles-cards { grid-template-columns: repeat(2, 1fr); }
    .pm-learn-v4 .pm-saved-grid { grid-template-columns: repeat(2, 1fr); }
    .pm-learn-v4 .pm-pricing-grid { grid-template-columns: 1fr 1fr; }
    .pm-learn-v4 .pm-bonus-card { grid-template-columns: 48px 1fr auto auto; gap: 18px; padding: 22px 16px; }
    .pm-learn-v4 .pm-ld-stats { grid-template-columns: repeat(4, 1fr); }
    .pm-learn-v4 .pm-ld-stat { border-right: 1px solid var(--line); }
    .pm-learn-v4 .pm-ld-stat:last-child { border-right: 0; }
    .pm-learn-v4 .pm-ld-stat:nth-child(2n) { border-right: 1px solid var(--line); }
}

/* ── ≥980 — desktop entry ── */
@media (min-width: 980px) {
    .pm-learn-v4 .pm-cats-grid { grid-template-columns: repeat(3, 1fr); }
    .pm-learn-v4 .pm-articles-cards { grid-template-columns: repeat(3, 1fr); }
    .pm-learn-v4 .pm-saved-grid { grid-template-columns: repeat(3, 1fr); }
    .pm-learn-v4 .pm-reassurance-grid { grid-template-columns: repeat(4, 1fr); }
    .pm-learn-v4 .pm-mod-num { flex: 0 0 76px; height: 76px; font-size: 28px; }
    /* Round 24 — REMOVED dead margin rules that pushed .pm-mod-show-lessons
       and .pm-mod-lessons-panel 92px to the right. They came from a previous
       layout where the toggle sat OUTSIDE .pm-mod-info, next to the big
       circular .pm-mod-num. The current layout (button is INSIDE
       .pm-mod-info next to .pm-mod-open-btn in a flex .pm-mod-actions row)
       does not need any horizontal offset; the dead rules were causing the
       desktop alignment the user reported. */
    .pm-learn-v4 .pm-lessons-grid { grid-template-columns: 1fr 1fr; }

    /* WYL becomes a centered modal card on desktop */
    .pm-learn-v4 .pm-wyl-panel {
        position: fixed; inset: 50% auto auto 50%;
        transform: translate(-50%, -50%) scale(0.96);
        max-width: 720px; width: calc(100vw - 80px);
        max-height: 80vh;
        border-radius: 24px;
        border: 1px solid var(--line);
        opacity: 0;
    }
    .pm-learn-v4 .pm-wyl-panel.visible { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    .pm-learn-v4 .pm-wyl-cat-grid { grid-template-columns: 1fr 1fr; }
}

/* ── ≥1024 — full desktop ── */
@media (min-width: 1024px) {
    .pm-learn-v4 .pm-piano-sec { padding-top: 120px; padding-bottom: 96px; }
    .pm-learn-v4 .pm-piano-keyboard { height: 360px; }
    .pm-learn-v4 .pm-piano-cabinet { padding: 18px 14px 28px; border-radius: 18px 18px 26px 26px; }
    .pm-learn-v4 .pm-pkey-white { padding: 18px 8px 28px; }
    .pm-learn-v4 .pm-pkey-note { font-size: 72px; }
    .pm-learn-v4 .pm-pkey-title { font-size: 11px; letter-spacing: 0.12em; }
    .pm-learn-v4 .pm-pkey-sub { font-size: 10px; }
    .pm-learn-v4 .pm-bonus-card { grid-template-columns: 60px 1fr auto auto; gap: 28px; padding: 26px 20px; }
    .pm-learn-v4 .pm-bonus-card-body h4 { font-size: 30px; letter-spacing: -0.02em; }
    .pm-learn-v4 .pm-bonus-card-icon { font-size: 13px; }
    .pm-learn-v4 .pm-bonus-arrow { width: 44px; height: 44px; }
    .pm-learn-v4 .pm-bonus-card:hover { padding-left: 28px; }
}

/* ── PIANO KEY name offsets (everywhere) ──
   Black keys cover the inner half of the white keys. The note glyphs
   need to shift away from the covered side: Do/Fa nudge LEFT, Mi/Sol
   nudge RIGHT, Re stays centered. Margin (not transform) so the
   .active scale(1.08) animation still composes cleanly. */
.pm-learn-v4 .pm-pkey-white[data-level="beginner"] .pm-pkey-note,
.pm-learn-v4 .pm-pkey-white[data-level="advanced"] .pm-pkey-note {
    margin-right: 14px;
}
.pm-learn-v4 .pm-pkey-white[data-level="intermediate"] .pm-pkey-note,
.pm-learn-v4 .pm-pkey-white[data-level="expert"] .pm-pkey-note {
    margin-left: 14px;
}

/* Lessons grid + lesson cards must never overflow on narrow viewports,
   regardless of whether the panel sits inside .pm-mod-info or below
   the row (LiteSpeed may still be serving an older markup variant). */
.pm-learn-v4 .pm-mod-lessons-panel,
.pm-learn-v4 .pm-mod-info .pm-mod-lessons-panel {
    max-width: 100%;
    overflow: hidden;
}
.pm-learn-v4 .pm-lessons-grid {
    width: 100%;
    overflow: hidden;
}
.pm-learn-v4 .pm-lcard,
.pm-learn-v4 .pm-lcard-body { min-width: 0; max-width: 100%; }

/* ─────────────────── MOBILE MODULES & LESSONS ───────────────────
   The default (≥601px) layout is a zigzag: a big circular number on
   one side and the white .pm-mod-info card on the other, with the
   number badge and the lessons-panel taking up roughly half the row
   each. On mobile that flex-row pattern collapses every text node into
   a column ~150px wide — lesson titles get clipped to "Modal Improvis…"
   and the action pills wrap to two side-by-side buttons that no longer
   align with the card padding.

   We rebuild the layout for ≤600px:
   - Wrapper goes column, killing the zigzag (flex-direction reset).
   - Number badge becomes a smaller chip pinned to the top-left of the
     info card so the title can use the FULL row width.
   - Info card padding tightens (16px 14px) so the lesson cards inside
     have room to breathe and the title can render across 2-3 lines.
   - .pm-mod-actions stacks vertically, left-aligned, with each button
     left-aligned (NOT full-width — the user explicitly asked for them
     vertically aligned to the left). Max-width:fit-content keeps them
     compact and readable instead of stretched.
   - Lesson cards inside the panel get a slimmer left padding so the
     number bubble + title + meta line up cleanly. */
@media (max-width: 600px) {
    .pm-learn-v4 .pm-mod-wrapper:nth-child(odd) .pm-mod-row,
    .pm-learn-v4 .pm-mod-wrapper:nth-child(even) .pm-mod-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .pm-learn-v4 .pm-mod-wrapper:nth-child(even) .pm-mod-row .pm-mod-info {
        text-align: left;
    }
    .pm-learn-v4 .pm-mod-wrapper:nth-child(even) .pm-mod-row .pm-mod-meta {
        justify-content: flex-start;
    }
    .pm-learn-v4 .pm-mod-num {
        width: 44px; height: 44px;
        align-self: flex-start;
        font-size: 18px;
    }
    .pm-learn-v4 .pm-mod-info {
        padding: 16px 14px;
    }
    .pm-learn-v4 .pm-mod-info h3 {
        font-size: 18px; line-height: 1.18;
    }
    .pm-learn-v4 .pm-mod-info p {
        font-size: 13px;
    }
    .pm-learn-v4 .pm-mod-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .pm-learn-v4 .pm-mod-open-btn,
    .pm-learn-v4 .pm-mod-show-lessons {
        width: auto;
        max-width: 100%;
    }
    .pm-learn-v4 .pm-mod-info .pm-lessons-grid {
        gap: 6px;
    }
    .pm-learn-v4 .pm-lcard {
        padding: 10px 12px;
        gap: 10px;
    }
    .pm-learn-v4 .pm-lcard-num {
        width: 26px; height: 26px;
        font-size: 10px;
    }
    .pm-learn-v4 .pm-lcard-body h4 {
        /* On mobile the card is full width minus 26px badge minus paddings,
           leaving ~85% of viewport for the title. Three lines is plenty. */
        -webkit-line-clamp: 3;
        font-size: 13px;
        line-height: 1.32;
    }
    .pm-learn-v4 .pm-lcard-meta {
        font-size: 9.5px; gap: 8px;
        flex-wrap: wrap;
    }
    /* The right-side chevron in each lesson card eats ~16-22px of horizontal
       space on viewports that are already cramped. The card itself is fully
       clickable (it's an <a>), so the arrow is purely decorative on mobile —
       hiding it gives the title ~12% more width and stops the truncation
       the user reported in the latest screenshot. */
    .pm-learn-v4 .pm-lcard-arrow {
        display: none;
    }
    /* Absolute belt + braces: kill any leftover Round-23-pre rule that
       expected the lessons grid to be 2 columns. We force single-column
       inside the info card AND outside it so neither rendering path
       (server-static vs AJAX) leaves a 2-col grid on a phone. */
    .pm-learn-v4 .pm-lessons-grid,
    .pm-learn-v4 .pm-mod-info .pm-lessons-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Module overview must NOT touch the next "Modules & Lessons" heading. */
.pm-learn-v4 .pm-modules-sec { margin-top: clamp(40px, 6vw, 96px); }

/* ── MOBILE keyboard ── */
@media (max-width: 720px) {
    /* Level title rotated 90° vertically to fit on the narrow key. */
    .pm-learn-v4 .pm-pkey-title {
        writing-mode: vertical-rl;
        transform: rotate(180deg);
        font-size: 9px !important;
        letter-spacing: 0.10em;
        white-space: nowrap;
        margin-top: 6px;
        line-height: 1;
    }
    .pm-learn-v4 .pm-pkey-sub { display: none; }
    /* Smaller note glyphs so they sit cleanly between the black keys. */
    .pm-learn-v4 .pm-pkey-note {
        font-size: 30px !important;
        line-height: 1;
    }
    .pm-learn-v4 .pm-pkey-bottom-area { gap: 4px; }
    .pm-learn-v4 .pm-pkey-prog { width: 90%; }
    .pm-learn-v4 .pm-pkey-pnum { display: none; }
}

/* Module hidden -5 must apply on EVERY viewport (the legacy CSS
   already hides them, but a few cached tags lingered). Force it. */
.pm-learn-v4 .pm-modules-list.pm-modules-collapsed .pm-mod-wrapper.pm-mod-hidden {
    display: none !important;
}

/* ── ≤480 — phone optimizations ── */
@media (max-width: 480px) {
    .pm-learn-v4 .pm-piano-keyboard { height: 220px; }
    .pm-learn-v4 .pm-pkey-sub { display: none; }
    .pm-learn-v4 .pm-pkey-prog { display: none; }
    .pm-learn-v4 .pm-mod-num { flex: 0 0 56px; height: 56px; font-size: 22px; border-width: 2px; }
    .pm-learn-v4 .pm-modules-list::before { display: none; }
    .pm-learn-v4 .pm-mod-wrapper:nth-child(even) .pm-mod-row { flex-direction: row; }
    .pm-learn-v4 .pm-mod-wrapper:nth-child(even) .pm-mod-row .pm-mod-info { text-align: left; }
    .pm-learn-v4 .pm-mod-wrapper:nth-child(even) .pm-mod-row .pm-mod-meta { justify-content: flex-start; }
    /* Round 24 — REMOVED dead !important margin rules that pushed
       .pm-mod-show-lessons and .pm-mod-lessons-panel 70px to the right.
       Same reasoning as the ≥980 block: they target a structure that no
       longer exists (button outside .pm-mod-info). Their !important kept
       the desktop alignment crooked even after the @media (max-width:600)
       block tried to stack the actions vertically. */
    .pm-learn-v4 .pm-bonus-card { grid-template-columns: 28px 1fr auto auto; gap: 10px; padding: 14px 10px; }
    .pm-learn-v4 .pm-bonus-card-body h4 { font-size: 17px; }
    .pm-learn-v4 .pm-bonus-card-body { padding-left: 10px; }
    .pm-learn-v4 .pm-bonus-card-meta { font-size: 9px; gap: 6px; }
    .pm-learn-v4 .pm-bonus-arrow,
    .pm-learn-v4 .pm-bonus-lock-icon { width: 32px; height: 32px; }
    .pm-learn-v4 .pm-tb-group { gap: 8px; }
    .pm-learn-v4 .pm-tb-item { padding: 6px 10px; font-size: 10px; }
}