/* course-music.css - a music grade's course page (includes/learn/course-music.php), on top of course.css and the
   homepage's bands and keycaps (bl-home.css), in the music pink, as the music home (assets/music/music-home.css).
   Square full-width bands, rounded cards; brand tokens only, no red; nothing scrolls sideways at 320 px; every
   target 44 px or more. */
.cmh main.cm{display:block;max-width:none;padding:0;margin:0}
.cm .hm-band{padding:clamp(40px,6vw,80px) 0}
.cm .hm-h2{font-size:clamp(28px,3.4vw,40px);text-wrap:balance}
.cm .wrap{max-width:1100px}

/* ---- the hero */
.cm-hero{padding:clamp(24px,4vw,56px) 0 clamp(36px,5vw,64px)!important}
.cm-hero-in{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.95fr);gap:24px 48px;align-items:center}
.cm-hero h1{font-size:clamp(34px,5vw,60px);line-height:1.04;letter-spacing:-.025em;margin:18px 0 0;text-wrap:balance}
.cm-lede{margin:16px 0 0;max-width:34ch;text-wrap:pretty}
.cm-art{position:relative}
.cm-art .crs-cov{display:block;border-radius:26px;overflow:hidden;aspect-ratio:8/5;background:var(--music-tint)}
.cm-art .crs-th{display:block;width:100%;height:100%;object-fit:cover}
.cm-bruno{position:absolute;inset-inline-start:5%;bottom:3%;width:38%;height:auto;filter:drop-shadow(0 6px 10px rgba(21,54,90,.14))}
[dir=rtl] .cm-art{direction:ltr}
@media (max-width:760px){
  .cm-hero-in{grid-template-columns:1fr}
  .cm-art{order:-1}
  .cm-art .crs-cov{border-radius:20px}
  .cm-hero h1{margin-top:14px}
}

