/* ============================================================
   Consola22 · Tema global V1
   Auto: día 07:00–19:59 · noche 20:00–06:59
   ============================================================ */

/* ---------- Control común ---------- */

.theme-toggle {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 34px;
    padding: 0 7px;
    border: 1px solid var(--c22-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, .70);
    color: #6F8288;
    cursor: pointer;
    transition:
        background .18s ease,
        border-color .18s ease,
        color .18s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
    border-color: rgba(34, 199, 214, .35);
    background: #fff;
    outline: none;
}

.theme-toggle-icon {
    width: 15px;
    text-align: center;
    font-size: .73rem;
    line-height: 1;
}

.theme-toggle-track {
    position: relative;
    width: 32px;
    height: 18px;
    flex: 0 0 32px;
    border-radius: 999px;
    background: #DCE7EA;
    box-shadow: inset 0 0 0 1px rgba(15, 42, 51, .06);
}

.theme-toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(15, 42, 51, .20);
    transition: transform .18s ease;
}

html[data-theme="dark"] .theme-toggle-thumb {
    transform: translateX(14px);
}

.theme-toggle-desktop {
    margin-left: 3px;
}

.mobile-theme-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 13px;
    padding: 13px 3px 0;
    border-top: 1px solid #E5ECEE;
}

.mobile-theme-copy {
    display: grid;
    gap: 1px;
}

.mobile-theme-copy strong {
    color: var(--c22-deep);
    font-size: .79rem;
}

.mobile-theme-copy small {
    color: #7A8C92;
    font-size: .66rem;
}

/* ---------- Transición discreta una vez cargado ---------- */

body,
.site-header,
.site-footer,
.tools-dropdown,
.mobile-nav-panel,
.home-notes,
.purpose-panel,
.secondary-tool,
.notes-empty,
.cyber-status-card,
.cyber-status-meta,
.cyber-method-grid article,
.contact-reasons article,
.legal-side,
.info-card {
    transition:
        background-color .18s ease,
        border-color .18s ease,
        color .18s ease;
}

/* ============================================================
   MODO NOCHE
   ============================================================ */

html[data-theme="dark"] {
    --c22-bg: #081418;
    --c22-surface: #0D1D22;
    --c22-surface-soft: #10252B;
    --c22-text: #DCE8EB;
    --c22-muted: #93A8AE;

    /* Tokens semánticos de texto para herramientas en modo noche. */
    --c22-heading: #E7F1F3;
    --c22-label: #DDECEF;
    --c22-text-strong: #C8D9DD;

    --c22-border: #20373E;
    --c22-shadow-sm: 0 8px 24px rgba(0, 0, 0, .20);
    --c22-shadow-lg: 0 24px 70px rgba(0, 0, 0, .28);
}

html[data-theme="dark"] body {
    background:
        radial-gradient(circle at 80% 0%, rgba(34, 199, 214, .07), transparent 28rem),
        #081418;
    color: #DCE8EB;
}

/* ---------- Header / navegación ---------- */

html[data-theme="dark"] .site-header {
    background: rgba(8, 20, 24, .94);
    border-bottom-color: rgba(32, 55, 62, .92);
}

html[data-theme="dark"] .brand-name,
html[data-theme="dark"] .desktop-nav > a:hover,
html[data-theme="dark"] .desktop-nav > a:focus-visible,
html[data-theme="dark"] .desktop-nav > a[aria-current="page"],
html[data-theme="dark"] .header-tools-menu > summary:hover,
html[data-theme="dark"] .header-tools-menu > summary:focus-visible,
html[data-theme="dark"] .header-tools-menu > summary.is-current,
html[data-theme="dark"] .header-tools-menu[open] > summary {
    color: #EAF4F6;
}

html[data-theme="dark"] .desktop-nav {
    color: #9BAFB5;
}

html[data-theme="dark"] .desktop-nav > a:hover,
html[data-theme="dark"] .desktop-nav > a:focus-visible,
html[data-theme="dark"] .desktop-nav > a[aria-current="page"],
html[data-theme="dark"] .header-tools-menu > summary:hover,
html[data-theme="dark"] .header-tools-menu > summary:focus-visible,
html[data-theme="dark"] .header-tools-menu > summary.is-current,
html[data-theme="dark"] .header-tools-menu[open] > summary {
    background: #10252B;
}

