/* Anne Elena sobre las páginas de Studio. Fuente de verdad: BRAND.md (github.com/anne-elena/marca).
   Se carga después de tokens.css en toda página de Anne Elena (portal/marca_ui.py pone la clase «ae» en <html>).
   Todo cuelga de html.ae: gana a los estilos de origen sin tocar las plantillas, así traer mejoras sigue siendo un merge.
   Valores: solo los tokens. Sin sombras, degradados ni color de acento; Jost 300/400/500; aire. */

/* --- Jost, alojada aquí. Rangos de peso: un 600/700 heredado usa la 500 (nunca una negrita falsa). --- */
@font-face{font-family:"Jost";src:url(/brand/ae/jost-300.woff2) format("woff2");font-weight:100 349;font-style:normal;font-display:swap}
@font-face{font-family:"Jost";src:url(/brand/ae/jost-400.woff2) format("woff2");font-weight:350 449;font-style:normal;font-display:swap}
@font-face{font-family:"Jost";src:url(/brand/ae/jost-500.woff2) format("woff2");font-weight:450 1000;font-style:normal;font-display:swap}

/* --- Las variables de origen pasan a los tokens de Anne Elena (lima, verde y lila desaparecen) --- */
html.ae,html.ae body,html.ae body.personal-shell{
  --espresso:var(--ae-ink);--ink:var(--ae-ink);--ivory:var(--ae-paper);--paper:var(--ae-paper);
  --teal:var(--ae-ink);--silver:var(--ae-stone);--lime:var(--ae-mist);--lilac:var(--ae-mist);--pink:var(--ae-mist);
  --red:var(--ae-error);--line:var(--ae-line);--body:var(--ae-font);--display:var(--ae-font)}
html.ae{color-scheme:light;background:var(--ae-paper);-webkit-text-size-adjust:100%;text-size-adjust:100%}
html.ae body{background:var(--ae-paper)!important;color:var(--ae-ink);font:var(--ae-weight-regular) var(--ae-body)/var(--ae-lh-body) var(--ae-font);
  font-synthesis:none;-webkit-font-smoothing:antialiased;overflow-x:hidden;min-height:100vh;display:flex;flex-direction:column}
html.ae body>main,html.ae body>.welcome-layout{flex:1 0 auto}
html.ae *,html.ae *::before,html.ae *::after{font-family:var(--ae-font)!important;box-shadow:none!important;text-shadow:none!important}
html.ae img,html.ae video,html.ae canvas{max-width:100%}
html.ae em,html.ae i,html.ae cite{font-style:normal}
html.ae b,html.ae strong,html.ae th,html.ae dt,html.ae summary{font-weight:var(--ae-weight-medium)}
html.ae ::selection{background:var(--ae-ink);color:var(--ae-paper)}

/* --- Tipografía (§4) --- */
html.ae h1{font-size:var(--ae-h1)!important;font-weight:var(--ae-weight-light)!important;line-height:var(--ae-lh-heading)!important;
  letter-spacing:var(--ae-track-display)!important;margin:0 0 var(--ae-space-5)!important;color:var(--ae-ink);text-transform:none;max-width:var(--ae-measure)}
html.ae h1 em{color:inherit}
html.ae h2{font-size:var(--ae-h2)!important;font-weight:var(--ae-weight-regular)!important;line-height:var(--ae-lh-heading)!important;letter-spacing:-.01em!important;color:var(--ae-ink);text-transform:none}
html.ae h3{font-size:var(--ae-h3)!important;font-weight:var(--ae-weight-medium)!important;line-height:1.3!important;letter-spacing:0!important;color:var(--ae-ink);text-transform:none}
html.ae p,html.ae li,html.ae dd,html.ae td,html.ae blockquote{font-size:var(--ae-body);line-height:var(--ae-lh-body);color:var(--ae-ink)}
html.ae p{max-width:var(--ae-measure)}
html.ae small,html.ae .muted,html.ae .helptext,html.ae .pane-context,html.ae .privacy-note,html.ae .closet-tip{font-size:var(--ae-small)!important;line-height:1.5;color:var(--ae-stone)!important}
html.ae .eyebrow,html.ae .tag,html.ae .personal-caption,html.ae .signature-label,html.ae .sd-card small,html.ae .lg-meta,
html.ae .study-participant-label{display:inline-block;font-size:var(--ae-label)!important;font-weight:var(--ae-weight-medium)!important;
  text-transform:uppercase!important;letter-spacing:var(--ae-track-label)!important;line-height:1.2;color:var(--ae-stone)!important}