/* the grade picker: keycaps, the grade on show pressed in the music pink */
.cm-pick{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.cm-pick-k{font-weight:700;font-size:15px;color:var(--ink-2);margin-inline-end:4px}
.cm-key{display:inline-flex;align-items:center;justify-content:center;min-width:44px;height:44px;padding:0 8px;border-radius:10px;background:var(--paper);color:var(--ink);
  font:700 18px/1 var(--f-display);text-decoration:none;box-shadow:inset 0 0 0 1.5px var(--rule-2);transition:background-color .18s ease,transform .12s ease}
.cm-key:hover{background:var(--music-tint);color:var(--music-ink)}
.cm-key:active{transform:scale(.98);box-shadow:inset 0 0 0 1.5px var(--rule-2)}
.cm-key{position:relative}
/* each grade's badge on its key: a teal tick for a free grade, a small lock for one a plan opens */
.cm-bdg{position:absolute;top:-6px;inset-inline-end:-6px;display:flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:50%;background:var(--surface);color:var(--music-ink);box-shadow:0 0 0 1.5px var(--rule-2)}
.cm-bdg svg{width:11px;height:11px}
.cm-bdg svg path,.cm-acc-ic svg path{stroke-width:3.2}   /* ticks at the icon set's weight when drawn this small (owner: thicker ticks) */
.cm-bdg.is-free{background:var(--study-tint);color:var(--study-ink);box-shadow:0 0 0 1.5px var(--study)}
.cm-key.is-on{background:var(--music-ink);color:#fff;box-shadow:none}
:root[data-theme="dark"] .cm-key{background:var(--sunk)}
:root[data-theme="dark"] .cm-key.is-on{background:var(--music);color:#2a0f22}
/* a phone: the grades in rows of four (never one left on its own row), each key a quarter of the row */
@media (max-width:520px){.cm-pick{display:grid;grid-template-columns:repeat(4,minmax(44px,1fr));gap:8px}.cm-pick-k{grid-column:1 / -1;margin:0}.cm-key{width:100%}}

/* what is free in this grade: one quiet pill */
.cm-acc{display:inline-flex;align-items:center;gap:8px;margin:18px 0 0;padding:8px 14px 8px 10px;border-radius:999px;background:var(--music-tint);color:var(--ink);font-weight:650;font-size:16px;line-height:1.3}
.cm-acc[data-acc="free"]{background:var(--study-tint)}
.cm-acc-ic{flex:none;display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:50%;background:var(--surface);color:var(--music-ink)}
.cm-acc[data-acc="free"] .cm-acc-ic{color:var(--study-ink)}
.cm-acc-ic svg{width:16px;height:16px}

/* the one button, as a keycap */
.cm-cta{margin:22px 0 0}
.cm .cp-go{min-height:56px;border-radius:12px;padding:12px 22px 13px}
.cm .cp-go.is-one{align-content:center}
.cm .cp-stat{margin-top:16px}
.cm .plc{margin-top:10px}
@media (max-width:760px){.cm .cp-go{display:grid;width:100%}}

/* ---- Practise: only with progress on this device (html.cm-has, set before the first paint) */
.cm-prac{display:none;background:var(--paper);padding:28px 0 0}
.cm-has .cm-prac{display:block}
.cm-prac .lr-panel{margin:0}


/* ---- what you'll be able to do: one card, a compact checklist; two columns on a wide screen, the first three on a
   phone with "See all N" (course-music.js; without JS every row shows) */
.cm-can{padding:clamp(28px,4vw,48px) 0 0!important}
.cm-can .hm-h2{margin-bottom:14px}
.cm-can-c{background:var(--surface);border-radius:22px;padding:8px 22px 10px}
.cm-can-g{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:32px}
.cm-can-g li{display:flex;align-items:flex-start;gap:12px;padding:10px 0;font-size:17px;line-height:1.45;color:var(--ink)}   /* rows set apart by space, no rule lines (owner: no one-sided edges) */
.cm-can-g li > span:last-child{text-wrap:balance}
.cm-can-ic{flex:none;display:flex;align-items:center;justify-content:center;width:36px;height:36px;margin-top:-6px;border-radius:10px;background:var(--music-tint);color:var(--music-ink)}
:root[data-theme="dark"] .cm-can-ic{color:var(--music);background:color-mix(in srgb,var(--music) 16%,var(--surface))}
.cm-more-b{display:none}
@media (max-width:760px){
  .cm-can-c{padding:4px 16px 6px}
  .cm-can-g{grid-template-columns:1fr}
  .cm-can-g.is-short li.cm-x{display:none}
  .cm-more-b{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:48px;margin:6px 0 10px;padding:0 12px;border:0;border-radius:12px;background:var(--music-tint);color:var(--music-ink);font:700 16px/1.2 var(--f-body);cursor:pointer}
  .cm-more-b[hidden]{display:none}
  .cm-more-b::after{content:"";width:8px;height:8px;margin:-4px 0 0 2px;border:solid currentColor;border-width:0 2.2px 2.2px 0;transform:rotate(45deg)}
  .cm-more-b[aria-expanded="true"]::after{transform:rotate(-135deg);margin-top:4px}
  .cm-more-b:focus-visible{outline:3px solid var(--gold);outline-offset:-3px;border-radius:12px}
  :root[data-theme="dark"] .cm-more-b{color:var(--music);background:color-mix(in srgb,var(--music) 14%,var(--surface))}
}

/* ---- the sections: native disclosures, as rounded cards on the paper band */
.cm-secs{padding:20px 0 clamp(40px,6vw,72px)!important}
.cm-sec{margin:0 0 12px;border-radius:22px;background:var(--surface)}
.cm-sec > summary{display:flex;align-items:center;gap:14px;min-height:64px;padding:10px 20px;list-style:none;cursor:pointer;border-radius:22px}
.cm-sec > summary::-webkit-details-marker{display:none}
.cm-sec > summary:focus-visible{outline:3px solid var(--gold);outline-offset:2px}
.cm-sec > summary:hover h2{color:var(--music-ink)}
:root[data-theme="dark"] .cm-sec > summary:hover h2{color:var(--music)}
.cm-sec-t{flex:1 1 auto;min-width:0;display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 14px}
.cm-sec-t h2{margin:0;font:600 clamp(20px,2.2vw,24px)/1.2 var(--f-display);color:var(--ink);text-wrap:balance}
.cm-sec-t small{color:var(--ink-2);font-size:16px;line-height:1.35}
.cm-chev{flex:none;color:var(--music-ink);transition:transform .2s ease}
:root[data-theme="dark"] .cm-chev{color:var(--music)}
.cm-sec[open] > summary .cm-chev{transform:rotate(180deg)}
.cm-sec-b{padding:4px 20px 22px}
.cm-sec .cp-units{margin-top:0}
.cm-about-p{margin:0;font-size:17px;line-height:1.55;color:var(--ink);max-width:70ch;text-wrap:pretty}
.cm-about .ln-legal{margin:14px 0 0}
.cm-faq .cm-sec-b{margin:0}
.cm-plan{margin-top:20px!important}
@media (max-width:760px){.cm-sec > summary{padding:10px 16px;min-height:60px}.cm-sec-b{padding:2px 12px 16px}}
@media (prefers-reduced-motion:reduce){.cm-chev{transition:none}}

/* ---- a look inside: the lesson's first screen, as the lesson shows it */
.cm-sample{max-width:860px;padding:0 8px}
.cm-sample-go{margin:18px 0 0}
.cm-sample-k{margin:0;color:var(--music-ink);font-weight:700;font-size:15px}
.cm-sample h3{margin:4px 0 12px;font-size:clamp(22px,2.4vw,28px);line-height:1.2;text-wrap:balance}
.cm-sample-b{font-size:17px;line-height:1.6;color:var(--ink);overflow-wrap:anywhere}
.cm-sample-b > :first-child{margin-top:0}
.cm-sample-b > :last-child{margin-bottom:0}
.cm-sample-b table{display:block;max-width:100%;overflow-x:auto}
.cm-sample-b figure{margin:18px 0;max-width:100%;overflow-x:auto}
.cm-sample-b figure.g6-ex:not([data-drawn]){min-height:120px}
[dir=rtl] .cm-sample-b figure,[dir=rtl] .cm-sample-b .mn-sheet{direction:ltr}

/* ---- the units: course.css's cards, on the paper band */
.cm-units .cp-key{margin:0 0 14px}
.cm-area-h{font-size:22px;margin:28px 0 12px}
.cm-units .cp-area + .cp-area{margin-top:14px}
.cm-units .cp-area:first-of-type .cm-area-h{margin-top:4px}
.cm .cp-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px}
.cm-paper{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 14px;border-radius:12px;background:var(--surface);color:var(--ink);font-weight:700;font-size:15px;line-height:1.2;text-decoration:none;
  box-shadow:inset 0 0 0 1.5px var(--rule-2)}
.cm-paper svg{flex:none;color:var(--blue-ink)}
.cm-paper span{white-space:nowrap}
.cm-paper:hover{box-shadow:inset 0 0 0 2px var(--blue-ink);background:var(--blue-tint)}
.cm-paper:focus-visible{outline:3px solid var(--gold);outline-offset:2px}

/* ---- alongside: the music home's tool cards, and the plan line */
.cm-tools{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr));gap:16px}
.cm-tool{--ci:var(--blue-ink);--ct:var(--blue-tint);display:flex;align-items:center;gap:14px;height:100%;min-height:84px;padding:16px 18px;border-radius:18px;background:var(--ct);color:var(--ink);text-decoration:none;
  transition:box-shadow .3s ease,transform .3s ease}