html[data-theme="dark"] .tools-dropdown,
html[data-theme="dark"] .mobile-nav-panel {
    background: rgba(11, 27, 32, .985);
    border-color: #20373E;
    box-shadow: 0 22px 58px rgba(0, 0, 0, .30);
}

html[data-theme="dark"] .tools-dropdown-heading,
html[data-theme="dark"] .mobile-nav-panel,
html[data-theme="dark"] .mobile-nav-primary,
html[data-theme="dark"] .mobile-nav-legal,
html[data-theme="dark"] .mobile-theme-row {
    border-color: #20373E;
}

html[data-theme="dark"] .tools-dropdown-heading strong,
html[data-theme="dark"] .tools-dropdown-list a > strong,
html[data-theme="dark"] .mobile-tool-link strong,
html[data-theme="dark"] .mobile-nav-primary a,
html[data-theme="dark"] .mobile-theme-copy strong {
    color: #E4EFF1;
}

html[data-theme="dark"] .tools-dropdown-heading span,
html[data-theme="dark"] .tools-dropdown-list a > small,
html[data-theme="dark"] .mobile-nav-label,
html[data-theme="dark"] .mobile-nav-legal a,
html[data-theme="dark"] .mobile-theme-copy small {
    color: #849AA0;
}

html[data-theme="dark"] .tools-dropdown-list a:hover,
html[data-theme="dark"] .tools-dropdown-list a:focus-visible,
html[data-theme="dark"] .tools-dropdown-list a[aria-current="page"],
html[data-theme="dark"] .mobile-tool-link:hover,
html[data-theme="dark"] .mobile-tool-link:focus-visible,
html[data-theme="dark"] .mobile-tool-link[aria-current="page"] {
    background: #10252B;
    border-color: #28434B;
}

html[data-theme="dark"] .mobile-nav-toggle {
    border-color: #29434A;
    background: #0D1D22;
}

html[data-theme="dark"] .mobile-nav-toggle > span:not(.mobile-critical-badge) {
    background: #DCE8EB;
}

html[data-theme="dark"] .mobile-critical-badge {
    border-color: #081418;
}

html[data-theme="dark"] .theme-toggle {
    border-color: #29434A;
    background: #0D1D22;
    color: #9BAFB5;
}

html[data-theme="dark"] .theme-toggle:hover,
html[data-theme="dark"] .theme-toggle:focus-visible {
    background: #10252B;
    border-color: rgba(34, 199, 214, .36);
}

html[data-theme="dark"] .theme-toggle-track {
    background: #18333A;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05);
}

html[data-theme="dark"] .theme-toggle-thumb {
    background: #BCEAF0;
    box-shadow: 0 0 8px rgba(34, 199, 214, .20);
}

/* Ciberalertas del header: se preservan colores semánticos */
html[data-theme="dark"] .header-cyber-alert:hover,
html[data-theme="dark"] .header-cyber-alert:focus-visible,
html[data-theme="dark"] .header-cyber-alert[aria-current="page"] {
    background: #10252B !important;
    border-color: #29434A;
    color: #DCE8EB !important;
}

/* ---------- Footer ---------- */

html[data-theme="dark"] .site-footer {
    border-color: #20373E;
    background: rgba(10, 25, 30, .76);
}

html[data-theme="dark"] .footer-brand,
html[data-theme="dark"] .footer-group > strong {
    color: #E4EFF1;
}

html[data-theme="dark"] .footer-intro p,
html[data-theme="dark"] .footer-group a,
html[data-theme="dark"] .footer-bottom {
    color: #8FA4AA;
}

html[data-theme="dark"] .footer-bottom {
    border-color: #20373E;
}

/* ---------- Tipografía / componentes genéricos ---------- */

html[data-theme="dark"] .page-title,
html[data-theme="dark"] .section-title,
html[data-theme="dark"] .legal-content h2,
html[data-theme="dark"] .legal-content h3,
html[data-theme="dark"] .info-card strong {
    color: #E8F2F4;
}

html[data-theme="dark"] .page-lead,
html[data-theme="dark"] .legal-meta,
html[data-theme="dark"] .legal-content,
html[data-theme="dark"] .legal-content p,
html[data-theme="dark"] .legal-content li {
    color: #99ADB3;
}

