/* Escuela Libre de Psicología Adleriana — hoja de estilos
   Identidad tomada del logotipo: rojo, negro y crema; recuadros de filete, el cuadrado rojo del símbolo y la fila
   de siete cuadrados alternos, a la manera de la Secesión y los Talleres de Viena (hacia 1909). Moderna y sin
   adornos: rótulos en Josefin Sans (la letra del logotipo) espaciados en versalitas y texto en una romana de lectura.
   Sin dependencias externas: si theme/fonts/ no tiene la fuente, se usan las geométricas del sistema. */

@font-face {
  font-family: "Josefin Sans";
  src: local("Josefin Sans"), url("fonts/josefin-sans-latin.woff2") format("woff2");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #faf8f4;
  --surface: #ffffff;
  --paper-2: #f2eee6;
  --paper-3: #e6e0d4;
  --ink: #1c1a17;
  --ink-2: #3b3833;
  --muted: #736d63;
  --red: #c9321f;
  --red-2: #a62816;
  --rule: #ddd6c9;
  --cream: #f5f1ea;
  --serif: "Iowan Old Style", Charter, "Bitstream Charter", Georgia, Palatino, "Palatino Linotype", "Book Antiqua", serif;
  --display: "Josefin Sans", "Futura PT", Futura, "Century Gothic", "URW Gothic", "URW Gothic L", "Avenir Next", Avenir, system-ui, sans-serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 68ch;
  /* la fila de siete cuadrados del logotipo (rojo, negro, rojo…), grande y pequeña */
  --sq: 0.5rem;
  --motif: repeating-linear-gradient(90deg, var(--red) 0 0.5rem, transparent 0 0.8rem, var(--ink) 0 1.3rem, transparent 0 1.6rem);
  --motif-w: 5.3rem;
  --motif-s: repeating-linear-gradient(90deg, var(--red) 0 0.375rem, transparent 0 0.625rem, var(--ink) 0 1rem, transparent 0 1.25rem);
  --motif-s-w: 4.125rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1c1a17;
    --surface: #23211e;
    --paper-2: #2a2824;
    --paper-3: #35322c;
    --ink: #f0ebe1;
    --ink-2: #d3ccbe;
    --muted: #9c9587;
    --red: #e0533f;
    --red-2: #ee7d69;
    --rule: #39352f;
  }
}

/* ---------- base ---------- */

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

html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1rem, 0.94rem + 0.3vw, 1.2rem);
  line-height: 1.62;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}

.wrap {
  width: min(100% - 2rem, 76rem);
  margin-inline: auto;
}

a {
  color: var(--red-2);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--red); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

img { max-width: 100%; height: auto; }

::selection { background: color-mix(in srgb, var(--red) 22%, transparent); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* rótulos: la voz del logotipo */
.breadcrumb, .site-nav ul, .nav-button, .button, .toc summary, .pager small, .article-meta .category,
.listing-body h2 small, .listing-body h3, .cat-card .cat-meta, .dict-search label, .related h2,
.entries .cat, .prose h4, .prose thead th {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* recuadro con el cuadrado rojo del símbolo en la esquina */
.toc, .cat-card, .prose #destacado, .prose .destacado, .prose .blog-caja,
.home-prose > ul > li, .portada-secciones > ul > li {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--ink);
}
.toc::before, .cat-card::before, .prose #destacado::before, .prose .destacado::before, .prose .blog-caja::before,
.home-prose > ul > li::before, .portada-secciones > ul > li::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 0.75rem;
  height: 0.75rem;
  background: var(--red);
}

/* ---------- cabecera ---------- */

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
}
/* fila de cuadrados bajo el filete, como las cenefas de los Talleres de Viena */
.site-header::after {
  content: "";
  display: block;
  height: 0.3rem;
  margin-top: 0.3rem;
  background: repeating-linear-gradient(90deg, var(--ink) 0 0.3rem, transparent 0 0.9rem);
  opacity: 0.85;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 1.75rem;
  min-height: 5rem;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.15;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.7rem 0;
}
.brand:hover { color: var(--ink); }
.brand picture { display: block; flex: none; line-height: 0; }
.brand img { width: 48px; height: 48px; }
.brand b { color: var(--red); font-weight: 700; }

