main>[hidden],.player [hidden]{display:none!important}
.learning-view .learningouter{margin:0;padding:36px 0 64px;min-height:70vh;background:#fcfcf8}
.learning-view .learning-home{display:block;margin-bottom:24px;color:var(--theme-ui-accent,#176757);font-weight:750}
.learning-view #accountBanner{margin-top:36px}
.learning-view .skill-heading h1{font-size:2rem;line-height:1.25;margin:0 0 8px}
.learning-course-group{margin:32px 0}
.learning-course-group>h2{font-size:1.3rem;margin-bottom:16px}.learning-course-group>h2>span{font-size:.85rem;color:var(--theme-body-muted,#506775);margin-left:8px}
.learning-course-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.learning-course-list article{display:flex;align-items:center;gap:16px;justify-content:space-between;background:#fff;border:1px solid #dce5e8;border-radius:12px;padding:20px}
.learning-course-list h3{font-size:1rem;line-height:1.4;margin:0 0 6px}.learning-course-list p{font-size:.8rem;color:var(--theme-body-muted,#506775);margin:0}.learning-course-list .button{font-size:.8rem;padding:10px 14px;flex-shrink:0}
.learning-empty{padding:30px;border:1px solid var(--theme-ui-border,#d2e1d9);border-radius:16px;background:var(--theme-ui-soft,#f0f6f3);margin:26px 0}.learning-empty h2{font-size:1.4rem}.learning-muted{color:var(--theme-body-muted,#506775);font-size:.9rem}
.learning-extras{margin:36px 0 0;border-top:1px solid #dce5e8;padding-top:22px}.learning-extras>summary{font-weight:800;cursor:pointer;color:var(--theme-ui-accent,#176757);padding:10px 0}.learning-extras[open]>summary{margin-bottom:22px}
.chapter-toolbar{position:sticky;top:0;z-index:3;background:#fff;padding:14px 0 16px;margin:22px 0;border-bottom:1px solid #dce5e8}
.chapter-toolbar-top{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:10px;padding-right:30px}.chapter-toolbar strong{font-size:.9rem;white-space:nowrap;flex-shrink:0}.chapter-toolbar .textlink{font-size:.8rem;text-align:right}
.chapter-toolbar select{display:block;width:100%;min-height:44px;padding:10px 34px 10px 12px;border:1px solid #b7cbd4;border-radius:8px;background:var(--theme-ui-soft,#f6f9f8);color:var(--theme-body,#17394a);font:inherit;font-size:.85rem;white-space:nowrap;text-overflow:ellipsis}
.chapter-navigation{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid #dce5e8;padding:22px 0;margin:16px 0}.chapter-navigation>span{font-size:.8rem;color:var(--theme-body-muted,#506775);text-align:center}.chapter-navigation .button{font-size:.85rem;padding:12px 18px}.chapter-navigation button:disabled{opacity:.4;cursor:default}
.reader-sources{margin:26px 0}.reader-sources>summary{color:#155d92;cursor:pointer;font-size:.9rem;font-weight:750;padding:8px 0}.reader-sources .lessonsources{margin-top:14px}.reader-sources .lessonsources>h3{display:none}
.reader-finish{padding:18px;background:var(--theme-ui-soft,#edf5f2);border-radius:10px;font-size:.9rem;line-height:1.6}
.player[data-reader-mode="chapters"]:not([data-chapter="0"]) .guidebubble,.player[data-reader-mode="chapters"]:not([data-chapter="0"]) .dialogintro{display:none}
@media(max-width:760px){.learning-course-list{grid-template-columns:1fr}.learning-course-list article{flex-wrap:wrap}.learning-view .skill-heading h1{font-size:1.6rem}.chapter-toolbar-top{align-items:flex-start;padding-right:28px}.chapter-toolbar{padding-top:12px}.chapter-navigation{flex-wrap:wrap}.chapter-navigation>span{order:-1;width:100%;text-align:left}.chapter-navigation .button{font-size:.8rem;padding:11px 12px}.learning-empty{padding:22px}}

/* Chapter links sit directly under the active lesson in the desktop outline. */
.sidebar-chapters{list-style:none;padding:2px 0 8px;margin:0;display:grid;gap:3px;min-width:0}
.sidebar-chapter{display:grid;grid-template-columns:1.2rem minmax(0,1fr);gap:6px;width:100%;min-height:44px;border:0;border-left:3px solid transparent;border-radius:0 7px 7px 0;background:transparent;padding:9px 8px;text-align:left;font-size:.78rem;line-height:1.45;color:var(--muted);overflow-wrap:anywhere}
.sidebar-chapter-number{font-variant-numeric:tabular-nums;color:var(--green)}
.sidebar-chapter:hover{background:var(--theme-ui-tint,#e5efec);color:var(--ink)}
.sidebar-chapter[aria-current="step"]{background:var(--theme-ui-tint,#dceee6);border-left-color:var(--green);color:var(--theme-ui-accent,#124e42);font-weight:800}
.chapter-picker{display:none}
@media(min-width:761px){.playerside{display:flex;flex-direction:column;max-height:calc(92dvh - 2px);overflow:hidden}.playerside>.backcourse,.playerside>h3,.playerside>.progresslabel,.playerside>.courseprogress{flex-shrink:0}.playerside .sideitems{display:block;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:0 4px 0 0;border-top:0}.playerside .sidelesson{width:100%;margin-bottom:8px}.playerside .sidelesson.active{position:sticky;top:0;z-index:1}.playerbody>.lessonmap{display:none}.chapter-toolbar-top{margin-bottom:0}}
@media(max-width:760px){.sidebar-chapters{display:none}.chapter-picker{display:flex;align-items:center;gap:10px}.chapter-picker label{font-size:.8rem;font-weight:750;flex-shrink:0}.chapter-picker select{min-width:0;flex:1;width:auto}}

#lessonDialog{overflow-anchor:none}

/* Keep the close button clear of chapter controls on narrow or enlarged layouts. */
@media(max-width:480px){
 .chapter-toolbar-top{padding-right:48px;flex-wrap:wrap;gap:4px}
 .chapter-toolbar .textlink{text-align:left;min-height:44px}
 .chapter-picker{align-items:stretch;flex-direction:column;gap:5px}
 .chapter-picker select{width:100%;flex:auto}
 .chapter-toolbar{scroll-margin-top:12px}
}
