/*!
 * Legajo — tema para Omeka Classic
 * Archivo personal · papel cálido, tinta azul noche, turquesa y brasa.
 * GPLv3
 */

:root {
  --brand: #1b86a8;
  --ink: #13222e;
  --ember: #b8472a;
  --ochre: #c79a3b;

  --bg: #fdfcf8;
  --bg-2: #f4f1ea;
  --card: #ffffff;
  --text: #13222e;
  --text-soft: #56626c;
  --line: #e6e2d8;
  --link: color-mix(in srgb, var(--brand) 82%, #000);
  --accent-ink: var(--ember);
  --strong-line: var(--ink);
  --footer-bg: var(--ink);
  --shadow: 0 1px 2px rgba(19,34,46,.06), 0 8px 24px -12px rgba(19,34,46,.18);

  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 72rem;
  --radius: 14px;
  color-scheme: light;
}

/* Oscuro: sigue al sistema salvo que la persona haya elegido "claro" con el botón.
   (El botón escribe data-theme="light|dark" en <html>; no hay reglas !important.) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1e2c3a;
    --bg-2: #273849;
    --card: #273849;
    --text: #eae6df;
    --text-soft: #9fb0ba;
    --line: #33465a;
    --link: #5bc0de;
    --accent-ink: #f0a07f;
    --strong-line: #3e556b;
    --footer-bg: #0a131a;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 28px -12px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #1e2c3a;
    --bg-2: #273849;
    --card: #273849;
    --text: #eae6df;
    --text-soft: #9fb0ba;
    --line: #33465a;
    --link: #5bc0de;
    --accent-ink: #f0a07f;
    --strong-line: #3e556b;
    --footer-bg: #0a131a;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 28px -12px rgba(0,0,0,.6);
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--ember); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; font-variation-settings: "opsz" 96; }
p { margin: 0 0 1em; }
ul, ol { padding: 0; margin: 0; }
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.muted { color: var(--text-soft); }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .25s, box-shadow .25s;
}
.site-header.is-stuck { border-color: var(--line); box-shadow: 0 6px 20px -16px rgba(0,0,0,.4); }
.site-header__bar { display: flex; align-items: center; gap: 1.5rem; min-height: 4.5rem; }
.brand { display: inline-flex; align-items: center; text-decoration: none; margin-right: auto; }
.brand__logo { height: 3.25rem; width: auto; }
.brand__text { font: 500 1.5rem/1 var(--serif); color: var(--text); letter-spacing: -.02em; }
.site-nav ul { list-style: none; display: flex; gap: .25rem; }
.site-nav a {
  display: block; padding: .5rem .85rem; border-radius: 999px; text-decoration: none;
  font: 500 .8rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--text);
  transition: background .2s, color .2s;
}
.site-nav a:hover { background: var(--bg-2); color: var(--text); }
.site-nav li.active a { background: var(--ink); color: #fff; }
.site-header__tools { display: flex; gap: .25rem; }
.icon-btn { appearance: none; border: 0; background: transparent; color: var(--text); width: 2.6rem; height: 2.6rem; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { background: var(--bg-2); }
.nav-toggle { display: none; align-content: center; gap: 4px; }
.nav-toggle span { display: block; width: 18px; height: 1.5px; background: currentColor; transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.search-panel { border-top: 1px solid var(--line); background: var(--bg); }
.search-panel__inner { display: flex; align-items: center; gap: 1rem; padding-block: 1rem; flex-wrap: wrap; }
.search-panel__inner form { flex: 1 1 22rem; }
.search-panel__advanced { font-size: .85rem; }

/* Formularios de búsqueda */
#search-form { display: flex; gap: .5rem; margin: 0; }
#search-form > div, #search-form fieldset { display: contents; }
#search-form input[type="text"], #search-form input[type="search"] {
  flex: 1; min-width: 0; font: inherit; color: var(--text); background: var(--card);
  border: 1px solid var(--line); border-radius: 999px; padding: .75rem 1.2rem;
}
#search-form input[type="text"]:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent); }
#search-form button, #search-form input[type="submit"] {
  font: 600 .8rem var(--sans); letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
  border: 0; border-radius: 999px; padding: 0 1.4rem; background: var(--ink); color: #fff;
}
#search-form button:hover { background: var(--ember); }

/* ---------- Portada ---------- */
.hero { position: relative; isolation: isolate; color: #fff; min-height: min(82vh, 40rem); display: grid; align-items: end; overflow: hidden; background: var(--ink) center / cover no-repeat; }
.hero--drawn { background-image: linear-gradient(180deg, #8a3524 0%, #6b3a3f 26%, #2c3c52 62%, #0f2230 100%); }
.hero--image::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10,20,28,.35) 0%, rgba(10,20,28,.55) 45%, rgba(10,20,28,.9) 100%); }
.hero__rocks { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 38%; z-index: -1; }
.hero__inner { padding-block: 6rem 4.5rem; max-width: var(--wrap); }
.hero__title { font-size: clamp(2.6rem, 7vw, 5.4rem); font-weight: 350; line-height: 1.02; letter-spacing: -.025em; margin: .15em 0 .35em; max-width: 14ch; text-wrap: balance; }
.hero__sub { font-size: clamp(1.05rem, 2vw, 1.35rem); line-height: 1.55; max-width: 36rem; color: rgba(255,255,255,.88); }
.hero__search { max-width: 34rem; margin-top: 2rem; }
.hero__search #search-form input[type="text"] { background: rgba(255,255,255,.95); color: #13222e; border-color: transparent; padding-block: .95rem; }
.hero__search #search-form button { background: var(--ember); }
.hero__search #search-form button:hover { background: #fff; color: var(--ink); }
.hero__advanced { display: inline-block; margin-top: .75rem; font-size: .85rem; color: rgba(255,255,255,.8); }
.hero__advanced:hover { color: #fff; }
.kicker { font: 600 .72rem/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 .9rem; display: flex; align-items: center; gap: .75rem; }
.kicker::before { content: ""; width: 2rem; height: 1px; background: currentColor; }
.kicker--light { color: #f0c08a; }

.stats { border-bottom: 1px solid var(--line); background: var(--card); }
.stats__inner { display: flex; flex-wrap: wrap; gap: .5rem 2.5rem; padding-block: 1.1rem; font-size: .85rem; letter-spacing: .04em; color: var(--text-soft); }
.stats a { color: inherit; text-decoration: none; }
.stats a:hover { color: var(--ember); }
.stats strong { font: 500 1.6rem/1 var(--serif); color: var(--text); margin-right: .3rem; vertical-align: -.1em; }

/* ---------- Secciones ---------- */
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section--tint { background: var(--bg-2); }
.section__head { margin-bottom: 2rem; }
.section__head--row { display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.section__head h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 400; margin: 0; }
.link-arrow { font: 500 .85rem var(--sans); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; }

.fondos { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr)); }
.fondo { position: relative; background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--tone, var(--brand)); border-radius: var(--radius); padding: 1.6rem 1.5rem 1.3rem; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .3s, box-shadow .3s; }
.fondo:hover { transform: translateY(-4px); }
.fondo__num { font: italic 300 2.6rem/1 var(--serif); color: var(--tone, var(--brand)); margin-bottom: .6rem; }
.fondo__title { font-size: 1.45rem; margin-bottom: .6rem; }
.fondo__title a { color: var(--text); text-decoration: none; }
.fondo__title a:hover { color: var(--tone, var(--ember)); }
.fondo__desc { color: var(--text-soft); font-size: .95rem; }
.fondo__list { list-style: none; margin: .4rem 0 1rem; border-top: 1px solid var(--line); }
.fondo__list li { padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: .93rem; line-height: 1.4; }
.fondo__list li li { border: 0; padding: .3rem 0 0 1rem; font-size: .88rem; position: relative; }
.fondo__list li li::before { content: "↳"; position: absolute; left: 0; color: var(--text-soft); }
.fondo__list ul { list-style: none; margin-top: .25rem; }
.fondo__list a { text-decoration: none; color: var(--text); }
.fondo__list a:hover { color: var(--link); text-decoration: underline; }
.fondo__foot { margin: auto 0 0; display: flex; justify-content: space-between; align-items: center; font: 500 .75rem var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--text-soft); }
.fondo__foot a { font-size: 1.3rem; text-decoration: none; color: var(--tone, var(--brand)); }