/* --- Enlaces (§6): tinta y subrayado; los que son tarjeta o navegación se quedan sin subrayado --- */
:where(html.ae) a{color:var(--ae-ink);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px}
:where(html.ae) a:hover{text-decoration-thickness:2px}
html.ae :focus-visible{outline:2px solid var(--ae-ink)!important;outline-offset:2px!important}

/* --- Botones (§6). Base: secundario (borde tinta). Primario: tinta. Pastilla, 52 px, Jost 500 a 17 px. --- */
html.ae button,html.ae .button,html.ae input[type=submit],html.ae input[type=button]{
  -webkit-appearance:none;appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:var(--ae-space-2);
  min-height:var(--ae-control-h);padding:0 28px;border:1px solid var(--ae-ink)!important;border-radius:var(--ae-radius-pill)!important;
  background:transparent!important;color:var(--ae-ink)!important;font:var(--ae-weight-medium) 17px/1.2 var(--ae-font)!important;
  text-decoration:none!important;text-transform:none;letter-spacing:0;cursor:pointer;
  transition:background-color var(--ae-fast) var(--ae-ease),color var(--ae-fast) var(--ae-ease)}
html.ae button:hover,html.ae .button:hover{background:var(--ae-mist)!important}
html.ae .button:not(.secondary):not(.quiet),html.ae .primary,html.ae button[type=submit],html.ae input[type=submit],
html.ae main form:not([action$="/logout/"]) button:not([type=button]):not(.quiet):not(.secondary),
html.ae .study-form button,html.ae .welcome-body form button{background:var(--ae-ink)!important;color:var(--ae-paper)!important}
html.ae .button:not(.secondary):not(.quiet):hover,html.ae .primary:hover,html.ae button[type=submit]:hover,
html.ae main form:not([action$="/logout/"]) button:not([type=button]):not(.quiet):not(.secondary):hover{background:#2b2b2b!important}
html.ae button:disabled,html.ae .button[aria-disabled=true],html.ae input[type=submit]:disabled{background:var(--ae-mist)!important;color:var(--ae-stone)!important;border-color:transparent!important;cursor:not-allowed;opacity:1}
html.ae [aria-pressed=true],html.ae .options .selected,html.ae button.active{background:var(--ae-ink)!important;color:var(--ae-paper)!important}
@media (max-width:640px){
  html.ae main form button:not([type=button]),html.ae main .button:not(.secondary):not(.quiet),html.ae .study-form button{width:100%}
}
/* Los botones de solo un signo (cerrar ×) no son pastillas de 52 px de ancho completo */
html.ae button[aria-label^="Cerrar"],html.ae [data-cart-close],html.ae .matrix-close{min-height:44px;min-width:44px;padding:0 12px;width:auto!important}

/* --- Campos (§6) --- */
html.ae label{font-size:var(--ae-small);font-weight:var(--ae-weight-medium);color:var(--ae-ink);line-height:1.5}
html.ae input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=submit]):not([type=button]):not([type=hidden]),
html.ae select,html.ae textarea{
  -webkit-appearance:none;appearance:none;display:block;width:100%;max-width:100%;min-height:var(--ae-control-h);margin-top:var(--ae-space-2);
  padding:12px 16px!important;border:1px solid var(--ae-line)!important;border-radius:var(--ae-radius-field)!important;
  background:var(--ae-paper)!important;color:var(--ae-ink)!important;font:var(--ae-weight-regular) var(--ae-body)/1.4 var(--ae-font)!important}
html.ae textarea{min-height:120px}
html.ae select{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23111111' stroke-width='1.5'/%3E%3C/svg%3E")!important;
  background-repeat:no-repeat!important;background-position:right 16px center!important;padding-right:44px!important}
html.ae input:not([type=checkbox]):not([type=radio]):focus,html.ae select:focus,html.ae textarea:focus{border:2px solid var(--ae-ink)!important;padding:11px 15px!important;outline:none!important}
html.ae input[type=file]{font-size:var(--ae-small);max-width:100%}
html.ae ::placeholder{color:var(--ae-stone);opacity:1}
html.ae ul.errorlist,html.ae .errorlist,html.ae .error,html.ae #error,html.ae .tn-err{color:var(--ae-error)!important;font-size:var(--ae-small)!important;background:none!important;padding-left:0!important;list-style:none}
html.ae [aria-invalid=true]{border-color:var(--ae-error)!important}
/* Casilla de consentimiento: 24 px, borde 1.5 px tinta, radio 6, check blanco sobre tinta; área táctil 44 px */
html.ae input[type=checkbox]{-webkit-appearance:none;appearance:none;flex:0 0 24px;width:24px!important;height:24px!important;margin:10px 12px 10px 0!important;
  border:1.5px solid var(--ae-ink)!important;border-radius:6px!important;background:var(--ae-paper) center/16px 16px no-repeat!important;cursor:pointer;vertical-align:middle;padding:0!important}
