
/* Lesson 17: hands-on bit-depth exercises, pedagogical 3/5-bit and real 8/16/24-bit examples */
.bd-foundation{display:grid;grid-template-columns:minmax(0,1.06fr) minmax(0,1fr);gap:clamp(1.1rem,3vw,2rem);align-items:start}
.bd-foundation-copy p{line-height:1.76;margin:0 0 1rem;color:#cee1ef}
.bd-foundation-visual{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}
.bd-level-example{background:#10273a;border:1px solid #476880;border-radius:12px;padding:1.05rem}
.bd-level-example p{font-size:.95rem;font-weight:750;color:#e9f8ff;margin:0 0 .8rem}
.bd-level-example span{display:block;font-size:.84rem;line-height:1.66;color:#bad6e6;margin-top:.85rem}
.bd-ladder{height:185px;border-radius:8px;background:linear-gradient(90deg,#0d2235,#1c394d);border:1px solid #52748c;display:flex;flex-direction:column;justify-content:space-between;padding:.6rem}
.bd-ladder i{display:block;border-top:2px solid #87d2e8;width:100%}.bd-ladder--many i{border-top-width:1px;opacity:.65}
.bd-demo{border:1px solid #527b92;border-radius:14px;background:#102438;padding:clamp(1rem,2.3vw,1.65rem);box-shadow:0 16px 40px #040f1c33}
.bd-demo-toolbar{display:flex;justify-content:space-between;align-items:center;gap:1rem;flex-wrap:wrap;margin-bottom:1.1rem}
.bd-control-heading{font-size:.93rem;font-weight:750;color:#e6f7ff}
.bd-choice{display:flex;gap:.45rem;flex-wrap:wrap}
.bd-choice button,.bd-presets button{appearance:none;border:1px solid #4d7085;background:#0d2537;color:#d5ecf9;border-radius:8px;padding:.62rem .82rem;cursor:pointer;font:inherit;font-size:.92rem;font-weight:700}
.bd-choice button small{display:block;font-size:.72rem;opacity:.8;margin-top:.12rem;font-weight:500}
.bd-choice button[aria-pressed="true"],.bd-presets button[aria-pressed="true"]{background:#20516a;border-color:#8bd6ed;color:#fff;box-shadow:0 0 0 1px #74cbe44f}
.bd-choice button:focus-visible,.bd-presets button:focus-visible,.bd-loudness-control input:focus-visible{outline:3px solid #ffce92;outline-offset:3px}
.bd-stage{display:block;width:100%;height:auto;max-height:400px;overflow:visible}
.bd-svg-bg{fill:#0b1b2b;stroke:#385874}
.bd-svg-grid{stroke:#34526b;stroke-width:1;opacity:.54}
.bd-svg-axis{stroke:#7c98ab;stroke-width:1.5}
.bd-svg-label{fill:#b9d6e7;font-size:12px;font-family:system-ui,sans-serif}
.bd-svg-reference{stroke:#f3c28e;stroke-width:2.7;fill:none;stroke-linecap:round;stroke-linejoin:round}
.bd-svg-gap{stroke:#a6d8dc;stroke-width:1.5;opacity:.64}
.bd-svg-saved{fill:#81d6ee;stroke:#0b1b2b;stroke-width:1.25}
.bd-svg-actual{fill:none;stroke:#f3c28e;stroke-width:1.4;opacity:.9}
.bd-demo-visual{min-width:0}
.bd-legend{display:flex;gap:.75rem 1.2rem;flex-wrap:wrap;margin:.5rem 0 0;color:#c6e0eb;font-size:.81rem}
.bd-legend span{display:flex;align-items:center;gap:.4rem}
.bd-key{width:16px;height:4px;display:inline-block;border-radius:6px;background:#a8d8e2}
.bd-key--original{background:#f3c28e}.bd-key--stored{background:#81d6ee}.bd-key--gap{background:#b6c1d3}
.bd-demo-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.7rem;margin:1rem 0}
.bd-demo-stats>div{border:1px solid #37566a;background:#152f42;border-radius:9px;padding:.88rem 1rem;display:flex;flex-direction:column;gap:.35rem}
.bd-demo-stats span{font-size:.8rem;color:#b8d8e7}.bd-demo-stats strong{font-variant-numeric:tabular-nums;font-size:clamp(1.1rem,2.3vw,1.46rem);color:#f4fdff}
.bd-demo-explanation{padding:.85rem 1rem;border-left:3px solid #84cfd6;background:#163b47;color:#e2f5f6;font-size:.94rem;font-weight:600;line-height:1.7;margin:.65rem 0}
.bd-model-note{font-size:.86rem;color:#b9d0de;line-height:1.72;margin:1rem 0 0}
.bd-model-note strong{color:#e1f3ff}
.bd-loudness-control{padding:1rem;border-radius:10px;background:#143349;border:1px solid #3c6d83;margin-bottom:1rem}
.bd-loudness-control label{display:flex;justify-content:space-between;flex-wrap:wrap;gap:.5rem;font-weight:750;color:#e8f7ff}
.bd-loudness-control input{display:block;width:100%;margin:1rem 0 .2rem;accent-color:#8ad9ea;cursor:pointer}
.bd-slider-scale{display:flex;justify-content:space-between;gap:.5rem;color:#b2cfdd;font-size:.77rem}
.bd-loudness-control p{font-size:.79rem;color:#b5d0e1;margin:.6rem 0;line-height:1.6}
.bd-presets{display:flex;gap:.55rem;flex-wrap:wrap;margin-top:.85rem}
.bd-presets button{font-size:.78rem;padding:.45rem .65rem}
.bd-master-contrast{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;margin:1.2rem 0}
.bd-master-contrast>div{border-radius:12px;border:1px solid #45677b;background:#102638;padding:1rem;min-width:0}
.bd-master-contrast h3{font-size:1rem;color:#e5f9ff;margin:0 0 .75rem}
.bd-master-contrast svg{width:100%;display:block;height:auto}
.bd-master-contrast p{color:#c0d8e6;font-size:.88rem;line-height:1.6;margin:.75rem 0 0}
.bd-two-up{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem;margin:1.3rem 0}
.bd-two-up>div{border:1px solid #3e6176;border-radius:10px;background:#10293b;padding:1rem}
.bd-two-up h3{margin:0 0 .4rem;color:#effcff;font-size:1rem}
.bd-two-up p{margin:0;color:#c4dfeb;line-height:1.7;font-size:.92rem}
@media(max-width:800px){.bd-foundation{grid-template-columns:1fr}.bd-ladder{height:120px}}
@media(max-width:650px){.bd-master-contrast,.bd-two-up,.bd-demo-stats{grid-template-columns:1fr}.bd-demo-toolbar{display:block}.bd-choice{margin-top:.65rem}.bd-foundation-visual{gap:.6rem}.bd-level-example{padding:.72rem}.bd-legend{font-size:.73rem}.bd-demo{padding:.78rem}.bd-stage{min-height:185px}}
@media(prefers-reduced-motion:reduce){.bd-choice button,.bd-presets button{transition:none}}


/* Music-like sample-resolution comparison: identical mastering at 8/16/24 bit. */
.bd-song-example{margin:1.25rem 0 1.05rem;border:1px solid #456a80;background:#0c2638;border-radius:12px;overflow:hidden}
.bd-song-heading{padding:1rem 1.15rem .55rem}
.bd-song-heading h3{color:#edfbff;margin:0 0 .4rem;font-size:1.03rem}
.bd-song-heading p{margin:0;color:#cde4ee;line-height:1.7}
.bd-editor-time{display:flex;justify-content:space-between;margin:.6rem 1rem .25rem 9.35rem;color:#adc8d5;font-size:.72rem;letter-spacing:.015em}
.bd-editor-row{--wave-color:#8fd2e9;display:grid;grid-template-columns:8.2rem minmax(0,1fr);align-items:center;gap:.65rem;border-top:1px solid #31526a;padding:.5rem .9rem}
.bd-editor-row[data-music-bit-depth="8"]{--wave-color:#eac18d}
.bd-editor-row[data-music-bit-depth="16"]{--wave-color:#88d1e9}
.bd-editor-row[data-music-bit-depth="24"]{--wave-color:#a6dfa6}
.bd-editor-label h3{margin:0 0 .18rem;color:#ecf9fd;font-size:.93rem}
.bd-editor-label p{margin:0;font-size:.77rem;line-height:1.43;color:#bad2df}
.bd-editor-row svg{display:block;width:100%;height:auto;min-height:64px;max-height:95px;border-radius:5px;background-color:#0a1e30;background-image:linear-gradient(90deg,#5d7d843c 1px,transparent 1px);background-size:20% 100%;border:1px solid #355b74}
.bd-editor-center{fill:none;stroke:#a9c5d95c;stroke-width:.8}
.bd-editor-ink{fill:none;stroke:var(--wave-color);stroke-width:1.9;stroke-linecap:round}
.bd-song-caption{color:#e1f2f9;line-height:1.7;font-size:.92rem;margin:.6rem 1.15rem .3rem}
.bd-song-method{color:#b5d2e1;font-size:.8rem;line-height:1.66;margin:.25rem 1.15rem 1rem}
@media(max-width:650px){
 .bd-editor-row{grid-template-columns:1fr;gap:.28rem;padding:.65rem}
 .bd-editor-time{margin:.55rem .65rem}
 .bd-editor-label{display:flex;gap:.35rem;flex-wrap:wrap;align-items:baseline}
 .bd-editor-label p{margin:0}
 .bd-editor-row svg{min-height:52px}
}