.site-nav { margin-left: auto; }
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.6rem;
  font-size: 0.8rem;
}
.site-nav a {
  display: inline-block;
  color: var(--ink);
  text-decoration: none;
  padding: 0.45rem 0 0.3rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover,
.site-nav a[aria-current] { border-color: var(--red); color: var(--red-2); }
.site-nav li.secondary { display: none; }
.site-nav li.has-sub { position: relative; }
.site-nav li.has-sub > a::after {
  content: "";
  display: inline-block;
  width: 0.32rem;
  height: 0.32rem;
  margin-left: 0.45rem;
  vertical-align: 0.15em;
  background: var(--red);
}
.site-nav .submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: -1rem;
  z-index: 20;
  min-width: 15rem;
  padding: 0.4rem 0;
  flex-direction: column;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--ink);
  border-top: 3px solid var(--red);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  font-family: var(--display);
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.92rem;
  font-weight: 500;
}
.site-nav li.has-sub:hover > .submenu,
.site-nav li.has-sub:focus-within > .submenu { display: flex; }
.site-nav .submenu a { display: block; padding: 0.5rem 1rem; border-bottom: 0; white-space: nowrap; }
.site-nav .submenu a:hover,
.site-nav .submenu a[aria-current] { background: var(--paper-2); }

