/* ============================================================
   DONDE LA CIENCIA CALLA — identidad marca
   Negro abisal, oro antiguo, crema editorial, rojo cordón (acento).
   ============================================================ */

:root {
  --fondo: #000000;
  --panel: #12100e;
  --panel-claro: #1c1915;
  --linea: #3a322a;
  --oro: #a68d5f;
  --oro-claro: #d9c5a0;
  --oro-oscuro: #8e795e;
  --bronce: #3a322a;
  --sangre: #8b0000;
  --sangre-viva: #d9c5a0;
  --tinta: #e5e1d8;
  --tinta-suave: #9a958c;
  --papel: #ebe6dc;
  --papel-oscuro: #d4c4a8;
  --tinta-papel: #2a2218;
  --tinta-papel-suave: #5c4f42;
  --sello: #8b0000;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scrollbar-color: var(--oro-oscuro) var(--fondo); scrollbar-width: thin; }

body {
  background:
    radial-gradient(ellipse 55% 40% at 50% 6%, rgba(166, 141, 95, 0.14), transparent 68%),
    radial-gradient(ellipse 80% 50% at 50% 115%, rgba(0, 0, 0, 0.95), transparent),
    var(--fondo);
  color: var(--tinta);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.08rem;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--oro-oscuro); color: #000; }

/* Humo que sube por los laterales */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 55; opacity: 0.5;
  background:
    radial-gradient(ellipse 30% 50% at 18% 110%, rgba(120, 110, 130, 0.08), transparent 70%),
    radial-gradient(ellipse 35% 60% at 80% 115%, rgba(120, 110, 130, 0.07), transparent 70%);
  animation: humo 24s ease-in-out infinite alternate;
}
@keyframes humo { from { transform: translateY(0) skewX(0deg); } to { transform: translateY(-50px) skewX(-3deg); } }

/* Viñeta perpetua */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 60;
  background: radial-gradient(ellipse at 50% 35%, transparent 32%, rgba(0, 0, 0, 0.85) 100%);
}

