/* ==========================================================================
   Academia Ítaca — Blog «Tinta»
   Revista literaria en tinta y papel para blog/index.html y blog/*.html.
   Usa SOLO los tokens de css/itaca.css (papel, tinta, líneas). Ningún color
   propio: el verde de WhatsApp y el azul de llamar llegan por la regla global
   de CTA de itaca.css. Los trazos de pincel son máscaras SVG pintadas con
   var(--ink), así que no llevan color dentro.
   ========================================================================== */

/* ----- Motivos compartidos: trazo de pincel y pintado ----- */
:root {
  --brush: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 26' preserveAspectRatio='none'><path d='M3 15.5C30 10.6 61 8.4 96 8.9c37 .5 63 4.2 101 3.6 41-.6 78-6.4 118-8.4 2.6-.1 3.4 2.7.9 3.4-35 9.3-77 12.6-118 13.5-38 .8-66-2.6-101-2.4-31 .2-59 3.1-92 3.7-3.3.1-4.2-6.1-1.9-6.8z'/></svg>");
  --brush-v: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 200' preserveAspectRatio='none'><path d='M6.6 2c3 0 4.6 2 4.4 6-.8 30-.2 58 .6 92 .8 33 .9 61-.4 90-.1 3.6-2.4 6-4.6 6s-3.9-2.5-3.8-6c.9-29 .4-57-.4-90C1.6 66 1.4 38 2.4 8c.1-3.8 1.7-6 4.2-6z'/></svg>");
  --blog-measure: 41rem;
}

@keyframes brush-paint {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

@keyframes seal-turn {
  to { transform: rotate(360deg); }
}

/* ----- Barra de progreso de lectura: un hilo de tinta ----- */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  width: 0%;
  height: 3px;
  background: var(--ink);
  transition: width 0.08s linear;
}

.reading-progress-bar::after {
  content: "";
  position: absolute;
  right: -3px;
  top: -2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
}

html.is-static .reading-progress-bar { display: none !important; }

/* ----- Migas de pan ----- */
.breadcrumbs-bar {
  background: var(--paper);
  border-bottom: var(--line-soft);
  padding: 12px 0;
  font-size: 0.875rem;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--ink-3);
}

.breadcrumbs a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.breadcrumbs a:hover { text-decoration-thickness: 2px; }
.breadcrumbs .sep { user-select: none; color: var(--ink-3); }

.breadcrumbs .current {
  color: var(--ink-2);
  max-width: 45ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================================================
   ARTÍCULO
   ========================================================================== */

/* ----- Cabecera ----- */
.article-header {
  position: relative;
  padding: clamp(40px, 7vw, 96px) 0 clamp(32px, 4.5vw, 56px);
  border-bottom: var(--line);
  background: var(--paper);
}

.article-header-inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}

.article-kicker-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* Kicker en Marcellus, entre dos filetes (como el rótulo del sello) */
.article-badge {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: var(--ink);
  font-family: var(--font-label);
  font-weight: 400;
  font-size: 0.875rem;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.article-badge::before,
.article-badge::after {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--ink);
}

/* Las categorías ya no llevan color: todas en tinta */
.badge-lemon,
.badge-coral,
.badge-mint,
.badge-cobalt,
.badge-paper { background: none; color: var(--ink); }

.article-header h1 {
  position: relative;
  max-width: 22ch;
  padding-bottom: 0.34em;
  font-family: var(--font-display);
  font-size: clamp(2.15rem, 5.6vw, 4.5rem);
  font-weight: 400;
  font-variation-settings: "opsz" 144;
  line-height: 1.02;
  letter-spacing: -0.012em;
  color: var(--ink);
  text-wrap: balance;
}

.article-header h1 em,
.blog-hero-header h1 em {
  font-style: normal;
  font-weight: 640;
  letter-spacing: -0.01em;
}

