/* ============================================================
   BIBLIOTECA HEXEDOR — Hoja de estilos compartida
   Estética: biblioteca antigua + pinceladas futuristas (cian)
   ============================================================ */

:root {
  --madera: #1a0e05;
  --madera-clara: #2a1a0a;
  --tinta: #3a2a1a;
  --tinta-osc: #2a1a0a;
  --oro: #d4a94a;
  --oro-claro: #f0d080;
  --oro-osc: #8b6914;
  --oro-borde: #a8842a;
  --oro-sombra: #5a3d10;
  --pergamino: #e9dab8;
  --pergamino-claro: #f4e9d2;
  --cian: #45e0ff;
  --cian-dim: rgba(69, 224, 255, 0.35);
  --cian-glow: rgba(69, 224, 255, 0.15);
}

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

body {
  min-height: 100vh;
  background: var(--madera);
  background-image: url('Fondos/dark_wood_bg1.png');
  background-size: cover;
  background-attachment: fixed;
  font-family: 'Cormorant Garamond', 'Cambria', serif;
  color: var(--tinta);
  overflow-x: hidden;
}

/* ===== MARCO ORNAMENTAL ===== */
.page-frame {
  max-width: none;
  width: 100%;
  min-height: 100vh;
  margin: 0;
  border: 3px solid var(--oro-osc);
  border-image: linear-gradient(135deg, var(--oro), var(--oro-osc), var(--oro), var(--oro-osc)) 1;
  box-shadow:
    0 0 20px rgba(0,0,0,0.8),
    inset 0 0 30px rgba(0,0,0,0.3),
    0 0 60px rgba(139,105,20,0.15);
  position: relative;
  background: var(--madera);
}

.page-frame::before, .page-frame::after,
.inner-corners::before, .inner-corners::after {
  content: '';
  position: absolute;
  width: 40px; height: 40px;
  border: 2px solid var(--oro-borde);
  z-index: 5;
  pointer-events: none;
}
.page-frame::before   { top: 6px; left: 6px;  border-right: none; border-bottom: none; }
.page-frame::after    { top: 6px; right: 6px; border-left: none;  border-bottom: none; }
.inner-corners::before { bottom: 6px; left: 6px;  border-right: none; border-top: none; }
.inner-corners::after  { bottom: 6px; right: 6px; border-left: none;  border-top: none; }

/* ===== CABECERA: HERO COMPACTO ===== */
.hero {
  position: relative;
  height: 230px;
  background: url('Fondos/222.jpg') center 22% / cover no-repeat;
  border-bottom: 2px solid var(--oro-osc);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding-bottom: 14px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(26,14,5,0.15) 0%, rgba(26,14,5,0.35) 55%, rgba(26,14,5,0.88) 100%);
}
.hero > * { position: relative; z-index: 1; }
/* placa del título, como en el grabado original */
.hero-title {
  font-family: 'Monotype Corsiva', 'Apple Chancery', 'URW Chancery L', 'Italianno', cursive;
  font-style: italic;
  font-size: 48px;
  font-weight: 400;
  color: var(--oro-claro);
  text-shadow: 0 2px 5px rgba(0,0,0,0.95), 0 0 28px rgba(212,169,74,0.45);
  text-align: center;
  line-height: 0.9;
  padding: 6px 40px 12px;
  background: linear-gradient(180deg, rgba(34,20,8,0.82), rgba(20,11,4,0.92));
  border: 1px solid var(--oro-borde);
  border-radius: 5px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.7), inset 0 0 22px rgba(212,169,74,0.12);
}
.hero-title::before, .hero-title::after {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  color: var(--oro);
  vertical-align: middle;
}
.hero-title::before { content: '❦ '; margin-right: 12px; }
.hero-title::after  { content: ' ❦'; margin-left: 12px; }
.hero-sub {
  font-family: 'MedievalSharp', cursive;
  font-size: 16px;
  color: var(--oro);
  text-shadow: 0 1px 4px rgba(0,0,0,0.9);
  letter-spacing: 1px;
}
.hero-ornamento {
  display: flex; align-items: center; gap: 12px;
  color: var(--oro); font-size: 13px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.9);
}
.hero-ornamento::before, .hero-ornamento::after {
  content: ''; width: 70px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--oro), transparent);
}
.hero--compacto { height: 150px; padding-bottom: 10px; }
.hero--compacto .hero-title { font-size: 34px; padding: 2px 26px 8px; }
@media (max-width: 700px) {
  .hero { height: 170px; }
  .hero-title { font-size: 32px; padding: 4px 22px 8px; }
}