html[data-theme="dark"] .legal-content a {
    color: #5CD8E3;
}

html[data-theme="dark"] .legal-content code {
    background: #10252B;
    color: #BCEAF0;
}

html[data-theme="dark"] .legal-side,
html[data-theme="dark"] .info-card {
    border-color: #20373E;
    background: #0D1D22;
    box-shadow: none;
}

html[data-theme="dark"] .legal-side a {
    color: #9EB2B8;
}

html[data-theme="dark"] .legal-side a:hover,
html[data-theme="dark"] .legal-side a:focus-visible {
    color: #5CD8E3;
}

/* ---------- Home ---------- */

html[data-theme="dark"] .home-title,
html[data-theme="dark"] .home-section-title,
html[data-theme="dark"] .next-item h3,
html[data-theme="dark"] .principle h3,
html[data-theme="dark"] .privacy-strip h2,
html[data-theme="dark"] .privacy-strip-copy a,
html[data-theme="dark"] .home-note h3,
html[data-theme="dark"] .home-notes-all,
html[data-theme="dark"] .secondary-tool h3,
html[data-theme="dark"] .secondary-tool .featured-tool-link {
    color: #E7F1F3;
}

html[data-theme="dark"] .home-lead,
html[data-theme="dark"] .home-section-heading-wide > p,
html[data-theme="dark"] .next-item p,
html[data-theme="dark"] .purpose-copy > p:last-child,
html[data-theme="dark"] .principle p,
html[data-theme="dark"] .privacy-strip-copy p,
html[data-theme="dark"] .home-note p,
html[data-theme="dark"] .home-notes-empty p,
html[data-theme="dark"] .secondary-tool-copy > p {
    color: #91A6AC;
}

html[data-theme="dark"] .home-primary-action {
    border-color: #29434A;
    color: #DCE8EB;
    background: rgba(13, 29, 34, .82);
}

html[data-theme="dark"] .home-primary-action:hover,
html[data-theme="dark"] .home-primary-action:focus-visible {
    background: #10252B;
    color: #5CD8E3;
}

html[data-theme="dark"] .purpose-panel,
html[data-theme="dark"] .secondary-tool,
html[data-theme="dark"] .home-notes {
    border-color: #20373E;
    background: #0D1D22;
}

html[data-theme="dark"] .home-notes-list,
html[data-theme="dark"] .home-note,
html[data-theme="dark"] .next-item,
html[data-theme="dark"] .principle,
html[data-theme="dark"] .privacy-strip,
html[data-theme="dark"] .home-notes-empty {
    border-color: #20373E;
}

html[data-theme="dark"] .home-note-category,
html[data-theme="dark"] .secondary-tool .featured-tool-kicker {
    color: #82989E;
}

html[data-theme="dark"] .home-note-thumb {
    border-color: #29434A;
    background: #10252B;
}

html[data-theme="dark"] .secondary-tool .featured-tool-tags span {
    border-color: #29434A;
    color: #91A6AC;
    background: #10252B;
}

/* Los paneles técnicos oscuros ya tienen identidad propia y se conservan. */

/* ---------- Notas ---------- */

html[data-theme="dark"] .notes-header h1,
html[data-theme="dark"] .note-header h1,
html[data-theme="dark"] .notes-back,
html[data-theme="dark"] .note-back,
html[data-theme="dark"] .notes-section-heading h2,
html[data-theme="dark"] .notes-archive h2,
html[data-theme="dark"] .notes-month h2,
html[data-theme="dark"] .notes-row-body strong,
html[data-theme="dark"] .notes-years strong,
html[data-theme="dark"] .notes-empty strong,
html[data-theme="dark"] .note-content h2,
html[data-theme="dark"] .note-content h3,
html[data-theme="dark"] .note-end a {
    color: #E7F1F3;
}

html[data-theme="dark"] .notes-header > p:last-of-type,
html[data-theme="dark"] .note-description,
html[data-theme="dark"] .notes-section-heading a,
html[data-theme="dark"] .notes-row-body > span:last-child,
html[data-theme="dark"] .notes-years span,
html[data-theme="dark"] .notes-empty p,
html[data-theme="dark"] .note-meta,
html[data-theme="dark"] .note-content {
    color: #95A9AF;
}

