/* B078CS: reading surfaces only; no workspace/transport styling. */
.cwGuideSurface{--guide-mint:#a5ded0;--guide-blue:#b3c9f2;--guide-gold:#edcf88;--guide-muted:#bbc7d9;--guide-line:#3c4e65;color:#eaf0f8!important;font-family:Arial,system-ui,sans-serif;line-height:1.65!important;}
.cwGuideSurface.cwGuideDialog{width:min(1120px,calc(100vw - 40px))!important;max-width:1120px!important;max-height:calc(100dvh - 40px)!important;box-sizing:border-box!important;padding:26px!important;background:linear-gradient(135deg,#152335,#0d1523)!important;border:1px solid #53667c!important;border-radius:18px!important;overflow:auto!important;scrollbar-gutter:stable;}
.cwGuideSurface.cwGuideDialog::backdrop{background:#020710db;}
.cwGuideSurface>header:not(.cwGuideHero),.cwGuideSurface>.cwUnifiedGuideHeader{display:flex!important;gap:20px;align-items:center;justify-content:space-between;border-bottom:1px solid var(--guide-line);padding:0 0 18px!important;margin-bottom:20px!important;}
.cwGuideSurface>h1,.cwGuideSurface>h2,.cwGuideSurface header>h1,.cwGuideSurface header>h2{font-size:clamp(22px,2.5vw,32px)!important;line-height:1.22!important;letter-spacing:-.6px;color:#f4f7fc!important;margin:0 0 16px!important;}
.cwGuideSurface header>h1,.cwGuideSurface header>h2{margin:0!important;}
.cwGuideSurface button,.cwGuideSurface a{touch-action:manipulation;}
.cwGuideSurface button:focus-visible,.cwGuideSurface a:focus-visible,.cwGuideSurface summary:focus-visible{outline:3px solid var(--guide-mint)!important;outline-offset:4px;}
.cwGuideSurface .cwGuideHero{display:grid!important;grid-template-columns:1.2fr 1fr;gap:22px;align-items:center;padding:22px!important;margin:0 0 22px!important;border:1px solid #526f77;border-radius:14px;background:linear-gradient(120deg,#203c41a6,#19283e);}
.cwGuideSurface .cwGuideEyebrow{display:block;color:var(--guide-mint);font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:1.5px;margin:0 0 10px;}
.cwGuideSurface .cwGuideHero h2{font-size:clamp(23px,2.3vw,31px)!important;line-height:1.23!important;margin:0 0 10px!important;color:#f3f7ff!important;}
.cwGuideSurface .cwGuideHero p{font-size:14px!important;color:#d2ddeb!important;line-height:1.7!important;margin:0!important;max-width:55ch;}
.cwGuideSurface .cwGuideGraphic{margin:0!important;min-width:0;}
.cwGuideSurface .cwGuideGraphic svg{display:block;width:100%;height:auto;max-height:160px;}
.cwGuideSurface .cwGuideGraphic figcaption{font-size:11px;line-height:1.5;color:#c0d6db;margin-top:9px;}
.cwGuideSurface .cwGuideReadingNav{display:flex;flex-wrap:wrap;gap:7px;padding:0;margin:0 0 22px;}
.cwGuideSurface .cwGuideReadingNav button{background:#1e2d43!important;border:1px solid #435772!important;border-radius:7px;color:#dce7f5!important;padding:8px 12px!important;font-size:12px!important;font-weight:600;cursor:pointer;}
.cwGuideSurface .cwGuideReadingNav button:hover{border-color:var(--guide-mint)!important;color:var(--guide-mint)!important;}
.cwGuideSurface .cwGuideGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start;}
.cwGuideSurface .cwGuideCard,.cwGuideSurface .cwAcademyIntroductionGrid>article{box-sizing:border-box;min-width:0;background:#19283c!important;border:1px solid var(--guide-line)!important;border-radius:12px!important;padding:21px!important;margin:0!important;box-shadow:none!important;}
.cwGuideSurface .cwGuideCard[data-guide-kind="why"],.cwGuideSurface .cwGuideCard[data-guide-kind="practice"]{border-top:3px solid var(--guide-mint)!important;}
.cwGuideSurface .cwGuideCard[data-guide-kind="listen"]{border-top:3px solid var(--guide-blue)!important;}
.cwGuideSurface .cwGuideCard[data-guide-kind="practice"]{background:linear-gradient(130deg,#233728,#19283c)!important;}
.cwGuideSurface .cwGuideCard h2,.cwGuideSurface .cwGuideCard h3,.cwGuideSurface .cwAcademyIntroductionGrid>article>h2{font-size:17px!important;line-height:1.35!important;margin:0 0 12px!important;color:#f0f5ff!important;letter-spacing:-.2px;}
.cwGuideSurface .cwGuideCard h2:before,.cwGuideSurface .cwGuideCard h3:before{content:attr(data-guide-index);display:inline-grid;place-items:center;vertical-align:middle;min-width:27px;height:27px;margin-right:9px;border:1px solid #58777c;border-radius:6px;color:var(--guide-mint);font-size:10px;letter-spacing:0;}
.cwGuideSurface .cwGuideCard p,.cwGuideSurface .cwGuideCard li,.cwGuideSurface .cwAcademyIntroductionGrid p{font-size:14px!important;line-height:1.8!important;color:#d0dbeb!important;max-width:70ch;margin:0 0 12px!important;}
.cwGuideSurface .cwGuideCard p:last-child{margin-bottom:0!important;}
.cwGuideSurface .cwGuideCard ul,.cwGuideSurface .cwGuideCard ol{padding-left:22px!important;margin:8px 0!important;}
.cwGuideSurface .cwGuideCard li{padding-left:3px;margin-bottom:8px!important;}
.cwGuideSurface .cwGuideCard>p:first-of-type::first-line{color:#edf3fc;}
.cwGuideSurface .cwGuideWide{grid-column:1/-1;}
.cwGuideSurface .cwGuideDetail{grid-column:1/-1;border:1px solid var(--guide-line);border-radius:10px;background:#111e30;padding:15px 20px;}
.cwGuideSurface .cwGuideDetail>summary{font-size:14px;font-weight:700;color:#cedbf0;cursor:pointer;}
.cwGuideSurface .cwGuideDetail>.cwGuideCard{margin-top:15px!important;}
.cwGuideSurface .cwGuideDetail .cwGuideMore{border-top:1px solid var(--guide-line);padding-top:12px;}
.cwGuideSurface .cwGuideSectionLabel{color:var(--guide-mint);font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:1px;margin-bottom:10px;}
.cwGuideSurface .cwGuideTableWrap{max-width:100%;overflow-x:auto;}
.cwGuideSurface table{width:100%;border-collapse:collapse;font-size:13px;}
.cwGuideSurface th,.cwGuideSurface td{text-align:left;padding:13px 12px!important;border-bottom:1px solid var(--guide-line);line-height:1.65;}
.cwGuideSurface th{color:var(--guide-mint);background:#102035;}
.cwGuideSurface .cwGuideIntroFigure{margin:20px 0!important;max-width:540px;}
.cwGuideSurface .cwAcademyIntroductionGrid{gap:18px!important;align-items:start!important;}
.cwGuideSurface .cwIntroHero{background:linear-gradient(125deg,#203b40,#142138)!important;border-bottom:1px solid #4c6476;}
.cwGuideSurface .cwIntroMore summary{padding:10px 0;color:var(--guide-mint)!important;font-size:12px!important;}
@media(max-width:780px){.cwGuideSurface.cwGuideDialog{width:calc(100vw - 20px)!important;padding:18px!important;max-height:calc(100dvh - 20px)!important;}.cwGuideSurface .cwGuideGrid{grid-template-columns:1fr;}.cwGuideSurface .cwGuideHero{grid-template-columns:1fr;padding:18px!important;}.cwGuideSurface .cwGuideGraphic{max-width:440px;}.cwGuideSurface .cwGuideCard{padding:18px!important;}.cwGuideSurface>header:not(.cwGuideHero){flex-wrap:wrap;gap:12px;}}
@media(prefers-reduced-motion:reduce){.cwGuideSurface *{scroll-behavior:auto!important;}}

html body #cwAcademyIntroductionOverlay .cwGuideSurface .cwAcademyIntroductionGrid{gap:18px!important;align-items:start!important;}
html body #cwAcademyIntroductionOverlay .cwGuideSurface .cwGuideCard{background:#19283c!important;border:1px solid #3c4e65!important;border-radius:12px!important;padding:22px!important;}
html body #cwAcademyIntroductionOverlay .cwGuideSurface .cwGuideIntroFigure{margin:20px 32px!important;}
.cwGuideSurface>.cwUnifiedGuideHeader,.cwGuideSurface>header:not(.cwGuideHero){position:sticky;top:0;background:#142033;z-index:3;}
.cwGuideSurface>.cwGuideReadingNav{scroll-margin-top:90px;}
.cwGuideSurface .cwGuideCard{scroll-margin-top:90px;}
.cwGuideSurface .cwGuideCard h2,.cwGuideSurface .cwGuideCard h3{scroll-margin-top:90px;}
html.cwStartPlayingIntro .messageCard,html.cwStartPlayingIntro .visualCard{border-radius:14px;}

.cwGuideSurface .cwGuideCategoryHero{margin:20px 28px!important;}
.cwGuideSurface .cwInvIntroGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;}
.cwGuideSurface .cwInvIntroGrid>.cwGuideCard{grid-column:auto;}
.cwGuideSurface .cwInvIntroGrid>.cwGuideCard:first-child{grid-column:1/-1;}
@media(max-width:780px){.cwGuideSurface .cwGuideCategoryHero{margin:14px!important;}.cwGuideSurface .cwInvIntroGrid{grid-template-columns:1fr;}}

.cwGuideSurface .cwGuideParagraphChunk{display:block;margin-bottom:12px;}
.cwGuideSurface .cwGuideParagraphChunk:last-child{margin-bottom:0;}

/* B078CT: isolate reading graphics from global icon strokes. */
html body .cwGuideSurface .cwGuideGraphic svg{stroke:none!important;stroke-width:0!important;filter:none!important;}
html body .cwGuideSurface .cwGuideGraphic svg text{stroke:none!important;stroke-width:0!important;filter:none!important;paint-order:normal!important;font-weight:400!important;letter-spacing:normal!important;text-shadow:none!important;}
html body #cwAcademyIntroductionOverlay .cwGuideSurface .cwAcademyIntroductionGrid{grid-template-columns:repeat(12,minmax(0,1fr))!important;}
html body #cwAcademyIntroductionOverlay .cwGuideSurface .cwAcademyIntroductionGrid>.cwGuideCard{grid-column:span 6!important;width:auto!important;min-width:0!important;}
html body #cwAcademyIntroductionOverlay .cwGuideSurface .cwAcademyIntroductionGrid>.cwGuideCard:last-child:nth-child(odd){grid-column:1/-1!important;}
.cwGuideSurface .cwGuideFooter{display:flex!important;justify-content:flex-end;grid-column:1/-1;padding:20px 0 0!important;position:static!important;}
.cwGuideFooter button{background:#172335;color:#eaf0f8;border:1px solid #637890;border-radius:6px;padding:10px 20px;cursor:pointer;}
@media(max-width:780px){html body #cwAcademyIntroductionOverlay .cwGuideSurface .cwAcademyIntroductionGrid>.cwGuideCard{grid-column:1/-1!important;}}

.cwGuideConcepts{display:flex;flex-wrap:wrap;align-items:center;gap:10px;min-height:120px;justify-content:center;}
.cwGuideConcepts span{flex:1 1 70px;border:1px solid var(--concept-color);border-top:4px solid var(--concept-color);padding:15px 10px;border-radius:8px;text-align:center;font-size:15px;line-height:1.5;color:#eaf0f8;background:#203044;}
/* B078CX: plain-language first; exact theory remains available on demand. */
html.cwLearningSystem body .cwGuideSurface .cwGuideTheory{margin:16px 0 0!important;padding:12px 0 0;border-top:1px solid #40516b;font-size:13px;}
html.cwLearningSystem body .cwGuideSurface .cwGuideTheory>summary{cursor:pointer;color:#a5ded0;font-weight:700;margin-bottom:10px;}
html.cwLearningSystem body .cwGuideSurface .cwGuideRoute{margin:0 0 18px!important;}
html.cwLearningSystem body .cwGuideSurface .cwGuideRoute figcaption{font-size:12px;color:#bbd7de;margin-bottom:9px;}
html.cwLearningSystem body .cwGuideSurface .cwGuideRoute ol{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;list-style:none!important;padding:0!important;counter-reset:route;}
html.cwLearningSystem body .cwGuideSurface .cwGuideRoute li{counter-increment:route;min-width:0;margin:0!important;padding:10px!important;border:1px solid #66879d;border-radius:7px;background:#20364a;color:#f0f6ff!important;font-size:14px!important;line-height:1.4!important;overflow-wrap:anywhere;}
html.cwLearningSystem body .cwGuideSurface .cwGuideRoute li:before{content:counter(route) ' · ';color:#a5ded0;font-size:11px;}
html.cwLearningSystem body .cwGuideSurface.cwUnifiedGuide>.cwUnifiedGuideHeader h1,html.cwLearningSystem body .cwGuideSurface.cwUnifiedGuide>.cwUnifiedGuideHeader h2{font-size:28px!important;line-height:1.25!important;}
@media(max-width:780px){html.cwLearningSystem body .cwGuideSurface .cwGuideRoute ol{grid-template-columns:repeat(2,minmax(0,1fr));}}
html.cwLearningSystem body .cwGuideSurface .cwGuideRecipe{margin:0 0 18px!important;}
html.cwLearningSystem body .cwGuideSurface .cwGuideRecipe figcaption{font-size:12px;color:#bbd7de;margin-bottom:8px;}
html.cwLearningSystem body .cwGuideSurface .cwRecipeRow{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:8px 0;}
html.cwLearningSystem body .cwGuideSurface .cwRecipeRow strong{font-size:13px;min-width:78px;}
html.cwLearningSystem body .cwGuideSurface .cwRecipeRow span{font-size:12px;border:1px solid #709997;background:#213d42;border-radius:6px;padding:8px;color:#d6f4ed;}

/* B078DF: exact vector teaching diagrams, with live text and compact role table. */
.cwRectangleTeachingGraphic svg{width:100%;height:auto;min-width:0;max-height:none!important}
.cwRectangleRoleTable{width:100%;border-collapse:collapse;font-size:12px;line-height:1.4;margin:4px 0 8px}
.cwRectangleRoleTable th,.cwRectangleRoleTable td{padding:5px 6px;text-align:left;border-bottom:1px solid #506174}
.cwRectangleRoleTable th{color:#a5ded0;font-weight:700}

/* B078DG: give exact Rectangle diagrams a full-width reading area. */
html body .cwGuideSurface .cwGuideHero:has(> .cwRectangleTeachingGraphic){grid-template-columns:minmax(0,1fr)!important;gap:18px!important;align-items:start!important}
html body .cwGuideSurface .cwGuideHero:has(> .cwRectangleTeachingGraphic)>div{max-width:none}
html body .cwGuideSurface .cwRectangleTeachingGraphic{width:100%!important;max-width:900px!important;justify-self:center;margin:0 auto!important}
html body .cwGuideSurface .cwRectangleTeachingGraphic svg{width:100%!important;max-height:none!important;height:auto!important}
html body .cwGuideSurface .cwRectangleTeachingGraphic figcaption{font-size:13px!important;line-height:1.55!important}
html body .cwGuideSurface .cwRectangleRoleTable{font-size:14px!important}
html body .cwGuideSurface .cwRectangleRoleTable th,html body .cwGuideSurface .cwRectangleRoleTable td{padding:7px 9px!important}

/* B078DI: root/fifth teaching members, without artificial note numbering. */
.cwCCFoundationTable td,.cwCCFoundationTable th{vertical-align:middle}
.cwCCMember{display:inline-block;padding:4px 7px;margin:2px 1px;border:1px solid #62758c;border-radius:5px;background:#243346;color:#eef4fb;white-space:nowrap;font-weight:600}
.cwCCMember.cwCCRoot{background:#28466d;border-color:#abcaff}.cwCCMember.cwCCFifth{background:#20534e;border-color:#a5ded0}.cwCCMember.cwCCChanged{border-color:#edc678;background:#4b3a24}
.cwCCMember.cwCCWhite{background:#e9eff6;color:#152438}.cwCCMember.cwCCBlack{background:#080e18;color:#edf4ff}
.cwCCException td:last-child{color:#efd184}.cwCCFoundationTable th{font-size:13px}
@media(max-width:720px){.cwCCMember{padding:3px 4px}.cwCCFoundationTable{font-size:11px!important}.cwCCFoundationTable th{font-size:11px}}

/* B078DN: lesson-specific pitch and rhythm diagrams, on reading surfaces only. */
html body .cwGuideSurface .cwProductionHero{grid-template-columns:minmax(0,1fr)!important;gap:18px!important}
html body .cwGuideSurface .cwProductionGraphic{width:100%!important;max-width:960px!important;justify-self:center}
html body .cwGuideSurface .cwProductionGraphic svg{max-height:none!important;width:100%!important;height:auto!important}
html body #cwLessonAboutOverlay .cwAcademyIntroductionGrid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:18px!important}
html body #cwLessonAboutOverlay .cwAcademyIntroductionGrid>.cwGuideCard{grid-column:auto!important;padding:22px!important}
html body #cwLessonAboutOverlay .cwAcademyIntroductionGrid p{font-size:14px!important;line-height:1.7!important}
html body #cwLessonAboutOverlay .cwAcademyIntroductionGrid li{font-size:14px!important;line-height:1.6!important}
@media(max-width:780px){html body #cwLessonAboutOverlay .cwAcademyIntroductionGrid{grid-template-columns:1fr!important}}

html body #cwLessonAboutOverlay .cwIntroHero[hidden]{display:none!important}

.cwGuideScoreNotes{margin-top:12px;border-top:1px solid #536c86;padding-top:10px;font-size:13px;color:#d6e5ef}
.cwGuideScoreNotes summary{cursor:pointer;color:#b0dfd3}
.cwGuideScoreNotes table{width:100%;border-collapse:collapse;margin-top:10px;table-layout:fixed}
.cwGuideScoreNotes th,.cwGuideScoreNotes td{text-align:left;vertical-align:top;padding:7px;border-bottom:1px solid #42566d;overflow-wrap:anywhere;font-size:12px;line-height:1.5}
.cwGuideScoreNotes th:first-child{width:35px}

/* B078DP: bar labels and Rectangle values are explicit on About routes. */
html.cwLearningSystem body .cwGuideSurface .cwGuideRoute li:before{content:none!important}
.cwGuideRoute li>small,.cwGuideRoute li>strong,.cwGuideRoute li>span{display:block}
.cwGuideRoute li>small{color:#b6d7f3;font-size:12px;margin-bottom:5px}
.cwGuideRoute li>span{color:#edcf88;font-size:12px;margin-top:5px}

/* B078DR: live dominant locating route and distinct played return. */
.cwDominantRouteGuide{margin:16px 0 20px;padding:18px;border:1px solid #65858e;border-radius:12px;background:#142739;text-align:left}
.cwDominantRouteGuide h3{font-size:19px!important;margin:8px 0!important}.cwDominantRouteGuide p{font-size:13px!important;max-width:none!important;margin:8px 0!important}
.cwDominantRouteSteps,.cwDominantReturn{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:12px 0}
.cwDominantRouteSteps>div,.cwDominantReturn>div{padding:12px;border:1px solid #64798b;border-radius:8px;background:#20364b;min-width:0}
.cwDominantRouteSteps>div.active{border:2px solid #edcf88;background:#30544f}.cwDominantRouteSteps>div.visited{box-shadow:inset 0 -3px #a5ded0}
.cwDominantRouteGuide small,.cwDominantRouteGuide strong,.cwDominantRouteGuide span{display:block}.cwDominantRouteGuide small{font-size:12px;color:#bdd6e2}.cwDominantRouteSteps strong{font-size:26px}.cwDominantRouteGuide span{font-size:13px;color:#edcf88;margin-top:6px}
.cwDominantReturn{grid-template-columns:repeat(4,minmax(0,1fr))}.cwDominantReturn strong{font-size:18px}
.cwRouteSimulationControls{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.cwRouteSimulationControls button{padding:9px;border:1px solid #718c9e;border-radius:6px;background:#20364b;color:#edf3fc}
@media(max-width:780px){.cwDominantReturn{grid-template-columns:repeat(2,minmax(0,1fr))}}

.cwDominantRouteGuide{box-sizing:border-box;max-width:100%;min-width:0}.cwDominantRouteSteps,.cwDominantReturn{min-width:0;max-width:100%}

/* B078DU: worked course-opening scores and four-bar modulation guide pages. */
html body .cwGuideSurface .cwGuideHero:has(> .cwGuidePhrasePage){grid-template-columns:minmax(0,1fr)!important}
.cwGuidePhrasePage{min-width:0;width:100%;border:1px solid #4a657d;border-radius:10px;background:#142334;margin:8px 0;padding:12px;box-sizing:border-box}
.cwGuidePhrasePage>summary{cursor:pointer;color:#c5e7df;font-weight:700;padding:8px;font-size:16px}
html body .cwGuideSurface .cwCourseOpeningGraphic{width:100%!important;max-width:960px!important}
html body .cwGuideSurface .cwCourseOpeningGraphic svg{width:100%!important;height:auto!important;max-height:none!important}

/* B078EA: focused RF scale comparison; finite emphasis only in Compare. */
.rfScaleViews .rfPanel{display:none}
.rfScaleViews:has(input[value="major"]:checked) .rfPanel[data-rf-panel="major"],
.rfScaleViews:has(input[value="minor"]:checked) .rfPanel[data-rf-panel="minor"],
.rfScaleViews:has(input[value="compare"]:checked) .rfPanel[data-rf-panel="compare"]{display:block}
.rfViewChoices{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0}
.rfViewChoices label{display:flex;align-items:center;gap:8px;border:1px solid #607b90;border-radius:7px;padding:9px 14px;cursor:pointer;color:#dce8f5}
.rfViewChoices label:has(input:checked){background:#24534f;border-color:#a5ded0}
.rfViewChoices label:focus-within{outline:2px solid #efd27d;outline-offset:2px}
.rfPositionLegend{display:flex;flex-wrap:wrap;gap:12px;font-size:13px}
.rfPositionLegend span{padding:5px 9px;border-radius:5px;border:1px solid}
.rfSameBadge{background:#24534f;color:#b9dfd7;border-color:#8ebfb6!important}
.rfChangedBadge{background:#423c28;color:#efd27d;border-color:#d6b66b!important}
.rfTonicAnchor{font-size:18px;color:#b9dfd7}
.rfExtra{border-top:1px solid #4a6178;padding:12px 0;margin-top:10px}
.rfExtra summary{cursor:pointer;font-weight:600;color:#b9dfd7}
.rfScaleViews:has(input[value="compare"]:checked) .rfComparison .rfChanged rect{animation:rfChangedEmphasis 1.1s ease-in-out 2}
@keyframes rfChangedEmphasis{0%,100%{stroke-width:1;stroke:#d6b66b}50%{stroke-width:3;stroke:#ffe3a0}}
@media(prefers-reduced-motion:reduce){.rfComparison .rfChanged rect{animation:none!important}}

/* B078EC: one horizontal column for category-style About headers and bodies. */
html body .cwGuideSurface:has(> .cwGuideCategoryHero){--cw-guide-column-inset:28px}
html body :is(#cwAcademyIntroductionOverlay .cwGuideSurface,#cwLessonAboutOverlay .cwGuideSurface,.cwGuideSurface):has(> .cwGuideCategoryHero)>:is(.cwUnifiedGuideHeader,.cwGuideModalHeader,.cwIntroHero,header:not(.cwGuideHero),.cwGuideCategoryHero,.cwAcademyIntroductionGrid,.cwInvIntroGrid,.cwGuideFooter){
 box-sizing:border-box!important;
 width:calc(100% - var(--cw-guide-column-inset)*2)!important;
 max-width:none!important;
 min-width:0!important;
 margin-left:var(--cw-guide-column-inset)!important;
 margin-right:var(--cw-guide-column-inset)!important;
}
html body :is(#cwAcademyIntroductionOverlay .cwGuideSurface,#cwLessonAboutOverlay .cwGuideSurface,.cwGuideSurface):has(> .cwGuideCategoryHero)>:is(.cwAcademyIntroductionGrid,.cwInvIntroGrid){padding-left:0!important;padding-right:0!important}
/* Native reading dialogs already share a content column; include padding in widths. */
html body .cwGuideSurface :is(.cwGuideHero,.cwUnifiedGuideHeader,.cwGuideModalHeader,.cwGuideGrid){box-sizing:border-box}
@media(max-width:780px){html body .cwGuideSurface:has(> .cwGuideCategoryHero){--cw-guide-column-inset:14px}}

/* B078ED: breathing room inside About headers, without changing their outer column. */
html body :is(#cwAcademyIntroductionOverlay .cwGuideSurface,#cwLessonAboutOverlay .cwGuideSurface,.cwGuideSurface)>:is(.cwUnifiedGuideHeader,.cwGuideModalHeader,.cwIntroHero,header:not(.cwGuideHero)){
 box-sizing:border-box!important;
 padding:24px 28px!important;
 column-gap:24px!important;
}
html body .cwGuideSurface :is(.cwUnifiedGuideHeader,.cwGuideModalHeader,.cwIntroHero)>:is(h1,h2,.cwIntroHeroCopy){min-width:0}
@media(max-width:780px){
 html body :is(#cwAcademyIntroductionOverlay .cwGuideSurface,#cwLessonAboutOverlay .cwGuideSurface,.cwGuideSurface)>:is(.cwUnifiedGuideHeader,.cwGuideModalHeader,.cwIntroHero,header:not(.cwGuideHero)){padding:18px!important;column-gap:16px!important}
}

/* B078EE: worked opening images occupy a full reading column. */
html body .cwGuideSurface .cwGuideCategoryHero:has(.cwElevatedOpening){display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:18px!important;padding:26px!important;background:linear-gradient(135deg,#203b40 0%,#1c293e 78%)!important;border-top:3px solid #a5ded0!important}
html body .cwGuideSurface .cwElevatedOpening{margin:0!important;padding:0!important;max-width:none!important}
html body .cwGuideSurface .cwElevatedOpening figcaption{border-top:1px solid #486175;padding-top:14px;line-height:1.6}
@media(max-width:600px){html body .cwGuideSurface .cwGuideCategoryHero:has(.cwElevatedOpening){padding:16px!important}}

/* B078EH: pentatonic worked guides follow the full-column Diatonic form. */
html body .cwGuideSurface .cwGuideHero:has(.cwPentatonicWorked){display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:20px!important}
html body .cwGuideSurface .cwPentatonicWorked{width:100%!important;max-width:none!important;margin:0!important}
html body .cwGuideSurface .cwPentatonicWorked svg{width:100%!important;max-height:none!important;height:auto!important}
.pentCourseDesign{box-sizing:border-box;margin:28px 0;padding:28px;border:1px solid #607f87;border-top:3px solid #a5ded0;border-radius:14px;background:linear-gradient(135deg,#203b40,#1c293e);scroll-margin-top:80px}
.pentCourseDesign h2{font-size:clamp(25px,2.5vw,36px);line-height:1.2;margin:12px 0 16px;color:#f1f5fa}.pentCourseDesign>p{max-width:85ch;line-height:1.7;color:#d0dfeb}.pentCourseDesign figure{margin:20px 0!important;max-width:none!important}.pentCourseDesign svg{width:100%;height:auto}.pentCourseDesign figcaption{color:#c6d9e8;font-size:13px;line-height:1.6;border-top:1px solid #486175;padding-top:12px}.pentCourseStages{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:20px 0}.pentCourseStages span{background:#24394c;padding:18px;border-radius:9px;line-height:1.6;color:#d0dfeb}.pentCourseStages b{display:block;color:#a5ded0;margin-bottom:8px}.pentStart{display:inline-block;border:1px solid #a5ded0;border-radius:7px;background:#28534f;color:#f2f7fa;padding:12px 18px;text-decoration:none;font-weight:bold}#pentSubjectBand{font-size:12px;letter-spacing:.07em;text-transform:uppercase;color:#a5ded0;margin:0 0 10px;line-height:1.6;border-left:3px solid #efd27d;padding-left:12px}
@media(max-width:780px){.pentCourseDesign{padding:18px}.pentCourseStages{grid-template-columns:1fr}}

/* B078EJ: concise first reading, complete explanations on demand. */
.cwGuideFullExplanation{margin-top:16px;border-top:1px solid #486175;padding-top:12px;line-height:1.65}.cwGuideFullExplanation>summary{cursor:pointer;color:#b9dfd7;font-size:13px;font-weight:600;padding:4px 0}.cwGuideFullExplanation>p{margin-top:12px!important}.cwGuideCaptionLead{margin:0!important;line-height:1.6!important}.cwMajorMinorSupport{margin:20px 0!important;width:100%!important;max-width:none!important}.cwMajorMinorSupport h3{font-size:19px!important;margin-bottom:14px!important}.cwComparisonNotes{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px}.cwComparisonNotes>div{padding:12px 7px;border-radius:6px;min-width:0}.cwComparisonNotes strong{font-size:15px;display:block}.cwComparisonNotes small{display:block;font-size:10px;margin-top:9px;line-height:1.5}.cwDegreeSame{background:#28534f;color:#eaf1fa}.cwDegreeChanged{background:#49412b;color:#efd27d}.cwGuideCard:has(>.cwMajorMinorSupport){grid-column:1/-1}.cwMajorMinorSupport>p{font-size:13px!important;line-height:1.6!important;margin:12px 0!important}
@media(max-width:600px){.cwComparisonNotes strong{font-size:12px}.cwComparisonNotes>div{padding:9px 4px}.cwComparisonNotes small{font-size:9px}}

/* B078EK: teaching graphics scroll normally; only the compact title can stick. */
html body .cwGuideSurface .cwGuideHero,html body #imDialog .cwGuideHero,html body .cwGuideSurface .cwGuideGraphic{position:static!important;top:auto!important;bottom:auto!important;z-index:auto!important;transform:none!important}
.cwRectangleQuickGuide{margin-top:14px;padding-top:12px;border-top:1px solid #486175}.cwRectangleQuickGuide>summary{cursor:pointer;color:#b9dfd7;font-size:13px;font-weight:600}.cwRectangleDemo{margin-top:16px;padding:18px;border:1px solid #597286;border-radius:10px;background:#142536}.cwRectangleDemoKey{font-size:15px!important;color:#dce9f4;margin:0 0 14px!important}.cwRectangleDemoChoices{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}.cwRectangleDemoChoices label{display:flex;align-items:center;gap:7px;padding:10px 14px;border:1px solid #688498;border-radius:7px;cursor:pointer;background:#223b4b;color:#eaf1fa;font-size:14px}.cwRectangleDemoChoices label:has(input:checked){border-color:#efd27d;background:#28534f}.cwRectangleDemoChoices input{accent-color:#a5ded0}.cwRectangleDemoResult{display:none;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.cwRectangleDemoResult>div{padding:16px;background:#294777;border-radius:8px}.cwRectangleDemoResult>div:last-child{background:#28534f}.cwRectangleDemoResult small{display:block;color:#b9dfd7;font-size:12px;margin-bottom:8px}.cwRectangleDemoResult strong{font-size:21px;color:#efd27d;font-weight:600}.cwRectangleDemo:has(input[value="0"]:checked) [data-demo-result="0"],.cwRectangleDemo:has(input[value="1"]:checked) [data-demo-result="1"],.cwRectangleDemo:has(input[value="2"]:checked) [data-demo-result="2"],.cwRectangleDemo:has(input[value="3"]:checked) [data-demo-result="3"]{display:grid}.cwRectangleDemoRule{font-size:13px!important;line-height:1.6!important;margin:12px 0 0!important}
@media(max-width:600px){.cwRectangleDemoResult{grid-template-columns:1fr}.cwRectangleDemo{padding:12px}.cwRectangleDemoResult strong{font-size:18px}}

/* B078EL: connect the degree choice to the displayed progression, silently. */
.cwRectangleDemoResult[hidden]{display:none!important}.cwRectangleDemoResult:not([hidden]){display:grid!important}
html body .cwGuideSurface .cwGuideGraphic svg rect.cwRectangleSelected{stroke:#efd27d!important;stroke-width:2.5px!important;vector-effect:non-scaling-stroke}
html body .cwGuideSurface .cwGuideGraphic svg rect.cwRectanglePulse{animation:cwRectangleLinkPulse .85s ease-in-out 2}
@keyframes cwRectangleLinkPulse{0%,100%{stroke-width:2.5px;stroke-opacity:1}50%{stroke-width:5px;stroke-opacity:.45}}
@media(prefers-reduced-motion:reduce){html body .cwGuideSurface .cwGuideGraphic svg rect.cwRectanglePulse{animation:none!important}}

/* IN.13 palette for scale-degree identity. Red groups degrees 2, 3 and 7. */
:is([data-scale-degree="1"],[data-rect-degree="1"]){--cwDegreeColour:#67a1ff}
:is([data-scale-degree="2"],[data-scale-degree="3"],[data-scale-degree="7"],[data-rect-degree="2"],[data-rect-degree="3"],[data-rect-degree="7"]){--cwDegreeColour:#ff5d5d}
:is([data-scale-degree="4"],[data-rect-degree="4"]){--cwDegreeColour:#ff9a31}
:is([data-scale-degree="5"],[data-rect-degree="5"]){--cwDegreeColour:#71e37e}
:is([data-scale-degree="6"],[data-rect-degree="6"]){--cwDegreeColour:#c06cff}
:is([data-scale-degree],[data-rect-degree]){--cw-degree-fill:color-mix(in srgb,var(--cwDegreeColour,#8598b4) 30%,#182333)}
html body .cwGuideSurface .cwGuideGraphic svg rect[data-scale-degree],html body .cwGuideSurface .cwGuideGraphic svg [data-scale-degree]>rect{fill:var(--cw-degree-fill)!important}
html body .cwGuideSurface .cwRectangleDemoChoices label[data-scale-degree],html body .cwGuideSurface .cwRectangleDemoResult>div[data-scale-degree],html body .cwGuideSurface .cwComparisonNotes>[data-scale-degree],html body .cwGuideSurface .cwGuideRoute li[data-scale-degree]{background:var(--cw-degree-fill)!important;color:#f1f5fa}
html body .cwGuideSurface .cwRectangleDemoChoices label[data-scale-degree]:has(input:checked){border-color:#efd27d;box-shadow:inset 0 0 0 1px #efd27d}
html body .cwGuideSurface .cwDegreeChanged[data-scale-degree]{outline:2px solid #efd27d;outline-offset:-2px}

/* B078EP: every result retains its connection to the tonic calculation. */
.cwGuideSurface .cwRectangleResultFormula{display:block;margin-top:9px;font-size:14px;line-height:1.5;color:#f1f5fa;overflow-wrap:anywhere}

/* B078EQ: selected tonic reference, confined to Rectangle guides. */
.cwGuideSurface .rfTonicReference{padding:20px 22px;margin:0 0 22px;border:2px solid #efd27d;border-radius:12px;background:#182b40}
.cwGuideSurface .rfReferenceEyebrow{font-size:11px;font-weight:800;letter-spacing:.12em;color:#b9dfd7}
.cwGuideSurface .rfTonicReference h3{font-size:28px;line-height:1.25;color:#efd27d;margin:10px 0}
.cwGuideSurface .rfTonicReference p{max-width:70ch;margin:8px 0;line-height:1.6}
.cwGuideSurface .rfReferenceRule{font-weight:700;color:#b9dfd7}
.cwGuideSurface .rfKeyExamples{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:12px 0 20px}
.cwGuideSurface .rfKeyExamples span,.cwGuideSurface .rfSignatureConnection{padding:16px;border:1px solid #607b90;border-radius:9px;background:#182b40;line-height:1.6}
.cwGuideSurface .rfKeyExamples strong,.cwGuideSurface .rfSignatureConnection b{color:#efd27d}
.cwGuideSurface .rfSignatureConnection p{margin:8px 0}
@media(max-width:600px){.cwGuideSurface .rfKeyExamples{grid-template-columns:1fr}.cwGuideSurface .rfTonicReference h3{font-size:24px}}
/* B078ES: optional-sound Rectangle introduction, isolated from main lessons. */
.cwRectDemo{font-family:Arial,system-ui,sans-serif;color:#eaf1fa;box-sizing:border-box;width:100%;min-width:0}
.cwRectDemo *{box-sizing:border-box}
.cwRectDemo .cwRectDemoHead>span{color:#b9dfd7;font-size:11px;font-weight:800;letter-spacing:.13em}
.cwRectDemo h3{font-size:clamp(21px,2.5vw,30px);line-height:1.25;margin:10px 0}
.cwRectDemo :is(button,select){font:inherit;min-height:44px;border:1px solid #7895ac;border-radius:8px;background:#1b2c42;color:#f3f7ff;padding:10px 14px;cursor:pointer;user-select:none;caret-color:transparent}
.cwRectDemo button:disabled{opacity:.45;cursor:default}
.cwRectDemo :is(button,select,input):focus-visible{outline:3px solid #ffe08a;outline-offset:3px}
.cwRectDemo :is(button,select):hover:not(:disabled){border-color:#ffe08a}
.cwRectDemo .cwRectDemoControls{display:flex;gap:18px;flex-wrap:wrap;align-items:end;margin:20px 0}
.cwRectDemo .cwRectDemoControls>label{display:grid;gap:6px;font-weight:700}
.cwRectDemo fieldset{border:0;padding:0;margin:0;display:flex;gap:8px;flex-wrap:wrap;min-width:0}
.cwRectDemo legend{padding:0;margin-bottom:6px;font-size:13px;color:#c9d9e8}
.cwRectDemo fieldset label{display:flex;gap:8px;align-items:center;min-height:44px;padding:10px 12px;border:1px solid #7895ac;border-radius:8px;background:#1b2c42;cursor:pointer;user-select:none;caret-color:transparent}
.cwRectDemo fieldset label:has(input:checked){background:#30544f;border-color:#ffe08a}
.cwRectDemo input{accent-color:#b9dfd7}
.cwRectDemo .cwRectDemoAnchor{display:flex;flex-wrap:wrap;gap:10px 24px;align-items:center;border:2px solid #ffe08a;border-radius:12px;padding:16px;background:#182b40;margin:14px 0}
.cwRectDemoAnchor strong{font-size:22px;color:#ffe08a}
.cwRectDemoAnchor span{font-size:14px;line-height:1.5}
.cwRectDemo .cwRectDegreeButtons{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;margin:14px 0}
.cwRectDegreeButtons button{background:var(--rd-colour);padding:10px 4px;font-weight:800;font-size:17px}
.cwRectDegreeButtons button[aria-pressed=true]{border:2px solid #ffe08a;box-shadow:0 0 0 1px #ffe08a}
.cwRectDegreeButtons small{display:block;font-size:12px;font-weight:400;margin-top:5px;color:#ffe08a;white-space:nowrap}
.cwRectDemo .cwRectDemoResult{display:flex;flex-wrap:wrap;gap:10px 22px;align-items:center;padding:14px 0}
.cwRectDemoResult b{font-size:24px}.cwRectDemoResult span{color:#ffe08a;font-size:19px}
.cwRectDemo .cwRectDemoDrawing svg{display:block;width:100%;height:auto;max-width:none}
.cwRectDemo :is(.cwRectDemoSound,.cwRectDemoTransport){display:flex;gap:9px;flex-wrap:wrap;margin:14px 0}
.cwRectDemo .cwRectDemoTour{border-top:1px solid #607b90;margin-top:20px;padding-top:16px}
.cwRectDemoTour summary{cursor:pointer;line-height:1.5;color:#b9dfd7;font-weight:700}
.cwRectDemo .cwRectDemoScene{background:#182b40;border-left:3px solid #b9dfd7;padding:16px;margin-top:14px}
.cwRectDemo .cwRectDemoScene p{max-width:75ch;margin-top:8px!important}
.cwRectDemoTransport label{display:flex;align-items:center;gap:8px;font-size:13px;min-height:44px}
.cwRectDemo .cwRectDemoFoot{font-size:12px!important;line-height:1.6!important;max-width:90ch!important;margin-top:14px!important;color:#c4d2df!important}
@media(max-width:600px){.cwRectDemo .cwRectDegreeButtons{gap:4px}.cwRectDegreeButtons button{font-size:14px;min-height:55px}.cwRectDegreeButtons small{font-size:10px}.cwRectDemoAnchor strong{font-size:20px}.cwRectDemo .cwRectDemoDrawing{overflow:auto}.cwRectDemoDrawing svg{min-width:650px}.cwRectDemo .cwRectDemoResult span{font-size:16px}}
.cwRectDemo .cwRectDemoVideo{border-top:1px solid #607b90;margin-top:16px;padding-top:16px}.cwRectDemoVideo summary{cursor:pointer;color:#b9dfd7;line-height:1.5}.cwRectDemoVideo video{display:block;width:100%;height:auto;max-height:80vh;margin-top:16px;background:#0b111b;border-radius:10px}
/* B078EU: narration voice and pace choices. */
.cwRectVoiceSettings{display:flex;gap:12px;flex-wrap:wrap;align-items:end;margin:16px 0}.cwRectVoiceSettings label{display:grid;gap:6px;max-width:100%;font-size:13px}.cwRectVoiceSettings select{max-width:100%;min-width:180px}.cwRectVoiceSettings label:first-child{flex:1 1 260px}
/* B078EX: the simulation is the presentation; no voice setup or diagnostic panels. */
.cwRectSlider{padding:10px 14px;color:#edf3fb}
.cwRectSliderControls label{display:block;font-weight:700;margin-bottom:4px}
.cwRectSliderControls input[type=range]{display:block;width:100%;height:30px;margin:0;accent-color:#8db8ff;cursor:pointer}
.cwRectSliderDirections,.cwRectSliderReadout{display:flex;justify-content:space-between;gap:12px}
.cwRectSliderDirections{color:#becfe1;font-size:.85rem}
.cwRectSliderModes{display:flex;gap:8px;margin:6px 0}
.cwRectSliderModes button[aria-pressed=true]{background:#30544f;border-color:#ffe08a}
.cwRectSliderReadout{align-items:center;padding:6px 10px;background:#16273b;border-radius:10px}
.cwRectSliderReadout strong{display:block;font-size:1.2rem}
.cwRectSliderReadout span{color:#e9d394}
.cwRectAccidentals{display:flex;gap:5px;flex-wrap:wrap}
.cwRectAccidentals span{padding:2px 6px;border-radius:5px}
.cwRectAccidentals .cwRectAccidentalAdded{background:#ffe08a;color:#182234;font-weight:700}
.cwRectSignature{border:1px solid #607b90;border-radius:8px;padding:4px 8px;width:min(55%, 25rem);min-width:0}
.cwRectSignature .cwRectAccidentals,.cwRectSignatureChange{min-height:1.5rem}
.cwRectSignatureChange{color:#f1d891;font-size:.85rem}
.cwRectSliderStepRow{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px;align-items:center}
.cwRectSliderStepRow button{min-width:44px;min-height:44px;white-space:nowrap;touch-action:manipulation}
.cwRectSliderStepRow button[aria-disabled=true]{opacity:.45;cursor:default}
.cwRectMatrix{margin-top:6px;overflow-x:auto}
.cwRectMatrix table{width:100%;min-width:530px;table-layout:fixed;border-spacing:5px}
.cwRectMatrix caption{text-align:left;font-weight:700}
.cwRectDemo .cwRectMatrix :is(th,td){padding:3px;text-align:center}
.cwRectMatrix th{color:#c3d6eb;font-size:.8rem}
.cwRectDemo .cwRectMatrix th:first-child{width:78px;text-align:left}
.cwRectMatrix td{padding:0;background:#172536;border-radius:8px}
.cwRectSliderCard{background:#20334a;border:1px solid #607b90;border-radius:8px;text-align:center;padding:4px 2px;min-height:40px;display:grid;align-content:center;line-height:1.25}
.cwRectSliderCard strong,.cwRectSliderCard small{display:block}
.cwRectSliderCard strong{font-size:1.1rem}
.cwRectSliderCard small{color:#c3d6eb;font-size:.75rem}
.cwRectSliderCard.cwRectSliderTonic{background:#284269;border-color:#ffe08a}
@media(max-width:600px){.cwRectSliderStepRow button span{display:none}}
.cwRectSliderCard.cwRectSliderInactive{background:#192536;color:#8291a4;border-color:#324054}
.cwRectMatrix tr:last-child .cwRectSliderInactive{border-color:#324054}
.cwRectMatrix .cwRectSliderAccidental{background:#443925;border-color:#e7bc68}
.cwRectMatrix .cwRectSliderTonic.cwRectSliderAccidental{box-shadow:inset 0 0 0 1px #e7bc68}
@keyframes cwRectAddedNote{50%{background-color:#70552b;box-shadow:inset 0 0 0 2px #ffe08a}}
@media(prefers-reduced-motion:no-preference){.cwRectSliderPulse{animation:cwRectAddedNote 600ms ease-in-out 2}}
.cwRectSrOnly{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.cwRectScaleKeyboard{overflow-x:auto}
.cwRectScaleKeyboard svg{display:block;width:100%;min-width:500px;height:auto}
.cwRectSlider details{margin-top:6px}
.cwRectSlider summary{cursor:pointer;padding:8px 0;color:#b9dfd7;font-weight:600}

.cwRectSliderReadout .cwRectTonicBadge{display:inline-block;border:1px solid #8db8ff;border-radius:6px;padding:2px 7px;background:#203d63;color:#e4efff;font-weight:700}
.cwRectDemo .cwRectMatrix th.cwRectTonicColumn{background:#203d63;color:#e4efff}
.cwRectMatrix .cwRectSliderCard.cwRectSliderTonic{background:#203d63;border:2px solid #8db8ff;color:#e4efff}
.cwRectMatrix .cwRectSliderTonic.cwRectSliderAccidental strong{color:#ffe08a}
.cwRectEnharmonic{margin:4px 0;padding:5px 8px;border-left:2px solid #b9dfd7;color:#cbdde9;font-size:.85rem}
.cwRectSlider .cwRectKeyboardToggle{margin:0 0 4px}
.cwRectKeyboardToggle summary{padding:3px 0}
.cwRectKeyboardToggle [data-rectangle-details]>p{margin:0;font-size:.85rem}
.cwRectKeyboardToggle .cwRectScaleKeyboard svg{max-width:760px;margin:0 auto}

.cwRectDemo > :is(p,details,figcaption){margin:8px 14px}
.haTonicRange{display:grid;grid-template-columns:auto minmax(5rem,1fr) auto;align-items:center;gap:10px;margin:6px 0;font-size:.85rem}
.haTonicRange input{width:100%;min-height:32px;accent-color:#8db8ff}
.haTonicRange output{min-width:7em;color:#ffe08a}

html body :is(#ladder,#tRow,.haTonicSelect)[hidden]{display:none!important}
[data-lesson-rectangle]{flex:1 0 100%;width:100%;min-width:0;box-sizing:border-box}
html.cwFoundationFamily body .haAccidentalControls:has([data-lesson-rectangle]){
 height:auto!important;min-height:0!important;max-height:none!important
}
[data-lesson-rectangle] .cwRectSliderReadout{gap:8px;padding:4px 8px}
[data-lesson-rectangle] .cwRectSignature{display:grid;grid-template-columns:auto 1fr;align-items:center;column-gap:8px}
[data-lesson-rectangle] .cwRectSignature :is(.cwRectAccidentals,.cwRectSignatureChange){grid-column:1/-1}

html body .haAccidentalControls[hidden],
html body .haAccidentalProgress:has(~ .cwRectLessonKeyboardCard){display:none!important}
html.cwFoundationFamily body .cwRectLessonKeyboardCard{height:auto!important;max-height:none!important;overflow:visible!important}
.cwRectLessonKeyboardCard [data-lesson-rectangle]{margin:0 auto 8px}
html body .cwRectSyncedKeyboard :is(.white,.black).cwRectKeyAccidental{background:linear-gradient(#78ace9,#325a91)!important;color:#fff!important;box-shadow:inset 0 0 0 2px #93c5ff!important}
html body .cwRectSyncedKeyboard :is(.white,.black).cwRectKeyNew{background:linear-gradient(#ffe787,#caa342)!important;color:#172036!important;box-shadow:inset 0 0 0 2px #ffe787!important}
html body .cwRectSyncedKeyboard :is(.white,.black).cwRectKeyTonic{outline:3px solid #84e198!important;outline-offset:-3px}

.cwRectSlider .cwRectEnharmonic{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;min-height:64px;box-sizing:border-box}
.cwRectEnharmonicEmpty{visibility:hidden}
.cwRectSlider .cwRectSignature{min-height:6rem;box-sizing:border-box}
.cwRectSlider .cwRectAccidentals{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:2px;align-items:start}
.cwRectSlider .cwRectAccidentals span{padding:2px 0;text-align:center;white-space:nowrap}
.cwRectSlider .cwRectSignatureChange{min-height:1.5rem}
@media(max-width:700px){
 .cwRectSlider .cwRectEnharmonic{grid-template-columns:1fr;min-height:104px}
 .cwRectSlider .cwRectSignature{min-height:7rem}
}
html.cwFoundationFamily body .cwRectSyncedKeyboard .white .val{background:#dbe2ec!important;color:#26384c!important;border:1px solid #a7b5c7!important}
.cwRectSlider .cwRectSliderCard[data-rect-degree]{border-color:var(--cwDegreeColour)}
.cwRectSlider [data-rect-degree] :is(small,th){color:var(--cwDegreeColour,#c3d6eb)}
.cwRectFormulaNote{padding:6px 9px;border-left:2px solid #9db7d6;color:#dce7f4}
.cwRectCompare .rfWideComparison{overflow-x:auto}
.cwRectCompare .rfComparison svg{display:block;width:100%;min-width:600px;height:auto}
.cwRectCompare .rfComparison .rfChanged rect{stroke:#ffdb84;stroke-width:2px}
html.cwFoundationFamily.ha-degree body #keyRow[hidden],
html.cwFoundationFamily.ha-degree body #keyRow[hidden]+.stripLegend{display:none!important}
[data-lesson-rectangle][data-degree-slider]{padding:2px 0 4px}
[data-lesson-rectangle][data-degree-slider] .cwRectEnharmonicEmpty{display:none}
[data-lesson-rectangle][data-degree-slider] .cwRectEnharmonic{min-height:0;margin:2px 0;padding:2px 6px}
[data-lesson-rectangle][data-degree-slider] .cwRectSignature{min-height:0}
[data-lesson-rectangle][data-degree-slider] .cwRectSignatureChange:empty{display:none}
[data-lesson-rectangle][data-degree-slider] .cwRectMatrix{margin-top:2px}
[data-lesson-rectangle][data-degree-slider] .cwRectMatrix table{border-spacing:3px}
[data-lesson-rectangle][data-degree-slider] .cwRectMatrix :is(th,td){padding:2px}
[data-lesson-rectangle][data-degree-slider] .cwRectSliderCard{min-height:34px;padding:2px;box-sizing:border-box}

.cwRectSlider .cwRectMinorFormula{margin:5px 0 8px;padding:8px 12px;background:#233854;border-left:3px solid #a9c8ff;color:#eff5ff}
.cwRectSlider .cwRectMinorFormula strong{font-size:1.08rem}
.cwRectSlider .cwRectSignatureFormula{margin:5px 0 0;color:#bcd6ff}
.cwRectSliderReadout .cwRectSignatureFormula strong{font-size:.9rem}

.cwRectSignatureRule{display:block;grid-column:1/-1;color:#cbdde9;line-height:1.35}

/* Gold marks a change in the comparison. The fill keeps the degree identity. */
html body .cwGuideSurface .cwGuideGraphic svg rect[data-scale-degree]:not(.cwRectanglePulse),
html body .cwGuideSurface .cwGuideGraphic svg [data-scale-degree]:not(.rfChanged)>rect{stroke:var(--cwDegreeColour,#8598b4)}
.cwRectCompare .rfWideComparison svg [data-scale-degree]>rect{fill:var(--cw-degree-fill)}
.cwRectCompare .rfWideComparison svg [data-scale-degree]:not(.rfChanged)>rect{stroke:var(--cwDegreeColour)}

.rfPanel .rfDegreeFormula{fill:var(--cwDegreeColour,#efd27d)}

[data-rectangle-range-status]:empty{display:none}

/* Rectangle introduction tutorial */
.cwRectTutorial [hidden]{display:none!important}
.cwRectTutorialNav,.cwRectTutorialActions,.cwNaturalActions{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.cwRectTutorialNav button[aria-current=step],.cwRectTutorial [data-cw-next]{border-color:#b9dfd7;background:#254c49}
.cwRectTutorialActions{margin:10px 0}
.cwRectTutorial [data-cw-next]{margin-left:auto}
.cwNaturalExercise{margin:8px 0 12px;padding:10px;border:1px solid #6383aa;border-radius:10px;background:#172638}
.cwNaturalExercise p{margin:6px 0}
.cwNaturalKeyboard{position:relative;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));width:100%;height:clamp(172px,23vw,226px);container-type:inline-size}
.cwNaturalExercise .cwNaturalKeyboard button[data-cw-natural-note]{position:relative;min-width:0;min-height:0;padding:0 0 8px!important;display:flex;flex-direction:column;justify-content:end;align-items:center;gap:0;background:linear-gradient(#dce5ed,#f9fbff 65%)!important;color:#192536!important;border:1px solid #68788e!important;border-radius:0 0 5px 5px!important;box-shadow:none!important}
.cwNaturalExercise .cwNaturalKeyboard button[aria-pressed=true]{box-shadow:inset 0 -4px #4b85da!important}
.cwNaturalExercise .cwNaturalKeyboard button.cwNaturalPitch{background:linear-gradient(#c3d7ef,#e4efff 65%)!important;border-color:#4b85da!important}
.cwNaturalKeyboard span[data-cw-pitch]{position:absolute;top:0;left:calc(var(--cw-key-boundary) * 100% / 7);transform:translateX(-50%);box-sizing:border-box;width:8.5%;height:57%;background:linear-gradient(#273043,#0b1018);color:#fff;border:1px solid #526176;border-radius:0 0 5px 5px;box-shadow:0 3px 5px #0006;pointer-events:none;z-index:1}
.cwNaturalKeyboard span.cwNaturalPitch{background:#365989;border-color:#a9c8ff}
.cwNaturalDiscoveries{position:absolute;inset:6px 0 auto;display:grid;gap:7px;justify-items:center}
button[data-cw-natural-note] .cwNaturalDiscoveries{top:auto;bottom:50px}
.cwNaturalDiscoveries>span{display:grid;justify-items:center;gap:6px}
.cwNaturalKeyCalculation,.cwNaturalKeyResult{white-space:nowrap;font-size:clamp(8px,1.65cqi,14px);line-height:1.1;font-weight:800;font-variant-numeric:tabular-nums}
.cwRectTutorial .cwRectSharp{color:#ffcb75}
.cwRectTutorial .cwRectFlat{color:#acd6ff}
.cwNaturalKeyboard button .cwRectSharp{color:#854900}
.cwNaturalKeyboard button .cwRectFlat{color:#154f8a}
.cwNaturalActions{margin-top:8px}
.cwNaturalActions button[aria-pressed=true]{border-color:currentColor;background:#263e60}
.cwNaturalExercise [data-cw-natural-answer]{font-weight:700;color:#bcd7ff}
.cwNaturalLedger{display:flex;flex-wrap:wrap;gap:6px}
.cwNaturalLedger>span{padding:5px 8px;background:#0f1c2d;border:1px solid #506680;border-radius:6px}
.cwNaturalLedger small{display:block;color:#d7e4f2}
.cwRectTutorial [data-cw-interval-controls]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:10px}
.cwRectTutorial [data-cw-interval]{display:grid;justify-items:center;gap:4px;padding-inline:5px}
.cwRectTutorial [data-cw-interval] strong{font-size:1.55em}
.cwRectTutorial [data-cw-interval][aria-pressed=true]{background:#254c49;border-color:#b9dfd7}
@container (max-width:470px){
 .cwNaturalKeyCalculation,.cwNaturalKeyResult{letter-spacing:-.04em}
}
.cwRectValueAdvisor{margin:4px 0;color:#cbdde9}
.cwRectSlider:has(.cwRectRevealValues input:not(:checked)) .cwRectMatrix thead th:not(:first-child):not(.cwRectTonicColumn){visibility:hidden}
/* Bring the Rectangle exercise into view on opening the Academy guide. */
html body #cwAcademyIntroductionOverlay .cwGuideSurface:has(> .cwGuideCategoryHero > .cwRectTutorial) > .cwIntroHero[hidden],
#cwAcademyIntroductionOverlay .cwGuideCategoryHero:has(> .cwRectTutorial) > div{display:none!important}
html body #cwAcademyIntroductionOverlay .cwGuideSurface:has(> .cwGuideCategoryHero > .cwRectTutorial) > .cwUnifiedGuideHeader{padding:12px 18px!important;margin-bottom:10px!important}
html body #cwAcademyIntroductionOverlay .cwGuideSurface:has(> .cwGuideCategoryHero > .cwRectTutorial) > .cwUnifiedGuideHeader h1{font-size:clamp(26px,3.2vw,38px)!important}
html body #cwAcademyIntroductionOverlay .cwGuideSurface:has(> .cwGuideCategoryHero > .cwRectTutorial) > .cwAcademyIntroductionQuestion{font-size:16px!important;margin:0 var(--cw-guide-column-inset) 12px!important}
html body #cwAcademyIntroductionOverlay .cwGuideCategoryHero:has(> .cwRectTutorial){padding:14px!important;margin-top:0!important}
html body .cwGuideSurface .cwRectTutorial{max-width:none}
html body #cwAcademyIntroductionOverlay .cwRectTutorialNav button{padding:7px 10px!important;font-size:14px!important}
html body #cwAcademyIntroductionOverlay .cwRectTutorial :is(button[aria-current=step],button[data-cw-next],button[data-cw-interval][aria-pressed=true]){background:#254c49!important;border-color:#b9dfd7!important;color:#f3f7ff!important}
html body #cwAcademyIntroductionOverlay .cwRectTutorial button.cwRectSharp{color:#ffcb75!important}
html body #cwAcademyIntroductionOverlay .cwRectTutorial button.cwRectFlat{color:#acd6ff!important}
html body #cwAcademyIntroductionOverlay .cwRectTutorial .cwNaturalKeyboard button[data-cw-natural-note]{
 background:linear-gradient(#dce5ed,#f9fbff 65%)!important;color:#192536!important;border-color:#68788e!important
}
html body #cwAcademyIntroductionOverlay .cwRectTutorial .cwNaturalKeyboard button.cwNaturalPitch{
 background:linear-gradient(#c3d7ef,#e4efff 65%)!important;border-color:#4b85da!important
}
#cwAcademyIntroductionOverlay .cwRectTutorial .cwNaturalKeyboard{height:176px}
@media(min-width:1100px){
 #cwAcademyIntroductionOverlay .cwRectTutorialNav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}
}

.cwRectTonicChoices{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;margin:8px 0}
.cwRectTutorial .cwRectTonicChoices button{display:grid;justify-items:center;gap:2px;min-width:0;padding:5px 2px!important;line-height:1.2}
.cwRectTonicChoices small{font-variant-numeric:tabular-nums}
.cwRectTutorial .cwRectTonicChoices button[aria-pressed=true],
html body #cwAcademyIntroductionOverlay .cwRectTutorial .cwRectTonicChoices button[aria-pressed=true],
html body #cwAcademyIntroductionOverlay .cwRectTutorial [data-rectangle-mode][aria-pressed=true]{
 background:#254c49!important;border-color:#b9dfd7!important;color:#f3f7ff!important
}
.cwRectTutorialTonic{font-weight:700;margin:4px 0 8px!important}

.cwRectTutorial[data-cw-tutorial="1"] :is(.cwNaturalKeyboard button,.cwNaturalActions button):disabled{
 opacity:1!important;cursor:default!important
}
.cwRectTutorial[data-cw-tutorial="1"] .cwNaturalActions button[aria-pressed=true]{
 box-shadow:inset 0 0 0 2px currentColor!important
}
.cwRectTutorialTonic{
 display:grid;justify-items:center;align-content:center;gap:2px;
 padding:8px 12px;border:1px solid #b9dfd7;border-radius:8px;background:#254c49;color:#f3f7ff;
 line-height:1.25
}
.cwRectTutorialTonic strong{font-size:1.9em}
@media(min-width:680px){
 [data-rectangle-tutorial] .cwRectSliderControls{display:grid;grid-template-columns:110px minmax(0,1fr);column-gap:12px}
 [data-rectangle-tutorial] .cwRectSliderControls > :not(.cwRectTutorialTonic){grid-column:2}
 [data-rectangle-tutorial] .cwRectTutorialTonic{grid-column:1;grid-row:1 / span 5;align-self:stretch}
}

.cwRectTutorial [data-cw-narration-cue]{--cw-cue-colour:#c6fff0;outline:2px solid var(--cw-cue-colour);outline-offset:-3px}
.cwRectTutorial [data-cw-narration-cue="sharp"]{--cw-cue-colour:#ffca6b}
.cwRectTutorial [data-cw-narration-cue="flat"]{--cw-cue-colour:#9cd4ff}
.cwRectTutorial :is(.cwNaturalActions button,[data-cw-ledger]){position:relative}
.cwRectTutorial [data-cw-narration-cue]::after{
 content:"";position:absolute;z-index:2;pointer-events:none;
 right:7px;top:7px;width:10px;height:10px;border-radius:50%;
 background:var(--cw-cue-colour);border:1px solid #12233c;
 animation:cwRectangleNarrationCue 1.2s ease-out infinite
}
.cwRectTutorial button[data-cw-natural-note][data-cw-narration-cue]::after{top:auto;bottom:12px}
@keyframes cwRectangleNarrationCue{
 from{box-shadow:0 0 0 1px var(--cw-cue-colour)}
 to{box-shadow:0 0 0 8px transparent}
}
@media(prefers-reduced-motion:reduce){.cwRectTutorial [data-cw-narration-cue]::after{animation:none}}

.cwRectTutorial .cwNaturalNoteLabel{position:relative;isolation:isolate}
.cwRectTutorial button[data-cw-natural-note][data-cw-narration-cue]::after{content:none}
.cwRectTutorial button[data-cw-natural-note][data-cw-narration-cue] .cwNaturalNoteLabel::before{
 content:"";position:absolute;z-index:-1;left:50%;top:50%;transform:translate(-50%,-50%);
 width:1.85em;height:1.85em;border:2px solid #176e66;border-radius:50%;background:#c6fff0;
 animation:cwRectangleNarrationCue 1.2s ease-out infinite
}
.cwRectTutorial :is([data-cw-shared-key],[data-rectangle-choice]){position:relative}
.cwRectTutorial [data-rectangle-tutorial="signature"] :is(button,input):disabled{opacity:1;cursor:default}
@media(prefers-reduced-motion:reduce){
 .cwRectTutorial button[data-cw-natural-note][data-cw-narration-cue] .cwNaturalNoteLabel::before{animation:none}
}

.cwRectTutorial :is([data-cw-interval],.cwRectSliderStepRow){position:relative}
.cwRectCaptionPane{padding:9px 12px;margin:8px 0 10px;border:1px solid #506a83;border-radius:8px;background:#121d2d}
.cwRectCaptionPane>strong{display:block;color:#b5e6de;font-size:.86em;letter-spacing:.03em}
.cwRectCaptionPane p{margin:3px 0 0;line-height:1.45}
.cwRectCaptionPane [data-cw-narration-status]:empty{display:none}
.cwRectCaptionPane [data-cw-narration-status]{color:#b5e6de;font-size:.88em}
.cwRectTutorial[data-cw-narration-state="paused"] [data-cw-narration-cue]::after,
.cwRectTutorial[data-cw-narration-state="paused"] [data-cw-narration-cue] .cwNaturalNoteLabel::before{animation-play-state:paused}

.cwRectTutorial[data-cw-tutorial="1"] [data-cw-natural-answer]{display:none}
[data-rectangle-tutorial="signature"] .cwRectSliderStepRow>[data-rectangle-tonic]{
 position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);
}
.cwSignatureTrack{
 display:block;position:relative;height:8px;margin:0 7px;border:1px solid #637c9b;border-radius:12px;
 background:linear-gradient(to right,#9ac2ff var(--cw-signature-position),#263b54 var(--cw-signature-position));
}
.cwSignatureTrack::after{
 content:"";position:absolute;left:var(--cw-signature-position);top:50%;width:15px;height:15px;
 transform:translate(-50%,-50%);border-radius:50%;background:#b4d3ff;border:1px solid #294b76;
}

.cwRectTutorialPlayback{display:flex;align-items:center;flex-wrap:wrap;gap:6px 14px;margin:8px 0}
.cwRectTutorialPlayback .cwRectTutorialActions{margin:0}
.cwRectNarrationDisplay{display:flex;align-items:center;gap:7px}
.cwRectNarrationDisplay select{color:#e8f1fc;background:#17273a;border:1px solid #617b97;border-radius:6px;padding:6px}
.cwRectTutorialNav{position:sticky;top:var(--cw-rectangle-header-height,0px);z-index:2;background:#162539;padding:5px;border-radius:7px}
.cwGuideSurface:has(.cwRectTutorial){overflow-anchor:none}
.cwRectCaptionSizer{display:none}
.cwRectTutorial[data-cw-tutorial="2"] .cwRectCaptionText{display:grid}
.cwRectTutorial[data-cw-tutorial="2"] .cwRectCaptionText>p{grid-area:1/1}
.cwRectTutorial[data-cw-tutorial="2"] .cwRectCaptionSizer{display:block;visibility:hidden;pointer-events:none}
.cwRectTutorial[data-cw-tutorial="2"] .cwRectCaptionPane [data-cw-narration-status]{display:block;min-block-size:1.5em}
.cwRectTutorial [data-rectangle-tutorial="signature"] .cwRectSignature{min-block-size:7rem}
/* Scale relationships lead the major-key tutorial. */
.cwScaleFirstTutorial .cwRectTutorialNav,
html body #cwAcademyIntroductionOverlay .cwScaleFirstTutorial .cwRectTutorialNav{
 display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;align-items:stretch
}
html body #cwAcademyIntroductionOverlay .cwScaleFirstTutorial .cwRectTutorialNav button{
 font-size:12px!important;padding:6px 5px!important;min-height:38px
}
.cwScaleFirstTutorial .cwRectTutorialNav button{font-size:13px;min-width:0;padding:6px 5px;line-height:1.25}
.cwScaleFirstTutorial [hidden]{display:none!important}
.cwScaleFirstTutorial .cwScaleTeachingHead{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:5px 15px;background:#13263c;border-radius:8px;padding:8px 10px}
.cwScaleTeachingHead strong{font-size:1.15em}
.cwScaleTeachingHead span{color:#ffe0a0}
html body .cwGuideSurface .cwScaleFirstTutorial svg.cwWholeScaleKeyboard,
.cwScaleFirstTutorial svg.cwWholeScaleKeyboard{
 display:block;width:100%;height:auto;max-height:190px;max-width:none;margin:8px 0
}
.cwScaleDegreeCards,.cwScaleShiftPairs,.cwMajorStepPattern,.cwNaturalSignatureMap{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px;margin:8px 0}
.cwScaleDegreeCards>div,.cwScaleShiftPairs>div,.cwNaturalSignatureMap>div{display:grid;justify-items:center;align-content:start;gap:4px;padding:7px 3px;min-width:0;background:#172d43;border:1px solid #678198;border-radius:7px;position:relative;text-align:center}
.cwScaleDegreeCards b,.cwScaleShiftPairs b,.cwScaleShiftPairs strong{font-size:1.18em;color:#edf7ff}
.cwScaleShiftPairs strong{color:#ffe09b}
.cwScaleDegreeCards small,.cwScaleShiftPairs small,.cwNaturalSignatureMap small{font-size:11px;line-height:1.3}
.cwScaleShiftPairs>div{min-height:96px}
.cwScaleShiftPairs>div>span{font-size:10px;color:#b8ccdd}
.cwMajorStepPattern>span{display:grid;justify-items:center;gap:2px;padding:4px 0;background:#102537;border-radius:5px}
.cwMajorStepPattern small{font-size:10px;color:#bdd5e9}
.cwMajorStepPattern b{font-size:11px}
.cwScaleShiftKey{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;font-size:11px;color:#c8daea;margin:5px 0}
.cwScaleSignatureSummary{color:#ffdc89;padding:7px 10px;border:1px solid #667e91;border-radius:7px}
.cwScaleShiftResult{display:flex;flex-wrap:wrap;align-items:center;gap:7px 18px;padding:9px 12px;border:1px solid #9ecdc3;border-radius:8px;background:#173a40;margin:8px 0}
.cwScaleShiftResult>strong{width:100%}
.cwScaleShiftResult>b{color:#ffe19c}
.cwNaturalSignatureMap>div{min-height:130px}
.cwNaturalSignatureMap strong{font-size:13px}
.cwNaturalSignatureMap span{color:#ffdc89;font-weight:700}
.cwScaleFirstTutorial .cwRectCaptionText{display:grid}
.cwScaleFirstTutorial .cwRectCaptionText>p{grid-area:1/1}
.cwScaleFirstTutorial .cwRectCaptionSizer{display:block!important;visibility:hidden}
.cwScaleFirstTutorial [data-cw-narration-status]{min-height:1.4em}
.cwScaleFirstTutorial .cwNaturalKeyboard button:disabled,
.cwScaleFirstTutorial .cwNaturalActions button:disabled{opacity:1!important;cursor:default}
.cwScaleFirstTutorial [data-cw-natural-answer]{display:none}
.cwScaleFirstTutorial .cwRectTutorialActions [data-cw-prev]{margin-left:auto}
.cwMinorLessonLink a,.cwScaleFirstTutorial a,.cwMinorSignatureLesson a{color:#b7e7dc}
.cwMinorHomeReference{display:grid;gap:6px;border:1px solid #a1cbbf;border-radius:8px;padding:14px;background:#173c42;margin:14px 0}
.cwMinorSignatureLesson [data-cw-minor-keyboard] svg{width:100%;height:auto;display:block}
.cwMinorSignatureLesson .cwRectSlider{margin:15px 0}
@media(max-width:600px){
 .cwScaleFirstTutorial .cwRectTutorialNav{grid-template-columns:repeat(2,minmax(0,1fr))}
 .cwNaturalSignatureMap{grid-template-columns:repeat(4,minmax(0,1fr))}
 .cwMajorStepPattern b,.cwScaleShiftPairs>div>span{font-size:9px}
}

.cwScaleFirstTutorial [data-cw-sounding] circle{fill:#ffb86b;stroke:#162b3c;stroke-width:4}
/* Named notes and rings keep Rectangle values distinct from scale-degree numbering. */
.cwScaleFirstTutorial [data-cw-sounding] circle{
 fill:none;stroke:#25899a;stroke-width:3;animation:cwRectanglePlayingRing .8s ease-in-out infinite
}
@keyframes cwRectanglePlayingRing{
 0%,100%{stroke-opacity:1;stroke-width:3}
 50%{stroke-opacity:.55;stroke-width:5}
}
.cwScaleFirstTutorial .cwScaleDegreeCards>div{padding:9px 3px}
.cwScaleFirstTutorial .cwScaleShiftPairs>div{min-height:78px}
.cwScaleFirstTutorial .cwMajorStepPattern>span{padding:6px 0}
@media(prefers-reduced-motion:reduce){.cwScaleFirstTutorial [data-cw-sounding] circle{animation:none}}

.cwScaleFirstTutorial[data-cw-narration-state="paused"] [data-cw-sounding] circle{animation-play-state:paused}
/* B078GL: one complete teaching view, with a stable reserved caption area. */
html body #cwAcademyIntroductionOverlay .cwGuideSurface:has(.cwScaleFirstTutorial){padding:12px 20px!important;scrollbar-gutter:stable}
html body .cwGuideSurface:has(.cwScaleFirstTutorial)>.cwUnifiedGuideHeader{padding:8px 12px!important;min-height:0!important;gap:10px}
html body .cwGuideSurface:has(.cwScaleFirstTutorial)>.cwUnifiedGuideHeader h1,
html body .cwGuideSurface:has(.cwScaleFirstTutorial)>.cwUnifiedGuideHeader h2{font-size:28px!important;margin:0!important}
html body .cwGuideSurface:has(.cwScaleFirstTutorial)>.cwUnifiedGuideHeader button{padding:6px 12px!important;min-height:30px!important}
html body #cwAcademyIntroductionOverlay .cwScaleFirstTutorial{margin:8px 0!important;padding:10px!important;max-width:none!important}
html body #cwAcademyIntroductionOverlay .cwScaleFirstTutorial h3{font-size:23px!important;margin:5px 0!important}
html body #cwAcademyIntroductionOverlay .cwScaleFirstTutorial [data-cw-step-instructions]{margin:4px 0!important;line-height:1.35!important;font-size:13px!important}
html body #cwAcademyIntroductionOverlay .cwScaleFirstTutorial .cwRectTutorialNav{position:relative;top:auto;z-index:1;margin:0!important;gap:4px;padding:3px}
html body #cwAcademyIntroductionOverlay .cwScaleFirstTutorial .cwRectTutorialNav button{min-height:30px!important;padding:5px!important}
.cwScaleFirstTutorial .cwRectTutorialPlayback{margin:5px 0}
html body #cwAcademyIntroductionOverlay .cwScaleFirstTutorial .cwRectCaptionPane{padding:7px 10px!important;margin:6px 0!important;font-size:13px!important;line-height:1.45!important}
html body #cwAcademyIntroductionOverlay .cwScaleFirstTutorial .cwRectCaptionPane p{margin:0!important;line-height:1.45!important;font-size:13px!important}
.cwScaleFirstTutorial .cwRectCaptionText{min-height:4.4em}
.cwScaleFirstTutorial .cwRectCaptionSizer{max-width:100%}
html body #cwAcademyIntroductionOverlay .cwScaleFirstTutorial svg.cwWholeScaleKeyboard{height:clamp(110px,18vh,155px)!important;max-height:155px!important;margin:3px 0!important;width:100%}
.cwScaleFirstTutorial .cwScaleShiftPairs>div{min-height:56px;padding:4px 2px;gap:2px}
.cwScaleFirstTutorial .cwScaleDegreeCards>div{padding:5px 2px}
.cwScaleFirstTutorial .cwMajorStepPattern{margin:3px 0}
.cwScaleFirstTutorial .cwMajorStepPattern>span{padding:3px 0}
.cwScaleFirstTutorial .cwScaleTeachingHead{padding:5px 8px}
.cwScaleFirstTutorial [data-cw-scale-value]{display:grid;text-align:right;gap:2px}
.cwScaleFirstTutorial [data-cw-scale-value] b{font-size:20px;color:#ffe09b}
.cwScaleFirstTutorial [data-cw-scale-value] small{font-size:12px;color:#e4eef8}
.cwScaleFirstTutorial .cwRectTutorialTonic b{font-size:24px;color:#ffe09b}
.cwScaleFirstTutorial .cwScaleShiftResult{padding:5px 8px;margin:4px 0;font-size:12px}
.cwScaleFirstTutorial [data-cw-shift-formula]{font-size:22px}
.cwScaleFirstTutorial .cwRectTutorialActions{margin:5px 0}
.cwScaleFirstTutorial figcaption{font-size:11px;margin:4px 0}
.cwCompleteKeyboard h4{margin:4px 0;font-size:20px}
.cwCompleteKeyboard p{font-size:12px;line-height:1.4;margin:5px 0}
html body .cwGuideSurface .cwCompleteKeyboard svg{width:100%;max-width:none;max-height:230px;margin:5px 0}
.cwSharpLegend{color:#ffca65}.cwFlatLegend{color:#96bfff}
@media(max-height:800px){html body #cwAcademyIntroductionOverlay .cwScaleFirstTutorial svg.cwWholeScaleKeyboard{height:118px!important}.cwScaleFirstTutorial .cwScaleShiftKey{margin:2px 0}.cwScaleFirstTutorial .cwScaleShiftPairs>div{min-height:48px}}
html body #cwAcademyIntroductionOverlay .cwGuideSurface:has(.cwScaleFirstTutorial)>.cwUnifiedGuideHeader{display:flex!important;align-items:center!important;justify-content:space-between!important;padding:5px 10px!important}
html body #cwAcademyIntroductionOverlay .cwGuideSurface:has(.cwScaleFirstTutorial)>.cwUnifiedGuideHeader>*:last-child{display:flex!important;flex-direction:row!important;gap:6px!important}
html body #cwAcademyIntroductionOverlay .cwGuideSurface:has(.cwScaleFirstTutorial)>.cwUnifiedGuideHeader :is(h1,h2,h3){font-size:26px!important;margin:0!important;line-height:1.2!important}
html body #cwAcademyIntroductionOverlay .cwGuideSurface:has(.cwScaleFirstTutorial)>p{margin:4px 0!important;font-size:13px!important;line-height:1.3!important}
html body #cwAcademyIntroductionOverlay .cwScaleFirstTutorial{padding:8px!important;margin:4px 0!important}
html body #cwAcademyIntroductionOverlay .cwScaleFirstTutorial .cwRectTutorialPlayback{margin:3px 0!important;min-height:36px!important;gap:8px!important}
html body #cwAcademyIntroductionOverlay .cwScaleFirstTutorial .cwRectTutorialPlayback button{padding:5px!important;min-height:32px!important;height:32px!important}
html body #cwAcademyIntroductionOverlay .cwScaleFirstTutorial .cwRectTutorialPlayback select{padding:4px!important;height:34px!important}
html body #cwAcademyIntroductionOverlay .cwScaleFirstTutorial svg.cwWholeScaleKeyboard{height:165px!important;max-height:165px!important}
html body #cwAcademyIntroductionOverlay .cwGuideSurface:has(.cwScaleFirstTutorial)>.cwUnifiedGuideHeader{height:48px!important;min-height:48px!important;max-height:48px!important;box-sizing:border-box!important}
html body #cwAcademyIntroductionOverlay .cwGuideSurface:has(.cwScaleFirstTutorial)>.cwUnifiedGuideHeader .cwUnifiedGuideActions{display:flex!important;flex-direction:row!important;align-items:center!important}
html body #cwAcademyIntroductionOverlay .cwGuideSurface:has(.cwScaleFirstTutorial)>.cwUnifiedGuideHeader h1{font-size:26px!important;line-height:30px!important;padding:0!important}
html body #cwAcademyIntroductionOverlay .cwGuideHero:has(.cwScaleFirstTutorial){padding:0!important;margin:0!important;gap:0!important}
html body #cwAcademyIntroductionOverlay .cwGuideSurface:has(.cwScaleFirstTutorial) .cwGuideQuestion{padding:0!important;margin:4px 0!important;line-height:1.3!important}
html body #cwAcademyIntroductionOverlay .cwScaleFirstTutorial .cwRectTutorialPlayback .cwStandardTransport{padding:3px!important;min-height:0!important}
html body #cwAcademyIntroductionOverlay .cwScaleFirstTutorial .cwRectTutorialPlayback label{padding:0!important;margin:0!important}
.cwScaleFirstTutorial .cwNaturalSignatureMap span{font-size:21px;color:#ffe09b;font-weight:700}
html body #cwAcademyIntroductionOverlay .cwGuideSurface:has(.cwScaleFirstTutorial) .cwAcademyIntroductionQuestion{font-size:13px!important;line-height:17px!important;margin:4px 0!important;padding:0!important}
@media(max-width:1100px){html body #cwAcademyIntroductionOverlay .cwScaleFirstTutorial svg.cwWholeScaleKeyboard{height:150px!important;max-height:150px!important}html body #cwAcademyIntroductionOverlay .cwScaleFirstTutorial [data-cw-step-instructions]{font-size:12px!important}.cwScaleFirstTutorial .cwScaleShiftPairs>div{min-height:45px!important}.cwScaleFirstTutorial .cwScaleShiftKey{font-size:10px}}
html body #cwAcademyIntroductionOverlay .cwCompleteKeyboard svg{height:clamp(180px,27vh,230px)!important;max-height:230px!important}
@media(max-width:1100px){html body #cwAcademyIntroductionOverlay .cwGuideSurface:has(.cwScaleFirstTutorial) .cwAcademyIntroductionQuestion{display:none!important}html body #cwAcademyIntroductionOverlay .cwScaleFirstTutorial .cwRectCaptionPane{font-size:12px!important;line-height:1.4!important}html body #cwAcademyIntroductionOverlay .cwScaleFirstTutorial .cwRectCaptionPane p{font-size:12px!important;line-height:1.4!important}}
/* Keep the spoken tonic conclusion and its pulse together. */
.cwScaleFirstTutorial [data-cw-shift-conclusion]{position:relative;padding:3px 23px 3px 6px;font-size:15px;line-height:1.35;color:#ffe09b}
/* B078GN: reveals fill reserved slots instead of moving the keyboard. */
html body .cwScaleFirstTutorial .cwRectCaptionPane [data-cw-narration-status],
html body .cwScaleFirstTutorial .cwRectCaptionPane [data-cw-narration-status]:empty{display:block!important;min-height:1.5em!important;margin:0!important}
.cwScaleFirstTutorial [data-cw-scale-value][hidden]{display:grid!important;visibility:hidden}
.cwScaleFirstTutorial [data-cw-scale-signature][hidden]{display:block!important;visibility:hidden}
.cwScaleFirstTutorial .cwNaturalSignatureMap [hidden]{display:block!important;visibility:hidden}
.cwScaleFirstTutorial [data-cw-shift-target][hidden],
.cwScaleFirstTutorial [data-cw-shift-formula][hidden]{display:block!important;visibility:hidden}
.cwScaleFirstTutorial [data-cw-shift-result]{min-height:80px;box-sizing:border-box}
.cwScaleFirstTutorial [data-cw-shift-result][hidden]{display:flex!important;visibility:hidden}
.cwScaleFirstTutorial [data-cw-ledger]{min-height:46px;box-sizing:border-box}
.cwScaleFirstTutorial [data-cw-tutorial-panel]{overflow-anchor:none}
.cwScaleFirstTutorial [data-cw-tutorial-panel]{display:flow-root}
.cwScaleFirstTutorial .cwRectCaptionText>*{grid-area:1/1;align-self:start}
html body #cwAcademyIntroductionOverlay .cwScaleFirstTutorial .cwRectCaptionSizer{font-size:13px!important;line-height:1.45!important;margin:0!important}
@media(max-width:1100px){html body #cwAcademyIntroductionOverlay .cwScaleFirstTutorial .cwRectCaptionSizer{font-size:12px!important;line-height:1.4!important}}
.cwScaleFirstTutorial [data-rectangle-tutorial="intervals"] .cwRectSliderStepRow{position:relative}
/* B078GS: a reserved badge identifies only the tonic's Rectangle value. */
.cwScaleFirstTutorial .cwTonicValueBadge{display:inline-block;position:relative;min-height:22px;min-width:62px;box-sizing:border-box;padding:2px 8px;border:1px solid #a6dfd4;border-radius:6px;background:#173e43;color:#e5fff5;font-size:14px!important;font-weight:700;line-height:1.2}
.cwScaleFirstTutorial [data-cw-tonic-value][hidden]{display:inline-block!important;visibility:hidden}
.cwScaleFirstTutorial [data-cw-tonic-referenced]>circle{stroke:#65d7bf!important;stroke-width:3!important;animation:cwRectanglePlayingRing 1s ease-in-out infinite}
.cwScaleFirstTutorial[data-cw-narration-state="paused"] [data-cw-tonic-referenced]>circle{animation-play-state:paused}
@media(prefers-reduced-motion:reduce){.cwScaleFirstTutorial [data-cw-tonic-referenced]>circle{animation:none}}
/* The value itself remains unobstructed; the outline and key ring provide the cue. */
.cwScaleFirstTutorial .cwTonicValueBadge[data-cw-narration-cue]::after{display:none!important}
/* B078GT: retain the upper tonic value beside its original note. */
.cwScaleFirstTutorial .cwShiftTonicRow{display:flex;align-items:center;justify-content:center;gap:5px;min-height:24px;width:100%}
.cwScaleFirstTutorial .cwShiftTonicRow[data-cw-shift-target][hidden]{display:flex!important;visibility:hidden}
.cwScaleFirstTutorial .cwShiftTonicRow .cwTonicValueBadge{min-width:0;white-space:nowrap;padding:2px 5px;font-size:12px!important;min-height:21px}
@media(max-width:1100px){.cwScaleFirstTutorial .cwShiftTonicRow{gap:3px}.cwScaleFirstTutorial .cwShiftTonicRow .cwTonicValueBadge{font-size:11px!important;padding:2px 3px}}
/* B078GU · Why the Rectangle? and its separate tonic companion. */
.cwWhyRectangle{max-width:none!important;width:100%;margin:10px 0!important;padding:14px!important;background:#172b38;border:1px solid #678492;border-radius:12px;color:#eaf3fa;font:14px/1.45 Arial,sans-serif;box-sizing:border-box}
.cwWhyRectangle [hidden]{display:none!important}.cwWhyRectangle h3{margin:7px 0!important;font-size:25px!important}.cwWhyRectangle h4{font-size:14px!important;margin:4px 0!important}
.cwWhyTabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}.cwWhyTabs button{min-width:0;font-size:12px!important;padding:7px!important;line-height:1.3}.cwWhyTabs [aria-current]{background:#2d5552!important;border-color:#b8e9db!important}
.cwWhyPlayback{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:7px 0}.cwWhyPlayback .cwStandardTransport{display:flex;gap:5px;border:1px solid #647d90;border-radius:7px;padding:5px}.cwWhyPlayback button{width:38px;padding:6px!important;min-height:32px!important}.cwWhyPlayback label{display:flex;align-items:center;gap:7px}.cwWhyPlayback select{padding:7px;border-radius:5px;background:#111f2e;color:#eef8ff;border:1px solid #688194}
.cwWhyCaptionPane{padding:9px 11px;border:1px solid #607b90;border-radius:8px;background:#122132;margin:7px 0}.cwWhyCaptionPane>strong{font-size:12px;color:#b8e9db}.cwWhyCaptionStack{display:grid;line-height:1.4}.cwWhyCaptionStack>*{grid-area:1/1;align-self:start}.cwWhyCaptionSizer{visibility:hidden;pointer-events:none}.cwWhyStatus{min-height:1.45em;color:#f5d991;font-size:12px}
.cwWhyMaps{display:grid;grid-template-columns:230px minmax(0,1fr);gap:18px;align-items:center}.cwWhyMaps section{min-width:0}.cwWhyMaps svg{display:block;width:100%!important;height:auto!important;max-width:none!important;margin:0!important}.cwWhyCircle{max-height:220px!important}.cwWhyCircle circle{fill:#1b2a3d;stroke:#748a9f;stroke-width:1.5}.cwWhyCircle text,.cwWhyKeyboard text{text-anchor:middle;fill:#edf6ff;font:700 14px Arial,sans-serif}.cwWhyCircle .whyCentre{font-size:13px;fill:#c4d7e5}
.cwWhyStrip{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}.cwWhyStrip>div{display:grid;justify-items:center;align-content:center;min-height:59px;border:1px solid #6a8297;border-radius:6px;background:#16283d}.cwWhyStrip small{font-size:10px;min-height:1.4em}.cwWhyStrip b{font-size:18px}.cwWhyDirections{display:flex;justify-content:space-between;font-size:11px;color:#c8dce8;margin:3px 0 8px}.cwWhyDirections span{margin-left:auto}
.cwWhyKeyboard .whyWhite{fill:#edf3f8;stroke:#5c7188}.cwWhyKeyboard .whyBlack{fill:#111b2a;stroke:#63768a}.cwWhyKeyboard text{fill:#14273a;font-size:15px}
.cwWhyRectangle [data-role="home"]{--why-colour:#8fe0c6}.cwWhyRectangle [data-role="fourth"]{--why-colour:#9dc4ff}.cwWhyRectangle [data-role="fifth"]{--why-colour:#ffd484}
.cwWhyStrip [data-role]:not([data-role=""]){border:2px solid var(--why-colour);background:#24424c}.cwWhyCircle [data-role]:not([data-role=""]) circle{stroke:var(--why-colour);stroke-width:3;fill:#25444d}.cwWhyKeyboard [data-role]:not([data-role=""]) .whyWhite{fill:var(--why-colour)}
.cwWhyRectangle [data-sounding="true"]{filter:drop-shadow(0 0 5px var(--why-colour,#b6eee0))}.cwWhyCircle [data-sounding="true"] circle{fill:var(--why-colour);stroke:#fff}.cwWhyCircle [data-sounding="true"] text{fill:#132333}.cwWhyStrip [data-sounding="true"]{background:var(--why-colour);color:#122332}
.cwWhyLegend{display:flex;justify-content:center;gap:15px;font-size:12px;margin:6px 0}.cwWhyLegend span{color:var(--why-colour)}.cwWhyChordRow{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:8px 0}.cwWhyChordRow>div{padding:7px;display:grid;text-align:center;border:1px solid #607c91;border-radius:6px;background:#132538}.cwWhyChordRow small{font-size:11px}.cwWhyChordRow b{font-size:16px}.cwWhyChordRow [aria-current]{background:#315951;border-color:#c3f3df}
.cwWhyRoadmap{display:grid;gap:3px;padding:9px;background:#18243a;border-radius:6px}.cwWhyRoadmap span{font-size:12px}.cwWhyActions{display:flex;justify-content:space-between;gap:6px;margin-top:9px}.cwWhyActions button{padding:8px!important;font-size:12px!important}.cwWhyRectangle figcaption{font-size:11px!important;margin-top:7px!important}
html body #cwAcademyIntroductionOverlay .cwGuideHero:has(.cwWhyRectangle){display:block!important;padding:0!important;margin:6px 0!important}.cwGuideHero:has(.cwWhyRectangle)>div:first-child{display:none!important}
html body #cwAcademyIntroductionOverlay .cwGuideSurface:has(.cwWhyRectangle){padding:12px 20px!important}.cwGuideSurface:has(.cwWhyRectangle)>.cwUnifiedGuideHeader{padding:9px 12px!important}.cwGuideSurface:has(.cwWhyRectangle)>.cwUnifiedGuideHeader h1{font-size:30px!important;margin:0!important}
.cwTonicCompanionSurface{width:min(1100px,calc(100vw - 24px));height:calc(100dvh - 24px);overflow:auto;margin:12px auto;background:#0d1725;border:1px solid #526e86;border-radius:12px;padding:12px 22px;box-sizing:border-box}.cwTonicCompanionSurface .cwUnifiedGuideActions{display:flex;align-items:center;gap:10px}.cwTonicCompanionSurface .cwUnifiedGuideActions a,.cwCompanionSupport a{color:#b8e9db}.cwCompanionSupport{border:1px solid #607b90;background:#172b3d;border-radius:9px;padding:15px;margin:14px 0}
@media(max-width:1100px){.cwWhyMaps{grid-template-columns:185px minmax(0,1fr);gap:10px}.cwWhyCircle{max-height:185px!important}.cwWhyRectangle{font-size:13px}.cwWhyCaptionStack{font-size:12px}.cwWhyTabs button{font-size:11px!important}.cwWhyStrip small{font-size:9px}.cwWhyStrip b{font-size:16px}}
@media(max-width:700px){.cwWhyTabs{grid-template-columns:repeat(2,minmax(0,1fr))}.cwWhyMaps{grid-template-columns:140px minmax(0,1fr);gap:7px}.cwWhyStrip>div{min-height:48px}.cwWhyStrip small{display:none}.cwWhyActions{flex-wrap:wrap}.cwWhyLegend{gap:8px}.cwWhyCircle{max-height:140px!important}}
html body #cwAcademyIntroductionOverlay .cwGuideSurface:has(.cwWhyRectangle)>.cwUnifiedGuideHeader{display:flex!important;align-items:center!important;justify-content:space-between!important;padding:5px 10px!important;height:48px!important;min-height:48px!important;box-sizing:border-box!important;margin-bottom:4px!important}
html body #cwAcademyIntroductionOverlay .cwGuideSurface:has(.cwWhyRectangle)>.cwUnifiedGuideHeader h1{font-size:27px!important;line-height:30px!important;margin:0!important;padding:0!important}
html body #cwAcademyIntroductionOverlay .cwGuideSurface:has(.cwWhyRectangle)>.cwUnifiedGuideHeader .cwUnifiedGuideActions{display:flex!important;flex-direction:row!important;gap:6px!important}
html body #cwAcademyIntroductionOverlay .cwGuideSurface:has(.cwWhyRectangle)>.cwUnifiedGuideHeader button{padding:6px 12px!important;min-height:30px!important}
html body #cwAcademyIntroductionOverlay .cwGuideSurface:has(.cwWhyRectangle)>.cwIntroHero[hidden]{display:none!important}
html body #cwAcademyIntroductionOverlay .cwGuideSurface:has(.cwWhyRectangle)>.cwAcademyIntroductionQuestion{font-size:14px!important;line-height:1.3!important;margin:4px 0!important;padding:0!important}
html body #cwAcademyIntroductionOverlay .cwGuideHero:has(.cwWhyRectangle){padding:0!important;margin:0!important;border:0!important;background:none!important;gap:0!important}
html body #cwAcademyIntroductionOverlay .cwWhyRectangle{padding:10px!important;margin:5px 0!important}
html body #cwAcademyIntroductionOverlay .cwWhyRectangle h3{font-size:23px!important;margin:4px 0!important}
html body #cwAcademyIntroductionOverlay .cwWhyRectangle h4{font-size:13px!important;margin:3px 0!important}
html body #cwAcademyIntroductionOverlay .cwWhyTabs button{min-height:30px!important;padding:5px!important}
.cwWhyPlayback{margin:5px 0}.cwWhyPlayback .cwStandardTransport{padding:3px}.cwWhyCaptionPane{padding:6px 9px;margin:5px 0}.cwWhyStatus{font-size:11px}.cwWhyMaps{grid-template-columns:205px minmax(0,1fr)}.cwWhyCircle{max-height:195px!important}.cwWhyRoadmap{padding:6px}.cwWhyActions{margin-top:6px}
@media(max-width:1100px){.cwWhyMaps{grid-template-columns:165px minmax(0,1fr);gap:9px}.cwWhyCircle{max-height:165px!important}.cwWhyStrip>div{min-height:49px}.cwWhyStrip b{font-size:15px}.cwWhyDirections{margin-bottom:4px}.cwWhyLegend{margin:3px 0}.cwWhyChordRow{margin:5px 0}.cwWhyChordRow>div{padding:4px}.cwWhyRoadmap{font-size:12px}.cwWhyRoadmap span{font-size:11px}.cwWhyActions button{padding:5px!important}.cwWhyRectangle figcaption{font-size:10px!important;margin-top:4px!important}}
.cwTonicCompanionSurface{width:calc(100% - 24px);max-width:1100px}
#cwAcademyIntroductionOverlay.open .cwTonicCompanionSurface{pointer-events:auto!important}
/* B078GV · durable contrast, active stages and named Rectangle values. */
html body #cwAcademyIntroductionOverlay .cwWhyRectangle .cwWhyTabs button{border:2px solid #4b657a!important;color:#eaf5ff!important;font-weight:700!important;box-sizing:border-box}
html body #cwAcademyIntroductionOverlay .cwWhyRectangle .cwWhyTabs button.cwWhyCurrent,
html body #cwAcademyIntroductionOverlay .cwWhyRectangle .cwWhyTabs button[aria-current="step"]{background:#315d56!important;border-color:#b8f2d9!important;color:#fff!important;box-shadow:inset 0 -3px #a6ead0!important}
html body #cwAcademyIntroductionOverlay .cwWhyRectangle .cwWhyStrip>div{background:#162a3c!important;color:#f3f8ff!important;box-sizing:border-box;min-height:76px}
html body #cwAcademyIntroductionOverlay .cwWhyRectangle .cwWhyStrip>div[data-sounding="true"]{background:#25444d!important;color:#fff!important;outline:2px solid var(--why-colour,#bcf3df);outline-offset:-2px}
html body #cwAcademyIntroductionOverlay .cwWhyRectangle .cwWhyStrip :is(b,small,.cwWhyStripValue){color:#f3f8ff!important;opacity:1!important}
.cwWhyStripValue{font-size:12px;font-weight:700;line-height:1.3;white-space:nowrap}
html body #cwAcademyIntroductionOverlay .cwWhyRectangle .cwWhyCircle [data-why-note] circle{fill:#193044!important}
html body #cwAcademyIntroductionOverlay .cwWhyRectangle .cwWhyCircle [data-sounding="true"] circle{fill:#294c53!important;stroke:var(--why-colour,#b9f3df)!important;stroke-width:4px!important}
html body #cwAcademyIntroductionOverlay .cwWhyRectangle .cwWhyCircle [data-why-note] text{fill:#f4f9ff!important;opacity:1!important;font-weight:700}
html body #cwAcademyIntroductionOverlay .cwWhyRectangle .cwWhyKeyboard .whyWhite{fill:#edf3f8!important}
html body #cwAcademyIntroductionOverlay .cwWhyRectangle .cwWhyKeyboard [data-role]:not([data-role=""]) .whyWhite{fill:var(--why-colour)!important}
html body #cwAcademyIntroductionOverlay .cwWhyRectangle .cwWhyKeyboard [data-why-note] text{fill:#14283a!important;opacity:1!important}
html body #cwAcademyIntroductionOverlay .cwWhyRectangle .cwWhyKeyboard .whyKeyboardValue{font-size:12px!important;font-weight:700}
html body #cwAcademyIntroductionOverlay .cwWhyRectangle .cwWhyChordRow>div{color:#f3f8ff!important;min-height:62px;box-sizing:border-box;align-content:center}
html body #cwAcademyIntroductionOverlay .cwWhyRectangle .cwWhyChordRow>div :is(b,small){color:#f3f8ff!important;opacity:1!important}
html body #cwAcademyIntroductionOverlay .cwWhyRectangle .cwWhyCircle [data-why-minor] rect{fill:#142b3b!important;stroke:#6b879b;stroke-width:.6}
html body #cwAcademyIntroductionOverlay .cwWhyRectangle .cwWhyCircle [data-why-minor] text{fill:#d3e1f0!important;font:700 12px Arial,sans-serif!important;text-anchor:middle}
html body #cwAcademyIntroductionOverlay .cwWhyRectangle .cwWhyCircle [data-why-minor][data-paired="true"] rect{fill:#315d56!important;stroke:#c5f5de;stroke-width:1.7}
html body #cwAcademyIntroductionOverlay .cwWhyRectangle .cwWhyCircle [data-why-minor][data-paired="true"] text{fill:#fff!important}
.cwWhyRectangle[data-stage="3"] .cwWhyCircle .whyCentre{font-size:10px!important}
.cwWhyRectangle[data-stage="3"] .cwWhyChordRow{grid-template-columns:repeat(2,minmax(0,1fr))}
.cwWhyRectangle[data-stage="3"] .cwWhyChordRow b{font-size:15px}
@media(max-width:1100px){html body #cwAcademyIntroductionOverlay .cwWhyRectangle .cwWhyStrip>div{min-height:65px}.cwWhyStripValue{font-size:11px}.cwWhyRectangle[data-stage="3"] .cwWhyChordRow b{font-size:13px}}
html body #cwAcademyIntroductionOverlay .cwWhyRectangle .cwWhyCircle [data-why-minor] rect{fill:transparent!important;stroke:none!important}
html body #cwAcademyIntroductionOverlay .cwWhyRectangle .cwWhyCircle [data-why-minor][data-paired="true"] rect{fill:#315d56!important;stroke:#c5f5de!important}
/* B078GW · the seven-value promise is visible before playback. */
.cwWhyBigAsk{padding:6px 10px;margin:5px 0;border-left:4px solid #a6ead0;background:#17383d;border-radius:5px;color:#f3fcf8;line-height:1.35;font-size:13px}
.cwWhyBigAsk strong{font-weight:700}.cwWhyBigAsk em{font-style:normal;color:#ffe09b;font-weight:800}
.cwSevenMemory{margin:6px 0 7px}.cwSevenAnchors{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px}
.cwSevenAnchors>div{display:grid;justify-items:center;align-content:center;gap:1px;min-height:49px;box-sizing:border-box;border:1px solid #6a879a;border-radius:6px;background:#152b3d;color:#f2f8fc}
.cwSevenAnchors b{font-size:13px!important;line-height:1.1}.cwSevenAnchors strong{font-size:19px!important;line-height:1.15;color:#ffe5a8!important}
.cwSevenAnchors [data-sounding="true"]{background:#24464d;border:2px solid var(--why-colour,#c5f8df);filter:drop-shadow(0 0 3px var(--why-colour,#9be1ca))}
.cwSevenGroups{display:grid;grid-template-columns:3fr 4fr;gap:7px;text-align:center;font-size:10px;line-height:1.25;margin-top:3px;color:#c3dbe8}
.cwSevenGroups>span{border-bottom:1px solid #759da4;padding-bottom:2px}
.cwWhyRectangle[data-stage="0"] .cwWhyChordRow,.cwWhyRectangle[data-stage="1"] .cwWhyChordRow{display:none}
html body #cwAcademyIntroductionOverlay .cwWhyRectangle .cwWhyMaps>section:first-child h4{font-size:12px!important}
html body #cwAcademyIntroductionOverlay .cwWhyRectangle .cwWhyCircle .whyCentre{font-size:10px!important}
html body #cwAcademyIntroductionOverlay .cwWhyRectangle .cwWhyCaptionStack{font-size:13px;line-height:1.35}
@media(max-width:1100px){.cwWhyBigAsk{font-size:12px}.cwSevenAnchors>div{min-height:45px}.cwSevenAnchors strong{font-size:17px!important}.cwSevenAnchors b{font-size:12px!important}.cwSevenGroups{font-size:9px}html body #cwAcademyIntroductionOverlay .cwWhyRectangle .cwWhyCaptionStack{font-size:12px;line-height:1.35}}
.cwWhyRectangle[data-stage="0"] .cwSevenAnchors [data-sounding="true"]{border-color:#b8f2da;filter:drop-shadow(0 0 3px #9be1ca)}

/* B078GX: tonic compass; number origins are introduced before calculation rules. */
.cwSevenOrigin{font-size:11px;text-align:center;color:#c7ddd9;margin-top:5px}.cwWhyRectangle[data-stage="3"] .cwWhyChordRow{display:none}

/* B078GY: a readable Circle with shared signature labels, beside the seven-number alternative. */
html body #cwAcademyIntroductionOverlay .cwWhyRectangle .cwWhyMaps{grid-template-columns:minmax(270px,32%) minmax(0,1fr);align-items:center}
html body #cwAcademyIntroductionOverlay .cwWhyRectangle .cwWhyCircle{width:100%;max-height:320px!important;display:block}
.cwWhyCircleSubtitle{font-size:11px!important;line-height:1.35!important;text-align:center;margin:3px 0!important;color:#d6e4f0}
html body #cwAcademyIntroductionOverlay .cwWhyRectangle .cwWhyMaps>section:first-child h4{text-align:center;font-size:15px!important}
html body #cwAcademyIntroductionOverlay .cwWhyRectangle .cwWhyCircle .cwWhySignature rect{fill:#162b3d;stroke:#7892a8;stroke-width:1}
html body #cwAcademyIntroductionOverlay .cwWhyRectangle .cwWhyCircle .cwWhySignature text{fill:#e9f2fc!important;font:700 15px Arial,sans-serif!important;text-anchor:middle}
html body #cwAcademyIntroductionOverlay .cwWhyRectangle .cwWhyCircle [data-current-signature="true"] rect{fill:#315d56;stroke:#c5f5de;stroke-width:2.5}
@media(max-width:1100px){html body #cwAcademyIntroductionOverlay .cwWhyRectangle .cwWhyMaps{grid-template-columns:minmax(240px,40%) minmax(0,1fr);gap:10px}html body #cwAcademyIntroductionOverlay .cwWhyRectangle .cwWhyCircle{max-height:280px!important}}
@media(max-width:740px){html body #cwAcademyIntroductionOverlay .cwWhyRectangle .cwWhyMaps{grid-template-columns:1fr}.cwWhyMaps>section:first-child{max-width:320px;margin:auto}}

.cwWhyCirclePanel {
 border: 1px solid #50677e;
 border-radius: 10px;
 padding: 6px;
 box-sizing: border-box;
 background: #162432;
}
.cwWhyScaleReading {
 padding: 5px 8px;
 margin: 5px 0;
 border: 1px solid #50677e;
 border-radius: 6px;
 background: #152434;
}
.cwWhyScaleNotes { display: flex; gap: .65em; flex-wrap: wrap; }
.cwWhyScaleAccidental { color: #ffd784; font-weight: 700; }
.cwWhyScaleTonic { color: #b6eee0; font-weight: 700; }

.cwWhyRectangle .cwWhyDirections[hidden],
.cwWhyRectangle .cwWhyLegend[hidden] { display: none; }
html body #cwAcademyIntroductionOverlay .cwWhyRectangle .cwWhyKeyboard [data-scale-state="scale"] .whyWhite { fill: #cfe4f1 !important; }
html body #cwAcademyIntroductionOverlay .cwWhyRectangle .cwWhyKeyboard [data-scale-state="tonic"] .whyWhite { fill: #a6dfce !important; }
html body #cwAcademyIntroductionOverlay .cwWhyRectangle .cwWhyKeyboard [data-scale-state="unused"] .whyWhite { fill: #6a7b8a !important; }
.cwWhyKeyboard [data-scale-state="unused"] text { fill: #132333; }
.cwWhyKeyboard [data-scale-state="accidental"] .whyBlack { fill: #ffd784; stroke: #674a16; }
.cwWhyKeyboard [data-scale-state="accidental"] text { fill: #172230; font-weight: 700; }
.cwWhyScaleReading small strong { color: #a6dfce; }

.cwWhyKeyboard .cwWhyKeyboardInterval { font-size: 11px; }
.cwWhyKeyboard [data-sounding="true"] .cwWhyKeyboardInterval { font-weight: 900; }

/* Narration cue for the Circle of Fifths. Keep the diagram stationary. */
.cwWhyRectangle[data-circle-cue] .cwWhyCirclePanel {
 outline: 2px solid #a9e6cc;
 outline-offset: -2px;
 animation: cwWhyCirclePulse 1.65s ease-in-out infinite;
}
.cwWhyRectangle[data-state="paused"] .cwWhyCirclePanel {
 animation-play-state: paused;
}
@keyframes cwWhyCirclePulse {
 0%, 100% { box-shadow: inset 0 0 0 0 rgba(169, 230, 204, .18); }
 50% { box-shadow: inset 0 0 0 5px rgba(169, 230, 204, .48); }
}
@media (prefers-reduced-motion: reduce) {
 .cwWhyRectangle[data-circle-cue] .cwWhyCirclePanel { animation: none; }
}

/* Rectangle introductions and guides use horizontal header actions. */
html body :is(#cwAcademyIntroductionOverlay,#minorIntroduction) .cwRectangleGuideHeader.cwUnifiedGuideHeader.cwRectangleGuideHeader{
 display:flex!important;align-items:center!important;justify-content:space-between!important;
 gap:clamp(10px,2vw,24px)!important;height:auto!important;min-height:0!important;max-height:none!important;
 box-sizing:border-box!important;padding:12px clamp(10px,2vw,24px)!important
}
html body :is(#cwAcademyIntroductionOverlay,#minorIntroduction) .cwRectangleGuideHeader.cwUnifiedGuideHeader.cwRectangleGuideHeader .cwUnifiedGuideActions{
 display:flex!important;flex-direction:row!important;align-items:center!important;gap:8px!important;
 min-width:0!important;margin:0!important;padding:0!important;border:0!important
}
html body :is(#cwAcademyIntroductionOverlay,#minorIntroduction) .cwRectangleGuideHeader.cwUnifiedGuideHeader.cwRectangleGuideHeader .cwUnifiedGuideActions>button{
 position:static!important;min-width:clamp(110px,15vw,135px)!important;min-height:40px!important;
 padding:7px 12px!important;border:1px solid #3a4655!important;border-radius:7px!important;
 background:#10151d!important;color:#e3eaf4!important;font-size:12px!important;font-weight:650!important;
 margin:0!important;box-shadow:none!important;cursor:pointer!important
}

/* Rectangle introductions share a scene-based playback strip. */
.cwWhyTimeline{flex:1 1 280px;min-width:0;display:grid;grid-template-rows:17px 16px auto;align-items:center;padding:0 11px}
.cwWhyTimeline input[data-why-seek]{appearance:none;width:100%;height:7px;margin:0;background:linear-gradient(to right,#98d9c9 var(--progress,0%),#53687e var(--progress,0%));border-radius:8px;cursor:pointer;accent-color:#b7efe0}
.cwWhyTimeline input[data-why-seek]::-webkit-slider-thumb{appearance:none;width:14px;height:14px;background:#b7efe0;border:1px solid #13283c;border-radius:50%}
.cwWhyTimeline input[data-why-seek]::-moz-range-thumb{width:14px;height:14px;background:#b7efe0;border:1px solid #13283c;border-radius:50%}
.cwWhyTimelineMarkers{position:relative;align-self:stretch;margin:0 7px}
html body .cwWhyRectangle .cwWhyTimelineMarkers button[data-why-seek-to]{
 position:absolute;left:var(--stop);top:50%;transform:translate(-50%,-50%);width:14px!important;height:16px!important;min-width:0!important;min-height:0!important;padding:0!important;
 border:0!important;background:transparent!important;box-shadow:none!important;color:#eaf5ff!important;font-size:11px!important;line-height:1!important;
}
.cwWhyTimelineMarkers button:not([data-why-chapter])::after{content:"";display:block;width:4px;height:7px;margin:auto;background:#a0b5ca;border-radius:2px}
.cwWhyTimelineMarkers button[aria-current]::after,.cwWhyTimelineMarkers button:hover::after{background:#c4f6e8}
html body .cwWhyRectangle .cwWhyTimelineMarkers button[data-why-chapter]{font-weight:800!important;color:#b7efe0!important}
.cwWhyTimelinePosition{font-size:11px;color:#cbdde8;line-height:1.2}
.cwWhyCaptionStack{min-height:2.8em}
.cwWhyStatus:empty{display:none}

/* Tonic companion uses the same scene scrub layout as the introductions. */
.cwTonicTimeline input[data-cw-seek]{appearance:none;width:100%;height:7px;margin:0;background:linear-gradient(to right,#98d9c9 var(--progress,0%),#53687e var(--progress,0%));border-radius:8px;cursor:pointer;accent-color:#b7efe0}
.cwTonicTimeline input[data-cw-seek]::-webkit-slider-thumb{appearance:none;width:14px;height:14px;background:#b7efe0;border:1px solid #13283c;border-radius:50%}
.cwTonicTimeline input[data-cw-seek]::-moz-range-thumb{width:14px;height:14px;background:#b7efe0;border:1px solid #13283c;border-radius:50%}
html body .cwRectTutorial .cwWhyTimelineMarkers button[data-cw-seek-to],
html body #cwAcademyIntroductionOverlay .cwRectTutorial .cwRectTutorialPlayback .cwWhyTimelineMarkers button[data-cw-seek-to]{position:absolute;left:var(--stop);top:50%;transform:translate(-50%,-50%);width:14px!important;height:16px!important;min-width:0!important;min-height:0!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;color:#eaf5ff!important;font-size:11px!important;line-height:1!important}
html body .cwRectTutorial .cwWhyTimelineMarkers button[data-why-chapter]{font-weight:800!important;color:#b7efe0!important}

/* B078IH: full-width tonic captions and visible bottom guide controls. */
html body .cwScaleFirstTutorial .cwRectCaptionPane,
html body .cwScaleFirstTutorial .cwRectCaptionText{
 box-sizing:border-box;width:100%!important;max-width:none!important;min-width:0;
}
html body .cwScaleFirstTutorial .cwRectCaptionText{
 grid-template-columns:minmax(0,1fr);min-height:3em;
}
html body .cwScaleFirstTutorial .cwRectCaptionText>*,
html body .cwScaleFirstTutorial .cwRectCaptionPane p{
 box-sizing:border-box;width:100%!important;max-width:none!important;min-width:0;
 justify-self:stretch;white-space:normal;text-align:left;
}
html body .cwScaleFirstTutorial .cwRectTutorialFooter{
 position:sticky;bottom:0;z-index:4;box-sizing:border-box;width:100%;
 padding:6px 0 3px!important;margin:6px 0 0!important;
 border-top:1px solid #526c80;background:#172737;
}
.cwRectTutorialFooter .cwRectTutorialReturn{line-height:1.4}
@media(min-width:850px) and (max-height:950px){
 html body #cwAcademyIntroductionOverlay .cwScaleFirstTutorial [data-cw-step-instructions]{
  width:100%!important;max-width:none!important;margin:2px 0!important;
 }
 html body #cwAcademyIntroductionOverlay .cwScaleFirstTutorial .cwRectCaptionPane{
  padding:5px 9px!important;margin:4px 0!important;
 }
 html body #cwAcademyIntroductionOverlay .cwScaleFirstTutorial [data-cw-shift-result]{min-height:64px}
}

/* B078KM: overlay cues retain the approved map and keyboard dimensions. */
html body .cwWhyStrip.cwDirectionHost{margin-top:0!important}
.cwWhyNarratedPulse{animation:cwWhyNarrationPulse 900ms ease-in-out 2}
@keyframes cwWhyNarrationPulse{0%,100%{filter:brightness(1)}50%{filter:brightness(1.35);filter:brightness(1.35) drop-shadow(0 0 4px #bce8de)}}
[data-cw-why][data-state="paused"] .cwWhyNarratedPulse{animation-play-state:paused}
@media(prefers-reduced-motion:reduce){.cwWhyNarratedPulse{animation:none;outline:2px solid #bce8de}}

/* B078KN: separate cue lanes; bubble overlays never inherit strip-card geometry. */
html body .cwWhyRectangle[data-why-mode="major"] :is(.cwWhyStrip,.cwSevenAnchors)>.cwDirectionBubble{min-height:0!important;min-width:0!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;border-radius:0!important;outline:0!important}
html body .cwWhyRectangle[data-why-mode="major"] .cwSevenAnchors.cwDirectionHost{margin-top:0!important}
html body .cwWhyRectangle[data-why-mode="major"] .cwSevenAnchors>.cwDirectionBubble{top:calc(100% + 6px)!important}
html body .cwWhyRectangle[data-why-mode="major"]:is([data-stage="2"],[data-stage="3"]) .cwSevenMemory{padding-bottom:30px!important}
/* The rail owns the cue space, independent of higher-specificity heading margins. */
html body .cwWhyRectangle[data-why-mode="major"]:is([data-stage="2"],[data-stage="3"]) .cwWhyRelationshipRail{padding-top:35px;box-sizing:border-box}
html body .cwWhyRectangle .cwSevenOrigin{margin:0 0 5px;text-align:center}

/* B078KT: the same action group and inactive introduction tone across Rectangle guides. */
html body .cwRectangleStandardHeader{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important}
html body .cwRectangleStandardHeader>.cwIntroHeroCopy,html body .cwRectangleStandardHeader>:is(h1,h2){flex:1 1 auto;min-width:0}
html body :is(#cwAcademyIntroductionOverlay,#minorIntroduction,dialog.cwSideGuide) .cwRectangleStandardHeader .cwRectangleHeaderActions{display:flex!important;flex-direction:row!important;align-items:center!important;gap:6px!important;flex:0 0 auto!important}
html body .cwRectangleStandardHeader .cwPresentationActions{margin:0!important;align-self:center}
html body .cwRectangleStandardHeader :is(.cwUnifiedGuideActions,.cwRectangleHeaderActions)>button,html body .cwRectangleStandardHeader .cwPresentationActions>button{min-height:38px!important;padding:7px 12px!important;font:650 12px/1.2 Arial,sans-serif!important;white-space:nowrap;background:#10151d!important;color:#e3eaf4!important;border:1px solid #3a4655!important;border-radius:7px!important;box-sizing:border-box}
html.cwLearningSystem body .cwStageLessonList .cwStageIntroductionLink:not(.active):not([aria-current="page"]):not(:hover):not(:focus-visible){background:transparent!important;color:#7f8a9b!important;border-color:transparent!important;box-shadow:none!important;font-weight:520!important}
html.cwLearningSystem body .cwStageLessonList .cwStageIntroductionLink:not(.active):not([aria-current="page"]):not(:hover):not(:focus-visible)>b{color:inherit!important;font-weight:520!important;text-shadow:none!important}
html.cwLearningSystem body .cwStageLessonList .cwStageIntroductionLink:not(.active):not([aria-current="page"]):not(:hover):not(:focus-visible)>span{color:#60718a!important;border-color:#3a4655!important}
@media(max-width:760px){html body .cwRectangleStandardHeader{flex-wrap:wrap!important}html body .cwRectangleStandardHeader .cwRectangleHeaderActions{flex-wrap:wrap!important}}

/* B078KW: RF.01 applies the introduction's values and scale keyboard. */
.cwTonicKnownValues,.cwTonicScaleRow{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}
.cwTonicKnownValues>div,.cwTonicScaleRow>span{display:grid;text-align:center;padding:7px 3px;border:1px solid #61778c;border-radius:6px;background:#162638}
.cwTonicKnownValues strong{color:#ffe08a}.cwTonicReadSelected{outline:2px solid #b5e0d3;outline-offset:-2px;background:#29484c!important}
.cwTonicReadResult{display:flex;justify-content:space-between;gap:12px;margin:8px 0;padding:9px 12px;background:#243d3c;border:1px solid #b5e0d3;border-radius:7px}
.cwTonicGuideKeyboard{max-width:650px;margin:5px auto}.cwTonicGuideKeyboard svg{display:block;width:100%;height:170px}
.cwTonicGuideKeyboard text{text-anchor:middle;font:14px Arial,sans-serif;fill:#142333}.cwTonicGuideKeyboard .whyWhite{fill:#d6e5ef}.cwTonicGuideKeyboard [data-scale-state="tonic"] .whyWhite{fill:#b4dfd3}.cwTonicGuideKeyboard [data-scale-state="unused"] .whyWhite{fill:#6c7b87}.cwTonicGuideKeyboard .whyBlack{fill:#101b2c}.cwTonicGuideKeyboard [data-scale-state="accidental"] .whyBlack{fill:#ffe08a}
.cwTonicScaleRow small{font-size:11px}.cwTonicScaleRow b{font-size:20px}.cwTonicScaleRow .accidental{border-color:#ffe08a;color:#ffe08a}.cwTonicReadRule{margin:8px 0;font-size:13px}
html body .cwRectTutorial[data-cw-tutorial="2"] .cwNaturalKeyboard{width:min(100%,700px)!important;max-width:700px!important;height:auto!important;aspect-ratio:700/220;margin:0 auto!important}
html body .cwRectTutorial[data-cw-tutorial="2"] .cwNaturalExercise{padding:10px!important}
@media(max-height:800px){.cwTonicGuideKeyboard svg{height:140px}.cwTonicReadResult{padding:6px 9px}.cwTonicKnownValues>div,.cwTonicScaleRow>span{padding:4px 2px}}

/* B078KY: keep value cards within their row and the advisor below their border. */
html body .cwTonicReading .cwTonicKnownValues{height:100%!important;min-height:0!important;margin:0!important;align-items:stretch}
html body .cwTonicReading .cwTonicKnownValues>div{height:100%!important;min-height:0!important;box-sizing:border-box!important;align-content:center;padding:3px!important;line-height:1.1!important}
html body .cwTonicReading .cwTonicReadResult{height:100%!important;min-height:0!important;box-sizing:border-box!important;padding:5px 10px!important;align-items:center;line-height:1.2}
html body .cwRectTutorial:is([data-cw-tutorial="2"],[data-cw-tutorial="4"]) .cwNaturalKeyboard{width:min(100%,700px)!important;max-width:700px!important;height:auto!important;aspect-ratio:700/220;margin:0 auto!important}
html body .cwRectTutorial .cwCompleteKeyboard svg{display:block;max-width:700px!important;width:100%!important;height:auto!important;margin:0 auto!important}
