/* Kourse Mastery 5.6.3 — canonical app shell/header.
   This is the ONLY stylesheet allowed to define shared header geometry or typography.
   Teacher/student contexts provide content only. */
:root{
 --km-shell-font:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
 --km-shell-accent:#42cbc5;--km-shell-ink:#172a40;--km-shell-muted:#687e95;
 --km-shell-light-surface:#fff;--km-shell-light-soft:#edf4f9;--km-shell-light-line:#cddce9;
 --km-shell-dark-surface:#0c2034;--km-shell-dark-soft:#102a43;--km-shell-dark-line:#294b68;
 --km-shell-h:74px;--km-shell-mark:44px;--km-shell-control-h:40px;
 --km-shell-brand-w:300px;--km-shell-actions-w:300px;
}
html body [data-km-shared-header]{box-sizing:border-box!important;position:sticky!important;top:0!important;z-index:5000!important;display:grid!important;grid-template-columns:var(--km-shell-brand-w) minmax(320px,auto) var(--km-shell-actions-w)!important;align-items:center!important;width:100%!important;height:var(--km-shell-h)!important;min-height:var(--km-shell-h)!important;max-height:var(--km-shell-h)!important;margin:0!important;padding:0 24px!important;gap:20px!important;border-radius:0!important;transform:none!important;font-family:var(--km-shell-font)!important;text-rendering:optimizeLegibility!important}
html body [data-km-shared-header] .kmn-standard-brand{box-sizing:border-box!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:12px!important;width:var(--km-shell-brand-w)!important;min-width:var(--km-shell-brand-w)!important;height:var(--km-shell-h)!important;margin:0!important;padding:0!important;color:inherit!important;text-decoration:none!important;font-family:var(--km-shell-font)!important}
html body [data-km-shared-header] .kmn-standard-mark{box-sizing:border-box!important;display:grid!important;place-items:center!important;flex:0 0 var(--km-shell-mark)!important;width:var(--km-shell-mark)!important;height:var(--km-shell-mark)!important;min-width:var(--km-shell-mark)!important;min-height:var(--km-shell-mark)!important;max-width:var(--km-shell-mark)!important;max-height:var(--km-shell-mark)!important;margin:0!important;padding:0!important;border:2px solid var(--km-shell-accent)!important;border-radius:13px!important;background:transparent!important;font-family:var(--km-shell-font)!important;font-size:22px!important;font-weight:900!important;line-height:1!important;letter-spacing:0!important;color:inherit!important}
html body [data-km-shared-header] .kmn-standard-brand-copy{display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:center!important;gap:5px!important;min-width:0!important;margin:0!important;padding:0!important;line-height:1!important}
html body [data-km-shared-header] .kmn-standard-brand-copy strong{display:block!important;margin:0!important;padding:0!important;font-family:var(--km-shell-font)!important;font-size:20px!important;font-weight:800!important;line-height:1.05!important;letter-spacing:-.02em!important;white-space:nowrap!important;color:inherit!important}
html body [data-km-shared-header] .kmn-standard-brand-copy small{display:block!important;margin:0!important;padding:0!important;font-family:var(--km-shell-font)!important;font-size:9px!important;font-weight:900!important;line-height:1!important;letter-spacing:.19em!important;white-space:nowrap!important;color:var(--km-shell-accent)!important}
html body [data-km-shared-header] .kmn-standard-nav{box-sizing:border-box!important;justify-self:center!important;align-self:center!important;display:flex!important;align-items:center!important;gap:5px!important;margin:0!important;padding:5px!important;border-radius:12px!important;font-family:var(--km-shell-font)!important}
html body [data-km-shared-header] .kmn-standard-nav a{box-sizing:border-box!important;display:flex!important;align-items:center!important;justify-content:center!important;height:38px!important;min-height:38px!important;margin:0!important;padding:0 15px!important;border:0!important;border-radius:8px!important;text-decoration:none!important;font-family:var(--km-shell-font)!important;font-size:14px!important;font-weight:800!important;line-height:1!important;letter-spacing:0!important;box-shadow:none!important}
html body [data-km-shared-header] .kmn-standard-actions{box-sizing:border-box!important;justify-self:end!important;align-self:center!important;display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:8px!important;width:var(--km-shell-actions-w)!important;min-width:var(--km-shell-actions-w)!important;height:var(--km-shell-h)!important;margin:0!important;padding:0!important}
html body [data-km-shared-header] :is(.kmn-theme-toggle,.kmn-standard-fullscreen,.kmn-standard-return){box-sizing:border-box!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;height:var(--km-shell-control-h)!important;min-height:var(--km-shell-control-h)!important;margin:0!important;border-radius:10px!important;font-family:var(--km-shell-font)!important;font-size:13px!important;font-weight:800!important;line-height:1!important;letter-spacing:0!important;text-decoration:none!important;white-space:nowrap!important;box-shadow:none!important}
html body [data-km-shared-header] .kmn-theme-toggle{width:44px!important;min-width:44px!important;padding:0!important}html body [data-km-shared-header] .kmn-standard-fullscreen{padding:0 14px!important}html body [data-km-shared-header] .kmn-standard-return{padding:0 15px!important}
/* Theme state can come from either role; geometry remains identical. */
html[data-km-teacher-theme="light"] body [data-km-shared-header],.kmn-app[data-theme="light"]>[data-km-shared-header]{background:var(--km-shell-light-surface)!important;border:0!important;border-bottom:1px solid var(--km-shell-light-line)!important;color:var(--km-shell-ink)!important}
html[data-km-teacher-theme="light"] body [data-km-shared-header] .kmn-standard-nav,.kmn-app[data-theme="light"]>[data-km-shared-header] .kmn-standard-nav{background:var(--km-shell-light-soft)!important;border:1px solid var(--km-shell-light-line)!important}
html[data-km-teacher-theme="light"] body [data-km-shared-header] .kmn-standard-nav a,.kmn-app[data-theme="light"]>[data-km-shared-header] .kmn-standard-nav a{color:#40566d!important}html[data-km-teacher-theme="light"] body [data-km-shared-header] .kmn-standard-nav a.is-active,.kmn-app[data-theme="light"]>[data-km-shared-header] .kmn-standard-nav a.is-active{background:#dcecf7!important;color:var(--km-shell-ink)!important}
html[data-km-teacher-theme="light"] body [data-km-shared-header] :is(.kmn-theme-toggle,.kmn-standard-fullscreen,.kmn-standard-return),.kmn-app[data-theme="light"]>[data-km-shared-header] :is(.kmn-theme-toggle,.kmn-standard-fullscreen,.kmn-standard-return){background:#fff!important;color:var(--km-shell-ink)!important;border:1px solid var(--km-shell-light-line)!important}
html[data-km-teacher-theme="dark"] body [data-km-shared-header],.kmn-app[data-theme="dark"]>[data-km-shared-header]{background:var(--km-shell-dark-surface)!important;border:0!important;border-bottom:1px solid var(--km-shell-dark-line)!important;color:#f5f8fb!important}
html[data-km-teacher-theme="dark"] body [data-km-shared-header] .kmn-standard-nav,.kmn-app[data-theme="dark"]>[data-km-shared-header] .kmn-standard-nav{background:var(--km-shell-dark-soft)!important;border:1px solid var(--km-shell-dark-line)!important}
html[data-km-teacher-theme="dark"] body [data-km-shared-header] .kmn-standard-nav a,.kmn-app[data-theme="dark"]>[data-km-shared-header] .kmn-standard-nav a{color:#aebfd0!important}html[data-km-teacher-theme="dark"] body [data-km-shared-header] .kmn-standard-nav a.is-active,.kmn-app[data-theme="dark"]>[data-km-shared-header] .kmn-standard-nav a.is-active{background:#173b59!important;color:#fff!important}
html[data-km-teacher-theme="dark"] body [data-km-shared-header] :is(.kmn-theme-toggle,.kmn-standard-fullscreen,.kmn-standard-return),.kmn-app[data-theme="dark"]>[data-km-shared-header] :is(.kmn-theme-toggle,.kmn-standard-fullscreen,.kmn-standard-return){background:var(--km-shell-dark-surface)!important;color:#f5f8fb!important;border:1px solid var(--km-shell-dark-line)!important}
@media(max-width:900px){html body [data-km-shared-header]{grid-template-columns:220px 1fr 220px!important;padding:0 14px!important;gap:10px!important}html body [data-km-shared-header] .kmn-standard-brand{width:220px!important;min-width:220px!important}html body [data-km-shared-header] .kmn-standard-actions{width:220px!important;min-width:220px!important}html body [data-km-shared-header] .kmn-standard-nav a{padding:0 11px!important}}
@media(max-width:680px){html body [data-km-shared-header]{--km-shell-h:60px;grid-template-columns:48px 1fr 44px!important;padding:0 8px!important}html body [data-km-shared-header] .kmn-standard-brand{width:48px!important;min-width:48px!important}html body [data-km-shared-header] .kmn-standard-brand-copy{display:none!important}html body [data-km-shared-header] .kmn-standard-mark{--km-shell-mark:38px;font-size:19px!important}html body [data-km-shared-header] .kmn-standard-actions{width:44px!important;min-width:44px!important}html body [data-km-shared-header] :is(.kmn-standard-return,.kmn-standard-fullscreen){display:none!important}html body [data-km-shared-header] .kmn-theme-toggle{width:38px!important;min-width:38px!important;height:38px!important;min-height:38px!important}html body [data-km-shared-header] .kmn-standard-nav{overflow:auto!important;padding:3px!important}html body [data-km-shared-header] .kmn-standard-nav a{height:34px!important;min-height:34px!important;padding:0 9px!important;font-size:12px!important}}
