/* DISEÑO B · Barroco: azul de Prusia, granate y oro viejo.
   Filigranas (cenefas, esquineras y capitulares) solo en títulos y piezas destacadas. */
:root {
  --marfil: #f3efe6; --papel: #fbf8f2; --tinta: #1a2238; --tinta-suave: #4d5571;
  --filete: #d6ccb9; --burdeos: #7c1c33; --burdeos-suave: #f1e0e3;
  --azul: #172645; --azul-medio: #24396a; --sobre-azul: #f3ead8; --oro: #a8854a; --granate: #6f1a2f;
  --f-capitular: "Cinzel Decorative", "Cormorant Garamond", Garamond, serif;
  --filigrana: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%20240%2030%27%3E%3Cg%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%271.3%27%20stroke-linecap%3D%27round%27%3E%3Cpath%20d%3D%27M6%2015%20H66%20C78%2015%2082%206%2091%206%20C99%206%20101%2013%2096%2015.5%20C92%2017.5%2088%2013.5%2091.5%2011%20M66%2015%20C78%2015%2083%2024%2092%2024%20C98%2024%20101%2020%2099%2017.5%20M100%2015%20H107%27/%3E%3Cpath%20transform%3D%27matrix%28-1%200%200%201%20240%200%29%27%20d%3D%27M6%2015%20H66%20C78%2015%2082%206%2091%206%20C99%206%20101%2013%2096%2015.5%20C92%2017.5%2088%2013.5%2091.5%2011%20M66%2015%20C78%2015%2083%2024%2092%2024%20C98%2024%20101%2020%2099%2017.5%20M100%2015%20H107%27/%3E%3C/g%3E%3Cpath%20d%3D%27M120%204%20L128%2015%20L120%2026%20L112%2015%20Z%27%20fill%3D%27black%27/%3E%3Ccircle%20cx%3D%27109.5%27%20cy%3D%2715%27%20r%3D%271.8%27/%3E%3Ccircle%20cx%3D%27130.5%27%20cy%3D%2715%27%20r%3D%271.8%27/%3E%3C/svg%3E");
  --esquinera: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2048%2048%27%3E%3Cg%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%271.3%27%20stroke-linecap%3D%27round%27%3E%3Cpath%20d%3D%27M3%2045%20V16%20C3%208%208%203%2016%203%20H45%27/%3E%3Cpath%20d%3D%27M9%2045%20V20%20C9%2014%2014%209%2020%209%20H45%27/%3E%3Cpath%20d%3D%27M16%2016%20C20%2011%2028%2013%2026%2019%20C24.5%2023%2019%2022%2020.5%2018.5%27/%3E%3C/g%3E%3Ccircle%20cx%3D%273%27%20cy%3D%273%27%20r%3D%272.2%27/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --marfil: #0f1628; --papel: #162036; --tinta: #ece4d4; --tinta-suave: #aeb3c4; --filete: #2c3652;
    --burdeos: #e3949f; --burdeos-suave: #3b2030; --azul: #0a1020; --azul-medio: #1b2a4d; --sobre-azul: #f0e6d2; --oro: #c9a96a; --granate: #4c1121;
  }
}
:root[data-theme="dark"] {
  --marfil: #0f1628; --papel: #162036; --tinta: #ece4d4; --tinta-suave: #aeb3c4; --filete: #2c3652;
  --burdeos: #e3949f; --burdeos-suave: #3b2030; --azul: #0a1020; --azul-medio: #1b2a4d; --sobre-azul: #f0e6d2; --oro: #c9a96a; --granate: #4c1121;
}

/* Ornamentos reutilizables */
.orna, .encabezado h1::after, .seccion > h2::after, .pensamiento::after, .articulo h1::after {
  content: ""; display: block; height: 1.1rem; width: min(15rem, 80%);
  background: var(--oro); -webkit-mask: var(--filigrana) center / contain no-repeat; mask: var(--filigrana) center / contain no-repeat;
}

/* Cabecera y menú en azul */
body::before { background: var(--azul); }
.cabecera, .navegacion { background: var(--azul); color: var(--sobre-azul); border-bottom: 0; }
.navegacion { border-top: 1px solid color-mix(in srgb, var(--oro) 45%, transparent); border-bottom: 3px double var(--oro); }
.marca { color: var(--sobre-azul); }
.marca-texto { font-style: italic; letter-spacing: .01em; }
.marca-texto small { color: var(--oro); font-style: normal; }
.cabecera .sombrero { color: var(--oro); }
.idiomas { border-color: color-mix(in srgb, var(--oro) 60%, transparent); }
.idiomas button { color: var(--sobre-azul); }
.idiomas button[aria-pressed="true"] { background: var(--oro); color: var(--azul); }
.boton-menu { color: var(--sobre-azul); border-color: var(--oro); }
.navegacion a { color: color-mix(in srgb, var(--sobre-azul) 80%, transparent); }
.navegacion a:hover { color: var(--sobre-azul); }
.navegacion a[aria-current="page"] { color: var(--oro); border-bottom-color: var(--oro); }

