@font-face{font-family:Inter;src:url("fonts/Inter-Variable.ttf") format("truetype");font-weight:100 900;font-style:normal;font-display:swap}
:root{
  color-scheme:dark;
  --bg:#07090d;
  --rail:#090c11;
  --surface:#0d1117;
  --surface-raised:#111620;
  --surface-soft:#0a0e14;
  --line:#222936;
  --line-strong:#303a4b;
  --text:#f4f6fa;
  --muted:#a5adbb;
  --subtle:#747f90;
  --blue:#6fa8ff;
  --blue-soft:#0d223f;
  --violet:#9a8cff;
  --yellow:#f2d55c;
  --green:#63d391;
  --shadow:0 24px 60px rgba(0,0,0,.28);
  --radius:10px;
}
*{box-sizing:border-box}
html{background:var(--bg);font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;scroll-behavior:smooth}
body{margin:0;background:radial-gradient(900px 430px at 82% -180px,rgba(128,101,255,.075),transparent 68%),radial-gradient(760px 380px at 42% -190px,rgba(73,145,255,.06),transparent 70%),var(--bg);background-attachment:fixed;color:var(--text);font-size:16px;line-height:1.5}
button,select{font:inherit}
button,a,select{touch-action:manipulation}
button:focus-visible,a:focus-visible,select:focus-visible,summary:focus-visible{outline:2px solid var(--blue);outline-offset:3px}
a{color:inherit}
svg{display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.academy-shell{min-height:100vh;display:grid;grid-template-columns:248px minmax(0,1fr)}
.course-rail{position:sticky;top:0;height:100vh;display:flex;flex-direction:column;padding:24px 18px 18px;background:var(--rail);border-right:1px solid #171c25;overflow-y:auto;z-index:20}
.brand{display:flex;align-items:center;gap:10px;padding:0 4px 28px;text-decoration:none;font-size:21px;font-weight:760;letter-spacing:-.04em}
.brand-mark{width:26px;color:#72f64c}
.brand-mark svg{width:100%;height:auto;stroke-width:2.25}
.rail-label,.eyebrow,.section-label,.keyboard-label{margin:0;text-transform:uppercase;letter-spacing:.11em;font-size:.72rem;font-weight:720;color:var(--muted)}
.course-map{display:flex;flex-direction:column;gap:5px}
.course-map>.rail-label{padding:0 10px 8px;font-size:.66rem;color:var(--subtle)}
.stage-link{display:grid;grid-template-columns:27px 1fr;align-items:center;gap:7px;min-height:42px;padding:8px 9px;border-radius:8px;text-decoration:none;color:#8c96a6;font-size:.78rem;font-weight:600}
.stage-link:hover{background:#10151d;color:var(--text)}
.stage-link>span:first-child,.stage-number{color:#69778a;font-size:.65rem;font-variant-numeric:tabular-nums}
.current-stage{margin:4px 0;padding:10px 8px 9px;background:#0f141c;border:1px solid var(--line);border-radius:10px}
.current-stage.active-stage{border-color:#35445a;background:#111824}
.stage-heading{display:grid;grid-template-columns:27px 1fr;gap:7px;align-items:start;padding:2px 1px 9px}
.stage-heading strong{display:block;font-size:.82rem;letter-spacing:-.01em}
.stage-heading small{display:block;margin-top:2px;color:var(--subtle);font-size:.68rem}
.stage-lessons{display:grid;gap:2px;padding-left:28px;border-left:1px solid #27303f}
.stage-lessons a{position:relative;padding:6px 8px;border-radius:7px;color:#9ca6b4;text-decoration:none;font-size:.72rem;font-weight:590;line-height:1.25}
.stage-lessons a span{color:#667388;margin-right:3px;font-variant-numeric:tabular-nums}
.stage-lessons a:hover{background:#151b25;color:var(--text)}
.stage-lessons a.active{background:#142138;color:#e8f1ff}
.stage-lessons a.active::before{content:"";position:absolute;left:-29px;top:8px;bottom:8px;width:2px;background:var(--blue);border-radius:2px}
.stage-lessons a.active span{color:#8dbbff}
.rail-footer{margin-top:auto;display:flex;align-items:center;gap:8px;padding:14px 8px 0;border-top:1px solid var(--line);color:var(--subtle);font-size:.7rem}
.rail-footer a,.rail-footer button{padding:0;border:0;background:none;color:inherit;text-decoration:none;cursor:pointer}
.rail-footer a:hover,.rail-footer button:hover{color:var(--text)}
.lesson{min-width:0}
.lesson-nav{position:sticky;top:0;z-index:15;height:64px;display:flex;align-items:center;justify-content:space-between;padding:0 30px;background:rgba(7,9,13,.84);border-bottom:1px solid rgba(41,49,64,.72);box-shadow:0 10px 35px rgba(0,0,0,.16),inset 0 1px 0 rgba(255,255,255,.018);backdrop-filter:blur(20px) saturate(125%)}
.nav-context{display:flex;gap:9px;align-items:center;font-size:.78rem;color:var(--subtle)}
.nav-context strong{color:#c5ccd7;font-weight:650}
.divider{color:#3e4653}
.lesson-actions{display:flex;align-items:center;gap:6px}
.nav-link{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:36px;padding:0 12px;border-radius:7px;text-decoration:none;color:#aeb6c4;font-size:.76rem;font-weight:620}
.nav-link:hover{background:#121720;color:var(--text)}
.about-nav{border:1px solid #3a3b59;background:linear-gradient(135deg,rgba(75,103,153,.22),rgba(92,70,153,.2));color:#d8ddff;cursor:pointer}
.about-nav:hover{border-color:#65659a;background:linear-gradient(135deg,rgba(75,103,153,.34),rgba(92,70,153,.3));color:#fff}
.secondary-nav{border:1px solid var(--line)}
.next-nav{margin-left:3px;background:#f0f3f8;color:#11151c}
.next-nav:hover{background:#fff;color:#080a0d}
.mobile-menu{display:none;width:38px;height:38px;align-items:center;justify-content:center;border:0;border-radius:7px;background:transparent;color:#cbd2de}
.mobile-menu svg{width:20px}
.lesson-content{width:min(1500px,100%);margin:0;padding:34px 38px 54px}
.lesson-intro{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(360px,.9fr);gap:36px;align-items:end;padding:2px 0 30px}
.eyebrow{color:#7f8b9d;margin-bottom:8px}
h1,h2,h3,p{margin-top:0}
h1{margin-bottom:9px;font-size:clamp(2.15rem,3.6vw,3.35rem);line-height:1.02;letter-spacing:-.055em;font-weight:710}
.lesson-summary{max-width:710px;margin-bottom:0;color:#b9c0cb;font-size:1.05rem;line-height:1.55;letter-spacing:-.01em}
.objective{display:flex;gap:13px;align-items:flex-start;padding:16px 18px;border:1px solid #292842;border-radius:var(--radius);background:linear-gradient(110deg,rgba(104,84,205,.105),rgba(38,73,124,.055) 65%,rgba(14,18,25,.14));box-shadow:inset 2px 0 0 rgba(154,140,255,.48),0 12px 34px rgba(19,12,52,.08)}
.objective-icon,.notice-icon,.feedback-icon,.summary-icon{flex:0 0 auto;display:grid;place-items:center;width:30px;height:30px;border-radius:7px;color:#afa4ff;background:rgba(154,140,255,.12)}
.objective-icon svg,.notice-icon svg,.feedback-icon svg,.summary-icon svg{width:17px}
.objective span,.notice-card span,.live-feedback span{display:block;margin-bottom:3px;text-transform:uppercase;letter-spacing:.1em;color:#b9afff;font-size:.67rem;font-weight:750}
.objective p,.notice-card p,.live-feedback p{margin:0;color:#d8dce4;font-size:.83rem;line-height:1.45}
.start-card,.activity,.explanation,.why-card{border:1px solid var(--line);border-radius:var(--radius);background:linear-gradient(145deg,rgba(255,255,255,.012),transparent 38%),var(--surface);box-shadow:0 1px 0 rgba(255,255,255,.018),0 18px 55px rgba(0,0,0,.08)}
.start-card{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:17px 18px;margin-bottom:14px}
.start-heading{display:flex;align-items:center;gap:12px;min-width:300px}
.start-number,.step-chip{display:grid;place-items:center;flex:0 0 auto;width:28px;height:28px;border-radius:50%;background:var(--blue-soft);border:1px solid #294e7b;color:#94c1ff;font-size:.74rem;font-weight:750}
.start-heading .section-label{margin-bottom:2px;color:#8cbaff}
.start-heading p:last-child{margin:0;color:#b8c0cc;font-size:.8rem;line-height:1.4}
.start-heading strong{color:#e9edf4;font-weight:650}
.setup-controls{display:flex;justify-content:flex-end;align-items:end;gap:8px;flex-wrap:wrap}
.field,.segmented-field{margin:0;border:0;padding:0}
.field>span,.segmented-field legend{display:block;margin:0 0 5px;padding:0;color:#778397;text-transform:uppercase;letter-spacing:.08em;font-size:.62rem;font-weight:720}
select,.segmented{height:38px;border:1px solid var(--line-strong);border-radius:7px;background:#0a0e14;color:#e8ebf1}
select{min-width:112px;padding:0 34px 0 11px;cursor:pointer}
.segmented{display:flex;padding:3px}
.segmented button{border:0;border-radius:5px;padding:0 11px;background:transparent;color:#8e98a8;font-size:.72rem;font-weight:650;cursor:pointer;white-space:nowrap}
.segmented button:hover{color:var(--text)}
.segmented button.active{background:#202838;color:#f6f8fb;box-shadow:0 1px 3px rgba(0,0,0,.3)}
.activity{position:relative;padding:20px;overflow:hidden}
.activity::before{content:"";position:absolute;z-index:0;left:18px;right:18px;top:0;height:1px;background:linear-gradient(90deg,transparent,rgba(111,168,255,.56),rgba(154,140,255,.38),transparent);opacity:.72;pointer-events:none}
.activity>*{position:relative;z-index:1}
.activity-toolbar{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:17px}
.activity-toolbar .section-label{color:#8cbaff;margin-bottom:4px}
.activity-toolbar h2,.explanation h2{margin:0;font-size:1.15rem;line-height:1.25;letter-spacing:-.025em;font-weight:670}
.playback-controls{display:flex;align-items:center;gap:8px}
.speed-control{display:grid;grid-template-columns:auto 112px auto;align-items:center;gap:7px;min-height:38px;padding:0 10px;border:1px solid var(--line);border-radius:7px;background:#0b0f16;color:#8f9aac;font-size:.67rem;font-weight:680;white-space:nowrap}
.speed-control input{width:112px;direction:rtl;accent-color:#76a8e8;cursor:pointer}
.speed-control output{min-width:42px;color:#cbd4e1;text-align:right}
.primary-button,.icon-button,.hear-chord,.next-chord{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:38px;border:1px solid transparent;border-radius:7px;font-weight:680;cursor:pointer;transition:background-color .18s ease,border-color .18s ease,color .18s ease,transform .18s ease,box-shadow .18s ease}
.primary-button{min-width:166px;padding:0 16px;background:#f1f4f9;color:#0c1016;font-size:.78rem}
.primary-button:hover{background:#fff}
.primary-button.playing{background:#12233a;color:#a9ceff;border-color:#315b8c;box-shadow:0 0 0 1px rgba(111,168,255,.08),0 8px 26px rgba(33,91,158,.12)}
.primary-button svg,.hear-chord svg{width:15px;fill:currentColor;stroke-width:0}
.icon-button{width:38px;background:#0a0e14;border-color:var(--line-strong);color:#aeb6c4}
.icon-button:hover{color:var(--text);border-color:#465266}
.icon-button svg{width:17px}
.activity-grid{display:grid;grid-template-columns:300px minmax(0,1fr);gap:16px;align-items:stretch}
.control-panel{display:flex;flex-direction:column;gap:12px}
.control-section{padding:15px;border:1px solid var(--line);border-radius:8px;background:var(--surface-soft)}
.control-title{display:flex;align-items:flex-start;gap:10px;margin-bottom:12px}
.control-title .section-label{margin:1px 0 2px;color:#bdc5d2}
.microcopy{margin:0;color:var(--subtle);font-size:.71rem}
.inversion-options{display:grid;gap:6px}
.listen-list{display:grid;gap:5px}
.listen-item{display:grid;grid-template-columns:30px 1fr;gap:9px;align-items:center;min-height:47px;padding:6px 8px;border-top:1px solid #1d2531;color:#b7c0cc}
.listen-item:first-child{border-top:0}
.listen-item strong{display:block;font-size:.75rem;line-height:1.25;font-weight:650}
.listen-item small{display:block;margin-top:2px;color:#717d8f;font-size:.65rem;line-height:1.3}
.inversion-option{position:relative;display:grid;grid-template-columns:30px 1fr;gap:9px;align-items:center;width:100%;min-height:52px;padding:7px 9px;border:1px solid transparent;border-radius:7px;background:transparent;color:#aeb7c4;text-align:left;cursor:pointer;transition:background-color .18s ease,border-color .18s ease,color .18s ease,transform .18s ease}
.inversion-option:hover{background:#121924;color:var(--text)}
.inversion-option.active{background:#111d2e;border-color:#2e5688;color:#f2f5f9}
.option-icon{display:grid;place-items:center;width:29px;height:29px;border:1px solid #313b4b;border-radius:7px;color:#8995a7;font-size:.72rem;font-weight:760}
.inversion-option.active .option-icon{border-color:#4777ad;background:#183051;color:#9bc6ff}
.option-icon svg{width:17px}
.inversion-option strong{display:block;font-size:.76rem;line-height:1.25;font-weight:650}
.inversion-option small{display:block;color:#717d8f;font-size:.65rem;line-height:1.3;margin-top:2px}
.recommended{position:absolute;right:8px;top:6px;color:#7897c2;font-size:.54rem;text-transform:uppercase;letter-spacing:.08em}
.notice-card{display:flex;gap:11px;align-items:flex-start;margin-top:auto;padding:14px;border:1px solid #2d2945;border-radius:8px;background:linear-gradient(120deg,rgba(76,62,142,.105),rgba(14,18,25,.32));box-shadow:inset 1px 0 0 rgba(154,140,255,.28)}
.notice-icon{width:27px;height:27px}
.notice-icon svg{width:15px}
.notice-card p{font-size:.76rem}
.workspace{min-width:0;display:flex;flex-direction:column;gap:10px}
.progression{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
.chord-step{position:relative;min-width:0;display:grid;grid-template-columns:auto 1fr;gap:8px;align-items:center;min-height:62px;padding:9px 10px;border:1px solid var(--line);border-radius:8px;background:#0b0f16;color:#9aa4b3;text-align:left;cursor:pointer;overflow:hidden;transition:background-color .18s ease,border-color .18s ease,color .18s ease,box-shadow .18s ease}
.chord-step:hover{border-color:#394456;color:#dfe4ec}
.chord-step.active{border-color:#476f9e;background:#101c2b;color:var(--text);box-shadow:inset 0 -2px 0 var(--blue)}
.chord-step-index{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#161d28;color:#7f8b9b;font-size:.65rem;font-weight:720}
.chord-step.active .chord-step-index{background:#21446e;color:#a8ceff}
.chord-step strong{display:block;overflow:hidden;text-overflow:ellipsis;font-size:.84rem;font-weight:680;white-space:nowrap}
.chord-step small{display:block;margin-top:1px;color:#717d8e;font-size:.63rem;line-height:1.2;white-space:normal;overflow-wrap:anywhere}
.chord-step.active small{color:#89a6c8}
.keyboard-card{padding:15px 15px 12px;border:1px solid #273446;border-radius:8px;background:#09101a}
.keyboard-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}
.keyboard-label{display:block;margin-bottom:1px;color:#6f7d91;font-size:.61rem}
.keyboard-heading strong{font-size:.83rem;font-weight:650}
.hear-chord{height:33px;padding:0 10px;border-color:#2c4668;background:#0f2036;color:#9cc5fa;font-size:.69rem}
.hear-chord:hover{background:#142a46;color:#c9e1ff}
.hear-chord svg{width:13px}
.piano-scroll{overflow-x:auto;padding-bottom:1px}
.piano{position:relative;display:flex;min-width:690px;height:204px;border:1px solid #344258;border-radius:7px;overflow:hidden;background:#d9dde3;isolation:isolate}
.white-key{position:relative;flex:1;display:flex;align-items:flex-end;justify-content:center;padding-bottom:13px;border:0;border-right:1px solid #88919d;background:linear-gradient(90deg,#f1f3f6,#dfe3e8 53%,#f6f7f8);color:#171b22;font-weight:720;cursor:pointer}
.white-key:last-child{border-right:0}
.white-key span{position:relative;z-index:3;font-size:.74rem}
.white-key.highlight-tone{background:linear-gradient(180deg,#dceaff,#9dc4fb)}
.white-key.highlight-bass{background:linear-gradient(180deg,#fff8c7,#f2d55c);box-shadow:inset 0 0 0 2px #d4b83a}
.black-key{position:absolute;top:0;z-index:5;width:5.4%;height:61%;display:flex;align-items:flex-end;justify-content:center;padding:0 0 10px;border:1px solid #05070a;border-radius:0 0 5px 5px;background:linear-gradient(90deg,#07090c,#1d222a 54%,#050608);color:#b8c0cc;font-size:.58rem;font-weight:650;box-shadow:0 8px 12px rgba(0,0,0,.38);cursor:pointer}
.black-key.highlight-tone{background:linear-gradient(180deg,#34679f,#162c48);border-color:#78adf0;color:#e9f3ff}
.black-key.highlight-bass{background:linear-gradient(180deg,#d9bd42,#776014);border-color:#ffe878;color:#fff8d8;box-shadow:0 0 18px rgba(242,213,92,.32)}
.note-badge{position:absolute;top:10px;left:50%;z-index:8;transform:translateX(-50%);min-width:42px;padding:3px 6px;border-radius:5px;background:#244d7a;color:#dcecff;text-align:center;font-size:.6rem;font-weight:720;white-space:nowrap;box-shadow:0 4px 10px rgba(0,0,0,.18)}
.white-key .note-badge{top:calc(61% + 9px)}
.note-badge.role-badge{display:flex;min-width:38px;flex-direction:column;align-items:center;gap:1px;padding:3px 5px;line-height:1}
.note-badge.role-badge strong{font:inherit}
.note-badge.role-badge small{color:inherit;font-size:.49rem;font-weight:760;letter-spacing:.04em;line-height:1}
.highlight-bass .note-badge{background:#8b721c;color:#fff9dc}
.tonic-reference{outline:1px solid rgba(143,188,247,.72);outline-offset:-2px}
.tonic-marker{position:absolute;left:50%;bottom:4px;z-index:7;transform:translateX(-50%);padding:1px 4px;border-radius:4px;background:#152a43;color:#a9ceff;font-size:.46rem;font-style:normal;font-weight:760;letter-spacing:.035em;line-height:1.2;white-space:nowrap;pointer-events:none}
.white-key.tonic-reference{padding-bottom:29px}
.black-key.tonic-reference{padding-bottom:25px}
.black-key .tonic-marker{bottom:3px;background:#203957;color:#c7ddfa;font-size:.42rem}
.transition-leaving::after,.transition-arriving::after,.transition-shared::after{content:"";position:absolute;inset:0;z-index:1;border-radius:inherit;pointer-events:none}
body[data-lesson="invertedFifth"] .piano[data-rq-fixed="1"] .rq-wash{position:absolute;inset:0;z-index:1;opacity:0;pointer-events:none}
body[data-lesson="invertedFifth"] .piano[data-rq-fixed="1"] .rq-badge{z-index:4;opacity:0;pointer-events:none}
body[data-lesson="invertedFifth"] .piano[data-rq-fixed="1"] .rq-badge.rq-bass{background:#8b721c;color:#fff9dc}
body[data-lesson="invertedFifth"] .piano[data-rq-fixed="1"] .black-key .rq-name{position:relative;z-index:3}
body[data-lesson]:not([data-lesson="invertedFifth"]) .piano[data-rt-fixed="1"] .rt-wash{position:absolute;inset:0;z-index:1;opacity:0;pointer-events:none}
body[data-lesson]:not([data-lesson="invertedFifth"]) .piano[data-rt-fixed="1"] .rt-badge{z-index:4;opacity:0;pointer-events:none}
body[data-lesson]:not([data-lesson="invertedFifth"]) .piano[data-rt-fixed="1"] .rt-badge.rt-bass{background:#8b721c;color:#fff9dc}
body[data-lesson]:not([data-lesson="invertedFifth"]) .piano[data-rt-fixed="1"] .black-key .rt-name{position:relative;z-index:3}
.white-key.leaving-tone::after,.white-key.arriving-tone::after{background:linear-gradient(180deg,#dceaff,#9dc4fb)}
.white-key.leaving-bass::after,.white-key.arriving-bass::after{background:linear-gradient(180deg,#fff8c7,#f2d55c);box-shadow:inset 0 0 0 2px #d4b83a}
.black-key.leaving-tone::after,.black-key.arriving-tone::after{background:linear-gradient(180deg,#34679f,#162c48);box-shadow:inset 0 0 0 1px #78adf0}
.black-key.leaving-bass::after,.black-key.arriving-bass::after{background:linear-gradient(180deg,#d9bd42,#776014);box-shadow:inset 0 0 0 1px #ffe878}
.white-key.shared-from-tone::after{background:linear-gradient(180deg,#dceaff,#9dc4fb)}
.white-key.shared-from-bass::after{background:linear-gradient(180deg,#fff8c7,#f2d55c);box-shadow:inset 0 0 0 2px #d4b83a}
.black-key.shared-from-tone::after{background:linear-gradient(180deg,#34679f,#162c48);box-shadow:inset 0 0 0 1px #78adf0}
.black-key.shared-from-bass::after{background:linear-gradient(180deg,#d9bd42,#776014);box-shadow:inset 0 0 0 1px #ffe878}
.transition-leaving::after{animation:cwNoteOverlayLeave var(--chord-handover-ms,800ms) cubic-bezier(.35,0,.18,1) both}
.transition-arriving::after{animation:cwNoteOverlayArrive var(--chord-handover-ms,800ms) cubic-bezier(.35,0,.18,1) both}
.transition-shared::after{animation:cwNoteOverlayLeave var(--chord-handover-ms,800ms) cubic-bezier(.35,0,.18,1) both}
.transition-leaving .note-badge{animation:cwBadgeLeave var(--chord-handover-ms,800ms) cubic-bezier(.35,0,.18,1) both}
.transition-arriving .note-badge{animation:cwBadgeArrive var(--chord-handover-ms,800ms) ease-out both}
.leaving-bass .note-badge,.arriving-bass .note-badge{background:#8b721c;color:#fff9dc}
@keyframes cwNoteOverlayLeave{0%{opacity:1}100%{opacity:0}}
@keyframes cwNoteOverlayArrive{0%{opacity:0}100%{opacity:1}}
@keyframes cwBadgeLeave{0%,12%{opacity:1}44%,100%{opacity:0}}
@keyframes cwBadgeArrive{0%,58%{opacity:0}100%{opacity:1}}
.transition-shared .departing-shared-role-badge{animation:cwBadgeLeave var(--chord-handover-ms,800ms) cubic-bezier(.35,0,.18,1) both}
.transition-shared .arriving-role-badge{animation:cwArrivingRoleBadge var(--chord-handover-ms,800ms) ease both}
.transition-shared .arriving-role-badge.next-bass{background:#8b721c;color:#fff9dc}
.transition-shared .departing-shared-role-badge.departing-bass{background:#8b721c;color:#fff9dc}
@keyframes cwArrivingRoleBadge{0%,66%{opacity:0}100%{opacity:1}}
.piano.end-return-release .white-key.highlight-tone,.piano.end-return-release .white-key.highlight-bass{animation:cwEndReturnWhiteRelease var(--end-return-phase-ms,400ms) ease-in both}
.piano.end-return-release .black-key.highlight-tone,.piano.end-return-release .black-key.highlight-bass{animation:cwEndReturnBlackRelease var(--end-return-phase-ms,400ms) ease-in both}
.piano.end-return-release .highlight-tone .note-badge,.piano.end-return-release .highlight-bass .note-badge{animation:cwEndReturnBadgeRelease var(--end-return-phase-ms,400ms) ease-in both}
@keyframes cwEndReturnWhiteRelease{0%{filter:brightness(1);box-shadow:inset 0 0 0 0 rgba(234,237,241,0)}100%{filter:brightness(.98);box-shadow:inset 0 0 0 999px rgba(234,237,241,.98)}}
@keyframes cwEndReturnBlackRelease{0%{filter:brightness(1);box-shadow:inset 0 0 0 0 rgba(7,9,12,0)}100%{filter:brightness(.72);box-shadow:inset 0 0 0 999px rgba(7,9,12,.98)}}
@keyframes cwEndReturnBadgeRelease{0%{opacity:1}100%{opacity:0}}
.piano.end-return-arrival .white-key.highlight-tone::after,.piano.end-return-arrival .white-key.highlight-bass::after,.piano.end-return-arrival .black-key.highlight-tone::after,.piano.end-return-arrival .black-key.highlight-bass::after{content:"";position:absolute;inset:0;z-index:6;border-radius:inherit;pointer-events:none;animation:cwEndReturnReveal var(--end-return-phase-ms,800ms) cubic-bezier(.35,0,.18,1) both}
.piano.end-return-arrival .white-key.highlight-tone::after,.piano.end-return-arrival .white-key.highlight-bass::after{background:linear-gradient(90deg,#eef1f5,#e4e8ee)}
.piano.end-return-arrival .black-key.highlight-tone::after,.piano.end-return-arrival .black-key.highlight-bass::after{background:linear-gradient(90deg,#07090c,#1d222a 54%,#050608)}
.piano.end-return-arrival .highlight-tone .note-badge,.piano.end-return-arrival .highlight-bass .note-badge{animation:cwEndReturnBadgeArrival var(--end-return-phase-ms,800ms) ease-out both}
@keyframes cwEndReturnReveal{0%,10%{opacity:1}100%{opacity:0}}
@keyframes cwEndReturnBadgeArrival{0%,18%{opacity:0}100%{opacity:1}}
.chord-step.transition-source{box-shadow:inset 0 0 0 1px rgba(118,168,232,.42)}
.chord-step.transition-target{border-color:#76a8e8;background:linear-gradient(180deg,#111c2a,#0d141e)}
.transition-label{animation:cwTransitionLabel var(--chord-handover-ms,800ms) ease both}
@keyframes cwTransitionLabel{0%{opacity:.72}45%,100%{opacity:1}}
.piano.final-release .white-key.highlight-tone,.piano.final-release .white-key.highlight-bass{animation:cwFinalWhiteRelease var(--final-release-ms,580ms) ease-in both}
.piano.final-release .black-key.highlight-tone,.piano.final-release .black-key.highlight-bass{animation:cwFinalBlackRelease var(--final-release-ms,580ms) ease-in both}
.piano.final-release .highlight-tone .note-badge,.piano.final-release .highlight-bass .note-badge{animation:cwFinalBadgeRelease var(--final-release-ms,580ms) ease-in both}
@keyframes cwFinalWhiteRelease{0%{filter:brightness(1);box-shadow:inset 0 0 0 0 rgba(234,237,241,0)}100%{filter:brightness(.98);box-shadow:inset 0 0 0 999px rgba(234,237,241,.98)}}
@keyframes cwFinalBlackRelease{0%{filter:brightness(1);box-shadow:inset 0 0 0 0 rgba(8,10,14,0)}100%{filter:brightness(.72);box-shadow:inset 0 0 0 999px rgba(8,10,14,.96)}}
@keyframes cwFinalBadgeRelease{0%{opacity:1}100%{opacity:0}}
body[data-lesson="smartInversions"] .chord-step-index{display:none}
body[data-lesson="smartInversions"] .chord-step{grid-template-columns:1fr;text-align:center;min-height:56px}
body[data-lesson="smartInversions"] .chord-step strong{font-size:.9rem}
body[data-lesson="smartInversions"] .smart-role{min-width:52px}
body[data-lesson="smartInversions"] .live-feedback{min-height:58px}
body[data-lesson="smartInversions"] .activity-grid{grid-template-columns:1fr}
body[data-lesson="smartInversions"] .control-panel{display:none}
body[data-lesson="invertedFifth"] .chord-step-index,
body[data-lesson="invertedFourth"] .chord-step-index,
body[data-lesson="inversions"] .chord-step-index,
body[data-lesson="seventhInversions"] .chord-step-index{display:none}
body[data-lesson="invertedFifth"] .chord-step,
body[data-lesson="invertedFourth"] .chord-step,
body[data-lesson="inversions"] .chord-step,
body[data-lesson="seventhInversions"] .chord-step{grid-template-columns:1fr;text-align:center}
.keyboard-legend{display:flex;gap:18px;margin-top:9px;color:#748095;font-size:.63rem}
.keyboard-legend span{display:flex;align-items:center;gap:6px}
.keyboard-legend i{width:9px;height:9px;border-radius:2px}
.legend-bass{background:var(--yellow)}
.legend-tone{background:#76a8e8}
.live-feedback{display:grid;grid-template-columns:30px minmax(0,1fr) auto;gap:11px;align-items:center;min-height:68px;padding:11px 12px;border:1px solid #283651;border-radius:8px;background:linear-gradient(110deg,#0d1725,#0b111a)}
.feedback-icon{width:28px;height:28px;color:#8dbbff;background:#112640}
.feedback-icon svg{width:16px}
.live-feedback span{color:#82b4f7}
.live-feedback p{font-size:.78rem}
.next-chord{height:32px;padding:0 10px;background:#151c27;border-color:#2c3645;color:#bac2ce;font-size:.67rem}
.next-chord:hover{border-color:#486487;color:#fff}
.explanation{display:grid;grid-template-columns:.8fr 1.6fr;gap:36px;margin-top:14px;padding:25px}
.explanation .section-label{margin-bottom:7px;color:#8cbaff}
.explanation-copy>p:last-child{margin:10px 0 0;color:#939dab;font-size:.84rem;line-height:1.6}
.concept-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.concept-grid article{display:flex;gap:11px;padding:13px;border-left:1px solid #303948}
.concept-index{padding-top:2px;color:#617087;font-size:.65rem;font-variant-numeric:tabular-nums}
.concept-grid h3{margin:0 0 5px;font-size:.8rem;font-weight:670}
.concept-grid p{margin:0;color:#8792a2;font-size:.72rem;line-height:1.5}
.why-card{margin-top:14px;overflow:hidden}
.why-card summary{display:grid;grid-template-columns:32px 1fr 22px;gap:12px;align-items:center;padding:16px 18px;cursor:pointer;list-style:none}
.why-card summary::-webkit-details-marker{display:none}
.why-card summary:hover{background:#11161f}
.summary-icon{width:30px;height:30px;background:#111e31;color:#85b4f0}
.why-card summary strong{display:block;font-size:.8rem;font-weight:660}
.why-card summary small{display:block;margin-top:2px;color:#748094;font-size:.68rem}
.chevron{width:18px;color:#718096;transition:transform .2s ease}
.why-card[open] .chevron{transform:rotate(180deg)}
.why-content{max-width:900px;padding:0 62px 20px;color:#a7b0bd;font-size:.82rem;line-height:1.65}
.why-content p:last-child{margin-bottom:0}
.lesson-footer{display:flex;justify-content:space-between;gap:20px;margin-top:22px;padding:18px 2px 0;border-top:1px solid var(--line)}
.lesson-footer a{text-decoration:none;color:#8f99a8;font-size:.75rem;font-weight:600}
.lesson-footer a:hover{color:var(--text)}
.footer-next{color:#b8c7dd!important}
.about-backdrop{position:fixed;inset:0;z-index:120;display:grid;place-items:center;padding:18px;background:rgba(3,5,8,.84);backdrop-filter:blur(12px)}
.about-backdrop[hidden]{display:none}
.about-backdrop.open{display:grid}
.about-dialog{width:min(1120px,calc(100vw - 36px));max-height:calc(100vh - 36px);overflow:auto;border:1px solid #272f3d;border-radius:12px;background:linear-gradient(180deg,rgba(15,20,29,.99),rgba(8,11,17,.995));box-shadow:0 30px 90px rgba(0,0,0,.58)}
.cwIntroHero{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:32px;align-items:end;padding:32px 36px 26px;border-bottom:1px solid #222a37;background:radial-gradient(520px 220px at 78% 0,rgba(104,83,190,.13),transparent 72%),radial-gradient(440px 200px at 38% -35px,rgba(73,126,196,.1),transparent 72%)}
.cwIntroHeroCopy{min-width:0;max-width:790px}
.cwAcademyIntroductionKicker{margin:0 0 11px;color:#91a4c2;font-size:.68rem;font-weight:720;letter-spacing:.13em;text-transform:uppercase}
.cwCohesiveIntroduction .cwIntroHero h2{margin:0;color:#f6f8fb;font-size:clamp(2.05rem,4vw,3.4rem);font-weight:730;line-height:1.02;letter-spacing:-.045em}
.cwAcademyIntroductionQuestion{max-width:760px;margin:13px 0 0;color:#b9c2d0;font-size:clamp(1.02rem,1.45vw,1.28rem);line-height:1.48;letter-spacing:-.014em}
.cwAcademyIntroductionActions{display:flex;flex-direction:column;align-items:stretch;gap:8px;min-width:168px}
.cwAcademyIntroductionActions button{min-height:40px;padding:0 16px;border-radius:7px;font-size:.76rem;font-weight:680;cursor:pointer}
.cwAcademyExploreLesson{order:-1;border:1px solid #eef2f8;background:#eef2f8;color:#11151c}
.cwAcademyWelcomeReturn{border:1px solid #2b3442;background:#10151d;color:#aeb8c7}
.cwAcademyIntroductionActions button:hover{filter:brightness(1.08)}
.cwAcademyIntroductionGrid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:12px;padding:20px 36px 36px}
.cwIntroCard{grid-column:span 4;min-width:0;padding:18px;border:1px solid #252e3b;border-radius:9px;background:#0d1219}
.cwIntroCard-why{grid-column:span 7;background:linear-gradient(145deg,#101722,#0c1118)}
.cwIntroCard-steps{grid-column:span 5;background:linear-gradient(145deg,rgba(32,43,63,.72),rgba(14,18,26,.96))}
.cwIntroCard h3{display:flex;align-items:center;gap:9px;margin:0 0 12px;color:#f0f3f8;font-size:.91rem;font-weight:680;letter-spacing:-.01em}
.cwIntroCardIcon{display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;border:1px solid rgba(126,153,201,.34);border-radius:7px;background:linear-gradient(135deg,rgba(58,102,165,.28),rgba(100,73,161,.24));color:#a7c8ff;font-size:.9rem}
.cwIntroCard p{margin:0;color:#b6bfcd;font-size:.9rem;line-height:1.58}
.cwIntroCard-steps ol{display:grid;gap:8px;margin:0;padding:0;list-style:none}
.cwIntroCard-steps li{display:grid;grid-template-columns:25px minmax(0,1fr);gap:9px;align-items:start;padding:8px 0;border-bottom:1px solid #242d3a;color:#d9e0ea;font-size:.8rem;font-weight:580;line-height:1.42}
.cwIntroCard-steps li:last-child{border-bottom:0}
.cwIntroCard-steps li>span{display:grid;place-items:center;width:24px;height:24px;border:1px solid #486895;border-radius:50%;background:#121e2e;color:#a9c9f7;font-size:.68rem;font-weight:720}
.dialog-backdrop{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:20px;background:rgba(3,5,8,.78);backdrop-filter:blur(7px)}
.dialog-backdrop[hidden]{display:none}
.help-dialog{width:min(480px,100%);padding:22px;border:1px solid var(--line-strong);border-radius:12px;background:#111620;box-shadow:var(--shadow)}
.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:20px}
.dialog-heading h2{margin:0;font-size:1.05rem}
.dialog-heading button{border:0;background:transparent;color:#8994a4;font-size:1.6rem;cursor:pointer}
.help-dialog ol{margin:20px 0 0;padding-left:22px;color:#aeb7c4;font-size:.84rem;line-height:1.6}
.help-dialog li+li{margin-top:8px}
@media(max-width:1180px){
  .academy-shell{grid-template-columns:220px minmax(0,1fr)}
  .lesson-content{padding-left:26px;padding-right:26px}
  .lesson-intro{grid-template-columns:1fr;gap:18px}
  .objective{max-width:780px}
  .start-card{align-items:flex-start;flex-direction:column}
  .setup-controls{justify-content:flex-start;width:100%}
  .activity-grid{grid-template-columns:260px minmax(0,1fr)}
  .piano{height:184px}
  .recommended{display:none}
  .explanation{grid-template-columns:1fr}
}
@media(max-width:1320px) and (min-width:1181px){
  .academy-shell{grid-template-columns:224px minmax(0,1fr)}
  .course-rail{padding-left:14px;padding-right:14px}
  .lesson-content{padding-left:30px;padding-right:30px}
  .activity-grid{grid-template-columns:284px minmax(0,1fr)}
  .chord-step{padding-left:8px;padding-right:8px;gap:6px}
}
@media(max-height:760px) and (min-width:901px){
  .lesson-nav{height:54px}
  .lesson-content{padding-top:17px;padding-bottom:36px}
  .lesson-intro{gap:24px;padding-bottom:17px}
  .lesson-intro .eyebrow{margin-bottom:4px}
  .lesson-intro h1{font-size:2.35rem;margin-bottom:5px}
  .lesson-summary{font-size:.9rem;line-height:1.42}
  .objective{padding:11px 13px}
  .objective p{font-size:.76rem;line-height:1.35}
  .start-card{padding:10px 14px;margin-bottom:10px}
  .activity{padding:13px 14px}
  .activity-toolbar{margin-bottom:9px}
  .activity-grid{gap:12px}
  .control-panel{gap:8px}
  .control-section{padding:10px 11px}
  .control-title{margin-bottom:7px}
  .inversion-options{gap:2px}
  .inversion-option{min-height:42px;padding-top:4px;padding-bottom:4px}
  .notice-card{padding:9px 11px}
  .notice-card p{font-size:.7rem;line-height:1.35}
  .chord-step{min-height:52px;padding-top:6px;padding-bottom:6px}
  .keyboard-card{padding-top:10px;padding-bottom:8px}
  .keyboard-heading{margin-bottom:8px}
  .piano{height:140px}
  .live-feedback{min-height:59px;padding-top:8px;padding-bottom:8px}
}
@media(max-width:900px){
  .academy-shell{display:block}
  .course-rail{position:fixed;left:0;top:0;width:260px;transform:translateX(-105%);transition:transform .22s ease;box-shadow:22px 0 70px rgba(0,0,0,.55)}
  .course-rail.open{transform:translateX(0)}
  .mobile-menu{display:inline-flex}
  .lesson-nav{padding:0 18px}
  .nav-context{margin-right:auto;margin-left:7px}
  .previous-nav span{display:none}
  .lesson-content{padding:26px 18px 44px}
  .activity-grid{grid-template-columns:1fr}
  .control-panel{display:grid;grid-template-columns:1fr 1fr}
  .notice-card{margin-top:0}
  .concept-grid{grid-template-columns:1fr}
  .concept-grid article{border-left:0;border-top:1px solid var(--line)}
  .cwIntroHero{grid-template-columns:1fr;padding:26px 24px 22px}
  .cwAcademyIntroductionActions{display:grid;grid-template-columns:1fr 1fr;min-width:0}
  .cwAcademyIntroductionGrid{grid-template-columns:1fr;padding:16px 24px 28px}
  .cwIntroCard,.cwIntroCard-why,.cwIntroCard-steps{grid-column:1}
}
@media(max-width:640px){
  .lesson-nav{height:58px}
  .nav-context{display:none}
  .lesson-actions{margin-left:auto}
  .secondary-nav,.previous-nav{display:none}
  .about-nav{min-height:34px;padding:0 9px;font-size:.68rem}
  .lesson-content{padding:22px 13px 38px}
  .lesson-intro{padding-bottom:22px}
  .lesson-summary{font-size:.95rem}
  .objective{padding:14px}
  .start-heading{min-width:0}
  .setup-controls{display:grid;grid-template-columns:1fr 1fr}
  .progression-field{grid-column:1/-1}
  select,.segmented{width:100%}
  .segmented button{flex:1}
  .activity{padding:14px 11px}
  .activity-toolbar{align-items:flex-start;flex-direction:column}
  .playback-controls{width:100%}
  .speed-control{grid-template-columns:auto minmax(72px,1fr) auto;flex:1}.speed-control input{width:100%}
  .primary-button{flex:1}
  .control-panel{display:block}
  .notice-card{margin-top:10px}
  .progression{grid-template-columns:1fr 1fr}
  .chord-step{min-height:57px}
  .keyboard-heading{align-items:flex-start;flex-direction:column}
  .live-feedback{grid-template-columns:28px 1fr}
  .next-chord{grid-column:2;justify-self:start}
  .explanation{padding:20px 16px}
  .why-content{padding-left:18px;padding-right:18px}
  .lesson-footer{flex-direction:column}
  .about-backdrop{padding:8px}
  .about-dialog{width:100%;max-height:calc(100vh - 16px)}
  .cwIntroHero{padding:22px 18px 18px}
  .cwAcademyIntroductionActions{grid-template-columns:1fr}
  .cwAcademyIntroductionGrid{padding:12px 18px 22px}
  .cwIntroCard{padding:15px}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