/* Trazo de pincel bajo el titular: se «pinta» al cargar */
.article-header h1::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(220px, 52%);
  height: 0.2em;
  max-height: 14px;
  min-height: 9px;
  translate: -50% 0;
  background: var(--ink);
  -webkit-mask: var(--brush) center / 100% 100% no-repeat;
  mask: var(--brush) center / 100% 100% no-repeat;
  animation: brush-paint 900ms var(--ease) 250ms both;
}

.article-meta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 12px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-3);
}

.article-meta-row span.meta-dot { user-select: none; color: var(--ink-3); }
/* En móvil los puntos se quedaban colgando a final de línea: se quitan y manda el hueco */
@media (max-width: 559px) {
  .article-meta-row { gap: 4px 18px; }
  .article-meta-row span.meta-dot { display: none; }
}

/* ----- Rejilla: índice lateral + texto ----- */
.article-section { padding: clamp(36px, 5vw, 72px) 0 clamp(48px, 6vw, 88px); }

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 36px;
}

@media (min-width: 1080px) {
  .article-layout {
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 72px;
    align-items: start;
  }
}

.article-main-col { min-width: 0; }

/* ----- Índice de contenidos (TOC) ----- */
.article-sidebar { display: flex; flex-direction: column; gap: 24px; }

.article-toc {
  counter-reset: toc;
  padding: 18px 0 20px;
  border-top: var(--line);
  border-bottom: var(--line-soft);
  background: none;
}

@media (min-width: 1080px) {
  .article-toc {
    position: sticky;
    top: calc(var(--nav-h) + 24px);
    max-height: calc(100vh - var(--nav-h) - 48px);
    overflow-y: auto;
    scrollbar-width: thin;
  }
}

.toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.toc-title {
  font-family: var(--font-label);
  font-weight: 400;
  font-size: 0.875rem;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink);
}

.toc-toggle-btn {
  display: none;
  min-height: 36px;
  padding: 4px 14px;
  border: var(--line-thin);
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
}

.toc-toggle-btn:hover { background: var(--ink); color: var(--paper); }

@media (max-width: 1079px) {
  .article-toc.has-toggle .toc-toggle-btn { display: inline-block; }
  .article-toc.is-collapsed .toc-list,
  .article-toc.is-collapsed .toc-cta-mini { display: none; }
  .article-toc.is-collapsed .toc-header { margin-bottom: 0; }
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc-list li { counter-increment: toc; }

.toc-link {
  position: relative;
  display: grid;
  grid-template-columns: 2.1em 1fr;
  align-items: baseline;
  padding: 7px 8px 7px 0;
  border-left: 1.5px solid transparent;
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.35;
  text-decoration: none;
  transition: color var(--step) ease, border-color var(--step) ease, padding var(--step) ease;
}

.toc-link::before {
  content: counter(toc, upper-roman) ".";
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 400;
  font-size: 0.9375rem;
  color: var(--ink-3);
}

.toc-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

.toc-link.is-active {
  padding-left: 10px;
  border-left-color: var(--ink);
  color: var(--ink);
  font-weight: 600;
}

.toc-link.is-active::before { color: var(--ink); }

.toc-cta-mini {
  margin-top: 18px;
  padding-top: 16px;
  border-top: var(--line-soft);
}

.toc-cta-mini p {
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-style: normal;
  font-size: 1.05rem;
  color: var(--ink);
}

.toc-cta-mini .btn {
  width: 100%;
  min-height: 44px;
  padding: 8px 14px;
  font-size: 0.9375rem;
}

/* ----- Cuerpo de texto ----- */
.article-body,
.article-main-col > .article-cta-banner,
.article-main-col > .article-nav-cards { max-width: var(--blog-measure); }

.article-body.prose {
  font-family: var(--font-body);
  color: var(--ink);
}

.article-body.prose p {
  margin: 0 0 1.3em;
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--ink);
}

/* Entradilla y capitular del primer párrafo */
.article-body.prose > p:first-child,
.article-body.prose > .article-lead {
  font-size: 1.25rem;
  line-height: 1.65;
}

