/* One approved brand green in both modes. Folder covers and personal content keep their own colors. */
:root,:root[data-accent=green],:root[data-theme=dark][data-accent=green]{--accent:#083e04;--accent-hover:#052d02;--accent-soft:#e8eddc;--accent-ink:#163e12;--on-accent:#fff8e8;--brand-crest-accent:#083e04}
:root[data-theme=dark]{--page:#111b16;--panel:#1b2820;--subtle:#26372c;--field:#17241c;--edge:#4f5948;--text:#f4eddd;--quiet:#c2cbbb;--heritage-gold:#c3a266;--heritage-gold-soft:#85734d;--heritage-shadow:#0005;--paper-grain:none}
:root[data-theme=dark][data-accent=green]{--accent-soft:#263c24;--accent-ink:#c1d6b3;--brand-crest-accent:#083e04}
:root[data-theme=dark] body{background:var(--page);color:var(--text)}
:root[data-theme=dark] .main{background:transparent}
:root[data-theme=dark] .sidebar{background:#142018;border-color:var(--edge)}
:root[data-theme=dark] .main>.topbar{background:linear-gradient(110deg,#253327,#192b1d);border-color:var(--edge)}
:root[data-theme=dark] .main::before{opacity:.035;filter:sepia(.7) brightness(.8)}
:root[data-theme=dark] .sidebar::after{opacity:.045;filter:sepia(.7) brightness(.8)}
:root[data-theme=dark] .heritage-home .nexo-card{background-color:var(--panel);background-image:none;border-color:var(--edge)}
:root[data-theme=dark] .card,:root[data-theme=dark] .stat,:root[data-theme=dark] .home-disclosure,:root[data-theme=dark] .modal,:root[data-theme=dark] .auth-card,:root[data-theme=dark] .community-post,:root[data-theme=dark] .community-compose,:root[data-theme=dark] .community-chats-list{background-color:var(--panel);background-image:none}
:root[data-theme=dark] .sidebar .nav button.active{background:#283f27;border-color:#4b6242;color:#f4eddd}
:root[data-theme=dark] .sidebar .side-bottom .heritage-flourish{background:#142018}
:root[data-theme=dark] .btn:not(.primary):not(.danger),:root[data-theme=dark] .back-button,:root[data-theme=dark] .tabs button:not(.active){background-color:var(--panel);color:var(--text)}
:root[data-theme=dark] .btn.primary,:root[data-theme=dark] .heritage-primary-actions>.btn.primary{background-color:var(--accent);color:var(--on-accent);border-color:var(--heritage-gold)}
:root[data-theme=dark] .heritage-mode-switch [aria-pressed=true]{background:#3b4e35;color:#fff4d9}
:root[data-theme=dark] .heritage-progress-track .progress,:root[data-theme=dark] .heritage-resume-progress .progress{background:#344335;border-color:#657653;box-shadow:none}
:root[data-theme=dark] .heritage-progress-track .progress>span,:root[data-theme=dark] .heritage-resume-progress .progress>span{background:linear-gradient(90deg,#52763c,#87a35e);border-color:#91a675;box-shadow:none}
:root[data-theme=dark] .heritage-book::after{background:radial-gradient(ellipse at 45% 20%,#ffffff07,transparent 65%),color-mix(in srgb,var(--book-color) 38%,#061409)}
:root[data-theme=dark] .nexo-folder-cover.heritage-book .heritage-book-title,:root[data-theme=dark] .folder-gallery .folder-cover.heritage-book .heritage-book-title{color:#fff1c9;text-shadow:0 1px 3px #000b}
:root[data-theme=dark] .heritage-book-symbol{color:#ead08a}
:root[data-theme=dark] .coach-mission-eyebrow{color:#cbb57f}
:root[data-theme=dark] .coach-mission-portrait>svg{opacity:.24}
:root[data-theme=dark] .heritage-home .coach-mission.heritage-mission{background:linear-gradient(120deg,#233327,var(--panel));border-color:var(--heritage-gold-soft)}
:root[data-theme=dark] .mobile-nav,:root[data-theme=dark] .community-bottom{background:var(--panel);color:var(--text)}
.appearance-choice{border-color:var(--edge);border-radius:6px}
.appearance-choice[aria-pressed=true]{border-color:var(--heritage-gold);box-shadow:0 0 0 2px color-mix(in srgb,var(--heritage-gold) 25%,transparent);color:var(--text)}
.mode-preview.mode-light{background:#fbf5e7;border-color:#d8c6a3}
.mode-preview.mode-light i{background:#b2bea5}
.mode-preview.mode-dark{background:#17271c;border-color:#56664a}
.mode-preview.mode-dark i{background:#6b8560}
/* A single mobile header geometry prevents older height rules from clipping the crest. */
@media(max-width:700px){
 :root{--mobile-top:72px}
 html{scroll-padding-top:84px}
 .main>.topbar{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;box-sizing:border-box;height:var(--mobile-top)!important;min-height:var(--mobile-top)!important;padding:8px 12px!important;gap:6px!important;overflow:visible}
 .main>.topbar>.mobile-menu{align-self:center;min-width:0;justify-self:start}
 .main>.topbar .mobile-menu>summary{display:grid!important;place-items:center;width:42px!important;height:42px;min-height:42px!important;padding:8px!important;font-size:20px!important;line-height:1;list-style:none}
 .main>.topbar .mobile-menu>summary::-webkit-details-marker{display:none}
 .main>.topbar>.top-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px;min-width:0;height:44px;align-self:center}
 .main>.topbar .heritage-mode-switch{display:flex;align-items:center;justify-content:center;flex:none;width:64px;height:36px;margin:0;padding:2px;gap:2px;box-sizing:border-box}
 .main>.topbar .heritage-mode-switch button{display:grid;place-items:center;flex:none;width:28px;height:28px;padding:5px}
 .main>.topbar .heritage-mode-switch .heritage-ui-icon{width:17px;height:17px}
 .app:has(.content[data-page=inicio]) .main>.topbar{grid-template-columns:64px minmax(0,1fr) 64px}
 .app:has(.content[data-page=inicio]) .main>.topbar .heritage-mobile-brand{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;height:54px;min-width:0;margin:0;padding:0;font-size:clamp(18px,5vw,21px);line-height:1.1;letter-spacing:-.045em;white-space:nowrap}
 .main>.topbar .heritage-mobile-brand>svg{display:block;flex:0 0 42px;width:42px;height:44px;max-height:44px;overflow:hidden}
 .main>.topbar .breadcrumb{min-width:0;max-width:100%;margin:0;align-items:center}
 .main>.topbar .breadcrumb b{min-width:0;max-width:none}
 .main>.topbar .top-actions .avatar{flex:none;width:30px;height:30px}
}
@media(max-width:359px){
 .main>.topbar{padding-inline:10px!important;gap:6px!important}
 .app:has(.content[data-page=inicio]) .main>.topbar{grid-template-columns:56px minmax(0,1fr) 56px}
 .app:has(.content[data-page=inicio]) .main>.topbar .heritage-mobile-brand{gap:4px;font-size:18px}
 .main>.topbar .heritage-mobile-brand>svg{flex-basis:34px;width:34px;height:38px;max-height:38px}
 .main>.topbar .heritage-mode-switch{width:56px;padding:2px;gap:0}
 .main>.topbar .heritage-mode-switch button{width:25px;height:28px;padding:4px}
}