.nav-toggle { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.nav-button {
  display: none;
  margin-left: auto;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.76rem;
  padding: 0.5rem 0.8rem 0.4rem;
  border: 1px solid var(--ink);
  cursor: pointer;
  user-select: none;
}
.nav-button span {
  width: 1.1rem;
  height: 2px;
  background: currentColor;
  box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
}
.nav-toggle:focus-visible + .nav-button { outline: 2px solid var(--red); outline-offset: 2px; }

@media (max-width: 860px) {
  .site-header .wrap { gap: 0 0.75rem; min-height: 4.25rem; }
  .brand { font-size: 0.78rem; gap: 0.65rem; letter-spacing: 0.12em; }
  .brand img { width: 40px; height: 40px; }
  .brand-name b { display: block; }
  .nav-button { display: inline-flex; }
  .site-nav {
    display: none;
    flex-basis: 100%;
    margin: 0;
    padding: 0.5rem 0 1rem;
    border-top: 1px solid var(--ink);
  }
  .nav-toggle:checked ~ .site-nav { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { display: block; padding: 0.8rem 0 0.7rem; border-bottom: 1px solid var(--rule); font-size: 0.86rem; }
  .site-nav a[aria-current] { border-bottom-color: var(--rule); color: var(--red); }
  .site-nav li.has-sub > a::after { display: none; }
  .site-nav .submenu { display: flex; position: static; min-width: 0; padding: 0; border: 0; box-shadow: none; background: none; }
  .site-nav .submenu a { padding: 0.65rem 0 0.6rem 1rem; border-bottom: 1px solid var(--rule); white-space: normal; }
  .site-nav .submenu a:hover, .site-nav .submenu a[aria-current] { background: none; }
  .site-nav li.secondary { display: block; }
  .site-nav li.secondary a { font-family: var(--serif); font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--ink-2); font-size: 0.95rem; }
  .site-nav li.secondary.first { margin-top: 0.75rem; }
}

@media (max-width: 480px) {
  .site-header .wrap { flex-wrap: nowrap; }
  .nav-toggle:checked ~ .site-nav { position: absolute; top: 100%; left: 0; right: 0; z-index: 30; background: var(--paper); padding-inline: 0; border-bottom: 1px solid var(--ink); }
  .brand { font-size: 0.7rem; letter-spacing: 0.08em; gap: 0.55rem; min-width: 0; }
  .brand img { width: 36px; height: 36px; }
  .nav-button { flex: none; font-size: 0.68rem; padding: 0.45rem 0.6rem 0.35rem; gap: 0.45rem; }
}

/* ---------- pie: en negativo, como el logotipo sobre negro ---------- */

.site-footer {
  margin-top: auto;
  padding: 1.1rem 0 3rem;
  background: #1c1a17;
  border-top: 3px solid #c9321f;
  color: #b9b2a4;
  font-family: var(--sans);
  font-size: 0.85rem;
}
.site-footer::before {
  content: "";
  display: block;
  height: 0.375rem;
  margin-bottom: 2.75rem;
  background: repeating-linear-gradient(90deg, #c9321f 0 0.375rem, transparent 0 0.75rem, #f5f1ea 0 1.125rem, transparent 0 1.5rem);
}
.site-footer .wrap { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 1rem 3rem; align-items: start; }
.site-footer .wrap > * { grid-column: 2; }
.footer-logo { grid-column: 1 !important; grid-row: 1 / span 4; display: block; line-height: 0; }
.footer-logo img { display: block; width: 100%; height: auto; }
.slogan {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.45;
  color: #f5f1ea;
  max-width: var(--measure);
  margin: 0 0 1.5rem;
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0 0 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.6rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.footer-links a { color: #f5f1ea; text-decoration: none; }
.footer-links a:hover { color: #ef7f6b; }
.colophon { margin: 0; line-height: 1.55; }
.colophon a { color: #f5f1ea; }
.site-footer .license { margin: 0.75rem 0 0; line-height: 1.55; }
.site-footer .license a { color: #f5f1ea; }
.site-footer a:hover { color: #ef7f6b; }
@media (prefers-color-scheme: dark) {
  .site-footer { background: #121110; }
}
@media (max-width: 720px) {
  .site-footer .wrap { grid-template-columns: 1fr; }
  .site-footer .wrap > *, .footer-logo { grid-column: 1 !important; grid-row: auto; }
  .footer-logo { width: 11rem; margin-bottom: 1rem; }
}

/* ---------- cabecera de artículo ---------- */

.article-header {
  margin: 3rem 0 2.5rem;
  max-width: 62rem;
}
.breadcrumb {
  font-size: 0.72rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.7rem;
}
.breadcrumb a { color: inherit; text-decoration: none; }
.breadcrumb a:hover { color: var(--red); }

.article-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.9rem, 1.3rem + 2.5vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.005em;
  margin: 0.7rem 0 1rem;
  text-wrap: balance;
}
.article-title sup { font-size: 0.5em; }
.lede {
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: var(--measure);
  margin: 0 0 0.9rem;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  font-family: var(--sans);
  font-size: 0.86rem;
  color: var(--muted);
  margin-top: 0.75rem;
}
.article-meta .author { letter-spacing: 0.02em; }
.article-header::after {
  content: "";
  display: block;
  width: var(--motif-w);
  height: var(--sq);
  background: var(--motif);
  margin-top: 1.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.6em 1em 0.5em;
  border: 1px solid var(--ink);
  border-radius: 0;
  color: var(--ink);
  background: var(--surface);
  font-size: 0.74rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.button:hover { background: var(--red); border-color: var(--red); color: #fff; }
.button-icon { font-weight: 400; }

/* ---------- rejilla del artículo con índice ---------- */

.article-body { max-width: var(--measure); }

.toc {
  font-family: var(--sans);
  font-size: 0.86rem;
  margin: 0 0 2.25rem;
  padding: 0.85rem 1.1rem 0.75rem;
  max-width: var(--measure);
}
.toc summary {
  cursor: pointer;
  font-size: 0.72rem;
  color: var(--ink);
  padding-left: 0.4rem;
}
.toc ol { list-style: none; margin: 0.8rem 0 0.25rem; padding: 0; }
.toc ol ol { margin: 0.2rem 0 0.3rem; padding-left: 0.9rem; border-left: 1px solid var(--rule); }
.toc li { margin: 0.42em 0; line-height: 1.35; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--red); }
.toc > details > ol > li > a { font-weight: 600; }

@media (min-width: 1100px) {
  .article.has-toc {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 18rem;
    column-gap: 3.5rem;
    align-items: start;
  }
  .article.has-toc .article-header { grid-column: 1 / -1; }
  .article.has-toc .article-body,
  .article.has-toc .pager { grid-column: 1; }
  .article.has-toc .toc {
    grid-column: 2;
    grid-row: 2 / span 2;
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow: auto;
    margin: 0;
    overscroll-behavior: contain;
  }
  .toc summary { pointer-events: none; list-style: none; }
  .toc summary::-webkit-details-marker { display: none; }
}

/* ---------- pager ---------- */

.pager {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  margin: 3.5rem 0 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--ink);
  font-family: var(--display);
  font-size: 1rem;
  line-height: 1.3;
  max-width: var(--measure);
}
.pager a {
  flex: 0 1 48%;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}
.pager a:hover { color: var(--red); }
.pager small {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.pager .next { margin-left: auto; text-align: right; }

/* ---------- prosa ---------- */

.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.15em; }
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: 0;
  margin: 2.3em 0 0.7em;
  scroll-margin-top: 1rem;
  text-wrap: balance;
}
.prose h1 { font-size: 2rem; letter-spacing: -0.005em; }
.prose h2 { font-size: 1.6rem; }
.prose h2::before {
  content: "";
  display: block;
  width: var(--motif-s-w);
  height: 0.375rem;
  background: var(--motif-s);
  margin-bottom: 0.85rem;
}
.prose h3 { font-size: 1.25rem; }
.prose h4 { font-size: 0.85rem; }
.prose h5, .prose h6 { font-size: 1rem; }
.prose h1 + h2::before, .prose h2 + h3, .prose h3 + h4 { margin-top: 1em; }

.prose blockquote {
  margin: 1.6em 0;
  padding: 0.1em 0 0.1em 1.35em;
  border-left: 2px solid var(--red);
  color: var(--ink-2);
  font-size: 0.96em;
}
.prose blockquote p:last-child { margin-bottom: 0; }

.prose ul, .prose ol { padding-left: 1.5em; margin: 0 0 1.15em; }
.prose li { margin: 0.35em 0; }
.prose li > ul, .prose li > ol { margin: 0.35em 0 0.35em; }
.prose ul { list-style: square; }
.prose ::marker { color: var(--red); }
.prose li.obra-libro::marker { color: var(--ink); }
.prose .clave-listado { margin-top: 2.2rem; padding-top: 0.8rem; border-top: 1px solid var(--rule, #d8d2c6); font-size: 0.86rem; color: var(--ink-2); }
.prose .clave-listado .v { display: inline-block; width: 0.6em; height: 0.6em; margin: 0 0.35em 0.08em 0; vertical-align: middle; background: var(--red); }
.prose .clave-listado .v.negra { background: var(--ink); }
.prose ol ::marker { font-family: var(--display); font-weight: 600; }

.prose figure { margin: 2em 0; text-align: center; }
.prose figcaption {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.7em;
}

.prose hr {
  border: 0;
  width: var(--motif-w);
  height: var(--sq);
  background: var(--motif);
  margin: 3.25em auto;
}

.prose code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--paper-2);
  padding: 0.1em 0.3em;
}
.prose pre {
  overflow-x: auto;
  background: var(--paper-2);
  padding: 1em 1.25em;
  border-left: 2px solid var(--ink);
}
.prose pre code { background: none; padding: 0; }

.prose u { text-decoration-color: var(--red); text-underline-offset: 0.15em; }
.prose sup { line-height: 0; }

.table-wrap { overflow-x: auto; margin: 1.6em 0; }
.prose table {
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 0.88rem;
  line-height: 1.4;
  min-width: 50%;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.prose th, .prose td {
  padding: 0.55em 0.85em;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}
.prose thead th { border-bottom: 1px solid var(--ink); font-size: 0.72rem; padding-top: 0.75em; }
.prose tbody tr:nth-child(even) { background: var(--paper-2); }
.text-right { text-align: right !important; }
.text-center { text-align: center !important; }

/* notas al pie */
.fn-ref {
  font-family: var(--sans);
  font-size: 0.68em;
  line-height: 0;
  vertical-align: super;
}
.fn-ref a { text-decoration: none; font-weight: 700; padding: 0 0.1em; }
.footnotes {
  margin-top: 3.5em;
  padding-top: 1.75em;
  border-top: 1px solid var(--rule);
  font-size: 0.86em;
  line-height: 1.5;
  color: var(--ink-2);
  position: relative;
}
.footnotes::before {
  content: "";
  position: absolute;
  top: -0.19rem;
  left: 0;
  width: var(--motif-s-w);
  height: 0.375rem;
  background: var(--motif-s);
  box-shadow: 0 0 0 0.3rem var(--paper);
}
.footnotes ol { padding-left: 1.6em; margin: 0; }
.footnotes li { margin-bottom: 0.7em; }
.footnotes li p { margin-bottom: 0.5em; }
.footnote-backref { text-decoration: none; font-family: var(--sans); }
.footnotes li:target, .fn-ref:target a {
  background: color-mix(in srgb, var(--red) 12%, transparent);
  outline: 0.35em solid color-mix(in srgb, var(--red) 12%, transparent);
}

/* ---------- portada ---------- */

.home-prose { max-width: none; margin-top: 2.5rem; }
.home-prose > figure:first-child {
  margin: 0 auto 2.75rem;
  max-width: 52rem;
}
.home-prose > figure:first-child img { display: block; width: 100%; }
.home-prose > figure:first-child figcaption { text-align: right; }
.home-prose > p {
  font-size: 1.25rem;
  line-height: 1.5;
  max-width: var(--measure);
}
.home-prose > ul {
  list-style: none;
  padding: 0;
  margin: 2.25rem 0 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  gap: 1.5rem;
}
.home-prose > ul > li {
  margin: 0;
  padding: 1.4rem 1.5rem 1.5rem;
  font-size: 0.98rem;
  line-height: 1.55;
}
.home-prose > ul > li > a:first-child {
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}
.home-prose > ul > li > a:first-child + br { display: none; }
.home-prose > ul > li > a:first-child:hover { color: var(--red); }

/* ---------- índices de sección ---------- */

.index-page .article-body { max-width: 60rem; }
.index-page .prose > ul, .index-page .prose > ol { max-width: var(--measure); }
.index-page .prose li { margin: 0.5em 0; }

/* ---------- impresión ---------- */

@media print {
  html, body { background: #fff; color: #000; font-size: 11pt; }
  .site-header, .site-footer, .toc, .pager, .skip-link, .button, .breadcrumb { display: none !important; }
  .article-body, .article-header { max-width: none; }
  a { color: inherit; text-decoration: none; }
  .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; color: #555; }
}

/* ---------- colecciones (Communia) ---------- */

.article-meta time { font-variant-numeric: tabular-nums; }
.article-meta .category {
  font-size: 0.72rem;
  text-decoration: none;
  color: var(--red-2);
}
.article-meta .category:hover { color: var(--red); }

.article-footer { max-width: var(--measure); margin-top: 2.5rem; }
.tags {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.tags a {
  display: inline-block;
  font-family: var(--display);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 0.25em 0.65em 0.15em;
  text-decoration: none;
  background: var(--surface);
}
.tags a:hover { border-color: var(--red); background: var(--red); color: #fff; }

/* cajas "lee también" heredadas del blog */
.prose #destacado, .prose .destacado {
  font-family: var(--sans);
  font-size: 0.9rem;
  line-height: 1.55;
  padding: 1em 1.3em;
  margin: 1.9em 0;
}
.prose #destacado ul, .prose .destacado ul { margin: 0.5em 0 0; padding-left: 1.2em; }
.prose #destacado p:last-child, .prose .destacado p:last-child { margin-bottom: 0; }
.prose iframe { max-width: 100%; }

/* índices cronológicos */
.listing-body { max-width: 60rem; }
.listing-body h2 {
  font-size: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem;
}
.listing-body h2::before { flex-basis: 100%; }
.listing-body h2 small {
  font-size: 0.7rem;
  color: var(--muted);
}
.listing-body h3 {
  font-size: 0.74rem;
  color: var(--muted);
  margin: 1.9em 0 0.5em;
}
.entries {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5em;
  border-top: 1px solid var(--ink);
}
.entries li {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  column-gap: 0.85rem;
  align-items: baseline;
  padding: 0.55rem 0;
  margin: 0;
  border-bottom: 1px solid var(--rule);
}
.entries time {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  color: var(--red-2);
  text-align: right;
  white-space: nowrap;
}
.entries li > a:first-of-type {
  color: var(--ink);
  text-decoration: none;
  font-size: 1.02rem;
  line-height: 1.38;
}
.entries li > a:first-of-type:hover { color: var(--red); }
.entries .cat {
  font-size: 0.66rem;
  color: var(--muted);
  text-decoration: none;
  margin-left: 0.6rem;
  white-space: nowrap;
}
.entries .cat:hover { color: var(--red); }
.listing:not(.featured) .toc ol { columns: 2; column-gap: 1rem; }
.listing .toc li { break-inside: avoid; }
@media (max-width: 480px) {
  .entries li { grid-template-columns: 2.2rem minmax(0, 1fr); }
  .entries .cat { display: block; margin: 0.2rem 0 0; }
}

/* ---------- diccionarios ---------- */

.dictionary-intro { margin-bottom: 2rem; }
.dictionary-intro p { font-size: 1.12rem; }

/* cajas [info] del blog: mismo estilo que «Lee también», con sus títulos y listas dentro */
.prose .destacado.info > :first-child { margin-top: 0; }
.prose .destacado.info > :last-child { margin-bottom: 0; }
.prose .destacado.info h2, .prose .destacado.info h3 { font-size: 1.1rem; margin: 1em 0 0.5em; }
.prose .destacado.info h2::before { display: none; }
.prose .destacado.info ol, .prose .destacado.info ul { margin: 0.5em 0; padding-left: 1.4em; }

/* ---------- índice temático de una colección ---------- */

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 1.25rem;
  margin: 0 0 2rem;
}
.cat-card { padding: 1.05rem 1.2rem 1.1rem; }
.listing-body .cat-card h3 {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  margin: 0;
}
.cat-card h3 a { color: var(--ink); text-decoration: none; }
.cat-card h3 a:hover { color: var(--red); }
.cat-card .cat-meta {
  font-size: 0.66rem;
  color: var(--muted);
  margin: 0.3rem 0 0.65rem;
}
.cat-card ul { list-style: none; padding: 0; margin: 0; font-size: 0.88rem; line-height: 1.38; }
.cat-card li { margin: 0.35em 0; padding-top: 0.35em; border-top: 1px solid var(--rule); }
.cat-card li a { color: var(--ink-2); text-decoration: none; }
.cat-card li a:hover { color: var(--red); }

/* ---------- imágenes de los artículos de Communia: alineadas a la derecha, con el texto a su izquierda ---------- */

.in-collection .article-body { display: flow-root; }
.in-collection .prose figure,
.in-collection .prose p > img,
.in-collection .prose p > a > img {
  float: right;
  clear: right;
  max-width: min(46%, 24rem);
  margin: 0.35em 0 1.1em 1.75em;
}
.in-collection .prose figure { width: fit-content; text-align: left; }
.in-collection .prose figure img { display: block; max-width: 100%; }
.in-collection .prose figcaption { text-align: left; font-size: 0.78rem; line-height: 1.4; margin-top: 0.5em; }
/* una sección nueva, las cajas y las tablas no empiezan al lado de la imagen anterior */
.in-collection .prose h2,
.in-collection .prose table,
.in-collection .prose pre,
.in-collection .prose iframe,
.in-collection .prose #destacado,
.in-collection .prose .destacado,
.in-collection .prose .footnotes { clear: both; }
@media (max-width: 640px) {
  .in-collection .prose figure,
  .in-collection .prose p > img,
  .in-collection .prose p > a > img {
    float: none;
    max-width: 100%;
    margin: 1.5em auto;
  }
  .in-collection .prose figure { width: auto; text-align: center; }
  .in-collection .prose figure img { margin: 0 auto; }
  .in-collection .prose figcaption { text-align: center; }
  .in-collection .prose p > img, .in-collection .prose p > a > img { display: block; }
}
@media print {
  .in-collection .prose figure, .in-collection .prose p > img, .in-collection .prose p > a > img { max-width: 40%; }
}

.dictionary-tools {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--paper);
  padding: 0.75rem 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--ink);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 2rem;
}
.dict-search { display: flex; align-items: center; gap: 0.75rem; flex: 1 1 22rem; }
.dict-search label {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}
.dict-search input {
  flex: 1;
  font: inherit;
  font-family: var(--sans);
  font-size: 1rem;
  padding: 0.55em 0.85em;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  min-width: 0;
}
.dict-search input:focus { outline: 2px solid var(--red); outline-offset: 1px; }
.letters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.95rem;
}
.letters a {
  display: inline-block;
  min-width: 1.8rem;
  padding: 0.3rem 0.3rem 0.2rem;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 2px solid transparent;
}
.letters a:hover { color: var(--red); border-color: var(--red); }

.letter-group { scroll-margin-top: 5.5rem; }
.letter {
  font-family: var(--display);
  font-size: 2.5rem;
  font-weight: 600;
  line-height: 1;
  color: var(--red);
  margin: 2.25rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--ink);
}
.terms { margin: 0; }
.term {
  display: grid;
  grid-template-columns: minmax(0, 20rem) minmax(0, 1fr);
  gap: 0.35rem 2rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}
.term dt a {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.25;
  color: var(--ink);
  text-decoration: none;
}
.term dt a:hover span { color: var(--red); }
.term dt img {
  width: 5.5rem;
  height: 2.75rem;
  object-fit: cover;
  flex: none;
  border-radius: 0;
  filter: saturate(0.85);
}
.term dd { margin: 0; color: var(--ink-2); font-size: 0.98rem; line-height: 1.5; }
.no-results { font-family: var(--sans); color: var(--muted); padding: 2rem 0; }
@media (max-width: 720px) {
  .term { grid-template-columns: 1fr; }
  .dictionary-tools { position: static; }
}

.illustration { margin: 0 0 2em; }
.illustration img { display: block; width: 100%; height: auto; }
.related h2 {
  font-size: 0.74rem;
  color: var(--muted);
  margin: 0 0 0.7rem;
}
.dictionary .article-header { margin-bottom: 1.5rem; }

/* recuadro con la entrada equivalente en la otra edición del diccionario */
.prose .destacado.translation { margin-top: 2.5em; }
.prose .destacado.translation p { margin: 0 0 0.3em; }
.prose .destacado.translation a { font-weight: 600; }

/* ---------- /libros: catálogo de la colección impresa ---------- */

.prose .libro {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 1.4rem 1.9rem;
  align-items: start;
  margin: 2.6rem 0;
  padding-top: 2.2rem;
  border-top: 1px solid var(--ink);
}
.prose .libro-portada {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,.22), 0 8px 20px rgba(0,0,0,.14);
  line-height: 0;
}
.prose .libro-portada img { display: block; width: 100%; height: auto; }
.prose .libro-portada.proximamente img { filter: saturate(.7) brightness(.92); }
.prose .libro-portada.proximamente::after {
  content: attr(data-etiqueta);
  position: absolute;
  top: 17%;
  left: -32%;
  width: 164%;
  transform: rotate(-32deg);
  padding: .28em 0;
  background: var(--red);
  color: #fff;
  font: 600 .72rem/1.9 var(--display);
  letter-spacing: .14em;
  text-transform: uppercase;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
  pointer-events: none;
}
.prose h2.libro-titulo {
  margin: 0 0 .3em;
  font-size: 1.45rem;
  letter-spacing: 0;
}
.prose h2.libro-titulo::before { content: none; }
.prose h2.libro-titulo a { color: var(--ink); text-decoration: none; }
.prose h2.libro-titulo a:hover { color: var(--red-2); }
.prose h2.libro-titulo small {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--red-2);
  margin-top: .45em;
}
.prose .libro-subtitulo {
  font-style: italic;
  color: var(--ink-2);
  margin-bottom: .9em;
}
.prose .libro-texto p { margin-bottom: .85em; }
.prose .libro-datos {
  font-family: var(--sans);
  font-size: .82rem;
  color: var(--muted);
}
.prose .libro-compra { margin: 0; }
.prose .libro-compra .button.button-proximo { border-style: dashed; color: var(--ink-2); }
.prose .libro-compra .button.button-proximo:hover { color: #fff; }
.prose .libro-nota {
  margin-top: 2.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
  font-size: .95rem;
  color: var(--ink-2);
}
@media (max-width: 560px) {
  .prose .libro { grid-template-columns: 112px 1fr; gap: 1rem 1.1rem; }
  .prose .libro-portada.proximamente::after { font-size: .62rem; }
  .prose h2.libro-titulo { font-size: 1.2rem; }
  .prose .libro-texto p:not(.libro-subtitulo):not(.libro-datos):not(.libro-compra) { grid-column: 1 / -1; }
}

/* portada: miniatura del libro en el recuadro de novedades */
.prose .destacado.info .novedad-portada {
  float: right;
  width: 104px;
  margin: 0 0 .6rem 1.3rem;
  line-height: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,.22), 0 6px 16px rgba(0,0,0,.14);
}
.prose .destacado.info .novedad-portada a { display: block; line-height: 0; }
.prose .destacado.info .novedad-portada img { display: block; width: 100%; height: auto; }
.prose .destacado.info::after { content: ""; display: block; clear: both; }
@media (max-width: 560px) {
  .prose .destacado.info .novedad-portada { width: 76px; margin-left: .9rem; }
}

/* portada: novedades y blog en dos columnas */
.home-prose .portada-columnas {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 1.5rem;
  margin: 1.75em 0;
  align-items: stretch;
}
.home-prose .portada-columnas > .destacado { margin: 0; }
.prose .blog-caja {
  font-family: var(--sans);
  font-size: 0.9rem;
  line-height: 1.55;
  padding: 1em 1.3em;
}
.prose .blog-caja header { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.4rem; }
.prose .blog-caja header img { width: 56px; height: 56px; border-radius: 0; flex: none; }
.prose .blog-caja h2 { font-size: 1.1rem; margin: 0; }
.prose .blog-caja h2::before { display: none; }
.prose .blog-caja h2 a { color: var(--ink); text-decoration: none; }
.prose .blog-caja h2 a:hover { color: var(--red); }
.prose .blog-caja ul { list-style: none; padding: 0; margin: 0; }
.prose .blog-caja li { padding: 0.5em 0; border-top: 1px solid var(--rule); }
.prose .blog-caja li a { font-weight: 600; color: var(--ink); text-decoration: none; }
.prose .blog-caja li a:hover { color: var(--red); }
.prose .blog-caja time { display: block; font-size: 0.78rem; color: var(--muted); margin-top: 0.15em; }
.prose .blog-caja > p { margin: 0; }
@media (max-width: 860px) {
  .home-prose .portada-columnas { grid-template-columns: 1fr; }
}

/* portada: varias miniaturas de libros juntas en el recuadro de novedades */
.prose .destacado.info .novedad-portadas {
  display: flex;
  gap: .55rem;
  width: auto;
  box-shadow: none;
}
.prose .destacado.info .novedad-portadas a {
  width: 84px;
  box-shadow: 0 1px 2px rgba(0,0,0,.22), 0 6px 16px rgba(0,0,0,.14);
}
@media (max-width: 560px) {
  .prose .destacado.info .novedad-portadas { float: none; width: auto; margin: 0 0 .8rem; }
  .prose .destacado.info .novedad-portadas a { width: 72px; }
}

/* índice de cada documento bajo su enlace en los índices de sección (/archivo) */
.prose li .indice-doc {
  display: block;
  margin: .15rem 0 .35rem;
  font-size: .8rem;
  line-height: 1.45;
  color: var(--muted);
}
.prose li .indice-doc a { color: inherit; text-decoration: none; }
.prose li .indice-doc a:hover { color: var(--red); text-decoration: underline; }
.prose li .indice-doc-de { font-weight: 600; }

/* El atributo hidden debe ganar siempre a los display de las reglas de componentes (buscador del diccionario, etc.) */
[hidden] { display: none !important; }

/* portada de adler.school y páginas de los autores: retrato en acuarela en la primera de tres columnas, cajas de
   secciones en las otras dos (.sin-retrato: solo cajas, a todo el ancho) */
.prose:has(> .portada-secciones), .article-body:has(> .portada-secciones) { max-width: none; }
.article-body:has(> .portada-secciones) > p, .prose:has(> .portada-secciones) > p { max-width: var(--measure); }
.portada-secciones {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1.5rem;
  margin: 0 0 3.5rem;
  align-items: start;
}
.portada-secciones > ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.portada-secciones > ul > li {
  margin: 0;
  padding: 1.4rem 1.5rem 1.5rem;
  font-size: 0.98rem;
  line-height: 1.55;
}
.portada-secciones > ul > li > a:first-child,
.portada-secciones > ul > li .caja-titulo {
  display: block;
  margin-bottom: 0.55rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}
.portada-secciones > ul > li > a:first-child + br,
.portada-secciones > ul > li .caja-titulo + br { display: none; }
.portada-secciones > ul > li > a:first-child:hover,
.portada-secciones > ul > li .caja-titulo:hover { color: var(--red); }
.portada-secciones.sin-retrato { grid-template-columns: 1fr; }
.portada-secciones.sin-retrato > ul { grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
/* portada: el logotipo y los dos párrafos de apertura, uno en cada columna */
.portada-columna { display: flex; flex-direction: column; gap: 0.75rem; }
.portada-logo { display: block; margin: 0; }
.portada-logo img { display: block; width: 100%; height: auto; }
@media (max-width: 680px) {
  .portada-logo img { max-width: 20rem; margin: 0 auto; }
}
.portada-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem 3rem;
  margin: 0 0 1rem;
  font-size: 1.05rem;
  line-height: 1.6;
}
.portada-intro > p { margin: 0; max-width: none; }
@media (max-width: 680px) {
  .portada-intro { grid-template-columns: 1fr; }
}
.portada-retrato { margin: 0; }
.portada-retrato img { display: block; width: 100%; height: auto; }
.portada-retrato figcaption { font-size: 0.8rem; color: var(--muted); margin-top: 0.6rem; text-align: left; padding-left: 1.1rem; position: relative; }
.portada-retrato figcaption::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.4em;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--red);
}
@media (max-width: 1000px) {
  .portada-secciones > ul { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .portada-secciones { grid-template-columns: 1fr; }
  .portada-retrato { max-width: 22rem; margin: 0 auto; }
}