html.ae input[type=checkbox]:checked{background-color:var(--ae-ink)!important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23ffffff' stroke-width='2'/%3E%3C/svg%3E")!important}
html.ae input[type=radio]{accent-color:var(--ae-ink);width:20px;height:20px}
html.ae .check-field label,html.ae .tn label,html.ae .consent{font-size:var(--ae-body)!important;font-weight:var(--ae-weight-regular)!important;line-height:1.5!important;min-height:44px}

/* --- Tarjetas (§6): blancas, borde 1 px, radio 20, sin sombra --- */
html.ae .card,html.ae .study-card,html.ae .sd-card,html.ae .module-tile,html.ae .report-card,html.ae .fb-tema,html.ae .question,
html.ae .welcome-card,html.ae .closet-card,html.ae .catalog-grid article,html.ae .personal-shell .section-pane>article,
html.ae .personal-shell .section-pane>section,html.ae .matrix-detail-grid section,html.ae .closet-add{
  background:var(--ae-paper)!important;border:var(--ae-border)!important;border-radius:var(--ae-radius-card)!important;color:var(--ae-ink)!important}
html.ae .message,html.ae .notice,html.ae .study-note,html.ae .section-note,html.ae .closet-processing,html.ae .closet-status,
html.ae .lg-bienvenida,html.ae .lg-promesa,html.ae .matrix-empty{background:var(--ae-mist)!important;color:var(--ae-ink)!important;border:0!important;border-left:0!important;border-radius:var(--ae-radius-card)!important;padding:var(--ae-space-5)!important}
html.ae hr{border:0;border-top:var(--ae-border)}
html.ae table{border-collapse:collapse}
html.ae th,html.ae td{border-color:var(--ae-line)!important}

/* --- Página sin sesión (base.html): header 64 px, logo a la izquierda, contenido directo sobre la página --- */
html.ae body:not(.personal-shell)>header{display:flex;align-items:center;justify-content:space-between;gap:var(--ae-space-4);flex-wrap:nowrap;
  height:64px;min-height:64px;padding:0 var(--ae-gutter)!important;margin:0;border:0!important;background:var(--ae-paper)}
html.ae body:not(.personal-shell)>header .home-brand{display:inline-flex;align-items:center;text-decoration:none}
html.ae .ae-logo{display:block;height:24px;width:auto}
html.ae body:not(.personal-shell)>main{width:auto!important;max-width:calc(var(--ae-measure) + 2 * var(--ae-gutter))!important;
  margin:var(--ae-space-7) auto var(--ae-space-9)!important;padding:0 var(--ae-gutter)!important;background:none!important;border:0!important;border-radius:0!important}
html.ae body:not(.personal-shell)>main form p{margin:0 0 var(--ae-space-5)}
html.ae body:not(.personal-shell)>main form p>label{display:block}
html.ae body:not(.personal-shell)>main>p>a:not(.button){font-size:var(--ae-body)}
html.ae article{border-top-color:var(--ae-line)}
@media (min-width:768px){html.ae .ae-logo{height:28px}}

/* --- Footer (§6): fondo night, logo blanco, Términos / Privacidad / contacto en Pequeño --- */
html.ae .ae-pie{flex-shrink:0;display:flex;flex-direction:column;align-items:flex-start;gap:var(--ae-space-5);margin-top:var(--ae-space-8);
  padding:var(--ae-space-7) var(--ae-gutter);background:var(--ae-night);color:var(--ae-on-night)}
html.ae .ae-pie-logo{display:inline-flex;text-decoration:none}
html.ae .ae-pie-logo img{display:block;height:24px;width:auto}
html.ae .ae-pie nav{display:flex;flex-direction:column;gap:var(--ae-space-3)}
html.ae .ae-pie nav a{color:var(--ae-on-night)!important;font-size:var(--ae-small);text-decoration:underline;text-underline-offset:4px;text-decoration-thickness:1px}
html.ae .ae-pie nav a:hover{text-decoration-thickness:2px}
html.ae .ae-pie :focus-visible{outline-color:var(--ae-on-night)!important}
@media (min-width:768px){
  html.ae .ae-pie{flex-direction:row;align-items:center;justify-content:space-between}
  html.ae .ae-pie nav{flex-direction:row;gap:var(--ae-space-6)}
}

/* --- La sesión (session_nav.html): header 64 px con logo y un botón; menú lateral blanco en escritorio --- */
html.ae body.personal-shell{font-size:var(--ae-body);padding-left:0!important}
html.ae .personal-shell>.personal-topbar{position:sticky;top:0;z-index:50;display:flex;align-items:center;gap:var(--ae-space-4);
  height:64px;min-height:64px!important;padding:0 var(--ae-gutter)!important;margin:0;border:0!important;background:var(--ae-paper)!important;font-size:var(--ae-small)}
html.ae .personal-topbar .ae-logo-enlace{display:inline-flex;align-items:center;margin-right:auto;text-decoration:none}
html.ae .personal-location,html.ae .personal-caption,html.ae .personal-signature,html.ae .personal-logo{display:none!important}
html.ae .personal-topbar form{margin:0}
html.ae .personal-topbar .personal-logout{min-height:44px;padding:0 20px}
html.ae .personal-shell .personal-menu-toggle{display:none;min-height:44px;padding:0 20px}
html.ae .personal-shell .personal-menu-toggle span{display:inline}
/* Carrito: un enlace de texto, no un segundo botón */
html.ae .personal-topbar .ema-cart-toggle{min-height:44px;padding:0 4px!important;border:0!important;background:none!important;
  font-size:var(--ae-small)!important;font-weight:var(--ae-weight-regular)!important;text-decoration:underline!important;text-underline-offset:4px}
html.ae .personal-topbar .ema-cart-toggle:hover{background:none!important;text-decoration-thickness:2px!important}
html.ae #ema-cart-count{background:none!important;color:inherit!important;padding:0!important;min-width:0!important}
html.ae .personal-sidebar{position:fixed;top:64px;bottom:0;left:0;width:264px;padding:var(--ae-space-5) var(--ae-space-4)!important;
  background:var(--ae-paper)!important;border:0!important;border-right:var(--ae-border)!important;overflow:auto;z-index:45}
html.ae .personal-sidebar nav{gap:2px}
html.ae .personal-sidebar nav a,html.ae .personal-sidebar summary{min-height:44px;padding:10px 12px!important;border-radius:var(--ae-radius-field)!important;
  color:var(--ae-ink)!important;font-size:var(--ae-small)!important;text-decoration:none!important;background:none}
html.ae .personal-sidebar summary{font-weight:var(--ae-weight-medium)!important}
html.ae .personal-sidebar a:hover,html.ae .personal-sidebar summary:hover{background:var(--ae-mist)!important}
html.ae .personal-sidebar a[aria-current=page]{background:var(--ae-mist)!important;font-weight:var(--ae-weight-medium)!important}
html.ae .personal-sidebar .nav-soon{color:var(--ae-stone)!important;font-size:var(--ae-small)!important}
html.ae .personal-sidebar .ae-salir{margin-top:var(--ae-space-5);padding-top:var(--ae-space-4);border-top:var(--ae-border)}
html.ae .personal-sidebar .ae-salir button{width:100%}
html.ae .personal-shell>main{max-width:calc(var(--ae-container) + 2 * var(--ae-gutter))!important;padding:var(--ae-space-6) var(--ae-gutter) 0!important;margin:0 auto!important}
html.ae .personal-shell>.ae-pie{margin-top:var(--ae-space-8)}
@media (min-width:761px){
  html.ae .personal-shell>main,html.ae .personal-shell>.ae-pie{margin-left:264px!important}
  html.ae .personal-shell>main{margin-right:0!important;max-width:none!important}
  html.ae .personal-sidebar .ae-salir{display:none}
}
@media (max-width:760px){
  html.ae .personal-shell .personal-menu-toggle{display:inline-flex}
  html.ae .personal-topbar>form{display:none}
  html.ae .personal-sidebar{display:none;width:100%;right:0;border-right:0!important;padding:var(--ae-space-4) var(--ae-gutter) var(--ae-space-7)!important}
  html.ae .personal-shell.menu-open .personal-sidebar{display:block}
}

/* --- Inicio (participant_space.html) --- */
html.ae .sd{gap:var(--ae-space-8)!important}
html.ae .sd-hero{grid-template-columns:minmax(0,1fr)!important;background:var(--ae-paper)!important;border-radius:0!important;padding:var(--ae-space-5) 0 0!important;gap:var(--ae-space-6)!important}
html.ae .sd-hero h1{font-size:var(--ae-display)!important;line-height:var(--ae-lh-tight)!important}
html.ae .sd-hero p{max-width:var(--ae-measure)}
html.ae .sd-sig{flex-direction:column;align-items:flex-start;gap:var(--ae-space-3)!important;margin-top:var(--ae-space-6)!important}
html.ae .sd-sig small{color:var(--ae-stone)!important}
html.ae .sd-av{justify-self:start!important;max-width:240px!important;border-radius:var(--ae-radius-card)!important;background:var(--ae-mist)!important;aspect-ratio:4/5!important}
html.ae .sd-av span{background:var(--ae-paper)!important;font-weight:var(--ae-weight-medium)!important;font-size:var(--ae-label)!important}
html.ae .sd-av em{color:var(--ae-stone)!important;font-size:var(--ae-h1)!important}
html.ae .sd h2.sd-t{margin:0 0 var(--ae-space-4)!important}
html.ae .sd-camino{grid-template-columns:minmax(0,1fr)!important;gap:0!important;border-top:var(--ae-border)}
html.ae .sd-camino a{grid-template-columns:32px minmax(0,1fr);column-gap:var(--ae-space-3);padding:var(--ae-space-4) 0!important;border:0!important;border-bottom:var(--ae-border)!important;border-radius:0!important;background:none!important}
html.ae .sd-camino a>small{grid-column:2}
html.ae .sd-camino b{font-size:var(--ae-body)!important}
html.ae .sd-camino small{font-size:var(--ae-small)!important;color:var(--ae-stone)!important}
html.ae .sd-camino .n{width:auto!important;height:auto!important;background:none!important;color:var(--ae-stone)!important;border-radius:0!important;font-size:var(--ae-small)!important;font-weight:var(--ae-weight-regular)!important;place-items:start!important;grid-row:span 2}
html.ae .sd-camino .hecho .n{color:var(--ae-ink)!important}
html.ae .sd-camino .ahora b{text-decoration:underline;text-underline-offset:4px}
html.ae .sd-tuyo,html.ae .sd-mod{grid-template-columns:minmax(0,1fr)!important;gap:var(--ae-space-4)!important}
html.ae .sd-card{padding:var(--ae-space-5)!important;gap:var(--ae-space-2)!important}
html.ae .sd-card h3{font-weight:var(--ae-weight-regular)!important}
html.ae .sd-card p{font-size:var(--ae-body)!important;color:var(--ae-ink)!important}
html.ae .sd-card .ir{color:var(--ae-ink)!important;font-size:var(--ae-small)!important;font-weight:var(--ae-weight-medium)!important;text-decoration:underline;text-underline-offset:4px}
html.ae .sd-card.vacia{border-style:solid!important}
html.ae .sd-card.vacia h3{color:var(--ae-stone)!important}
html.ae .sd-card.oscura p,html.ae .sd-card.oscura small{color:inherit!important}
html.ae .sd-fb{grid-template-columns:minmax(0,1fr)!important;background:var(--ae-mist)!important;color:var(--ae-ink)!important;border-radius:var(--ae-radius-card)!important;padding:var(--ae-space-6) var(--ae-space-5)!important}
html.ae .sd-fb h2{color:var(--ae-ink)!important}
html.ae .sd-fb p{color:var(--ae-ink)!important;font-size:var(--ae-body)!important}
html.ae .sd-fb .eyebrow{color:var(--ae-stone)!important}
html.ae .sd-fb li{border-color:var(--ae-line)!important;background:var(--ae-paper)!important;color:var(--ae-ink)!important;font-size:var(--ae-small)!important}
html.ae .sd-fb li.hecha{border-color:var(--ae-ink)!important}
html.ae .sd-fb a.button{background:var(--ae-ink)!important;color:var(--ae-paper)!important;border-color:var(--ae-ink)!important}
@media (min-width:900px){
  html.ae .sd-hero{grid-template-columns:minmax(0,1.4fr) minmax(200px,1fr)!important;align-items:end}
  html.ae .sd-av{justify-self:end!important}
  html.ae .sd-tuyo,html.ae .sd-mod{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  html.ae .sd-camino{grid-template-columns:repeat(2,minmax(0,1fr))!important;column-gap:var(--ae-space-6)!important;border-top:0}
  html.ae .sd-fb{grid-template-columns:minmax(0,1fr) auto!important;padding:var(--ae-space-7)!important}
}
/* Rejillas de tarjetas: una columna en móvil, dos como máximo en escritorio (§5) */
html.ae .module-tiles,html.ae .stylist-disciplines,html.ae .scores{grid-template-columns:minmax(0,1fr)!important}
@media (min-width:900px){html.ae .module-tiles,html.ae .stylist-disciplines,html.ae .scores{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
html.ae .space-welcome{background:var(--ae-mist)!important;border-radius:var(--ae-radius-card)!important}
html.ae .space-office{background:var(--ae-mist)!important;color:var(--ae-ink)!important;border-radius:var(--ae-radius-card)!important}
html.ae .space-office p,html.ae .space-office .office-quick a{color:var(--ae-ink)!important;border-color:var(--ae-ink)!important}
html.ae .welcome-frame,html.ae .welcome-portrait{background:var(--ae-mist)!important;border-radius:var(--ae-radius-card)!important}
html.ae .welcome-monogram{background:var(--ae-ink)!important}
html.ae .module-pitch,html.ae .section-pane>h2,html.ae .matrix-dialog h2{font-weight:var(--ae-weight-light)!important}

/* --- Feedback --- */
html.ae .fb-barra span{height:2px!important;border-radius:0!important;background:var(--ae-line)!important}
html.ae .fb-barra i{background:var(--ae-ink)!important}
html.ae .fb-barra strong{font-size:var(--ae-label);text-transform:uppercase;letter-spacing:var(--ae-track-label);color:var(--ae-stone);font-weight:var(--ae-weight-medium)}
html.ae .fb-indice a{min-width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center;background:var(--ae-paper)!important;border-color:var(--ae-line)!important;text-decoration:none;font-size:var(--ae-small)!important}
html.ae .fb-indice a.hecha{border-color:var(--ae-ink)!important}
html.ae .fb-tema.hecha{border-color:var(--ae-ink)!important}
html.ae .fb-estado{background:var(--ae-mist)!important;color:var(--ae-stone)!important;font-size:var(--ae-label)!important;font-weight:var(--ae-weight-medium)!important}
html.ae .fb-tema.hecha .fb-estado{background:var(--ae-ink)!important;color:var(--ae-paper)!important}
html.ae .fb-campos{grid-template-columns:minmax(0,1fr)!important}
html.ae .fb-campos label{font-weight:var(--ae-weight-medium)!important}
html.ae .fb-ok{color:var(--ae-ink)!important;font-weight:var(--ae-weight-regular)!important}
html.ae .fb-sub{color:var(--ae-ink)!important}

/* --- Términos nuevos (terminos.html) --- */
html.ae .tn label{display:flex;align-items:flex-start;gap:0}
html.ae .tn form>button.button{justify-self:stretch}

/* --- Estudio: solicitud, verificación, perfil (study_participant.html) --- */
html.ae .welcome-layout{max-width:calc(var(--ae-container) + 2 * var(--ae-gutter))!important;padding:0 var(--ae-gutter)!important;margin:var(--ae-space-7) auto!important}
html.ae body>header:has(+ .welcome-layout){height:64px;padding:0 var(--ae-gutter)!important;border:0!important}
html.ae body>header:has(+ .welcome-layout) img{width:auto!important;height:24px!important;mix-blend-mode:normal!important}
html.ae body>header:has(+ .welcome-layout) span{font-size:var(--ae-label)!important;letter-spacing:var(--ae-track-label)!important;color:var(--ae-stone)!important;text-transform:uppercase;font-weight:var(--ae-weight-medium)}
html.ae .welcome-card{overflow:visible!important}
html.ae .welcome-card::before{display:none!important}
html.ae .welcome-body{padding:var(--ae-space-6) var(--ae-space-5)!important}
html.ae .welcome-steps li{color:var(--ae-stone)!important;font-size:var(--ae-small)!important}
html.ae .welcome-steps i{border:0!important;background:none!important;color:inherit!important;width:auto!important;height:auto!important}
html.ae .welcome-steps [aria-current=step]{color:var(--ae-ink)!important;font-weight:var(--ae-weight-medium)}
html.ae .welcome-steps .done{color:var(--ae-ink)!important}
html.ae .welcome-footer{display:none}
html.ae .welcome-body p{color:var(--ae-ink)}
html.ae .study-form label{font-size:var(--ae-small)!important;font-weight:var(--ae-weight-medium)}
html.ae .study-form .primary{width:100%;margin-top:var(--ae-space-5)}
@media (min-width:721px){html.ae .welcome-body{padding:var(--ae-space-7)!important}html.ae body>header:has(+ .welcome-layout) img{height:28px!important}}

/* --- Legal (legal_base.html): texto a 18 px, ancho de lectura --- */
html.ae .lg{max-width:calc(var(--ae-measure) + 2 * var(--ae-gutter))!important;padding:0 var(--ae-gutter) var(--ae-space-9)!important;flex:1 0 auto}
html.ae .lg header{height:64px;margin:0 0 var(--ae-space-7)!important;padding:0!important;border:0!important}
html.ae .lg h2{margin:var(--ae-space-7) 0 var(--ae-space-3)!important}
html.ae .lg li{margin:var(--ae-space-2) 0}

/* --- Catálogo y piezas sueltas --- */
html.ae .catalog-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:var(--ae-space-4)!important}
html.ae .catalog-grid img{background:var(--ae-mist)!important;border-radius:var(--ae-space-3)}
html.ae .catalog-grid h2{font-size:var(--ae-body)!important;font-weight:var(--ae-weight-medium)!important}
html.ae .catalog-grid a{text-decoration:none}
html.ae #brand-picker>summary,html.ae .brand-menu{border-color:var(--ae-line)!important;border-radius:var(--ae-radius-field)!important}
html.ae .brand-options button{min-height:44px;border:0!important;border-radius:var(--ae-radius-field)!important;justify-content:flex-start;font-weight:var(--ae-weight-regular)!important;font-size:var(--ae-body)!important}
html.ae .brand-options button[aria-current]{background:var(--ae-mist)!important}
html.ae .pill,html.ae .hair-status{background:var(--ae-mist)!important;border-color:var(--ae-line)!important}
html.ae .progress{background:var(--ae-line)!important;height:2px!important;border-radius:0!important}
html.ae .progress i,html.ae .progress span{background:var(--ae-ink)!important}
html.ae .synthesis{background:var(--ae-mist)!important;border-color:var(--ae-line)!important}
html.ae dialog{border:var(--ae-border)!important;border-radius:var(--ae-radius-card)!important;background:var(--ae-paper)!important;color:var(--ae-ink)!important;max-width:calc(100vw - 32px)}
html.ae dialog::backdrop{background:rgba(15,15,16,.4)}
html.ae .ema-cart-panel h2{font-weight:var(--ae-weight-light)!important}
html.ae .matrix-scroll thead th{background:var(--ae-ink)!important}
html.ae .office-count,html.ae [data-beta-count]{background:var(--ae-ink)!important;color:var(--ae-paper)!important}

/* --- Movimiento (§9) --- */
@media (prefers-reduced-motion:reduce){html.ae *,html.ae *::before,html.ae *::after{transition:none!important;animation:none!important;scroll-behavior:auto!important}}

/* --- ES | EN (idioma.js): texto, no botones --- */
html.ae .boahaus-idioma{border:0!important;background:none!important;padding:0!important;gap:0!important}
html.ae .boahaus-idioma button{min-height:44px!important;min-width:44px;padding:0 8px!important;border:0!important;background:none!important;color:var(--ae-stone)!important;
  font:var(--ae-weight-regular) var(--ae-small)/1 var(--ae-font)!important;letter-spacing:0!important;width:auto!important}
html.ae .boahaus-idioma button[aria-pressed=true]{background:none!important;color:var(--ae-ink)!important;font-weight:var(--ae-weight-medium)!important;text-decoration:underline!important;text-underline-offset:4px}
html.ae .boahaus-idioma-flotante{top:10px!important}
html.ae .personal-sidebar .ae-salir button{background:transparent!important;color:var(--ae-ink)!important}
html.ae .personal-shell>.personal-topbar{flex-wrap:nowrap!important;gap:var(--ae-space-2)!important}
@media (max-width:480px){html.ae .personal-topbar .boahaus-idioma{display:none!important}}
html.ae .personal-topbar>*{order:5}
html.ae .personal-topbar>.ae-logo-enlace{order:0}
html.ae .personal-topbar>.boahaus-idioma{order:1;margin-left:0!important}
html.ae .personal-topbar>.ema-cart-toggle{order:2}
html.ae .personal-topbar>form{order:3}
html.ae .personal-topbar>.personal-menu-toggle{order:4}
html.ae body>*{min-width:0;max-width:100%}
html.ae body>header:has(+ .welcome-layout) span{white-space:nowrap}

/* --- Mis 4 fotos (cuerpo.html) --- */
html.ae .cu4-hero aside{border-radius:var(--ae-radius-card)!important;padding:var(--ae-space-5)!important}
html.ae .cu4-por,html.ae .cu4-ema,html.ae .cu4-listo{background:var(--ae-mist)!important;color:var(--ae-ink)!important}
html.ae .cu4-ema::after,html.ae .cu4-ema-av{display:none!important}
html.ae .cu4-ema p,html.ae .cu4-hero .cu4-ema .cu4-ema-top{color:var(--ae-ink)!important;border-color:var(--ae-line)!important;font-size:var(--ae-body)!important}
html.ae .cu4-ema-top b{background:none!important;color:var(--ae-ink)!important;padding:0!important;font-size:var(--ae-label)!important;letter-spacing:var(--ae-track-label)!important}
html.ae .cu4-etq li,html.ae .cu4-ema-3 li{background:var(--ae-paper)!important;color:var(--ae-ink)!important;border:var(--ae-border)!important;font-weight:var(--ae-weight-regular)!important;font-size:var(--ae-small)!important;padding:4px 12px!important}
html.ae .cu4-ema-3 li::before{color:var(--ae-ink)!important}
html.ae .cu4-pose{border-radius:var(--ae-radius-card)!important;border-color:var(--ae-line)!important}
html.ae .cu4-foto{background:var(--ae-mist)!important;color:var(--ae-stone)!important;border-radius:var(--ae-space-3)!important}
html.ae .cu4-pose p,html.ae .cu4-sub,html.ae .cu4-intro{color:var(--ae-stone)!important;font-size:var(--ae-small)!important}
html.ae .cu4-ok{color:var(--ae-ink)!important}
html.ae .cu4-err{background:none!important;color:var(--ae-error)!important;padding:0!important}
html.ae .cu4-grid{grid-template-columns:minmax(0,1fr)!important}
@media (min-width:900px){html.ae .cu4-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
/* En el body en columna, un margen auto encoge el bloque a su contenido: que ocupe el ancho y lo limite max-width */
html.ae body:not(.personal-shell)>main,html.ae body>.welcome-layout,html.ae .lg{width:100%!important;box-sizing:border-box}
html.ae body.personal-shell>main{width:auto!important;align-self:stretch}
/* Opciones de los cuestionarios: texto largo, alineado a la izquierda (campo, no pastilla) */
html.ae .options button,html.ae .option,html.ae .choices button{border-radius:var(--ae-radius-field)!important;justify-content:flex-start!important;text-align:left!important;
  padding:12px 20px!important;font-weight:var(--ae-weight-regular)!important;font-size:var(--ae-body)!important;line-height:1.4!important;border-color:var(--ae-line)!important}
html.ae .options button:hover{border-color:var(--ae-ink)!important}
html.ae .options [aria-pressed=true],html.ae .options .selected{border-color:var(--ae-ink)!important}

/* --- Lectura de estilo (lectura_estilo.html) --- */
html.ae .lx{--lx-ink:var(--ae-ink);--lx-ivory:var(--ae-paper);--lx-muted:var(--ae-stone);--lx-line:var(--ae-line);--lx-lime:var(--ae-mist);
  --lx-teal:var(--ae-ink);--lx-silver:var(--ae-stone);--lx-pink:var(--ae-ink);gap:var(--ae-space-8)!important}
html.ae .lx h2,html.ae .lx .lx-d,html.ae .lx-cover h1,html.ae .lx-code b{font-weight:var(--ae-weight-light)!important}
/* night es solo del footer: la portada va en mist */
html.ae .lx-cover{background:var(--ae-mist)!important;color:var(--ae-ink)!important;border-radius:var(--ae-radius-card)!important;padding:var(--ae-space-6) var(--ae-space-5)!important}
html.ae .lx-cover h1,html.ae .lx-cover h1 em{color:var(--ae-ink)!important;font-style:normal}
html.ae .lx-cover p{color:var(--ae-ink)!important}html.ae .lx-cover .lx-eb{color:var(--ae-stone)!important}
html.ae .lx-find .lx-n{font-style:normal}
html.ae .lx-tag,html.ae .lx-unlock,html.ae .lx-t,html.ae .lx-map{border-radius:var(--ae-radius-card)!important;border-color:var(--ae-line)!important}
html.ae .lx-c1,html.ae .lx-c2,html.ae .lx-c3{background:var(--ae-mist)!important;color:var(--ae-ink)!important;border-radius:var(--ae-radius-field)!important}
html.ae .lx-code{grid-template-columns:minmax(0,1fr)!important}
html.ae .lx-vibes{grid-template-columns:minmax(0,1fr)!important}
@media (min-width:900px){html.ae .lx-vibes{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
html.ae .lx-map text{fill:var(--ae-stone)!important}
html.ae .welcome-steps{scrollbar-width:none}html.ae .welcome-steps::-webkit-scrollbar{display:none}