/* ---------------- edicto / ticker ---------------- */
.aviso {
  font-family: 'Space Mono', monospace; font-size: 0.6rem;
  letter-spacing: 0.45em; color: var(--oro-claro);
  padding: 0.7rem 0; border-bottom: 1px solid var(--linea);
  overflow: hidden; white-space: nowrap; position: relative; z-index: 5;
}
.aviso-inner { display: inline-block; animation: procesion 70s linear infinite; }
.aviso-inner span { margin-right: 4rem; }
@keyframes procesion { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------------- cabecera ---------------- */
header.cabecera { text-align: center; padding: 2.2rem 1rem 1.3rem; position: relative; }
.cabecera-marca {
  display: inline-block;
  margin-bottom: 0.5rem;
  line-height: 0;
}
.logo-circulo {
  width: clamp(108px, 22vw, 156px);
  height: auto;
  border-radius: 50%;
  box-shadow:
    0 0 48px rgba(166, 141, 95, 0.22),
    0 0 0 1px rgba(217, 197, 160, 0.15),
    0 12px 40px rgba(0, 0, 0, 0.85);
  transition: box-shadow 0.45s ease, transform 0.45s ease;
}
.cabecera-marca:hover .logo-circulo {
  box-shadow:
    0 0 64px rgba(217, 197, 160, 0.32),
    0 0 0 1px rgba(217, 197, 160, 0.28),
    0 12px 40px rgba(0, 0, 0, 0.85);
  transform: scale(1.03);
}
.sigilo { display: none; }
.titulo {
  font-family: 'Cormorant Garamond', serif; font-weight: 600;
  font-size: clamp(1.55rem, 4.5vw, 2.35rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tinta);
  text-shadow: 0 0 28px rgba(166, 141, 95, 0.35), 0 4px 18px #000;
  margin-top: 0.2rem;
}
.titulo a { color: inherit; }
.lema { font-style: italic; color: var(--tinta-suave); font-size: 1.12rem; margin-top: 0.35rem; }
.latin {
  font-family: 'Space Mono', monospace; font-size: 0.6rem; letter-spacing: 0.5em;
  color: var(--oro); margin-top: 0.9rem; opacity: 0.85;
}
.latin .reloj { color: var(--tinta-suave); }
.latin .reloj.maldito { color: var(--oro-claro); text-shadow: 0 0 14px rgba(217, 197, 160, 0.55); }

/* ---------------- menú — índice de archivo clasificado ---------------- */
nav.menu {
  position: sticky; top: 0; z-index: 40;
  display: flex; justify-content: center; flex-wrap: wrap;
  background: var(--panel);
  border-block: 1px solid var(--linea);
  padding: 0;
  font-family: 'Space Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}
.menu a {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.8rem 1rem;
  color: var(--tinta-suave);
  font-style: normal;
  border-right: 1px dashed rgba(166, 141, 95, 0.22);
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.menu a:first-of-type { border-left: 1px dashed rgba(166, 141, 95, 0.22); }
.menu a:hover {
  color: var(--oro-claro);
  background: rgba(166, 141, 95, 0.08);
  text-shadow: none;
}
.menu a.activo {
  color: var(--oro-claro);
  background: var(--panel-claro);
  box-shadow: inset 0 -2px 0 var(--oro);
}
.menu a.prohibido {
  opacity: 0.4;
  cursor: not-allowed;
  letter-spacing: 0.12em;
  color: var(--tinta-suave);
}
.menu a.prohibido:hover { color: var(--tinta-suave); background: transparent; }
.menu-sigilo {
  color: var(--oro-claro);
  font-size: 0.75rem;
  text-shadow: 0 0 8px rgba(217, 197, 160, 0.35);
}
.menu-censura {
  display: inline-block;
  background: linear-gradient(180deg, #6a6a6a, #4a4a4a);
  color: transparent;
  padding: 0 0.25em;
  border-radius: 1px;
  letter-spacing: 0.05em;
  vertical-align: baseline;
}
@media (max-width: 640px) {
  nav.menu {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  nav.menu::-webkit-scrollbar { display: none; }
  .menu a { flex-shrink: 0; font-size: 0.52rem; padding: 0.7rem 0.75rem; letter-spacing: 0.1em; }
}

main { max-width: 1080px; margin: 0 auto; padding: 2.4rem 1.5rem 4rem; position: relative; z-index: 2; }

/* ---------------- layout con sidebar ---------------- */
.contenedor {
  max-width: 1340px; margin: 0 auto; padding: 2rem 1.25rem 4rem;
  display: grid; grid-template-columns: minmax(0, 1fr) min(320px, 30%);
  gap: 2rem; align-items: start; position: relative; z-index: 2;
}
.contenedor main { max-width: none; margin: 0; padding: 0; }
.contenedor-articulo { grid-template-columns: minmax(0, 1fr) min(300px, 28%); }
.contenedor-hemeroteca .hemeroteca { max-width: none; margin: 0; }
@media (max-width: 1020px) {
  .contenedor { grid-template-columns: 1fr; padding: 1.5rem 1rem 3rem; gap: 1.5rem; }
  .lateral { order: 2; }
  main, .contenedor main { order: 1; }
}

/* ---------------- portada: el evangelio (destacado) ---------------- */
.evangelio {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--linea);
  padding: 2rem;
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 2rem; align-items: center;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.9), inset 0 0 60px rgba(166, 141, 95, 0.04);
}
@media (max-width: 860px) { .evangelio { grid-template-columns: 1fr; } }
.evangelio::before, .evangelio::after { content: "✠"; position: absolute; color: var(--linea); font-size: 1.1rem; }
.evangelio::before { top: 10px; left: 14px; }
.evangelio::after { bottom: 10px; right: 14px; }
.evangelio-img { position: relative; overflow: hidden; border: 1px solid var(--linea); }
.evangelio-img img {
  width: 100%; display: block;
  filter: sepia(0.22) contrast(1.12) brightness(0.78) saturate(0.7) hue-rotate(-8deg);
  transition: filter 1.2s;
}
.evangelio:hover .evangelio-img img { filter: sepia(0.1) contrast(1.1) brightness(0.9) saturate(0.8); }
.evangelio-img::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, transparent 68%, rgba(5, 3, 4, 0.8)),
    radial-gradient(ellipse at 50% 40%, transparent 55%, rgba(166, 141, 95, 0.08));
}
.capitulo {
  font-family: 'Space Mono', monospace; font-size: 0.6rem; letter-spacing: 0.34em;
  color: var(--oro-claro);
}
.evangelio h2 {
  font-weight: 700; font-size: clamp(1.6rem, 3.4vw, 2.4rem); line-height: 1.07;
  margin: 0.7rem 0 0.8rem;
}
.evangelio h2::first-letter { font-family: 'Cormorant Garamond', serif; color: var(--oro-claro); font-size: 1.4em; }
.evangelio h2 a:hover { color: var(--oro-claro); }
.evangelio p.resumen { color: var(--tinta-suave); font-size: 1.1rem; }
.reliquia { margin-top: 1.1rem; font-family: 'Space Mono', monospace; font-size: 0.6rem; letter-spacing: 0.25em; color: var(--oro); }

/* ---------------- portada: letanías (resto de expedientes) ---------------- */
.letanias { margin-top: 1.8rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; }
@media (max-width: 760px) { .letanias { grid-template-columns: 1fr; } }
.letania {
  background: var(--panel); border: 1px solid var(--linea);
  border-top: 3px solid var(--sangre);
  padding: 0;
  transition: border-top-color 0.3s, transform 0.3s, box-shadow 0.3s;
  position: relative;
  display: flex; flex-direction: column;
}
.letania:hover {
  border-top-color: var(--oro-claro); transform: translateY(-4px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.8);
}
.letania-img { display: block; overflow: hidden; border-bottom: 1px solid var(--linea); }
.letania-img img {
  width: 100%; height: 170px; object-fit: cover; display: block;
  filter: sepia(0.22) contrast(1.1) brightness(0.78) saturate(0.7);
  transition: filter 0.6s, transform 0.6s;
}
.letania:hover .letania-img img { filter: sepia(0.1) contrast(1.08) brightness(0.9) saturate(0.8); transform: scale(1.04); }
.letania-cuerpo { padding: 1.3rem 1.7rem 1.6rem; }
.letania h3 { font-weight: 700; font-size: 1.42rem; line-height: 1.12; margin: 0.5rem 0 0.6rem; }
.letania h3::first-letter { font-family: 'Cormorant Garamond', serif; color: var(--oro-claro); }
.letania h3 a:hover { color: var(--oro-claro); }
.letania p { color: var(--tinta-suave); }
.letania .reliquia { margin-top: 0.8rem; }

/* ============================================================
   LA BARRA LATERAL — los widgets del corcho en liturgia Misa Negra
   ============================================================ */
.lateral { display: flex; flex-direction: column; gap: 1.2rem; position: sticky; top: 3.4rem; }
@media (max-width: 1020px) { .lateral { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; } }
@media (max-width: 640px) { .lateral { grid-template-columns: 1fr; } }

.lista-expedientes a.activo { color: var(--oro-claro); font-weight: 600; }
.lista-expedientes a.activo .num { color: var(--oro-claro); }

.widget-actual { border-color: var(--sangre); background: var(--panel-claro); }
.exp-actual-num {
  font-family: 'Cormorant Garamond', serif; font-size: 2rem; color: var(--oro-claro);
  line-height: 1; margin-bottom: 0.3rem;
}
.exp-actual-cat {
  font-family: 'Space Mono', monospace; font-size: 0.62rem; letter-spacing: 0.2em;
  color: var(--oro-claro); margin-bottom: 0.35rem;
}
.exp-actual-meta { font-size: 0.9rem; color: var(--tinta-suave); }

.widget {
  background: var(--panel); border: 1px solid var(--linea);
  padding: 1.1rem; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5); position: relative;
}
.widget::before {
  content: ""; position: absolute; inset: 4px;
  border: 1px dashed rgba(176, 138, 46, 0.18); pointer-events: none;
}
.widget-titulo {
  font-family: 'Special Elite', monospace; font-size: 0.8rem; letter-spacing: 0.15em;
  color: var(--oro-claro); margin-bottom: 0.7rem;
  border-bottom: 1px solid rgba(176, 138, 46, 0.3); padding-bottom: 0.4rem;
}
.letra-pequena { font-size: 0.72rem; opacity: 0.7; margin-top: 0.5rem; line-height: 1.5; }
.letra-pequena.centrado { text-align: center; }
.letra-pequena a { color: var(--oro); }
.letra-pequena a:hover { color: var(--oro-claro); }
.texto-rojo { color: var(--oro-claro); }