.article-body.prose > p:first-child::first-letter {
  float: left;
  margin: 0.08em 0.1em 0 -0.02em;
  font-family: var(--font-display);
  font-size: 5.1em;
  font-weight: 400;
  font-variation-settings: "opsz" 144;
  line-height: 0.78;
  color: var(--ink);
}

.article-body.prose h2 {
  position: relative;
  margin: 2.3em 0 0.75em;
  padding-top: 26px;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  font-weight: 450;
  font-variation-settings: "opsz" 96;
  line-height: 1.1;
  letter-spacing: -0.01em;
  scroll-margin-top: calc(var(--nav-h) + 24px);
}

/* Pequeño trazo de pincel sobre cada H2: divisor de sección */
.article-body.prose h2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 64px;
  height: 9px;
  background: var(--ink);
  -webkit-mask: var(--brush) center / 100% 100% no-repeat;
  mask: var(--brush) center / 100% 100% no-repeat;
}

.article-body.prose h3 {
  margin: 1.7em 0 0.55em;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
  font-style: normal;
  font-weight: 450;
  line-height: 1.2;
  letter-spacing: -0.005em;
  scroll-margin-top: calc(var(--nav-h) + 24px);
}

.article-body.prose ul,
.article-body.prose ol { margin: 1.2em 0 1.5em; padding-left: 1.5em; }

.article-body.prose ul { list-style: none; }

.article-body.prose ul > li { position: relative; }

.article-body.prose ul > li::before {
  content: "";
  position: absolute;
  left: -1.15em;
  top: 0.72em;
  width: 0.55em;
  height: 2px;
  background: var(--ink);
}

.article-body.prose ol { list-style: decimal; }

.article-body.prose ol > li::marker {
  font-family: var(--font-display);
  font-style: normal;
  color: var(--ink);
}

.article-body.prose li {
  margin-bottom: 0.6em;
  font-size: 1.0625rem;
  line-height: 1.65;
}

.article-body.prose strong { font-weight: 700; color: var(--ink); }

.article-body.prose a:not(.btn):not(.btn-download-pdf):not(.btn-whatsapp-help) {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-thickness var(--step) ease, background-color var(--step) ease;
}

.article-body.prose a:not(.btn):not(.btn-download-pdf):not(.btn-whatsapp-help):hover {
  text-decoration-thickness: 2px;
  background: var(--paper-2);
}

/* Emojis heredados: en tinta (gris), sin color */
.emo { filter: grayscale(1) contrast(1.15); }

/* ----- Citas: trazo de pincel vertical ----- */
.article-body.prose blockquote {
  position: relative;
  margin: 2em 0;
  padding: 4px 0 4px 34px;
  border: 0;
  background: none;
  box-shadow: none;
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 400;
  font-size: clamp(1.3rem, 2.4vw, 1.6rem);
  line-height: 1.4;
  color: var(--ink);
}

.article-body.prose blockquote::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 10px;
  background: var(--ink);
  -webkit-mask: var(--brush-v) center / 100% 100% no-repeat;
  mask: var(--brush-v) center / 100% 100% no-repeat;
}

.article-body.prose blockquote p { font: inherit; margin-bottom: 0.5em; }

/* ----- Callouts en línea fina (doble filete, como el anillo del sello) ----- */
.article-body .article-highlight,
.article-body .article-highlight[style] {
  position: relative;
  margin: 2em 0;
  padding: 24px 26px 22px;
  border: var(--line-thin);
  border-radius: 0;
  background: var(--white);
  box-shadow: none;
  color: var(--ink);
  outline: 1px solid var(--ink);
  outline-offset: -6px;
}

.article-body .article-highlight p,
.article-body .article-highlight li,
.article-body .article-highlight strong { color: var(--ink); }

.article-body .article-highlight > :last-child { margin-bottom: 0; }

.article-body .article-highlight p { font-size: 1.0625rem; line-height: 1.65; }

.article-body .highlight-title {
  font-family: var(--font-label);
  font-weight: 400 !important;
  font-size: 0.9375rem !important;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.5 !important;
}

