/* ==========================================================================
   Tema Zegarra para Pawtucket
   Claro: papel de copia fotográfica. Oscuro: cuarto oscuro con luz de seguridad.
   Sin Bootstrap ni jQuery. Todo el color sale de las variables de :root.
   ========================================================================== */

:root {
	--bg: #F3EEE5;
	--surface: #FBF8F2;
	--surface-2: #EAE2D4;
	--surface-3: #E0D6C5;
	--ink: #1F1A15;
	--ink-2: #574D43;
	--ink-3: #74685C;
	--line: #DCD1BF;
	--line-2: #CBBDA7;
	--accent: #93391C;
	--accent-hover: #7A2E15;
	--accent-ink: #FBF8F2;
	--accent-soft: #F0DDD0;
	--bar: rgba(251, 248, 242, .82);
	--shadow: 0 1px 2px rgba(70, 45, 20, .06), 0 12px 32px -18px rgba(70, 45, 20, .28);
	--shadow-hover: 0 2px 4px rgba(70, 45, 20, .08), 0 22px 44px -22px rgba(70, 45, 20, .38);

	--f-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
	--f-ui: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	--r-s: 10px;
	--r-m: 18px;
	--r-l: 28px;
	--r-pill: 999px;
	--wrap: 1240px;
	--gutter: clamp(16px, 4vw, 40px);
	--row-h: 200px;
	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--bg: #15110E;
		--surface: #1D1814;
		--surface-2: #272019;
		--surface-3: #30281F;
		--ink: #EFE6D9;
		--ink-2: #BFB2A2;
		--ink-3: #968979;
		--line: #342B23;
		--line-2: #45392E;
		--accent: #EE8A5E;
		--accent-hover: #F5A480;
		--accent-ink: #1A120D;
		--accent-soft: #3B2419;
		--bar: rgba(29, 24, 20, .8);
		--shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -18px rgba(0, 0, 0, .7);
		--shadow-hover: 0 2px 4px rgba(0, 0, 0, .35), 0 22px 44px -20px rgba(0, 0, 0, .8);
		color-scheme: dark;
	}
}
:root[data-theme="dark"] {
	--bg: #15110E;
	--surface: #1D1814;
	--surface-2: #272019;
	--surface-3: #30281F;
	--ink: #EFE6D9;
	--ink-2: #BFB2A2;
	--ink-3: #968979;
	--line: #342B23;
	--line-2: #45392E;
	--accent: #EE8A5E;
	--accent-hover: #F5A480;
	--accent-ink: #1A120D;
	--accent-soft: #3B2419;
	--bar: rgba(29, 24, 20, .8);
	--shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -18px rgba(0, 0, 0, .7);
	--shadow-hover: 0 2px 4px rgba(0, 0, 0, .35), 0 22px 44px -20px rgba(0, 0, 0, .8);
	color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--f-ui);
	font-size: 16.5px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 {
	font-family: var(--f-display);
	font-variation-settings: "SOFT" 100;
	font-weight: 480;
	line-height: 1.08;
	letter-spacing: -.015em;
	margin: 0;
	text-wrap: balance;
}
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }

.zg-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.zg-saltar { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: var(--r-pill); text-decoration: none; }
.zg-saltar:focus { top: 12px; color: var(--accent-ink); }
.zg-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.zg-main { display: block; min-height: 60vh; outline: none; }

