:root{
  --theme-focus:#7fb0ff;
  --theme-dark-bg:#0b1e3f;
  --theme-dark-surface:#122a4c;
  --theme-dark-surface-2:#18375f;
  --theme-dark-text:#eef3f9;
  --theme-dark-muted:#c0c9d7;
  --theme-dark-accent:#a9c7ee;
  --theme-dark-action:#3974b5;
  --theme-dark-border:#4c688f;
}

.leirus-theme-toggle{
  position:fixed;right:max(18px,env(safe-area-inset-right));bottom:max(18px,env(safe-area-inset-bottom));z-index:990;
  display:flex;align-items:center;gap:8px;min-height:44px;padding:10px 14px;border:1px solid rgba(255,255,255,.2);
  border-radius:999px;background:#0b1e3f;color:#fff;box-shadow:0 8px 28px rgba(3,10,22,.24);
  font:600 12px/1.2 "Helvetica Neue",Helvetica,Arial,sans-serif;letter-spacing:.01em;cursor:pointer;
  transition:background .2s ease,border-color .2s ease,transform .2s ease,box-shadow .2s ease;
}
.leirus-theme-toggle:hover{transform:translateY(-2px);box-shadow:0 12px 32px rgba(3,10,22,.32);}
.leirus-theme-toggle:focus-visible{outline:3px solid var(--theme-focus);outline-offset:3px;}
.leirus-theme-toggle [data-theme-icon]{font-size:18px;line-height:1;}
html[data-theme="dark"] .leirus-theme-toggle{background:#f4f7fb;color:#0b1e3f;border-color:#f4f7fb;}

html:not([data-leirus-app])[data-theme="dark"]{
  --graphite:var(--theme-dark-text);
  --gray:var(--theme-dark-muted);
  --gray-light:var(--theme-dark-border);
  --white:var(--theme-dark-bg);
  --bg:var(--theme-dark-bg);
  --red:#ff9088;
}
/* overflow-x va en body, no en html: overflow != visible en <html> rompe
   el calculo de position:sticky de sus descendientes (ej. la seccion
   "Investigar/Cuestionar/Juzgar" en index.html), haciendo que el
   contenido pineado se dibuje cientos de px fuera del viewport conforme
   se hace scroll. body si es seguro para esto. */
html:not([data-leirus-app])[data-theme="dark"] body{background:var(--theme-dark-bg);color:var(--theme-dark-text);overflow-x:hidden;}
html:not([data-leirus-app])[data-theme="dark"] :where(.card,.panel,.newsletter-box,.booking-form,.profile-test,.investor-latest,.answer-item,.result-card,.research-card,.client-card,.stat-card,.summary-card,.profile-hero,.rank-row,.event-card,.calendar-card,.modal-content,.post-card,.mw-card,.ew-card,.ew-dialog,.agenda-metric,.agenda-task){
  background:var(--theme-dark-surface)!important;border-color:var(--theme-dark-border)!important;color:var(--theme-dark-text);
  box-shadow:0 8px 28px rgba(0,0,0,.18);
}
html:not([data-leirus-app])[data-theme="dark"] :where(.intro,.filosofia,.framework,.system-block,.capabilities,.newsletter-section,.blog-main,.post-wrap,.wrap){background-color:var(--theme-dark-bg)!important;}
html:not([data-leirus-app])[data-theme="dark"] header{background:rgba(11,30,63,.94)!important;border-bottom:1px solid rgba(76,104,143,.55);box-shadow:0 8px 28px rgba(0,0,0,.14)!important;}
html:not([data-leirus-app])[data-theme="dark"] :where(.hero,.cycle-scroll,.statement,.booking-section,.post-hero){background:var(--theme-dark-bg)!important;}
html:not([data-leirus-app])[data-theme="dark"] body:has(.hero) header{
  background:var(--theme-dark-bg)!important;border-bottom-color:transparent;box-shadow:none!important;
}
html:not([data-leirus-app])[data-theme="dark"] footer{background:#08172f!important;border-top:1px solid var(--theme-dark-border);}
html:not([data-leirus-app])[data-theme="dark"] .footer-copy{color:#9eabbc!important;}
html:not([data-leirus-app])[data-theme="dark"] :where(.profile-tab,.client-detail-tab,.slot-btn,.q-option,#postEditor){background:var(--theme-dark-surface-2)!important;border-color:var(--theme-dark-border)!important;color:var(--theme-dark-text)!important;}
html:not([data-leirus-app])[data-theme="dark"] :where(.client-detail-tabs){background:#0d2341!important;border:1px solid var(--theme-dark-border);}
html:not([data-leirus-app])[data-theme="dark"] :where(.profile-tab[aria-selected="true"],.client-detail-tab.active,.tab-btn.active){background:var(--theme-dark-action)!important;color:#fff!important;border-color:var(--theme-dark-action)!important;box-shadow:none!important;}
html:not([data-leirus-app])[data-theme="dark"] :where(input,textarea,select,[contenteditable="true"]){
  background:var(--theme-dark-surface-2)!important;color:var(--theme-dark-text)!important;border-color:var(--theme-dark-border)!important;
}
html:not([data-leirus-app])[data-theme="dark"] :where(input,textarea)::placeholder{color:#8290a4;opacity:1;}
html:not([data-leirus-app])[data-theme="dark"] :where(input,textarea,select,button,a,[tabindex]):focus-visible{outline:3px solid var(--theme-focus)!important;outline-offset:2px;}
html:not([data-leirus-app])[data-theme="dark"] :where(.menu-overlay){
  background:
    radial-gradient(circle at 50% 35%,rgba(33,72,123,.22),transparent 38%),
    var(--theme-dark-bg)!important;
}
html:not([data-leirus-app])[data-theme="dark"] .menu-overlay nav{
  width:min(520px,calc(100% - 48px));gap:4px;padding:18px;
}
html:not([data-leirus-app])[data-theme="dark"] .menu-overlay nav > a.menu-link{
  width:100%;padding:13px 24px!important;border:1px solid transparent;border-radius:10px;
  color:var(--theme-dark-text)!important;font-weight:300;text-align:center;
  transition:opacity .6s var(--ease),transform .6s var(--ease),color .2s ease;
}
html:not([data-leirus-app])[data-theme="dark"] .menu-overlay nav > a.menu-link:hover{
  color:#fff!important;
}
html:not([data-leirus-app])[data-theme="dark"] .menu-overlay nav > a.menu-link:focus-visible{
  color:#fff!important;outline:2px solid var(--theme-focus);outline-offset:2px;
}
html:not([data-leirus-app])[data-theme="dark"] .menu-close{
  color:var(--theme-dark-text)!important;background:var(--theme-dark-surface-2)!important;
  border:1px solid var(--theme-dark-border)!important;border-radius:50%;
}
html:not([data-leirus-app])[data-theme="dark"] .menu-close:hover{opacity:1;background:#1d304b!important;}
html:not([data-leirus-app])[data-theme="dark"] .menu-overlay .lang-mobile,
html:not([data-leirus-app])[data-theme="dark"] .menu-overlay .lang-mobile a{color:var(--theme-dark-muted)!important;}
html:not([data-leirus-app])[data-theme="dark"] .menu-overlay .lang-mobile a.active{color:#fff!important;}
html:not([data-leirus-app])[data-theme="dark"] :where(header.scrolled,.nav-bar.scrolled){background:rgba(11,30,63,.98)!important;border-color:var(--theme-dark-border)!important;box-shadow:0 1px 20px rgba(0,0,0,.22)!important;}
html:not([data-leirus-app])[data-theme="dark"] header.scrolled :where(.lang-switch a,.menu-btn),
html:not([data-leirus-app])[data-theme="dark"] :where(.lang-switch a,.menu-btn){color:var(--theme-dark-muted)!important;}
html:not([data-leirus-app])[data-theme="dark"] :where(.lang-switch a.active,.lang-switch a:hover,header.scrolled .lang-switch a.active,header.scrolled .lang-switch a:hover,.menu-btn:hover){color:#fff!important;}
html:not([data-leirus-app])[data-theme="dark"] :where(.lang-switch span,header.scrolled .lang-switch span){color:#9eabbc!important;}
html:not([data-leirus-app])[data-theme="dark"] :where(.brand-logo text,.brand-logo path,.menu-btn line,.menu-btn span){fill:#fff!important;stroke:#fff!important;color:#fff!important;}
html:not([data-leirus-app])[data-theme="dark"] :where(h1,h2,h3,h4,h5,h6,.panel h3,.dash-head h2,.login-wrap h1,.mfa-wrap h1){color:var(--theme-dark-text)!important;}
html:not([data-leirus-app])[data-theme="dark"] :where(p,label,.hint,.muted,.dash-sub,.field-hint,.post-meta,.blog-meta){color:var(--theme-dark-muted);}
html:not([data-leirus-app])[data-theme="dark"] :where(
  .section-eyebrow,.group-title,.q-section-title,.result-eyebrow,.q-text,.result-profile,
  .investor-latest .il-profile,.dropzone-label strong,.stat-card .sv,.summary-card .sv,
  .profile-name,.history-profile,.tab-btn.active,.post-back,.post-body a,.back-link
){color:var(--theme-dark-accent)!important;}
html:not([data-leirus-app])[data-theme="dark"] :where(.philo-lead,.intro-closing,.result-desc){color:var(--theme-dark-text)!important;}
html:not([data-leirus-app])[data-theme="dark"] :where(.section-eyebrow)::before,
html:not([data-leirus-app])[data-theme="dark"] :where(.pilar-rule){background:var(--theme-dark-accent)!important;}
html:not([data-leirus-app])[data-theme="dark"] :where(th,td){border-color:var(--theme-dark-border)!important;}
html:not([data-leirus-app])[data-theme="dark"] :where(code,pre,.qr-box,.progress-track){background:var(--theme-dark-surface-2)!important;}
html:not([data-leirus-app])[data-theme="dark"] :where(.btn-secondary){color:var(--theme-dark-text)!important;border-color:var(--theme-dark-border)!important;}
html:not([data-leirus-app])[data-theme="dark"] :where(.password-toggle,.back,.tag,.research-thumb.empty){color:var(--theme-dark-accent)!important;}
html:not([data-leirus-app])[data-theme="dark"] :where(#uvaDashLink,.research-actions button:hover,.post-actions button:hover,.back-link:hover){color:var(--theme-dark-accent)!important;border-color:var(--theme-dark-accent)!important;}
html:not([data-leirus-app])[data-theme="dark"] .tag{background:rgba(169,199,238,.12)!important;border:1px solid rgba(169,199,238,.24);}
html:not([data-leirus-app])[data-theme="dark"] .agenda-alert{background:#132942;border-color:#35506f;color:#c6d2e1;}
html:not([data-leirus-app])[data-theme="dark"] .agenda-alert strong{color:#f3f7fc;}
html:not([data-leirus-app])[data-theme="dark"] .agenda-alert button,
html:not([data-leirus-app])[data-theme="dark"] .agenda-reference a{color:#a9c7ee;}
html:not([data-leirus-app])[data-theme="dark"] .agenda-metric{background:#17283d!important;border-color:#344963!important;}
html:not([data-leirus-app])[data-theme="dark"] .agenda-metric .value,
html:not([data-leirus-app])[data-theme="dark"] .agenda-month-label{color:#eef3f9;}
html:not([data-leirus-app])[data-theme="dark"] .agenda-month-nav button,
html:not([data-leirus-app])[data-theme="dark"] .agenda-icon-btn{background:#17283d;color:#eef3f9;border-color:#405674;}
html:not([data-leirus-app])[data-theme="dark"] .agenda-day{background:#111f31;border-color:#2a3f58;color:#eef3f9;}
html:not([data-leirus-app])[data-theme="dark"] .agenda-day.outside{background:#0d1928;}
html:not([data-leirus-app])[data-theme="dark"] .agenda-day.today{background:#173254;box-shadow:inset 0 0 0 1px #7599c5;}
html:not([data-leirus-app])[data-theme="dark"] .agenda-day.today .agenda-day-number{color:#d7e7fa;}
html:not([data-leirus-app])[data-theme="dark"] .agenda-chip{background:#1b3553;color:#dbe6f3;border-left-color:#7d9fc7;}
html:not([data-leirus-app])[data-theme="dark"] .agenda-chip.high{background:#3c321b;color:#f4d78b;border-left-color:#d39b3f;}
html:not([data-leirus-app])[data-theme="dark"] .agenda-chip.critical,
html:not([data-leirus-app])[data-theme="dark"] .agenda-chip.overdue{background:#442428;color:#ffc0bb;border-left-color:#ff8c84;}
html:not([data-leirus-app])[data-theme="dark"] .agenda-task{background:#111f31!important;border-color:#2a3f58!important;}
html:not([data-leirus-app])[data-theme="dark"] .agenda-task-title,
html:not([data-leirus-app])[data-theme="dark"] .agenda-suggestion-title{color:#eef3f9;}
html:not([data-leirus-app])[data-theme="dark"] .agenda-date-box{background:#18375f;color:#dceafb;}
html:not([data-leirus-app])[data-theme="dark"] .agenda-task.overdue .agenda-date-box{background:#4b2428;color:#ffc0bb;}
html:not([data-leirus-app])[data-theme="dark"] .agenda-task-actions button{color:#c0c9d7;border-color:#405674;}
html:not([data-leirus-app])[data-theme="dark"] .agenda-suggestion{border-color:#2a3f58;}
html:not([data-leirus-app])[data-theme="dark"] .agenda-config-error{background:#3d351f;border-color:#6d5c2f;color:#f1daa0;}
html:not([data-leirus-app])[data-theme="dark"] .progress-fill{background:var(--theme-dark-action)!important;}
html:not([data-leirus-app])[data-theme="dark"] :where(.status-pill,.status-pill.planning,.status-pill.in_progress){background:#16375f!important;color:#c9ddf7!important;}
html:not([data-leirus-app])[data-theme="dark"] .status-pill.review{background:#493c18!important;color:#f7dc88!important;}
html:not([data-leirus-app])[data-theme="dark"] .status-pill.completed{background:#153d2a!important;color:#9de0b9!important;}
html:not([data-leirus-app])[data-theme="dark"] .status-pill.on_hold{background:#4b2428!important;color:#ffb0aa!important;}
html:not([data-leirus-app])[data-theme="dark"] :where(.btn:not(.btn-secondary),.submit-btn,.newsletter-form button,.booking-form button[type="submit"]){
  background:var(--theme-dark-action)!important;color:#fff!important;border-color:var(--theme-dark-action)!important;
}
html:not([data-leirus-app])[data-theme="dark"] :where(.btn:not(.btn-secondary),.submit-btn,.newsletter-form button,.booking-form button[type="submit"]):hover{
  background:#4683c4!important;border-color:#4683c4!important;opacity:1;
}
html:not([data-leirus-app])[data-theme="dark"] :where(.cookie-banner){background:#0d2341!important;color:var(--theme-dark-text)!important;border-color:var(--theme-dark-border)!important;}
html:not([data-leirus-app])[data-theme="dark"] img[data-theme-logo]{background:transparent!important;border-radius:0;filter:brightness(0) invert(1);}

/* Acceso oscuro: una sola composición editorial, clara y contemporánea. */
html:not([data-leirus-app])[data-theme="dark"] .login-wrap{
  width:100%;max-width:870px;margin:clamp(36px,6vh,68px) auto;padding:0 24px;
}
html:not([data-leirus-app])[data-theme="dark"] .login-wrap .card{
  position:relative;isolation:isolate;display:grid;grid-template-columns:minmax(280px,40%) minmax(420px,60%);
  min-height:495px;overflow:hidden;padding:0!important;border:0!important;border-radius:18px;
  background:linear-gradient(90deg,#102a52 0 40%,#eef2f7 40% 100%)!important;
  box-shadow:0 24px 64px rgba(2,10,25,.22)!important;
}
html:not([data-leirus-app])[data-theme="dark"] .login-wrap .card::before{
  content:none;
}
html:not([data-leirus-app])[data-theme="dark"] .login-wrap .card>*{position:relative;z-index:1;}
html:not([data-leirus-app])[data-theme="dark"] .login-wrap .login-logo{
  grid-column:1;grid-row:1 / span 6;align-self:center;justify-self:center;width:min(270px,80%);height:auto;
  margin:0!important;filter:brightness(0) invert(1);opacity:.98;
}
html:not([data-leirus-app])[data-theme="dark"] .login-wrap h1{
  grid-column:2;align-self:end;margin:52px 48px 8px!important;color:#10213f!important;
  font-size:26px!important;font-weight:600!important;letter-spacing:-.025em;
}
html:not([data-leirus-app])[data-theme="dark"] .login-wrap .card>p{
  grid-column:2;margin:0 48px 26px!important;color:#626d80!important;font-size:14px;
}
html:not([data-leirus-app])[data-theme="dark"] .login-wrap #loginForm,
html:not([data-leirus-app])[data-theme="dark"] .login-wrap #forgotForm{
  grid-column:2;margin:0 48px!important;
}
html:not([data-leirus-app])[data-theme="dark"] .login-wrap .field label{color:#3d4b60!important;font-size:12px;}
html:not([data-leirus-app])[data-theme="dark"] .login-wrap .field input{
  min-height:50px;background:#fff!important;border:1px solid #ccd6e3!important;color:#10213f!important;
  border-radius:10px;box-shadow:0 1px 2px rgba(16,33,63,.03);
  transition:border-color .2s ease,box-shadow .2s ease,background .2s ease;
}
html:not([data-leirus-app])[data-theme="dark"] .login-wrap .field input:hover{border-color:#aabbd0!important;}
html:not([data-leirus-app])[data-theme="dark"] .login-wrap .field input:focus{
  background:#fff!important;border-color:#3974b5!important;box-shadow:0 0 0 4px rgba(57,116,181,.12)!important;
}
html:not([data-leirus-app])[data-theme="dark"] .login-wrap .password-toggle{color:#345b88!important;}
html:not([data-leirus-app])[data-theme="dark"] .login-wrap .password-toggle:hover{background:#edf3fa!important;}
html:not([data-leirus-app])[data-theme="dark"] .login-wrap .btn:not(.btn-secondary){
  width:100%;min-height:50px;background:#102a52!important;border-color:#102a52!important;color:#fff!important;
  border-radius:10px;font-weight:600;box-shadow:0 9px 22px rgba(16,42,82,.15);
}
html:not([data-leirus-app])[data-theme="dark"] .login-wrap .btn:not(.btn-secondary):hover{
  background:#1b4172!important;border-color:#1b4172!important;transform:translateY(-1px);box-shadow:0 12px 26px rgba(16,42,82,.2);
}
html:not([data-leirus-app])[data-theme="dark"] .login-wrap #forgotWrap{
  grid-column:2;margin:18px 48px 42px!important;text-align:center;
}
html:not([data-leirus-app])[data-theme="dark"] .login-wrap #forgotLink{
  color:#52637a!important;text-decoration:none;border-bottom:1px solid #b8c4d2;padding-bottom:2px;
}
html:not([data-leirus-app])[data-theme="dark"] .login-wrap #forgotLink:hover{color:#102a52!important;border-color:#102a52;}
html:not([data-leirus-app])[data-theme="dark"] .login-wrap .card:not(:has(#forgotWrap)) #loginForm{padding-bottom:68px;}
html:not([data-leirus-app])[data-theme="dark"] .login-wrap .idle-notice{
  position:relative;margin-top:16px;padding:10px 12px 10px 36px;border:1px solid #d8e3ef;
  border-radius:8px;background:#edf3f9;color:#52637a!important;line-height:1.45;
}
html:not([data-leirus-app])[data-theme="dark"] .login-wrap .idle-notice::before{
  content:'i';position:absolute;left:12px;top:10px;width:16px;height:16px;border:1px solid #6e88a7;
  border-radius:50%;color:#526b8b;font:700 11px/15px var(--mono);text-align:center;
}

html:not([data-leirus-app])[data-theme="dark"] .mfa-wrap .card{
  background:#f7f9fc!important;border-color:#d5dfeb!important;box-shadow:0 26px 70px rgba(2,10,25,.24)!important;
}
html:not([data-leirus-app])[data-theme="dark"] .mfa-wrap :where(h1,label){color:#10213f!important;}
html:not([data-leirus-app])[data-theme="dark"] .mfa-wrap p{color:#657084!important;}
html:not([data-leirus-app])[data-theme="dark"] .mfa-wrap :where(input,.code-input){background:#fff!important;border-color:#ccd6e3!important;color:#10213f!important;}
html:not([data-leirus-app])[data-theme="dark"] .mfa-wrap .btn:not(.btn-secondary){background:#102a52!important;color:#fff!important;}

@media(max-width:760px){
  html:not([data-leirus-app])[data-theme="dark"] .login-wrap{max-width:408px;margin:24px auto 84px;padding:0 16px;}
  html:not([data-leirus-app])[data-theme="dark"] .login-wrap .card{
    display:block;min-height:0;padding:0 0 28px!important;border-radius:16px;
    background:linear-gradient(180deg,#102a52 0 150px,#eef2f7 150px 100%)!important;
  }
  html:not([data-leirus-app])[data-theme="dark"] .login-wrap .login-logo{
    width:min(215px,68%);margin:0 auto 66px!important;padding-top:32px;
  }
  html:not([data-leirus-app])[data-theme="dark"] .login-wrap h1{
    margin:0 26px 8px!important;font-size:22px!important;
  }
  html:not([data-leirus-app])[data-theme="dark"] .login-wrap .card>p{margin:0 26px 24px!important;}
  html:not([data-leirus-app])[data-theme="dark"] .login-wrap :where(#loginForm,#forgotForm){margin:0 26px!important;}
  html:not([data-leirus-app])[data-theme="dark"] .login-wrap #forgotWrap{margin:18px 26px 0!important;}
  html:not([data-leirus-app])[data-theme="dark"] .login-wrap .card:not(:has(#forgotWrap)) #loginForm{padding-bottom:0;}
}

/* Portal: jerarquía visible, superficies neutrales y acciones fáciles de encontrar. */
html:not([data-leirus-app])[data-theme="dark"] .dash{
  max-width:1240px;padding:46px 28px 110px;
}
html:not([data-leirus-app])[data-theme="dark"] .dash-head{
  align-items:center!important;margin-bottom:6px;padding:0 2px;
}
html:not([data-leirus-app])[data-theme="dark"] .dash-head h2{
  font-size:clamp(30px,3vw,42px)!important;line-height:1.12;letter-spacing:-.035em!important;
}
html:not([data-leirus-app])[data-theme="dark"] .dash-sub{
  max-width:680px;margin:0 0 28px;color:#aeb9c9!important;font-size:15px;line-height:1.65;
}
html:not([data-leirus-app])[data-theme="dark"] #profileToggleBtn{
  min-height:44px;padding:0 18px;border:1px solid #405674!important;border-radius:999px;
  background:#13233a!important;color:#edf3fb!important;font-family:var(--sans)!important;font-size:13px!important;
  letter-spacing:0!important;font-weight:600;box-shadow:0 7px 18px rgba(2,9,20,.13);transition:all .2s ease;
}
html:not([data-leirus-app])[data-theme="dark"] #profileToggleBtn:hover{
  background:#1a304d!important;border-color:#637d9f!important;transform:translateY(-1px);
}
html[data-theme="dark"] .client-portal #uvaDashLink:hover{background:#1a3a5f!important;transform:translateY(-1px);}
html:not([data-leirus-app])[data-theme="dark"] .dash-grid{
  grid-template-columns:minmax(0,1fr) 360px;gap:20px;
}
html:not([data-leirus-app])[data-theme="dark"] .dash .panel,
html:not([data-leirus-app])[data-theme="dark"] .dash-side :where(.mw-card,.ew-card){
  background:#111f31!important;border:1px solid #263950!important;border-radius:18px!important;
  box-shadow:0 14px 38px rgba(2,9,20,.16)!important;
}
html:not([data-leirus-app])[data-theme="dark"] .dash .panel{padding:28px;margin-bottom:20px;}
html:not([data-leirus-app])[data-theme="dark"] .dash .panel h3{
  margin-bottom:20px;color:#f4f7fb!important;font-size:18px;font-weight:650;letter-spacing:-.02em;
}
html:not([data-leirus-app])[data-theme="dark"] .dash-main>.panel>.research-grid>.empty-state{
  min-height:150px;display:flex;align-items:center;justify-content:center;padding:28px;border:1px dashed #334861;
  border-radius:13px;background:#0d1928;color:#9faec1!important;text-align:center;
}
html:not([data-leirus-app])[data-theme="dark"] .dash-side{top:88px;}
html:not([data-leirus-app])[data-theme="dark"] .dash-side :where(.mw-card,.ew-card){padding:22px!important;}
html:not([data-leirus-app])[data-theme="dark"] .dash-side :where(.mw-title,.ew-title){font-size:16px!important;letter-spacing:-.01em;}

/* Perfil: navegación estable y formulario compacto, sin marcos repetitivos. */
html:not([data-leirus-app])[data-theme="dark"] #profileView{
  max-width:960px!important;margin:4px auto 0;
}
html:not([data-leirus-app])[data-theme="dark"] .profile-view-head{
  display:flex;align-items:flex-end;justify-content:space-between;gap:28px;margin-bottom:30px;
}
html:not([data-leirus-app])[data-theme="dark"] .profile-view-head h2{
  margin:5px 0 7px;color:#f5f8fc!important;font-size:36px;line-height:1.15;letter-spacing:-.035em;
}
html:not([data-leirus-app])[data-theme="dark"] .profile-view-head p{
  max-width:600px;color:#aeb9c9!important;font-size:14px;line-height:1.6;
}
html:not([data-leirus-app])[data-theme="dark"] .profile-eyebrow{
  color:#8fb8e7;font:650 10px/1 var(--mono);letter-spacing:.12em;text-transform:uppercase;
}
html:not([data-leirus-app])[data-theme="dark"] #profileBackBtn{
  flex:none;min-height:42px;margin:0!important;padding:0 16px;border:1px solid #405674!important;border-radius:999px;
  background:transparent!important;color:#dce5f1!important;font:600 12px var(--sans)!important;letter-spacing:0!important;cursor:pointer;
}
html:not([data-leirus-app])[data-theme="dark"] #profileBackBtn:hover{background:#13233a!important;border-color:#637d9f!important;}
html:not([data-leirus-app])[data-theme="dark"] .profile-tabs{
  width:max-content;max-width:100%;gap:4px;margin-bottom:16px;padding:4px;overflow-x:auto;
  border:1px solid #263950;border-radius:999px;background:#0a1625;scrollbar-width:none;
}
html:not([data-leirus-app])[data-theme="dark"] .profile-tab{
  min-height:42px;padding:0 17px;border:0!important;border-radius:999px;background:transparent!important;
  color:#9faec1!important;font-size:13px;transition:background .2s ease,color .2s ease,box-shadow .2s ease;
}
html:not([data-leirus-app])[data-theme="dark"] .profile-tab:hover{color:#fff!important;background:#14243a!important;}
html:not([data-leirus-app])[data-theme="dark"] .profile-tab[aria-selected="true"]{
  background:#edf3fa!important;color:#10213f!important;box-shadow:0 3px 10px rgba(2,9,20,.2);
}
html:not([data-leirus-app])[data-theme="dark"] #profileView>.panel{
  padding:40px 42px;border-color:#263950!important;border-radius:18px!important;background:#111f31!important;
}
html:not([data-leirus-app])[data-theme="dark"] #profileView>.panel h3{font-size:20px;margin-bottom:28px;}
html:not([data-leirus-app])[data-theme="dark"] #profileView .profile-form-grid{gap:2px 18px;}
html:not([data-leirus-app])[data-theme="dark"] #profileView .field label{color:#bac5d3!important;font-size:12px;}
html:not([data-leirus-app])[data-theme="dark"] #profileView .field input{
  min-height:50px;background:#17283d!important;border:1px solid #344963!important;border-radius:10px;color:#f3f6fa!important;
}
html:not([data-leirus-app])[data-theme="dark"] #profileView .field input:hover{border-color:#526b8b!important;}
html:not([data-leirus-app])[data-theme="dark"] #profileView .field input:focus{
  border-color:#78a9dd!important;box-shadow:0 0 0 4px rgba(120,169,221,.12)!important;
}
html:not([data-leirus-app])[data-theme="dark"] #profileView #profileEmail{
  min-height:44px;display:flex;align-items:center;padding:0 2px;color:#dce5f1!important;
}
html:not([data-leirus-app])[data-theme="dark"] #profileView .btn:not(.btn-secondary){
  min-height:46px;padding:0 22px;border-radius:10px;background:#e8f0fa!important;border-color:#e8f0fa!important;color:#10213f!important;
  box-shadow:none;
}
html:not([data-leirus-app])[data-theme="dark"] #profileView .btn:not(.btn-secondary):hover{background:#fff!important;border-color:#fff!important;}
html:not([data-leirus-app])[data-theme="dark"] #profileView :where(.profile-test,.investor-latest){
  background:#17283d!important;border-color:#344963!important;border-radius:12px;
}

/* Cierre del sitio: llamada a la acción amplia y footer compacto. */
html:not([data-leirus-app])[data-theme="dark"] .newsletter-section{
  padding:88px 40px!important;background:#0b1e3f!important;
}
html:not([data-leirus-app])[data-theme="dark"] .newsletter-box{
  max-width:1060px!important;display:grid;grid-template-columns:minmax(0,.92fr) minmax(360px,1.08fr);column-gap:64px;
  align-items:center;margin:0 auto!important;padding:52px 56px!important;border:0!important;border-radius:22px!important;
  background:#112642!important;border:1px solid #2c4360!important;box-shadow:0 18px 48px rgba(2,9,20,.15)!important;text-align:left!important;
}
html:not([data-leirus-app])[data-theme="dark"] .newsletter-box h3{
  grid-column:1;margin:0 0 10px!important;color:#f1f5fa!important;font-size:clamp(24px,2.4vw,31px)!important;font-weight:600!important;letter-spacing:-.03em!important;
}
html:not([data-leirus-app])[data-theme="dark"] .newsletter-box p{
  grid-column:1;margin:0!important;color:#aeb9c9!important;font-size:15px!important;line-height:1.65;
}
html:not([data-leirus-app])[data-theme="dark"] .newsletter-form{
  grid-column:2;grid-row:1 / span 2;width:100%;max-width:none!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:10px!important;
}
html:not([data-leirus-app])[data-theme="dark"] .newsletter-form input{
  min-height:52px;padding:0 16px!important;border:1px solid #3c5575!important;border-radius:10px!important;background:#172f50!important;color:#f2f6fb!important;
}
html:not([data-leirus-app])[data-theme="dark"] .newsletter-form input::placeholder{color:#8fa0b6!important;}
html:not([data-leirus-app])[data-theme="dark"] .newsletter-form input:focus{border-color:#7ba8d8!important;box-shadow:0 0 0 4px rgba(123,168,216,.12);}
html:not([data-leirus-app])[data-theme="dark"] .newsletter-form button{
  min-height:52px;padding:0 22px!important;border-radius:10px!important;background:#e7eef7!important;border-color:#e7eef7!important;color:#10213f!important;
}
html:not([data-leirus-app])[data-theme="dark"] .newsletter-form button:hover{background:#fff!important;border-color:#fff!important;}
html:not([data-leirus-app])[data-theme="dark"] .newsletter-msg{grid-column:2;margin-top:12px!important;}
html:not([data-leirus-app])[data-theme="dark"] footer{padding:34px 40px!important;background:#071426!important;border-top:1px solid #20334c!important;}
html:not([data-leirus-app])[data-theme="dark"] .footer-logo{height:38px!important;opacity:.9!important;}
html:not([data-leirus-app])[data-theme="dark"] .footer-social{gap:10px!important;}
html:not([data-leirus-app])[data-theme="dark"] .footer-social a{
  width:38px;height:38px;border:1px solid #30445f;border-radius:50%;color:#aebbd0!important;
}
html:not([data-leirus-app])[data-theme="dark"] .footer-social a:hover{background:#12263f;color:#fff!important;border-color:#526b8b;}

@media(max-width:900px){
  html:not([data-leirus-app])[data-theme="dark"] .dash-grid{grid-template-columns:1fr;}
  html:not([data-leirus-app])[data-theme="dark"] .dash-side{position:static;display:grid;grid-template-columns:1fr 1fr;gap:16px;}
  html:not([data-leirus-app])[data-theme="dark"] .dash-side #econCalWidget{margin-top:0!important;}
  html:not([data-leirus-app])[data-theme="dark"] .newsletter-box{grid-template-columns:1fr;row-gap:26px;padding:42px!important;}
  html:not([data-leirus-app])[data-theme="dark"] .newsletter-form{grid-column:1;grid-row:auto;}
  html:not([data-leirus-app])[data-theme="dark"] .newsletter-msg{grid-column:1;}
}
@media(max-width:640px){
  html:not([data-leirus-app])[data-theme="dark"] .dash{padding:30px 16px 88px;}
  html:not([data-leirus-app])[data-theme="dark"] .dash-head{align-items:flex-start!important;}
  html:not([data-leirus-app])[data-theme="dark"] .dash-head h2{font-size:30px!important;}
  html:not([data-leirus-app])[data-theme="dark"] #profileToggleBtn{width:auto;}
  html:not([data-leirus-app])[data-theme="dark"] .dash-side{display:block;}
  html:not([data-leirus-app])[data-theme="dark"] .dash-side #econCalWidget{margin-top:16px!important;}
  html:not([data-leirus-app])[data-theme="dark"] .profile-view-head{align-items:flex-start;flex-direction:column-reverse;gap:20px;}
  html:not([data-leirus-app])[data-theme="dark"] .profile-view-head h2{font-size:30px;}
  html:not([data-leirus-app])[data-theme="dark"] .profile-tabs{width:100%;border-radius:14px;}
  html:not([data-leirus-app])[data-theme="dark"] .profile-tab{flex:1;padding:0 12px;}
  html:not([data-leirus-app])[data-theme="dark"] #profileView>.panel{padding:28px 20px;}
  html:not([data-leirus-app])[data-theme="dark"] .newsletter-section{padding:64px 16px!important;}
  html:not([data-leirus-app])[data-theme="dark"] .newsletter-box{padding:34px 24px!important;border-radius:18px!important;}
  html:not([data-leirus-app])[data-theme="dark"] .newsletter-form{grid-template-columns:1fr;}
  html:not([data-leirus-app])[data-theme="dark"] footer{padding:34px 24px 88px!important;}
}

/* Las mismas mejoras estructurales en modo claro. */
html:not([data-leirus-app])[data-theme="light"] .login-wrap{
  width:100%;max-width:870px;margin:clamp(36px,6vh,68px) auto;padding:0 24px;
}
html:not([data-leirus-app])[data-theme="light"] .login-wrap .card{
  display:grid;grid-template-columns:minmax(280px,40%) minmax(420px,60%);min-height:495px;overflow:hidden;padding:0!important;
  border:0!important;border-radius:18px;background:linear-gradient(90deg,#102a52 0 40%,#f7f9fc 40% 100%)!important;
  box-shadow:0 22px 58px rgba(16,42,82,.11)!important;
}
html:not([data-leirus-app])[data-theme="light"] .login-wrap .login-logo{
  grid-column:1;grid-row:1 / span 6;align-self:center;justify-self:center;width:min(270px,80%);height:auto;margin:0!important;
  filter:brightness(0) invert(1);opacity:.98;
}
html:not([data-leirus-app])[data-theme="light"] .login-wrap h1{
  grid-column:2;align-self:end;margin:52px 48px 8px!important;color:#10213f!important;font-size:26px!important;font-weight:600!important;letter-spacing:-.025em;
}
html:not([data-leirus-app])[data-theme="light"] .login-wrap .card>p{grid-column:2;margin:0 48px 26px!important;color:#657084!important;font-size:14px;}
html:not([data-leirus-app])[data-theme="light"] .login-wrap :where(#loginForm,#forgotForm){grid-column:2;margin:0 48px!important;}
html:not([data-leirus-app])[data-theme="light"] .login-wrap .field input{min-height:50px;border-radius:10px;background:#fff;border-color:#ccd6e3;}
html:not([data-leirus-app])[data-theme="light"] .login-wrap .btn:not(.btn-secondary){width:100%;min-height:50px;border-radius:10px;}
html:not([data-leirus-app])[data-theme="light"] .login-wrap #forgotWrap{grid-column:2;margin:18px 48px 42px!important;text-align:center;}
html:not([data-leirus-app])[data-theme="light"] .login-wrap #forgotLink{color:#52637a;text-decoration:none;border-bottom:1px solid #b8c4d2;padding-bottom:2px;}
html:not([data-leirus-app])[data-theme="light"] .login-wrap .card:not(:has(#forgotWrap)) #loginForm{padding-bottom:68px;}
html:not([data-leirus-app])[data-theme="light"] .login-wrap .idle-notice{
  position:relative;margin-top:16px;padding:10px 12px 10px 36px;border:1px solid #d8e3ef;border-radius:8px;background:#edf3f9;color:#52637a;line-height:1.45;
}
html:not([data-leirus-app])[data-theme="light"] .login-wrap .idle-notice::before{
  content:'i';position:absolute;left:12px;top:10px;width:16px;height:16px;border:1px solid #6e88a7;border-radius:50%;
  color:#526b8b;font:700 11px/15px var(--mono);text-align:center;
}

html:not([data-leirus-app])[data-theme="light"] .dash{max-width:1240px;padding:46px 28px 110px;}
html:not([data-leirus-app])[data-theme="light"] .dash-head h2{font-size:clamp(30px,3vw,42px);line-height:1.12;letter-spacing:-.035em;}
html:not([data-leirus-app])[data-theme="light"] #profileToggleBtn{min-height:44px;padding:0 18px;border-radius:999px;font-family:var(--sans)!important;font-size:13px!important;letter-spacing:0!important;font-weight:600;}
html:not([data-leirus-app])[data-theme="light"] .dash-grid{grid-template-columns:minmax(0,1fr) 360px;gap:20px;}
html:not([data-leirus-app])[data-theme="light"] .dash .panel{padding:28px;margin-bottom:20px;border-radius:18px;box-shadow:0 12px 34px rgba(16,42,82,.06);}
html:not([data-leirus-app])[data-theme="light"] .dash-main>.panel>.research-grid>.empty-state{
  min-height:150px;display:flex;align-items:center;justify-content:center;padding:28px;border:1px dashed #d2dce8;border-radius:13px;background:#f7f9fc;
}
html:not([data-leirus-app])[data-theme="light"] #profileView{max-width:960px!important;margin:4px auto 0;}
html:not([data-leirus-app])[data-theme="light"] .profile-view-head{display:flex;align-items:flex-end;justify-content:space-between;gap:28px;margin-bottom:30px;}
html:not([data-leirus-app])[data-theme="light"] .profile-view-head h2{margin:5px 0 7px;color:#10213f;font-size:36px;line-height:1.15;letter-spacing:-.035em;}
html:not([data-leirus-app])[data-theme="light"] .profile-view-head p{max-width:600px;color:#657084;font-size:14px;line-height:1.6;}
html:not([data-leirus-app])[data-theme="light"] .profile-eyebrow{color:#3974b5;font:650 10px/1 var(--mono);letter-spacing:.12em;text-transform:uppercase;}
html:not([data-leirus-app])[data-theme="light"] #profileBackBtn{min-height:42px;margin:0!important;padding:0 16px;border-radius:999px;font:600 12px var(--sans)!important;letter-spacing:0!important;cursor:pointer;}
html:not([data-leirus-app])[data-theme="light"] .profile-tabs{width:max-content;max-width:100%;gap:4px;padding:4px;border:1px solid #d8e1eb;border-radius:999px;background:#edf2f7;}
html:not([data-leirus-app])[data-theme="light"] .profile-tab{min-height:42px;padding:0 17px;border:0;border-radius:999px;background:transparent;}
html:not([data-leirus-app])[data-theme="light"] .profile-tab[aria-selected="true"]{background:#102a52;color:#fff;box-shadow:0 3px 10px rgba(16,42,82,.16);}
html:not([data-leirus-app])[data-theme="light"] #profileView>.panel{padding:40px 42px;border-radius:18px;}
html:not([data-leirus-app])[data-theme="light"] #profileView .field input{min-height:50px;border-radius:10px;}

html:not([data-leirus-app])[data-theme="light"] .newsletter-section{padding:78px 40px!important;background:#f5f6f8!important;}
html:not([data-leirus-app])[data-theme="light"] .newsletter-box{
  max-width:1000px!important;display:grid;grid-template-columns:minmax(0,.92fr) minmax(360px,1.08fr);column-gap:56px;align-items:center;
  padding:44px 48px!important;border:1px solid #dce4ed!important;border-radius:20px!important;background:#edf2f7!important;box-shadow:none!important;text-align:left!important;
}
html:not([data-leirus-app])[data-theme="light"] .newsletter-box h3{grid-column:1;margin:0 0 9px!important;color:#10213f!important;font-size:clamp(24px,2.4vw,31px)!important;font-weight:600!important;letter-spacing:-.03em!important;}
html:not([data-leirus-app])[data-theme="light"] .newsletter-box p{grid-column:1;margin:0!important;color:#5f6a7d!important;font-size:15px!important;line-height:1.65;}
html:not([data-leirus-app])[data-theme="light"] .newsletter-form{grid-column:2;grid-row:1 / span 2;width:100%;max-width:none!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:10px!important;}
html:not([data-leirus-app])[data-theme="light"] .newsletter-form input{min-height:52px;border-radius:10px!important;background:#fff;}
html:not([data-leirus-app])[data-theme="light"] .newsletter-form button{min-height:52px;border-radius:10px!important;}
html:not([data-leirus-app])[data-theme="light"] .newsletter-msg{grid-column:2;}

@media(max-width:900px){
  html:not([data-leirus-app])[data-theme="light"] .dash-grid{grid-template-columns:1fr;}
  html:not([data-leirus-app])[data-theme="light"] .newsletter-box{grid-template-columns:1fr;row-gap:26px;padding:40px!important;}
  html:not([data-leirus-app])[data-theme="light"] .newsletter-form,html:not([data-leirus-app])[data-theme="light"] .newsletter-msg{grid-column:1;grid-row:auto;}
}
@media(max-width:760px){
  html:not([data-leirus-app])[data-theme="light"] .login-wrap{max-width:408px;margin:24px auto 84px;padding:0 16px;}
  html:not([data-leirus-app])[data-theme="light"] .login-wrap .card{display:block;min-height:0;padding:0 0 28px!important;border-radius:16px;background:linear-gradient(180deg,#102a52 0 150px,#f7f9fc 150px 100%)!important;}
  html:not([data-leirus-app])[data-theme="light"] .login-wrap .login-logo{width:min(215px,68%);margin:0 auto 66px!important;padding-top:32px;}
  html:not([data-leirus-app])[data-theme="light"] .login-wrap h1{margin:0 26px 8px!important;font-size:22px!important;}
  html:not([data-leirus-app])[data-theme="light"] .login-wrap .card>p{margin:0 26px 24px!important;}
  html:not([data-leirus-app])[data-theme="light"] .login-wrap :where(#loginForm,#forgotForm){margin:0 26px!important;}
  html:not([data-leirus-app])[data-theme="light"] .login-wrap #forgotWrap{margin:18px 26px 0!important;}
  html:not([data-leirus-app])[data-theme="light"] .login-wrap .card:not(:has(#forgotWrap)) #loginForm{padding-bottom:0;}
}
@media(max-width:640px){
  html:not([data-leirus-app])[data-theme="light"] .dash{padding:30px 16px 88px;}
  html:not([data-leirus-app])[data-theme="light"] .profile-view-head{align-items:flex-start;flex-direction:column-reverse;gap:20px;}
  html:not([data-leirus-app])[data-theme="light"] .profile-tabs{width:100%;border-radius:14px;}
  html:not([data-leirus-app])[data-theme="light"] .profile-tab{flex:1;padding:0 12px;}
  html:not([data-leirus-app])[data-theme="light"] #profileView>.panel{padding:28px 20px;}
  html:not([data-leirus-app])[data-theme="light"] .newsletter-section{padding:60px 16px!important;}
  html:not([data-leirus-app])[data-theme="light"] .newsletter-box{padding:32px 24px!important;}
  html:not([data-leirus-app])[data-theme="light"] .newsletter-form{grid-template-columns:1fr;}
}

html:not([data-leirus-app])[data-theme="dark"] :where(.mw-card,.ew-card,.ew-dialog){background:var(--theme-dark-surface)!important;border-color:var(--theme-dark-border)!important;box-shadow:0 10px 30px rgba(0,0,0,.2)!important;}
html:not([data-leirus-app])[data-theme="dark"] :where(.mw-title,.mw-label,.mw-item-name,.ew-title,.ew-dialog-title){color:var(--theme-dark-text)!important;}
html:not([data-leirus-app])[data-theme="dark"] :where(.mw-table td,.mw-item-value,.ew-row-label){color:var(--theme-dark-muted)!important;}
html:not([data-leirus-app])[data-theme="dark"] :where(.mw-updated,.mw-section,.mw-table th,.mw-item-meta,.mw-empty,.ew-sub,.ew-row-date,.ew-empty,.ew-sub-title,.ew-add-label,.ew-more){color:#9eabbc!important;}
html:not([data-leirus-app])[data-theme="dark"] :where(.mw-table th,.mw-table td,.mw-item,.ew-row){border-color:#26374e!important;}
html:not([data-leirus-app])[data-theme="dark"] :where(.ew-btn){background:var(--theme-dark-surface-2)!important;color:var(--theme-dark-text)!important;border-color:var(--theme-dark-border)!important;}
html:not([data-leirus-app])[data-theme="dark"] :where(.ew-plus,.ew-form button){background:var(--theme-dark-action)!important;color:#fff!important;border-color:var(--theme-dark-action)!important;}
html:not([data-leirus-app])[data-theme="dark"] .ew-modal{background:rgba(2,8,18,.78)!important;backdrop-filter:blur(6px);}

@media(max-width:600px){
  .leirus-theme-toggle{right:max(12px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom));padding:11px;width:46px;height:46px;justify-content:center;}
  .leirus-theme-toggle [data-theme-label]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}
}
@media(prefers-reduced-motion:reduce){.leirus-theme-toggle{transition:none;}}
@media print{.leirus-theme-toggle{display:none!important;}}
