:root{
  --dark-bg:#0c1520;
  --dark-surface:#121d29;
  --dark-surface-2:#172433;
  --dark-border:#2b3b4a;
  --dark-text:#dce7f0;
  --dark-muted:#9fb2c2;
  --dark-heading:#f2f8fb;
  --dark-link:#7ee7ff;
}

.theme-toggle{
  position:fixed;
  top:16px;
  right:16px;
  z-index:260;
  display:inline-flex;
  align-items:center;
  gap:10px;
  min-height:44px;
  padding:10px 14px;
  border:1px solid rgba(16,62,95,.14);
  border-radius:999px;
  background:rgba(255,255,255,.92);
  color:#062f4d;
  box-shadow:0 12px 34px rgba(16,62,95,.16);
  backdrop-filter:blur(12px);
  font:inherit;
  font-size:.82rem;
  font-weight:900;
  letter-spacing:.01em;
  cursor:pointer;
}
.theme-toggle:hover{transform:translateY(-1px)}
.theme-toggle:focus-visible{outline:3px solid rgba(36,185,211,.35);outline-offset:2px}
.theme-toggle-icon{font-size:1rem;line-height:1}
.theme-toggle-label{white-space:nowrap}

html[data-theme="dark"]{color-scheme:dark;
  --bg:var(--dark-bg);
  --card:var(--dark-surface);
  --line:var(--dark-border);
  --ink:var(--dark-heading);
  --text:var(--dark-text);
  --muted:var(--dark-muted);
  --shadow:0 18px 48px rgba(0,0,0,.42);
  --navy:#17324a;
  --navy2:#214863;
  --teal:#24c3b9;
  --cyan:#5ddcff;
  --green:#71df95;
  --yellow:#ffd766;
  --pink:#ff5cbe;
  --orange:#ff9c44;
}
html[data-theme="dark"],
html[data-theme="dark"] body{background:var(--dark-bg)!important;color:var(--dark-text)!important}
html[data-theme="dark"] .theme-toggle{background:rgba(18,29,41,.94);border-color:#324657;color:var(--dark-heading);box-shadow:0 18px 42px rgba(0,0,0,.45)}
html[data-theme="dark"] .topbar{background:rgba(8,14,22,.92)!important;border-color:var(--dark-border)!important}
html[data-theme="dark"] .top,
html[data-theme="dark"] .app,
html[data-theme="dark"] .shell,
html[data-theme="dark"] main,
html[data-theme="dark"] .wrap,
html[data-theme="dark"] .main{background:transparent!important}
html[data-theme="dark"] .color-line{box-shadow:0 4px 18px rgba(93,220,255,.20)}
html[data-theme="dark"] .top-search input,
html[data-theme="dark"] .search-wrap input,
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .top-actions button,
html[data-theme="dark"] .species-tools button,
html[data-theme="dark"] .portal-link,
html[data-theme="dark"] .btn,
html[data-theme="dark"] .ped-module-nav button,
html[data-theme="dark"] .cookie-actions button,
html[data-theme="dark"] .cookie-actions a{
  background:var(--dark-surface)!important;
  color:var(--dark-text)!important;
  border-color:var(--dark-border)!important;
}
html[data-theme="dark"] .btn.primary,
html[data-theme="dark"] .browse-all-btn,
html[data-theme="dark"] .cookie-actions .accept{
  background:var(--navy)!important;
  color:#fff!important;
  border-color:var(--navy)!important;
}
html[data-theme="dark"] .card,
html[data-theme="dark"] .manual-card,
html[data-theme="dark"] .cover,
html[data-theme="dark"] .hero-panel,
html[data-theme="dark"] .category-card,
html[data-theme="dark"] .species-card,
html[data-theme="dark"] .family-card,
html[data-theme="dark"] .problem-card,
html[data-theme="dark"] .result-card,
html[data-theme="dark"] .source-item,
html[data-theme="dark"] .info,
html[data-theme="dark"] .manual-ad-slot,
html[data-theme="dark"] .cookie-panel,
html[data-theme="dark"] .modal-box,
html[data-theme="dark"] .ped-dashboard,
html[data-theme="dark"] .ped-card,
html[data-theme="dark"] .ped-featured-card,
html[data-theme="dark"] .ped-side-card,
html[data-theme="dark"] .ped-module-card,
html[data-theme="dark"] .ped-learning-card,
html[data-theme="dark"] .ped-summary-card,
html[data-theme="dark"] .ped-quick-card,
html[data-theme="dark"] .ped-memory-card,
html[data-theme="dark"] .ped-error-card,
html[data-theme="dark"] .ped-case-card,
html[data-theme="dark"] .ped-formula-card,
html[data-theme="dark"] .ped-study-bar,
html[data-theme="dark"] .ped-pdf-card,
html[data-theme="dark"] .family-header,
html[data-theme="dark"] .meta-grid .info-box,
html[data-theme="dark"] .related button{
  background:var(--dark-surface)!important;
  color:var(--dark-text)!important;
  border-color:var(--dark-border)!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .note{background:#1a2430!important;border-left-color:var(--orange)!important;color:var(--dark-text)!important}
html[data-theme="dark"] .brand{background:rgba(255,255,255,.04)!important;border-color:var(--dark-border)!important}
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] .page-title,
html[data-theme="dark"] .hero h1,
html[data-theme="dark"] .manual-copy h2,
html[data-theme="dark"] .detail-hero h1,
html[data-theme="dark"] .species-hero h1,
html[data-theme="dark"] .family-header h1,
html[data-theme="dark"] .site-footer strong,
html[data-theme="dark"] .footer strong,
html[data-theme="dark"] label,
html[data-theme="dark"] .brand strong{color:var(--dark-heading)!important}
html[data-theme="dark"] .hero p,
html[data-theme="dark"] .intro,
html[data-theme="dark"] .description,
html[data-theme="dark"] .page-sub,
html[data-theme="dark"] .cover p,
html[data-theme="dark"] .category-card p,
html[data-theme="dark"] .species-card p,
html[data-theme="dark"] .problem-card p,
html[data-theme="dark"] .result-card p,
html[data-theme="dark"] .source-item p,
html[data-theme="dark"] .site-footer,
html[data-theme="dark"] .site-footer-note,
html[data-theme="dark"] .footer,
html[data-theme="dark"] .cookie-panel p,
html[data-theme="dark"] .brand small,
html[data-theme="dark"] .meta,
html[data-theme="dark"] .small,
html[data-theme="dark"] .manual-card p,
html[data-theme="dark"] .safety,
html[data-theme="dark"] .source-item strong,
html[data-theme="dark"] .ped-description,
html[data-theme="dark"] .ped-featured p,
html[data-theme="dark"] .ped-module-card p,
html[data-theme="dark"] .ped-side-card p,
html[data-theme="dark"] .ped-side-card small,
html[data-theme="dark"] .ped-study-bar p,
html[data-theme="dark"] .ped-learning-card p,
html[data-theme="dark"] .ped-summary-card p,
html[data-theme="dark"] .ped-case-text,
html[data-theme="dark"] .ped-memory-card li,
html[data-theme="dark"] .ped-error-card li,
html[data-theme="dark"] .ped-list li,
html[data-theme="dark"] .ped-reason-step span,
html[data-theme="dark"] .ped-quick-step span,
html[data-theme="dark"] .ped-formula-card,
html[data-theme="dark"] .ped-progress-text{color:var(--dark-muted)!important}
html[data-theme="dark"] .site-footer a,
html[data-theme="dark"] .footer a,
html[data-theme="dark"] .links a,
html[data-theme="dark"] .cookie-actions a,
html[data-theme="dark"] .back-link,
html[data-theme="dark"] .source-item a{color:var(--dark-link)!important}
html[data-theme="dark"] .manual-cta,
html[data-theme="dark"] .ped-featured-footer{background:rgba(255,255,255,.03)!important;border-color:var(--dark-border)!important;color:var(--dark-heading)!important}
html[data-theme="dark"] .features span,
html[data-theme="dark"] .manual-copy .status,
html[data-theme="dark"] .count,
html[data-theme="dark"] .source-code,
html[data-theme="dark"] .mini-stat,
html[data-theme="dark"] .ped-chip,
html[data-theme="dark"] .ped-tag,
html[data-theme="dark"] .ped-stat,
html[data-theme="dark"] .ped-pill{background:#182837!important;border-color:#33485a!important;color:var(--dark-text)!important}
html[data-theme="dark"] .search-wrap button,
html[data-theme="dark"] .top-search button{background:transparent!important;color:var(--dark-muted)!important}
html[data-theme="dark"] .manual-ad-slot.preview{border-color:#496172!important;color:var(--dark-muted)!important;background:#101923!important}
html[data-theme="dark"] .manual-ad-slot .ad-label{color:var(--dark-muted)!important}
html[data-theme="dark"] .site-footer,
html[data-theme="dark"] .footer{border-color:var(--dark-border)!important}
html[data-theme="dark"] .cookie-panel{box-shadow:0 20px 60px rgba(0,0,0,.45)!important}
html[data-theme="dark"] .bottom-nav{background:#0f1c29!important;box-shadow:0 15px 38px rgba(0,0,0,.45)!important}
html[data-theme="dark"] .bottom-nav button{background:rgba(255,255,255,.08)!important;color:var(--dark-heading)!important}
html[data-theme="dark"] .bottom-nav button.home{background:var(--cyan)!important;color:#062131!important}
html[data-theme="dark"] .modal{background:rgba(0,0,0,.82)!important}
html[data-theme="dark"] .brand-badge img{background:transparent!important}

@media(max-width:760px){
  .theme-toggle{top:auto;bottom:86px;right:12px;padding:10px 12px}
}
@media(max-width:480px){
  .theme-toggle-label{display:none}
  .theme-toggle{width:44px;height:44px;padding:0;justify-content:center}
}


/* ===== Correcciones avanzadas de contraste y logos ===== */
html[data-theme="dark"] body{
  background:linear-gradient(180deg,#07111b 0%,#0a1420 100%)!important;
}
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .top{
  background:rgba(6,12,19,.96)!important;
  border-bottom:1px solid #233446!important;
  box-shadow:0 2px 0 rgba(255,255,255,.02) inset!important;
}
html[data-theme="dark"] .topbar-inner,
html[data-theme="dark"] .top-inner{
  position:relative;
}
html[data-theme="dark"] .brand{
  background:rgba(15,25,37,.96)!important;
  border:1px solid #26384a!important;
  border-radius:16px!important;
  padding:10px 14px!important;
  box-shadow:0 10px 24px rgba(0,0,0,.24)!important;
}
html[data-theme="dark"] .top .brand{
  background:rgba(15,25,37,.96)!important;
}
html[data-theme="dark"] .brand-badge{
  background:linear-gradient(180deg,#0e1823,#122132)!important;
  border:1px solid #243749!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .brand-badge img,
html[data-theme="dark"] .manual-logo,
html[data-theme="dark"] .brand img{
  background:transparent!important;
}
html[data-theme="dark"] .top a,
html[data-theme="dark"] .top button,
html[data-theme="dark"] .top .brand-copy strong,
html[data-theme="dark"] .brand-copy strong{
  color:#f3f8fc!important;
}
html[data-theme="dark"] .brand-copy small,
html[data-theme="dark"] .top .brand-copy small{
  color:#b5c7d5!important;
}
html[data-theme="dark"] .main,
html[data-theme="dark"] .wrap{
  background:transparent!important;
}
html[data-theme="dark"] .cover,
html[data-theme="dark"] .hero-panel,
html[data-theme="dark"] .detail-hero,
html[data-theme="dark"] .species-hero,
html[data-theme="dark"] .family-header,
html[data-theme="dark"] .ped-hero,
html[data-theme="dark"] .pedagogy-head,
html[data-theme="dark"] .pedagogy-summary,
html[data-theme="dark"] .pedagogy-hub-layout,
html[data-theme="dark"] .ped-main-layout,
html[data-theme="dark"] .ped-shell,
html[data-theme="dark"] .view{
  color:var(--dark-text)!important;
}
html[data-theme="dark"] .cover,
html[data-theme="dark"] .hero-panel,
html[data-theme="dark"] .family-header,
html[data-theme="dark"] .ped-shell,
html[data-theme="dark"] .ped-hero,
html[data-theme="dark"] .pedagogy-head,
html[data-theme="dark"] .pedagogy-progress-shell,
html[data-theme="dark"] .pedagogy-flash-shell{
  background:linear-gradient(180deg,#0f1a27 0%,#0d1722 100%)!important;
  border:1px solid #273a4b!important;
  box-shadow:0 14px 30px rgba(0,0,0,.26)!important;
}
html[data-theme="dark"] .species-hero,
html[data-theme="dark"] .detail-hero,
html[data-theme="dark"] .ped-module-hero,
html[data-theme="dark"] .pedagogy-head{
  background:linear-gradient(135deg,#17405e,#1d5881)!important;
  border:1px solid #2b6d98!important;
}
html[data-theme="dark"] .card,
html[data-theme="dark"] .manual-card,
html[data-theme="dark"] .category-card,
html[data-theme="dark"] .species-card,
html[data-theme="dark"] .family-card,
html[data-theme="dark"] .problem-card,
html[data-theme="dark"] .result-card,
html[data-theme="dark"] .source-item,
html[data-theme="dark"] .agent-card,
html[data-theme="dark"] .syndrome-card,
html[data-theme="dark"] .quick-card,
html[data-theme="dark"] .disease-card,
html[data-theme="dark"] .meta-card,
html[data-theme="dark"] .raw-card,
html[data-theme="dark"] .ped-module-card,
html[data-theme="dark"] .ped-side-card,
html[data-theme="dark"] .ped-learning-card,
html[data-theme="dark"] .ped-summary-card,
html[data-theme="dark"] .ped-quick-card,
html[data-theme="dark"] .ped-memory-card,
html[data-theme="dark"] .ped-error-card,
html[data-theme="dark"] .ped-case-card,
html[data-theme="dark"] .ped-formula-card,
html[data-theme="dark"] .ped-study-bar,
html[data-theme="dark"] .ped-featured,
html[data-theme="dark"] .ped-featured-art,
html[data-theme="dark"] .ped-intro,
html[data-theme="dark"] .pedagogy-intro,
html[data-theme="dark"] .pedagogy-featured,
html[data-theme="dark"] .pedagogy-panel,
html[data-theme="dark"] .pedagogy-card,
html[data-theme="dark"] .pedagogy-resource,
html[data-theme="dark"] .pedagogy-day-card,
html[data-theme="dark"] .pedagogy-case-card,
html[data-theme="dark"] .pedagogy-flash-card,
html[data-theme="dark"] .pedagogy-progress-item,
html[data-theme="dark"] .pedagogy-progress-summary,
html[data-theme="dark"] .pedagogy-progress-bar,
html[data-theme="dark"] .pedagogy-question,
html[data-theme="dark"] .transversal-card,
html[data-theme="dark"] .support-item-card,
html[data-theme="dark"] .support-module-card,
html[data-theme="dark"] .transversal-card.pedagogy-entry-card,
html[data-theme="dark"] .transversal-card.support-entry-card,
html[data-theme="dark"] .pedagogy-resource-list button,
html[data-theme="dark"] .related button{
  background:#111c29!important;
  color:#eaf2f7!important;
  border:1px solid #304455!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .ped-featured,
html[data-theme="dark"] .pedagogy-featured{
  background:linear-gradient(145deg,#182331,#121c29)!important;
  border-color:#44596e!important;
}
html[data-theme="dark"] .ped-featured-art,
html[data-theme="dark"] .pedagogy-academic-icon,
html[data-theme="dark"] .pedagogy-card-icon,
html[data-theme="dark"] .ped-round-icon{
  background:#152334!important;
  color:#8cc6ff!important;
  border:1px solid #32475a!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .pedagogy-panel,
html[data-theme="dark"] .ped-side-card,
html[data-theme="dark"] .pedagogy-resource,
html[data-theme="dark"] .ped-resource,
html[data-theme="dark"] .pedagogy-toolbar button,
html[data-theme="dark"] .pedagogy-toolbar a,
html[data-theme="dark"] .ped-tab,
html[data-theme="dark"] .pedagogy-status-btn,
html[data-theme="dark"] .ped-favorite,
html[data-theme="dark"] .pedagogy-favorite,
html[data-theme="dark"] .ped-flash-toggle,
html[data-theme="dark"] .ped-module-nav button{
  background:#152231!important;
  border-color:#34495b!important;
  color:#eff6fb!important;
}
html[data-theme="dark"] .ped-study-bar,
html[data-theme="dark"] .pedagogy-plan-strip{
  background:linear-gradient(135deg,#10324c,#18486d)!important;
  border:1px solid #2c648a!important;
  color:#fff!important;
}
html[data-theme="dark"] .pedagogy-plan-strip p,
html[data-theme="dark"] .ped-study-bar p,
html[data-theme="dark"] .ped-study-bar span,
html[data-theme="dark"] .ped-stat span{
  color:#dbe7f2!important;
}
html[data-theme="dark"] .badge.code,
html[data-theme="dark"] .source-code,
html[data-theme="dark"] .ped-chip,
html[data-theme="dark"] .ped-tag,
html[data-theme="dark"] .ped-stat,
html[data-theme="dark"] .ped-pill,
html[data-theme="dark"] .pedagogy-card-code,
html[data-theme="dark"] .pedagogy-tag,
html[data-theme="dark"] .count,
html[data-theme="dark"] .badge.support,
html[data-theme="dark"] .badge.medium,
html[data-theme="dark"] .badge.low,
html[data-theme="dark"] .badge.high,
html[data-theme="dark"] .badge.critical,
html[data-theme="dark"] .badge{
  border-color:#3b5367!important;
}
html[data-theme="dark"] .letter,
html[data-theme="dark"] .count,
html[data-theme="dark"] .pedagogy-question-number,
html[data-theme="dark"] .ped-how-num{
  box-shadow:none!important;
}
html[data-theme="dark"] .category-card h3,
html[data-theme="dark"] .species-card h3,
html[data-theme="dark"] .family-card h3,
html[data-theme="dark"] .problem-card h3,
html[data-theme="dark"] .manual-card h3,
html[data-theme="dark"] .disease-card h3,
html[data-theme="dark"] .result-card h3,
html[data-theme="dark"] .ped-module-card h3,
html[data-theme="dark"] .ped-featured h3,
html[data-theme="dark"] .ped-side-card h3,
html[data-theme="dark"] .ped-study-bar h3,
html[data-theme="dark"] .pedagogy-featured h2,
html[data-theme="dark"] .pedagogy-panel h2,
html[data-theme="dark"] .pedagogy-card h3,
html[data-theme="dark"] .pedagogy-question,
html[data-theme="dark"] .meta-card b,
html[data-theme="dark"] .agent-card strong,
html[data-theme="dark"] .syndrome-card strong,
html[data-theme="dark"] .quick-card strong,
html[data-theme="dark"] .transversal-card strong,
html[data-theme="dark"] .raw-card h2,
html[data-theme="dark"] .source-item strong,
html[data-theme="dark"] .ped-how-row strong,
html[data-theme="dark"] .ped-resource,
html[data-theme="dark"] .pedagogy-resource,
html[data-theme="dark"] .pedagogy-open-module,
html[data-theme="dark"] .pedagogy-question-head,
html[data-theme="dark"] .pedagogy-card-head,
html[data-theme="dark"] .manual-copy h2,
html[data-theme="dark"] .manual-copy h3,
html[data-theme="dark"] .top-actions button,
html[data-theme="dark"] .species-tools button,
html[data-theme="dark"] .cover-actions button,
html[data-theme="dark"] .detail-actions button{
  color:#f5fbff!important;
}
html[data-theme="dark"] .category-card p,
html[data-theme="dark"] .species-card p,
html[data-theme="dark"] .family-card p,
html[data-theme="dark"] .problem-card p,
html[data-theme="dark"] .manual-card p,
html[data-theme="dark"] .disease-card p,
html[data-theme="dark"] .result-card p,
html[data-theme="dark"] .meta-card span,
html[data-theme="dark"] .agent-card small,
html[data-theme="dark"] .syndrome-card small,
html[data-theme="dark"] .quick-card small,
html[data-theme="dark"] .source-item p,
html[data-theme="dark"] .source-item .path,
html[data-theme="dark"] .ped-module-card p,
html[data-theme="dark"] .ped-featured p,
html[data-theme="dark"] .ped-side-card p,
html[data-theme="dark"] .ped-side-card small,
html[data-theme="dark"] .ped-how-row small,
html[data-theme="dark"] .ped-description,
html[data-theme="dark"] .ped-intro p,
html[data-theme="dark"] .pedagogy-intro,
html[data-theme="dark"] .pedagogy-featured p,
html[data-theme="dark"] .pedagogy-card p,
html[data-theme="dark"] .pedagogy-card small,
html[data-theme="dark"] .pedagogy-tag,
html[data-theme="dark"] .pedagogy-head p,
html[data-theme="dark"] .pedagogy-resource small,
html[data-theme="dark"] .pedagogy-plan-stat,
html[data-theme="dark"] .pedagogy-progress-stat,
html[data-theme="dark"] .transversal-card small,
html[data-theme="dark"] .brand small,
html[data-theme="dark"] .manual-copy .status,
html[data-theme="dark"] .ped-description,
html[data-theme="dark"] .ped-flash-hint,
html[data-theme="dark"] .ped-case-text,
html[data-theme="dark"] .ped-memory-card li,
html[data-theme="dark"] .ped-error-card li,
html[data-theme="dark"] .ped-list li,
html[data-theme="dark"] .ped-reason-step span,
html[data-theme="dark"] .ped-quick-step span,
html[data-theme="dark"] .ped-formula-card,
html[data-theme="dark"] .pedagogy-answer,
html[data-theme="dark"] .pedagogy-case-guide,
html[data-theme="dark"] .pedagogy-case-prompt,
html[data-theme="dark"] .pedagogy-flash-answer,
html[data-theme="dark"] .pedagogy-progress-summary,
html[data-theme="dark"] .pedagogy-progress-item,
html[data-theme="dark"] .pedagogy-question-list,
html[data-theme="dark"] .pedagogy-question-number,
html[data-theme="dark"] .small,
html[data-theme="dark"] .meta{
  color:#bfd0dc!important;
}
html[data-theme="dark"] .raw-card p,
html[data-theme="dark"] .info .body,
html[data-theme="dark"] .info .body p,
html[data-theme="dark"] .info li,
html[data-theme="dark"] .ped-flash-q,
html[data-theme="dark"] .ped-flash-a,
html[data-theme="dark"] .pedagogy-flash-answer,
html[data-theme="dark"] .pedagogy-answer,
html[data-theme="dark"] label,
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea{
  color:#edf5fb!important;
}
html[data-theme="dark"] .top-search input,
html[data-theme="dark"] .search-wrap input,
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea{
  background:#111c29!important;
  border:1px solid #31495d!important;
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder{color:#8fa7ba!important}
html[data-theme="dark"] .top-search svg,
html[data-theme="dark"] .ped-how-icon,
html[data-theme="dark"] .pedagogy-card-icon,
html[data-theme="dark"] .pedagogy-academic-icon,
html[data-theme="dark"] .ped-module-icon{color:#7fc6ff!important}
html[data-theme="dark"] .empty{color:#b4c6d3!important;border-color:#365163!important}
html[data-theme="dark"] .category-card:hover,
html[data-theme="dark"] .species-card:hover,
html[data-theme="dark"] .family-card:hover,
html[data-theme="dark"] .problem-card:hover,
html[data-theme="dark"] .agent-card:hover,
html[data-theme="dark"] .disease-card:hover,
html[data-theme="dark"] .manual-card:hover,
html[data-theme="dark"] .result-card:hover,
html[data-theme="dark"] .ped-module-card:hover,
html[data-theme="dark"] .pedagogy-card:hover{
  transform:translateY(-2px);
  box-shadow:0 16px 30px rgba(0,0,0,.26)!important;
}
html[data-theme="dark"] .bottom-nav{border:1px solid #1f3346!important}
html[data-theme="dark"] .bottom-nav button{
  border:1px solid rgba(255,255,255,.06)!important;
}
html[data-theme="dark"] .bottom-nav button:disabled{opacity:.55!important}
html[data-theme="dark"] .site-footer,
html[data-theme="dark"] .footer{
  background:transparent!important;
}
html[data-theme="dark"] .topbar + .main,
html[data-theme="dark"] .top + .wrap{
  border-top:1px solid rgba(255,255,255,.04);
}


/* ===== Ajustes finos de logos, líneas de acento y avisos ===== */
.brand{
  align-items:center!important;
}
.brand-badge{
  width:86px!important;
  height:58px!important;
  flex:0 0 86px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:0!important;
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  overflow:visible!important;
}
.brand-badge img{
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  object-position:center center!important;
  display:block!important;
}
.top .brand,
.topbar .brand{
  min-height:74px;
}
.top .brand img,
.topbar .brand img{
  object-fit:contain!important;
  object-position:center center!important;
}
html[data-theme="dark"] .manual-card.pharma .manual-copy h2 span{
  color:#28d4ff!important;
}
html[data-theme="dark"] .manual-card.disease .manual-copy h2 span{
  color:#00b55b!important;
}
html[data-theme="dark"] .category-card,
html[data-theme="dark"] .species-card,
html[data-theme="dark"] .family-card,
html[data-theme="dark"] .problem-card,
html[data-theme="dark"] .manual-card,
html[data-theme="dark"] .disease-card,
html[data-theme="dark"] .agent-card,
html[data-theme="dark"] .syndrome-card,
html[data-theme="dark"] .quick-card,
html[data-theme="dark"] .meta-card,
html[data-theme="dark"] .result-card,
html[data-theme="dark"] .source-item{
  box-shadow:inset 0 4px 0 0 var(--accent), 0 10px 24px rgba(0,0,0,.14)!important;
}
html[data-theme="dark"] .hero-panel,
html[data-theme="dark"] .category-card,
html[data-theme="dark"] .meta-card{
  border-top-color:var(--accent)!important;
  border-top-width:4px!important;
  border-top-style:solid!important;
}
html[data-theme="dark"] .family-header,
html[data-theme="dark"] .related button{
  border-left-color:var(--accent)!important;
  border-left-width:4px!important;
}
html[data-theme="dark"] .ped-module-card{
  box-shadow:inset 0 4px 0 0 var(--ped-accent), 0 10px 24px rgba(0,0,0,.14)!important;
}
html[data-theme="dark"] .ped-module-card:before{
  background:var(--ped-accent)!important;
}
html[data-theme="dark"] .safety{
  background:#2a2416!important;
  border:1px solid #f0c66a!important;
  color:#ffe6ab!important;
  box-shadow:0 0 0 1px rgba(255,227,161,.04) inset!important;
}
html[data-theme="dark"] .priority-strip{
  background:#342814!important;
  border:1px solid #e1b15d!important;
  color:#ffe2a2!important;
}
html[data-theme="dark"] .priority-strip.high,
html[data-theme="dark"] .priority-strip.critical{
  background:#3a1717!important;
  border-color:#ea8787!important;
  color:#ffd0d0!important;
}
html[data-theme="dark"] .priority-strip.low{
  background:#173020!important;
  border-color:#79d39a!important;
  color:#c9f4d6!important;
}
html[data-theme="dark"] #urgencyStrip .badge.medium,
html[data-theme="dark"] #urgencyStrip .badge.high,
html[data-theme="dark"] #urgencyStrip .badge.low,
html[data-theme="dark"] #urgencyStrip .badge.preventive,
html[data-theme="dark"] #urgencyStrip .badge.programmed{
  border:1px solid rgba(255,255,255,.1)!important;
}
html[data-theme="dark"] .cover:before{
  opacity:1!important;
  filter:saturate(1.15) brightness(1.08)!important;
}
html[data-theme="dark"] .manual-card .manual-logo{
  filter:none!important;
}
html[data-theme="dark"] .brand-copy{
  min-width:0;
}


/* ===== Ajustes extra de contraste pedagógico y tarjetas clicables ===== */
.ped-action-row{display:flex;justify-content:flex-end;gap:10px;margin:14px 0 18px;flex-wrap:wrap}
.ped-action-btn{min-width:220px}
.pedagogy-card{cursor:pointer;transition:transform .18s ease,box-shadow .18s ease}
.pedagogy-card:focus-visible{outline:3px solid rgba(36,185,211,.35);outline-offset:3px}
.pedagogy-open-module{display:none!important}
.pedagogy-card .pedagogy-favorite{position:relative;z-index:2}
.ped-chip,.pedagogy-tag,.support-keywords .badge{background:#eef4f8!important;border:1px solid #bfd0dd!important;color:#173f5d!important}
.pedagogy-card p,.ped-module-card p,.ped-intro p,.ped-description,.ped-how-row small,.ped-learning-card p,.ped-summary-card p,.ped-quick-step span,.ped-reason-step span,.ped-formula-card,.ped-case-text,.ped-flash-hint,.pedagogy-head p,.pedagogy-intro,.pedagogy-featured p,.pedagogy-card small,.pedagogy-card p,.pedagogy-answer,.pedagogy-flash-answer,.pedagogy-case-card .case-text,.pedagogy-case-prompt,.pedagogy-case-guide,.pedagogy-day-card p,.pedagogy-progress-item p,.pedagogy-progress-summary span,.pedagogy-question strong,.pedagogy-source-item,.ped-module-hero p{color:#37556d!important}
.ped-summary-card,.ped-learning-card,.ped-memory-card,.ped-error-card,.ped-case-card,.ped-formula-card,.ped-flash-card,.pedagogy-question,.pedagogy-flash-card,.pedagogy-progress-item,.pedagogy-case-card,.pedagogy-day-card{box-shadow:none}
.ped-flash-card,.pedagogy-flash-card{border:1px solid #d5e0e8!important;background:linear-gradient(180deg,#ffffff,#f7fafc)!important}
.ped-flash-q,.pedagogy-flash-card h2{color:#123856!important}
.ped-flash-a,.pedagogy-answer,.pedagogy-flash-answer,.pedagogy-case-guide{background:#edf7ef!important;border:1px solid #c7ddca!important;color:#214e2a!important}
.ped-flash-a{display:none}
.ped-flash-a.open,.ped-flash-card.revealed .ped-flash-a{display:block}
.ped-reason-step,.pedagogy-case-prompt{background:#f5f8fb!important;border:1px solid #d9e3ea!important;color:#36536a!important}
.ped-formula-card{background:#eef7fb!important;border:1px solid #cae0ec!important;color:#173d5b!important}
.pedagogy-question{background:#ffffff!important;border:1px solid #d9e3ea!important}
.pedagogy-question-head{color:#123856!important}
.pedagogy-reveal,.ped-flash-buttons button,.pedagogy-flash-buttons button{border:1px solid #cad8e2!important;background:#ffffff!important;color:#123856!important;border-radius:10px;font-weight:900}
.pedagogy-question-number{box-shadow:none!important}
.pedagogy-flash-controls select,.ped-flash-controls select{min-height:40px;border-radius:10px;border:1px solid #cad8e2;background:#fff;color:#123856;padding:0 12px}
.ped-flash-shell,.pedagogy-flash-shell{display:grid;gap:14px}
.ped-flash-controls,.pedagogy-flash-controls{display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.ped-flash-buttons,.pedagogy-flash-buttons{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}
.ped-flash-buttons button,.pedagogy-flash-buttons button{min-height:42px;padding:10px 14px}
html[data-theme="dark"] .ped-chip,html[data-theme="dark"] .pedagogy-tag,html[data-theme="dark"] .support-keywords .badge{background:#213244!important;border-color:#3b5568!important;color:#eaf4fb!important}
html[data-theme="dark"] .pedagogy-card,html[data-theme="dark"] .ped-module-card,html[data-theme="dark"] .ped-learning-card,html[data-theme="dark"] .ped-summary-card,html[data-theme="dark"] .ped-memory-card,html[data-theme="dark"] .ped-error-card,html[data-theme="dark"] .ped-case-card,html[data-theme="dark"] .ped-formula-card,html[data-theme="dark"] .ped-flash-card,html[data-theme="dark"] .pedagogy-question,html[data-theme="dark"] .pedagogy-flash-card,html[data-theme="dark"] .pedagogy-case-card,html[data-theme="dark"] .pedagogy-progress-item,html[data-theme="dark"] .pedagogy-day-card{background:#111d2a!important;border:1px solid #32485b!important}
html[data-theme="dark"] .pedagogy-card:hover{box-shadow:0 14px 28px rgba(0,0,0,.28)!important}
html[data-theme="dark"] .pedagogy-card p,html[data-theme="dark"] .ped-module-card p,html[data-theme="dark"] .ped-intro p,html[data-theme="dark"] .ped-description,html[data-theme="dark"] .ped-how-row small,html[data-theme="dark"] .ped-learning-card p,html[data-theme="dark"] .ped-summary-card p,html[data-theme="dark"] .ped-quick-step span,html[data-theme="dark"] .ped-reason-step span,html[data-theme="dark"] .ped-formula-card,html[data-theme="dark"] .ped-case-text,html[data-theme="dark"] .ped-flash-hint,html[data-theme="dark"] .pedagogy-head p,html[data-theme="dark"] .pedagogy-intro,html[data-theme="dark"] .pedagogy-featured p,html[data-theme="dark"] .pedagogy-card small,html[data-theme="dark"] .pedagogy-card p,html[data-theme="dark"] .pedagogy-answer,html[data-theme="dark"] .pedagogy-flash-answer,html[data-theme="dark"] .pedagogy-case-card .case-text,html[data-theme="dark"] .pedagogy-case-prompt,html[data-theme="dark"] .pedagogy-case-guide,html[data-theme="dark"] .pedagogy-day-card p,html[data-theme="dark"] .pedagogy-progress-item p,html[data-theme="dark"] .pedagogy-progress-summary span,html[data-theme="dark"] .pedagogy-question strong,html[data-theme="dark"] .pedagogy-source-item,html[data-theme="dark"] .ped-module-hero p,html[data-theme="dark"] .ped-flash-q,html[data-theme="dark"] .ped-flash-a{color:#dceaf4!important}
html[data-theme="dark"] .ped-reason-step,html[data-theme="dark"] .pedagogy-case-prompt{background:#182636!important;border-color:#355167!important;color:#d6e5ef!important}
html[data-theme="dark"] .ped-flash-card,html[data-theme="dark"] .pedagogy-flash-card{background:linear-gradient(180deg,#122031,#111d2a)!important;border-color:#355268!important}
html[data-theme="dark"] .ped-flash-a,html[data-theme="dark"] .pedagogy-answer,html[data-theme="dark"] .pedagogy-flash-answer,html[data-theme="dark"] .pedagogy-case-guide{background:#193222!important;border-color:#326546!important;color:#dff5e5!important}
html[data-theme="dark"] .ped-formula-card{background:#162839!important;border-color:#31526b!important;color:#e4f0f8!important}
html[data-theme="dark"] .pedagogy-question{background:#111d2a!important;border-color:#365065!important}
html[data-theme="dark"] .pedagogy-question-head,html[data-theme="dark"] .pedagogy-question strong,html[data-theme="dark"] .ped-flash-q,html[data-theme="dark"] .pedagogy-flash-card h2{color:#f2f8fc!important}
html[data-theme="dark"] .pedagogy-reveal,html[data-theme="dark"] .ped-flash-buttons button,html[data-theme="dark"] .pedagogy-flash-buttons button,html[data-theme="dark"] .ped-flash-controls select,html[data-theme="dark"] .pedagogy-flash-controls select{background:#152332!important;border-color:#355065!important;color:#edf6fb!important}
html[data-theme="dark"] .pedagogy-flash-buttons .reveal,html[data-theme="dark"] .ped-flash-buttons #pharmaFlashReveal{background:#1d4c70!important;color:#fff!important;border-color:#2d668f!important}
@media(max-width:680px){.ped-flash-controls,.pedagogy-flash-controls{align-items:stretch}.ped-flash-controls select,.pedagogy-flash-controls select{width:100%}.ped-flash-buttons button,.pedagogy-flash-buttons button{flex:1 1 100%}}


/* ===== Flashcards de farmacología: versión visual ===== */
.pharma-flash-shell{gap:18px}
.pharma-flash-controls{align-items:center}
.pharma-flash-progress{display:flex;align-items:center;gap:12px}
.pharma-flash-dots{display:flex;gap:6px;align-items:center}
.pharma-flash-dots span{width:8px;height:8px;border-radius:999px;background:#c9d8e4;display:block;opacity:.7}
.pharma-flash-dots span.active{width:24px;background:#2f7cc1;opacity:1}
.pharma-flash-card{border:1px solid #d8e4ec!important;border-radius:24px;padding:22px!important;background:linear-gradient(180deg,#ffffff 0%,#f6fbff 100%)!important;box-shadow:0 18px 38px rgba(16,62,95,.08)!important;position:relative;overflow:hidden}
.pharma-flash-card::before{content:"";position:absolute;inset:0 auto 0 0;width:8px;background:var(--flash-accent,#3db7ff)}
.pharma-flash-top{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:18px}
.pharma-flash-top-left{display:grid;gap:6px}
.pharma-flash-top-left strong{font-size:1.05rem;color:#123856}
.pharma-flash-top-left small{color:#5a7388}
.pharma-flash-code{font-weight:900}
.pharma-flash-mainbtn{border:1px solid #9dc5ea;background:linear-gradient(180deg,#eef7ff,#dceeff);color:#0f4c7f;border-radius:14px;padding:12px 16px;font-weight:900;min-width:170px;box-shadow:0 8px 16px rgba(64,138,200,.16)}
.pharma-flash-mainbtn.is-open{background:linear-gradient(180deg,#e9f7ef,#d4efdf);border-color:#9ed0af;color:#1f6b3b}
.pharma-flash-question,.pharma-flash-answer{border-radius:18px;padding:18px 18px 16px;margin-bottom:16px}
.pharma-flash-question{background:linear-gradient(180deg,#f4f9fd,#eef6fb);border:1px solid #d9e7f1}
.pharma-flash-question h3{margin:8px 0 0;font-size:1.6rem;line-height:1.2;color:#123856}
.pharma-flash-label{display:inline-flex;align-items:center;gap:8px;font-size:.76rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:#4d6e88}
.pharma-flash-answer{background:linear-gradient(180deg,#edf8ef,#e4f4e7);border:1px solid #c8e1ce;color:#214e2a;display:none}
.pharma-flash-answer.open{display:block;animation:fadeAnswer .2s ease}
.pharma-flash-answer p{margin:8px 0 0;font-size:1.03rem;line-height:1.6;color:inherit}
.pharma-flash-buttons{justify-content:space-between}
.pharma-flash-buttons button{flex:1;border-radius:14px!important;padding:12px 16px!important}
.pharma-flash-buttons button:nth-child(2){max-width:180px}
@keyframes fadeAnswer{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
html[data-theme="dark"] .pharma-flash-dots span{background:#33506a}
html[data-theme="dark"] .pharma-flash-dots span.active{background:#67d4ff}
html[data-theme="dark"] .pharma-flash-card{background:linear-gradient(180deg,#101d2b 0%,#132232 100%)!important;border-color:#335066!important;box-shadow:0 18px 38px rgba(0,0,0,.28)!important}
html[data-theme="dark"] .pharma-flash-top-left strong{color:#f2f8fc}
html[data-theme="dark"] .pharma-flash-top-left small{color:#a8bfce}
html[data-theme="dark"] .pharma-flash-mainbtn{background:linear-gradient(180deg,#17466e,#12395b)!important;border-color:#3974a4!important;color:#eff8ff!important;box-shadow:none!important}
html[data-theme="dark"] .pharma-flash-mainbtn.is-open{background:linear-gradient(180deg,#1e5f39,#174d2f)!important;border-color:#3b8a59!important;color:#ecfff1!important}
html[data-theme="dark"] .pharma-flash-question{background:linear-gradient(180deg,#162739,#132232)!important;border-color:#355066!important}
html[data-theme="dark"] .pharma-flash-question h3{color:#f2f8fc}
html[data-theme="dark"] .pharma-flash-label{color:#8cb7d5}
html[data-theme="dark"] .pharma-flash-answer{background:linear-gradient(180deg,#173222,#183925)!important;border-color:#356648!important;color:#ddf5e3!important}
html[data-theme="dark"] .pharma-flash-buttons button{background:#152332!important;border-color:#355065!important;color:#edf6fb!important}
html[data-theme="dark"] .pharma-flash-buttons button:nth-child(2){background:#18395b!important;border-color:#2c638e!important;color:#fff!important}
@media (max-width:760px){.pharma-flash-top{flex-direction:column}.pharma-flash-mainbtn{width:100%}.pharma-flash-question h3{font-size:1.28rem}.pharma-flash-buttons{flex-direction:column}.pharma-flash-buttons button:nth-child(2){max-width:none}}


/* ===== Sistema común de flashcards con progreso ===== */
.flash-study-shell{display:grid;gap:18px;max-width:980px;margin:0 auto}
.flash-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}
.flash-toolbar select{min-height:46px;min-width:min(100%,520px);border:1px solid #cbd9e3;border-radius:14px;background:#fff;color:#123856;padding:0 14px;font-weight:750}
.flash-position{display:flex;align-items:center;gap:10px}.flash-position span{background:#123856;color:#fff;border-radius:999px;padding:8px 12px;font-weight:900}.flash-position small{color:#60788b;font-weight:800}
.flash-category-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.flash-category-btn{display:flex;align-items:center;justify-content:space-between;gap:8px;border:1px solid #d2dee7;background:#f7fafc;color:#24465f;border-radius:14px;padding:11px 13px;font-weight:850;cursor:pointer}.flash-category-btn b{min-width:30px;height:30px;border-radius:999px;display:grid;place-items:center;background:#e7f0f6;color:#123856}.flash-category-btn.active{background:#123856;color:#fff;border-color:#123856}.flash-category-btn.active b{background:#fff;color:#123856}
.flash-study-card{position:relative;overflow:hidden;border:1px solid #d6e3ec;border-radius:24px;background:linear-gradient(180deg,#fff,#f7fbfe);padding:22px;box-shadow:0 18px 42px rgba(16,62,95,.09)}
.flash-study-card:before{content:"";position:absolute;inset:0 auto 0 0;width:8px;background:var(--flash-accent,#24b9d3)}
.flash-card-top{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:18px}.flash-card-top>div{display:grid;gap:6px}.flash-card-top strong{font-size:1.08rem;color:#123856}.flash-card-top small{color:#637d90}.flash-code{width:max-content;border-radius:999px;padding:6px 10px;font-size:.72rem;font-weight:950}
.flash-reveal-btn{border:1px solid #9dc9e8;background:linear-gradient(180deg,#eef8ff,#dcefff);color:#0d4f7e;border-radius:14px;padding:12px 16px;font-weight:900;min-width:170px}.flash-reveal-btn.is-open{background:linear-gradient(180deg,#e8f7ec,#d4efdc);border-color:#9fceaa;color:#21653a}
.flash-question-panel,.flash-answer-panel{border-radius:18px;padding:18px;margin-bottom:16px}.flash-question-panel{background:#f2f8fc;border:1px solid #d9e7f0}.flash-question-panel>span,.flash-answer-panel>span{text-transform:uppercase;letter-spacing:.09em;font-size:.7rem;font-weight:950;color:#59778d}.flash-question-panel h3{margin:8px 0 0;color:#123856;font-size:1.5rem;line-height:1.28}.flash-answer-panel{display:none;background:#edf8ef;border:1px solid #c8e1ce;color:#214e2a}.flash-answer-panel.open{display:block;animation:flashAnswerIn .18s ease}.flash-answer-panel p{margin:8px 0 0;color:inherit;font-size:1.03rem;line-height:1.65}
.flash-rating-row{display:none;grid-template-columns:1fr 1fr;gap:12px;margin:4px 0 16px}.flash-rating-row.visible{display:grid}.flash-rating-row button{min-height:48px;border-radius:14px;font-weight:950}.flash-rating-row .known{background:#e8f7ec;border:1px solid #9fceaa;color:#21653a}.flash-rating-row .review{background:#fff4e6;border:1px solid #e7be82;color:#8c5400}
.flash-nav-row{display:grid;grid-template-columns:1fr auto 1fr;gap:10px}.flash-nav-row button{min-height:44px;border:1px solid #cedbe5;background:#fff;color:#183e5b;border-radius:13px;font-weight:900}.flash-nav-row button:last-child{text-align:center}
.flash-empty-state{padding:56px 24px;border:1px dashed #b9cad7;border-radius:22px;text-align:center;background:#f8fbfd}.flash-empty-state span{display:grid;place-items:center;width:56px;height:56px;margin:0 auto 14px;border-radius:50%;background:#e8f7ec;color:#25804a;font-size:1.6rem;font-weight:900}.flash-empty-state h3{margin:0 0 8px;color:#123856}.flash-empty-state p{margin:0;color:#60788b}
@keyframes flashAnswerIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
html[data-theme="dark"] .flash-toolbar select{background:#132231;color:#edf6fb;border-color:#365166}
html[data-theme="dark"] .flash-position small{color:#a9bfce}html[data-theme="dark"] .flash-position span{background:#1d4f73}
html[data-theme="dark"] .flash-category-btn{background:#132231;color:#dceaf4;border-color:#355066}html[data-theme="dark"] .flash-category-btn b{background:#20384b;color:#dceaf4}html[data-theme="dark"] .flash-category-btn.active{background:#1d5d86;border-color:#2c78a8;color:#fff}html[data-theme="dark"] .flash-category-btn.active b{background:#eaf7ff;color:#17496b}
html[data-theme="dark"] .flash-study-card{background:linear-gradient(180deg,#101d2b,#132333);border-color:#345067;box-shadow:0 18px 42px rgba(0,0,0,.3)}html[data-theme="dark"] .flash-card-top strong,html[data-theme="dark"] .flash-question-panel h3{color:#f1f8fc}html[data-theme="dark"] .flash-card-top small{color:#a7bfce}
html[data-theme="dark"] .flash-reveal-btn{background:linear-gradient(180deg,#184d72,#133d5d);border-color:#3978a5;color:#eff9ff}html[data-theme="dark"] .flash-reveal-btn.is-open{background:linear-gradient(180deg,#1d5d38,#174a2d);border-color:#3d8957;color:#effff3}
html[data-theme="dark"] .flash-question-panel{background:#162839;border-color:#355268}html[data-theme="dark"] .flash-question-panel>span,html[data-theme="dark"] .flash-answer-panel>span{color:#8db8d5}html[data-theme="dark"] .flash-answer-panel{background:#183623;border-color:#356748;color:#dff5e5}
html[data-theme="dark"] .flash-rating-row .known{background:#193a26;border-color:#3f7b54;color:#e5f8e9}html[data-theme="dark"] .flash-rating-row .review{background:#3a2c17;border-color:#8a6936;color:#ffe4b5}
html[data-theme="dark"] .flash-nav-row button{background:#152332;border-color:#355065;color:#edf6fb}html[data-theme="dark"] .flash-empty-state{background:#111d2a;border-color:#395469}html[data-theme="dark"] .flash-empty-state h3{color:#f1f8fc}html[data-theme="dark"] .flash-empty-state p{color:#a9bfce}
@media(max-width:760px){.flash-category-grid{grid-template-columns:1fr 1fr}.flash-card-top{flex-direction:column}.flash-reveal-btn{width:100%}.flash-rating-row{grid-template-columns:1fr}.flash-nav-row{grid-template-columns:1fr}.flash-question-panel h3{font-size:1.22rem}}


/* ===== Modos de estudio destacados y casos clínicos interactivos ===== */
.study-mode-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:18px 0 22px}
.study-mode-card{position:relative;display:grid;grid-template-columns:64px 1fr auto;align-items:center;gap:16px;min-height:112px;padding:18px 20px;border:1px solid #cbdce8;border-radius:20px;background:linear-gradient(145deg,#fff,#f1f8fc);color:#123856;text-align:left;box-shadow:0 14px 30px rgba(16,62,95,.08);overflow:hidden}
.study-mode-card:before{content:"";position:absolute;inset:0 auto 0 0;width:7px;background:#2c8fd0}
.case-mode-card:before{background:#e47d25}.study-mode-card:hover{transform:translateY(-2px);box-shadow:0 18px 38px rgba(16,62,95,.13)}
.study-mode-icon{width:58px;height:58px;border-radius:16px;display:grid;place-items:center;background:#e7f4fc;color:#176796;font-size:1.8rem}.case-mode-card .study-mode-icon{background:#fff0e3;color:#ae5a12}
.study-mode-card strong{display:block;font-size:1.08rem;margin-bottom:5px}.study-mode-card small{display:block;color:#587286;line-height:1.45}.study-mode-arrow{font-size:1.5rem;font-weight:900;color:#2c7cad}
.case-study-shell{display:grid;gap:18px;max-width:1040px;margin:0 auto}
.case-study-card{position:relative;overflow:hidden;border:1px solid #d4e1ea;border-radius:24px;background:linear-gradient(180deg,#fff,#f8fbfd);padding:22px;box-shadow:0 18px 42px rgba(16,62,95,.09)}
.case-study-card:before{content:"";position:absolute;inset:0 auto 0 0;width:8px;background:var(--case-accent,#e47d25)}
.case-card-top{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:16px}.case-card-top>div{display:grid;gap:6px}.case-card-top strong{font-size:1rem;color:#123856}.case-card-top small{color:#687f90}
.case-scenario-panel{border:1px solid #ead6bd;border-radius:18px;background:linear-gradient(180deg,#fff9ef,#fff4e7);padding:18px;margin-bottom:16px}.case-scenario-panel>span,.case-guide-panel>span{display:inline-flex;font-size:.72rem;font-weight:950;text-transform:uppercase;letter-spacing:.1em;color:#9b591c}.case-scenario-panel p{margin:9px 0 0;color:#2e4b61;font-size:1rem;line-height:1.7}
.case-answer-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.case-answer-grid label{display:grid;gap:7px;color:#21435d;font-weight:900;font-size:.78rem}.case-answer-grid textarea{width:100%;min-height:104px;resize:vertical;border:1px solid #d1dee7;border-radius:14px;background:#fff;color:#173d58;padding:12px;font:inherit;line-height:1.5}.case-answer-grid textarea:focus{outline:3px solid rgba(36,185,211,.22);border-color:#5bb9d1}
.case-autosave{font-size:.68rem;color:#6c8394;margin:9px 0 15px;text-align:right}
.case-guide-panel{display:none;border:1px solid #bedbc5;border-radius:18px;background:linear-gradient(180deg,#edf9f0,#e4f3e8);padding:18px;margin-bottom:16px;color:#275037}.case-guide-panel.open{display:block;animation:fadeAnswer .2s ease}.case-guide-panel>span{color:#2f7446}.case-guide-panel p{margin:9px 0 0;line-height:1.6;color:inherit}
html[data-theme="dark"] .study-mode-card{background:linear-gradient(145deg,#132231,#101c29);border-color:#345066;color:#f1f8fc;box-shadow:0 15px 34px rgba(0,0,0,.25)}html[data-theme="dark"] .study-mode-card small{color:#aec2d0}html[data-theme="dark"] .study-mode-icon{background:#18344a;color:#76d4ff}html[data-theme="dark"] .case-mode-card .study-mode-icon{background:#3b2918;color:#ffbd7b}
html[data-theme="dark"] .case-study-card{background:linear-gradient(180deg,#101d2b,#132333);border-color:#345067;box-shadow:0 18px 42px rgba(0,0,0,.3)}html[data-theme="dark"] .case-card-top strong{color:#f1f8fc}html[data-theme="dark"] .case-card-top small{color:#a7bfce}
html[data-theme="dark"] .case-scenario-panel{background:linear-gradient(180deg,#332616,#2b2116);border-color:#705633}html[data-theme="dark"] .case-scenario-panel>span{color:#ffc27f}html[data-theme="dark"] .case-scenario-panel p{color:#f0dfc9}
html[data-theme="dark"] .case-answer-grid label{color:#d9e8f2}html[data-theme="dark"] .case-answer-grid textarea{background:#111e2b;color:#eaf4fa;border-color:#365166}html[data-theme="dark"] .case-answer-grid textarea::placeholder{color:#819bac}html[data-theme="dark"] .case-autosave{color:#91aabc}
html[data-theme="dark"] .case-guide-panel{background:linear-gradient(180deg,#183523,#163020);border-color:#3d6e4c;color:#dcf4e2}html[data-theme="dark"] .case-guide-panel>span{color:#8ee1a7}
@media(max-width:760px){.study-mode-grid{grid-template-columns:1fr}.study-mode-card{grid-template-columns:54px 1fr auto}.study-mode-icon{width:50px;height:50px}.case-card-top{flex-direction:column}.case-card-top .flash-reveal-btn{width:100%}.case-answer-grid{grid-template-columns:1fr}}

/* ===== Unificación visual de pedagogía, progreso y plan de 7 días ===== */
.unified-study-mode-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;margin:18px 0 22px!important}
.progress-mode-card:before{background:#2497c9!important}
.progress-mode-card .study-mode-icon{background:#e7f6fb!important;color:#13739a!important}
.plan-mode-card:before{background:#805ac8!important}
.plan-mode-card .study-mode-icon{background:#f0eafd!important;color:#6d43b1!important}
.disease-study-mode-grid{margin-top:16px!important}

.unified-featured-card{display:grid!important;grid-template-columns:minmax(0,1fr) 150px!important;gap:18px!important;align-items:center!important;padding:22px!important;border:1px solid #ead9be!important;border-left:7px solid #ffb624!important;border-radius:20px!important;background:linear-gradient(145deg,#fffdf8,#fff8eb)!important;box-shadow:0 14px 32px rgba(79,56,17,.09)!important}
.unified-featured-card .unified-featured-copy{min-width:0}
.unified-featured-card .eyebrow{font-size:.74rem;font-weight:950;letter-spacing:.05em;text-transform:uppercase;color:#b06b00;margin-bottom:8px}
.unified-featured-card h2{margin:0 0 8px!important;color:#103e5f!important;font-size:1.24rem!important;line-height:1.3}
.unified-featured-card h2 .badge{vertical-align:middle;margin-right:6px;background:#103e5f!important;color:#fff!important}
.unified-featured-card p{margin:0 0 14px!important;color:#506b7d!important;line-height:1.55}
.unified-featured-card button{background:#ff7b00!important;color:#fff!important;border:0!important;border-radius:12px!important;padding:12px 16px!important;font-weight:950!important;box-shadow:0 9px 18px rgba(255,123,0,.18)}
.unified-featured-art{width:132px;height:112px;border-radius:20px;display:grid;place-items:center;background:linear-gradient(145deg,#eef7ff,#f7fbff);color:#3d7bd9;border:1px solid #d7e6f4}
.unified-featured-art svg{width:66px;height:66px}

.unified-section-hero{margin-bottom:18px}
.unified-progress-shell,.unified-plan-shell{display:grid;gap:18px}
.progress-hero-card{display:grid;grid-template-columns:150px minmax(0,1fr);gap:22px;align-items:center;padding:22px;border:1px solid #cedde8;border-radius:22px;background:linear-gradient(145deg,#ffffff,#f3f9fc);box-shadow:0 15px 32px rgba(16,62,95,.08)}
.progress-ring{width:126px;height:126px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(#25b8c5 var(--progress),#e2edf3 0);position:relative;margin:auto}
.progress-ring:before{content:"";position:absolute;inset:12px;border-radius:50%;background:#fff;box-shadow:inset 0 0 0 1px #d9e5ec}
.progress-ring>div{position:relative;z-index:1;text-align:center;color:#103e5f}
.progress-ring b{display:block;font-size:1.65rem;line-height:1}
.progress-ring span{display:block;font-size:.7rem;margin-top:4px;color:#60798a;font-weight:850;text-transform:uppercase;letter-spacing:.08em}
.progress-eyebrow{display:block;color:#178b9f;font-size:.68rem;font-weight:950;text-transform:uppercase;letter-spacing:.1em;margin-bottom:6px}
.progress-hero-card h2,.progress-section-heading h2,.plan-summary-card h2{margin:0;color:#103e5f;font-size:1.35rem}
.progress-hero-card p,.plan-summary-card p{margin:8px 0 0;color:#587184;line-height:1.6}
.progress-hero-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:15px}
.progress-hero-actions button{min-height:44px;padding:10px 15px;border-radius:11px;font-weight:950;border:1px solid transparent}
.progress-hero-actions .primary{background:#103e5f;color:#fff}
.progress-hero-actions .danger{background:#fff1f1;color:#a33232;border-color:#edb8b8}
.progress-stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.progress-stat-card{position:relative;display:grid;grid-template-columns:48px 1fr;gap:12px;align-items:center;min-height:104px;padding:15px;border:1px solid #d2e0e9;border-top:5px solid var(--stat-accent);border-radius:17px;background:#fff;box-shadow:0 10px 24px rgba(16,62,95,.06);overflow:hidden}
.progress-stat-card:after{content:"";position:absolute;width:74px;height:74px;border-radius:50%;right:-24px;top:-26px;background:color-mix(in srgb,var(--stat-accent) 13%,transparent)}
.progress-stat-icon{width:44px;height:44px;border-radius:13px;display:grid;place-items:center;background:color-mix(in srgb,var(--stat-accent) 14%,#fff);color:var(--stat-accent);font-weight:950;font-size:1.15rem}
.progress-stat-card b{display:block;font-size:1.28rem;color:#103e5f}
.progress-stat-card span:not(.progress-stat-icon){display:block;font-size:.71rem;color:#607888;line-height:1.35;margin-top:3px}
.progress-wide-bar{height:14px;border-radius:999px;background:#e3edf2;overflow:hidden;border:1px solid #d4e1e8}
.progress-wide-bar i{height:100%;display:block;border-radius:inherit;background:linear-gradient(90deg,#25b8c5,#46b46b,#805ac8);transition:width .25s ease}
.progress-section-heading{display:flex;justify-content:space-between;align-items:flex-end;gap:15px;margin-bottom:12px}
.progress-section-heading>span{font-weight:950;color:#178b9f;background:#e8f7f9;border:1px solid #c7e7eb;border-radius:999px;padding:7px 11px;font-size:.72rem}
.progress-module-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}
.progress-module-card{position:relative;display:grid;grid-template-columns:46px minmax(0,1fr) auto 22px;gap:10px;align-items:center;text-align:left;min-height:92px;padding:13px;border:1px solid #d2dfe8;border-left:6px solid var(--module-accent);border-radius:15px;background:linear-gradient(145deg,#fff,#f8fbfd);color:#103e5f;box-shadow:0 8px 20px rgba(16,62,95,.05)}
.progress-module-card:hover{transform:translateY(-2px);box-shadow:0 13px 28px rgba(16,62,95,.11)}
.progress-module-code{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:color-mix(in srgb,var(--module-accent) 14%,#fff);color:var(--module-accent);font-size:.72rem;font-weight:950}
.progress-module-copy{min-width:0}
.progress-module-copy strong{display:block;font-size:.8rem;line-height:1.35;color:#123856}
.progress-module-copy small{display:block;margin-top:4px;font-size:.64rem;line-height:1.4;color:#607888}
.progress-status-pill{border-radius:999px;padding:5px 8px;font-size:.59rem;font-weight:950;white-space:nowrap;background:#edf3f6;color:#526d7d;border:1px solid #d1dee6}
.progress-status-pill.completed{background:#e8f6eb;color:#2b6a3d;border-color:#bcdcc4}
.progress-status-pill.review{background:#fff1df;color:#8b4d00;border-color:#eed0a8}
.progress-status-pill.in-progress,.progress-status-pill.studying{background:#e9f4ff;color:#28659a;border-color:#bed7ec}
.progress-module-arrow{font-size:1.05rem;color:var(--module-accent);font-weight:950}

.pedagogy-days-grid{display:block!important}
.plan-summary-card{display:grid;grid-template-columns:minmax(0,1fr) 250px;align-items:center;gap:22px;padding:21px;border:1px solid #d2dfe8;border-radius:20px;background:linear-gradient(145deg,#fff,#f5f9fc);box-shadow:0 13px 28px rgba(16,62,95,.07)}
.plan-summary-progress{display:grid;grid-template-columns:auto 1fr;gap:12px;align-items:center}
.plan-summary-progress>b{font-size:1.4rem;color:#103e5f}
.plan-summary-progress>div{height:14px;border-radius:999px;background:#e1ebf1;overflow:hidden;border:1px solid #d2dfe8}
.plan-summary-progress i{height:100%;display:block;border-radius:inherit;background:linear-gradient(90deg,#25b8c5,#805ac8)}
.unified-plan-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.unified-day-card{position:relative;padding:17px;border:1px solid #d1dfe8;border-top:6px solid var(--day-accent);border-radius:18px;background:linear-gradient(145deg,#fff,#f8fbfd);box-shadow:0 10px 24px rgba(16,62,95,.06)}
.unified-day-card.completed{background:linear-gradient(145deg,#eff9f1,#f8fcf8);border-color:#a9d8b2}
.day-card-head{display:grid;grid-template-columns:52px minmax(0,1fr) auto;gap:12px;align-items:center}
.day-number{width:50px;height:50px;border-radius:15px;display:grid;place-items:center;background:color-mix(in srgb,var(--day-accent) 16%,#fff);color:var(--day-accent);font-size:1.25rem;font-weight:950}
.day-card-head>div>span{display:block;font-size:.68rem;text-transform:uppercase;letter-spacing:.09em;color:#668091;font-weight:900}
.day-card-head>div>strong{display:block;margin-top:4px;color:#123856;font-size:.84rem;line-height:1.35}
.day-check{display:flex!important;align-items:center!important;gap:7px!important;margin:0!important;padding:8px 10px;border-radius:999px;background:#eef4f7;color:#405e70!important;border:1px solid #d3e0e7;font-size:.68rem!important;font-weight:950!important;white-space:nowrap}
.day-check input{width:18px!important;height:18px!important;margin:0!important;accent-color:#35a864}
.day-module-list{display:grid;gap:8px;margin-top:14px}
.day-module-list button{display:grid;grid-template-columns:54px 1fr;gap:10px;align-items:center;text-align:left;min-height:48px;padding:8px 10px;border:1px solid #d7e2e9;border-radius:11px;background:#fff;color:#123856}
.day-module-list button:hover{border-color:var(--day-accent);transform:translateX(2px)}
.day-module-list b{display:grid;place-items:center;min-height:30px;border-radius:8px;background:color-mix(in srgb,var(--day-accent) 13%,#fff);color:var(--day-accent);font-size:.68rem}
.day-module-list span{font-size:.72rem;line-height:1.35;color:#456276}

html[data-theme="dark"] .progress-mode-card .study-mode-icon{background:#173849!important;color:#68d9f5!important}
html[data-theme="dark"] .plan-mode-card .study-mode-icon{background:#2c2444!important;color:#c3a6ff!important}
html[data-theme="dark"] .unified-featured-card{background:linear-gradient(145deg,#171f2a,#111b27)!important;border-color:#4b4437!important;border-left-color:#ffb624!important;box-shadow:0 16px 34px rgba(0,0,0,.25)!important}
html[data-theme="dark"] .unified-featured-card h2{color:#f2f8fc!important}
html[data-theme="dark"] .unified-featured-card p{color:#b7cad7!important}
html[data-theme="dark"] .unified-featured-art{background:linear-gradient(145deg,#152638,#111e2c);border-color:#324a5f;color:#75b7ff}
html[data-theme="dark"] .progress-hero-card,html[data-theme="dark"] .plan-summary-card{background:linear-gradient(145deg,#111d2a,#142435)!important;border-color:#334d62!important;box-shadow:0 15px 32px rgba(0,0,0,.26)!important}
html[data-theme="dark"] .progress-ring{background:conic-gradient(#53d6df var(--progress),#243746 0)}
html[data-theme="dark"] .progress-ring:before{background:#111d2a;box-shadow:inset 0 0 0 1px #334b5e}
html[data-theme="dark"] .progress-ring>div,html[data-theme="dark"] .progress-hero-card h2,html[data-theme="dark"] .progress-section-heading h2,html[data-theme="dark"] .plan-summary-card h2,html[data-theme="dark"] .plan-summary-progress>b{color:#f1f8fc!important}
html[data-theme="dark"] .progress-ring span,html[data-theme="dark"] .progress-hero-card p,html[data-theme="dark"] .plan-summary-card p{color:#b0c3d0!important}
html[data-theme="dark"] .progress-hero-actions .danger{background:#351d21;color:#ffb8bd;border-color:#744048}
html[data-theme="dark"] .progress-stat-card{background:linear-gradient(145deg,#132231,#101b28)!important;border-color:#334b5f!important;border-top-color:var(--stat-accent)!important;box-shadow:0 10px 24px rgba(0,0,0,.22)!important}
html[data-theme="dark"] .progress-stat-icon{background:color-mix(in srgb,var(--stat-accent) 20%,#142331);color:color-mix(in srgb,var(--stat-accent) 78%,#fff)}
html[data-theme="dark"] .progress-stat-card b{color:#f2f8fc!important}
html[data-theme="dark"] .progress-stat-card span:not(.progress-stat-icon){color:#b5c8d4!important}
html[data-theme="dark"] .progress-wide-bar,html[data-theme="dark"] .plan-summary-progress>div{background:#1a2c3b;border-color:#334b5f}
html[data-theme="dark"] .progress-section-heading>span{background:#15333d;color:#79dce8;border-color:#2c5962}
html[data-theme="dark"] .progress-module-card{background:linear-gradient(145deg,#111e2b,#132333)!important;border-color:#334c60!important;border-left-color:var(--module-accent)!important;color:#edf6fb!important;box-shadow:0 8px 20px rgba(0,0,0,.2)!important}
html[data-theme="dark"] .progress-module-code{background:color-mix(in srgb,var(--module-accent) 20%,#142332);color:color-mix(in srgb,var(--module-accent) 78%,#fff)}
html[data-theme="dark"] .progress-module-copy strong{color:#f1f8fc!important}
html[data-theme="dark"] .progress-module-copy small{color:#adc1ce!important}
html[data-theme="dark"] .progress-status-pill{background:#1a2b3a;color:#c4d5df;border-color:#3b5264}
html[data-theme="dark"] .progress-status-pill.completed{background:#173521;color:#bce8c7;border-color:#356546}
html[data-theme="dark"] .progress-status-pill.review{background:#3b2a16;color:#ffd39c;border-color:#755530}
html[data-theme="dark"] .progress-status-pill.in-progress,html[data-theme="dark"] .progress-status-pill.studying{background:#18344d;color:#b9ddff;border-color:#376488}
html[data-theme="dark"] .unified-day-card{background:linear-gradient(145deg,#111e2b,#132333)!important;border-color:#334c60!important;border-top-color:var(--day-accent)!important;box-shadow:0 10px 24px rgba(0,0,0,.21)!important}
html[data-theme="dark"] .unified-day-card.completed{background:linear-gradient(145deg,#142a1b,#173222)!important;border-color:#356447!important}
html[data-theme="dark"] .day-number{background:color-mix(in srgb,var(--day-accent) 20%,#142332);color:color-mix(in srgb,var(--day-accent) 78%,#fff)}
html[data-theme="dark"] .day-card-head>div>span{color:#9eb4c3!important}
html[data-theme="dark"] .day-card-head>div>strong{color:#f1f8fc!important}
html[data-theme="dark"] .day-check{background:#182938;color:#d9e6ee!important;border-color:#3a5367}
html[data-theme="dark"] .day-module-list button{background:#152433;color:#eff7fb;border-color:#344d61}
html[data-theme="dark"] .day-module-list b{background:color-mix(in srgb,var(--day-accent) 19%,#142332);color:color-mix(in srgb,var(--day-accent) 80%,#fff)}
html[data-theme="dark"] .day-module-list span{color:#c0d0da!important}

@media(max-width:1050px){.progress-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.progress-module-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.unified-study-mode-grid,.unified-plan-grid{grid-template-columns:1fr!important}.unified-featured-card{grid-template-columns:1fr!important}.unified-featured-art{width:100%;height:96px}.progress-hero-card{grid-template-columns:1fr;text-align:center}.progress-hero-actions{justify-content:center}.progress-stat-grid,.progress-module-grid{grid-template-columns:1fr}.progress-section-heading{align-items:flex-start}.plan-summary-card{grid-template-columns:1fr}.day-card-head{grid-template-columns:48px 1fr}.day-check{grid-column:1/-1;justify-content:center}.progress-module-card{grid-template-columns:44px minmax(0,1fr) 20px}.progress-status-pill{grid-column:2/3;justify-self:start}.progress-module-arrow{grid-column:3;grid-row:1/3}}