.zg-eyebrow {
	font-family: var(--f-ui);
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--ink-3);
	margin: 0 0 14px;
}
.zg-lede { font-family: var(--f-display); font-variation-settings: "SOFT" 100, "opsz" 24; font-size: clamp(19px, 2vw, 22px); line-height: 1.5; color: var(--ink-2); max-width: 58ch; }
.zg-idno { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.zg-muted { color: var(--ink-3); }

/* ---------- botones y chips ---------- */
.zg-btn {
	display: inline-flex; align-items: center; gap: 10px;
	padding: 12px 22px;
	border-radius: var(--r-pill);
	background: var(--accent); color: var(--accent-ink);
	font-weight: 600; font-size: 15px; text-decoration: none;
	border: 1.5px solid var(--accent);
	transition: background .18s ease, transform .18s ease;
}
.zg-btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.zg-btn:active { transform: translateY(1px); }
.zg-btn-sec { background: transparent; color: var(--ink); border-color: var(--line-2); }
.zg-btn-sec:hover { background: var(--surface); color: var(--ink); border-color: var(--ink-3); }
.zg-btn svg { flex: none; }

.zg-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.zg-chip {
	display: inline-flex; align-items: baseline; gap: 8px;
	padding: 7px 14px;
	border-radius: var(--r-pill);
	background: var(--surface);
	border: 1px solid var(--line);
	font-size: 14.5px; line-height: 1.35; text-decoration: none; color: var(--ink);
	transition: border-color .15s ease, background .15s ease;
}
a.zg-chip:hover { border-color: var(--accent); color: var(--ink); background: var(--accent-soft); }
.zg-chip small { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.zg-chip[aria-current="true"], .zg-chip.is-activo { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.zg-chip.is-activo small { color: inherit; opacity: .8; }

/* ---------- cabecera ---------- */
.zg-top { position: sticky; top: 0; z-index: 30; padding: 12px var(--gutter) 0; }
.zg-bar {
	max-width: calc(var(--wrap) - 2 * var(--gutter) + 40px);
	margin: 0 auto;
	display: flex; align-items: center; gap: 10px;
	padding: 8px 8px 8px 10px;
	background: var(--bar);
	-webkit-backdrop-filter: saturate(1.4) blur(14px);
	backdrop-filter: saturate(1.4) blur(14px);
	border: 1px solid var(--line);
	border-radius: var(--r-pill);
	box-shadow: var(--shadow);
}
.zg-marca { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; padding-right: 6px; }
.zg-marca:hover { color: var(--ink); }
.zg-sello {
	width: 40px; height: 40px; flex: none;
	display: grid; place-items: center;
	border-radius: 50%;
	background: var(--ink); color: var(--bg);
	font-family: var(--f-display); font-variation-settings: "SOFT" 100, "opsz" 14;
	font-weight: 600; font-size: 14.5px; letter-spacing: .02em;
}
.zg-marca-t { font-family: var(--f-display); font-variation-settings: "SOFT" 100, "opsz" 14; font-size: 14.5px; line-height: 1.12; font-weight: 520; }
.zg-nav ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; }
.zg-nav a {
	display: block; padding: 9px 14px; border-radius: var(--r-pill);
	font-size: 15px; font-weight: 500; text-decoration: none; color: var(--ink-2);
	transition: background .15s ease, color .15s ease;
}
.zg-nav a:hover { background: var(--surface-2); color: var(--ink); }
.zg-nav a[aria-current="page"] { background: var(--ink); color: var(--bg); }
.zg-buscar {
	display: flex; align-items: center; gap: 8px;
	background: var(--surface); border: 1px solid var(--line);
	border-radius: var(--r-pill); padding: 0 14px; height: 42px;
	color: var(--ink-3); width: 250px;
	transition: border-color .15s ease, width .25s ease;
}
.zg-buscar:focus-within { border-color: var(--accent); color: var(--accent); width: 300px; }
.zg-buscar input { border: 0; background: transparent; outline: none; font: inherit; font-size: 15px; color: var(--ink); width: 100%; min-width: 0; }
.zg-buscar input::placeholder { color: var(--ink-3); }
.zg-buscar input::-webkit-search-cancel-button { -webkit-appearance: none; }
.zg-icono {
	width: 42px; height: 42px; flex: none;
	display: grid; place-items: center;
	border-radius: 50%; border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--ink-2);
	transition: background .15s ease, color .15s ease;
}
.zg-icono:hover { background: var(--surface-2); color: var(--ink); }
.zg-tema .zg-sol { display: none; }
:root[data-theme="dark"] .zg-tema .zg-sol { display: block; }
:root[data-theme="dark"] .zg-tema .zg-luna { display: none; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .zg-tema .zg-sol { display: block; }
	:root:not([data-theme="light"]) .zg-tema .zg-luna { display: none; }
}
.zg-menu { display: none; }

@media (max-width: 1080px) {
	.zg-buscar { width: 190px; }
	.zg-buscar:focus-within { width: 220px; }
}
@media (max-width: 900px) {
	.zg-menu { display: grid; }
	.zg-nav {
		position: absolute; left: var(--gutter); right: var(--gutter); top: calc(100% + 8px);
		background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l);
		box-shadow: var(--shadow-hover); padding: 10px;
		display: none;
	}
	.zg-nav.is-abierto { display: block; }
	.zg-nav ul { flex-direction: column; }
	.zg-nav a { padding: 13px 16px; font-size: 16px; }
	.zg-buscar { width: auto; flex: 1; }
	.zg-buscar:focus-within { width: auto; }
	.zg-marca { margin-right: 0; }
	.zg-marca-t { display: none; }
}