/* ---------- Tarjetas ---------- */
.cards { list-style: none; display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); margin-bottom: 2rem; }
.cards--2 { grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .3s, box-shadow .3s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card__media { display: grid; place-items: center; aspect-ratio: 4 / 3; background: var(--bg-2); overflow: hidden; color: var(--text-soft); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.card:hover .card__media img { transform: scale(1.04); }
.placeholder { display: grid; place-items: center; color: var(--text-soft); opacity: .6; }
.card__body { padding: 1.1rem 1.2rem 1.3rem; }
.card__meta { display: flex; flex-wrap: wrap; gap: .25rem .75rem; font: 500 .7rem var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ember); margin-bottom: .5rem; }
.card__meta span + span { color: var(--text-soft); }
.card__title { font-size: 1.15rem; line-height: 1.25; margin-bottom: .4rem; }
.card__title a { color: var(--text); text-decoration: none; }
.card__title a:hover { color: var(--link); }
.card__text { color: var(--text-soft); font-size: .9rem; line-height: 1.55; margin: 0; }
.card--collection { padding: 0; }
.card--collection .card__body { padding: 1.5rem; }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips a { display: block; padding: .4rem .9rem; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--text); font-size: .85rem; text-decoration: none; transition: .2s; }
.chips a:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.chips--big a { font-size: 1rem; padding: .55rem 1.1rem; }

/* ---------- Cabecera de página ---------- */
.page-head { padding-block: 2.5rem 2rem; }
.page-head h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 400; max-width: 24ch; text-wrap: balance; }
.page-head .count { font: 500 .9rem var(--sans); color: var(--text-soft); border: 1px solid var(--line); border-radius: 999px; padding: .15rem .7rem; vertical-align: middle; margin-left: .4rem; }
.page-head__lead { max-width: 40rem; color: var(--text-soft); font-size: 1.1rem; }
.page-head__meta { color: var(--text-soft); font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem; font-size: .8rem; color: var(--text-soft); margin-bottom: 1.6rem; }
.crumbs li + li::before { content: "/"; margin-right: .25rem; opacity: .5; }
.crumbs a { color: var(--text-soft); text-decoration: none; }
.crumbs a:hover { color: var(--ember); }
.crumbs [aria-current] span { color: var(--text); }
.filters ul { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 0; font-size: .85rem; }
.filters li { background: var(--bg-2); border-radius: 999px; padding: .25rem .8rem; }
.filters .filter-label { font-weight: 600; margin-right: .3rem; }

/* ---------- Layouts ---------- */
.layout { display: grid; gap: 2.5rem; padding-bottom: 4rem; }
.layout__side .figure { margin: 0 0 1.5rem; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem; }
.box__title { font: 600 .72rem var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--accent-ink); }
.block { margin-top: 3rem; }
.block__title { font-size: 1.6rem; border-bottom: 1px solid var(--line); padding-bottom: .6rem; margin-bottom: 1.5rem; }
.prose-wrap { padding-bottom: 4rem; }
@media (min-width: 60rem) {
  .layout { grid-template-columns: minmax(16rem, 21rem) minmax(0, 1fr); gap: 4rem; }
  .layout--item { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .layout__side { position: sticky; top: 6rem; align-self: start; }
}

/* ---------- Ficha (metadatos) ---------- */
.ficha .element-set { margin-bottom: 2rem; }
.ficha .element-set > h2 { font: 600 .72rem var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--accent-ink); border-bottom: 2px solid var(--strong-line); padding-bottom: .5rem; margin-bottom: 0; }
.ficha .element { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.ficha .element h3 { font: 600 .72rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--text-soft); margin-bottom: .35rem; }
.ficha .element-text { font-family: var(--serif); font-size: 1.1rem; line-height: 1.6; }
.ficha .element-text p:last-child { margin-bottom: 0; }
.ficha__extra { margin-top: 2rem; }
.ficha__extra h2 { font: 600 .72rem var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--accent-ink); border-bottom: 1px solid var(--line); padding-bottom: .5rem; }
.cita { font-size: .92rem; color: var(--text-soft); background: var(--bg-2); border-left: 3px solid var(--brand); padding: 1rem 1.2rem; border-radius: 0 10px 10px 0; }
.ficha__extra .output-format-list, #item-output-formats ul, .ficha__extra ul.output-format-list { list-style: none; display: flex; gap: .5rem; flex-wrap: wrap; }

.files img { border-radius: 10px; box-shadow: var(--shadow); }
.files .item-file, .files .element-text > div { margin-bottom: 1rem; }
.files > div > div { margin-bottom: 1rem; }
.files--empty { display: grid; place-items: center; gap: .5rem; aspect-ratio: 4 / 3; background: var(--bg-2); border-radius: var(--radius); color: var(--text-soft); text-align: center; }
.files h3 { font: 600 .72rem var(--sans); letter-spacing: .12em; text-transform: uppercase; }

/* ---------- Árbol de colecciones ---------- */
.tree { list-style: none; }
.tree .tree { margin-left: 1rem; padding-left: 1rem; border-left: 1px solid var(--line); }
.tree__link { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; text-decoration: none; color: var(--text); padding: .55rem 0; }
.tree__link:hover .tree__title { color: var(--link); text-decoration: underline; }
.tree__count { flex: none; font: 500 .72rem var(--sans); color: var(--text-soft); background: var(--bg-2); border-radius: 999px; padding: .1rem .6rem; }
.tree--d0 > .tree__item > .tree__link { font: 400 1.5rem/1.2 var(--serif); padding: 1rem 0 .6rem; border-top: 2px solid var(--strong-line); margin-top: 1.2rem; }
.tree--d0 > .tree__item:first-child > .tree__link { margin-top: 0; }
.tree--d1 > .tree__item > .tree__link { border-bottom: 1px solid var(--line); font-size: 1.02rem; }
.tree-wrap { max-width: 48rem; }
.box .tree .tree__link { font-size: .92rem; padding: .4rem 0; }

/* ---------- Utilidades de listado ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; padding-bottom: 1.5rem; margin-bottom: 2rem; border-bottom: 1px solid var(--line); }
.sort { display: flex; align-items: center; gap: .75rem; font-size: .85rem; color: var(--text-soft); }
#sort-links-list { list-style: none; display: flex; gap: .4rem; }
#sort-links-list a { text-decoration: none; padding: .3rem .8rem; border-radius: 999px; border: 1px solid var(--line); color: var(--text); font-size: .82rem; }
#sort-links-list .sorting a { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn { display: inline-block; font: 600 .78rem var(--sans); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; padding: .85rem 1.5rem; border-radius: 999px; background: var(--ink); color: #fff; border: 1px solid var(--ink); transition: .2s; }
.btn:hover { background: var(--ember); border-color: var(--ember); color: #fff; }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.empty { padding: 3rem 0; color: var(--text-soft); font-size: 1.1rem; }
.pager { display: flex; justify-content: space-between; gap: 1rem; padding-block: 2rem 4rem; border-top: 1px solid var(--line); font-size: .95rem; }

.pagination { margin: 2rem 0 4rem; }
.pagination ul, ul.pagination { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; }
.pagination a, .pagination .pagination_current a { display: inline-block; min-width: 2.4rem; text-align: center; padding: .45rem .8rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--text); font-size: .9rem; }
.pagination .pagination_current a, .pagination a:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

.results { list-style: none; margin: 2rem 0; }
.result { display: flex; gap: 1rem; align-items: baseline; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.result__type { flex: none; width: 6rem; font: 600 .7rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ember); }
.result__title { font: 400 1.2rem/1.3 var(--serif); color: var(--text); text-decoration: none; }
.result__title:hover { color: var(--link); text-decoration: underline; }
.search-inline { max-width: 32rem; margin-top: 1rem; }

/* ---------- Búsqueda avanzada ---------- */
#advanced-search-form, form#advanced-search-form { max-width: 52rem; margin: 0 auto 4rem; padding-inline: 1.25rem; }
.advanced-search-content .field { margin-bottom: 1.4rem; }
.advanced-search-content label, .advanced-search-content .label, .advanced-search-content .field-meta { font: 600 .75rem var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--text-soft); }
.advanced-search-content input[type="text"], .advanced-search-content input[type="date"], .advanced-search-content select, .advanced-search-content textarea {
  width: 100%; font: 400 1rem var(--sans); color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .65rem .9rem; margin-top: .3rem;
}
.advanced-search-content .search-entry { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); align-items: end; padding: .8rem; background: var(--bg-2); border-radius: 12px; margin-bottom: .6rem; position: relative; }
.add_search::before { content: "+ Añadir campo"; }
.add_search { font: 600 .8rem var(--sans); border: 1px dashed var(--brand); background: transparent; color: var(--link); border-radius: 999px; padding: .5rem 1.1rem; cursor: pointer; }
.remove_search::before { content: "×"; font-size: 1.3rem; }
.remove_search { border: 0; background: transparent; color: var(--ember); cursor: pointer; }
#page-actions { display: flex; gap: .75rem; padding-top: 1rem; border-top: 1px solid var(--line); }
#page-actions input[type="submit"] { font: 600 .8rem var(--sans); letter-spacing: .1em; text-transform: uppercase; padding: .9rem 1.8rem; border: 0; border-radius: 999px; background: var(--ink); color: #fff; cursor: pointer; }
#page-actions input[type="reset"] { font: 600 .8rem var(--sans); padding: .9rem 1.4rem; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--text); cursor: pointer; }
#advanced-search-form h1, .advanced-search h1 { max-width: 52rem; margin-inline: auto; padding-inline: 1.25rem; }

