/* Evorah v2.39.16 — approved Charcoal & Rose Gold identity. Loaded last. */
:root{
  --ev-charcoal:#302D33;--ev-rose:#C18F87;--ev-rose-strong:#98655F;--ev-warm:#F6F2F0;
  --bg:#F6F2F0;--page:#F6F2F0;--panel:#FFFFFF;--panel-2:#FAF7F6;--card:#FFFFFF;
  --surface:#FFFFFF;--surface-2:#FAF7F6;--surface-alt:#FAF7F6;--soft:#F2E9E7;
  --text:#302D33;--muted:#756C70;--border:#DED5D3;--navy:#302D33;--navy2:#242126;
  --blue:#98655F;--cyan:#C18F87;--primary:#98655F;--primary-strong:#875B55;
  --accent:#98655F;--brand:#98655F;
  --ev-page:#F6F2F0;--ev-bg:#F6F2F0;--ev-surface:#FFFFFF;--ev-surface-2:#FAF7F6;
  --ev-surface-3:#F2E9E7;--ev-surface-soft:#F2E9E7;--ev-text:#302D33;
  --ev-text-soft:#756C70;--ev-border:#DED5D3;--ev-accent:#98655F;
  --ev-accent-strong:#875B55;--ev-accent-soft:#F0E2DF;--ev-shell:#302D33;--ev-shell-2:#242126;
  --ev-shadow:0 8px 24px rgba(48,45,51,.08);--ev-shadow-strong:0 16px 42px rgba(48,45,51,.15);
  --m-bg:#F6F2F0;--m-panel:#FFFFFF;--m-text:#302D33;--m-muted:#756C70;
  --m-line:#DED5D3;--m-brand:#98655F;--m-accent:#98655F;--m-soft:#F0E2DF;
  accent-color:#98655F;
}
html[data-theme="dark"]{
  --bg:#19191D;--page:#19191D;--panel:#302D33;--panel-2:#29272D;--card:#302D33;
  --surface:#302D33;--surface-2:#29272D;--surface-alt:#29272D;--soft:#3A363D;
  --text:#F7F3F5;--muted:#C9C1C6;--border:#514B53;--navy:#29272D;--navy2:#211F24;
  --blue:#C18F87;--cyan:#C18F87;--primary:#C18F87;--primary-strong:#D5AAA3;
  --accent:#C18F87;--brand:#C18F87;--ev-page:#19191D;--ev-bg:#19191D;
  --ev-surface:#302D33;--ev-surface-2:#29272D;--ev-surface-3:#3A363D;
  --ev-surface-soft:#3A363D;--ev-text:#F7F3F5;--ev-text-soft:#C9C1C6;
  --ev-border:#514B53;--ev-accent:#C18F87;--ev-accent-strong:#D5AAA3;
  --ev-accent-soft:#493B3D;--ev-shell:#29272D;--ev-shell-2:#211F24;
  --ev-shadow:0 8px 26px rgba(0,0,0,.24);--ev-shadow-strong:0 18px 46px rgba(0,0,0,.34);
  --m-bg:#19191D;--m-panel:#302D33;--m-text:#F7F3F5;--m-muted:#C9C1C6;
  --m-line:#514B53;--m-brand:#C18F87;--m-accent:#D5AAA3;--m-soft:#493B3D;
  color-scheme:dark;
}
html,body,main{background:var(--ev-page)!important;color:var(--ev-text)}
a{color:var(--ev-accent-strong)}a:hover{color:var(--ev-accent)}
::selection{background:#C18F87;color:#302D33}
.sidebar,.sidebar.evorah-app-shell{background:linear-gradient(180deg,#302D33 0%,#29272D 62%,#242126 100%)!important;border-right:1px solid #4A454C!important}
.sidebar .nav-section>summary{border-left-color:#C18F87!important;color:#F7F3F5!important}
.sidebar .nav-section[open]>summary,.sidebar .nav-link.active-link,.sidebar .nav-link[aria-current="page"]{background:rgba(193,143,135,.18)!important;border-left-color:#C18F87!important;box-shadow:inset 3px 0 0 #C18F87!important;color:#FFF!important}
.sidebar .nav-link:hover,.sidebar .nav-section>summary:hover{background:rgba(193,143,135,.12)!important}
.sidebar .nav-group-links{border-left-color:rgba(193,143,135,.42)!important}
.sidebar .side-count,.sidebar .avatar{background:#C18F87!important;color:#302D33!important}
.sidebar-brand-word,.sidebar-product-label{color:#F7F3F5!important}
.sidebar-brand-tagline,.sidebar-build-label,.sidebar-user-meta span{color:#C9C1C6!important}
.sidebar-brand-link:focus,.sidebar a:focus-visible{outline:2px solid #C18F87!important;outline-offset:2px}
.page-head,.page-header,.compact-hero,.gradient-head,.panel,.card,.admin-panel,.report-card,.dashboard-card,.module-card,.form-card,.table-wrap,.responsive-table,.stat-card,.young-stat-card,.allocated-stat,.planner-stat,.referral-kpi,.match-card,.young-person-modern-card,.modal,.modal-content,.dialog-card,[role="dialog"]{background:var(--ev-surface)!important;color:var(--ev-text)!important;border-color:var(--ev-border)!important}
.gradient-head{border-top:5px solid #C18F87!important;border-image:none!important}
.director-hero,.operational-head,.summary-hero{background:linear-gradient(135deg,#302D33,#51474D)!important;color:#F7F3F5!important}
.director-hero :is(h1,h2,h3,p,span,small),.operational-head :is(h1,h2,h3,p,span,small){color:inherit!important}
input,select,textarea,[contenteditable="true"]{background:var(--ev-surface-2)!important;color:var(--ev-text)!important;border-color:var(--ev-border)!important}
input::placeholder,textarea::placeholder{color:var(--ev-text-soft)!important}
input:focus,select:focus,textarea:focus,[contenteditable="true"]:focus{border-color:var(--ev-accent)!important;box-shadow:0 0 0 3px color-mix(in srgb,var(--ev-accent) 24%,transparent)!important}
select option{background:var(--ev-surface);color:var(--ev-text)}
button:not(.danger):not(.delete):not(.success):not(.warning),.button:not(.danger):not(.delete):not(.success):not(.warning),.button-link:not(.danger):not(.delete):not(.success):not(.warning),.primary-action,.primary-create-user,.btn-primary{background:#98655F!important;color:#FFF!important;border-color:#98655F!important}
button:not(.danger):not(.delete):not(.success):not(.warning):hover,.button:not(.danger):not(.delete):not(.success):not(.warning):hover,.button-link:not(.danger):not(.delete):not(.success):not(.warning):hover,.primary-action:hover,.primary-create-user:hover,.btn-primary:hover{background:#875B55!important;border-color:#875B55!important}
.button-light,.button.secondary,.secondary,.btn-secondary{background:var(--ev-surface-2)!important;color:var(--ev-accent-strong)!important;border-color:var(--ev-border)!important}
html[data-theme="dark"] button:not(.danger):not(.delete):not(.success):not(.warning),html[data-theme="dark"] .button:not(.danger):not(.delete):not(.success):not(.warning),html[data-theme="dark"] .button-link:not(.danger):not(.delete):not(.success):not(.warning),html[data-theme="dark"] .primary-action,html[data-theme="dark"] .primary-create-user,html[data-theme="dark"] .btn-primary{background:#C18F87!important;color:#302D33!important;border-color:#C18F87!important}
button:focus-visible,.button:focus-visible,.button-link:focus-visible,a:focus-visible{outline:3px solid color-mix(in srgb,#C18F87 72%,#FFF)!important;outline-offset:2px}
.tabs-panel,.clean-tabs,.filter-tabs,.access-tabs,.authority-view-tabs{background:var(--ev-surface-2)!important;border-color:var(--ev-border)!important}
.tabs-panel a,.clean-tabs a,.filter-tabs a,.access-tab,.authority-view-button{color:var(--ev-text)!important}
.tabs-panel a.active-tab,.clean-tabs a.active-tab,.filter-tabs a.active,.access-tab.active,.tabs-panel a[aria-current="page"],.filter-tabs a[aria-current="page"],.authority-view-button.active,.evidence-view-tabs a.active{background:#C18F87!important;border-color:#C18F87!important;color:#302D33!important}
th{background:var(--ev-surface-2)!important;color:var(--ev-text)!important;border-color:var(--ev-border)!important}td{border-color:var(--ev-border)!important}
tbody tr:hover td{background:color-mix(in srgb,var(--ev-accent) 9%,var(--ev-surface))!important}
.pill:not(.risk):not([class*="status-"]),.chip:not([class*="status-"]),.tag:not([class*="status-"]){background:var(--ev-accent-soft);color:var(--ev-accent-strong)}
.record:not(.high):not(.medium):not(.low){border-left-color:var(--ev-accent)!important}
.stats>div{border-top-color:#C18F87!important}.stats>div:nth-child(even){border-top-color:#302D33!important}
html[data-theme="dark"] .stats>div:nth-child(even){border-top-color:#D5AAA3!important}
.profile-photo.placeholder{background:linear-gradient(135deg,#302D33,#C18F87)!important}
html[data-theme="dark"] .sidebar.evorah-app-shell{background:linear-gradient(180deg,#29272D 0%,#242126 100%)!important;border-right-color:#514B53!important}
html[data-theme="dark"] :is(.panel,.card,.module-card,.form-card,.table-wrap,.page-head,.page-header,.modal-content,[role="dialog"]){background:#302D33!important;border-color:#514B53!important;color:#F7F3F5!important}
html[data-theme="dark"] :is(.detail-grid>div,.status-pill:not(.compliant):not(.warning):not(.danger),details,.record:not(.high):not(.medium):not(.low)){background:#29272D;color:#F7F3F5;border-color:#514B53}
html[data-theme="dark"] :is(.muted,.small,.helptext,small){color:#C9C1C6!important}
.login-main,.platform-admin-body{background:var(--ev-page)!important}
.login-box,.platform-login-card{background:var(--ev-surface)!important;color:var(--ev-text)!important;border:1px solid var(--ev-border)!important}
.platform-admin-header{background:#302D33!important;color:#F7F3F5!important;border-color:#514B53!important}.platform-admin-header a{color:#F7F3F5!important}
::-webkit-scrollbar-thumb{background:#98655F;border-radius:999px}*{scrollbar-color:#98655F transparent}
@media(prefers-contrast:more){:root{--ev-border:#A99DA1;--border:#A99DA1}html[data-theme="dark"]{--ev-border:#837A80;--border:#837A80}}

/* Template-local legacy teal declarations that cannot outrank this final layer. */
.voice-layout :focus-visible,.voice-manager :focus-visible{outline-color:#C18F87!important}
.voice-card{border-color:var(--ev-border)!important}
.voice-card blockquote{border-left-color:#C18F87!important}

/* Mobile companion inherits the same identity without changing its layout. */
.mobile-trial{background:var(--ev-page)!important;color:var(--ev-text)!important}
.mobile-top,.mobile-bottom{background:var(--ev-surface)!important;color:var(--ev-text)!important;border-color:var(--ev-border)!important}
.mobile-bottom a{color:var(--ev-text-soft)!important}
.mobile-bottom a[aria-current="page"]{color:var(--ev-accent-strong)!important;border-color:var(--ev-accent)!important}
.mobile-card,.mobile-panel,.mobile-list a{background:var(--ev-surface)!important;color:var(--ev-text)!important;border-color:var(--ev-border)!important}

/* Remaining legacy brand-specific components. Semantic state classes are excluded. */
.document-icon-tile svg{stroke:var(--ev-accent)!important}
.document-card-open,.file-quick-open,.document-library .document-card-open,.document-library .file-quick-open{color:var(--ev-accent-strong)!important}
.document-card-open:hover,.file-quick-open:hover{background:var(--ev-accent-soft)!important}
.evorah-alert-header{background:linear-gradient(135deg,#302D33,#51474D)!important}
.alert-when{color:var(--ev-text)!important}
.manager-review-panel,.placement-matching-readonly,.trend-review-box,.source-link-card{border-left-color:var(--ev-accent)!important}
.onboarding-steps .active,.action-view-tabs a.active{background:#C18F87!important;color:#302D33!important;border-color:#C18F87!important}
.insight-inline-toolbar>button,.insight-improve{background:var(--ev-accent-soft)!important;border-color:#C18F87!important;color:#302D33!important}
html[data-theme="dark"] .insight-inline-toolbar>button,html[data-theme="dark"] .insight-improve{background:#493B3D!important;color:#F7F3F5!important}
input[type="checkbox"]:checked{background:#C18F87!important;border-color:#98655F!important}
input[type="checkbox"]:checked::before{border-color:#302D33!important}
input[type="checkbox"]:focus-visible{outline-color:color-mix(in srgb,#C18F87 55%,transparent)!important}
.authority-row input,.staff-active-toggle input{accent-color:#C18F87!important}
.document-row-icon{border-color:color-mix(in srgb,#C18F87 50%,var(--ev-border))!important;color:var(--ev-accent)!important}
@keyframes evorahWorkflowPulse{0%{box-shadow:0 0 0 0 rgba(193,143,135,.42)}55%{box-shadow:0 0 0 8px rgba(193,143,135,.12)}100%{box-shadow:var(--ev-shadow)}}

/* Approved theme-specific logo variants. */
.evorah-theme-logo.evorah-logo-dark{display:none!important}
html[data-theme="dark"] .evorah-theme-logo.evorah-logo-light{display:none!important}
html[data-theme="dark"] .evorah-theme-logo.evorah-logo-dark{display:block!important}
.mobile-brand-symbol{display:grid;place-items:center;flex:0 0 auto}
.mobile-brand-symbol .evorah-theme-logo{grid-area:1/1;width:38px;height:38px;object-fit:cover;border-radius:10px}

/* Directory: legacy page-specific gradients were still visible in both themes. */
.young-people-hero,html[data-theme="dark"] .young-people-hero{background:linear-gradient(130deg,#302D33 0%,#463B42 65%,#765A59 100%)!important;color:#F7F3F5!important;box-shadow:var(--ev-shadow-strong)!important}
.young-people-hero:after{background:rgba(193,143,135,.16)!important}
.young-people-hero :is(h1,h2,h3,p,.page-eyebrow){color:#F7F3F5!important}
.young-people-hero .page-eyebrow{color:#E4B8B0!important}
.young-people-hero .add-young-person-primary,html[data-theme="dark"] .young-people-hero .add-young-person-primary{background:#C18F87!important;border-color:#C18F87!important;color:#302D33!important}
.young-people-hero .add-young-person-primary :is(strong,small){color:#302D33!important}
.young-people-hero .add-person-icon{background:#F6F2F0!important;color:#302D33!important}
.young-stat-card:not(.allocated):not(.unallocated):not(.closed){border-top-color:#C18F87!important}
.young-stat-icon,.directory-result-count{background:var(--ev-accent-soft)!important;color:var(--ev-accent-strong)!important}
.young-search-field,.empty-young-directory{background:var(--ev-surface-2)!important;border-color:var(--ev-border)!important}
.young-search-field>span,.young-filter-field>span,.young-card-details dt{color:var(--ev-text-soft)!important}
.young-person-modern-card:not(.medium):not(.high){border-left-color:#C18F87!important}
.young-card-photo.placeholder{background:linear-gradient(135deg,#302D33,#C18F87)!important;color:#FFF!important}
.young-card-details dd{color:var(--ev-text)!important}
.open-young-person-button{background:var(--ev-surface-2)!important;color:var(--ev-accent-strong)!important}
.open-young-person-button:hover{background:var(--ev-accent-soft)!important}
.modern-dialog-head{background:linear-gradient(125deg,#302D33,#765A59)!important;color:#F7F3F5!important}
.modern-dialog-head :is(h3,p,.page-eyebrow){color:#F7F3F5!important}
.modern-yp-form p{border-bottom-color:var(--ev-border)!important}
.modern-yp-form p label{color:var(--ev-text)!important}
.settings-dot{background:#C18F87!important;box-shadow:0 0 0 4px rgba(193,143,135,.16)!important}

/* CR4: restore legible foregrounds after the older dark-mode audit's teal rules. */
html[data-theme="light"] main a:not(.button):not(.btn):not(.nav-link):not(.active-tab):where(:not(.button-link,.button-light,.active,.tab-link,[aria-current="page"],.tabs-panel a,.clean-tabs a,.filter-tabs a,.access-tabs a,.action-view-tabs a,.evidence-view-tabs a,.authority-view-tabs a,.view-tabs a,.tab-list a)),
html[data-theme="dark"] main a:not(.button):not(.btn):not(.nav-link):not(.active-tab):where(:not(.button-link,.button-light,.active,.tab-link,[aria-current="page"],.tabs-panel a,.clean-tabs a,.filter-tabs a,.access-tabs a,.action-view-tabs a,.evidence-view-tabs a,.authority-view-tabs a,.view-tabs a,.tab-list a)){color:var(--ev-accent-strong)!important}
html[data-theme="light"] main a:not(.button):not(.btn):not(.nav-link):not(.active-tab):where(:not(.button-link,.button-light,.active,.tab-link,[aria-current="page"],.tabs-panel a,.clean-tabs a,.filter-tabs a,.access-tabs a,.action-view-tabs a,.evidence-view-tabs a,.authority-view-tabs a,.view-tabs a,.tab-list a)):hover,
html[data-theme="dark"] main a:not(.button):not(.btn):not(.nav-link):not(.active-tab):where(:not(.button-link,.button-light,.active,.tab-link,[aria-current="page"],.tabs-panel a,.clean-tabs a,.filter-tabs a,.access-tabs a,.action-view-tabs a,.evidence-view-tabs a,.authority-view-tabs a,.view-tabs a,.tab-list a)):hover{text-decoration:underline;color:var(--ev-text)!important}
html[data-theme="dark"] main :is(input,textarea,select):focus{outline:2px solid #C18F87!important;border-color:#C18F87!important;caret-color:#F7F3F5!important}
html[data-theme="dark"] main :is(input,textarea,select){caret-color:#F7F3F5!important}
html[data-theme="dark"] main :is(input,textarea)::placeholder{color:#C9C1C6!important}
html[data-theme="dark"] main select option{background:#302D33!important;color:#F7F3F5!important}
html[data-theme="dark"] main input[type="checkbox"],html[data-theme="dark"] main input[type="radio"]{accent-color:#C18F87!important}
html[data-theme="dark"] main tbody tr:hover{background:rgba(193,143,135,.10)!important}
/* Tab text, including counters, must follow the actual selected surface. */
html[data-theme="light"] main :is(.tabs-panel,.clean-tabs,.filter-tabs,.access-tabs,.action-view-tabs,.evidence-view-tabs,.authority-view-tabs,.view-tabs,.tab-list) :is(a,button,.access-tab,.authority-view-button,.view-tab,.tab-link):not(.active):not(.active-tab):not([aria-current="page"]),
html[data-theme="dark"] main :is(.tabs-panel,.clean-tabs,.filter-tabs,.access-tabs,.action-view-tabs,.evidence-view-tabs,.authority-view-tabs,.view-tabs,.tab-list) :is(a,button,.access-tab,.authority-view-button,.view-tab,.tab-link):not(.active):not(.active-tab):not([aria-current="page"]){background:var(--ev-surface-2)!important;color:var(--ev-text)!important;border-color:var(--ev-border)!important}
html[data-theme="light"] main :is(.tabs-panel,.clean-tabs,.filter-tabs,.access-tabs,.action-view-tabs,.evidence-view-tabs,.authority-view-tabs,.view-tabs,.tab-list) :is(a,button,.access-tab,.authority-view-button,.view-tab,.tab-link):is(.active,.active-tab,[aria-current="page"]),
html[data-theme="dark"] main :is(.tabs-panel,.clean-tabs,.filter-tabs,.access-tabs,.action-view-tabs,.evidence-view-tabs,.authority-view-tabs,.view-tabs,.tab-list) :is(a,button,.access-tab,.authority-view-button,.view-tab,.tab-link):is(.active,.active-tab,[aria-current="page"]){background:#C18F87!important;color:#302D33!important;border-color:#C18F87!important}
html[data-theme="dark"] main :is(.tabs-panel,.clean-tabs,.filter-tabs,.access-tabs,.action-view-tabs,.evidence-view-tabs,.authority-view-tabs,.view-tabs,.tab-list) :is(a,button,.access-tab,.authority-view-button,.view-tab,.tab-link):is([aria-disabled="true"],:disabled){opacity:.65}
main a.btn.btn-primary,main a.button,main a.button-link{color:#FFF!important;text-decoration:none!important}
html[data-theme="dark"] main a.btn.btn-primary,html[data-theme="dark"] main a.button,html[data-theme="dark"] main a.button-link{color:#302D33!important}
main a.btn.btn-primary:hover,main a.button:hover,main a.button-link:hover{text-decoration:none!important}
main a.button-light,main a.button.secondary,html[data-theme="dark"] main a.button-light,html[data-theme="dark"] main a.button.secondary{background:var(--ev-surface-2)!important;color:var(--ev-accent-strong)!important;border-color:var(--ev-border)!important}
main a.button-light:hover,main a.button.secondary:hover{background:var(--ev-accent-soft)!important}
/* The shell stays charcoal; a warm light-mode logo tile makes the symbol readable. */
.sidebar-brand-mark{background:#F6F2F0!important;border:1px solid rgba(193,143,135,.7)!important;box-shadow:0 2px 10px rgba(0,0,0,.22)!important;overflow:hidden}
.sidebar-brand-symbol{object-fit:cover!important;filter:none!important;border-radius:12px!important}
.sidebar-brand-word{text-shadow:none!important;color:#F7F3F5!important}
html[data-theme="dark"] .sidebar-brand-mark{background:#19191D!important;border-color:#C18F87!important}
html[data-theme="dark"] .sidebar-brand-word{color:#F7F3F5!important}
.sidebar-brand-tagline{color:#E5DBDE!important}
/* Staff oversight: legacy white work cards had light text on a light surface. */
main .planner-item{background:var(--ev-surface-2)!important;color:var(--ev-text)!important;border-color:var(--ev-border)!important}
main .planner-item .planner-date{background:var(--ev-accent-soft)!important;color:var(--ev-accent-strong)!important}
main .planner-item .planner-date strong,main .planner-item .planner-copy :is(h3,p){color:var(--ev-text)!important}
main .planner-item .pill{background:var(--ev-accent-soft)!important;color:var(--ev-accent-strong)!important}
/* Evidence Hub retains warning and success statuses while ordinary navigation uses rose. */
main .evidence-question-grid a,html[data-theme="dark"] main .evidence-question-grid a{background:var(--ev-surface-2)!important;border-color:var(--ev-border)!important;color:var(--ev-text)!important}
main .evidence-question-grid a:hover{background:var(--ev-accent-soft)!important;color:var(--ev-text)!important}
main .evidence-row,html[data-theme="dark"] main .evidence-row{background:var(--ev-surface-2)!important;border-color:var(--ev-border)!important;color:var(--ev-text)!important}
main .evidence-row :is(h3,p,small){color:var(--ev-text)!important}
main .evidence-row .evidence-next{background:var(--ev-surface-3)!important}
main .evidence-standard-card>strong{color:var(--ev-accent-strong)!important}
/* The theme controls must show one selected option rather than three pink buttons. */
.theme-switcher button,.theme-switcher button:hover,html[data-theme="dark"] .theme-switcher button{background:transparent!important;color:var(--ev-text)!important;border-color:transparent!important}
.theme-switcher button:hover{background:var(--ev-accent-soft)!important}
.theme-switcher button.active,html[data-theme="dark"] .theme-switcher button.active{background:#C18F87!important;color:#302D33!important;border-color:#C18F87!important}