/* ---------- secciones ---------- */
.zg-seccion { padding: clamp(56px, 8vw, 96px) 0 0; }
.zg-seccion-cab { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }
.zg-seccion-cab h2 { font-size: clamp(28px, 3.4vw, 42px); max-width: 22ch; }
.zg-seccion-cab p { color: var(--ink-2); max-width: 52ch; margin: 12px 0 0; }
.zg-enlace { font-weight: 600; font-size: 15px; text-decoration: none; color: var(--accent); display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.zg-enlace:hover { color: var(--accent-hover); }
.zg-enlace span { transition: transform .18s ease; }
.zg-enlace:hover span { transform: translateX(3px); }

/* ---------- portada ---------- */
.zg-hero { padding: clamp(40px, 7vw, 88px) 0 0; }
.zg-hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.zg-hero h1 { font-size: clamp(40px, 5.6vw, 74px); font-weight: 420; letter-spacing: -.025em; }
.zg-hero h1 em { font-style: italic; font-weight: 380; color: var(--accent); }
.zg-hero .zg-lede { margin-top: 26px; }
.zg-acciones { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.zg-collage { position: relative; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; gap: 16px; }
.zg-arco {
	position: relative; margin: 0;
	border-radius: var(--r-pill) var(--r-pill) var(--r-m) var(--r-m);
	overflow: hidden; background: var(--surface-2);
	box-shadow: var(--shadow);
}
.zg-arco img { width: 100%; height: 100%; object-fit: cover; }
.zg-arco figcaption {
	position: absolute; left: 12px; bottom: 12px; right: 12px;
	font-size: 12.5px; line-height: 1.3; color: #fff;
	background: rgba(20, 14, 10, .55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
	padding: 7px 12px; border-radius: var(--r-pill); width: fit-content; max-width: calc(100% - 24px);
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.zg-collage .zg-arco:nth-child(1) { grid-row: span 2; aspect-ratio: 3 / 4.6; }
.zg-collage .zg-arco:nth-child(2) { aspect-ratio: 1; margin-top: 44px; border-radius: 50%; }
.zg-collage .zg-arco:nth-child(2) figcaption { display: none; }
.zg-collage .zg-arco:nth-child(3) { aspect-ratio: 4 / 4.4; border-radius: var(--r-m) var(--r-m) var(--r-pill) var(--r-pill); }
.zg-collage .zg-arco:nth-child(3) figcaption { bottom: auto; top: 12px; }

.zg-cifras { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: clamp(48px, 7vw, 80px); }
.zg-cifra { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 20px 22px; }
.zg-cifra b { display: block; font-family: var(--f-display); font-variation-settings: "SOFT" 100, "opsz" 72; font-weight: 400; font-size: clamp(32px, 3.4vw, 44px); line-height: 1; font-variant-numeric: tabular-nums lining-nums; letter-spacing: -.02em; }
.zg-cifra span { display: block; margin-top: 8px; font-size: 14.5px; color: var(--ink-2); line-height: 1.35; }

.zg-acervos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.zg-acervo {
	position: relative; display: flex; flex-direction: column;
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l);
	overflow: hidden; text-decoration: none; color: var(--ink);
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.zg-acervo:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--line-2); color: var(--ink); }
.zg-acervo-img { aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; margin: 8px 8px 0; border-radius: calc(var(--r-l) - 8px) calc(var(--r-l) - 8px) var(--r-s) var(--r-s); display: grid; place-items: center; color: var(--ink-3); }
.zg-acervo-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.zg-acervo:hover .zg-acervo-img img { transform: scale(1.04); }
.zg-acervo-txt { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.zg-acervo-txt h3 { font-size: 22px; }
.zg-acervo-txt p { font-size: 14.5px; color: var(--ink-2); line-height: 1.5; margin: 0; }
.zg-acervo-n { margin-top: auto; padding-top: 12px; font-size: 13.5px; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }

.zg-fila {
	display: grid; grid-auto-flow: column; grid-auto-columns: clamp(200px, 22vw, 270px);
	gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
	padding: 4px var(--gutter) 18px; margin: 0 calc(-1 * var(--gutter));
	scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
	overscroll-behavior-x: contain;
}
.zg-fila .zg-card { scroll-snap-align: start; flex: none; max-width: none; }
.zg-fila .zg-card-marco { aspect-ratio: 4 / 5; }
.zg-fila .zg-card-marco img { object-fit: cover; height: 100%; }

.zg-banda { margin-top: clamp(64px, 9vw, 110px); background: var(--ink); color: var(--bg); border-radius: var(--r-l); padding: clamp(32px, 5vw, 64px); display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.zg-banda .zg-eyebrow { color: color-mix(in srgb, var(--bg) 62%, transparent); }
.zg-banda h2 { font-size: clamp(30px, 3.6vw, 46px); }
.zg-banda p { color: color-mix(in srgb, var(--bg) 78%, transparent); }
.zg-banda .zg-btn { background: var(--bg); color: var(--ink); border-color: var(--bg); margin-top: 18px; }
.zg-banda .zg-btn:hover { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--ink); }
.zg-banda ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: paso; }
.zg-banda li { counter-increment: paso; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; align-items: center; padding: 14px; border-radius: var(--r-m); background: color-mix(in srgb, var(--bg) 7%, transparent); border: 1px solid color-mix(in srgb, var(--bg) 12%, transparent); }
.zg-banda li::before { content: counter(paso, decimal-leading-zero); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 600; background: var(--accent); color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.zg-banda li b { display: block; font-family: var(--f-display); font-variation-settings: "SOFT" 100; font-weight: 450; font-size: 18px; line-height: 1.25; }
.zg-banda li span { font-size: 14px; color: color-mix(in srgb, var(--bg) 70%, transparent); }

/* ---------- rejilla justificada ---------- */
.zg-grid { display: flex; flex-wrap: wrap; gap: 28px 16px; }
.zg-grid::after { content: ""; flex-grow: 999999; }
.zg-card {
	flex: calc(var(--r) * 100) 1 calc(var(--r) * var(--row-h));
	max-width: calc(var(--r) * var(--row-h) * 1.7);
	min-width: 0;
}
.zg-card-link { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--ink); height: 100%; }
.zg-card-link:hover { color: var(--ink); }
.zg-card-marco {
	display: block; position: relative; overflow: hidden;
	aspect-ratio: var(--r);
	border-radius: var(--r-m);
	background: var(--surface-2);
	transition: box-shadow .25s ease, transform .25s ease, border-radius .25s ease;
}
.zg-card-marco img { width: 100%; height: 100%; object-fit: contain; transition: transform .5s ease; }
.zg-card-link:hover .zg-card-marco { box-shadow: var(--shadow-hover); transform: translateY(-2px); border-radius: calc(var(--r-m) + 8px); }
.zg-card-link:hover .zg-card-marco img { transform: scale(1.03); }
.zg-card-vacia {
	position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
	color: var(--ink-3); font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
	background: repeating-linear-gradient(135deg, transparent 0 10px, color-mix(in srgb, var(--line) 45%, transparent) 10px 11px);
}
.zg-card-texto { display: flex; flex-direction: column; gap: 3px; padding: 0 4px; }
.zg-card-rel { font-size: 12.5px; color: var(--accent); font-weight: 600; line-height: 1.3; }
.zg-card-t { font-family: var(--f-display); font-variation-settings: "SOFT" 100, "opsz" 18; font-size: 16.5px; line-height: 1.28; font-weight: 450; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.zg-card-link:hover .zg-card-t { color: var(--accent); }
.zg-card-m { font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zg-grid .zg-card { animation: zg-entra .45s ease both; }
@keyframes zg-entra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 640px) {
	:root { --row-h: 150px; }
	.zg-grid { gap: 22px 12px; }
	.zg-card-t { font-size: 15px; }
}

/* ---------- explorar ---------- */
.zg-explorar { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); padding-top: clamp(32px, 5vw, 56px); align-items: start; }
.zg-explorar-cab { grid-column: 1 / -1; display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.zg-explorar-cab h1 { font-size: clamp(36px, 4.6vw, 58px); font-weight: 420; }
.zg-explorar-cab h1 small { font-family: var(--f-ui); font-size: 16px; color: var(--ink-3); font-weight: 500; letter-spacing: 0; margin-left: 10px; font-variant-numeric: tabular-nums; vertical-align: middle; }
.zg-herr { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.zg-criterios { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: -8px; }
.zg-criterios .zg-chip { background: var(--accent-soft); border-color: transparent; padding-right: 8px; }
.zg-criterios .zg-chip span.x { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); font-size: 14px; line-height: 1; }
.zg-criterios .zg-chip:hover span.x { background: var(--accent); color: var(--accent-ink); }
.zg-limpiar { font-size: 14px; color: var(--ink-3); margin-left: 4px; }

.zg-filtros { position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; padding-right: 6px; }
.zg-filtros-cab { display: none; }
.zg-faceta { border-top: 1px solid var(--line); padding: 14px 0; }
.zg-faceta:first-of-type { border-top: 0; padding-top: 0; }
.zg-faceta summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 15px; padding: 4px 0; }
.zg-faceta summary::-webkit-details-marker { display: none; }
.zg-faceta summary::after { content: ""; width: 9px; height: 9px; border-right: 1.8px solid var(--ink-3); border-bottom: 1.8px solid var(--ink-3); transform: rotate(45deg) translateY(-3px); transition: transform .2s ease; }
.zg-faceta[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.zg-faceta ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 2px; }
.zg-faceta li a { display: flex; justify-content: space-between; gap: 12px; padding: 7px 12px; margin: 0 -12px; border-radius: var(--r-s); text-decoration: none; font-size: 14.5px; color: var(--ink-2); line-height: 1.35; }
.zg-faceta li a:hover { background: var(--surface-2); color: var(--ink); }
.zg-faceta li a small { color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: 13px; }
.zg-faceta li.is-extra { display: none; }
.zg-faceta.is-expandida li.is-extra { display: block; }
.zg-mas-facetas { background: none; border: 0; padding: 8px 0 0; color: var(--accent); font-weight: 600; font-size: 14px; cursor: pointer; }

.zg-pop { position: relative; }
.zg-pop summary { list-style: none; cursor: pointer; }
.zg-pop summary::-webkit-details-marker { display: none; }
.zg-pop-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow-hover); padding: 8px; }
.zg-pop-menu p { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: 6px 10px; }
.zg-pop-menu a { display: flex; justify-content: space-between; padding: 9px 10px; border-radius: var(--r-s); text-decoration: none; font-size: 14.5px; }
.zg-pop-menu a:hover { background: var(--surface-2); color: var(--ink); }
.zg-pop-menu a[aria-current="true"] { color: var(--accent); font-weight: 600; }
.zg-pop-menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.zg-btn-filtros { display: none; }