/* ---------- Pie ---------- */
.site-footer { background: var(--footer-bg); color: #d9d3c5; margin-top: 4rem; }
.site-footer a { color: #fff; }
.site-footer__grid { display: grid; gap: 2.5rem; padding-block: 4rem 3rem; }
.site-footer__title { font: 400 1.7rem var(--serif); color: #fff; margin-bottom: .75rem; }
.site-footer__text { max-width: 28rem; font-size: .95rem; color: #b9c3c9; }
.site-footer__label { font: 600 .7rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: #f0c08a; margin-bottom: 1rem; }
.site-footer__nav ul { list-style: none; display: grid; gap: .5rem; }
.site-footer__nav a { text-decoration: none; opacity: .9; }
.site-footer__nav a:hover { color: #f0c08a; }
.site-footer #search-form input[type="text"] { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.18); }
.site-footer #search-form button { background: var(--ember); }
.site-footer__bottom { border-top: 1px solid rgba(255,255,255,.1); font-size: .8rem; color: #8ea0aa; }
.site-footer__bottom-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding-block: 1.2rem; }
@media (min-width: 52rem) { .site-footer__grid { grid-template-columns: 1.6fr 1fr 1.2fr; gap: 4rem; } }

/* ---------- Móvil ---------- */
@media (max-width: 60rem) {
  .nav-toggle { display: grid; }
  .site-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--line); padding: .5rem 1.25rem 1.2rem; display: none; box-shadow: 0 20px 30px -20px rgba(0,0,0,.4); }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { padding: .9rem .5rem; border-radius: 8px; font-size: .85rem; }
  .brand__logo { height: 2.7rem; }
  .hero__inner { padding-block: 4rem 3rem; }
}

/* ---------- Movimiento ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
@media print {
  .site-header, .site-footer, .pager, .toolbar { display: none; }
  body { background: #fff; color: #000; }
}


/* =====================================================================
   LEGAJO 1.2 — claro/oscuro por variables (sin !important), componentes
   ===================================================================== */

/* ---------- Texto sobre la portada ---------- */
.hero__inner { text-shadow: 0 2px 6px rgba(0,0,0,.45); }
.hero__inner .kicker, .hero__inner .hero__sub, .hero__inner .hero__title { color: #fff; }
.hero__search #search-form input[type="text"] { background: rgba(255,255,255,.96); color: #13222e; }
.hero__search #search-form button { background: var(--ember); }
.hero__search #search-form button:hover { background: #fff; color: var(--ink); }

/* ---------- Botón de tema ---------- */
.theme-toggle {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 60;
  width: 3rem; height: 3rem; padding: 0; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: var(--card); color: var(--text); border: 1px solid var(--line);
  box-shadow: var(--shadow); transition: transform .2s, background .2s;
}
.theme-toggle:hover { transform: scale(1.08); }
.theme-toggle svg { width: 1.3rem; height: 1.3rem; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme]) .theme-toggle .i-moon { display: none; }
}

/* ---------- Buscadores y botones ---------- */
#search-form button, #search-form input[type="submit"] {
  min-width: 7rem; padding: .75rem 1.5rem; background: var(--ember); color: #fff;
  font: 600 .8rem var(--sans); letter-spacing: .08em; text-transform: uppercase;
  border: 0; border-radius: 999px; cursor: pointer; transition: background .2s;
}
#search-form button:hover, #search-form input[type="submit"]:hover { background: color-mix(in srgb, var(--ember) 80%, #fff); }
.btn--sm { padding: .55rem 1.1rem; font-size: .72rem; }
.btn--ember { background: var(--ember); border-color: var(--ember); }
.btn--ember:hover { background: color-mix(in srgb, var(--ember) 80%, #fff); border-color: transparent; }
.btn--ghost { color: var(--text); }
.btn--ghost:hover { color: #fff; }
.site-nav li.active a { background: var(--ink); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.site-footer a { color: #fff; }

/* ---------- Cabeceras ---------- */
.page-head { padding-block: 2.25rem 1.5rem; }
.page-head h1 { max-width: 28ch; }
.page-head__lead { max-width: 44rem; font-size: 1.15rem; line-height: 1.65; }
.stat-chips { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.4rem 0 0; padding: 0; }
.stat-chips li { display: inline-flex; align-items: baseline; gap: .45rem; padding: .45rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-size: .85rem; color: var(--text-soft); }
.stat-chips strong { font: 500 1.15rem/1 var(--serif); color: var(--text); }

/* ---------- Barra de herramientas del listado ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; justify-content: space-between; padding-bottom: 1.25rem; margin-bottom: 1.75rem; border-bottom: 1px solid var(--line); }
.toolbar__summary { margin: 0; font-size: .86rem; color: var(--text-soft); }
.toolbar__summary strong { color: var(--text); font-weight: 600; }
.toolbar__tools { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; }
#sort-links-list a { color: var(--text); background: var(--card); }
#sort-links-list a:hover { border-color: var(--brand); color: var(--link); }
#sort-links-list .sorting a { background: var(--text); color: var(--bg); border-color: var(--text); }
#sort-links-list .sorting.asc a::after { content: " ↑"; }
#sort-links-list .sorting.desc a::after { content: " ↓"; }

/* ---------- Tarjetas de registros: todas iguales ----------
   Columnas fijas (1/2/3/4) y 12 registros por página (ver configuración del tema):
   12 se reparte exacto en las cuatro cuadrículas, por lo que las filas salen completas. */
.cards { --gap: 1.25rem; display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1fr); list-style: none; margin: 0 0 1.5rem; padding: 0; }
@media (min-width: 34rem) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 56rem) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 72rem) { .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* Portada: 8 tarjetas en 4 y 2 columnas; 6 en 3 columnas (así nunca queda una fila a medias) */
@media (min-width: 56rem) and (max-width: 71.99rem) { .cards--recent > .card:nth-child(n + 7) { display: none; } }
.cards > .card { display: flex; background: none; border: 0; border-radius: 0; box-shadow: none; overflow: visible; transform: none; }
.cards > .card:hover { transform: none; box-shadow: none; }
.card__in { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .3s, box-shadow .3s; }
.card:hover .card__in { transform: translateY(-3px); box-shadow: var(--shadow); }
.card__media { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--bg-2); border-bottom: 1px solid var(--line); overflow: hidden; }
.card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center center; }
.card__badge { position: absolute; left: .7rem; bottom: .7rem; z-index: 1; padding: .22rem .6rem; border-radius: 999px; background: rgba(10,19,26,.82); color: #fff; font: 600 .62rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.card__body { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: .5rem; padding: 1rem 1.15rem 0; }
.card__date { margin: 0; font: 600 .68rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); }
.card__title { margin: 0; flex: 0 0 auto; font-size: 1.12rem; line-height: 1.28; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.card__title a { color: var(--text); text-decoration: none; }
.card__title a:hover { color: var(--link); }
.card__foot { margin: auto 0 0; padding: .8rem 0 1rem; border-top: 1px solid var(--line); font: 500 .74rem var(--sans); color: var(--text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Paginación propia ---------- */
.pager-nav { margin: 2.5rem 0 4rem; display: flex; flex-direction: column; align-items: center; gap: .9rem; }
.pager-nav__list { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin: 0; padding: 0; }
.pager-nav__list a, .pager-nav__list .pg {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-width: 2.6rem; height: 2.6rem; padding: 0 .9rem; border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); color: var(--text); font: 500 .9rem var(--sans); text-decoration: none; transition: .2s;
}
.pager-nav__list a:hover { border-color: var(--brand); color: var(--link); }
.pager-nav__list .is-current { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 600; }
.pager-nav__list .is-gap { border: 0; background: transparent; min-width: 1.2rem; padding: 0; color: var(--text-soft); }
.pager-nav__list .is-disabled { opacity: .35; }
.pager-nav__info { margin: 0; font-size: .82rem; letter-spacing: .04em; color: var(--text-soft); }
.pager-nav__label { display: none; }
@media (min-width: 40rem) { .pager-nav__label { display: inline; } }
@media (max-width: 40rem) { .pager-nav__list .pg-opt { display: none; } }

/* ---------- Colecciones: portada de fondos ---------- */
.fgrid { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); list-style: none; margin: 0 0 3rem; padding: 0; }
@media (min-width: 52rem) {
  .fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fgrid > .fcard:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.fcard { --tone: var(--brand); position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .3s, box-shadow .3s; }
.fcard:hover { transform: translateY(-4px); }
.fcard__strip { display: block; height: 13rem; background: color-mix(in srgb, var(--tone) 16%, var(--bg-2)); border-bottom: 4px solid var(--tone); overflow: hidden; }
.fcard__strip img { width: 100%; height: 100%; object-fit: cover; object-position: center center; transition: transform .6s; }
.fcard:hover .fcard__strip img { transform: scale(1.04); }
.fcard__strip--empty { display: grid; place-items: center; }
.fcard__ghost { font: italic 300 5rem/1 var(--serif); color: var(--tone); opacity: .85; }
.fcard__body { display: flex; flex-direction: column; flex: 1; padding: 1.4rem 1.6rem 1.3rem; }
.fcard__top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .7rem; font: 600 .7rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--text-soft); }
.fcard__idx { color: color-mix(in srgb, var(--tone) 75%, var(--text)); }
.fcard__title { font-size: clamp(1.5rem, 2.4vw, 1.9rem); margin: 0 0 .6rem; }
.fcard__title a { color: var(--text); text-decoration: none; }
.fcard__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.fcard__desc { margin: 0 0 1rem; color: var(--text-soft); font-size: .95rem; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fcard__subs { position: relative; z-index: 2; list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1.2rem; padding: 0; }
.fcard__subs a { display: inline-flex; gap: .5rem; align-items: baseline; padding: .3rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--text); font-size: .8rem; text-decoration: none; }
.fcard__subs a:hover { border-color: var(--tone); color: var(--tone); }
.fcard__subs small { color: var(--text-soft); font-size: .72rem; }
.fcard__foot { margin: auto 0 0; display: flex; justify-content: space-between; align-items: center; padding-top: 1rem; border-top: 1px solid var(--line); font: 600 .75rem var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--text-soft); }
.fcard__cta { color: color-mix(in srgb, var(--tone) 75%, var(--text)); }

/* ---------- Colección individual ---------- */
.coll-head { padding-block: 2.25rem 0; }
.coll-head h1 { font-size: clamp(2.2rem, 5.5vw, 3.8rem); max-width: 22ch; }
.coll-body { display: grid; gap: 3.25rem; padding-block: 2rem 4rem; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 0 0 1.4rem; padding-bottom: .8rem; border-bottom: 1px solid var(--line); }
.section-title h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 400; }
.section-title span { font-size: .85rem; color: var(--text-soft); }
.subgrid { display: flex; flex-wrap: wrap; gap: 1rem; list-style: none; margin: 0; padding: 0; }
.subgrid > li { flex: 1 1 16rem; display: flex; }
.subcard { flex: 1; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.1rem 1.3rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none; transition: .25s; }
.subcard:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow); color: var(--text); }
.subcard strong { font: 500 1.15rem/1.3 var(--serif); }
.subcard small { flex: none; padding: .15rem .65rem; border-radius: 999px; background: var(--bg-2); color: var(--text-soft); font-size: .74rem; }
.feature { display: grid; grid-template-columns: minmax(0, 1fr); background: var(--ink); color: #fff; border-radius: var(--radius); overflow: hidden; margin-bottom: 1.5rem; box-shadow: var(--shadow); }
@media (min-width: 48rem) { .feature { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.feature__media { position: relative; min-height: 17rem; background: #0a1620; display: block; }
.feature__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center center; }
.feature__body { display: flex; flex-direction: column; justify-content: center; gap: 1rem; padding: clamp(1.5rem, 3.5vw, 2.75rem); }
.feature__meta { margin: 0; font: 600 .7rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: #f0b48f; }
.feature__title { margin: 0; font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.feature__title a { color: #fff; text-decoration: none; }
.feature__title a:hover { text-decoration: underline; color: #fff; }
.feature__text { margin: 0; color: #c4cfd6; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.feature .btn { align-self: flex-start; }
.center { text-align: center; }

/* ---------- Descripción destacada (registro y colección) ---------- */
.lead { position: relative; margin: 0 0 2.5rem; padding: clamp(1.4rem, 3vw, 2.2rem) clamp(1.4rem, 3vw, 2.4rem); background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--ember); border-radius: var(--radius); box-shadow: var(--shadow); }
.lead__label { margin: 0 0 1rem; font: 600 .7rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--accent-ink); }
.lead__text { max-width: 68ch; font: 400 clamp(1.1rem, 1.6vw, 1.27rem)/1.75 var(--serif); color: var(--text); }
.lead__text > :last-child { margin-bottom: 0; }
.lead__text ul, .lead__text ol { padding-left: 1.3rem; margin: 0 0 1em; }
.lead__text li { margin-bottom: .35em; }
.lead__more { display: none; margin-top: 1.1rem; }
.lead.is-clamped .lead__text { max-height: 15rem; overflow: hidden; -webkit-mask-image: linear-gradient(#000 62%, transparent); mask-image: linear-gradient(#000 62%, transparent); }
.lead.is-clamped.is-open .lead__text { max-height: none; -webkit-mask-image: none; mask-image: none; }
.lead.is-clamped .lead__more { display: inline-flex; }

/* ---------- Ficha de metadatos (sin cajas: no deja huecos) ---------- */
.ficha-set { margin: 0 0 2rem; }
.ficha-set__title { margin: 0 0 .2rem; padding-bottom: .55rem; border-bottom: 2px solid var(--strong-line); font: 600 .72rem var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--accent-ink); }
.ficha-cols { margin: 0; columns: 2 18rem; column-gap: 3rem; }
.ficha-item { break-inside: avoid; margin: 0; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.ficha-item dt { margin: 0 0 .35rem; font: 600 .7rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--text-soft); }
.ficha-item dd { margin: 0; font: 400 1.05rem/1.55 var(--serif); overflow-wrap: anywhere; }
.ficha-item dd + dd { margin-top: .4rem; }
.ficha-item dd p:last-child { margin-bottom: 0; }
.mini-chips { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; }
.mini-chips li { max-width: 100%; overflow-wrap: break-word; word-break: normal; padding: .25rem .8rem; border: 1px solid var(--line); border-radius: 14px; line-height: 1.35; background: var(--bg-2); font: 400 .85rem var(--sans); color: var(--text); }

/* ---------- Registro (ficha) ---------- */
.item-page { padding-block: 2.25rem 4rem; }
.item-header { max-width: 62rem; margin: 0 auto 2rem; text-align: center; }
.item-kicker { display: inline-block; margin-bottom: 1.3rem; padding: .4rem 1.2rem; border: 1px solid var(--accent-ink); border-radius: 999px; font: 600 .75rem var(--sans); letter-spacing: .15em; text-transform: uppercase; color: var(--accent-ink); }
.item-header h1 { font-size: clamp(2rem, 4.2vw, 3.5rem); line-height: 1.1; text-wrap: balance; margin-bottom: 0; }
.item-chips { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin: 1.4rem 0 0; padding: 0; }
.item-chips li { display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .95rem; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-size: .82rem; color: var(--text-soft); text-decoration: none; }
.item-chips li > a { padding: 0; border: 0; background: none; color: inherit; }
.item-chips li:has(> a):hover { border-color: var(--brand); color: var(--link); }
.item-chips svg { width: .95rem; height: .95rem; flex: none; }
.media-showcase { width: 100%; max-width: 1300px; margin: 0 auto 3.5rem; }
.media-tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.25rem; }
.media-tab-btn { padding: .5rem 1.4rem; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--text-soft); font: 600 .75rem var(--sans); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; transition: .2s; }
.media-tab-btn.active, .media-tab-btn:hover { background: var(--ember); color: #fff; border-color: var(--ember); }
.media-layer { display: none; }
.media-layer.active { display: block; animation: fadeIn .4s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.pdf-container { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); background: #0a131a; }
.pdf-playlist { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: 1rem 1.5rem; background: var(--ink); border-bottom: 1px solid rgba(255,255,255,.1); }
.pdf-playlist__label { margin-right: 1rem; color: #8ea0aa; font: 600 .75rem var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.pdf-switch-btn { padding: .5rem 1rem; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; background: rgba(255,255,255,.1); color: #fff; font: 500 .85rem var(--sans); cursor: pointer; transition: .2s; }
.pdf-switch-btn.active, .pdf-switch-btn:hover { background: var(--brand); border-color: var(--brand); }
.pdf-protect-wrapper { position: relative; width: 100%; height: 80vh; min-height: 650px; background: #222; }
.pdf-protect-wrapper iframe { width: 100%; height: 100%; border: 0; }
.pdf-blocker { position: absolute; z-index: 10; background: transparent; cursor: not-allowed; }
.pdf-blocker.top { top: 0; left: 0; right: 0; height: 60px; }
.pdf-blocker.right { top: 0; right: 0; bottom: 0; width: 25px; }
.pdf-blocker.bottom { bottom: 0; left: 0; right: 0; height: 60px; }

.item-layout { display: grid; gap: 3rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 60rem) { .item-layout { grid-template-columns: minmax(0, 1fr) 20rem; gap: 4rem; } }
.item-side { display: flex; flex-direction: column; gap: 1.1rem; align-self: start; }
@media (min-width: 60rem) { .item-side { position: sticky; top: 6rem; } }
.side-box { padding: 1.2rem 1.4rem 1.3rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.side-box__title { margin: 0 0 .85rem; padding-bottom: .6rem; border-bottom: 1px solid var(--line); font: 600 .7rem var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--accent-ink); }
.side-box__link { font: 400 1.2rem/1.35 var(--serif); }
.side-box__link a { color: var(--text); text-decoration-color: var(--brand); }
.side-box__link a:hover { color: var(--link); }
.crumb-mini { margin: 0 0 .5rem; font-size: .76rem; color: var(--text-soft); }
.crumb-mini a { color: var(--text-soft); text-decoration: none; }
.crumb-mini a:hover { color: var(--ember); }
.tags-list { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; margin: 0; padding: 0; }
.tags-list a { display: inline-block; padding: .35rem .9rem; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-2); color: var(--text); font-size: .8rem; text-decoration: none; }
.tags-list a:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.cite { margin: 0 0 .9rem; font: italic 400 .98rem/1.6 var(--serif); color: var(--text); overflow-wrap: anywhere; }
.copy-btn { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--text); font: 600 .72rem var(--sans); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; transition: .2s; }
.copy-btn:hover { border-color: var(--brand); color: var(--link); }
.copy-btn.is-done { background: var(--brand); border-color: var(--brand); color: #fff; }
.plugin-extras { margin-top: 2.5rem; }
.item-nav { display: flex; justify-content: space-between; gap: 1rem; list-style: none; margin: 3rem 0 0; padding: 2rem 0 0; border-top: 1px solid var(--line); font-weight: 500; font-size: .95rem; }
.item-nav a { text-decoration: none; color: var(--text-soft); }
.item-nav a:hover { color: var(--ember); }
.other-files, .gallery-grid { margin-top: 1.5rem; }

/* ---------- Páginas de texto (Simple Pages) con sidebar ---------- */
.page-layout { display: grid; gap: 2.5rem; padding-bottom: 4rem; }
@media (min-width: 60rem) { .page-layout { grid-template-columns: minmax(0, 1fr) 17.5rem; gap: 4rem; } .page-layout--solo { grid-template-columns: minmax(0, 46rem); } }
.page-side { display: flex; flex-direction: column; gap: 1.1rem; align-self: start; }
@media (min-width: 60rem) { .page-side { position: sticky; top: 6rem; } }
.prose { max-width: 46rem; font-size: 1.075rem; line-height: 1.8; color: var(--text); }
.prose > :first-child { margin-top: 0; }
.prose > p:first-of-type { font: 400 clamp(1.2rem, 1.8vw, 1.4rem)/1.65 var(--serif); }
.prose h2 { margin: 2.8rem 0 .9rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.prose h3, .prose .prose-h { margin: 2.3rem 0 .7rem; font: 500 1.4rem/1.25 var(--serif); color: var(--text); scroll-margin-top: 6rem; }
.prose h2 { scroll-margin-top: 6rem; }
.prose .prose-h::before { content: ""; display: block; width: 2.2rem; height: 3px; margin-bottom: .75rem; background: var(--ember); }
.prose .prose-h strong { font-weight: inherit; }
.prose p.is-term { margin: 0 0 .75rem; padding: 1rem 1.25rem; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 10px; font-size: 1rem; line-height: 1.7; }
.prose p.is-term > strong:first-child { display: block; margin-bottom: .15rem; font: 500 1.15rem/1.3 var(--serif); }
.prose ul, .prose ol { padding-left: 1.4rem; margin: 0 0 1.3em; }
.prose li { margin-bottom: .45em; }
.prose blockquote { margin: 1.8rem 0; padding: .2rem 0 .2rem 1.4rem; border-left: 4px solid var(--brand); font: italic 400 1.2rem/1.6 var(--serif); color: var(--text-soft); }
.prose img { border-radius: 10px; margin: 1.6rem 0; box-shadow: var(--shadow); }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .95rem; }
.prose th, .prose td { padding: .7rem .9rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { font: 600 .72rem var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--text-soft); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
.toc { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.toc a { display: block; padding: .38rem 0 .38rem .9rem; border-left: 2px solid var(--line); color: var(--text-soft); text-decoration: none; line-height: 1.4; transition: .2s; }
.toc a:hover { color: var(--text); border-color: var(--text-soft); }
.toc a.is-active { color: var(--text); border-color: var(--ember); font-weight: 600; }
.toc .toc--sub a { padding-left: 1.8rem; font-size: .84rem; }
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list li + li { border-top: 1px solid var(--line); }
.side-list a { display: flex; justify-content: space-between; gap: .75rem; padding: .65rem 0; color: var(--text); text-decoration: none; font-size: .95rem; }
.side-list a:hover { color: var(--link); }
.side-list .is-current > a { color: var(--accent-ink); font-weight: 600; }
.side-list ul { list-style: none; margin: 0 0 .5rem; padding-left: 1rem; }
.side-list ul a { font-size: .88rem; color: var(--text-soft); padding-block: .4rem; }
.page-cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); list-style: none; margin: 0; padding: 0; }

/* ---------- Portada de fondos (inicio) ---------- */
.fondo { overflow: hidden; }
.fondo__cover { display: block; margin: -1.6rem -1.5rem 1.2rem; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.fondo__cover img { width: 100%; height: 100%; object-fit: cover; object-position: center center; transition: transform .6s; }
.fondo:hover .fondo__cover img { transform: scale(1.05); }

/* ---------- Índice completo (árbol) ---------- */
.tree-section { margin-top: 1rem; }
.tree-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); align-items: start; }
.tree-root { --tone: var(--brand); padding: 1.1rem 1.4rem 1.2rem; background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--tone); border-radius: var(--radius); }
.tree-root > summary { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; cursor: pointer; list-style: none; }
.tree-root > summary::-webkit-details-marker { display: none; }
.tree-root > summary a { font: 500 1.3rem/1.3 var(--serif); color: var(--text); text-decoration: none; }
.tree-root > summary a:hover { color: var(--link); }
.tree-root > summary small, .tree-list small { flex: none; padding: .12rem .6rem; border-radius: 999px; background: var(--bg-2); color: var(--text-soft); font: 500 .72rem var(--sans); }
.tree-root > summary::after { content: "−"; order: 3; color: var(--text-soft); font-size: 1.2rem; line-height: 1; }
.tree-root:not([open]) > summary::after { content: "+"; }
.tree-list { list-style: none; margin: .9rem 0 0; padding: 0; }
.tree-list .tree-list { margin: 0 0 0 .5rem; padding-left: 1.1rem; border-left: 1px solid var(--line); }
.tree-list li { position: relative; }
.tree-list .tree-list > li::before { content: ""; position: absolute; left: -1.1rem; top: 1.15rem; width: .8rem; border-top: 1px solid var(--line); }
.tree-list a { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; padding: .45rem 0; color: var(--text); text-decoration: none; font-size: .95rem; line-height: 1.4; }
.tree-list a:hover span { color: var(--link); text-decoration: underline; }
.tree-empty { margin: .8rem 0 0; font-size: .88rem; color: var(--text-soft); }

/* ---------- Pie: redes y enlaces ---------- */
.social { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; margin: 1.3rem 0 0; padding: 0; }
.social a { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; color: #fff; transition: .2s; }
.social a:hover { background: var(--ember); border-color: var(--ember); transform: translateY(-2px); color: #fff; }
.social svg { width: 1.15rem; height: 1.15rem; }
@media (min-width: 52rem) { .site-footer__grid.has-links { grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 3rem; } }
.site-footer__nav a span { opacity: .6; }

/* ---------- Página "Collection Tree" del plugin (respaldo si alguien entra) ---------- */
body.page-collection-tree #content { max-width: var(--wrap); margin: 0 auto; padding: 3rem 1.5rem 4rem; }
body.page-collection-tree #content::before { content: "Estructura del archivo"; display: block; margin-bottom: 1.5rem; font: 400 clamp(2rem, 4vw, 3rem)/1.1 var(--serif); }
body.page-collection-tree #content ul { list-style: none; margin: 0; padding: 0; }
body.page-collection-tree #content ul ul { margin: 0 0 0 .5rem; padding-left: 1.1rem; border-left: 1px solid var(--line); }
body.page-collection-tree #content li { padding: .35rem 0; }
body.page-collection-tree #content > ul > li, body.page-collection-tree #content > div > ul > li { margin: 0 0 1rem; padding: 1rem 1.3rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
body.page-collection-tree #content a { color: var(--text); text-decoration: none; }
body.page-collection-tree #content a:hover { color: var(--link); text-decoration: underline; }

/* ---------- Portada: documento destacado más compacto ---------- */
.section--spot { padding-block: clamp(2rem, 4vw, 3rem) 0; }
.section--spot .section__head { margin-bottom: 1.25rem; }
.section--spot .feature { margin-bottom: 0; }
.section--spot .feature__media { min-height: 15rem; }

/* ---------- Búsqueda ---------- */
#search-form button:empty::after { content: "Buscar"; }
.result { align-items: center; }
.result__title { color: var(--text); }

@media print { .theme-toggle, .item-side, .page-side, .pager-nav, .copy-btn { display: none; } }

.coll-figure { margin: 0 0 2rem; height: clamp(13rem, 28vw, 20rem); border-radius: var(--radius); overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); box-shadow: var(--shadow); }
.coll-figure img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center center; }

/* =========================================
   UNIVERSALVIEWER Y GALERÍA DE RESPALDO
   ========================================= */
.uv-stage { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); background: #0a131a; }
.uv-stage iframe,
.uv-stage .legajo-uv,
.uv-stage .universal-viewer,
.uv-stage .uv { display: block; width: 100% !important; max-width: 100%; border: 0; }
.uv-stage iframe { height: clamp(520px, 78vh, 900px) !important; }
@media (max-width: 40rem) { .uv-stage iframe { height: 70vh !important; min-height: 420px; } }

.gallery-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); }
.gallery-item { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); }
.gallery-item img { width: 100%; height: auto; display: block; }
.gallery-item audio, .gallery-item video { width: 100%; display: block; }

.other-files { margin-top: 2rem; padding: 1.5rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); }
.other-files h3 { font: 600 .72rem var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--text-soft); margin-bottom: .75rem; }
.other-file { margin: .35rem 0; }
.plugin-extras { margin-top: 2rem; }
.uv-frame { display: block; width: 100%; border: 0; background: #0a131a; }



/* =========================================================
   1.2.6 — Pulido visual de Colecciones y colección individual
   ========================================================= */

/* Tarjetas de fondo: las subcolecciones pasan de "píldoras" a filas limpias */
.fcard__subs { display: block; gap: 0; margin: 0 0 1.3rem; border-top: 1px solid var(--line); }
.fcard__subs li { border-bottom: 1px solid var(--line); }
.fcard__subs a { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .6rem .15rem; border: 0; border-radius: 0; background: none; font-size: .88rem; line-height: 1.35; transition: padding .2s, color .2s; }
.fcard__subs a:hover { padding-left: .5rem; border: 0; }
.fcard__subs small { flex: none; min-width: 1.6rem; text-align: right; font: 600 .72rem var(--sans); font-variant-numeric: tabular-nums; letter-spacing: .04em; color: color-mix(in srgb, var(--tone) 70%, var(--text-soft)); }
.fcard__title { line-height: 1.12; }
.fcard__strip { height: 12rem; }

/* Estructura completa: columnas fluidas, sin huecos */
.tree-section { margin-top: 1.5rem; }
.tree-grid { display: block; column-count: 3; column-gap: 1.25rem; }
.tree-root { break-inside: avoid; margin: 0 0 1.25rem; box-shadow: var(--shadow); }
@media (max-width: 62rem) { .tree-grid { column-count: 2; } }
@media (max-width: 40rem) { .tree-grid { column-count: 1; } }
.tree-list > li { border-bottom: 1px dashed var(--line); }
.tree-list > li:last-child { border-bottom: 0; }
.tree-list .tree-list > li { border-bottom: 0; }
.tree-list a { font-size: .92rem; }

/* Subcolecciones: tarjetas con imagen destacada */
.subgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.subgrid > li { display: flex; flex: none; min-width: 0; }
.subcard { --tone: var(--brand); flex: 1; display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 0; min-width: 0; padding: 0; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-top: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--text); text-decoration: none; transition: transform .3s, box-shadow .3s, border-color .3s; }
.subcard:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--tone) 55%, var(--line)); color: var(--text); }
.subcard__media { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; overflow: hidden; background: color-mix(in srgb, var(--tone) 14%, var(--bg-2)); border-bottom: 4px solid var(--tone); color: var(--tone); }
.subcard__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center center; transition: transform .6s; }
.subcard:hover .subcard__media img { transform: scale(1.05); }
.subcard__media .placeholder { opacity: .5; color: var(--tone); }
.subcard__body { display: flex; flex-direction: column; flex: 1; gap: .9rem; padding: 1.1rem 1.25rem 1rem; }
.subcard strong { font: 500 1.12rem/1.28 var(--serif); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.subcard small { margin-top: auto; display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; padding: .75rem 0 0; border-top: 1px solid var(--line); border-radius: 0; background: none; font: 600 .68rem/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--text-soft); }
.subcard small::after { content: none; }
.subcard small i { flex: none; font-style: normal; font-size: 1.05rem; letter-spacing: 0; color: var(--tone); transition: transform .2s; }
.subcard:hover small i { transform: translateX(4px); }

