/* MIROTECA: diseño común de las páginas estáticas (rediseño de nov 2026).
   Va DESPUÉS de los estilos propios de cada página, así que manda sobre ellos.
   Lo aplica herramientas/rediseno.py. Claro por defecto; oscuro con html[data-theme=dark]. */

:root{
  --navy:#1e3a52;--ink:#22303c;--muted:#566673;--line:#e3e8ed;--bg:#fff;
  --brand:#1f6f84;--brand-d:#17596b;--on-brand:#fff;--amber:#b45309;
  --surface:#fff;--surface2:#f4f6f8;--bien:#e9f6ef;--bien-t:#14633f;
  --medio:#fff4e0;--medio-t:#7a4800;--mal:#fdecea;--mal-t:#a32a20;
}
[data-theme=dark]{
  --navy:#e8eef4;--ink:#d8e1e9;--muted:#a9b8c6;--line:#2a3749;--bg:#0f172a;
  --brand:#38bdf8;--brand-d:#7dd3fc;--on-brand:#0b2233;--amber:#fbbf24;
  --surface:#172233;--surface2:#1e2b3d;--bien:#123626;--bien-t:#9fe3bf;
  --medio:#3a2c10;--medio-t:#fcd58a;--mal:#3d1a18;--mal-t:#f7b3ac;
}
/* Solo los campos: en toda la página dejaría fondo blanco en los iframes de anuncios vacíos */
[data-theme=dark] input,[data-theme=dark] select,[data-theme=dark] textarea{color-scheme:dark}

html{background:var(--bg)}
html body{background:var(--bg);color:var(--ink);font-size:16.5px;line-height:1.6}
h2{color:var(--navy)}
a{color:var(--brand)}
:focus-visible{outline:3px solid var(--brand);outline-offset:2px;border-radius:4px}
.saltar{position:absolute;left:-999px;top:0;z-index:100;background:var(--brand);color:var(--on-brand)!important;padding:.7rem 1rem;border-radius:0 0 10px 0;font-weight:700}
.saltar:focus{left:0}

/* Sin animación al entrar: la página aparece ya colocada. */
.wrap>*,.hero-in>*{animation:none!important}

/* ── Cabecera ── */
html body .topbar{position:sticky;top:0;z-index:40;display:flex;flex-wrap:nowrap;align-items:center;justify-content:flex-start;gap:1.25rem;background:var(--surface);color:var(--navy);border-bottom:1px solid var(--line);-webkit-backdrop-filter:none;backdrop-filter:none;padding:.55rem max(1.5rem,calc((100vw - 1200px)/2 + 1.5rem))}
.tb-logo{display:flex;align-items:center;gap:.55rem;flex:none;color:var(--navy)}
.topbar .tb-logo img{height:38px;width:auto;display:block}
html body .brandname{font-family:'Syne',sans-serif;font-weight:800;font-size:1.15rem;letter-spacing:.4px;background:none;-webkit-text-fill-color:currentColor;color:var(--navy)}
.tb-buscar{position:relative;flex:1 1 auto;min-width:160px;margin:0}
.tb-buscar input{width:100%;height:44px;box-sizing:border-box;border:1px solid var(--line);border-radius:10px;padding:0 .9rem;font:inherit;font-size:.95rem;color:var(--ink);background:var(--surface2)}
.tb-res{position:absolute;top:calc(100% + 6px);left:0;right:0;z-index:50;list-style:none;margin:0;padding:.3rem;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 32px rgba(16,40,60,.18);max-height:70vh;overflow:auto}
.tb-res[hidden]{display:none}
.tb-res li{margin:0}
.tb-res a{display:flex;justify-content:space-between;align-items:center;gap:.8rem;min-height:44px;padding:.4rem .7rem;border-radius:8px;color:var(--navy);text-decoration:none;font-weight:600;font-size:.95rem;line-height:1.3}
.tb-res a small{flex:none;font-weight:500;color:var(--muted);font-size:.78rem}
.tb-res a:hover,.tb-res a.activo{background:var(--surface2)}
.tb-res .nada{padding:.7rem;color:var(--muted);font-size:.92rem}
html body .topnav{position:static!important;display:flex;flex-wrap:nowrap!important;align-items:center;gap:.15rem;margin:0!important;padding:0;width:auto!important;background:none;border:0;box-shadow:none;flex:none}
html body .topnav a{display:inline-flex;align-items:center;min-height:44px;color:var(--navy);font-weight:500;font-size:.93rem;padding:0 .6rem;border-radius:8px;white-space:nowrap;background:none;text-decoration:none;transition:color .15s,background .15s}
html body .topnav a:hover{color:var(--brand);background:var(--surface2)}
html body .topnav a.play{background:var(--brand);color:var(--on-brand);font-weight:700;padding:0 1rem;margin-left:.35rem;border-radius:10px;box-shadow:none;transition:background .15s}
html body .topnav a.play:hover{background:var(--brand-d);color:var(--on-brand)}
.solo-menu{display:none!important}
.tb-tema,.tb-lupa,.tb-menu{width:44px;height:44px;flex:none;display:flex;align-items:center;justify-content:center;gap:.6rem;background:none;border:0;border-radius:10px;color:var(--navy);cursor:pointer;font:inherit;padding:0}
.tb-tema:hover,.tb-lupa:hover,.tb-menu:hover{background:var(--surface2)}
.tb-tema img{width:26px;height:26px;object-fit:contain}
.tb-tema span{display:none}
.tb-lupa,.tb-menu{display:none}

