/* R81 shared chrome and neutral surfaces. Semantic charts/status colours stay local. */
:root{
 --ae-navy:#103444;--ae-primary:#146776;--ae-primary-hover:#105462;
 --ae-bg:#f4f7f9;--ae-surface:#fff;--ae-soft:#edf3f6;--ae-border:#d8e4e9;
 --ae-ink:#163b49;--ae-muted:#607985;--ae-accent:#f0a06b;
 --bg:var(--ae-bg)!important;--card:var(--ae-surface)!important;
 --ink:var(--ae-ink)!important;--muted:var(--ae-muted)!important;--line:var(--ae-border)!important;
 --portal-navy:var(--ae-navy)!important;--portal-teal:var(--ae-primary)!important;
 --teal:var(--ae-primary)!important;--teal2:var(--ae-primary-hover)!important;
}
html,body,html body.portal-dashboard,html.portal-embedded body{background-color:var(--ae-bg)!important}
body{color:var(--ae-ink)}
:is(body.portal-dashboard,html.portal-embedded body) :is(.student-admin-shell,.student-admin-main,.student-admin-content,.comm-main,.manager-wrap){background:transparent!important}
:is(.comm-panel,.student-admin-content .panel,.student-admin-content .stat-card,.student-admin-content .global-card,.manager-card){background:var(--ae-surface)!important;border-color:var(--ae-border)!important;box-shadow:0 6px 20px #10344408!important}
.comm-main :is(.comm-kicker,.comm-head h1),.student-admin-content :is(.eyebrow,.page-heading h1){color:var(--ae-ink)!important}
.comm-main :is(button.is-active,.comm-primary),.comm-dialog .comm-primary,.student-admin-content :is(.tab-row button.active,.btn-primary),.manager-tabs button.active,.manager-card :is(.save-button,.sync-button){background:var(--ae-primary)!important;border-color:var(--ae-primary)!important;color:#fff!important}
.comm-main :is(button.is-active,.comm-primary):hover,.comm-dialog .comm-primary:hover,.student-admin-content :is(.tab-row button.active,.btn-primary):hover{background:var(--ae-primary-hover)!important}
.comm-main :is(.comm-row,.comm-message,.comm-image-editor,.comm-mail-stats span),.student-admin-content :is(.empty,thead th){background-color:var(--ae-soft)!important;border-color:var(--ae-border)!important}
.comm-main .comm-row.is-active{background:var(--ae-soft)!important;border-color:var(--ae-primary)!important;color:var(--ae-ink)!important}
.comm-message.admin{border-left:3px solid var(--ae-primary)!important}
.comm-main :is(button,.comm-link){color:var(--ae-ink)}
/* Shared primary actions; secondary, destructive, answer and status colours are untouched. */
body main :is(.public-primary,.sr-primary,.ss-primary,.test-primary,.compact-generate,.ss-plan-link),body main.dh79 .dh79-resume button{background:var(--ae-primary)!important;border-color:var(--ae-primary)!important;color:#fff!important}
html body.portal-dashboard main.sr-page .sr-primary,html.portal-embedded body main.sr-page .sr-primary{background:var(--ae-primary)!important;border-color:var(--ae-primary)!important;color:#fff!important}
body main :is(.public-primary,.sr-primary,.ss-primary,.test-primary,.compact-generate,.ss-plan-link):hover,body main.dh79 .dh79-resume button:hover{background:var(--ae-primary-hover)!important;border-color:var(--ae-primary-hover)!important}
html body.portal-dashboard main.sr-page .sr-primary:hover,html.portal-embedded body main.sr-page .sr-primary:hover{background:var(--ae-primary-hover)!important;border-color:var(--ae-primary-hover)!important}
body main :is(.public-primary,.sr-primary,.ss-primary,.test-primary,.compact-generate):disabled{background:#e3ebef!important;border-color:#d8e4e9!important;color:var(--ae-muted)!important}
/* Match the legal strip to the established navy chrome on every page. */
:is(.public-footer,.legal-footer,body>footer),.legal-links-v21:not(footer .legal-links-v21){background:var(--ae-navy)!important;color:#dce8ed!important}
:is(.public-footer,.legal-footer,body>footer) a,.legal-links-v21 a{color:#edf4f7!important}
/* One desktop profile; the same live account control moves into the mobile drawer. */
body.v29-account-shell .v29-account-topbar{background:var(--ae-navy)!important;border:0!important;box-shadow:0 3px 10px #10344416!important;gap:12px!important}
body.v29-account-shell #home-header.v29-account-topbar{background:var(--ae-navy)!important;border:0!important;height:66px!important;min-height:66px!important;padding:0 24px!important;gap:12px!important}
body.v29-account-shell .portal-sidebar{background:var(--ae-navy)!important;border-top:0!important;box-shadow:none!important}
.v29-account-topbar :is(.public-brand,.v29-top-brand){margin-right:auto!important;min-width:0}
.v29-account-topbar .r81-header-actions{display:flex!important;align-items:center;gap:12px;margin-left:auto;order:1;flex:none}
.v29-account-topbar .comm-mailbox-link{margin:0!important;min-width:40px;min-height:40px;border-color:#ffffff40;background:transparent}
.v29-account-topbar .v29-top-avatar{background:var(--ae-accent)!important;color:var(--ae-navy)!important;font-weight:800}
.v29-account-topbar .v29-top-profile summary{min-height:40px}
.v29-account-topbar .v29-top-name{display:none!important}
.portal-sidebar>:is(.v282-utilities,.portal-user){display:none!important}
.r81-sidebar-account{display:none}
.v29-top-profile nav :is(a,button){box-sizing:border-box}
.v29-top-profile nav [data-r48-help]{display:block!important;width:100%!important;height:auto!important;margin:0!important;padding:11px 12px!important;border:0!important;border-radius:7px!important;background:transparent!important;box-shadow:none!important;color:var(--ae-ink)!important;text-align:left!important;font:inherit!important;font-size:14px!important}
.v29-top-profile nav [data-r48-help]:hover{background:var(--ae-soft)!important}
.v29-top-profile nav [data-v29-logout]{border-top:1px solid var(--ae-border);border-radius:0}
.v29-top-profile :is(a,button,summary):focus-visible,.v29-top-menu:focus-visible,.comm-mailbox-link:focus-visible{outline:3px solid var(--ae-accent)!important;outline-offset:3px}
@media(min-width:981px){.v29-account-topbar>.v29-top-menu{display:none!important}}
@media(max-width:980px){
 body.v29-account-shell #home-header.v29-account-topbar{height:58px!important;min-height:58px!important;padding:0 12px!important;gap:10px!important}
 #home-header.v29-account-topbar>.public-brand{flex:1!important;gap:8px!important}
 #home-header.v29-account-topbar>.public-brand>div{display:block!important}
 #home-header.v29-account-topbar .public-brand strong{font-size:12px!important;white-space:nowrap}
 .v29-account-topbar{padding:0 12px!important}
 .v29-account-topbar .r81-header-actions{gap:0;margin-left:0}
 .v29-account-topbar>.v29-top-menu{display:grid!important;place-items:center;order:2!important;flex:none;margin:0!important;width:40px;height:40px;border-color:#ffffff40;background:transparent}
 .v29-account-topbar>.v29-top-spacer{display:none}
 .v29-account-topbar :is(.public-brand,.v29-top-brand){flex:1}
 .v29-account-topbar :is(.public-brand,.v29-top-brand) img{width:34px!important;height:34px!important}
 .v29-account-topbar .comm-mailbox-link{min-width:36px;min-height:40px}
 .r81-sidebar-account{display:block;flex:none;padding:10px 14px 14px;border-top:1px solid #ffffff24}
 .r81-sidebar-account .v29-top-profile{width:100%;color:#fff}
 .r81-sidebar-account .v29-top-profile summary{min-height:44px;gap:10px}
 .r81-sidebar-account .v29-top-name{display:block!important;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}
 .r81-sidebar-account .v29-top-avatar{flex:none;background:var(--ae-accent);color:var(--ae-navy);font-weight:800}
 .r81-sidebar-account .v29-top-profile nav{position:absolute;top:auto;bottom:calc(100% + 10px);left:0;right:0;width:100%;min-width:0;max-height:calc(100dvh - 180px);overflow-y:auto;padding:6px;flex:none}
 .r81-sidebar-account .v29-top-profile nav :is(a,button){color:var(--ae-ink)}
}
@media(max-width:360px){.v29-account-topbar{gap:7px!important}.v29-top-brand{gap:7px!important}.v29-top-brand span{font-size:11px}}
