.theory-page { max-width: 76rem; min-width: 0; }
.theory-intro { margin: 1.25rem 0 1.6rem; }
.theory-intro h1 { margin: 0 0 .45rem; }
.theory-intro p { color: var(--editorial-muted); font-size: clamp(1.05rem, 2vw, 1.25rem); margin: 0; }
.theory-page h2 { margin: 0 0 .6rem; font-size: clamp(1.35rem, 2.7vw, 1.85rem); line-height: 1.15; }
.theory-page h3 { margin: 0 0 .35rem; font-size: 1.15rem; }
.theory-page p { max-width: 73ch; }
.theory-page a { text-underline-offset: .2em; }
.theory-page :focus-visible { outline: 3px solid #36b9d0; outline-offset: 3px; }
.theory-page input, .theory-page button, .theory-page select { font: inherit; }
.theory-page button, .theory-page select {
    min-height: 44px; min-width: 44px; border-radius: 3px; border: 1px solid #a5b8b7;
    background: #14272b; color: #f5f4ed; padding: .4rem .75rem;
}
.theory-page button, .theory-page summary, .theory-page select { cursor: pointer; }
.theory-page :is(button, select):enabled:hover { border-color: #36b9d0; }
.theory-page button:is(:disabled,[aria-disabled="true"]) { opacity: .64; cursor: default; }
.theory-page button[aria-pressed="true"], .theory-page button.primary { color: #14272b; background: #aadae3; border-color: #aadae3; }
.theory-page label { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; }
.theory-page input[type="checkbox"], .theory-page input[type="radio"] { width: 1.2rem; height: 1.2rem; accent-color: #36b9d0; flex-shrink: 0; }
.theory-page fieldset { border: 0; padding: 0; margin: .65rem 0; min-width: 0; }
.theory-page legend { font-weight: 700; padding: 0; }
.theory-section { margin-block: 1.7rem; }
.theory-reading { display: grid; grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); gap: clamp(1.1rem, 4vw, 3rem); align-items: start; }
.theory-reading p { margin: .55rem 0 .9rem; }
.theory-activity { background: #1b3136; border: 1px solid #829b9a; border-radius: 4px; padding: clamp(.75rem, 2.1vw, 1.35rem); min-width: 0; }
.theory-activity + .theory-activity { margin-top: 1rem; }
.theory-row { display: flex; flex-wrap: wrap; gap: .45rem .65rem; align-items: center; margin-block: .55rem; }
.theory-row p { margin: 0; }
.theory-page output { display: block; }
.theory-feedback:not(:empty) { border-inline-start: 3px solid #a5b8b7; padding: .25rem .7rem; margin: .6rem 0; }
.theory-feedback[data-result="correct"] { border-color: #36b9d0; background: #e4f4f5; color: #14272b; font-weight: 700; }
.theory-feedback[data-result="retry"] { border-color: #e7c694; }
.theory-status { min-height: 1.55em; margin: .35rem 0 0; color: #cbdad8; }
.theory-score {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
    gap: .25rem; overflow-x: auto; color: #14272b; background: #f5f4ed;
    border: 1px solid #829b9a; border-radius: 3px; padding: .25rem .45rem; margin: .7rem 0;
}
.theory-score.compact { grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); max-width: 25rem; }
.theory-score figure { margin: 0; min-width: 0; }
.theory-score figcaption { padding: .2rem .4rem 0; }
.theory-score.is-large { grid-template-columns: 1fr; max-width: none; }
.theory-staff { display: block; width: 100%; height: auto; overflow: clip; }
.theory-score.is-large .theory-staff { max-width: 54rem; margin-inline: auto; }
.theory-score.is-large.compact .theory-staff { max-width: 25rem; }
.theory-reading:has(.theory-enlarged) { grid-template-columns: minmax(0, 1fr); }
.theory-enlarged .theory-score { grid-template-columns: 1fr; }
.theory-enlarged .theory-staff { max-width: 58rem; margin-inline: auto; }
.theory-enlarged :is(button, label, select) { font-size: 1.12rem; }
.theory-note-label { font: 12px Arial,sans-serif; fill: #14272b; }
.theory-marker { visibility: hidden; fill: #14272b; }
[data-active] > .theory-marker { visibility: visible; }
[data-active] > .theory-head, [data-active] > .theory-rest { fill: #10616d; }
.theory-place .theory-staff { cursor: crosshair; touch-action: manipulation; }
.theory-keyboards { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.theory-keyboards > div { flex: 1 1 15rem; min-width: 0; }
.theory-keyboards p { margin: .25rem 0; }
.theory-key-scroll { overflow-x: auto; padding: .25rem .3rem .45rem; }
.theory-key-scroll .blues-keyboard { min-width: calc(var(--white-count) * 44px); }
.theory-key-scroll .blues-keyboard button { border-radius: 0 0 3px 3px; min-width: 0; padding: 0 1px .25rem; }
.theory-key-scroll .blues-keyboard .is-white { background: #f5f4ed; color: #14272b; border-color: #14272b; }
.theory-key-scroll .blues-keyboard .is-black { background: #14272b; color: #f5f4ed; border-color: #a5b8b7; }
.theory-key-scroll .blues-keyboard .is-held { outline: 3px solid #10616d; outline-offset: -4px; box-shadow: inset 0 -8px #36b9d0; }
.theory-key-scroll .blues-keyboard button:focus-visible { outline: 3px solid #10616d; outline-offset: -4px; z-index: 3; }
.theory-key-scroll .blues-keyboard .is-black:focus-visible { outline-color: #aadae3; }
.theory-key-list { margin-top: .8rem; }
.theory-key-list summary, .theory-notes summary { display: list-item; align-content: center; min-height: 44px; font-weight: 700; }
.theory-values { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 7.4rem), 1fr)); gap: .5rem; }
.theory-values button { display: grid; justify-items: center; padding: .3rem; }
.theory-values .palette-symbol { width: 1.75rem; height: 2.3rem; }
.theory-links { display: flex; flex-wrap: wrap; gap: .15rem 1.2rem; margin: .3rem 0; padding: 0; list-style: none; }
.theory-links a { display: inline-grid; align-items: center; min-height: 44px; }
.theory-collections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem 1.5rem; }
.theory-page .theory-collection { border: 1px solid #829b9a; background: #1b3136; color: #f5f4ed; border-radius: 4px; padding: .95rem; }
.theory-collection p { color: #cbdad8; margin: .2rem 0 .65rem; }
.theory-collection ul { margin: .3rem 0; padding-left: 1.1rem; }
.theory-collection li a { display: inline-grid; align-items: center; min-height: 44px; }
.theory-start { border-inline-start: 3px solid #36b9d0; padding-inline-start: 1rem; margin-block: 1.2rem 1.7rem; }
.theory-start .theory-score { max-width: 31rem; }
.theory-notes { border-block: 1px solid #829b9a; padding-block: .2rem; }
.theory-notes dl { margin-top: .25rem; }
.theory-notes dt { font-weight: 700; }
.theory-notes dd { margin: .1rem 0 .7rem; }
.theory-rhythm-options { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,15rem),1fr)); gap: .6rem; }
.theory-rhythm-choice { border: 1px solid #829b9a; padding: .5rem; border-radius: 3px; min-width: 0; }
.theory-rhythm-choice .theory-score { margin-top: .25rem; }
.theory-pulse { display: flex; flex-wrap: wrap; gap: .35rem; padding: 0; margin: .55rem 0; list-style: none; }
.theory-pulse li { min-width: 2rem; text-align: center; border: 1px solid #829b9a; padding: .3rem; }
.theory-pulse [data-active] { background: #aadae3; color: #14272b; text-decoration: underline; font-weight: 700; }
.theory-bar-items { display: flex; flex-wrap: wrap; padding: 0; margin: .5rem 0; list-style: none; gap: .4rem; }
.theory-bar-items li { min-width: 0; }
.theory-compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: .6rem; }
.theory-compare figure { margin: 0; min-width: 0; }
.theory-compare figcaption { font-size: .92rem; margin: .25rem 0; }
.theory-count-readout { min-width: 8rem; }
.theory-fixture { margin-block: 1.1rem; }
.theory-fixture p { margin: .35rem 0; }
@media (max-width: 900px) {
    .theory-reading { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 585px) {
    .theory-collections { grid-template-columns: 1fr; }
    .theory-section { margin-block: 1.35rem; }
}
@media (prefers-reduced-motion: reduce) {
    .theory-page *, .theory-page *::before, .theory-page *::after {
        animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important;
    }
}
@media print {
    body, .theory-page { background: #fff; color: #14272b; }
    .siteNav, .skip, .explore-crumbs, .theory-page footer, .theory-reading > div:first-child,
    .theory-print-hide, .theory-page :is(button, select), .theory-reading label { display: none !important; }
    .theory-reading { display: block; }
    .theory-activity { border: 0; background: #fff; padding: 0; }
    .theory-score { break-inside: avoid; }
}

/* R01B learning layouts. The shared editorial header supplies the wordmark and menu. */
.theory-page { max-width: 82rem; }
.theory-intro { margin: 1.15rem 0 1.35rem; }
.theory-intro h1 { font-size: clamp(2rem, 3.6vw, 2.75rem); }
.theory-page :is(section,[id="piece-steps"]) { scroll-margin-top: 1.1rem; }
.theory-entry {
    display:grid; grid-template-columns:minmax(0,.88fr) minmax(0,1.12fr); gap:1.5rem;
    align-items:center; padding:clamp(1rem,3vw,2rem); border:1px solid #51777d;
    border-left:5px solid var(--sm-turquoise); background:var(--sm-panel); border-radius:5px;
}
.theory-entry h2 { font-size:clamp(1.6rem,3vw,2.3rem); }
.theory-entry a {
    display:inline-flex; align-items:center; min-height:44px; padding:.45rem .85rem;
    background:var(--sm-turquoise-light); color:var(--sm-petrol); border-radius:4px; font-weight:700;
}
.theory-entry p { max-width:36ch; }
.theory-quick { margin:1.45rem 0 1.8rem; }
.theory-quick h2 { font-size:1.25rem; }
.theory-quick ul,.theory-stage-nav ul { display:flex; flex-wrap:wrap; gap:.45rem; list-style:none; padding:0; margin:0; }
.theory-quick li { flex:1 1 10rem; min-width:0; }
.theory-quick a,.theory-stage-nav a {
    display:flex; align-items:center; justify-content:space-between; gap:.65rem; min-height:44px;
    padding:.55rem .75rem; border:1px solid #829b9a; border-radius:4px; color:var(--sm-ivory);
}
.theory-quick a span { color:var(--sm-turquoise-light); }
.theory-quick a:hover,.theory-stage-nav a:hover { background:var(--sm-panel); border-color:var(--sm-turquoise); }
.theory-collections { grid-template-columns:repeat(4,minmax(0,1fr)); gap:1rem; }
.theory-page .theory-collection {
    --collection-accent:var(--sm-turquoise);
    border:1px solid #829b9a; border-top:5px solid var(--collection-accent);
    background:#1b3136; padding:0; overflow:hidden;
}
.theory-collection:nth-child(-n+2) { grid-column:span 2; }
.theory-page .theory-collection[data-tone="blue"] { --collection-accent:var(--sm-blue); }
.theory-page .theory-collection[data-tone="violet"] { --collection-accent:var(--sm-violet); }
.theory-page .theory-collection[data-tone="teal"] { --collection-accent:var(--sm-teal); }
.theory-card-art {
    background:var(--sm-ivory); color:var(--sm-petrol); margin:0; padding:.45rem .75rem .6rem; min-width:0;
}
.theory-card-art .theory-staff { max-height:9.2rem; margin-inline:auto; }
.theory-card-art figcaption { margin:.15rem auto 0; max-width:60ch; font-size:.91rem; }
.theory-entry .theory-card-art { border-radius:4px; }
.theory-card-copy { padding:.95rem 1rem 1rem; }
.theory-card-copy h3 { font-size:1.25rem; }
.theory-collection:nth-child(-n+2) ul {
    display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,11rem),1fr)); gap:0 .6rem;
}
.theory-chord-keys {
    display:grid; grid-template-columns:repeat(5,1fr); position:relative; max-width:16rem;
    margin:.65rem auto .5rem; min-height:5.2rem;
}
.theory-chord-keys span {
    display:grid; align-items:end; text-align:center; border:1px solid var(--sm-petrol);
    border-right:0; padding-bottom:.35rem; background:#fffef8; font-weight:700;
}
.theory-chord-keys span:last-of-type { border-right:1px solid var(--sm-petrol); }
.theory-chord-keys .marked { box-shadow:inset 0 -5px #10616d; background:#d8eef1; }
.theory-chord-keys i { position:absolute; width:11%; height:55%; background:var(--sm-petrol); border-radius:0 0 3px 3px; }
.theory-chord-keys i:nth-of-type(1) { left:14.5%; }
.theory-chord-keys i:nth-of-type(2) { left:34.5%; }
.theory-chord-keys i:nth-of-type(3) { left:74.5%; }
.theory-stage-nav { margin-bottom:1rem; }
.theory-stage-nav a { color:var(--sm-turquoise-light); min-width:6rem; justify-content:center; }
.theory-lesson-learn {
    display:grid; grid-template-columns:7rem minmax(0,1fr); gap:0 1rem; margin-bottom:1.05rem;
    border-block:1px solid #51777d; padding:.85rem 0;
}
.theory-lesson-learn h2 { margin:.05rem 0; font-size:1.25rem; }
.theory-lesson-learn > div { display:flex; flex-wrap:wrap; gap:.6rem 1.4rem; }
.theory-lesson-learn p { flex:1 1 15rem; margin:0; color:#dbe7e5; }
.theory-lesson-pair { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); align-items:start; gap:1rem; }
.theory-value-pair { grid-template-columns:minmax(0,1.25fr) minmax(0,.75fr); }
.theory-lesson-pair .theory-activity { margin:0; }
.theory-demo { border-top:4px solid var(--sm-instruct); }
.theory-practice { border-top:4px solid var(--sm-practise); }
.theory-partner { border-left:4px solid var(--sm-secure); padding:.2rem 0 .2rem 1rem; }
.theory-activity > p { margin:.5rem 0; }
.theory-lesson-pair .theory-score.compact { max-width:20rem; }
.theory-lesson-pair .theory-score.is-large { max-width:none; }
.theory-study-score { grid-template-columns:minmax(0,1fr); }
.theory-study-score.theory-middle-pair { grid-template-columns:repeat(2,minmax(0,1fr)); }
.theory-study-score figcaption { font-size:.8rem; }
.theory-study-guide { fill:none; stroke:#328e99; stroke-width:4; opacity:.55; }
.theory-study-number { fill:#14272b; font:700 10px Arial,sans-serif; }
.theory-practice-choices { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.4rem; }
.theory-practice-choices button { text-align:left; padding:.45rem; }
.theory-practice-choices span { display:block; font-size:.8rem; }
.theory-systems { grid-template-columns:minmax(0,1fr); }
.theory-system { width:100%; max-height:19rem; }
.theory-enlarged .theory-system { max-width:none; max-height:24rem; }
.theory-piece-focus { font-weight:700; color:var(--sm-turquoise-light); }
.theory-activity label:has(select) { min-width:0; max-width:100%; }
.theory-activity select { max-width:100%; }
.theory-divisions { margin:1rem 0 .55rem; max-width:52rem; }
.theory-division-ruler,.theory-divisions button {
    width:100%; display:grid; grid-template-columns:minmax(7.8rem,32%) minmax(0,1fr); align-items:center; gap:.5rem;
}
.theory-divisions button { padding:.2rem .45rem; margin:.26rem 0; text-align:left; }
.theory-division-name { display:flex; gap:.3rem; align-items:center; }
.theory-division-name svg { flex:0 0 1.65rem; height:2rem; }
.theory-division-ruler { padding:0 .45rem; font-size:.81rem; }
.theory-division-ruler > div { display:grid; grid-template-columns:repeat(4,1fr); text-align:center; }
.theory-division-track {
    display:grid; grid-template-columns:repeat(var(--parts),minmax(0,1fr)); gap:2px; height:1.1rem;
}
.theory-division-track i { background:#637c82; border:1px solid #cbdad8; border-radius:2px; }
.theory-divisions [aria-pressed="true"] .theory-division-track i { background:#215963; border-color:#14272b; }
.theory-lesson-flow > .theory-demo > .theory-score:not(.theory-systems,.is-large) { max-width:52rem; }
.theory-builder-layout { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr); gap:1.15rem; }
.theory-builder-palette { padding:.6rem .75rem; background:var(--sm-panel); border:1px solid #829b9a; border-radius:4px; }
.theory-builder-palette .theory-values { grid-template-columns:repeat(5,minmax(0,1fr)); gap:.3rem; }
.theory-builder-palette .theory-values button { word-break:normal; overflow-wrap:anywhere; font-size:.84rem; min-width:0; }
.theory-builder-palette fieldset { margin:.3rem 0 .6rem; }
.theory-capacity { display:grid; grid-auto-flow:column; grid-auto-columns:1fr; }
.theory-capacity li { display:grid; gap:.3rem; padding:.35rem .2rem; }
.theory-capacity-units { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:2px; }
.theory-capacity-units i { min-height:.65rem; border:1px dashed #a5b8b7; border-radius:1px; }
.theory-capacity-units .filled { background:#aadae3; border-style:solid; }
.theory-capacity [data-active] .theory-capacity-units .filled { background:#215963; border-color:#215963; }
[data-selected] > .theory-marker { visibility:visible; fill:#205d8c; }
@media (max-width:940px) {
    .theory-lesson-pair,.theory-builder-layout { grid-template-columns:minmax(0,1fr); }
    .theory-collections { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .theory-collection:nth-child(-n+2) { grid-column:auto; }
}
@media (max-width:590px) {
    .theory-entry,.theory-collections,.theory-lesson-learn { grid-template-columns:1fr; }
    .theory-lesson-learn h2 { margin-bottom:.45rem; }
    .theory-lesson-learn > div { display:block; }
    .theory-lesson-learn p + p { margin-top:.65rem; }
    .theory-quick li { flex-basis:46%; }
    .theory-stage-nav a { min-width:44px; padding-inline:.6rem; }
    .theory-practice-choices { grid-template-columns:1fr; }
    .theory-practice-choices button { display:flex; align-items:center; flex-wrap:wrap; gap:.35rem .6rem; }
    .theory-activity label:has([data-field="piece"]) { display:grid; flex:1 1 100%; }
    .theory-builder-palette .theory-values { grid-template-columns:repeat(auto-fit,minmax(5rem,1fr)); }
}
@media print {
    .theory-stage-nav,.theory-lesson-learn,.theory-entry,.theory-quick,.theory-collections { display:none; }
}

.theory-page [hidden] { display:none !important; }
.theory-page section[id] { scroll-margin-top: 5rem; }
.theory-score:empty { display:none; }
.theory-tie,.theory-slur { fill:none; stroke:currentColor; stroke-width:1.6; }
.theory-final-rule { stroke:currentColor; stroke-width:4; }
.theory-direction { fill:currentColor; font:700 11px Arial,sans-serif; }
.theory-triplet { font-weight:700; text-anchor:middle; }
.theory-fluency-score { max-width:52rem; }
.theory-fluency-score.is-large { max-width:none; }
.theory-quick ul { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); }
.theory-levels ul { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,14rem),1fr)); gap:.65rem; list-style:none; padding:0; }
.theory-levels li { border:1px solid #829b9a; border-top:3px solid var(--sm-turquoise); border-radius:4px; padding:.8rem; }
.theory-levels li p { margin:.3rem 0; }
.theory-levels a { min-height:44px; display:inline-flex; align-items:center; }
.theory-glock-bars button { min-height:4rem; border:2px solid #829b9a; background:#e4ecea; color:#14272b; }
.theory-glock-bars button[aria-pressed="true"] { outline:3px solid #10616d; outline-offset:-5px; }
.theory-instrument-photo summary { min-height:44px; cursor:pointer; align-content:center; }
.theory-instrument-photo figure { margin:.25rem 0 .9rem; max-width:29rem; }
.theory-instrument-photo img { display:block; width:100%; height:auto; border-radius:3px; }
.theory-instrument-photo figcaption { margin-top:.4rem; }
.theory-print-sheet { display:none; }
@media (max-width:480px) {
    .theory-activity .theory-row label:has(select) { flex-wrap:wrap; }
}
@media (max-width:700px) {
    .theory-quick ul { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media print {
    @page { size:A4 portrait; margin:16mm; }
    .theory-page:has(.theory-printable) { padding:0; margin:0; max-width:none; }
    .theory-page:has(.theory-printable) :is(.theory-intro,.theory-section,.theory-notes) { display:none; }
    .theory-printable > :not(.theory-print-sheet) { display:none !important; }
    .theory-printable { border:0; }
    .theory-print-sheet { display:block; color:#14272b; }
    .theory-print-sheet h1 { font-size:22pt; margin:0 0 4mm; }
    .theory-print-sheet svg { width:100%; break-inside:avoid; margin-bottom:3mm; }
    .theory-print-sheet .theory-marker { visibility:hidden; }
}