/* ============================================================
   EL ORÁCULO — buscador (la pincelada futurista)
   ============================================================ */
.oraculo-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  background: linear-gradient(90deg, #0a1418, #0d1a20 50%, #0a1418);
  border-top: 1px solid var(--oro-sombra);
  border-bottom: 2px solid var(--oro-osc);
  position: relative;
}
/* scanline sutil */
.oraculo-bar::after {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0 2px, rgba(69,224,255,0.025) 2px 4px);
  pointer-events: none;
}
.oraculo-label {
  font-family: 'Cinzel Decorative', serif;
  font-size: 16px;
  color: var(--oro);
  white-space: nowrap;
  text-shadow: 0 0 10px rgba(212,169,74,0.4);
}
.oraculo-input {
  flex: 1;
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--cian-dim);
  border-radius: 3px;
  padding: 9px 14px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 17px;
  color: var(--cian);
  caret-color: var(--cian);
  outline: none;
  transition: box-shadow .3s, border-color .3s;
}
.oraculo-input::placeholder { color: rgba(69,224,255,0.45); }
.oraculo-input:focus {
  border-color: var(--cian);
  box-shadow: 0 0 12px var(--cian-glow), inset 0 0 8px rgba(69,224,255,0.08);
}
.oraculo-btn {
  background: transparent;
  border: 1px solid var(--cian-dim);
  border-radius: 3px;
  color: var(--cian);
  font-family: 'Consolas', monospace;
  font-size: 14px;
  padding: 9px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: all .3s;
  position: relative;
  z-index: 1;
}
.oraculo-btn:hover {
  background: var(--cian-glow);
  box-shadow: 0 0 14px var(--cian-glow);
  text-shadow: 0 0 8px var(--cian);
}

/* resultados del oráculo */
.oraculo-results {
  display: none;
  position: absolute;
  top: 100%; left: 0; right: 0;
  max-height: 340px;
  overflow-y: auto;
  background: rgba(8, 16, 20, 0.97);
  border: 1px solid var(--cian-dim);
  border-top: none;
  z-index: 50;
  backdrop-filter: blur(4px);
}
.oraculo-results.visible { display: block; }
.oraculo-results a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 18px;
  text-decoration: none;
  font-family: 'Consolas', monospace;
  font-size: 16px;
  color: var(--pergamino);
  border-bottom: 1px solid rgba(69,224,255,0.08);
  transition: background .2s;
}
.oraculo-results a:hover { background: var(--cian-glow); }
.oraculo-results .res-tipo {
  color: var(--cian);
  font-size: 13px;
  min-width: 44px;
}
.oraculo-results .res-cat {
  margin-left: auto;
  color: var(--oro);
  font-size: 13px;
  font-style: italic;
  white-space: nowrap;
}
.oraculo-results .sin-resultados {
  padding: 12px 18px;
  color: rgba(69,224,255,0.6);
  font-family: 'Consolas', monospace;
  font-size: 13px;
}

/* ===== BARRA LATERAL ===== */
.sidebar {
  background: linear-gradient(180deg, rgba(74, 51, 25, 0.92), rgba(56, 38, 18, 0.92));
  padding: 20px 15px;
  border-top: 2px solid var(--oro-osc);
}
.sidebar-left  { border-right: 2px solid var(--oro-sombra); }
.sidebar-right { border-left: 2px solid var(--oro-sombra); }