/* Recuadros sueltos heredados (antes con estilos en línea) */
.article-body .article-box {
  margin: 1.8em 0;
  padding: 24px 26px;
  border: var(--line-soft);
  border-radius: var(--radius);
  background: var(--white);
}

.article-body .article-box > :last-child { margin-bottom: 0; }
.article-body .article-box h3 { margin-top: 0.4em; }
.article-body .article-box h3:first-child { margin-top: 0; }
.article-body .article-box-center { text-align: center; border: var(--line); }
.article-body .article-box-center h3 { margin-top: 0; }

/* Semáforo del artículo de extraescolares: marcas de tinta en vez de color */
.zona::before {
  display: inline-block;
  margin-right: 0.4em;
  font-weight: 400;
}
.zona-verde::before { content: "○"; }
.zona-amarilla::before { content: "◐"; }
.zona-roja::before { content: "●"; }

/* ----- Tablas: filetes finos ----- */
.table-scroll {
  width: 100%;
  margin: 2em 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-top: var(--line);
  border-bottom: var(--line);
  background: var(--white);
}

.table-scroll table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.article-body.prose .table-scroll th,
.article-body.prose .table-scroll td { border: 0; }

.table-scroll th {
  padding: 14px 16px 12px;
  border-bottom: var(--line-thin);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-label);
  font-weight: 400;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: left;
  vertical-align: bottom;
}

.article-body.prose .table-scroll th { border-bottom: var(--line-thin); }

.table-scroll td {
  padding: 12px 16px;
  vertical-align: top;
  color: var(--ink);
}

.article-body.prose .table-scroll td { border-bottom: var(--line-soft); }
.article-body.prose .table-scroll td + td,
.article-body.prose .table-scroll th + th { border-left: var(--line-soft); }
.article-body.prose .table-scroll tr:last-child td { border-bottom: 0; }
.table-scroll td:first-child { font-weight: 600; }

/* ----- CTA dentro del artículo: bloque invertido en tinta ----- */
.in-article-cta {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 2.6em 0;
  padding: clamp(24px, 4vw, 36px);
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--ink);
  box-shadow: none;
  color: var(--paper);
  outline: 1px solid var(--paper);
  outline-offset: -8px;
}

.in-article-cta-badge {
  width: fit-content;
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--paper);
  font-family: var(--font-label);
  font-weight: 400;
  font-size: 0.875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.article-body.prose .in-article-cta h3,
.in-article-cta h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  font-style: normal;
  font-weight: 400;
  line-height: 1.15;
  color: var(--paper);
}

.article-body.prose .in-article-cta p,
.in-article-cta p {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--paper);
}

.in-article-cta .btn { align-self: flex-start; margin-top: 6px; }

/* ----- Material descargable ----- */
.download-box {
  margin: 2.4em 0;
  padding: clamp(22px, 4vw, 32px);
  border: var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
}

.download-box-header { margin-bottom: 10px; }

.download-badge {
  font-family: var(--font-label);
  font-size: 0.875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

.article-body.prose .download-box h3 { margin-top: 0; font-style: normal; }
.article-body.prose .download-box > p { color: var(--ink-2); font-size: 1rem; }

.download-items-grid {
  display: grid;
  gap: 0;
  margin: 18px 0;
  border-top: var(--line-soft);
}

.download-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 14px 0;
  border-bottom: var(--line-soft);
}

.download-item-title { font-weight: 600; font-size: 1rem; color: var(--ink); }

.btn-download-pdf {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  border: var(--line-thin);
  border-radius: var(--radius-pill);
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--step) ease, color var(--step) ease;
}

.btn-download-pdf:hover { background: var(--ink); color: var(--paper); }

.download-box-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.download-box-footer-text {
  font-family: var(--font-display);
  font-style: normal;
  font-size: 1.05rem;
  color: var(--ink);
}

/* Enlace de ayuda por WhatsApp: tinta (el verde solo vive en el botón flotante) */
.btn-whatsapp-help {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 18px;
  border: var(--line-thin);
  border-color: var(--ink);
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--white);
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
}

