.has-site-shell .training-mode-trigger{display:grid;place-items:center;flex:0 0 44px;width:44px;min-width:44px;height:44px;min-height:44px;margin-left:auto;padding:10px;border:1px solid var(--site-line);border-radius:8px;background:transparent;color:var(--site-ink);cursor:pointer}
.has-site-shell .training-mode-trigger svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.6}
.has-site-shell .training-mode-trigger[aria-expanded=true]{background:var(--site-soft);color:var(--site-accent)}
.training-mode-menu[hidden]{display:none!important}
.training-mode-menu{display:flex;flex-direction:column;gap:0;position:fixed;z-index:90;width:min(224px,calc(100vw - 24px));padding:7px;border:1px solid var(--site-line);border-radius:14px;background:var(--site-raised);color:var(--site-ink);box-shadow:0 12px 32px #10172929}
.training-mode-menu>a,.training-mode-menu>.training-mode-settings{display:flex;align-items:center;width:100%;min-height:48px;padding:10px 13px;border:0;border-radius:9px;background:transparent;color:var(--site-ink);font:inherit;font-size:15px;line-height:1.4;text-align:left;text-decoration:none;cursor:pointer}
.training-mode-menu>a[aria-current=page]{background:var(--site-soft);color:var(--site-accent);font-weight:700}
.training-mode-menu>a:hover,.training-mode-menu>.training-mode-settings:hover{background:var(--site-soft)}
.training-mode-menu>.training-mode-settings{gap:10px;margin-top:5px;border-top:1px solid var(--site-line);border-radius:0 0 9px 9px;color:var(--site-muted);font-size:13px}
.training-mode-menu>.training-mode-settings svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6}
.training-mode-menu>.training-mode-settings:disabled{opacity:.5;cursor:wait}
.training-mode-trigger:focus-visible,.training-mode-menu :focus-visible{outline:2px solid var(--site-accent);outline-offset:2px}
@media(min-width:901px){body.mode-lab-integrated>.mode-lab-mobile-header{display:flex}body.mode-lab-integrated .page-intro{display:none}}