/* nivel de paranoia */
.medidor {
  height: 14px; background: linear-gradient(90deg, #2d7a3a, #b8a500, var(--sangre-viva));
  border: 1px solid #000; position: relative; margin-bottom: 0.5rem;
}
.medidor-aguja {
  position: absolute; top: -4px; left: 78%; width: 3px; height: 22px;
  background: #fff; box-shadow: 0 0 6px #fff; animation: temblar 0.7s ease-in-out infinite;
}
@keyframes temblar { 0%,100% { left: 78%; } 30% { left: 84%; } 60% { left: 74%; } 80% { left: 88%; } }
.paranoia-valor {
  font-family: 'Special Elite', monospace; color: var(--oro-claro);
  font-size: 1.05rem; text-align: center; letter-spacing: 0.12em;
}
.paranoia-valor.parpadea { animation: tiriteo 0.1s 7; }
@keyframes tiriteo { 50% { transform: translateX(3px) skewX(5deg); } }

/* archivo de expedientes */
.lista-expedientes { list-style: none; }
.lista-expedientes li {
  font-family: 'Special Elite', monospace; font-size: 0.76rem; line-height: 1.45;
  border-bottom: 1px dotted rgba(176, 138, 46, 0.25);
}
.lista-expedientes li:last-child { border-bottom: none; }
.lista-expedientes a, .lista-expedientes .expediente-bloqueado {
  display: flex; gap: 0.5rem; padding: 0.45rem 0; align-items: baseline;
  color: var(--tinta-suave); transition: color 0.2s;
}
.lista-expedientes a:hover { color: var(--oro-claro); }
.lista-expedientes .num { font-size: 0.68rem; color: var(--oro); flex-shrink: 0; }
.lista-expedientes .expediente-bloqueado { opacity: 0.55; }

/* voces del más allá */
.widget-cita .cita-texto { font-style: italic; line-height: 1.55; font-size: 0.98rem; min-height: 3.2em; }

/* parte lunar */
.widget-luna { text-align: center; font-size: 0.9rem; }
.luna {
  width: 70px; height: 70px; margin: 0.3rem auto 0.7rem; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #efeadd, #b9b2a0 60%, #8d8678);
  box-shadow: inset -22px -6px 0 2px var(--panel), 0 0 25px rgba(239, 234, 221, 0.3);
}

/* ¿has visto algo? */
.widget-informa { font-size: 0.92rem; }
.boton-informar {
  display: block; width: 100%; margin: 0.7rem 0 0.5rem; padding: 0.6rem;
  font-family: 'Special Elite', monospace; font-size: 0.78rem; letter-spacing: 0.1em;
  background: var(--oro-oscuro); color: #0a0908; border: 1px solid var(--oro-claro); cursor: pointer;
  transition: all 0.2s; position: relative; z-index: 1;
}
.boton-informar:hover { background: var(--oro-claro); color: #000; box-shadow: 0 0 18px rgba(217, 197, 160, 0.45); }

/* publicidad de la resistencia */
.widget-anuncio { text-align: center; }
.anuncio-tag { font-family: 'Special Elite', monospace; font-size: 0.58rem; letter-spacing: 0.2em; opacity: 0.6; margin-bottom: 0.5rem; }
.anuncio { border: 2px dashed var(--oro); padding: 0.9rem; font-size: 0.85rem; }
.anuncio-grande { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; color: var(--oro-claro); text-shadow: 2px 2px 0 #000; }
.anuncio-precio { color: var(--oro-claro); font-style: italic; margin-top: 0.3rem; }

/* visitantes (CRT verde, intocable) */
.widget-contador { text-align: center; }
.contador {
  font-family: 'Special Elite', monospace; font-size: 1.8rem; letter-spacing: 0.35em;
  color: #5dff7f; background: #02140a; border: 1px solid rgba(93, 255, 127, 0.4);
  padding: 0.4rem 0.2rem 0.4rem 0.55rem; text-shadow: 0 0 8px rgba(93, 255, 127, 0.8);
}
#dp-lectores.parpadea { animation: tiriteo 0.1s 7; display: inline-block; }

.censurado {
  display: inline-block;
  background: linear-gradient(180deg, #9a9a9a 0%, #7a7a7a 100%);
  color: transparent;
  border-radius: 2px;
  padding: 0 0.35em;
  min-width: 3em;
  text-shadow: none;
  user-select: none;
  vertical-align: baseline;
  line-height: 1.4;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.25);
}
.documento-filtrado .censurado { background: linear-gradient(180deg, #6e6a62 0%, #524e48 100%); }

/* ---------------- artículo ---------------- */
.articulo-cuerpo { max-width: none; margin: 0; }
.titulo-articulo { font-size: clamp(1.2rem, 3.2vw, 1.75rem) !important; letter-spacing: 0.12em !important; }
.articulo-texto { font-size: 1.1rem; line-height: 1.72; }
.articulo-volver {
  font-family: 'Space Mono', monospace; font-size: 0.66rem; letter-spacing: 0.25em;
  color: var(--oro); display: inline-block; margin-bottom: 1.6rem;
}
.articulo-volver:hover { color: var(--oro-claro); }
.articulo-expediente {
  font-family: 'Space Mono', monospace; font-size: 0.62rem; letter-spacing: 0.3em;
  color: var(--oro-claro); margin-bottom: 0.8rem;
}
.articulo-titulo {
  font-weight: 700; font-size: clamp(1.9rem, 4.6vw, 3rem); line-height: 1.08;
  margin-bottom: 0.9rem;
}
.articulo-titulo::first-letter { font-family: 'Cormorant Garamond', serif; color: var(--oro-claro); font-size: 1.35em; }
.articulo-firma {
  font-style: italic; color: var(--tinta-suave); font-size: 0.98rem;
  border-bottom: 1px solid var(--linea); padding-bottom: 1.2rem; margin-bottom: 1.6rem;
}
.articulo-hero { margin: 0 0 1.8rem; border: 1px solid var(--linea); background: var(--panel); }
.articulo-hero img {
  width: 100%; display: block;
  filter: sepia(0.18) contrast(1.1) brightness(0.85) saturate(0.75);
}
.articulo-hero figcaption {
  font-family: 'Space Mono', monospace; font-size: 0.62rem; letter-spacing: 0.12em;
  color: var(--tinta-suave); padding: 0.7rem 0.9rem; line-height: 1.7;
}
.articulo-hero .credito { display: block; margin-top: 0.3rem; opacity: 0.7; }
.articulo-hero .credito a { color: var(--oro); }
.articulo-hero .credito a:hover { color: var(--oro-claro); }

.articulo-cuerpo p { margin-bottom: 1.15rem; }
.articulo-cuerpo > p:first-of-type::first-letter,
.articulo-cuerpo .inicial::first-letter {
  font-family: 'Cormorant Garamond', serif; color: var(--oro-claro);
  font-size: 3.1em; float: left; line-height: 0.8; padding: 0.08em 0.12em 0 0;
}
.articulo-cuerpo h2 {
  font-weight: 700; font-size: 1.55rem; line-height: 1.15;
  margin: 2rem 0 0.9rem; color: var(--tinta);
}
.articulo-cuerpo h2::before { content: "✠ "; color: var(--sangre); font-size: 0.8em; }

blockquote.articulo-cita {
  border-left: 3px solid var(--sangre);
  background: var(--panel);
  padding: 1.2rem 1.5rem; margin: 1.6rem 0;
  font-style: italic; font-size: 1.12rem;
}
blockquote.articulo-cita footer {
  font-style: normal; font-family: 'Space Mono', monospace; font-size: 0.66rem;
  letter-spacing: 0.2em; color: var(--oro); margin-top: 0.7rem;
  border: none; padding: 0; text-align: left;
}

.documento-filtrado {
  background:
    linear-gradient(135deg, rgba(255,252,245,0.04) 0%, transparent 50%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 27px,
      rgba(42, 34, 24, 0.06) 27px,
      rgba(42, 34, 24, 0.06) 28px
    ),
    linear-gradient(168deg, var(--papel) 0%, var(--papel-oscuro) 55%, #c9b896 100%);
  border: 1px solid #a89878;
  border-left: 4px solid var(--sello);
  padding: 1.6rem 1.5rem 1.4rem;
  margin: 2rem 0;
  font-family: 'Special Elite', 'Courier New', monospace;
  font-size: 0.84rem;
  line-height: 1.85;
  color: var(--tinta-papel);
  position: relative;
  box-shadow:
    0 2px 0 rgba(0,0,0,0.15),
    0 12px 40px rgba(0, 0, 0, 0.55),
    inset 0 0 80px rgba(139, 119, 90, 0.15);
  transform: rotate(-0.35deg);
}
.documento-filtrado::before {
  content: "DOCUMENTO FILTRADO";
  display: block;
  font-family: 'Space Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.35em;
  color: var(--sello);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed rgba(139, 26, 40, 0.35);
}
.documento-filtrado::after {
  content: "COPIA Nº 3 DE 3 — DESTRUIR";
  position: absolute; top: 12px; right: 14px;
  font-family: 'Space Mono', monospace;
  font-size: 0.52rem; letter-spacing: 0.15em;
  color: var(--sello);
  transform: rotate(3deg);
  opacity: 0.85;
  border: 1px solid rgba(139, 26, 40, 0.4);
  padding: 0.15rem 0.4rem;
  background: rgba(255, 250, 240, 0.5);
}
.documento-filtrado p { margin-bottom: 0.85rem; color: var(--tinta-papel); }
.documento-filtrado p:last-child { margin-bottom: 0; }
.doc-cabecera { display: none; }
.documento-filtrado strong { color: #1a1510; }

/* vídeo y audio incrustados */
.articulo-video { margin: 1.8rem 0; border: 1px solid var(--linea); background: #000; }
.articulo-video .marco-video { position: relative; padding-top: 56.25%; }
.articulo-video iframe, .articulo-video video {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.articulo-video video { object-fit: contain; background: #000; }
.articulo-video figcaption {
  font-family: 'Space Mono', monospace; font-size: 0.62rem; letter-spacing: 0.12em;
  color: var(--tinta-suave); padding: 0.7rem 0.9rem; line-height: 1.7;
}
.articulo-video figcaption a { color: var(--oro); }
.articulo-audio { margin: 1.8rem 0; padding: 1.1rem 1.3rem; border: 1px solid var(--linea); background: var(--panel); }
.articulo-audio audio { width: 100%; filter: invert(0.9) hue-rotate(180deg); }
.articulo-audio p {
  font-family: 'Space Mono', monospace; font-size: 0.62rem; letter-spacing: 0.15em;
  color: var(--tinta-suave); margin: 0.6rem 0 0 !important;
}
.articulo-audio p a { color: var(--oro); }

/* fuentes reales */
.articulo-fuentes {
  margin-top: 2.4rem; border: 1px solid var(--linea); background: var(--panel);
  padding: 1.3rem 1.6rem;
}
.articulo-fuentes h3 {
  font-family: 'Space Mono', monospace; font-size: 0.62rem; letter-spacing: 0.36em;
  color: var(--oro); margin-bottom: 0.8rem;
}
.articulo-fuentes ul { list-style: none; }
.articulo-fuentes li { padding: 0.25rem 0; font-size: 0.98rem; }
.articulo-fuentes li::before { content: "✠ "; color: var(--sangre); }
.articulo-fuentes a { color: var(--tinta-suave); border-bottom: 1px dotted var(--linea); }
.articulo-fuentes a:hover { color: var(--oro-claro); }

.articulo-nota {
  margin-top: 2.2rem; padding-top: 1.2rem; border-top: 1px solid var(--linea);
  font-style: italic; color: var(--tinta-suave); font-size: 0.95rem;
}

/* ---------------- hemeroteca ---------------- */
.hemeroteca { max-width: none; margin: 0; }
.hemeroteca-filtros { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1.3rem; }
.hemeroteca-filtros button {
  background: var(--panel); border: 1px solid var(--linea); color: var(--tinta-suave);
  font-family: 'Space Mono', monospace; font-size: 0.58rem; letter-spacing: 0.18em;
  padding: 0.45rem 0.8rem; cursor: pointer; transition: all 0.2s;
}
.hemeroteca-filtros button:hover { color: var(--oro-claro); border-color: var(--sangre); }
.hemeroteca-filtros button.activo { color: var(--tinta); border-color: var(--sangre); background: var(--panel-claro); }
.hemeroteca-vacia { margin-top: 1.6rem; font-style: italic; color: var(--tinta-suave); text-align: center; }
.hemeroteca-lista { border: 1px solid var(--linea); background: var(--panel); margin-top: 1.4rem; }
.hemeroteca-fila {
  display: grid; grid-template-columns: 4.5rem 1fr 11rem 10rem; gap: 1rem;
  align-items: baseline; padding: 0.9rem 1.3rem;
  border-bottom: 1px dashed var(--linea);
  transition: background 0.2s, padding-left 0.25s;
}
.hemeroteca-fila:last-child { border-bottom: none; }
.hemeroteca-fila:hover { background: var(--panel-claro); padding-left: 1.7rem; }
.hemeroteca-num { font-family: 'Space Mono', monospace; font-size: 0.72rem; color: var(--oro); }
.hemeroteca-titulo { font-weight: 700; font-size: 1.08rem; line-height: 1.2; }
.hemeroteca-fila:hover .hemeroteca-titulo { color: var(--oro-claro); }
.hemeroteca-cat {
  font-family: 'Space Mono', monospace; font-size: 0.58rem; letter-spacing: 0.22em;
  color: var(--oro-claro);
}
.hemeroteca-fecha { font-style: italic; color: var(--tinta-suave); font-size: 0.9rem; }
@media (max-width: 760px) {
  .hemeroteca-fila { grid-template-columns: 3.4rem 1fr; }
  .hemeroteca-cat, .hemeroteca-fecha { display: none; }
}

/* ---------------- pie ---------------- */
footer.pie {
  border-top: 1px solid var(--linea); text-align: center;
  padding: 2.6rem 1rem 2.2rem; color: var(--tinta-suave); font-size: 0.92rem;
  position: relative; z-index: 2;
}
.pie .lema-pie { font-family: 'Cormorant Garamond', serif; font-size: 1.7rem; color: var(--tinta); margin-bottom: 0.5rem; }
.pie .letra-pequena { font-size: 0.78rem; opacity: 0.7; margin-top: 0.6rem; }
.boton-cobarde {
  margin-top: 1.2rem; background: none; border: 1px solid var(--linea);
  color: var(--tinta-suave); font-family: 'Space Mono', monospace;
  font-size: 0.58rem; letter-spacing: 0.3em; padding: 0.5rem 1.1rem; cursor: pointer;
  transition: all 0.25s;
}
.boton-cobarde:hover { border-color: var(--sangre); color: var(--oro-claro); }

/* ============================================================
   EL DIRECTOR DE ESCENA — vestuario de los efectos
   ============================================================ */

/* nivel de intensidad ambiental (lo fija el director en <body data-acto>) */

/* — errata viva — */
.dp-errata { transition: color 1.2s; }
.dp-errata.dp-recien { color: var(--oro-claro); }

/* — selección que mancha — */
.dp-manchado { color: var(--oro-claro); text-shadow: 0 0 10px rgba(217, 197, 160, 0.4); transition: color 1.4s; }

/* — apagón — */
#dp-apagon {
  position: fixed; inset: 0; background: #000; z-index: 90;
  opacity: 0; pointer-events: none;
  display: flex; align-items: center; justify-content: center; gap: 4rem;
}
#dp-apagon.activo { animation: dp-apagon-anim 1.6s steps(1); }
@keyframes dp-apagon-anim { 0% { opacity: 0; } 6%, 88% { opacity: 1; } 100% { opacity: 0; } }
#dp-apagon .par-ojos { display: flex; gap: 1rem; opacity: 0; }
#dp-apagon.activo .par-ojos { animation: dp-ojos-abren 1.6s steps(1); }
@keyframes dp-ojos-abren { 0%, 30% { opacity: 0; } 40%, 82% { opacity: 1; } 100% { opacity: 0; } }
#dp-apagon .par-ojos i {
  width: 10px; height: 10px; border-radius: 50%;
  background: #ff2030; box-shadow: 0 0 16px rgba(255, 32, 48, 0.9);
}

/* — el que asoma — */
#dp-asoma {
  position: fixed; top: 50%; right: -110px; width: 100px; height: 170px;
  transform: translateY(-50%); z-index: 85; pointer-events: none;
  background:
    radial-gradient(ellipse 32px 36px at 42px 38px, #020203 60%, transparent 62%),
    radial-gradient(ellipse 52px 86px at 56px 130px, #020203 60%, transparent 62%);
  filter: drop-shadow(-8px 0 18px rgba(0, 0, 0, 0.9));
  transition: right 1.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
#dp-asoma::after {
  content: ""; position: absolute; left: 24px; top: 33px; width: 4px; height: 4px;
  border-radius: 50%; background: #ff3b4e; opacity: 0; transition: opacity 0.6s 0.8s;
}
#dp-asoma.fuera { right: -38px; }
#dp-asoma.fuera::after { opacity: 0.95; }

/* — la sombra que cruza — */
#dp-sombra {
  position: fixed; top: 0; bottom: 0; left: -30%; width: 24%;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.55), transparent);
  z-index: 84; pointer-events: none; opacity: 0;
}
#dp-sombra.cruza { animation: dp-cruce 2.6s ease-in-out; }
@keyframes dp-cruce { 0% { left: -30%; opacity: 0; } 18% { opacity: 1; } 82% { opacity: 1; } 100% { left: 110%; opacity: 0; } }

/* — huellas — */
.dp-huella {
  position: fixed; z-index: 84; pointer-events: none; font-size: 1.2rem;
  opacity: 0; filter: grayscale(1) brightness(0.4) blur(0.4px);
  animation: dp-pisada 3.4s ease-out forwards;
}
@keyframes dp-pisada { 0% { opacity: 0; } 12% { opacity: 0.7; } 60% { opacity: 0.4; } 100% { opacity: 0; } }

/* — parpadeo de vela (toda la página) — */
body.dp-vela main, body.dp-vela header.cabecera { animation: dp-vela-anim 2.4s steps(2) 1; }
@keyframes dp-vela-anim {
  0%, 100% { filter: brightness(1); }
  20% { filter: brightness(0.72); }
  35% { filter: brightness(1.05); }
  60% { filter: brightness(0.8); }
}

/* — cuadro torcido (snap de la habitación) — */
.dp-torcido { animation: dp-torcer 0.5s ease-out; }
@keyframes dp-torcer { 0% { transform: rotate(2.6deg); } 100% { transform: rotate(0); } }

/* — estática legendaria — */
#dp-estatica {
  position: fixed; inset: 0; z-index: 95; opacity: 0; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.09) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(160, 160, 180, 0.07) 0 2px, transparent 2px 5px),
    #0a0a0d;
  display: flex; align-items: center; justify-content: center;
}
#dp-estatica.activo { animation: dp-ruido 1.7s steps(12); }
@keyframes dp-ruido {
  0% { opacity: 0; } 6%, 90% { opacity: 1; }
  20% { background-position: 0 4px, 3px 0; }
  45% { background-position: 0 -5px, -4px 0; }
  70% { background-position: 0 9px, 6px 0; }
  100% { opacity: 0; }
}
#dp-estatica span {
  font-family: 'Space Mono', monospace; font-size: clamp(1rem, 3.4vw, 2rem);
  letter-spacing: 0.4em; color: #fff; text-shadow: 2px 0 0 #f0f, -2px 0 0 #0ff;
}

/* — el doppelgänger del cursor — */
#dp-fantasma {
  position: fixed; width: 18px; height: 18px; z-index: 96; pointer-events: none;
  border: 2px solid rgba(217, 197, 160, 0.85); border-radius: 50%;
  box-shadow: 0 0 14px rgba(217, 197, 160, 0.5);
  transform: translate(-50%, -50%); opacity: 0; transition: opacity 0.6s;
}
#dp-fantasma.visible { opacity: 1; }

/* — retorno del ausente — */
#dp-retorno {
  position: fixed; inset: 0; z-index: 94; background: #000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
}
#dp-retorno.activo { animation: dp-retorno-anim 2.6s ease-out; }
@keyframes dp-retorno-anim { 0% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; } }
#dp-retorno span {
  font-family: 'Cormorant Garamond', serif; font-size: clamp(1.6rem, 5vw, 3rem);
  color: var(--oro-claro); text-shadow: 0 0 30px rgba(217, 197, 160, 0.8);
}