@media(max-width:980px){
  html body{padding-bottom:0}
  html body .topbar{gap:.3rem;padding:.3rem .5rem .3rem .85rem;min-height:56px}
  .tb-logo{flex:1;min-width:0}
  .topbar .tb-logo img{height:34px}
  html body .brandname{font-size:1.05rem}
  .tb-lupa,.tb-menu{display:flex}
  .tb-buscar{display:none;position:absolute;left:.6rem;right:.6rem;top:calc(100% + .4rem);z-index:51}
  .buscando .tb-buscar{display:block}
  .buscando .tb-buscar input{background:var(--surface);box-shadow:0 8px 24px rgba(16,40,60,.18)}
  html body .topnav{display:none;position:absolute!important;left:0!important;right:0!important;top:100%!important;bottom:auto!important;z-index:49;flex-direction:column;align-items:stretch;gap:0;padding:.4rem .6rem .8rem;background:var(--surface);border-bottom:1px solid var(--line);box-shadow:0 14px 30px rgba(16,40,60,.16);max-height:calc(100dvh - 60px);overflow:auto!important}
  html body .menu-abierto .topnav{display:flex}
  html body .topnav a,html body .topnav a:not(.play){display:flex;font-size:1rem;min-height:48px;padding:0 .7rem;flex:none}
  html body .topnav a.play{justify-content:center;margin:.4rem 0 0;font-size:1rem;padding:0}
  .solo-menu{display:flex!important}
  .tb-tema{width:100%;justify-content:flex-start;min-height:48px;padding:0 .7rem;font-size:1rem;font-weight:500}
  .tb-tema span{display:inline}
}