.sidebar ul { list-style: none; padding: 0; }
.sidebar li {
  position: relative;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 34px; padding: 7px 30px;
  margin-bottom: 9px; border-radius: 3px;
  background: linear-gradient(180deg, #6b4d26 0%, #533a1c 50%, #5f4321 100%);
  border: 1px solid rgba(212, 169, 74, 0.35);
  box-shadow: 0 2px 6px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,220,150,0.14);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.sidebar li::before { display: none !important; }
.sidebar li::after {
  content: ''; position: absolute; inset: 0;
  background: url('sala-btn.svg') center / 100% 100% no-repeat;
  pointer-events: none; z-index: 1;
}

.icon-home::before    { content: '🏠'; left: 0; font-size: 15px; }
.icon-book::before    { content: '📖'; left: 0; font-size: 15px; }
.icon-chat::before    { content: '💬'; left: 0; font-size: 15px; }
.icon-think::before   { content: '🧠'; left: 0; font-size: 15px; }
.icon-psi::before     { content: 'Ψ'; left: 2px; font-size: 17px; color: var(--oro); font-weight: bold; }
.icon-star::before    { content: '⭐'; left: 0; font-size: 15px; }
.icon-money::before   { content: '💰'; left: 0; font-size: 15px; }
.icon-people::before  { content: '👥'; left: 0; font-size: 15px; }
.icon-video::before   { content: '🎬'; left: 0; font-size: 15px; }
.icon-lock::before    { content: '🔒'; left: 0; font-size: 15px; }
.icon-scroll::before  { content: '📜'; left: 0; font-size: 15px; }
.icon-strange::before { content: '👁'; left: 0; font-size: 15px; }
.icon-chip::before    { content: '💾'; left: 0; font-size: 15px; }
.icon-cat::before     { content: '🗝'; left: 0; font-size: 15px; }
.icon-dado::before    { content: '✦'; left: 2px; font-size: 16px; color: var(--cian); }

.sidebar a, .sidebar span.no-link {
  position: relative; z-index: 2;
  display: block; width: 100%; text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1.5px; line-height: 1.14;
  color: var(--oro-claro);
  text-decoration: none; cursor: pointer;
  text-shadow: 0 1px 2px rgba(0,0,0,0.7);
  transition: color 0.25s ease, text-shadow 0.25s ease;
}
.sidebar li:hover:not(.sealed), .sidebar li.active {
  background: linear-gradient(180deg, #7e1818 0%, #4a0d0d 55%, #280707 100%);
  box-shadow: 0 2px 10px rgba(120,20,20,0.5), inset 0 1px 0 rgba(255,120,90,0.18), 0 0 14px rgba(150,30,30,0.35);
}
.sidebar li:hover:not(.sealed) a, .sidebar li.active a {
  color: #ffe6b0;
  text-shadow: 0 0 10px rgba(255,140,90,0.6), 0 1px 2px #000;
}
.sidebar li.sealed { opacity: 0.85; cursor: default; }
.sidebar li.sealed .no-link { color: var(--oro-borde); font-style: italic; cursor: default; }
.sidebar .sellado {
  display: block; width: 100%; text-align: center;
  font-size: 11px; color: #d8b665; letter-spacing: 1px;
  text-transform: uppercase; font-style: italic; margin-top: 1px;
}

.sidebar-decoration { margin-top: 20px; text-align: center; }
.sidebar-decoration img {
  max-width: 100%; height: auto; border-radius: 6px;
  opacity: 0.85; border: 1px solid var(--oro-sombra);
}
/* el teseracto: artefacto holográfico */
.holo {
  border: 1px solid var(--cian-dim) !important;
  box-shadow: 0 0 18px var(--cian-glow);
}

.sidebar-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 15px;
  color: var(--oro);
  text-align: center;
  margin-bottom: 14px;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--oro-borde);
  padding-bottom: 8px;
}

/* ===== CONTENIDO CENTRAL ===== */
.content {
  background-image: url('Fondos/10q.jpg');
  background-size: cover;
  background-position: center;
  padding: 30px 35px;
  border-top: 2px solid var(--oro-osc);
  position: relative;
}
.content::before {
  content: ''; position: absolute; inset: 0;
  background: rgba(225, 215, 190, 0.4);
  pointer-events: none;
}
.content > * { position: relative; z-index: 1; }

/* letra capitular */
.capitular::first-letter {
  font-family: 'Cinzel Decorative', serif;
  font-size: 3.2em;
  float: left;
  line-height: 0.8;
  margin: 4px 8px 0 0;
  color: var(--oro-osc);
}

/* separador ornamental */
.ornamento {
  display: flex; align-items: center; justify-content: center;
  gap: 15px; margin: 18px 0; color: var(--oro-osc); font-size: 16px;
}
.ornamento::before, .ornamento::after {
  content: ''; width: 90px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--oro-osc), transparent);
}