/* Encabezados centrados con cenefa */
.encabezado { justify-items: center; text-align: center; margin-inline: auto; }
.encabezado h1 { color: var(--azul-medio); display: grid; justify-items: center; gap: .7rem; }
.encabezado h1::after, .articulo h1::after { margin-top: .2rem; }
.encabezado .entradilla { margin-inline: auto; }
.seccion > h2 { display: grid; justify-items: center; text-align: center; border-bottom: 0; color: var(--azul-medio); gap: .4rem; }
.seccion > h2 a { order: 3; }
.dos-col .seccion > h2, .seccion > h2 { font-style: italic; }
h3 { color: var(--azul-medio); }
.rotulo { color: var(--granate); }
:root[data-theme="dark"] .rotulo { color: var(--oro); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rotulo, :root:not([data-theme="light"]) h3, :root:not([data-theme="light"]) .encabezado h1, :root:not([data-theme="light"]) .seccion > h2 { color: var(--oro); } }
:root[data-theme="dark"] h3, :root[data-theme="dark"] .encabezado h1, :root[data-theme="dark"] .seccion > h2 { color: var(--oro); }

/* Portada */
.portada h1 { color: var(--azul-medio); font-style: normal; }
.portada h1 em { color: var(--burdeos); }
.portada figure { padding: .7rem; border: 1px solid var(--oro); outline: 1px solid var(--oro); outline-offset: -6px; background: var(--papel); }
.portada figure::before, .portada figure::after { content: ""; position: absolute; width: 2.6rem; height: 2.6rem; background: var(--oro);
  -webkit-mask: var(--esquinera) center / contain no-repeat; mask: var(--esquinera) center / contain no-repeat; }
.portada figure::before { top: -.9rem; left: -.9rem; }
.portada figure::after { bottom: 1.1rem; right: -.9rem; transform: rotate(180deg); }

/* Pensamiento: cartela granate */
.pensamiento { background: var(--granate); color: var(--sobre-azul); border: 0; text-align: center; justify-items: center; position: relative;
  outline: 1px solid var(--oro); outline-offset: -10px; padding-block: 2.6rem; }
.pensamiento .rotulo, .pensamiento .autor { color: var(--oro); }
.pensamiento .original { color: color-mix(in srgb, var(--sobre-azul) 75%, transparent); }
.pensamiento .cita { max-width: 46rem; }
.pensamiento::after { margin-top: .4rem; }

/* Piezas destacadas con esquineras */
.destacada, .ficha { position: relative; }
.destacada { border: 1px solid var(--oro); outline: 1px solid var(--filete); outline-offset: 5px; }
.destacada::before, .destacada::after { content: ""; position: absolute; width: 2.4rem; height: 2.4rem; background: var(--oro);
  -webkit-mask: var(--esquinera) center / contain no-repeat; mask: var(--esquinera) center / contain no-repeat; }
.destacada::before { top: .45rem; left: .45rem; }
.destacada::after { bottom: .45rem; right: .45rem; transform: rotate(180deg); }
.ficha { border-top: 2px solid var(--oro); }

/* Capitulares */
.articulo .prosa p:first-child::first-letter, .vista > .dos-col > .prosa > p:first-child::first-letter {
  font-family: var(--f-capitular); float: left; font-size: 3.9rem; line-height: .82; padding: .35rem .55rem 0 0; color: var(--burdeos); }
.articulo h1 { display: grid; gap: .7rem; color: var(--azul-medio); }

/* Botones */
.boton { border-color: var(--azul-medio); color: var(--azul-medio); }
.boton.lleno { background: var(--azul-medio); color: var(--sobre-azul); border-color: var(--azul-medio); box-shadow: inset 0 0 0 3px var(--azul-medio), inset 0 0 0 4px var(--oro); }
.filtros button[aria-pressed="true"] { border-color: var(--granate); color: var(--burdeos); }
.etiqueta { color: var(--burdeos); }

/* Boletín en azul */
.boletin { background: var(--azul); color: var(--sobre-azul); outline: 1px solid var(--oro); outline-offset: -8px; }
.boletin h2 { color: var(--oro); font-style: italic; }
.boletin .boton { border-color: var(--oro); color: var(--oro); }
.boletin .aviso-form { color: var(--sobre-azul); }

/* Línea del tiempo y tabla */
.linea { border-left-color: var(--oro); }
.linea li::before { border-color: var(--oro); transform: rotate(45deg); border-radius: 0; background: var(--papel); }
.respuestas tr:last-child td { color: var(--burdeos); }

/* Pie */
.pie { background: var(--azul); color: var(--sobre-azul); border-top: 3px double var(--oro); }
.pie .sombrero { color: var(--oro); }
.pie .envoltura { align-items: center; }
.seccion > h2 { justify-items: start; text-align: left; }
.seccion > h2::after { width: 10rem; background-position: left center; -webkit-mask-position: left center; mask-position: left center; }
.portada figure::after { bottom: -.9rem; }
