/* Ajustes puntuales de interfaz, recursos externos y componentes editoriales */
.external-resource-card{
  margin:26px 0 34px;
  padding:20px 22px;
  border:1px solid var(--line);
  border-radius:16px;
  background:var(--card);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
.external-resource-card__source{
  margin-bottom:6px;
  color:var(--orange);
  font-size:11px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.external-resource-card__title{
  margin-bottom:8px;
  color:var(--ink);
  font-family:Georgia,"Times New Roman",serif;
  font-size:22px;
  line-height:1.2;
}
.external-resource-card p{
  margin:0 0 14px;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size:14px;
  line-height:1.55;
  color:var(--muted);
}
.external-resource-card a{
  display:inline-flex;
  align-items:center;
  font-size:14px;
  font-weight:750;
  color:var(--blue);
  text-decoration:none;
}
.external-resource-card a:hover{text-decoration:underline}

.ha-gallery{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
  margin:30px 0 34px;
}
.ha-gallery .ha-caption{
  margin:0;
}
.ha-gallery .ha-caption:last-child:nth-child(odd){
  grid-column:1 / -1;
  max-width:760px;
  justify-self:center;
}
.ha-gallery img{
  width:100%;
  height:auto;
  display:block;
}

/* Nombres de fuentes: mismo tratamiento en cursiva y color uniforme. */
.source-note a{
  font-style:italic;
  color:var(--blue) !important;
}
.source-note a span{
  color:inherit !important;
}

/* Las dedicatorias se mantienen discretas y se distinguen de las frases de apertura. */
.dedication{
  margin:0 0 22px;
  padding:2px 0 2px 14px;
  border-left:2px solid var(--violet);
  border-radius:0;
  background:transparent;
  font-family:Georgia,"Times New Roman",serif;
  font-size:16px;
  line-height:1.5;
  font-style:italic;
  color:var(--muted);
}
html[data-theme="dark"] .dedication{
  background:transparent;
}

/* Encabezado con la marca centrada y navegación equilibrada a ambos lados. */
.header-inner--centered{
  position:relative;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:24px;
}
.header-nav{
  display:flex;
  align-items:center;
  gap:24px;
  font-size:14px;
  font-weight:650;
  color:var(--ink);
}
.header-nav a:hover{color:var(--orange)}
.header-nav--left{justify-self:start}
.brand--centered{justify-self:center}
.brand--centered .brand-logo{
  transition:filter .18s ease;
  will-change:filter,opacity;
}
@media (hover:hover) and (pointer:fine){
  .brand--centered:hover .brand-logo{
    filter:brightness(1.11) saturate(.96);
  }
}
.brand--centered:focus-visible .brand-logo{
  filter:brightness(1.11) saturate(.96);
}
.header-actions--right{
  justify-self:end;
  width:auto;
  display:flex;
  align-items:center;
  gap:16px;
}
.header-date{
  color:var(--muted);
  font-size:10.5px;
  line-height:1.25;
  font-weight:600;
  white-space:nowrap;
}
@media(max-width:1180px) and (min-width:851px){
  .header-date{
    max-width:190px;
    white-space:normal;
    text-align:right;
    font-size:10px;
  }
}
.header-nav--right{justify-content:flex-end}

/* Temas y Archivo usan exactamente el mismo tratamiento del rótulo “Sobre el proyecto”. */
.section-head--page{
  margin-bottom:26px;
}
.section-kicker-title{
  margin:0;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size:12px;
  line-height:1.6;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--orange);
}

@media(max-width:850px){
  .header-inner--centered{
    grid-template-columns:1fr auto 1fr;
    gap:12px;
    padding:14px 0;
    align-items:center;
  }
  .header-nav{gap:12px;font-size:13px}
  .header-actions--right{gap:10px}
  .header-date{position:absolute;left:0;right:0;bottom:8px;max-width:none;text-align:center;font-size:10.5px;white-space:nowrap}
  .header-inner--centered{padding-bottom:48px}
  .theme-toggle{width:38px;height:38px;font-size:16px}
  .brand--centered .brand-logo{width:94px;max-height:56px}
}

@media(max-width:600px){
  .section-head{
    flex-direction:column;
    align-items:flex-start;
    gap:6px;
  }
  .section-head h2{
    font-size:clamp(25px,7.5vw,30px);
    line-height:1.06;
    white-space:nowrap;
  }
  .section-head a{font-size:13px}
  .external-resource-card{padding:18px 16px}
  .external-resource-card__title{font-size:20px}
  .ha-gallery{grid-template-columns:1fr;gap:20px}
  .ha-gallery .ha-caption:last-child:nth-child(odd){grid-column:auto;max-width:none}
  .header-nav{gap:9px;font-size:12px}
  .header-inner--centered{gap:8px}
  .header-actions--right{gap:7px}
  .header-date{font-size:10px;white-space:normal;line-height:1.3}
  .header-inner--centered{padding-bottom:52px}
  .theme-toggle{width:34px;height:34px;font-size:15px}
  .brand--centered .brand-logo{width:82px;max-height:50px}
}

/* Frases de apertura: borde glare con la paleta de Horizonte Aparente.
   Incluye el componente editorial nuevo y los blockquotes Markdown históricos
   cuando son el primer elemento real del cuerpo del artículo. */
.opening-quote,
.article-content > blockquote:first-child{
  position:relative;
  z-index:0;
  display:inline-block;
  isolation:isolate;
  width:fit-content;
  max-width:100%;
  margin:4px 0 34px;
  padding:20px 24px;
  border:1px solid transparent;
  border-radius:18px;
  background:
    linear-gradient(var(--paper),var(--paper)) padding-box,
    conic-gradient(from 225deg,
      var(--blue) 0deg,
      var(--blue) 70deg,
      var(--violet) 150deg,
      var(--orange) 245deg,
      var(--blue) 360deg) border-box;
  box-shadow:
    0 0 15px rgba(47,110,207,.18),
    0 0 24px rgba(103,70,202,.10),
    0 0 18px rgba(245,130,20,.08);
}
.opening-quote::before,
.article-content > blockquote:first-child::before{
  content:"";
  position:absolute;
  z-index:-1;
  inset:-5px;
  border-radius:22px;
  background:conic-gradient(from 225deg,
    var(--blue) 0deg,
    var(--blue) 70deg,
    var(--violet) 150deg,
    var(--orange) 245deg,
    var(--blue) 360deg);
  filter:blur(10px);
  opacity:.24;
  pointer-events:none;
}
html[data-theme="dark"] .opening-quote,
html[data-theme="dark"] .article-content > blockquote:first-child{
  background:
    linear-gradient(var(--paper),var(--paper)) padding-box,
    conic-gradient(from 225deg,
      var(--blue) 0deg,
      var(--blue) 70deg,
      var(--violet) 150deg,
      var(--orange) 245deg,
      var(--blue) 360deg) border-box;
  box-shadow:
    0 0 17px rgba(110,168,255,.22),
    0 0 26px rgba(154,124,255,.13),
    0 0 18px rgba(255,154,60,.10);
}
html[data-theme="dark"] .opening-quote::before,
html[data-theme="dark"] .article-content > blockquote:first-child::before{
  opacity:.32;
}
@media(max-width:850px){
  .opening-quote,
  .article-content > blockquote:first-child{
    padding:18px 20px;
  }
}

/* Tablas en móvil: deben ajustarse al ancho disponible, no exigir desplazamiento horizontal. */
@media(max-width:850px){
  .article-content table,
  .article-content .data-table,
  .ha-paged-table table{
    display:table;
    width:100%;
    min-width:0;
    max-width:100%;
    table-layout:fixed;
    white-space:normal;
    font-size:11px;
    line-height:1.3;
  }
  .article-content table th,
  .article-content table td,
  .article-content .data-table th,
  .article-content .data-table td,
  .ha-paged-table table th,
  .ha-paged-table table td{
    padding:7px 5px;
    white-space:normal;
    overflow-wrap:anywhere;
    word-break:normal;
    hyphens:auto;
  }
  .data-table-wrap{
    overflow-x:visible;
    width:100%;
    max-width:100%;
  }
  .ha-paged-table{
    width:100%;
    max-width:100%;
    overflow:visible;
  }
}

@media(max-width:480px){
  .article-content table,
  .article-content .data-table,
  .ha-paged-table table{
    font-size:10px;
  }
  .article-content table th,
  .article-content table td,
  .article-content .data-table th,
  .article-content .data-table td,
  .ha-paged-table table th,
  .ha-paged-table table td{
    padding:6px 4px;
  }
}


/* Navegación aprobada 2026-10-03: estado activo, hamburguesa móvil y logo ligeramente mayor. */
.header-nav a[aria-current="page"]{color:var(--orange)}
.header-nav-slot{justify-self:start;display:flex;align-items:center}
.header-menu-button{display:none;width:38px;height:38px;padding:8px;border:0;background:transparent;color:var(--ink);cursor:pointer}
.header-menu-button span{display:block;width:21px;height:1.5px;margin:5px auto;background:currentColor;border-radius:2px;transition:transform .18s ease,opacity .18s ease}
.header-menu-button[aria-expanded="true"] span:nth-child(1){transform:translateY(6.5px) rotate(45deg)}
.header-menu-button[aria-expanded="true"] span:nth-child(2){opacity:0}
.header-menu-button[aria-expanded="true"] span:nth-child(3){transform:translateY(-6.5px) rotate(-45deg)}
.header-nav--mobile{display:none;border-top:1px solid var(--line);background:var(--paper)}
.header-nav--mobile .wrap{display:flex;flex-direction:column;padding-top:6px;padding-bottom:12px}
.header-nav--mobile a{padding:12px 0;border-bottom:1px solid var(--line);font-size:14px}
.header-nav--mobile a:last-child{border-bottom:0}
.brand--centered .brand-logo{width:124px;max-height:72px}
@media(max-width:850px){
  .header-nav--desktop{display:none}
  .header-menu-button{display:block}
  .header-nav--mobile:not([hidden]){display:block}
  .brand--centered .brand-logo{width:100px;max-height:60px}
}
@media(max-width:600px){
  .brand--centered .brand-logo{width:88px;max-height:52px}
}
html[data-theme="dark"] .header-nav--mobile{background:var(--paper)}


/* Inicio iconográfico y listas a dos columnas — 2026-10-06 */
.nav-home{
  flex:0 0 34px;
  width:34px;
  height:34px;
  margin-right:-8px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:var(--muted);
  background:transparent;
  box-shadow:inset 0 0 0 1px var(--line);
  transition:background .18s ease,color .18s ease,box-shadow .18s ease,transform .12s ease;
}
.nav-home svg{
  width:17px;
  height:17px;
  display:block;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.nav-home:hover{
  color:var(--orange);
  transform:translateY(-1px);
  box-shadow:inset 0 0 0 1px rgba(245,130,20,.38);
}
.nav-home:focus-visible{
  outline:2px solid var(--blue);
  outline-offset:2px;
}
.header-nav .nav-home[aria-current="page"]{
  color:var(--orange);
  background:rgba(245,130,20,.11);
  box-shadow:inset 0 0 0 1px rgba(245,130,20,.18);
}
html[data-theme="dark"] .nav-home{
  color:#8f9aaf;
  box-shadow:inset 0 0 0 1px #35405a;
}
html[data-theme="dark"] .nav-home:hover{
  color:#ff9a3c;
  box-shadow:inset 0 0 0 1px rgba(255,154,60,.32);
}
html[data-theme="dark"] .header-nav .nav-home[aria-current="page"]{
  color:#ff9a3c;
  background:rgba(255,154,60,.10);
  box-shadow:inset 0 0 0 1px rgba(255,154,60,.14);
}

.article-results-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  column-gap:38px;
  row-gap:0;
}
.article-results-grid .archive-row{
  grid-template-columns:72px minmax(0,1fr);
  gap:14px;
  min-width:0;
}
.article-results-grid .archive-row > div:last-child{min-width:0}
.article-results-grid .archive-row h3{overflow-wrap:anywhere}

@media(max-width:900px){
  .article-results-grid{grid-template-columns:1fr}
  .article-results-grid .archive-row{
    grid-template-columns:95px minmax(0,1fr);
    gap:20px;
  }
}
@media(max-width:850px){
  .nav-home--mobile{
    width:34px;
    height:34px;
    padding:0!important;
    margin:8px 0 4px;
    border-bottom:0!important;
    align-self:flex-start;
  }
}


/* Del archivo en portada: 8 artículos, 4 por columna, lectura vertical cronológica. */
.home-archive-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  grid-template-rows:repeat(4,auto);
  grid-auto-flow:column;
  column-gap:38px;
  row-gap:0;
}
.home-archive-grid .archive-row{
  grid-template-columns:72px minmax(0,1fr);
  gap:14px;
  min-width:0;
}
.home-archive-grid .archive-row > div:last-child{min-width:0}
.home-archive-grid .archive-row h3{overflow-wrap:anywhere}
@media(max-width:900px){
  .article-results-grid .archive-row{
    grid-column:1!important;
    grid-row:auto!important;
  }
  .home-archive-grid{
    grid-template-columns:1fr;
    grid-template-rows:none;
    grid-auto-flow:row;
  }
  .home-archive-grid .archive-row{
    grid-template-columns:95px minmax(0,1fr);
    gap:20px;
  }
}