/* ===== SECCIONES (cita, artículo, enlaces) ===== */
.quote-section {
  text-align: center; padding: 25px 30px; margin-bottom: 25px;
  border-bottom: 1px solid var(--oro-borde); position: relative;
}
.quote-marks { font-family: 'Cinzel Decorative', serif; font-size: 48px; color: var(--oro-osc); line-height: 1; }
.quote-text {
  font-family: 'Cormorant Garamond', serif; font-size: 18px;
  font-style: italic; font-weight: 600; color: var(--tinta);
  margin: 10px 0; line-height: 1.5;
}
.quote-autor { font-size: 14px; color: var(--oro-osc); font-style: italic; }
.quote-divider {
  display: flex; align-items: center; justify-content: center;
  gap: 15px; margin-top: 15px; color: var(--oro-osc); font-size: 14px;
}
.quote-divider::before, .quote-divider::after {
  content: ''; width: 60px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--oro-osc), transparent);
}

.article-section, .links-section, .quotes-list-section {
  margin-bottom: 25px; padding-bottom: 20px;
  border-bottom: 1px solid #c4b08a;
}
.article-section h2, .links-section h2, .quotes-list-section h2 {
  font-family: 'Cormorant Garamond', serif; font-size: 25px;
  font-weight: 700; color: var(--tinta-osc); margin-bottom: 12px;
}
.article-section h2::before { content: '❖ '; color: var(--oro-osc); }

.article-section .article-link {
  font-size: 15px; color: #6b5530; word-break: break-all;
  display: block; margin-bottom: 12px;
}
.article-section .article-link a { color: #6b5530; text-decoration: none; transition: color 0.3s; }
.article-section .article-link a:hover { color: var(--oro-osc); text-decoration: underline; }
.article-section ul { list-style: none; padding: 0; }
.article-section li {
  padding: 8px 0 8px 25px; position: relative; font-size: 19px;
  font-style: italic; font-weight: 600; line-height: 1.5; color: var(--tinta);
}
.article-section li::before {
  content: '◆'; position: absolute; left: 5px;
  color: var(--oro-osc); font-size: 10px; top: 11px;
}

/* tarjetas con borde holográfico al pasar el mouse */
.link-card {
  background: rgba(139,105,20,0.08);
  border: 1px solid rgba(139,105,20,0.2);
  border-radius: 6px; padding: 12px 15px; margin-bottom: 10px;
  transition: all 0.3s ease;
}
.link-card:hover {
  background: rgba(139,105,20,0.15);
  border-color: var(--cian-dim);
  box-shadow: 0 0 14px var(--cian-glow);
}
.link-card a { color: #6b4510; font-weight: 700; text-decoration: none; font-size: 18px; }
.link-card a:hover { color: var(--oro-osc); text-decoration: underline; }
.link-card p { font-size: 16px; margin-top: 5px; color: #5a4530; line-height: 1.4; }

.quotes-list-section .section-gif {
  float: right; margin: 0 0 10px 15px; border-radius: 6px;
  border: 2px solid var(--oro-osc); box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  max-width: 250px;
}
.quotes-list-section blockquote {
  font-style: italic; font-size: 19px; color: var(--tinta);
  padding: 6px 0 6px 20px; border-left: 3px solid var(--oro-osc);
  margin-bottom: 10px; font-weight: 600;
}
.quotes-list-section ol { padding-left: 25px; }
.quotes-list-section ol li, .quotes-list-section ul li {
  font-size: 18px; padding: 6px 0; line-height: 1.5;
  font-weight: 600; color: var(--tinta);
}
.quotes-list-section ul { list-style: none; padding-left: 5px; }

/* ===== PIE: CONSOLA DEL ARCHIVO ===== */
.footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 15px 20px;
  background: rgba(15, 8, 2, 0.9);
  border-top: 2px solid var(--oro-osc);
}
.footer-decoration {
  width: 160px; height: auto; border-radius: 6px;
  border: 1px solid var(--oro-sombra); opacity: 0.85;
}
.footer-center { text-align: center; color: var(--oro-osc); font-family: 'MedievalSharp', cursive; font-size: 16px; }
.footer-consola {
  margin-top: 6px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 13px;
  color: var(--cian);
  opacity: 0.8;
  letter-spacing: 0.5px;
}
.footer-consola .cursor {
  display: inline-block; width: 7px; height: 12px;
  background: var(--cian); vertical-align: text-bottom;
  animation: parpadeo 1.1s steps(1) infinite;
}
@keyframes parpadeo { 50% { opacity: 0; } }

/* ===== MIGAS DE PAN ===== */
.migas {
  font-family: 'Consolas', monospace; font-size: 15px;
  padding: 8px 18px;
  background: rgba(10, 20, 24, 0.92);
  border-bottom: 1px solid var(--oro-sombra);
  color: var(--oro);
}
.migas a { color: var(--cian); text-decoration: none; }
.migas a:hover { text-shadow: 0 0 8px var(--cian-dim); }

/* ===== BARRA DE DESPLAZAMIENTO ===== */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--madera); }
::-webkit-scrollbar-thumb { background: var(--oro-sombra); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--oro-osc); }

