/* Ekonatura · opt-in dark editorial scheme, CSS loaded last. No global image filters. */
:root{
 --ek-theme-panel-bg:#f4f0e7;
 --ek-theme-panel-fg:#303b32;
 --ek-theme-panel-line:#c2c7bb;
}
:root[data-ek-theme="dark"]{
 color-scheme:dark;
 --ek-paper:#202826;
 --ek-white:#2b3631;
 --ek-ink:#f2f0e9;
 --ek-text:#f2f0e9;
 --ek-muted:#c4cdc4;
 --ek-coral:#f0b399;
 --ek-almond:#29352e;
 --ek-line:#54635a;
 --ek-surface-alt:#334139;
 --ek-graphite:#232729;
 --ek-surface:var(--ek-paper);
 --ek-theme-panel-bg:#2b3631;
 --ek-theme-panel-fg:#f2f0e9;
 --ek-theme-panel-line:#65746a;
}
:root[data-ek-theme="dark"] body{background:var(--ek-paper);color:var(--ek-ink)}
:root[data-ek-theme="dark"] ::selection{background:#657b6e;color:#fff}
:root[data-ek-theme="dark"] :is(input,select,textarea,button){accent-color:#f0b399}
:root[data-ek-theme="dark"] :is(a,button,input,select,textarea,summary):focus-visible{outline-color:#f0b399}
:root[data-ek-theme="dark"] :is(.ek-integrated .related>ul>li>a,.ek-search-card,.ek-page-share,.ek-reviews-tools,.ek-contact-card,.contact-practical,.ek-context-panel){
 border-color:var(--ek-line);
}
:root[data-ek-theme="dark"] :is(.ek-integrated .related>ul>li>a,.ek-search-card,.ek-page-share,.ek-contact-card){background-color:var(--ek-white)}
:root[data-ek-theme="dark"] :is(.ek-integrated .related-label,.related-desc,.ek-search-results small,.ek-reviews-progress,.ek-context-meta){color:var(--ek-muted)}
/* Preserve original deep-brand surfaces: their backgrounds rely on --ek-ink/--ek-paper inversion. */
:root[data-ek-theme="dark"] :is(.ek-footer,.home-principles,.ek-problem-index){
 --ek-paper:#f4f0e7;
 --ek-ink:#303b32;
 --ek-muted:#c3ccbc;
 --ek-line:#536459;
 --ek-coral:#f0b399;
}
:root[data-ek-theme="dark"] .ek-footer{background:#293a30;color:#f4f0e7;--ek-ink:#293a30;--ek-paper:#f4f0e7}
:root[data-ek-theme="dark"] .home-principles{background:#303b32;color:#f4f0e7}
:root[data-ek-theme="dark"] .ek-footer .cta-banner__button{background:#f4f0e7;color:#303b32}
:root[data-ek-theme="dark"] .ek-footer .cta-banner__button:hover{background:#fff;color:#303b32}
/* Headers above photographs and collapsed graphite header are intentionally unchanged. */
:root[data-ek-theme="dark"] body:not(.home):not(:has(main.ek-photo-hero-page)) .ek-header:not(.is-pill) .ek-header-inner{
 background:rgba(32,40,38,.94);border-color:#58665e;color:#f2f0e9;box-shadow:0 4px 25px #101a1636;
}
:root[data-ek-theme="dark"] .ek-header:not(.is-pill) .ek-explore>nav{background:#29372f;color:#f2f0e9;border-color:#58665e}
:root[data-ek-theme="dark"] .ek-header:not(.is-pill) .ek-explore>nav a:hover{background:#3a4a40;color:#fff}
:root[data-ek-theme="dark"] body:not(.home):not(:has(main.ek-photo-hero-page)) .ek-header:not(.is-pill) .brand img{filter:brightness(0) invert(1)}
:root[data-ek-theme="dark"] :is(.ek-index-button,.top-button){background:#303e36;color:#f2f0e9;border-color:#67756b}
:root[data-ek-theme="dark"] :is(.ek-index-button,.top-button):hover{background:#45574a}
:root[data-ek-theme="dark"] dialog.ek-dialog{background:#28342e;color:#f2f0e9;border:1px solid #607065}
:root[data-ek-theme="dark"] #ek-search .ek-search-input{background:#202826;border-color:#697a6d;color:#f2f0e9}
:root[data-ek-theme="dark"] #ek-search .ek-search-clear:hover{background:#435349;color:#fff}
:root[data-ek-theme="dark"] :is(.ek-search-results,.ek-search-card,.ek-search-description,.ek-search-suggestions){color:#f2f0e9}
:root[data-ek-theme="dark"] .ek-search-card{background:transparent}
:root[data-ek-theme="dark"] .ek-search-description a{color:#f0b399}
:root[data-ek-theme="dark"] :is(.ek-reading-indicator,.ek-reading-menu,.ek-reading-bar){background-color:#28362f;color:#f2f0e9;border-color:#5d6d61}
:root[data-ek-theme="dark"] :is(.ek-reading-menu a,.ek-reading-indicator button){color:inherit}
/* Fixed light background declarations from the legacy editorial layers. */
:root[data-ek-theme="dark"] .ek-integrated .home-flow .home-work-main>h2.is-stuck,
:root[data-ek-theme="dark"] .ek-integrated .ek-section>h2.is-stuck{background:#28342e!important;border-color:#5d6d61!important;color:#f2f0e9!important}
:root[data-ek-theme="dark"] .ek-integrated .ek-section-index a:hover{background:#394a3f!important;color:#fff!important}
:root[data-ek-theme="dark"] .ek-integrated .ek-section-index a:focus-visible{outline-color:#f0b399!important}
:root[data-ek-theme="dark"] :is(.ek-integrated .reading,.ek-integrated .ek-document,.ek-integrated .home-flow,.ek-integrated .contact-content){color:var(--ek-ink)}
:root[data-ek-theme="dark"] :is(.ek-dialog,.ek-library,.ek-review-dialog,.ek-sheet,.ek-bottom-sheet){color:var(--ek-ink)}
:root[data-ek-theme="dark"] :is(.ek-library,.ek-review-dialog,.ek-sheet,.ek-bottom-sheet){background-color:var(--ek-white);border-color:var(--ek-line)}
:root[data-ek-theme="dark"] :is(.ek-personal-html,.ek-personal-top){background-color:var(--ek-paper);color:var(--ek-ink)}
:root[data-ek-theme="dark"] :is(.ek-personal-html h1,.ek-personal-html h2,.ek-personal-html h3){color:var(--ek-ink)}
/* The detail-page has an existing approved graphite variant; its class is managed by theme-controller.js. */
:root[data-ek-theme="dark"] body[data-route="/sobre-mi/detalle/"] .ek-personal-html{background:#202327!important;color:#eceeea!important}
:root[data-ek-theme="dark"] body[data-route="/sobre-mi/detalle/"] .ek-personal-top{background:#202327!important;color:#eceeea!important}
/* Accessible theme chooser: native details in desktop header; buttons in mobile menu. */
.ek-theme-desktop{position:relative;display:block;flex:none}
.ek-theme-desktop>summary{display:grid;place-items:center;width:44px;height:44px;border-radius:50%;color:inherit;cursor:pointer;list-style:none}
.ek-theme-desktop>summary::-webkit-details-marker{display:none}
.ek-theme-desktop>summary svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.5}
.ek-theme-desktop>summary:hover{background:#87958a22}
.ek-theme-desktop[open]>summary{outline:2px solid currentColor;outline-offset:-4px}
.ek-theme-panel{display:grid;gap:4px;padding:9px;border:1px solid var(--ek-theme-panel-line);border-radius:14px;background:var(--ek-theme-panel-bg);color:var(--ek-theme-panel-fg);box-shadow:0 12px 35px #111a1460}
.ek-theme-desktop .ek-theme-panel{position:absolute;top:calc(100% + 10px);right:0;width:192px;z-index:125}
.ek-theme-panel button{display:flex;align-items:center;min-height:44px;width:100%;padding:10px 12px;border:0;border-radius:8px;background:transparent;color:inherit;font:500 14px/1.4 var(--ek-font-body);text-align:left;cursor:pointer}
.ek-theme-panel button:hover{background:#778d7726}
.ek-theme-panel button[aria-pressed="true"]{background:#677d7133;font-weight:700}
.ek-theme-panel button[aria-pressed="true"]:after{content:"✓";margin-left:auto;font-weight:700}
.ek-theme-mobile{margin-top:18px;border-top:1px solid var(--ek-line);padding-top:18px}
.ek-theme-mobile>p{margin:0 0 9px;font:600 13px/1.5 var(--ek-font-body)}
.ek-theme-mobile .ek-theme-panel{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:0;background:transparent;box-shadow:none;border:0}
.ek-theme-mobile .ek-theme-panel button{justify-content:center;min-width:0;padding:11px 5px;border:1px solid var(--ek-line);font-size:12px;text-align:center}
.ek-theme-mobile .ek-theme-panel button[aria-pressed="true"]:after{content:none}
@media(max-width:1000px){.ek-header .ek-theme-desktop{display:none}}
@media(prefers-reduced-motion:reduce){.ek-theme-desktop>summary,.ek-theme-panel button{transition:none}}

/* Keep white-on-photograph CTAs and fallback image cards legible. */
:root[data-ek-theme="dark"] .skip{background:#303b32;color:#fff}
:root[data-ek-theme="dark"] .ek-ed-card{background:#303b32;color:#fff}
:root[data-ek-theme="dark"] .home .hero-actions .button:not(:first-child){color:#fff}
:root[data-ek-theme="dark"] .home .hero-actions .button:first-child{background:#283b31;color:#f2f0e9;border-color:#8ea092}
:root[data-ek-theme="dark"] .home .hero-actions .button:hover{background:#3a5144;color:#fff}
:root[data-ek-theme="dark"] .ek-header .ek-theme-desktop .ek-theme-panel button{color:var(--ek-theme-panel-fg)}
/* Mobile menu headings and choices inherit dialog colors, not photographic hero text. */
:root[data-ek-theme="dark"] #ek-menu .ek-theme-mobile{color:#f2f0e9}
:root[data-ek-theme="dark"] #ek-menu .ek-theme-panel button[aria-pressed="true"]{border-color:#b9c8bc}