html[data-theme="dark"] .notes-row,
html[data-theme="dark"] .notes-years a,
html[data-theme="dark"] .note-content hr {
    border-color: #20373E;
}

html[data-theme="dark"] .notes-empty {
    border-color: #20373E;
    background: #0D1D22;
}

html[data-theme="dark"] .note-content p code,
html[data-theme="dark"] .note-content li code {
    background: #10252B;
    color: #BCEAF0;
}

html[data-theme="dark"] .note-content blockquote {
    color: #A4B7BC;
}

html[data-theme="dark"] .note-content a,
html[data-theme="dark"] .notes-back:hover,
html[data-theme="dark"] .note-back:hover,
html[data-theme="dark"] .note-end a:hover,
html[data-theme="dark"] .notes-row:hover .notes-row-body strong,
html[data-theme="dark"] .notes-row:focus-visible .notes-row-body strong {
    color: #5CD8E3;
}

/* ---------- Ciberalertas ---------- */

html[data-theme="dark"] .cyber-hero h1,
html[data-theme="dark"] .cyber-status-main h2,
html[data-theme="dark"] .cyber-section-heading h2,
html[data-theme="dark"] .cyber-method h2,
html[data-theme="dark"] .cyber-status-meta dd,
html[data-theme="dark"] .cyber-history-title strong,
html[data-theme="dark"] .cyber-method-grid h3 {
    color: #E7F1F3;
}

html[data-theme="dark"] .cyber-hero > p:last-child,
html[data-theme="dark"] .cyber-status-main p:last-child,
html[data-theme="dark"] .cyber-history-title span,
html[data-theme="dark"] .cyber-method-grid p,
html[data-theme="dark"] .cyber-history-window,
html[data-theme="dark"] .cyber-empty-history {
    color: #91A6AC;
}

html[data-theme="dark"] .cyber-status-card,
html[data-theme="dark"] .cyber-method-grid article {
    border-color: #20373E;
    background: #0D1D22;
}

html[data-theme="dark"] .cyber-status-meta {
    border-color: #20373E;
    background: #10252B;
}

html[data-theme="dark"] .cyber-status-meta div,
html[data-theme="dark"] .cyber-history-list,
html[data-theme="dark"] .cyber-history-row {
    border-color: #20373E;
}

html[data-theme="dark"] .cyber-status-meta dt,
html[data-theme="dark"] .cyber-history-severity {
    color: #82989E;
}

html[data-theme="dark"] .cyber-severity {
    border-color: #29434A;
    background: #10252B;
    color: #9DB0B6;
}

html[data-theme="dark"] .cyber-source-warning.is-neutral {
    border-color: #29434A;
    background: #10252B;
    color: #99ADB3;
}

html[data-theme="dark"] .cyber-disclaimer {
    color: #99ADB3;
}

/* ---------- Contacto ---------- */

html[data-theme="dark"] .contact-reasons article {
    border-color: #20373E;
    background: #0D1D22;
}

html[data-theme="dark"] .contact-reasons h2,
html[data-theme="dark"] .contact-incident-list strong,
html[data-theme="dark"] .contact-about-copy h2,
html[data-theme="dark"] .contact-sensitive strong {
    color: #E7F1F3;
}

html[data-theme="dark"] .contact-reasons p,
html[data-theme="dark"] .contact-incident-list p,
html[data-theme="dark"] .contact-about-copy p,
html[data-theme="dark"] .contact-sensitive p {
    color: #91A6AC;
}

html[data-theme="dark"] .contact-incident,
html[data-theme="dark"] .contact-about,
html[data-theme="dark"] .contact-incident-list,
html[data-theme="dark"] .contact-incident-list > div {
    border-color: #20373E;
}

html[data-theme="dark"] .contact-sensitive {
    background: rgba(216, 155, 43, .09);
}

/* ---------- Inputs genéricos ---------- */

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
    border-color: #29434A;
    background-color: #0D1D22;
    color: #DCE8EB;
}

/* ---------- Selección / scrollbars ---------- */

html[data-theme="dark"] ::selection {
    background: rgba(34, 199, 214, .30);
    color: #fff;
}