/* ===== ANIMACIONES ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(15px); }
  to   { opacity: 1; transform: translateY(0); }
}
.content > section { animation: fadeInUp 0.6s ease-out both; }
.content > section:nth-child(2) { animation-delay: 0.15s; }
.content > section:nth-child(3) { animation-delay: 0.3s; }
.content > section:nth-child(4) { animation-delay: 0.45s; }
.content > section:nth-child(5) { animation-delay: 0.6s; }

.clearfix::after { content: ''; display: table; clear: both; }

/* ===== NÚCLEO VITAL (HUD personal del guardián) ===== */
.nucleo-vital {
  background:
    radial-gradient(ellipse at 50% -10%, rgba(150,108,40,0.22), transparent 62%),
    linear-gradient(180deg, #3c2a17, #2f2011 55%, #3c2a17);
  border-bottom: 2px solid var(--oro-osc);
  padding: 8px 14px 16px;
  position: relative;
}
.nucleo-vital::after {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0 2px, rgba(212,169,74,0.025) 2px 4px);
  pointer-events: none;
}
.nv-titulo {
  font-family: 'Cinzel Decorative', serif;
  font-size: 11px;
  color: var(--oro);
  text-align: center;
  letter-spacing: 1.5px;
  margin-bottom: 7px;
  text-shadow: 0 0 10px rgba(212,169,74,0.4);
}
.nv-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}
.nv-card {
  background:
    radial-gradient(ellipse 95% 80% at 50% 10%, #3f6d70 0%, #244c52 45%, transparent 78%),
    linear-gradient(180deg, #315a5f 0%, #193740 55%, #0d1d24 100%);
  border-radius: 6px;
  padding: 6px 6px 5px;
  text-align: center;
  position: relative;
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
}
.nv-card::after {
  content: '';
  position: absolute; inset: 0;
  background: url('nv-frame.svg') center / 100% 100% no-repeat;
  pointer-events: none;
  z-index: 2;
}
.nv-num, .nv-lbl { position: relative; z-index: 3; }
.nv-num {
  font-family: 'Consolas', 'Courier New', monospace;
  font-weight: 700;
  font-size: clamp(0.72rem, 1.1vw, 0.95rem);
  color: var(--oro-claro);
  text-shadow: 0 0 12px rgba(212,169,74,0.5), 0 1px 2px rgba(0,0,0,0.7);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.nv-card.oro .nv-num { color: #ffd23f; text-shadow: 0 0 14px rgba(255,210,63,0.6), 0 1px 2px #000; }
.nv-card.cian .nv-num { color: var(--cian); text-shadow: 0 0 12px var(--cian-dim), 0 1px 2px #000; }
.nv-lbl {
  font-family: 'Consolas', monospace;
  font-size: 0.52rem;
  color: #d8c48f;
  letter-spacing: 0.12em;
  margin-top: 2px;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}
.nv-meta {
  display: flex;
  align-items: stretch;
  justify-content: center;
  margin-top: 6px;
  background:
    radial-gradient(ellipse 95% 80% at 50% 10%, #3f6d70 0%, #244c52 45%, transparent 78%),
    linear-gradient(180deg, #315a5f 0%, #193740 55%, #0d1d24 100%);
  border: 1px solid var(--oro-borde);
  border-radius: 6px;
  padding: 5px 4px;
  box-shadow:
    0 3px 9px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 224, 150, 0.12);
}
.nv-mstat {
  flex: 1;
  text-align: center;
  padding: 1px 8px;
}
.nv-mval {
  font-family: 'Consolas', monospace;
  font-weight: 700;
  font-size: clamp(0.72rem, 1.1vw, 0.9rem);
  color: #ffd23f;
  text-shadow: 0 0 12px rgba(255,210,63,0.4);
  font-variant-numeric: tabular-nums;
  display: block;
  line-height: 1.2;
}
.nv-mlbl {
  font-family: 'Consolas', monospace;
  font-size: 0.52rem;
  color: #d8c48f;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nv-msep {
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(212,169,74,0.4), transparent);
}
/* trayecto a 2076 */
.nv-progress { margin-top: 8px; }
.nv-ptop {
  display: flex; justify-content: space-between;
  font-family: 'Consolas', monospace;
  font-size: 0.6rem;
  color: #a58c60;
  letter-spacing: 0.1em;
}
.nv-ptop .nv-pct { color: var(--cian); }
.nv-ptrack { position: relative; margin-top: 15px; }
.nv-pbar {
  height: 6px;
  background: #0c0602;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--oro-borde);
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.85);
}
.nv-pfill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--oro), var(--cian));
  box-shadow: 0 0 14px var(--cian-dim);
  transition: width 0.9s linear;
}
.nv-milestones { position: absolute; inset: 0; pointer-events: none; }
.nv-ms {
  position: absolute; top: -6px;
  transform: translateX(-50%);
  pointer-events: auto; cursor: pointer; z-index: 6;
}
.nv-ms .nv-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #120a04;
  border: 2px solid var(--oro);
  box-shadow: 0 0 9px var(--oro);
  transition: 0.2s;
}
.nv-ms:hover .nv-dot { transform: scale(1.35); box-shadow: 0 0 15px var(--oro); }
.nv-ms .nv-tip {
  position: absolute; bottom: 22px; left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: rgba(26, 14, 5, 0.97);
  border: 1px solid var(--oro);
  border-radius: 8px;
  padding: 8px 12px;
  width: max-content; max-width: 210px;
  opacity: 0; visibility: hidden;
  transition: 0.22s;
  box-shadow: 0 8px 28px rgba(0,0,0,0.6);
  z-index: 10;
}
.nv-ms:hover .nv-tip, .nv-ms.open .nv-tip {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.nv-ms .nv-ev { font-family: 'Cormorant Garamond', serif; font-weight: 700; color: #fff; font-size: 0.92rem; line-height: 1.2; }
.nv-ms .nv-dt { font-family: 'Consolas', monospace; font-size: 0.62rem; color: var(--oro); letter-spacing: 0.08em; margin-top: 3px; }
.nv-ms .nv-ag { font-family: 'Consolas', monospace; font-size: 0.6rem; color: #8a7350; margin-top: 2px; }
.nv-ms .nv-tip::after {
  content: '';
  position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--oro);
}
.nv-decada { position: absolute; top: 0; transform: translateX(-50%); pointer-events: none; z-index: 4; }
.nv-decada .nv-dline {
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  width: 1px; height: 9px;
  background: rgba(212,169,74,0.45);
}
.nv-decada .nv-dlbl {
  position: absolute; top: 12px; left: 50%;
  transform: translateX(-50%);
  font-family: 'Consolas', monospace;
  font-size: 0.68rem;
  color: #8a7350;
  white-space: nowrap;
}
@media (max-width: 1000px) { .nv-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 600px) {
  .nv-grid { grid-template-columns: repeat(2, 1fr); }
  .nv-meta { flex-direction: column; gap: 8px; }
  .nv-msep { width: 60%; height: 1px; align-self: center;
    background: linear-gradient(90deg, transparent, var(--cian-dim), transparent); }
}

/* ===== BIENVENIDA ===== */
.bienvenida {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid #c4b08a;
}
.bienvenida p {
  font-size: 21px;
  line-height: 1.65;
  color: var(--tinta);
  text-align: justify;
}

/* cita compacta (una sola línea, sin protagonismo) */
.cita-compacta {
  text-align: center;
  font-style: italic;
  font-weight: 600;
  font-size: 20px;
  color: var(--tinta);
  margin-bottom: 22px;
  padding: 10px 20px;
}
.cita-compacta .autor { font-style: normal; font-size: 16px; color: var(--oro-osc); }
.cita-compacta::before { content: '❝ '; color: var(--oro-osc); font-size: 20px; }
.cita-compacta::after  { content: ' ❞'; color: var(--oro-osc); font-size: 20px; }

/* ===== DOS COLUMNAS ===== */
.dos-columnas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-bottom: 22px;
}
.dos-columnas .article-section,
.dos-columnas .links-section { margin-bottom: 0; border-bottom: none; padding-bottom: 0; }
@media (max-width: 900px) {
  .dos-columnas { grid-template-columns: 1fr; gap: 18px; }
}

/* ===== PERGAMINOS PLEGABLES ===== */
details.pergamino {
  margin-bottom: 14px;
  border: 1px solid rgba(139,105,20,0.35);
  border-radius: 6px;
  background: rgba(139,105,20,0.06);
  transition: background .3s;
}
details.pergamino[open] { background: rgba(139,105,20,0.10); }
details.pergamino summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 16px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--tinta-osc);
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}
details.pergamino summary::-webkit-details-marker { display: none; }
details.pergamino summary::before {
  content: '📜';
  font-size: 15px;
  transition: transform .3s;
}
details.pergamino[open] summary::before { content: '📖'; }
details.pergamino summary::after {
  content: 'desplegar ⌄';
  margin-left: auto;
  font-family: 'Consolas', monospace;
  font-size: 10px;
  color: var(--oro-osc);
  border: 1px solid rgba(139,105,20,0.3);
  border-radius: 3px;
  padding: 2px 8px;
  transition: all .3s;
}
details.pergamino[open] summary::after { content: 'plegar ⌃'; color: var(--cian); border-color: var(--cian-dim); background: rgba(10,20,24,0.8); }
details.pergamino summary:hover::after { border-color: var(--cian-dim); box-shadow: 0 0 8px var(--cian-glow); }
details.pergamino .pergamino-cuerpo { padding: 0 18px 16px; }

