.primary-navigation { display:flex;gap:8px; }
.primary-navigation a { padding:13px 24px;border-radius:12px;color:#355448;text-decoration:none;font-weight:800; }
.primary-navigation a[aria-current=page] { background:#246b4c;color:#fff; }
body:not(.learning-app) > .primary-navigation { max-width:1144px;margin:8px auto;padding:0 24px; }
.learning-app .primary-navigation { position:absolute;top:76px;left:3%;right:3%;border-bottom:1px solid #d3dfd7;padding-bottom:12px;z-index:5; }
.learning-app .header-actions > :is(#member-button,#grown-ups-button) { display:none; }
/* Keep the entire Profile popup above the navigation divider, not just its children. */
html body.learning-app .app-header { display:grid;grid-template-columns:minmax(0,1fr) auto;z-index:10; }
html body.learning-app .header-actions { width:auto; }
.learning-app #menu-screen { top:148px;bottom:0; }
.learning-app:not([data-app-view=standalone]) #menu-screen > .menu-heading { display:none; }
.app-view-heading { width:100%;text-align:left; }
.app-view-heading h2 { font-size:clamp(1.65rem,3vw,2.2rem);margin:0 0 8px;color:#173f34; }
.app-view-heading p { margin:0 0 8px;color:#52665c;line-height:1.5; }
.home-actions,.practice-hub { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;width:100%; }
:is(.home-actions,.practice-hub) :is(a,button) { display:block;background:#fff;border:1px solid #c9d9cd;border-radius:18px;padding:24px;text-decoration:none;color:#173f34;text-align:left;font:inherit;cursor:pointer; }
:is(.home-actions,.practice-hub) strong { display:block;font-size:1.2rem;margin-bottom:8px; }
:is(.home-actions,.practice-hub) span { display:block;color:#52665c;line-height:1.5; }
body[data-app-view=home] #menu-screen > :not(.app-view-heading):not(.home-actions):not(.learning-today) { display:none!important; }
body:not([data-app-view=home]) #menu-screen > :is(.home-actions,.learning-today) { display:none!important; }
body:not([data-app-view=practice]) .practice-hub { display:none!important; }
body[data-app-view=practice] #menu-screen > :not(.app-view-heading):not(.practice-hub) { display:none!important; }
body[data-app-view=lessons] #menu-screen #mode-and-progress-row { display:none!important; }
body[data-app-view=lessons] #content-section-picker a { display:none!important; }
body[data-app-view=games] :is(.dashboard-navigation,#book-learning-path) { display:none!important; }
body[data-app-view=standalone] :is(.app-view-heading,.dashboard-navigation,.learning-today,.home-actions,.practice-hub) { display:none!important; }
body:has(#game-screen:not([hidden])) .primary-navigation,body.is-teaching .primary-navigation { display:none; }
html[data-theme=dark] .primary-navigation a { color:#e5f1e9; }
html[data-theme=dark] .primary-navigation a[aria-current=page] { background:#276a4d; }
html[data-theme=dark] :is(.home-actions,.practice-hub) :is(a,button) { background:#223b3a;color:#f0f6f1;border-color:#54716a; }
html[data-theme=dark] :is(.home-actions,.practice-hub) span,html[data-theme=dark] .app-view-heading :is(h2,p) { color:#d5e6db; }
@media(max-width:600px) {
 .learning-app .primary-navigation { position:fixed;top:auto;bottom:0;left:0;right:0;justify-content:space-around;background:#fff;border-top:1px solid #cad8cd;border-bottom:0;padding:8px 4px calc(8px + env(safe-area-inset-bottom)); }
 .primary-navigation a { padding:12px 14px;font-size:.9rem; }
 html body.learning-app .app-shell { padding-top:78px;padding-bottom:90px; }
 .learning-app #menu-screen { top:0;padding-bottom:110px; }
 .home-actions,.practice-hub { grid-template-columns:1fr;gap:12px; }
 :is(.home-actions,.practice-hub) :is(a,button) { padding:20px; }
 .learning-app .account-menu-panel { top:75px; }
 html[data-theme=dark] .learning-app .primary-navigation { background:#18312f;border-color:#54716a; }
 body:not(.learning-app) > .primary-navigation { padding:0 8px;gap:0;justify-content:space-between; }
}