/* Registros sin miniatura: papel con icono en vez de un bloque vacío */
.card__media::before { content: ""; position: absolute; inset: 0; opacity: .55;
  background: no-repeat center / 2.4rem url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 56' fill='none' stroke='%2356626c' stroke-width='1.5'%3E%3Cpath d='M8 4h22l10 10v38H8z'/%3E%3Cpath d='M30 4v10h10'/%3E%3Cpath d='M15 26h18M15 32h18M15 38h12' stroke-linecap='round'/%3E%3C/svg%3E"); }
.card__media > img, .card__media > .placeholder { z-index: 1; }
.card__media > img { background: var(--bg-2); }


/* ---------- 1.2.7 — Portada: "Explorar por fondos" ---------- */
.fondos { gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.fondo { padding: 0 1.4rem 1.2rem; border-top-width: 0; border-bottom: 0; }
.fondo::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--tone, var(--brand)); z-index: 3; }
.fondo__cover { margin: 0 -1.4rem 1.1rem; aspect-ratio: 16 / 10; }
.fondo:not(:has(.fondo__cover)) .fondo__num { margin-top: 1.5rem; }
.fondo__num { font-size: 2.1rem; margin-bottom: .35rem; }
.fondo__title { font-size: 1.4rem; line-height: 1.12; margin-bottom: .55rem; }
.fondo__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.fondo__desc { font-size: .9rem; line-height: 1.55; margin: 0 0 1rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fondo__list { position: relative; z-index: 2; margin: 0 0 1.1rem; padding: 0; }
.fondo__list li { padding: 0; }
.fondo__list a { display: flex; justify-content: space-between; align-items: baseline; gap: .9rem; padding: .55rem .1rem; font-size: .86rem; line-height: 1.35; transition: padding .2s, color .2s; }
.fondo__list a span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fondo__list a:hover { padding-left: .45rem; color: color-mix(in srgb, var(--tone) 80%, var(--text)); text-decoration: none; }
.fondo__list small { flex: none; font: 600 .72rem var(--sans); font-variant-numeric: tabular-nums; color: color-mix(in srgb, var(--tone) 70%, var(--text-soft)); }
.fondo__more a { font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-soft); }
.fondo__foot { padding-top: .9rem; border-top: 1px solid var(--line); }
.fondo__foot a { position: relative; z-index: 2; transition: transform .2s; }
.fondo:hover .fondo__foot a { transform: translateX(4px); }