.btn-whatsapp-help:hover { background: var(--ink-2); color: var(--white); }

/* ----- Cierre del artículo ----- */
.article-cta-banner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 64px 0 40px;
  padding: clamp(36px, 5vw, 56px) clamp(20px, 4vw, 44px);
  border: var(--line);
  border-radius: 0;
  background: var(--white);
  box-shadow: none;
  text-align: center;
  outline: 1px solid var(--ink);
  outline-offset: -8px;
}

.article-cta-banner::before {
  content: "";
  width: 72px;
  height: 72px;
  margin-bottom: 2px;
  border-radius: 50%;
  background: var(--white) url("../assets/images/logo-nav.webp") center / 100% no-repeat;
}

.article-cta-banner h2 {
  max-width: 24ch;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.6vw, 2.6rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.article-cta-banner p {
  max-width: 52ch;
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink-2);
}

.article-cta-banner .cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

/* ----- Anterior / siguiente ----- */
.article-nav-cards {
  display: grid;
  grid-template-columns: 1fr;
  margin: 40px 0 64px;
  border-top: var(--line);
  border-bottom: var(--line);
}

@media (min-width: 640px) {
  .article-nav-cards { grid-template-columns: 1fr 1fr; }
  .nav-card + .nav-card { border-left: var(--line-soft); }
}

.nav-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 20px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--ink);
  text-decoration: none;
  transition: background-color var(--step) ease;
}

.nav-card + .nav-card { border-top: var(--line-soft); }

@media (min-width: 640px) {
  .nav-card + .nav-card { border-top: 0; }
}

.nav-card:hover { background: var(--white); }
.nav-card:hover .nav-card-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

.nav-card-dir {
  font-family: var(--font-label);
  font-size: 0.875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.nav-card-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1.2;
  color: var(--ink);
}

.nav-card.next { text-align: right; }

/* ==========================================================================
   ÍNDICE DEL BLOG (blog/index.html)
   ========================================================================== */

.blog-hero-section {
  position: relative;
  overflow: hidden;
  padding: clamp(44px, 7vw, 104px) 0 clamp(40px, 5vw, 72px);
  border-bottom: var(--line);
  background: var(--paper);
}

.blog-hero-section > .container {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 32px;
}

@media (min-width: 900px) {
  .blog-hero-section > .container { grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.75fr); gap: 56px; }
}

.blog-hero-header {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 820px;
}

.blog-hero-header .kicker {
  margin: 0;
  font-family: var(--font-label);
  font-weight: 400;
  font-size: 0.875rem;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink);
}

.blog-hero-header h1 {
  position: relative;
  padding-bottom: 0.18em;
  font-family: var(--font-display);
  font-size: clamp(3rem, 9vw, 7.25rem);
  font-weight: 400;
  font-variation-settings: "opsz" 144;
  line-height: 0.92;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.blog-hero-header h1 em { display: inline-block; position: relative; }

.blog-hero-header h1 em::after {
  content: "";
  position: absolute;
  left: 2%;
  right: 0;
  bottom: -0.1em;
  height: 0.14em;
  min-height: 9px;
  background: var(--ink);
  -webkit-mask: var(--brush) center / 100% 100% no-repeat;
  mask: var(--brush) center / 100% 100% no-repeat;
  animation: brush-paint 1000ms var(--ease) 300ms both;
}

.blog-hero-lead {
  max-width: 46ch;
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink-2);
}

/* Sello: el logo con un anillo de texto que gira despacio */
.blog-seal {
  position: relative;
  justify-self: center;
  width: min(300px, 70vw);
  aspect-ratio: 1;
}

.blog-seal-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  color: var(--ink);
  animation: seal-turn 60s linear infinite;
}

.blog-seal-ring circle { fill: none; stroke: currentColor; }
.blog-seal-ring .ring-a { stroke-width: 1.5; }
.blog-seal-ring .ring-b { display: none; }