.cm-tool[data-tone="pink"]{--ci:var(--music-ink);--ct:var(--music-tint)}
.cm-tool[data-tone="teal"]{--ci:var(--study-ink);--ct:var(--study-tint)}
.cm-tool:hover{box-shadow:var(--shadow);transform:translateY(-2px)}
.cm-tool-ic{flex:none;display:flex;align-items:center;justify-content:center;width:52px;height:52px;border-radius:12px;background:var(--surface);color:var(--ci)}
.cm-tool-tx{display:flex;flex-direction:column;gap:3px;min-width:0}
.cm-tool-tx b{font:600 19px/1.2 var(--f-display)}
.cm-tool-tx small{font-size:15.5px;line-height:1.4;color:var(--ink-2);text-wrap:pretty}
.cm-plan{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 14px;margin:24px 0 0;font-size:16.5px;line-height:1.5;color:var(--ink-2)}
.cm-plan span{text-wrap:pretty}
.cm-plan .hm-link{white-space:nowrap}

/* ---- questions */
.cm-faq .cp-faq{margin-top:0;margin-bottom:0}
.cm-faq .ln-legal{margin:28px 0 0}

@media (prefers-reduced-motion:reduce){.cm-tool,.cm-tool:hover,.cm-key{transition:none;transform:none}}
html[data-motion="off"] .cm-tool:hover{transform:none}
/* legibility on phones: body text 16 px or more */
@media (max-width:640px){
  .cm :is(.cm-pick-k,.cm-sample-k,.cm-paper,.cm-tool-tx small,.cm-plan,.cp-facts,.cp-prog-t,.plc,.plc .plc-btn,.cp-m,.cp-key,.cp-tog,.cp-go small,.cp-rev){font-size:16px}
  .cm-prac .lr-panel :is(p,a,span,small,b,li){font-size:max(16px,1em)}
}
/* the unit's number on its pressed badge: a deeper pink, so the white figure reads at 4.5:1 */
:root:not([data-theme="dark"]) .cm .cp-u.is-current .n,:root:not([data-theme="dark"]) .cm .cp-u.is-done .n{background:color-mix(in srgb,var(--ci) 84%,#000)}
/* 44 px targets: the lessons toggle, and the unit's title link (its padding grows the hit area, the margin gives it back) */
.cm .cp-tog{min-height:44px}
.cm .cp-u .t a{display:inline-block;padding-block:11px;margin-block:-11px}

/* the next lesson's number on its pink row, and the Practise strip's link, at reading size and contrast */
.cm .lsr.is-next .lsr-n{color:var(--ink)}
.cm .lsr.is-next .lsr-t::before{content:var(--cm-upnext,"Up next")}   /* in the page's language (course-music.php) */
@media (max-width:640px){.cm-prac .lr-panel.pp-strip .pp-more{font-size:16px}}

/* motion, small and once: Bruno waves himself in, the outcomes' pictures pop in turn; none with reduced motion */
@media (prefers-reduced-motion:no-preference){
  html:not([data-motion="off"]) .cm-bruno{animation:cm-in .7s cubic-bezier(.22,1.4,.36,1) .15s both;transform-origin:50% 100%}
  html:not([data-motion="off"]) .cm-can-ic{animation:cm-pop .45s cubic-bezier(.22,1.6,.36,1) calc(.25s + var(--i,0) * .07s) both}
}
@keyframes cm-in{from{opacity:0;transform:translateY(14px) scale(.94)}to{opacity:1;transform:none}}
@keyframes cm-pop{from{opacity:0;transform:scale(.4)}to{opacity:1;transform:none}}