.zg-resultados { min-width: 0; --row-h: 180px; }
.zg-cargar { display: flex; justify-content: center; margin-top: 44px; }
.zg-cargar .zg-btn-sec[aria-busy="true"] { opacity: .6; pointer-events: none; }
.zg-vacio { background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--r-l); padding: 48px 32px; text-align: center; color: var(--ink-2); }
.zg-vacio h2 { font-size: 26px; margin-bottom: 10px; color: var(--ink); }

@media (max-width: 900px) {
	.zg-explorar { grid-template-columns: minmax(0, 1fr); }
	.zg-btn-filtros { display: inline-flex; }
	.zg-filtros {
		position: fixed; inset: auto 0 0 0; top: auto; z-index: 40;
		max-height: 82vh; background: var(--surface); border-radius: var(--r-l) var(--r-l) 0 0;
		padding: 0 var(--gutter) 28px; box-shadow: 0 -20px 60px -20px rgba(0, 0, 0, .35);
		transform: translateY(105%); transition: transform .3s ease; visibility: hidden;
	}
	.zg-filtros.is-abierto { transform: none; visibility: visible; }
	.zg-filtros-cab { display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: var(--surface); padding: 16px 0 12px; margin-bottom: 8px; border-bottom: 1px solid var(--line); z-index: 1; }
	.zg-filtros-cab h2 { font-size: 22px; }
	.zg-faceta:first-of-type { padding-top: 14px; }
}