/* ---------- 1.2.11 — Portada: fondos compactos, sin listar subcolecciones ---------- */
.fondos { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.25rem; }
.fondo { padding: 0 1.4rem 1.2rem; }
.fondo__cover { margin: 0 -1.4rem 1.1rem; aspect-ratio: 16 / 10; }
.fondo__num { font-size: 2.1rem; }
.fondo__title { font-size: 1.4rem; }
.fondo__desc { font-size: .9rem; -webkit-line-clamp: 3; margin-bottom: 1.2rem; }
.fondo__foot { align-items: flex-end; gap: 1rem; }
.fondo__count { display: flex; flex-direction: column; gap: .2rem; }
.fondo__count strong { font: 600 .75rem var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--text); }
.fondo__count em { font: 500 .72rem var(--sans); font-style: normal; letter-spacing: .06em; text-transform: uppercase; color: var(--text-soft); }


/* =========================================================
   1.2.12 — Búsqueda y página 404
   ========================================================= */

/* Búsqueda: cabecera */
.search-head h1 { max-width: 30ch; }
.search-head h1 em { font-style: italic; color: var(--accent-ink); }
.search-head__meta { margin: .4rem 0 0; font-size: .9rem; color: var(--text-soft); }
.search-head__meta strong { color: var(--text); font-weight: 600; }
.search-head__meta a { color: var(--link); }
.search-inline--big { max-width: 40rem; margin-top: 1.5rem; }
.search-inline--big #search-form input[type="text"] { padding-block: 1rem; font-size: 1.05rem; }