/* ===== DISEÑO RESPONSIVE ===== */
.main-layout {
  display: grid;
  grid-template-columns: 200px 1fr 200px;
  min-height: 600px;
}
@media (max-width: 900px) {
  .main-layout { grid-template-columns: 1fr; }
  .sidebar-right { display: none; }
  .sidebar-left { border-right: none; border-bottom: 2px solid var(--oro-sombra); }
  .oraculo-bar { flex-wrap: wrap; }
  .oraculo-label { font-size: 11px; }
  .footer-decoration { display: none; }
}

/* ===== SALA DE INTELIGENCIA ARTIFICIAL (index) ===== */
.sala-ia .pergamino-cuerpo ul { list-style: none; padding: 6px 0 0; margin: 0; }
.sala-ia .pergamino-cuerpo li { padding: 6px 0 6px 24px; position: relative; line-height: 1.45; font-style: normal; font-weight: 400; }
.sala-ia .pergamino-cuerpo li::before { content: '✦'; position: absolute; left: 4px; top: 9px; color: var(--oro-osc); font-size: 11px; }
.sala-ia .pergamino-cuerpo a { font-family: 'Cormorant Garamond', serif; font-size: 19px; font-weight: 600; color: #6b4510; text-decoration: none; transition: color .25s; }
.sala-ia .pergamino-cuerpo a:hover { color: var(--oro-osc); text-decoration: underline; }
.sala-ia .ia-tipo { font-family: 'Consolas', monospace; font-size: 12px; color: var(--cian); background: rgba(10,20,24,0.85); border: 1px solid var(--cian-dim); border-radius: 3px; padding: 1px 7px; margin-left: 8px; white-space: nowrap; }
.icon-agenda::before  { content: '📅'; left: 0; font-size: 15px; }
.icon-fabrica::before { content: '⚙'; left: 2px; font-size: 16px; color: var(--oro); }

/* ===== MARQUESINA DE FRASES DEL ARCHIVO (extremo superior) ===== */
.marquesina {
  overflow: hidden;
  background: linear-gradient(90deg, #140b04, #2a1808 50%, #140b04);
  border-bottom: 1px solid var(--oro-osc);
  padding: 5px 0;
  position: relative;
}
.marquesina::after {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0 2px, rgba(212,169,74,0.03) 2px 4px);
  pointer-events: none;
}
.marquesina-texto {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%;
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px;
  font-style: italic;
  font-weight: 600;
  color: var(--oro-claro);
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
  animation: marquesina-deslizar 24s linear infinite;
  will-change: transform;
}
.marquesina-texto .autor-frase { font-style: normal; color: var(--oro); font-size: 14px; }
@keyframes marquesina-deslizar { to { transform: translateX(-100%); } }
@media (max-width: 700px) {
  .marquesina-texto { font-size: 14px; animation-duration: 15s; }
}