/* — la hora del otro lado (3:33) — */
body.dp-otrolado { filter: invert(1) hue-rotate(180deg); }
body.dp-otrolado img, body.dp-otrolado video, body.dp-otrolado iframe { filter: invert(1) hue-rotate(180deg); }

/* — aviso del director (toasts litúrgicos) — */
#dp-susurro {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px);
  z-index: 93; background: var(--panel); border: 1px solid var(--sangre);
  color: var(--tinta); font-style: italic; font-size: 0.95rem;
  padding: 0.7rem 1.4rem; opacity: 0; pointer-events: none;
  transition: opacity 0.8s, transform 0.8s;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.85);
  max-width: min(85vw, 480px); text-align: center;
}
#dp-susurro.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* — la mosca — */
#dp-mosca {
  position: fixed; width: 7px; height: 7px; z-index: 86; pointer-events: none;
  background: #15100c; border-radius: 50%; opacity: 0;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.9);
  transition: opacity 0.4s;
}
#dp-mosca.viva { opacity: 0.85; animation: dp-zumbido 0.12s linear infinite; }
@keyframes dp-zumbido { 0%,100% { margin-top: 0; } 50% { margin-top: 1.6px; } }

/* — la gota que resbala — */
.dp-gota {
  position: fixed; top: -24px; width: 3px; height: 16px; z-index: 86; pointer-events: none;
  background: linear-gradient(180deg, rgba(166, 141, 95, 0.2), var(--sangre-viva));
  border-radius: 0 0 4px 4px; filter: drop-shadow(0 0 2px rgba(217, 197, 160, 0.5));
  animation: dp-gotear 5s cubic-bezier(0.7, 0, 0.9, 1) forwards;
}
@keyframes dp-gotear {
  0% { transform: translateY(0) scaleY(1); }
  12% { transform: translateY(4vh) scaleY(2.4); }
  100% { transform: translateY(112vh) scaleY(1.4); opacity: 0.9; }
}