/* Búsqueda: resultados como fichas con miniatura */
.search-body { padding-bottom: 4rem; }
.results { list-style: none; display: grid; gap: 1rem; margin: 1rem 0 2rem; padding: 0; }
.result { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 1.25rem; align-items: start; padding: 1rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .25s, box-shadow .25s, border-color .25s; }
.result:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.result__media { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--line); }
.result__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center center; }
.result__media .placeholder { opacity: .5; }
.result__body { min-width: 0; }
.result__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .9rem; margin: 0 0 .4rem; font: 600 .68rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--text-soft); }
.result__type { flex: none; width: auto; padding: .2rem .6rem; border-radius: 999px; background: color-mix(in srgb, var(--ember) 12%, var(--bg-2)); color: var(--ember); letter-spacing: .12em; }
.result--collection .result__type { background: color-mix(in srgb, var(--brand) 14%, var(--bg-2)); color: color-mix(in srgb, var(--brand) 80%, var(--text)); }
.result__where { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: .06em; }
.result__title { margin: 0 0 .45rem; font: 400 1.3rem/1.28 var(--serif); }
.result__title a { color: var(--text); text-decoration: none; }
.result__title a:hover { color: var(--link); text-decoration: none; }
.result__text { margin: 0; color: var(--text-soft); font-size: .93rem; line-height: 1.6; }
.results mark { background: color-mix(in srgb, var(--ochre) 38%, transparent); color: inherit; padding: 0 .12em; border-radius: 3px; }
@media (max-width: 34rem) { .result { grid-template-columns: 4rem minmax(0, 1fr); gap: .9rem; padding: .8rem; } .result__title { font-size: 1.12rem; } }