/* ---------- ficha ---------- */
.zg-migas { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; list-style: none; margin: 0; padding: clamp(28px, 4vw, 44px) 0 0; font-size: 14px; color: var(--ink-3); }
.zg-migas li + li::before { content: "/"; margin-right: 6px; color: var(--line-2); }
.zg-migas a { text-decoration: none; color: var(--ink-2); }
.zg-migas a:hover { color: var(--accent); }

.zg-ficha { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(28px, 5vw, 72px); padding-top: 22px; align-items: start; }
.zg-visual { position: sticky; top: 96px; }
.zg-lamina {
	position: relative; margin: 0;
	background: var(--surface-2); border-radius: var(--r-l);
	padding: clamp(18px, 3.5vw, 48px);
	display: grid; place-items: center;
	min-height: min(62vh, 620px);
}
.zg-lamina img { max-height: 68vh; width: auto; border-radius: 6px; box-shadow: 0 30px 60px -30px rgba(40, 25, 10, .5); cursor: zoom-in; }
.zg-lamina.es-arco img { border-radius: 400px 400px 10px 10px; }
.zg-ampliar { position: absolute; right: 16px; bottom: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.zg-sin-imagen { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; color: var(--ink-3); max-width: 34ch; }
.zg-sin-imagen svg { width: 56px; height: 56px; }
.zg-sin-imagen b { font-family: var(--f-display); font-variation-settings: "SOFT" 100; font-weight: 450; font-size: 22px; color: var(--ink); }
.zg-sin-imagen p { font-size: 14.5px; color: var(--ink-2); }
.zg-onda { display: flex; gap: 4px; align-items: center; height: 64px; }
.zg-onda i { width: 4px; border-radius: 4px; background: var(--accent); opacity: .7; }
.zg-credito { font-size: 12.5px; color: var(--ink-3); margin: 12px 6px 0; line-height: 1.45; overflow-wrap: anywhere; }

.zg-info h1 { font-size: clamp(32px, 3.8vw, 50px); font-weight: 430; margin: 14px 0 0; }
.zg-meta-linea { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.zg-pastilla { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600; }
.zg-pastilla.neutra { background: var(--surface-2); color: var(--ink-2); }
.zg-fecha { margin-top: 12px; font-size: 17px; color: var(--ink-2); }
.zg-texto { margin-top: 26px; font-family: var(--f-display); font-variation-settings: "SOFT" 100, "opsz" 20; font-size: 19px; line-height: 1.55; color: var(--ink); max-width: 60ch; }
.zg-texto.es-largo { max-height: 15.5em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.zg-texto.es-largo.is-abierto { max-height: none; -webkit-mask-image: none; mask-image: none; }
.zg-leer { margin-top: 8px; background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; cursor: pointer; font-size: 15px; }

.zg-bloque { margin-top: 34px; }
.zg-bloque > h2 { font-family: var(--f-ui); font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; }
.zg-datos { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.zg-datos div { display: grid; grid-template-columns: minmax(120px, 38%) minmax(0, 1fr); gap: 16px; padding: 12px 18px; }
.zg-datos div + div { border-top: 1px solid var(--line); }
.zg-datos dt { font-size: 14px; color: var(--ink-3); }
.zg-datos dd { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.zg-rel-grupo + .zg-rel-grupo { margin-top: 14px; }
.zg-rel-grupo h3 { font-family: var(--f-ui); font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--ink-2); }
.zg-chip-rel { flex-direction: column; gap: 0; align-items: flex-start; border-radius: var(--r-m); padding: 9px 16px; }
.zg-chip-rel small { font-size: 12px; }
.zg-vinculos { display: grid; gap: 10px; }
.zg-vinculo { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: center; padding: 8px; padding-right: 16px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: border-color .15s ease, background .15s ease; }
.zg-vinculo:hover { border-color: var(--accent); color: var(--ink); }
.zg-vinculo-img { width: 64px; height: 64px; border-radius: 12px; background: var(--surface-2); overflow: hidden; display: grid; place-items: center; color: var(--ink-3); }
.zg-vinculo-img img { width: 100%; height: 100%; object-fit: cover; }
.zg-vinculo-img svg { width: 22px; height: 22px; }
.zg-vinculo small { display: block; font-size: 12.5px; color: var(--accent); font-weight: 600; }
.zg-vinculo b { display: block; font-family: var(--f-display); font-variation-settings: "SOFT" 100; font-weight: 450; font-size: 16px; line-height: 1.3; }
.zg-herramientas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.zg-paginar { display: flex; justify-content: space-between; gap: 12px; margin-top: clamp(48px, 7vw, 80px); padding-top: 24px; border-top: 1px solid var(--line); }
.zg-paginar a { text-decoration: none; }

@media (max-width: 900px) {
	.zg-ficha { grid-template-columns: minmax(0, 1fr); }
	.zg-visual { position: static; }
	.zg-lamina { min-height: 0; }
	.zg-lamina img { max-height: 60vh; }
}
@media (max-width: 520px) {
	.zg-datos div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* ---------- autoridades ---------- */
.zg-autoridad { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end; padding-top: 22px; }
.zg-autoridad h1 { font-size: clamp(38px, 5vw, 64px); font-weight: 420; margin-top: 14px; }
.zg-autoridad .zg-texto { margin-top: 20px; }
.zg-avatar { width: clamp(96px, 12vw, 150px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; font-family: var(--f-display); font-variation-settings: "SOFT" 100; font-size: clamp(34px, 4vw, 52px); color: var(--ink-2); border: 6px solid var(--surface); box-shadow: var(--shadow); }
.zg-avatar img { width: 100%; height: 100%; object-fit: cover; }
.zg-resumen { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
@media (max-width: 640px) {
	.zg-autoridad { grid-template-columns: minmax(0, 1fr); }
	.zg-avatar { order: -1; }
}

/* ---------- acervos ---------- */
.zg-fondos { display: grid; gap: 18px; }
.zg-fondo { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; }
.zg-fondo-img { background: var(--surface-2); min-height: 260px; margin: 10px; border-radius: calc(var(--r-l) - 10px); overflow: hidden; display: grid; place-items: center; color: var(--ink-3); }
.zg-fondo-img img { width: 100%; height: 100%; object-fit: cover; }
.zg-fondo-txt { padding: clamp(22px, 3vw, 36px); display: flex; flex-direction: column; gap: 12px; }
.zg-fondo-txt h2 { font-size: clamp(26px, 2.8vw, 36px); }
.zg-fondo-txt h2 a { text-decoration: none; }
.zg-fondo-txt > p { color: var(--ink-2); max-width: 60ch; }
.zg-series { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.zg-series a { display: flex; justify-content: space-between; gap: 10px; padding: 11px 14px; border-radius: var(--r-s); background: var(--bg); text-decoration: none; font-size: 14.5px; line-height: 1.35; }
.zg-series a:hover { background: var(--accent-soft); color: var(--ink); }
.zg-series small { color: var(--ink-3); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
	.zg-fondo { grid-template-columns: minmax(0, 1fr); }
	.zg-fondo-img { min-height: 200px; aspect-ratio: 16 / 9; }
}

/* ---------- recorrido ---------- */
.zg-rec-intro { padding-top: clamp(40px, 7vw, 88px); max-width: 900px; }
.zg-rec-intro h1 { font-size: clamp(38px, 5.2vw, 68px); font-weight: 420; }
.zg-rec-intro .zg-lede { margin-top: 24px; }
.zg-pasos { list-style: none; margin: clamp(48px, 7vw, 80px) 0 0; padding: 0; position: relative; display: grid; gap: clamp(40px, 6vw, 72px); }
.zg-pasos::before { content: ""; position: absolute; left: 27px; top: 30px; bottom: 30px; width: 2px; background: linear-gradient(var(--accent), var(--line-2)); border-radius: 2px; }
.zg-paso { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(0, .8fr); gap: clamp(20px, 3.5vw, 48px); align-items: center; }
.zg-paso-n { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-variant-numeric: tabular-nums; box-shadow: 0 0 0 8px var(--bg); align-self: start; }
.zg-paso h2 { font-size: clamp(26px, 3vw, 38px); margin: 8px 0 14px; }
.zg-paso p { color: var(--ink-2); font-size: 17px; max-width: 54ch; }
.zg-paso .zg-enlace { margin-top: 16px; }
.zg-paso-media { margin: 0; }
.zg-paso-media .zg-lamina { min-height: 0; padding: 22px; }
.zg-paso-media .zg-lamina img { max-height: 380px; cursor: default; }
.zg-ficha-mini { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 24px; }
.zg-ficha-mini .zg-onda { margin-bottom: 12px; }
.zg-ficha-mini dl { margin: 0; display: grid; gap: 10px; }
.zg-ficha-mini dt { font-size: 13px; color: var(--ink-3); }
.zg-ficha-mini dd { margin: 0; font-size: 15px; }
.zg-cierre { margin-top: clamp(56px, 8vw, 96px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: clamp(28px, 5vw, 56px); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: center; }
.zg-cierre h2 { font-size: clamp(28px, 3.2vw, 40px); margin-bottom: 14px; }
.zg-cierre p { color: var(--ink-2); max-width: 62ch; }
.zg-nota { margin-top: 18px; font-size: 14px; color: var(--ink-3); padding-left: 14px; border-left: 3px solid var(--accent); }
@media (max-width: 860px) {
	.zg-paso { grid-template-columns: 56px minmax(0, 1fr); }
	.zg-paso-media { grid-column: 2; }
	.zg-cierre { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- prosa ---------- */
.zg-prosa { max-width: 760px; }
.zg-prosa h1 { font-size: clamp(38px, 5vw, 62px); font-weight: 420; margin-bottom: 24px; }
.zg-prosa h2 { font-size: clamp(26px, 3vw, 34px); margin: 48px 0 14px; }
.zg-prosa p, .zg-prosa li { color: var(--ink-2); font-size: 17px; }
.zg-prosa ul { padding-left: 20px; }
.zg-aviso { background: var(--accent-soft); border-radius: var(--r-l); padding: 24px 28px; margin: 28px 0; }
.zg-aviso p { color: var(--ink); }
.zg-tabla { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; font-size: 15px; }
.zg-tabla th, .zg-tabla td { text-align: left; padding: 12px 16px; vertical-align: top; }
.zg-tabla th { font-size: 13px; color: var(--ink-3); font-weight: 600; background: var(--surface-2); }
.zg-tabla tr + tr td { border-top: 1px solid var(--line); }

/* ---------- pie ---------- */
.zg-pie { margin-top: clamp(80px, 11vw, 140px); border-top: 1px solid var(--line); background: var(--surface); padding: 48px 0 28px; }
.zg-pie-grid { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.6fr) minmax(0, .7fr); gap: clamp(24px, 4vw, 56px); }
.zg-pie-marca { display: flex; flex-direction: column; gap: 14px; font-size: 14.5px; color: var(--ink-2); }
.zg-ficcion { font-size: 14.5px; color: var(--ink-2); background: var(--bg); border-radius: var(--r-m); padding: 20px 22px; border: 1px solid var(--line); }
.zg-ficcion .zg-eyebrow { color: var(--accent); margin-bottom: 8px; }
.zg-ficcion strong { color: var(--ink); }
.zg-pie-nav { display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.zg-pie-nav a { text-decoration: none; color: var(--ink-2); }
.zg-pie-nav a:hover { color: var(--accent); }
.zg-colofon { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 36px; font-size: 13px; color: var(--ink-3); }
@media (max-width: 860px) {
	.zg-pie-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- visor ---------- */
.zg-visor { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; margin: 0; }
.zg-visor::backdrop { background: rgba(12, 9, 7, .9); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.zg-visor[open] { display: grid; place-items: center; }
.zg-visor img { max-width: calc(100vw - 48px); max-height: calc(100vh - 48px); border-radius: 8px; object-fit: contain; }
.zg-visor-cerrar { position: fixed; top: 16px; right: 16px; background: rgba(255, 255, 255, .12); color: #fff; }
.zg-visor-cerrar:hover { background: rgba(255, 255, 255, .24); color: #fff; }

/* ---------- responsive general ---------- */
@media (max-width: 980px) {
	.zg-hero-grid { grid-template-columns: minmax(0, 1fr); }
	.zg-collage { max-width: 560px; }
	.zg-acervos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.zg-cifras { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.zg-banda { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
	body { font-size: 16px; }
	.zg-acervos { grid-template-columns: minmax(0, 1fr); }
	.zg-acervo { display: grid; grid-template-columns: 112px minmax(0, 1fr); }
	.zg-acervo-img { aspect-ratio: auto; margin: 8px 0 8px 8px; border-radius: calc(var(--r-l) - 8px) var(--r-s) var(--r-s) calc(var(--r-l) - 8px); }
	.zg-acervo-txt { padding: 14px 16px; }
	.zg-acervo-txt h3 { font-size: 19px; }
	.zg-acervo-txt p { display: none; }
	.zg-acervo-n { padding-top: 4px; }
	.zg-sello { width: 36px; height: 36px; font-size: 13px; }
	.zg-icono { width: 38px; height: 38px; }
	.zg-buscar { height: 38px; padding: 0 12px; }
	.zg-bar { gap: 6px; padding: 6px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