@media (prefers-reduced-motion: reduce) {
    .theme-toggle-thumb,
    body,
    .site-header,
    .site-footer,
    .tools-dropdown,
    .mobile-nav-panel {
        transition: none;
    }
}


/* ============================================================
   Tema global V1.1 · saneamiento transversal de contraste
   ============================================================ */

/*
 * Bloques "Entender..." compartidos por las herramientas.
 * En modo claro estos títulos usan el azul/negro corporativo original;
 * en noche necesitan una tinta clara explícita.
 */
html[data-theme="dark"] .explain-item h3 {
    color: #E7F1F3;
}

html[data-theme="dark"] .explain-item p {
    color: #9FB1B6;
}

/*
 * Generador de contraseñas · bloque "Uso recomendado".
 * En V1 conservaba la superficie blanca semitransparente del modo claro,
 * provocando una tarjeta gris demasiado luminosa y bajo contraste.
 */
html[data-theme="dark"] .password-advice {
    border-color: #20373E;
    background: #0D1D22;
    box-shadow: none;
}

html[data-theme="dark"] .password-advice .section-title {
    color: #EDF5F6;
}

html[data-theme="dark"] .password-advice p:last-child {
    color: #A0B2B7;
}

/* Código inline en "Qué hay detrás del resultado". */
html[data-theme="dark"] .password-explain code {
    background: #10252B;
    color: #BCEAF0;
    box-shadow: inset 0 0 0 1px rgba(188, 234, 240, .06);
}

/*
 * Contacto · enlace editorial "De GuardX a Consola22".
 */
html[data-theme="dark"] .contact-about-copy a {
    color: #E7F1F3;
}

html[data-theme="dark"] .contact-about-copy a:hover,
html[data-theme="dark"] .contact-about-copy a:focus-visible {
    color: #5CD8E3;
}

/*
 * Legales · los <strong> tenían color var(--c22-deep) fijado por legal.css.
 * Los H2 ya estaban cubiertos desde V1, pero no el texto enfatizado dentro
 * de párrafos y listas.
 */
html[data-theme="dark"] .legal-content strong,
html[data-theme="dark"] .legal-side strong {
    color: #E7F1F3;
}

/* Si el strong contiene un enlace, el enlace conserva el cyan semántico. */
html[data-theme="dark"] .legal-content strong > a,
html[data-theme="dark"] .legal-content a > strong {
    color: #5CD8E3;
}

/*
 * Cobertura preventiva para componentes claros reutilizables que heredan
 * títulos con la tinta profunda original.
 */
html[data-theme="dark"] .info-card h3,
html[data-theme="dark"] .info-card h4 {
    color: #E7F1F3;
}


/* ============================================================
   Tema global V1.1.1 · Home / Próximas áreas
   ============================================================ */

html[data-theme="dark"] .home-next {
    background: #0C1C21;
    border-top-color: #20373E;
    border-bottom-color: #20373E;
}

html[data-theme="dark"] .home-next .next-item {
    border-top-color: #294047;
}

html[data-theme="dark"] .home-next .next-item h3 {
    color: #E7F1F3;
}

html[data-theme="dark"] .home-next .next-item p,
html[data-theme="dark"] .home-next .home-section-heading-wide > p {
    color: #91A6AC;
}


/* ============================================================
   Tema global V1.2 · selector compacto día / noche
   ============================================================ */

/*
 * El control conserva el mismo HTML y la misma lógica JS,
 * pero visualmente se reduce a una sola cápsula.
 *
 * Solo se muestra el icono del modo ACTIVO dentro del thumb:
 *   claro  → ☀
 *   oscuro → ☾
 */

.theme-toggle {
    position: relative;
    width: 48px;
    min-width: 48px;
    height: 28px;
    min-height: 28px;
    padding: 3px;
    gap: 0;
    justify-content: flex-start;
    border-radius: 999px;
}

.theme-toggle-icon {
    display: none !important;
}

.theme-toggle-track {
    position: relative;
    width: 40px;
    height: 20px;
    flex: 0 0 40px;
    border-radius: 999px;
    background: #E2EAEC;
    box-shadow:
        inset 0 0 0 1px rgba(15, 42, 51, .07);
}