/* Búsqueda: sin resultados */
.search-empty { max-width: 34rem; margin: 2rem auto 3rem; text-align: center; color: var(--text-soft); }
.search-empty__mark { margin: 0; font: italic 300 5rem/1 var(--serif); color: var(--brand); opacity: .7; }
.search-empty h2 { margin: .3rem 0 .8rem; font-size: 1.8rem; font-weight: 400; color: var(--text); }
.search-empty .btn { margin: .3rem .2rem 0; }

/* 404 */
.err { padding-block: 3rem 5rem; text-align: center; display: flex; flex-direction: column; align-items: center; }
.err__code { margin: 0; font: italic 300 clamp(6rem, 22vw, 12rem)/.9 var(--serif); letter-spacing: -.03em; color: transparent; -webkit-text-stroke: 2px var(--brand); opacity: .75; }
.err .kicker { justify-content: center; margin-top: 1.2rem; }
.err h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 400; max-width: 20ch; text-wrap: balance; margin: 0 0 1rem; }
.err__lead { max-width: 36rem; margin: 0 0 1.5rem; color: var(--text-soft); font-size: 1.05rem; }
.err__lead code { padding: .1rem .45rem; border-radius: 6px; background: var(--bg-2); font-size: .9em; word-break: break-all; color: var(--text); }
.err__search { width: 100%; margin-inline: auto; }
.err__actions { margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.err__fondos { width: 100%; margin-top: 3.5rem; text-align: left; }
.err__label { margin: 0 0 1rem; padding-bottom: .7rem; border-bottom: 1px solid var(--line); font: 600 .72rem var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--text-soft); }
.err__grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; margin: 0; padding: 0; }
.err__grid a { display: flex; flex-direction: column; gap: .35rem; height: 100%; padding: 1.1rem 1.2rem 1rem; background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--tone, var(--brand)); border-radius: var(--radius); color: var(--text); text-decoration: none; transition: transform .25s, box-shadow .25s; }
.err__grid a:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--text); }
.err__num { font: italic 300 1.8rem/1 var(--serif); color: var(--tone, var(--brand)); }
.err__grid strong { font: 500 1.15rem/1.25 var(--serif); }
.err__grid small { margin-top: auto; padding-top: .4rem; font: 600 .68rem var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--text-soft); }