/* — la página respira — */
body.dp-respira .contenedor, body.dp-respira main { animation: dp-respirar 7s ease-in-out 2; }
@keyframes dp-respirar { 50% { transform: scale(1.006); } }

/* — el flash del otro lado — */
body.dp-flash { filter: invert(1) hue-rotate(180deg); }

/* — el neón de la cabecera falla — */
.titulo.dp-neon { animation: dp-neon-anim 1.5s steps(11); }
@keyframes dp-neon-anim {
  0%, 100% { opacity: 1; }
  8% { opacity: 0.35; } 14% { opacity: 1; } 23% { opacity: 0.2; }
  31% { opacity: 0.9; } 47% { opacity: 0.4; } 55% { opacity: 1; }
  71% { opacity: 0.6; } 80% { opacity: 1; }
}

/* — la polilla que ronda el cursor — */
#dp-polilla {
  position: fixed; width: 12px; height: 9px; z-index: 96; pointer-events: none; opacity: 0;
  transition: opacity 0.5s;
}
#dp-polilla.viva { opacity: 0.8; }
#dp-polilla::before, #dp-polilla::after {
  content: ""; position: absolute; top: 0; width: 6px; height: 9px;
  background: #4a4036; border-radius: 60% 60% 40% 40%;
  animation: dp-aleteo 0.09s linear infinite alternate;
}
#dp-polilla::before { left: 0; transform-origin: right center; }
#dp-polilla::after { right: 0; transform-origin: left center; animation-delay: 0.045s; }
@keyframes dp-aleteo { from { transform: scaleX(1); } to { transform: scaleX(0.35); } }