/* ── Título de cada página ── */
html body .hero{background:var(--bg);color:var(--ink);padding:1.1rem 1.5rem 0;overflow:visible}
.hero::after{display:none}
.hero-in{max-width:1152px}
.crumbs{color:var(--muted);font-size:.84rem;margin-bottom:.55rem}
.crumbs a{color:var(--muted);text-decoration:underline;text-decoration-color:var(--line);text-underline-offset:2px}
html body .hero h1{color:var(--navy);font-size:clamp(1.75rem,1.2rem + 1.6vw,2.4rem);line-height:1.14;letter-spacing:-.5px}
html body .hero .lead,html body .hero .intro{color:var(--muted)!important;font-size:1.03rem;margin:.4rem 0 0;max-width:72ch}
.hero-row{display:flex;align-items:center;gap:.9rem}
html body .hero-ico{width:64px;height:64px;padding:0;background:none;box-shadow:none;border-radius:0}
html body .hero-ico.emo{font-size:2.3rem}
[data-theme=dark] .hero-ico:not(.emo){background:#fff;border-radius:14px;padding:7px}
html body .chip{display:flex;align-items:center;gap:.45rem;background:none;border:0;border-radius:0;padding:0;min-height:0;margin-top:.7rem;color:var(--muted);font-size:.82rem;font-weight:500;line-height:1.35}
.chip .dot{width:8px;height:8px;flex:none;box-shadow:none;background:#2f9e6e}
html body .cta-top{background:var(--brand);color:var(--on-brand);box-shadow:none;border-radius:12px;min-height:48px;margin:.9rem 0 0}
html body .cta-top:hover{background:var(--brand-d);transform:none;box-shadow:none}
.t-ficha .cta-top,.t-vineta .cta-top,.t-analitica .cta-top{display:none}
@media(max-width:480px){.t-analitica .chip{min-height:2.7em}}

/* ── Columna de contenido y anuncios ── */
html body .wrap{max-width:1200px;padding:1.2rem 1.5rem 2rem}
.wrap>p[style*="max-width"],.wrap>input[style*="max-width"],.wrap>section[style*="max-width"],.wrap>div[style*="max-width"]{max-width:none!important}
@media(max-width:1099px){html body .wrap{max-width:860px}html body .hero-in{max-width:812px}html body .hero{padding-left:max(1.5rem,calc((100vw - 812px)/2))}}
@media(max-width:640px){html body .wrap{padding:1rem 1rem 1.5rem}html body .hero{padding:.9rem 1rem 0}}
@media(min-width:1100px){
  html body .wrap{padding-right:calc(1.5rem + 340px);min-height:1290px}
  .t-corta .wrap{min-height:0}
  html body .hero{padding-left:max(1.5rem,calc((100vw - 1200px)/2 + 1.5rem));padding-right:max(1.5rem,calc((100vw - 1200px)/2 + 1.5rem))}
  html body .mir-ad-side{display:block;position:absolute;width:300px;left:auto;right:1.5rem}
  html body .mir-ad-left{top:1.2rem;bottom:50%}
  html body .mir-ad-right{top:50%;bottom:0}
  html body .mir-ad-sticky{position:sticky;top:84px;text-align:center}
  .t-corta .mir-ad-right{display:none}
  .t-corta .mir-ad-left{bottom:0}
}
.mir-ad-slbl,.mir-ad>span{color:var(--muted)!important}
.mir-ad{margin:1.5rem auto!important;text-align:center}
.mir-slot{display:inline-block;width:300px;height:250px}
@media(min-width:800px){.mir-slot{width:728px;height:90px}}

/* ── Bloques de texto: sin cajas ni sombras ── */
html body section,html body .desc,html body .amplia,html body .prose,html body .qa{background:none;border:0;border-radius:0;box-shadow:none;padding:0;margin:1.7rem 0 0}
html body .wrap h2{font-size:1.38rem;margin:1.7rem 0 .45rem;letter-spacing:-.25px}
html body section>h2:first-child,html body .amplia>h2:first-child,html body .prose>h2:first-child{margin-top:0}
html body .wrap p,html body .wrap li{max-width:76ch}
html body .desc{padding:.1rem 0}

/* Tarjetas que sí siguen siendo tarjetas */
html body section.top-mir-2027{background:var(--surface2)!important;border:0!important;box-shadow:none!important;border-radius:14px!important}
.top-mir-2027>div:first-child[style*="height:6px"]{display:none}
.top-mir-2027 span[style*="linear-gradient"]{background:var(--surface)!important;color:var(--navy)!important;border:1px solid var(--line)}
.top-mir-2027 a{display:inline-flex!important;align-items:center;min-height:44px;background:var(--surface)!important;border-radius:10px!important;padding:.25rem .85rem!important;color:var(--navy)!important}
.top-mir-2027 a:hover{border-color:var(--brand)!important}
@media(max-width:700px){.t-hub ul.list .r{display:none}html body.t-hub .wrap ul.list li{padding:0}html body.t-hub .wrap ul.list a{display:flex;align-items:center;min-height:48px;padding:.3rem .9rem}.t-hub ul.list br{display:none}}
html body .wrap ul.list{gap:.6rem;grid-template-columns:repeat(auto-fill,minmax(270px,1fr))}
html body .wrap ul.list li{max-width:none;background:var(--surface);border:1px solid var(--line);box-shadow:none;border-radius:12px;padding:.75rem .95rem;transition:border-color .15s}
html body .wrap ul.list li:hover{border-color:var(--brand)}
html body .wrap ul.list a{color:var(--navy);font-size:1rem}
html body .wrap .term{background:var(--surface);box-shadow:none;border:1px solid var(--line);border-left:3px solid var(--brand)}
html body .wrap h2.cat{border-top:1px solid var(--line);font-size:1.3rem}
.cat-n{background:var(--brand);color:var(--on-brand)}
.rel,ul.rel{gap:.5rem}
html body .rel a,html body ul.rel a,html body .masvin a{display:inline-flex;align-items:center;min-height:44px;background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:.3rem .9rem;color:var(--navy);font-size:.93rem;font-weight:600;transition:border-color .15s}
html body .rel a:hover,html body ul.rel a:hover{border-color:var(--brand)}

/* ── Calculadora ── */
html body .calc{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:.9rem 1rem 1rem;box-shadow:none;margin-top:1.1rem}
html body .calc h2{margin-top:0;font-size:1.15rem}
html body .calc::before,html body .calc::after{display:none}
html body .calc label{display:grid;grid-template-columns:24px minmax(0,1fr) auto;column-gap:.75rem;min-height:52px;align-items:center}
html body .calc label>input{margin:0}
html body .calc label>span:not(.it){margin-left:0!important}
html body .calc>.reset,html body .calc>button{justify-self:start;width:auto}
@media(max-width:480px){html body .calc label>span:not(.it):not(:only-of-type){grid-column:2/-1;justify-self:start;margin-top:.3rem}}
html body .calc input[type=number],html body .calc input[type=text],html body .calc select{min-height:44px}
html body .calc input[type=checkbox],html body .calc input[type=radio]{width:22px;height:22px;accent-color:var(--brand);flex:none}
html body .calc .reset{min-height:44px;background:var(--surface);color:var(--muted)}
html body .calc .res{border-radius:12px;box-shadow:none;border:0;transition:background .2s,color .2s}
html body .calc .res.r0{background:var(--bien);color:var(--bien-t)}
html body .calc .res.r1{background:var(--medio);color:var(--medio-t)}
html body .calc .res.r2{background:var(--mal);color:var(--mal-t)}
@media(min-width:1100px){
  html body .calc{display:grid;grid-template-columns:minmax(0,1fr) 232px;column-gap:20px;align-items:start}
  html body .calc>*{grid-column:1}
  html body .calc>.res{grid-column:2;grid-row:1/span 80;position:sticky;top:84px;bottom:auto;margin:0}
}
@media(max-width:1099px){html body .calc .res{bottom:5.2rem}}

/* ── Tarjeta de practicar ── */
html body .medx{max-width:none;background:var(--surface2);color:var(--ink);border-radius:14px;margin:1.1rem 0 1.2rem}
html body .medx b{color:var(--navy)}
html body .medx span{color:var(--muted);opacity:1}
html body .medx a{display:inline-flex;align-items:center;justify-content:center;min-height:46px;background:var(--brand);color:var(--on-brand);border-radius:10px;padding:.3rem 1rem}
html body .medx a:hover{background:var(--brand-d)}
html body .medx a.s{background:none;color:var(--navy);border:1px solid var(--line)}
html body .medx a.s:hover{border-color:var(--brand);background:none}

/* ── Esquemas ── */
html body img.vin{box-shadow:none;border-radius:14px;border:1px solid var(--line);margin-bottom:.9rem}
.dl-row{justify-content:flex-start;margin:.4rem 0}
.dl-js{display:flex;flex-wrap:wrap;gap:.5rem;margin:.7rem 0 .3rem}
.dl-js .dl-btn{display:inline-flex;align-items:center;padding:.5rem 1rem;font-weight:700;text-decoration:none}
@media print{.dl-row{display:none!important}}
html body .dl-btn{min-height:46px;border:1px solid var(--line);color:var(--navy);background:var(--surface);border-radius:10px;font-size:.93rem}
html body .dl-btn:hover{background:var(--surface);color:var(--brand);border-color:var(--brand)}
html body .dl-btn.pri{background:var(--brand);border-color:var(--brand);color:var(--on-brand)}
html body .dl-btn.pri:hover{background:var(--brand-d);border-color:var(--brand-d);color:var(--on-brand)}
.dl-nota{text-align:left;margin:.2rem 0 .5rem}
html body .prensa-card{max-width:none;margin:1.4rem 0 0;background:var(--surface);border:1px solid var(--line);box-shadow:none;border-radius:12px;padding:.5rem .8rem}
.t-vineta .wrap,.t-en .wrap{display:flex;flex-direction:column}
.t-vineta .wrap>*,.t-en .wrap>*{min-width:0}
.t-vineta .prensa-card,.t-en .prensa-card{order:50}
.t-vineta .morevin,.t-en .morevin{order:40}
.t-vineta .cta,.t-en .cta{order:45}
html body .prensa-card .pc-ico{background:var(--surface2);color:var(--navy)}
html body .prensa-card .pc-k,html body .prensa-card .pc-l{color:var(--brand)}
html body .prensa-card .pc-m{color:var(--navy)}
html body .prensa-card .pc-q{color:var(--muted)}
.esq-sc{background:#fff}

/* Un solo «practicar» por pantalla: el de abajo sobra donde ya está la tarjeta */
.t-ficha a.cta[href^="/?practicar"],.t-ficha a.cta[href="/"],.t-vineta a.cta[href="/"],.t-vineta a.cta[href^="/?practicar"],.t-analitica a.cta[href="/"]{display:none}
html body .cta{background:var(--surface);color:var(--brand);border:1px solid var(--line);box-shadow:none;border-radius:12px;font-weight:700;padding:.8rem;transition:border-color .15s}
html body .cta:hover{transform:none;border-color:var(--brand)}
html body .share{min-height:44px;background:var(--surface);color:var(--navy);border:1px solid var(--line);border-radius:10px}
html body .wrap a[style*="border:1.5px solid var(--brand)"]{background:var(--surface)!important}
html body .backlinks{color:var(--muted)}

/* Caso clínico, mnemotecnia y bloque de discrepancias */
html body .caso-ej{background:var(--surface2);border:1px solid var(--line);border-radius:14px;padding:1rem 1.1rem;margin-top:1.7rem}
html body .caso-ej details{background:var(--surface);border:1px solid var(--line)}
html body .caso-ej summary,html body .caso-ej .med{color:var(--brand);min-height:44px;display:flex;align-items:center}
html body .disc{background:var(--medio);border-color:#d9b25c;color:var(--ink)}

/* ── Plegado en móvil: los títulos se abren al tocar; el texto sigue en la página ── */
.pleg>h2>button{all:unset;display:block;width:100%}
@media(max-width:700px){
  html.js .pleg:not(.abierta)>*:not(h2){display:none}
  html body .pleg{margin:0;border-top:1px solid var(--line)}
  html body .wrap .pleg>h2{margin:0;font-size:1.08rem}
  .pleg>h2>button{display:flex;align-items:center;justify-content:space-between;gap:.8rem;min-height:54px;cursor:pointer}
  .pleg>h2>button::after{content:"+";flex:none;font-size:1.4rem;font-weight:500;color:var(--muted)}
  .pleg.abierta>h2>button::after{content:"–"}
  .pleg>h2>button:focus-visible{outline:3px solid var(--brand);outline-offset:2px}
  html body .pleg.abierta{padding-bottom:.9rem}
  html body .caso-ej.pleg{background:none;border:0;border-top:1px solid var(--line);border-radius:0;padding:0}
}

/* ── Medicinedle ── */
html body .edl{max-width:none;margin:0}
html body.t-medicinedle .hero-ico{background:none!important;padding:0;border-radius:15px;overflow:hidden}
.t-medicinedle .hero-ico img{display:block;width:64px;height:64px}
[data-theme=dark] .edl-res{background:var(--surface)!important;border-color:var(--line)!important}
[data-theme=dark] .edl-pistas li,[data-theme=dark] .edl-sol,[data-theme=dark] .edl-comp,[data-theme=dark] .edl-go5,[data-theme=dark] .edl-esq a,[data-theme=dark] .edl-stats div,[data-theme=dark] .edl-arch a,[data-theme=dark] .edl-int li,[data-theme=dark] .edl-lang,[data-theme=dark] .edl-in,[data-theme=dark] .edl-sug{background:var(--surface2)!important;color:var(--ink)!important;border-color:var(--line)!important}
[data-theme=dark] .edl-esq b,[data-theme=dark] .edl-res h2,[data-theme=dark] .edl-stats b,[data-theme=dark] .edl-h3{color:var(--navy)!important}
[data-theme=dark] .edl-go5{color:var(--brand)!important;border-color:var(--brand)!important}
[data-theme=dark] .edl-comp .c1{background:none!important;color:var(--brand)!important;border-color:var(--brand)!important}

/* ── Pie ── */
html body .foot{background:var(--surface2);color:var(--muted);margin-top:0;padding:1.6rem 1.5rem}
.foot::before{display:none}
html body .foot-in{max-width:1152px;text-align:left}
html body .foot .fbrand{background:none;-webkit-text-fill-color:currentColor;color:var(--navy)}
html body .foot-links{justify-content:flex-start;gap:0 .9rem}
html body .foot a{color:var(--muted);margin:0;font-size:.88rem;display:inline-flex;align-items:center;min-height:36px}
html body .foot a:hover{color:var(--brand)}
html body .foot p{color:var(--muted)!important}

/* ── Modo oscuro: lo que viene escrito a mano en cada página ── */
[data-theme=dark] [style*="background:#fff"],[data-theme=dark] [style*="background: #fff"]{background:var(--surface)!important}
[data-theme=dark] [style*="background:#eef2f6"],[data-theme=dark] [style*="background:#eef6fb"],[data-theme=dark] [style*="background:#f6"],[data-theme=dark] [style*="background:#fef"],[data-theme=dark] [style*="background:#fff7"],[data-theme=dark] [style*="background:#fff8"],[data-theme=dark] [style*="background:#fffb"]{background:var(--surface2)!important}
[data-theme=dark] [style*="color:#1e3a52"],[data-theme=dark] [style*="color:var(--navy"]{color:var(--navy)!important}
[data-theme=dark] [style*="color:var(--brand-d"],[data-theme=dark] [style*="color:#2f7d92"],[data-theme=dark] [style*="color:#276577"]{color:var(--brand)!important}
[data-theme=dark] [style*="color:#5b6b78"],[data-theme=dark] [style*="color:#7e97a8"]{color:var(--muted)!important}
[data-theme=dark] [style*="border:1px solid #"]{border-color:var(--line)!important}
[data-theme=dark] input,[data-theme=dark] select,[data-theme=dark] textarea{background:var(--surface2);color:var(--ink);border-color:var(--line)}
[data-theme=dark] table{color:var(--ink)}
[data-theme=dark] th,[data-theme=dark] td{border-color:var(--line);color:var(--ink);background-color:transparent}
[data-theme=dark] th{background-color:var(--surface2)!important;color:var(--navy)!important}
[data-theme=dark] tr{background:none!important}
[data-theme=dark] .mnemo,[data-theme=dark] .vaccal,[data-theme=dark] .desc{color:var(--ink)}
[data-theme=dark] img.vin,[data-theme=dark] .esq-sc img,[data-theme=dark] .grid img,[data-theme=dark] .enhub img{background:#fff}

@media (prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
@media print{.topbar,.foot,.mir-ad,.mir-ad-side,.medx{display:none!important}}

/* ── Modo oscuro: bloques de cada sección con colores propios ── */
[data-theme=dark] :is(#fsearch,#vsearch,#hubsearch,.calc .reset,.fchips button,.navchips a,.sexsel,.sexsel button,.frm,.frm .acts button,.en-card,.enhub a,.tnm-tcard,.tnmb-b,ul.art a,ul.grid a,.edl-arch a,.edl-comp,.edl-esq a,.edl-form input,.edl-lang button,.edl-pistas li,.edl-sol,.edl-stats div,.edl-sug,.edl-go5){background:var(--surface);color:var(--ink);border-color:var(--line)}
[data-theme=dark] :is(.frm .eq,.frm .out,.gaso-out,.anlt-ref,.anlt-err,.en-paises span,.cut th,.info-table th,.labtab th,.vaccal tbody tr:nth-child(even) td,.vaccal .mn,.labnote,.labtab tr.hit,.edl-mir,.mnemo,.edl-banner,.edl-pistas li.oculta,.edl-int li.skip,.edl-sug li.on,.edl-sug li:hover,.fchips button:hover,.navchips a:hover){background:var(--surface2);color:var(--ink);border-color:var(--line)}
[data-theme=dark] :is(.chk.ok,.flag.ok,.frm .out.ok,.gaso-out.ok,.st0,.edl-arch a.ok,.edl-int li.ok,.nota.nt-ok){background:var(--bien);color:var(--bien-t);border-color:transparent}
[data-theme=dark] :is(.frm .out.warn,.gaso-out.warn,.st2,.edl-int li.cerca){background:var(--medio);color:var(--medio-t);border-color:transparent}
[data-theme=dark] :is(.chk.hi,.flag.hi,.frm .out.bad,.gaso-out.bad,.st3,.edl-arch a.ko,.edl-int li.ko){background:var(--mal);color:var(--mal-t);border-color:transparent}
[data-theme=dark] :is(.chk.lo,.flag.lo,.st1,.nota.nt-lo){background:#12303d;color:#9fdcf5;border-color:transparent}
[data-theme=dark] :is(.st0 .st,.st1 .st,.byline .revok){color:inherit}
[data-theme=dark] :is(.frm h3,.frm label,.frm .hint,.frm .eq,.fin label,.anlt-g h3,.anlt-ref,.anlt-ref b,.faqq h3,.en-card b,.enhub b,ul.grid span,ul.grid b,ul.art a,ul.art b,.labnote b,.vaccal .mn b,.fchips button,.navchips a,.sexsel button,.en-paises span,.frm .acts button,.edl-arch a,.edl-arch h3,.edl-arch p,.edl-top,.edl-top b,.edl-q,.edl-q strong,.edl-comp p,.edl-esq span,.edl-form input,.edl-lang button,.edl-mir,.edl-mir span,.edl-res .ver,.edl-sig,.edl-sol,.edl-stats span,.edl-sug li,.edl-go5 small,.edl-pistas li,.edl-pistas li.oculta,.edl-pistas li.resto,.edl-banner,.tlayer,.trseg,.en-card small,.enhub span,.vaccal td,.vaccal td b,.vaccal th){color:var(--ink)}
[data-theme=dark] :is(.frm h3,.edl-arch h3,.edl-res h2,.edl-esq b,.edl-stats b,.anlt-g h3,.faqq h3){color:var(--navy)}
[data-theme=dark] :is(.edl-skip,.edl-sug li mark,.edl-banner a,.edl-h3){color:var(--brand)}
[data-theme=dark] .sexsel button.on{background:var(--brand);color:var(--on-brand)}
[data-theme=dark] .wrap p[style*="color"],[data-theme=dark] .wrap div[style*="color:#"],[data-theme=dark] .wrap span[style*="color:#"]{color:var(--ink)!important}
[data-theme=dark] .vaccal td,[data-theme=dark] .vaccal th,[data-theme=dark] .labtab td{background:transparent}
/* Medicinedle en claro: texto de ayuda algo más oscuro */
.edl-pistas li.resto span{color:var(--muted)}

/* Ajustes de contraste detectados en la auditoría */
html body .calc .res :is(.lvl,.rec,.pts){color:inherit;opacity:1}
html body .calc .reset{color:var(--ink)}
html body .frm .out,html body .gaso-out{color:var(--ink)}
html body .frm .out.ok,html body .gaso-out.ok{color:var(--bien-t)}
html body .frm .out.warn,html body .gaso-out.warn{color:var(--medio-t)}
html body .frm .out.bad,html body .gaso-out.bad{color:var(--mal-t)}
[data-theme=dark] .mnemo>*:first-child,[data-theme=dark] .mnemo span[style]{background:var(--medio)!important;color:var(--medio-t)!important}
[data-theme=dark] .vaccal .mn .tag{color:var(--medio-t)}

html{scroll-padding-top:76px}
/* En móviles muy estrechos el anuncio de 300 px usa también el margen de la página */
@media(max-width:340px){.mir-ad{margin-left:-1rem!important;margin-right:-1rem!important}}

/* Zonas de toque cómodas */
.tb-logo{min-height:44px}
html body :is(.frm .acts button,.fchips button,.navchips a,.sexsel button,.calc .copy,.edl-lang button,ul.art a){min-height:44px;display:inline-flex;align-items:center;justify-content:center}
html body ul.art a{display:block;padding-top:.7rem;padding-bottom:.7rem}
html body .calc>button,html body .calc>.reset{margin-left:0}

/* Láminas verticales (laminas_v2.py, 15 nov 2026): 1620 de ancho. En escritorio no ocupan toda la columna; en las miniaturas se enseña la cabecera */
html body img.vin[width="1620"]{max-width:660px;margin-left:auto;margin-right:auto}
.enhub img[width="1620"]{object-fit:cover;object-position:top}
ul.grid img:is([src*="child-pugh-tabla"],[src*="cha2ds2-vasc-tabla"],[src*="has-bled-tabla"],[src*="curb-65-tabla"],[src*="alvarado-tabla"],[src*="criterios-de-light-tabla"]){object-position:top}

/* ── Intérprete y lámina de la analítica (15 nov 2026): herramientas/analitica_interprete.py ── */
.anlt-int{background:var(--surface);border:2px solid var(--brand);border-radius:16px;padding:1rem 1.1rem 1.1rem;margin:0 0 1.4rem;scroll-margin-top:80px}
html body .wrap .anlt-int h2{margin:0 0 .3rem;font-size:1.15rem;color:var(--navy)}
.anlt-int .ai-p{margin:0 0 .8rem;font-size:.92rem;color:var(--muted)}
.ai-f{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:.6rem .7rem;align-items:end}
.ai-f label{display:flex;flex-direction:column;gap:.25rem;font-size:.8rem;font-weight:700;color:var(--muted);min-width:0}
.ai-f label[hidden]{display:none}
.ai-f .ai-val{grid-column:span 2;color:var(--navy)}
.ai-f input,.ai-f select{width:100%;min-height:46px;border:1px solid var(--line);border-radius:10px;padding:.4rem .6rem;font:inherit;font-size:1rem;font-weight:400;color:var(--ink);background:var(--bg)}
.ai-f .ai-val span{display:flex;align-items:center;gap:.5rem}
.ai-f .ai-val input{border:2px solid var(--brand);font-size:1.15rem;font-weight:700}
.ai-f .ai-u{font-style:normal;font-weight:700;font-size:.95rem;color:var(--navy);white-space:nowrap}
.ai-f input:focus-visible,.ai-f select:focus-visible,.ai-go:focus-visible{outline:3px solid var(--brand);outline-offset:2px}
.ai-go{grid-column:1/-1;min-height:48px;border:0;border-radius:10px;background:var(--brand);color:var(--on-brand);font:inherit;font-weight:700;font-size:1rem;cursor:pointer}
.ai-go:hover{background:var(--brand-d)}
.ai-out{margin-top:.9rem;border-radius:12px;padding:.8rem 1rem;background:var(--surface2);border-left:6px solid var(--line);color:var(--ink)}
.ai-out[hidden]{display:none}
.ai-out.up{border-left-color:#e0a03a}.ai-out.dn{border-left-color:#3a8fd0}.ai-out.ok{border-left-color:#2f9e6b}
.ai-out p{margin:0 0 .5rem}.ai-out p:last-child{margin-bottom:0}
.ai-out .ai-t{font-weight:700;color:var(--navy);margin-top:.7rem}
.ai-out ol{margin:.2rem 0 .6rem;padding-left:1.4rem}
.ai-out li{margin:.1rem 0}
.ai-out li a{display:inline-block;padding:.32rem 0}
.ai-out .ai-n{font-size:.82rem;color:var(--muted)}
.anlt-lam{max-width:520px;margin:1.3rem auto 0;text-align:center}
.anlt-lam img{display:block;width:100%;height:auto;border:1px solid var(--line);border-radius:14px;background:#fff}
.anlt-lam figcaption{font-size:.85rem;color:var(--muted);margin:.5rem 0 0}
@media print{.anlt-int{display:none}}
