/* germannovas.cl · tema claro / oscuro
   El tema claro es el diseño original. El oscuro reinterpreta la misma paleta:
   pergamino → tinta nocturna, pino y ocre se aclaran para conservar contraste AA. */

.theme-toggle{all:unset;box-sizing:border-box;flex:none;cursor:pointer;width:40px;height:40px;border-radius:50%;display:inline-grid;place-items:center;color:var(--ink);border:1px solid var(--line-2);transition:border-color .2s,background-color .2s,transform .25s cubic-bezier(.2,.8,.2,1)}
.theme-toggle:hover{border-color:var(--ink);transform:rotate(-12deg)}
.theme-toggle:focus-visible{outline:2px solid var(--ocre);outline-offset:2px}
.theme-toggle svg{width:18px;height:18px;display:block}
.theme-toggle .i-sun{display:none}
html[data-theme="dark"] .theme-toggle .i-sun{display:block}
html[data-theme="dark"] .theme-toggle .i-moon{display:none}
.site-head .wrap>.theme-toggle{margin-left:8px}
.bar-in>.theme-toggle{margin-left:auto}
.bar-in>.theme-toggle+.home{margin-left:12px}
.theme-toggle.is-floating{position:fixed;right:16px;bottom:16px;z-index:90;background:var(--surface)}

/* ---------- tokens oscuros ---------- */
html[data-theme="dark"]{
  --bg:#15140F; --bg-2:#1B1A14; --surface:#1F1E18; --surface-2:#24231C;
  --ink:#ECE6D8; --muted:#ABA593; --line:rgba(236,230,216,.12); --line-2:rgba(236,230,216,.24);
  --pino:#8DBBA6; --pino-2:#A6CBB9; --pino-soft:#1F2E28; --pino-deep:#2B5446;
  --ocre:#C9963F; --ocre-ink:#E2B463; --ocre-soft:#3A2F1C;
  --on-dark:#F0ECE1; --on-dark-muted:#C9D4CC;
  color-scheme:dark;
}
html[data-theme="dark"] body{background:var(--bg);color:var(--ink)}

/* superficies que usaban pino como fondo: vuelven a un pino profundo */
html[data-theme="dark"] :where(.btn-primary,.ticker,.kit,.articulo .src,.press,.skip){background-color:var(--pino-deep);color:var(--on-dark)}
html[data-theme="dark"] :where(.btn-primary:hover){background-color:var(--ocre);color:#15140F}
/* blog: su botón base usa pino como fondo */
html[data-theme="dark"] body:has(.bar-in) :where(.btn:not(.btn-ghost)){background-color:var(--pino-deep);color:var(--on-dark)}
html[data-theme="dark"] body:has(.bar-in) :where(.btn:not(.btn-ghost):hover){background-color:var(--ocre);color:#15140F}
html[data-theme="dark"] .nav .btn:hover{background:var(--ocre);color:#15140F}
html[data-theme="dark"] .btn-ocre{color:#15140F}

/* superficies que usaban tinta como fondo */
html[data-theme="dark"] .lang button[aria-pressed="true"],
html[data-theme="dark"] .chip[aria-pressed="true"]{background:var(--ink);color:#15140F;border-color:var(--ink)}
html[data-theme="dark"] :where(.toast,.talk .screen,.prose pre,.foot){background-color:#0C0B08;color:var(--ink)}

/* cabeceras translúcidas */
html[data-theme="dark"] .site-head{background:rgba(21,20,15,.86)}
html[data-theme="dark"] .bar{background:rgba(21,20,15,.9)}
html[data-theme="dark"] :where(.nav a:hover,.nav a.is-on){background:rgba(236,230,216,.08)}

/* textos con color fijo */
html[data-theme="dark"] .hero .lead{color:#D9D3C4}
html[data-theme="dark"] .tag{color:#D9D3C4}

/* blog: miniaturas por categoría */
html[data-theme="dark"] .ph{background-color:var(--pino-deep)}
html[data-theme="dark"] .ph-preguntas-frecuentes{background-color:#3A4A52}
html[data-theme="dark"] .ph-detras-de-los-libros{background-color:#6E2E2C}
html[data-theme="dark"] .ph-notas{background-color:#875C1B}
html[data-theme="dark"] .cats a[aria-current]{background:rgba(141,187,166,.14)}

/* fotografías: un punto menos de brillo para no deslumbrar de noche */
html[data-theme="dark"] :where(main img:not([src$=".svg"])){filter:brightness(.92)}

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