/* — modo cobarde: se apaga el teatro — */
body.cobarde::before, body.cobarde::after { display: none; }
body.cobarde .sigilo { animation: none; }
body.cobarde #dp-apagon, body.cobarde #dp-asoma, body.cobarde #dp-sombra,
body.cobarde #dp-estatica, body.cobarde #dp-fantasma, body.cobarde #dp-retorno,
body.cobarde #dp-mosca, body.cobarde #dp-polilla, body.cobarde .dp-gota { display: none !important; }

/* — accesibilidad — */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

@media (max-width: 640px) {
  main { padding: 1.2rem 0.85rem 2.5rem; }
  .contenedor { padding: 1.2rem 0.85rem 2.5rem; }
  header.cabecera { padding: 2rem 0.75rem 1rem; }
  .evangelio { padding: 1.1rem; gap: 1.2rem; }
  .letania-cuerpo { padding: 1rem 1.1rem 1.2rem; }
  .articulo-titulo { font-size: clamp(1.5rem, 6.5vw, 2.2rem); }
  .articulo-texto { font-size: 1.05rem; }
  .documento-filtrado {
    padding: 1.2rem 1rem; font-size: 0.78rem;
    margin: 1.4rem -0.25rem; transform: none;
  }
  .documento-filtrado::after { font-size: 0.45rem; top: 8px; right: 8px; }
  .widget { padding: 0.9rem; }
}
