@import url('notation-font.css');
:root{--ink:#2F323A;--paper:#FBF4E4;--blue:#1C3A5A;--wine:#713D2F;--gold:#D1A866}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--paper);color:var(--ink);font:19px/1.7 Georgia,serif}main{width:min(780px,calc(100% - 36px));margin:40px auto 90px}header{border-bottom:3px solid var(--blue);padding-bottom:26px;margin-bottom:36px}header p{margin:8px 0}h1{font-size:clamp(32px,5vw,49px);line-height:1.13}h2{font-size:29px;line-height:1.3;margin-top:52px}h3{font-size:25px;line-height:1.3;margin:0 0 14px}.sec-num{display:block;font:14px/1.6 system-ui;color:var(--wine)}a{color:var(--blue);text-underline-offset:4px}button,select,input{font:16px system-ui}button,select{min-height:44px;border:1px solid var(--blue);border-radius:5px;padding:9px 14px;background:white;color:var(--blue)}button{cursor:pointer}button.primary,button[aria-pressed=true]{background:var(--blue);color:white}button:disabled{opacity:.45;cursor:default}button:hover:not(:disabled){box-shadow:0 0 0 2px var(--gold)}:focus-visible{outline:3px solid var(--wine);outline-offset:4px}img{max-width:100%;height:auto}.chapter-image{margin:32px 0}.chapter-image img{width:100%}figcaption,.small,.review-note{font:14px/1.5 system-ui}.review-note{background:#fff;border-left:4px solid var(--gold);padding:12px 16px}.box-persona{padding:16px 22px;border-left:4px solid #5F7D6B;background:#fff}.box-label{font:600 14px system-ui}.breath{border:0;border-top:1px solid #b9b5ab;margin:36px 0}.learning{background:#fff;border:1px solid #b4bbc3;border-top:4px solid var(--blue);padding:24px;margin:32px 0;scroll-margin-top:20px}.learning p{margin:12px 0}.learning .intro{font:17px/1.55 system-ui}.controls{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin:14px 0}.controls label{font:16px system-ui;display:flex;gap:8px;align-items:center}.notation{display:block;width:100%;height:auto;color:var(--ink);touch-action:pan-x pan-y}.notation text{font-family:system-ui}.notation .music-glyph{font-family:Bravura}.notation .chosen{fill:var(--blue)}.staff-slider{width:100%;min-height:44px;accent-color:var(--blue)}.note-readout{font:600 19px/1.5 system-ui;min-height:29px}.feedback{font:16px/1.5 system-ui;min-height:48px;padding:12px;background:#f1f3f5;border-left:3px solid var(--blue)}.feedback.correct{border-color:#2F4F43;background:#edf4ef}.two-up{display:grid;grid-template-columns:1fr 1fr;gap:18px}.octave-example{border:1px solid #b4bbc3;padding:12px}.octave-example h4{font:600 17px system-ui;margin:8px 0}.quiz-options{display:flex;flex-wrap:wrap;gap:10px}.quiz-question{padding:20px 0;border-top:1px solid #b4bbc3}.quiz-question h4{font:600 18px/1.5 system-ui;margin:0 0 12px}.practice-box{border-top:4px solid var(--wine);margin-top:40px;padding-top:22px}ct-keyboard{display:block;margin-top:18px;max-width:100%}nav{font:16px/1.5 system-ui;display:flex;gap:18px;flex-wrap:wrap}.sound-status{font:14px system-ui;min-height:20px}.playing{outline:3px solid var(--gold)}@media(max-width:560px){body{font-size:18px}.learning{padding:16px}.two-up{grid-template-columns:1fr}main{width:calc(100% - 24px)}.controls button{flex-grow:1}h2{font-size:26px}.notation{min-width:0}}@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

.staff-display .notation{max-width:600px;margin-inline:auto}

.section-heading{scroll-margin-top:20px}button.chosen-wrong{background:white;color:var(--wine);border:2px dashed var(--wine)}button.chosen-right{background:#2F4F43;border-color:#2F4F43;color:white}

.tone-grid,.name-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.tone-card,.name-card{min-width:0;border:1px solid #bac3cd;background:#fafbf9;padding:12px;display:flex;flex-direction:column}.tone-card h4,.name-card h4{font:700 19px/1.4 system-ui;margin:0}.tone-card .small,.name-card .small{min-height:42px}.tone-card button,.name-card button{margin-top:auto;width:100%}.wave-display svg{width:100%;display:block;height:auto}.wave-display text{font:20px system-ui;fill:var(--ink)}.wave-explanation{font:16px/1.6 system-ui}.tone-card:has(.playing){box-shadow:0 0 0 3px var(--gold)}.name-sequence{font:600 17px/1.7 system-ui;padding:10px;background:#edf2f5;overflow-wrap:anywhere}.learning details{font:16px/1.6 system-ui;border-top:1px solid #bac3cd;padding-top:12px}.learning summary{cursor:pointer;font-weight:600;min-height:44px}.name-card .notation{margin-block:8px}#note-names h4{font-family:system-ui}#hear-timbre .controls label{flex-wrap:wrap}#wave-axis{max-width:100%}
@media(max-width:650px){.tone-grid,.name-grid{grid-template-columns:1fr}.tone-card .small,.name-card .small{min-height:0}.name-card .notation{max-width:260px;margin-inline:auto}.wave-display{max-width:420px;width:100%;margin-inline:auto}}

/* Revision 7: show more, say less. Explanations sit in the chapter prose. */
.register-keyboard svg{display:block;width:100%;margin:14px 0 8px}.register-choices{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:5px}.register-choices button{padding:9px 2px;font-weight:650}.register-readout{text-align:center;font:600 18px/1.45 system-ui}.register-notation{display:flex;justify-content:center;gap:12px}.register-staff{min-width:0;max-width:360px;width:100%;border:1px solid #b4bbc3;padding:12px;background:#fafbf9}.register-staff h4{margin:0;font:600 16px system-ui}.register-staff button{width:100%}.register-staff .notation{margin-block:0}.middle-c-pair .register-staff{width:50%}.boundary-keys{display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:28px 92px;position:relative;width:min(290px,100%);margin:16px auto 0;gap:0}.octave-band{font:600 13px/28px system-ui;text-align:center}.band-three{grid-column:1;background:#dbe6ee}.band-four{grid-column:2/4;background:#efe0b9}.boundary-keys button{border-radius:0;align-items:flex-end;justify-content:center;display:flex;gap:1px;padding-bottom:10px;color:var(--ink);border-color:#687481;box-shadow:none}.boundary-keys button.boundary-selected{background:#efe0b9}.boundary-black{position:absolute;top:28px;left:calc(66.667% - 13px);width:26px;height:48px;background:#26323e;border-radius:0 0 3px 3px;pointer-events:auto}.boundary-keys strong{color:var(--wine)}.proposed-prose{scroll-margin-top:20px}.learning .sound-status:empty{min-height:0;margin:0}.tone-card .small{min-height:0}.tone-card .wave-display{margin-top:8px}#note-names>h4{font-size:18px;margin-bottom:8px}
@media(max-width:480px){.register-choices{grid-template-columns:repeat(4,minmax(0,1fr))}.register-staff{padding:7px}.register-notation{gap:8px}.register-staff h4{font-size:14px}.register-staff button{font-size:14px;padding:8px 2px}.register-readout{font-size:16px}}

/* Optional, recognizable detours: the chapter keeps flowing past a closed pedestal. */
.pedantry{margin:28px 0 34px;border:1px solid #c8b795;border-left:5px solid var(--wine);background:#f7efe0;scroll-margin-top:20px;border-radius:0 7px 7px 0}.pedantry summary{display:grid;grid-template-columns:30px minmax(0,1fr) 18px;align-items:center;gap:12px;list-style:none;cursor:pointer;padding:16px 18px;min-height:64px}.pedantry summary::-webkit-details-marker{display:none}.pedantry summary:hover{background:#efe3ca}.pedantry-label{display:block;font:650 13px/1.5 system-ui;color:var(--wine);margin-bottom:3px}.pedantry-title{display:block;font:600 20px/1.35 Georgia,serif}.pedantry-icon{font:26px/1 Georgia,serif;color:var(--wine)}.pedantry-chevron{font:30px/1 system-ui;color:var(--wine);transform-origin:center}.pedantry[open] .pedantry-chevron{transform:rotate(90deg)}.pedantry[open] summary{border-bottom:1px solid #d4c4a7}.pedantry-body{padding:4px 22px 12px;font-size:17px;line-height:1.65}.pedantry-body p{margin:14px 0}.pedantry-body p:last-child{margin-bottom:6px}@media(max-width:480px){.pedantry summary{padding:13px 12px;gap:9px;grid-template-columns:24px minmax(0,1fr) 16px}.pedantry-title{font-size:18px}.pedantry-body{padding:3px 16px 12px}}

/* Keep each staff, its controls and its keyboard in one screen-sized unit. */
#staff-explorer,#note-drill,#accidentals{padding:18px;margin-block:24px}#staff-explorer h3,#note-drill h3,#accidentals h3{margin-bottom:8px}#staff-explorer .intro,#note-drill .intro,#accidentals .intro{margin:6px 0 10px}.task:empty{display:none}.staff-workbench{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;gap:20px;margin:10px 0}.staff-workbench .staff-display .notation{width:100%;max-width:360px;margin:0 auto}.staff-controls{min-width:0}.staff-controls .note-readout{font-size:17px;line-height:1.4;margin:0 0 8px}.staff-controls label{display:block}.staff-controls .controls{gap:6px;margin:7px 0}.step-controls,.playback-controls,.accidental-choices{display:flex;flex-wrap:nowrap}.step-controls button,.playback-controls button,.accidental-choices button{flex:1;white-space:nowrap;padding:8px 9px}.staff-workbench .sound-status:empty{display:none}#staff-explorer ct-keyboard,#accidentals ct-keyboard{margin-top:10px}#staff-explorer>.small,#accidentals>.small{margin:8px 0 0}#staff-explorer>a{display:inline-block;margin-top:8px}.staff-controls .staff-slider{display:block}.accidental-choices button{font-size:17px}
@media(max-width:620px){.staff-workbench{grid-template-columns:1fr;gap:8px;margin:6px 0}.staff-workbench .staff-display .notation{max-width:300px}.staff-controls .note-readout{margin-bottom:4px}.staff-controls .controls{margin:5px 0}#staff-explorer,#note-drill,#accidentals{padding:14px}.staff-controls .playback-controls button{padding-inline:8px}}

.practice-links{padding-left:24px}.practice-links li{margin:10px 0}.practice-page header{margin-bottom:20px;padding-bottom:16px}.practice-page h1{font-size:clamp(30px,4vw,40px);margin:18px 0 0}.practice-page .learning{margin-top:16px}.practice-page #quiz>h2{margin-top:0}.practice-page footer{margin-top:24px;font:16px/1.5 system-ui}
/* Retain the approved compact practice header when the site assembler adds its banner. */
.practice-page>.ct-site-masthead{display:none}