.theme-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    display: grid;
    place-items: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    color: #657A81;
    box-shadow:
        0 1px 4px rgba(15, 42, 51, .22);
    transform: translateX(0);
    transition:
        transform .18s ease,
        background-color .18s ease,
        color .18s ease,
        box-shadow .18s ease;
}

.theme-toggle-thumb::before {
    content: "☀";
    display: block;
    font-size: 10px;
    line-height: 1;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 700;
}

html[data-theme="dark"] .theme-toggle-track {
    background: #18333A;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, .055);
}

html[data-theme="dark"] .theme-toggle-thumb {
    transform: translateX(20px);
    background: #D7F3F6;
    color: #0F2A33;
    box-shadow:
        0 0 0 1px rgba(34, 199, 214, .12),
        0 2px 7px rgba(0, 0, 0, .30);
}

html[data-theme="dark"] .theme-toggle-thumb::before {
    content: "☾";
    font-size: 11px;
}

.theme-toggle:hover .theme-toggle-track,
.theme-toggle:focus-visible .theme-toggle-track {
    box-shadow:
        inset 0 0 0 1px rgba(34, 199, 214, .24);
}

html[data-theme="dark"] .theme-toggle:hover .theme-toggle-track,
html[data-theme="dark"] .theme-toggle:focus-visible .theme-toggle-track {
    box-shadow:
        inset 0 0 0 1px rgba(34, 199, 214, .28);
}

/* El botón de escritorio ya no necesita separación extra por su anchura. */
.theme-toggle-desktop {
    margin-left: 2px;
}

/* En móvil se usa exactamente el mismo control compacto. */
.theme-toggle-mobile {
    flex: 0 0 48px;
}

/* Corrección de la regla V1 que desplazaba 14px el thumb oscuro. */
html[data-theme="dark"] .theme-toggle-thumb {
    transform: translateX(20px);
}

@media (prefers-reduced-motion: reduce) {
    .theme-toggle-thumb {
        transition: none;
    }
}


/* ============================================================
   Tema global V1.2.1 · selector compacto refinado
   - icono visible sobre el fondo libre del track
   - estilo más próximo a password.es
   ============================================================ */

.theme-toggle {
    width: 52px;
    min-width: 52px;
    height: 30px;
    min-height: 30px;
    padding: 3px;
}

.theme-toggle-track {
    position: relative;
    width: 46px;
    height: 24px;
    flex: 0 0 46px;
    border-radius: 999px;
    background: #E6EEEE;
    box-shadow: inset 0 0 0 1px rgba(15, 42, 51, .10);
}

.theme-toggle-track::before {
    content: "☾";
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    line-height: 1;
    color: #71848A;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 700;
    pointer-events: none;
}

.theme-toggle-thumb {
    top: 2px;
    left: 22px;
    width: 20px;
    height: 20px;
    background: #1C2D39;
    color: transparent;
    box-shadow: 0 1px 4px rgba(15, 42, 51, .22);
    transform: none !important;
    transition: left .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.theme-toggle-thumb::before {
    content: none !important;
}

html[data-theme="dark"] .theme-toggle-track {
    background: #18323A;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}

html[data-theme="dark"] .theme-toggle-track::before {
    content: "☀";
    left: auto;
    right: 8px;
    color: #A6C9CF;
}

html[data-theme="dark"] .theme-toggle-thumb {
    left: 2px;
    background: #F2F8F9;
    box-shadow:
        0 0 0 1px rgba(34, 199, 214, .10),
        0 2px 7px rgba(0, 0, 0, .30);
    transform: none !important;
}

.theme-toggle-desktop {
    margin-left: 2px;
}

.theme-toggle-mobile {
    flex: 0 0 52px;
}

@media (prefers-reduced-motion: reduce) {
    .theme-toggle-thumb {
        transition: none;
    }
}


/* ============================================================
   Tema global V1.2.2 · Home hero / titular unificado
   ============================================================ */

/*
 * home.css asigna un color propio a:
 *     .home-title span
 *
 * Por eso el color nocturno aplicado al H1 no se heredaba en
 * "Resultados claros.".
 *
 * En modo oscuro el span debe formar parte visualmente del mismo
 * titular y heredar exactamente la tinta del H1.
 */
html[data-theme="dark"] .home-title > span {
    color: inherit;
}
