/* A quiet, focused workspace built on the existing course engines. */
:root{
  --accent:#32665b;
  --accent-strong:#234e45;
  --accent-soft:#e7efeb;
  --shadow:0 12px 30px rgba(48,42,34,.06);
}
body{font-family:"Segoe UI",ui-sans-serif,system-ui,-apple-system,sans-serif;background:var(--bg)}
.main{max-width:1600px;margin-inline:auto}
.brand-mark{background:var(--accent);box-shadow:none}
.top-stats strong,.lesson-mastery-chip{font-variant-numeric:tabular-nums}
.lesson-header h2{font-family:Georgia,ui-serif,serif;font-size:clamp(26px,3vw,40px);font-weight:600;line-height:1.12;letter-spacing:-.035em;text-wrap:balance}
.lesson-card,.tool-card,.atlas-article{box-shadow:var(--shadow)}
.lesson-header{align-items:start}
.lesson-header #completeLessonBtn{font-size:12px;min-height:44px;flex-shrink:0}
.study-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;border:1px solid var(--border);border-radius:14px;overflow:hidden;margin:22px 0;background:var(--border)}
.study-steps button{display:grid;grid-template-columns:26px 1fr;align-items:center;gap:2px 7px;padding:14px 12px;border:0;border-radius:0;background:var(--panel);text-align:left;color:var(--text);min-width:0;min-height:68px;transition:background .18s}
.study-steps button:hover{background:var(--accent-soft)}
.study-steps button:active{background:var(--panel-soft)}
.study-steps span{grid-row:span 2;font-variant-numeric:tabular-nums;color:var(--accent);font-size:12px}
.study-steps strong{font-size:14px;line-height:1.25}
.study-steps small{font-size:11px;color:var(--muted);line-height:1.35}
.study-transfer{margin:24px 0;padding:22px;border-left:3px solid var(--accent);border-radius:0 14px 14px 0;background:var(--accent-soft)}
.study-transfer h3{font-size:20px;margin:0 0 8px;text-wrap:balance}
.study-transfer p:not(.eyebrow){max-width:65ch;margin:0 0 12px}
.study-transfer small{display:block;color:var(--muted);line-height:1.5;max-width:65ch;margin-bottom:16px}
.study-transfer button{min-height:44px}
.study-device,.study-evidence{border-top:1px solid var(--border);margin-top:20px;padding-top:20px}
.study-device h3,.study-evidence h3{font-size:15px;margin:0 0 8px}
.study-device p,.study-evidence p{font-size:13px;color:var(--muted);line-height:1.6;margin:0 0 12px}
.study-device summary{min-height:44px;cursor:pointer;font-size:13px;color:var(--accent-strong);padding-block:10px}
.study-device ul{padding-left:18px;font-size:13px;line-height:1.6}
.study-device li{margin:10px 0}
.study-evidence button{width:100%;min-height:44px;font-size:12px;white-space:normal}
.atlas-hero h2{max-width:760px;margin:0 0 12px;font-family:Georgia,ui-serif,serif;font-size:clamp(30px,4.7vw,58px);font-weight:600;line-height:1.06;letter-spacing:-.045em;text-wrap:balance}
.atlas-goals div>span{min-width:0;line-height:1.65}
.atlas-goals .music-term{display:inline;line-height:inherit}
.lesson-block>p{max-width:65ch}
.lesson-body{scroll-margin-top:20px}
.course-error{max-width:640px;margin:12vh auto;padding:24px}
.course-error h1{font-family:Georgia,serif;font-size:clamp(32px,6vw,48px);line-height:1.1}
.course-error a{display:inline-flex;text-decoration:none}
.atlas-nav-item:focus-visible,.study-steps button:focus-visible{outline:3px solid var(--accent);outline-offset:-3px}
@media(max-width:1100px){
  .mini-map{display:block;position:static}
  .study-device,.study-evidence{max-width:65ch}
  body[data-view="course"] .sidebar{display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:10px;padding:12px 16px;position:static;height:auto;min-height:0}
  body[data-view="course"] .sidebar .brand{margin:0;gap:10px}
  body[data-view="course"] .sidebar .brand-mark{width:34px;height:34px;font-size:24px}
  body[data-view="course"] .sidebar .brand strong{font-size:14px}
  body[data-view="course"] .sidebar .brand span{font-size:10px}
  body[data-view="course"] .sidebar .level-summary{display:none}
  body[data-view="course"] .sidebar .mobile-level-toggle{grid-column:2;grid-row:1;min-height:44px;width:auto;margin:0;padding:8px 12px;font-size:12px}
  body[data-view="course"] .sidebar .mobile-level-toggle::after{content:none}
  body[data-view="course"] .sidebar .level-nav{grid-column:1/-1;max-height:45dvh}
  body[data-view="course"] .sidebar.levels-open .mobile-level-toggle{background:var(--accent-strong)}
  body[data-view="course"] .sidebar .level-nav{background:#24221e}
  body[data-view="course"] #resetProgressBtn{grid-column:1/-1}
  body[data-view="course"] .topbar{display:flex!important;align-items:center;gap:12px;margin:0 0 16px}
  body[data-view="course"] .topbar h1{font-size:clamp(20px,4vw,26px);line-height:1.2;margin:0}
  body[data-view="course"] .topbar .eyebrow{font-size:10px;margin:0 0 4px}
  body[data-view="course"] .main{padding-top:16px}
}
@media(max-width:600px){body[data-view="course"] .top-stats{display:none}}
@media(max-width:760px){
  .lesson-header{display:block}
  .lesson-header #completeLessonBtn{margin-top:12px;font-size:12px}
  .study-steps{margin:16px 0;gap:1px}
  .study-steps button{padding:12px 8px;grid-template-columns:1fr;gap:4px;min-height:84px}
  .study-steps span{grid-row:auto;font-size:10px}
  .study-steps strong{font-size:13px}
  .study-steps small{font-size:10px}
  .study-transfer{padding:18px 14px}
  .study-transfer h3{font-size:18px}
  .atlas-hero h2{font-size:clamp(28px,8vw,38px)}
  .atlas-hero{padding:22px 18px}
  .lesson-mastery-strip small{flex-basis:100%}
}
@media(prefers-reduced-motion:reduce){.study-steps button{transition:none}}