/* Shared four-training header. The page title stays at the header's true centre. */
body.has-site-shell .training-unified-header{position:relative;display:flex!important;align-items:center;flex-wrap:nowrap!important;gap:8px!important;width:100%;min-height:56px!important;height:56px!important;flex-shrink:0;padding:6px 12px!important;box-sizing:border-box;border-bottom:1px solid var(--site-line);background:var(--site-raised);color:var(--site-ink)}
body.has-site-shell .training-unified-header>a.training-unified-brand{order:0!important;display:flex;align-items:center;gap:6px;flex:0 1 auto!important;width:auto!important;min-width:0!important;max-width:calc(50% - 44px);margin:0!important;padding:0!important;text-decoration:none;color:var(--site-ink)}
body.has-site-shell .training-unified-brand .rsl-logo{display:block;width:32px!important;height:32px!important;flex:0 0 32px;color:var(--site-accent);--rsl-logo-ink:var(--site-on,#fff)}
body.has-site-shell .training-unified-brand .practice-brand-title{display:flex;flex-direction:column;min-width:0;white-space:nowrap}
body.has-site-shell .training-unified-brand .practice-brand-title strong{font-size:14px!important;line-height:1.3;letter-spacing:0}
body.has-site-shell .training-unified-brand .practice-brand-title small{display:block!important;font-size:9px!important;line-height:1.3;color:var(--site-muted);letter-spacing:0}
body.has-site-shell .training-unified-header>.training-current-feature{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max-content;max-width:calc(100% - 208px);margin:0;padding:0;font-size:14px!important;font-weight:650;line-height:1.3;white-space:nowrap;text-align:center;pointer-events:none}
body.has-site-shell .training-unified-header>.training-mode-trigger{order:3!important;flex:0 0 44px;margin-left:auto!important}
body.has-site-shell .training-unified-header>.global-account{order:4!important;flex:0 0 44px!important;width:44px!important;min-width:44px!important;margin:0!important}
@media(min-width:600px){body.has-site-shell .training-unified-brand .practice-brand-title strong{font-size:16px!important}body.has-site-shell .training-unified-brand .practice-brand-title small{font-size:10px!important}body.has-site-shell .training-unified-header>.training-current-feature{font-size:16px!important}}
@media(max-width:359px){body.has-site-shell .training-unified-header{padding-inline:8px!important}body.has-site-shell .training-unified-brand .rsl-logo{width:28px!important;height:28px!important;flex-basis:28px}body.has-site-shell .training-unified-header>a.training-unified-brand{gap:4px}body.has-site-shell .training-unified-brand .practice-brand-title strong{font-size:12px!important}body.has-site-shell .training-unified-brand .practice-brand-title small{display:none!important}body.has-site-shell .training-unified-header>.training-current-feature{font-size:13px!important}}
/* Rhythm uses the same compact site-navigation control on both attempt and result. */
body.rhythm-site-navigation main>footer>.practice-nav-toggle{flex:0 0 44px!important;min-width:44px;width:44px;height:44px;min-height:44px;align-self:center;display:grid;place-items:center;padding:0;border:1px solid var(--site-muted);border-radius:8px;background:var(--site-raised);color:var(--site-accent)}
body.rhythm-site-navigation .practice-nav-toggle svg{width:20px;height:20px;fill:none;stroke:currentColor}
@media(max-width:900px){
 body.rhythm-site-navigation{--site-bottom:0px}
 body.rhythm-site-navigation .global-site-nav{display:none;inset:auto 8px auto;bottom:76px;height:auto;min-height:64px;padding:6px;background:var(--site-raised);border:1px solid var(--site-line);border-radius:14px;box-shadow:0 8px 28px #0004}
 body.rhythm-site-navigation .global-site-nav.practice-nav-open{display:grid!important}
 body.rhythm-site-navigation .global-site-nav>a,body.rhythm-site-navigation .global-site-nav>button{min-height:56px;padding:5px 0}
}
@media(min-width:901px){body.rhythm-site-navigation main>footer>.practice-nav-toggle{display:none}}

/* One compact menu for all five learning functions. */
.training-mode-menu{box-sizing:border-box;overflow-y:auto;overscroll-behavior:contain}
.training-menu-divider{flex-shrink:0;width:100%;margin:6px 0;border:0;border-top:1px solid var(--site-line)}
body.has-site-shell .training-menu-account>.global-account{display:flex!important;align-items:center;justify-content:flex-start;gap:10px;box-sizing:border-box;width:100%!important;min-width:0!important;min-height:44px;height:auto;margin:0;padding:10px 13px;border:0;border-radius:9px;background:transparent;color:var(--site-ink);font:inherit;font-size:15px;text-decoration:none}
body.has-site-shell .training-menu-account>.global-account>span{display:inline!important}
body.has-site-shell .training-menu-account>.global-account>svg{display:block}
.training-menu-account>.global-account:hover{background:var(--site-soft)!important}
.training-mode-menu>.training-mode-settings{margin:0;border-top:0;min-height:44px;font-size:15px;color:var(--site-ink)}
body.has-site-shell.theory-book .theory-shell>.training-unified-header{background:var(--voyage-paper,#f3ebdd)!important}
body.has-site-shell.theory-book .training-mode-menu{width:min(224px,calc(100vw - 24px))!important;padding:7px!important}

/* Scope geometry to the shared menu: page nav/a rules must not alter rows. */
body.has-site-shell #training-mode-menu{display:flex;flex-direction:column;gap:0!important;width:min(224px,calc(100vw - 24px))!important;min-width:0!important;height:auto!important;min-height:0!important;box-sizing:border-box;padding:7px!important;border-radius:14px!important;font:400 15px/1.4 var(--site-font,system-ui,sans-serif);letter-spacing:normal;text-align:left}
body.has-site-shell #training-mode-menu[hidden]{display:none!important}
body.has-site-shell #training-mode-menu>a{box-sizing:border-box;display:flex!important;align-items:center;flex:0 0 48px!important;height:48px!important;min-height:48px!important;width:100%!important;margin:0!important;padding:10px 13px!important;font-size:15px!important;line-height:1.4!important;letter-spacing:normal}
body.has-site-shell #training-mode-menu .training-menu-account{display:block!important;flex:0 0 44px!important;height:44px!important;margin:0!important;padding:0!important}
body.has-site-shell #training-mode-menu .global-account,body.has-site-shell #training-mode-menu>.training-mode-settings{box-sizing:border-box;display:flex!important;align-items:center;justify-content:flex-start;gap:10px!important;flex:0 0 44px!important;height:44px!important;min-height:44px!important;width:100%!important;margin:0!important;padding:10px 13px!important;font:400 15px/1.4 var(--site-font,system-ui,sans-serif)!important;letter-spacing:normal}
body.has-site-shell #training-mode-menu .global-account>span{position:static!important;display:block!important;width:auto!important;height:auto!important;overflow:visible!important;clip:auto!important;clip-path:none!important;white-space:nowrap!important;opacity:1!important;visibility:visible!important;font-size:15px!important;line-height:21px!important}
body.has-site-shell #training-mode-menu .global-account>svg,body.has-site-shell #training-mode-menu>.training-mode-settings>svg{display:block!important;position:static!important;flex:0 0 20px!important;width:20px!important;height:20px!important;fill:none;stroke:currentColor}
body.has-site-shell #training-mode-menu>.training-menu-divider{display:block;flex:0 0 1px;box-sizing:border-box;height:1px;width:100%;margin:6px 0!important;padding:0;border:0;border-top:1px solid var(--site-line)}
body.has-site-shell.theory-book #training-mode-menu{background:var(--voyage-paper,#f3ebdd);color:#193348}

/* Menu links: decoration is independent of lesson/content links and current selection. */
body.theory-page .training-mode-menu a,
body.theory-page .training-mode-menu a:is(:link,:visited,:hover,:active,:focus,[aria-current]),
body.theory-page .global-site-nav a,
body.theory-page .global-site-nav a:is(:link,:visited,:hover,:active,:focus,[aria-current]){text-decoration:none!important}
body.theory-page .training-mode-menu a:focus-visible,
body.theory-page .global-site-nav a:focus-visible{outline:2px solid var(--site-accent,#19667a)!important;outline-offset:2px!important}