/* ---------- Cabecera de colección (mismo estilo que el hero de portada) ---------- */
.hero--coll { min-height: min(64vh, 36rem); }
.hero--coll .hero__bg { position: absolute; inset: 0; z-index: -2; }
.hero--coll .hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero--coll .hero__inner { padding-block: 4.5rem 3.5rem; }
.hero--coll .hero__title { font-size: clamp(2.2rem, 5vw, 3.8rem); max-width: 20ch; line-height: 1.1; }
.hero--coll .crumbs ol li, .hero--coll .crumbs a, .hero--coll .crumbs span { color: rgba(255,255,255,.88); }
.hero--coll .crumbs a:hover { color: #fff; }
.hero--coll .stat-chips li { color: #fff; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.35); }
.hero--coll .stat-chips strong { color: #fff; }

/* ---------- Destacado de la portada: se muestra la imagen completa ---------- */
.feature__media { min-height: 32rem; }
@media (max-width: 720px) { .feature__media { min-height: 24rem; } }

.feature__media img { object-fit: contain; padding: 1.25rem; }

/* ---------- Mini hero de registro (encima del visor) ---------- */
.hero--item { min-height: min(40vh, 22rem); display: flex; align-items: center; justify-content: center; }
.hero--item .hero__inner { padding-block: 3rem 2.5rem; text-align: center; }
.hero--item .hero__title { font-size: clamp(1.8rem, 4vw, 2.8rem); max-width: 26ch; margin: .2em auto .4em; }
.hero--item .kicker { display: inline-block; }
.hero--item .item-chips { justify-content: center; }
.hero--item .item-chips li { color: #fff; background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.35); }
.hero--item .item-chips a { color: #fff; }

/* ---------- Mini hero de registro, versión 2: fondo difuminado y más espacio ---------- */
.item-page { padding-top: 0; margin-top: 0; }
.hero--item { min-height: min(40vh, 21rem); }
.hero--item .hero__bg img { filter: blur(22px) saturate(.85); transform: scale(1.12); }
.hero--item::before { background: linear-gradient(180deg, rgba(8,22,36,.72) 0%, rgba(8,22,36,.86) 100%) !important; }
.hero--item .hero__title { text-shadow: 0 2px 14px rgba(0,0,0,.35); }
.hero--item + .media-showcase { margin-top: 2.5rem; }

/* ---------- Mini hero de registro, versión 3: compacto, con textura ---------- */
.hero--item { min-height: 0; }
.hero--item .hero__inner { padding-block: 2rem 1.75rem; }
.hero--item .hero__bg img { filter: blur(3px) grayscale(.35) contrast(1.05); transform: scale(1.03); }
.hero--item::before { background: linear-gradient(180deg, rgba(8,22,36,.78) 0%, rgba(8,22,36,.9) 100%) !important; }
.hero--item::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .14;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.hero--item .hero__title { font-size: clamp(1.5rem, 3.2vw, 2.2rem); line-height: 1.15; max-width: 32ch; margin: .15em auto .35em; }
.hero--item .item-chips { margin-top: .9rem; }

/* Destacado: la regla de style.css (.section--spot .feature__media) tiene más especificidad, así que se sobrescribe con el mismo selector */
.section--spot .feature__media { min-height: 32rem; }
@media (max-width: 720px) { .section--spot .feature__media { min-height: 24rem; } }


/* =========================================================
   Reproductor de audio (registros con MP3 u otro audio)
   La portada es una imagen adjunta al registro.
   ========================================================= */
.aplayer {
  --ap-fg: #f3efe7;
  --ap-soft: rgba(243, 239, 231, .68);
  --ap-line: rgba(255, 255, 255, .13);
  position: relative; isolation: isolate; overflow: hidden;
  border-radius: var(--radius); border: 1px solid rgba(255, 255, 255, .06);
  background: var(--ink); color: var(--ap-fg); box-shadow: var(--shadow);
}
.aplayer::before {
  content: ""; position: absolute; inset: -48px; z-index: -2;
  background: var(--cover, none) center / cover no-repeat;
  filter: blur(40px) saturate(1.25); opacity: .55; transform: scale(1.1);
}
.aplayer::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(135deg, rgba(10, 19, 26, .74), rgba(10, 19, 26, .92));
}
.aplayer__stage {
  display: grid; grid-template-columns: minmax(170px, 300px) 1fr; align-items: center;
  gap: clamp(1.25rem, 3vw, 2.5rem); padding: clamp(1.25rem, 3vw, 2.25rem);
}
.aplayer__cover {
  position: relative; aspect-ratio: 1; overflow: hidden; border-radius: calc(var(--radius) - 4px);
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 55%, #000), color-mix(in srgb, var(--ember) 55%, #000));
  box-shadow: 0 22px 44px -14px rgba(0, 0, 0, .65), 0 0 0 1px rgba(255, 255, 255, .08);
}
.aplayer__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.aplayer__cover-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 255, 255, .78); }
.aplayer__cover-fallback svg { width: 38%; height: auto; }

.aplayer__main { min-width: 0; }
.aplayer__kicker { margin: 0 0 .5rem; font: 600 .7rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: color-mix(in srgb, var(--ochre) 85%, #fff); }
.aplayer__track { margin: 0; font: 500 clamp(1.35rem, 3vw, 2rem)/1.2 var(--serif); color: var(--ap-fg); overflow-wrap: anywhere; }
.aplayer__work { margin: .35rem 0 1.5rem; font: 400 .9rem/1.4 var(--sans); color: var(--ap-soft); overflow-wrap: anywhere; }
.aplayer.has-error .aplayer__track { color: #f0a07f; }

.aplayer__timeline { display: flex; align-items: center; gap: .75rem; }
.aplayer__time { flex: none; min-width: 2.6rem; font: 500 .75rem var(--sans); font-variant-numeric: tabular-nums; color: var(--ap-soft); }
.aplayer__time:last-child { text-align: right; }

.aplayer input[type="range"] {
  -webkit-appearance: none; appearance: none; background: transparent; margin: 0; cursor: pointer;
  height: 1.5rem; flex: 1; min-width: 0; --pct: 0%;
}
.aplayer input[type="range"]::-webkit-slider-runnable-track {
  height: 4px; border-radius: 4px;
  background: linear-gradient(to right, var(--ap-fg) var(--pct), rgba(255, 255, 255, .22) var(--pct));
}
.aplayer input[type="range"]::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .22); }
.aplayer input[type="range"]::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--ap-fg); }
.aplayer input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%;
  background: var(--ap-fg); border: 0; box-shadow: 0 1px 4px rgba(0, 0, 0, .5);
}
.aplayer input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--ap-fg); border: 0; }
.aplayer input[type="range"]:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; border-radius: 4px; }

.aplayer__controls { display: flex; align-items: center; gap: .6rem; margin-top: .6rem; }
.aplayer__spacer { flex: 1; }
.aplayer__btn {
  display: inline-grid; place-items: center; flex: none; width: 2.6rem; height: 2.6rem; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--ap-fg); cursor: pointer; transition: background .15s, transform .15s;
}
.aplayer__btn:hover:not(:disabled) { background: rgba(255, 255, 255, .12); }
.aplayer__btn:active:not(:disabled) { transform: scale(.94); }
.aplayer__btn:disabled { opacity: .35; cursor: default; }
.aplayer__btn svg { width: 1.35rem; height: 1.35rem; }
.aplayer__btn--play { width: 3.4rem; height: 3.4rem; background: var(--ap-fg); color: var(--ink); }
.aplayer__btn--play:hover:not(:disabled) { background: #fff; }
.aplayer__btn--play svg { width: 1.6rem; height: 1.6rem; }
.aplayer__btn--sm { width: 2.2rem; height: 2.2rem; }
.aplayer__btn--sm svg { width: 1.2rem; height: 1.2rem; }
.aplayer .ico-pause { display: none; }
.aplayer.is-playing .ico-pause { display: block; }
.aplayer.is-playing .ico-play { display: none; }
.aplayer.is-muted .ico-wave { display: none; }
.aplayer__chip {
  flex: none; min-width: 3rem; padding: .3rem .65rem; border: 1px solid var(--ap-line); border-radius: 999px;
  background: transparent; color: var(--ap-fg); font: 600 .72rem var(--sans); cursor: pointer;
}
.aplayer__chip:hover { background: rgba(255, 255, 255, .12); }
.aplayer__vol { flex: none !important; width: 5.5rem; }
.aplayer button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.aplayer__list {
  list-style: none; margin: 0; padding: .5rem .75rem .75rem; max-height: 22rem; overflow: auto;
  border-top: 1px solid var(--ap-line); background: rgba(0, 0, 0, .14);
}
.aplayer__list li { margin: 0; }
.aplayer__item {
  display: grid; grid-template-columns: 2.25rem 1fr auto; align-items: center; gap: .5rem; width: 100%;
  padding: .6rem .75rem; border: 0; border-radius: 10px; background: transparent; color: var(--ap-fg);
  font: 400 .92rem/1.3 var(--sans); text-align: left; cursor: pointer; transition: background .15s;
}
.aplayer__item:hover { background: rgba(255, 255, 255, .08); }
.aplayer__item.is-active { background: rgba(255, 255, 255, .13); }
.aplayer__num, .aplayer__eq { grid-column: 1; grid-row: 1; }
.aplayer__num { font-variant-numeric: tabular-nums; color: var(--ap-soft); text-align: center; }
.aplayer__name { grid-column: 2; overflow-wrap: anywhere; }
.aplayer__item.is-active .aplayer__name { font-weight: 600; }
.aplayer__len { grid-column: 3; font-size: .78rem; font-variant-numeric: tabular-nums; color: var(--ap-soft); }
.aplayer__eq { display: none; align-items: flex-end; justify-content: center; gap: 2px; height: 14px; }
.aplayer__eq i { display: block; width: 3px; height: 100%; border-radius: 1px; background: var(--ochre); transform-origin: bottom; animation: apEq .9s ease-in-out infinite; }
.aplayer__eq i:nth-child(2) { animation-delay: -.3s; }
.aplayer__eq i:nth-child(3) { animation-delay: -.6s; }
.aplayer.is-playing .aplayer__item.is-active .aplayer__num { display: none; }
.aplayer.is-playing .aplayer__item.is-active .aplayer__eq { display: flex; }
@keyframes apEq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .aplayer__eq i { animation: none; transform: scaleY(.7); } }

@media (max-width: 40rem) {
  .aplayer__stage { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .aplayer__cover { width: min(70vw, 260px); }
  .aplayer__main { width: 100%; }
  .aplayer__controls { flex-wrap: wrap; justify-content: center; }
  .aplayer__spacer { display: none; }
  .aplayer__vol { display: none; }
}