.blog-seal-ring text {
  fill: currentColor;
  font-family: var(--font-label);
  font-size: 11.4px;
  letter-spacing: 0.2em;
}

.blog-seal-logo {
  position: absolute;
  inset: 9%;
  width: 82%;
  height: 82%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

@media (max-width: 899px) {
  .blog-seal { width: 150px; justify-self: start; order: -1; }
}

/* ----- Destacado: bloque invertido en tinta ----- */
.featured-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  margin-bottom: 56px;
  padding: clamp(26px, 4.5vw, 48px);
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--ink);
  box-shadow: none;
  color: var(--paper);
  text-decoration: none;
  outline: 1px solid var(--paper);
  outline-offset: -9px;
  transition: transform var(--step) var(--ease), box-shadow var(--step) var(--ease);
}

.featured-card:hover { transform: translateY(-3px); box-shadow: 0 4px 0 var(--ink-3); }

@media (min-width: 900px) {
  .featured-card { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: center; gap: 48px; }
}

.featured-badge-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-bottom: 16px;
}

.featured-tag,
.featured-cat {
  padding: 0;
  border: 0;
  background: none;
  color: var(--paper);
  font-family: var(--font-label);
  font-weight: 400;
  font-size: 0.875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.featured-tag::after { content: "  ·"; }

.featured-title {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.8vw, 3rem);
  font-weight: 400;
  font-variation-settings: "opsz" 144;
  line-height: 1.06;
  letter-spacing: -0.005em;
  color: var(--paper);
}

.featured-excerpt {
  max-width: 54ch;
  margin: 0 0 20px;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--paper);
}

.featured-meta {
  display: flex;
  gap: 10px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--paper);
}

.featured-aside-box {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--paper);
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.featured-aside-box p { margin: 0; font-size: 1rem; line-height: 1.55; color: var(--paper); }
.featured-aside-box strong { color: var(--paper); }

.featured-card .btn,
.featured-card .btn-ink {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
  box-shadow: none;
}

.featured-card:hover .btn { text-decoration: underline; text-underline-offset: 3px; }

/* ----- Buscador y filtros ----- */
.blog-controls-section { padding: 0 0 8px; }

.blog-search-wrap { position: relative; max-width: 640px; margin-bottom: 20px; }

.blog-search-input {
  width: 100%;
  min-height: 52px;
  padding: 12px 18px 12px 48px;
  border: 0;
  border-bottom: var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-style: normal;
  font-size: 1.25rem;
  outline: none;
  transition: background-color var(--step) ease;
}

.blog-search-input::placeholder { color: var(--ink-3); opacity: 1; }
@media (max-width: 559px) { .blog-search-input { font-size: 1.0625rem; padding-right: 8px; } }
.blog-search-input:focus { background: var(--white); outline: 2px solid transparent; box-shadow: 0 1.5px 0 var(--ink); }

.blog-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 22px;
  height: 22px;
  transform: translateY(-50%);
  color: var(--ink);
  pointer-events: none;
}

.blog-filters-row { display: flex; flex-wrap: wrap; gap: 8px; }

.filter-chip {
  min-height: 44px;
  padding: 8px 16px;
  border: var(--line-thin);
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  user-select: none;
  transition: background-color var(--step) ease, color var(--step) ease;
}

.filter-chip:hover { background: var(--paper-2); }

.filter-chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  box-shadow: none;
}

.blog-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 24px 0 0;
  padding-bottom: 14px;
  border-bottom: var(--line);
  font-family: var(--font-label);
  font-size: 0.875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* ----- Rejilla editorial: sumario numerado, sin colores por categoría ----- */
.blog-editorial-grid {
  counter-reset: art;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 72px;
  border-left: var(--line-soft);
}

@media (min-width: 640px) { .blog-editorial-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .blog-editorial-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.editorial-card {
  counter-increment: art;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 26px 24px 22px;
  border: 0;
  border-right: var(--line-soft);
  border-bottom: var(--line-soft);
  border-radius: 0;
  background: var(--paper);
  box-shadow: none;
  color: var(--ink);
  text-decoration: none;
  transition: background-color var(--step) ease;
}

.editorial-card:hover { background: var(--white); transform: none; box-shadow: inset 0 -2px 0 var(--ink); }

/* Número de artículo en Fraunces itálica */
.editorial-card::before {
  content: "Nº " counter(art, decimal-leading-zero);
  margin-bottom: 18px;
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 300;
  font-size: 1.05rem;
  color: var(--ink-3);
}

.editorial-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 40px; /* etiquetas de 1 o 2 líneas: los títulos empiezan a la misma altura */
  gap: 12px;
  margin-bottom: 12px;
}

/* Categoría: rótulo Marcellus con un glifo de tinta propio */
.editorial-card-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--ink);
  font-family: var(--font-label);
  font-weight: 400;
  font-size: 0.875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.3;
}

.editorial-card-tag::before {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px var(--ink);
  font-family: var(--font-display);
  font-style: normal;
  font-size: 0.9375rem;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1;
}

.editorial-card:hover .editorial-card-tag::before { box-shadow: inset 0 0 0 2px var(--white), inset 0 0 0 3px var(--ink); }

.tag-uni,
.tag-bach,
.tag-eso,
.tag-prim,
.tag-metodo,
.tag-padres { background: none; color: var(--ink); }

.tag-uni::before { content: "∫"; }
.tag-bach::before { content: "Σ"; }
.tag-eso::before { content: "π"; }
.tag-prim::before { content: "√"; }
.tag-metodo::before { content: "¶"; font-style: normal; }
.tag-padres::before { content: "&"; }

.editorial-card-time {
  flex: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-3);
}

.editorial-card-title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 400;
  font-variation-settings: "opsz" 72;
  line-height: 1.15;
  letter-spacing: -0.008em;
  color: var(--ink);
}

.editorial-card:hover .editorial-card-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

.editorial-card-excerpt {
  flex-grow: 1;
  margin: 0 0 20px;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-2);
}

.editorial-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 14px;
  border-top: var(--line-soft);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-3);
}

.editorial-card-arrow {
  color: var(--ink);
  font-weight: 600;
  transition: transform var(--step) var(--ease);
}

.editorial-card:hover .editorial-card-arrow { transform: translateX(4px); }

/* Sin resultados */
.blog-empty-state {
  margin: 32px 0 72px;
  padding: 48px 24px;
  border: var(--line-thin);
  border-radius: 0;
  background: var(--white);
  text-align: center;
  outline: 1px solid var(--ink);
  outline-offset: -7px;
}

.blog-empty-state h3 {
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  font-style: normal;
}

.blog-empty-state p { margin-bottom: 20px; color: var(--ink-2); }

/* ----- Móvil: texto algo más compacto ----- */
@media (max-width: 599px) {
  .article-body.prose p { font-size: 1.0625rem; line-height: 1.7; }
  .article-body.prose > p:first-child,
  .article-body.prose > .article-lead { font-size: 1.125rem; }
  .article-body .article-highlight,
  .article-body .article-box { padding: 20px 18px; }
  .editorial-card { padding: 22px 18px 18px; }
}

/* ==========================================================================
   Movimiento, ?static, impresión
   ========================================================================== */
html.is-static .article-header h1::after,
html.is-static .blog-hero-header h1 em::after { animation: none; }
html.is-static .blog-seal-ring { animation: none; }

html.is-static .article-toc { position: static !important; max-height: none !important; }

@media (prefers-reduced-motion: reduce) {
  .reading-progress-bar,
  .editorial-card,
  .featured-card,
  .nav-card,
  .filter-chip,
  .toc-link { transition: none !important; }
  .article-header h1::after,
  .blog-hero-header h1 em::after,
  .blog-seal-ring { animation: none !important; }
}

@media print {
  .reading-progress-bar,
  .article-sidebar,
  .in-article-cta,
  .article-cta-banner,
  .article-nav-cards,
  .blog-seal { display: none !important; }
  .article-layout { display: block; }
}
