/* ---------- 5. Buttons & actions ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 44px;
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--ink);
  border-radius: 0; /* square — institutional tone */
  background: var(--ink);
  color: var(--base);
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.btn:hover { background: var(--teal-dark); border-color: var(--teal-dark); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--base); }
.btn--light { background: var(--base); color: var(--ink); border-color: var(--base); }
.btn--light:hover { background: var(--teal-soft); border-color: var(--teal-soft); }

/* Actions whose destination ASIDEHU has not chosen yet (donation platform,
   enrolment form, the four Museo routes). Stored as a paragraph; inc/pending.php
   renders it as a link to /contacto/ (or the donation URL) for everyone. The
   quiet parenthetical beside it is the client's own ask, 2026-08-31 20:46:02 —
   "ahí lo pones entre paréntesis: favor editar, para recordarnos" — and only
   logged-in editors see it. */
.pending-action { display: flex; flex-wrap: wrap; gap: 0.5rem 0.9rem; align-items: center; }
.pending-action__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0;
  /* Same outer box as the core button (0.7rem padding, no border). */
  padding: calc(0.7rem - 1px) 1.25rem;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--base);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}
a.pending-action__btn:hover { background: var(--teal-dark); border-color: var(--teal-dark); }
.pending-action__note { margin: 0; font-size: 0.8125rem; line-height: 1.4; color: var(--muted); }
.pending-action--light .pending-action__btn { background: var(--base); border-color: var(--base); color: var(--ink); }
.pending-action--light .pending-action__btn:hover { background: var(--teal-soft); border-color: var(--teal-soft); }
.pending-action--light .pending-action__note { color: var(--base); opacity: 0.8; }

.text-link {
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

/* ---------- 6. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--base) 94%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 1rem;
}
.site-branding { display: flex; align-items: center; }
.custom-logo { display: block; width: auto; max-height: 44px; }
.site-branding__fallback { display: block; width: auto; text-decoration: none; }
.site-branding__fallback picture { display: block; }
.site-branding__logo { display: block; width: auto; height: 48px; max-width: min(40vw, 250px); }
.site-navigation__list a {
  font-size: 0.85rem;
  font-weight: 650;
  text-decoration: none;
}
.site-navigation__list a:hover { color: var(--teal); }
.site-navigation__list .current-menu-item > a,
.site-navigation__list a[aria-current="page"] {
  color: var(--teal-dark);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: var(--terracotta);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* ---------- 7. Section head ---------- */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.section-head h2 { max-width: 22ch; }
.section-head__link { font-weight: 700; font-size: 0.9rem; white-space: nowrap; }

/* ---------- 8. Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  padding: 4.75rem 0 2.5rem;
  overflow: hidden;
  background: var(--surface);
}
.hero::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: -9rem;
  right: -7rem;
  width: clamp(16rem, 24vw, 22rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--amarillo);
  opacity: 1;
  pointer-events: none;
}
.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  gap: clamp(2rem, 6vw, 7rem);
  align-items: center;
}
.hero h1 { max-width: 14ch; margin: 1rem 0 1.5rem; font-size: clamp(2.4rem, 4vw, 3.6rem); letter-spacing: 0.015em; }
.hero__lead { max-width: 54ch; font-size: 1.18rem; margin-bottom: 2rem; }

.route-card {
  position: relative;
  min-height: 510px;
  background: var(--surface);
  border: 1px solid var(--line);
  isolation: isolate;
}
.route-card::before, .route-card::after {
  content: "";
  position: absolute;
  border: 1px solid var(--terracotta);
}
.route-card::before { inset: 28px -28px -28px 28px; z-index: -1; }
.route-card::after { width: 18px; height: 18px; top: 26px; right: 26px; }
.route-card svg { width: 100%; height: 100%; min-height: 510px; color: var(--teal); }
/* Photo variant. Same box as the illustration, so the hero's height does not move
   when ASIDEHU sets the hero image; the note keeps its corner on top of it. */
.route-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- 9. Record strip ---------- */
.record-strip {
  background: var(--ink);
  color: var(--base);
  border-block: 1px solid var(--line);
}
.record-strip .record-fact .meta { color: var(--base); }
.record-strip__grid {
  display: grid;
  /* Additional figures wrap; the original count retains its existing widths. */
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}
.record-fact {
  padding: 1.7rem 2rem;
  border-right: 1px solid var(--line);
}
.record-fact:first-child { padding-left: 0; }
.record-fact:last-child { border-right: 0; }
/* Keep today's one-row belt above phone width; additional figures auto-fit.
   Tablet spacing still fits four at 701px. Phones use two columns: templates.css. */
@media (min-width: 701px) {
  .record-strip__grid { grid-template-columns: repeat(auto-fit, minmax(var(--asidehu-figure-min, 13rem), 1fr)); }
  .record-strip__grid--rows { grid-template-columns: repeat(var(--asidehu-figure-cols, 3), minmax(0, 1fr)); }
  .record-strip__grid--rows .record-fact--row-start { padding-left: 0; }
  .record-strip__grid--rows .record-fact--row-end { border-right: 0; }
  .record-strip__grid--rows .record-fact--next-row { border-top: 1px solid var(--line); }
}
@media (min-width: 701px) and (max-width: 1100px) {
  .record-fact { padding-inline: 1.1rem; }
  .record-fact:first-child { padding-left: 0; }
  .record-fact strong { font-size: 1.85rem; }
}
.record-fact strong {
  display: block;
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 400;
  font-synthesis: none;
  line-height: 1;
  margin-bottom: 0.4rem;
}
/* A figure ASIDEHU has not supplied. Quieter and smaller than a real number, in
   the site's own sans, so it reads as a slot waiting to be filled and not as a
   value. Deliberately not the terracotta .asidehu-pending block: this is the
   first band on the home page. */
.record-fact--pending strong {
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.35;
  color: var(--base);
}
/* The "actualizada hasta" note the client asked for under the belt — small, but
   part of the band rather than an afterthought stuck to the bottom of it. */
.record-strip__asof {
  margin: 0;
  text-align: end;
  padding-block: 0.9rem 0;
  border-block-start: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--light);
}

/* Aspect-ratio media container. Wraps a core Embed/Video block, and stands in
   as a visible placeholder before an editor has inserted one. */
.media-frame {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  padding: var(--space-3);
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}
.media-frame--dark { background: var(--ink); border-color: var(--ink-border); color: var(--light); }
.media-frame svg { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--teal); opacity: 0.5; }
/* A real embed fills the frame; the placeholder paragraph keeps its own flow. */
.media-frame > :is(iframe, video, .wp-block-embed) { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- 10. Publication cover ---------- */
.pub-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  padding: 1.5rem;
  background: var(--teal);
  color: var(--base);
  box-shadow: 18px 18px 0 var(--surface), 19px 19px 0 var(--line);
  overflow: hidden;
}
.pub-cover .meta { color: inherit; }
.pub-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pub-cover::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 22%;
  border-top: 2px solid currentColor;
  transform: rotate(-7deg);
}
.pub-cover h3 {
  position: relative;
  z-index: 1;
  max-width: 14ch;
  margin-top: 3rem;
	font-size: clamp(1.25rem, 1.9vw, 1.7rem);
	overflow-wrap: anywhere;
}
.pub-cover svg {
  position: absolute;
  right: -12%;
  bottom: -8%;
  width: 85%;
  color: var(--base);
  opacity: 0.34;
}
/* ---------- 11. Dossier ---------- */
.dossier { padding: var(--space-6) 0; }
.dossier__grid {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: clamp(2rem, 7vw, 7.5rem);
  align-items: center;
}
.dossier__copy { max-width: 670px; }
.dossier__copy h2 { margin: 0.85rem 0 1.2rem; }
.dossier__meta { margin: 1.2rem 0 0; }

.citation {
  margin: 1.75rem 0;
  padding: 1rem 1.2rem;
  border-left: 3px solid var(--terracotta);
  background: var(--surface);
  font-size: 0.92rem;
}

/* ---------- 12. Document index ---------- */
.document-index { padding: 0 0 var(--space-6); }
.index-list { display: flex; flex-direction: column; }
.index-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 1.4rem;
  min-height: 100px;
  border-top: 1px solid var(--line);
  padding: 0.5rem 0;
}
.index-row:last-child { border-bottom: 1px solid var(--line); }
.index-row__no {
  font-family: var(--serif);
  font-weight: 400;
  font-synthesis: none;
  font-size: 1.6rem;
  color: var(--terracotta);
}
.index-row__body h3 { margin: 0 0 0.3rem; font-size: 1.3rem; }
.index-row__body h3 a { text-decoration: none; }
.index-row__body h3 a:hover { text-decoration: underline; }
.index-row__action { white-space: nowrap; }

/* ---------- 13. Mesa chapter ---------- */
.mesa-chapter {
  padding: var(--space-6) 0;
  background: var(--ink);
  color: var(--base);
  overflow: hidden;
}
.mesa-chapter__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
/* Below ~1024px the two-column split squeezes the copy column so synthesis
   titles wrap awkwardly with empty space beside the date; give the content the
   full width until the section is wide enough for the plate to sit alongside. */
@media (max-width: 1024px) {

  .mesa-chapter__grid { grid-template-columns: 1fr; gap: 2.5rem; }
  /* Single-column: let the heading use the full measure instead of stacking
     into a 9ch column with dead space beside it. */
  .mesa-chapter h2 { max-width: none; }
}
.mesa-chapter h2 { max-width: 22ch; }
.mesa-chapter__copy p:not(.eyebrow) { color: var(--light); max-width: 50ch; }
.mesa-chapter a:not(.btn) { color: var(--base); }
.mesa-chapter a:not(.btn):hover { color: var(--teal-soft); }
.synthesis-list {
  margin: 2rem 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink-line);
}
.synthesis-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--ink-line);
}
.synthesis-list a { font-family: var(--sans); font-size: 1.1rem; }
.synthesis-list .meta { color: var(--light); }
.mesa-chapter__plate {
  position: relative;
  min-height: 470px;
  border: 1px solid var(--ink-line);
}
.mesa-chapter__plate svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--teal-soft);
}
/* Photo variant. Same box as the illustration so the section's height does not
   move when ASIDEHU adds a featured image to the Mesa page; the caption keeps its
   corner and stays legible because the plate is on the dark band. */
.mesa-chapter__plate img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- 14. Project stories ---------- */
.projects { padding: var(--space-6) 0; }
/* Recursos sits directly under the project stories; the shorter card keeps the
   pair legible as a secondary band rather than a second flagship row. */
.resources { padding: 0 0 var(--space-6); }
.project-grid--compact .project-story { min-height: 320px; }
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.project-story {
  position: relative;
  min-height: 520px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: end;
  overflow: hidden;
}
.project-story--sand { background: var(--surface); }
.project-story--terracotta { background: var(--terracotta); color: var(--base); }
.project-story--teal { background: var(--teal-dark); color: var(--base); }
.project-story--pale { background: var(--teal-pale); }
.project-story .project-story__copy .folio { color: var(--ink); }
.project-story__art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--teal);
  opacity: 0.33;
}
.project-story--terracotta .project-story__art { color: var(--base); opacity: 0.24; }
.project-story--teal .project-story__art { color: var(--base); opacity: 0.22; }
/* A photograph replaces the tinted wash at FULL opacity — at .24/.33 it turns to mud.
   The copy panel below is already opaque, so legibility is unaffected. */
.project-story__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* With the plate covered by a photo, the sand/terracotta pairing survives as a frame
   rather than as a tint over the image. */
.project-story--sand:has(.project-story__photo) { border: 3px solid var(--line); }
.project-story--terracotta:has(.project-story__photo) { border: 3px solid var(--terracotta); }
.project-story--teal:has(.project-story__photo) { border: 3px solid var(--teal-dark); }
.project-story--pale:has(.project-story__photo) { border: 3px solid var(--teal-soft); }
/* Programme identity: Verde/Lavanda are thin rules on the white copy panel. */
.project-story--sand { --programme: var(--azur); }
.project-story--terracotta { --programme: var(--naranja); }
.project-story--teal { --programme: var(--verde); }
.project-story--pale { --programme: var(--lavanda); }
.project-story::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0 0 auto;
  height: 8px;
  background: var(--programme);
}
.project-story__copy {
  position: relative;
  z-index: 1;
  max-width: 28rem;
  padding: 1.4rem;
  background: var(--base);
  color: var(--ink);
}
/* Never place Verde/Lavanda against a dark plate or an uncontrolled photo. */
.project-story--teal::after,
.project-story--pale::after { display: none; }
.project-story--teal .project-story__copy,
.project-story--pale .project-story__copy { border-block-start: 4px solid var(--programme); }
.project-story__copy h3 { font-size: 2.1rem; margin: 0.5rem 0; }
.project-story__copy a { font-weight: 700; }

/* ---------- 15. Update ledger ---------- */
.updates { padding: 0 0 var(--space-6); }
.ledger { border-top: 3px solid var(--ink); }
.ledger-row {
  display: grid;
  grid-template-columns: 130px 150px 1fr;
  gap: 1rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.ledger-row__date { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.02em; text-transform: lowercase; font-variant-numeric: lining-nums tabular-nums; }
.ledger-row a { font-family: var(--sans); font-size: 1.2rem; font-weight: 700; display: inline-block; margin-bottom: 0.35rem; }
.ledger-row > div p { margin: 0; }

/* ---------- 16. Footer ---------- */
.site-footer {
  padding: var(--space-3) 0;
  background: var(--ink);
  color: var(--base);
  border-top: 3px solid var(--terracotta);
}
.site-footer__colophon {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}
.site-footer__brand {
  display: block;
  width: min(18rem, 100%);
  height: auto;
  margin-bottom: 0.75rem;
}
.site-footer__org { color: var(--light); max-width: 45ch; margin: 0 0 0.4rem; font-size: 0.92rem; line-height: 1.55; }
.site-footer__loc { color: var(--light); font-size: 0.86rem; margin: 0; }
.site-footer__social {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--light);
  background: transparent;
  border-radius: var(--radius);
  transition: color 0.15s, background-color 0.15s;
}
.site-footer__social a:hover,
.site-footer__social a:focus-visible {
  color: var(--teal-soft);
  background: color-mix(in srgb, var(--teal-soft) 15%, transparent);
}
.site-footer__social a:focus-visible {
  outline: 2px solid var(--teal-soft);
  outline-offset: 2px;
}
.site-footer__social svg { width: 22px; height: 22px; }
.site-footer__legal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid var(--ink-line);
  color: var(--light);
  font-size: 0.82rem;
}
.site-footer__legal-links { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.site-footer__legal a { color: var(--light); text-decoration: none; }
.site-footer__legal a:hover { color: var(--base); text-decoration: underline; text-underline-offset: 0.18em; }

@media (max-width: 700px) {
	.site-branding__logo { height: 44px; max-width: min(48vw, 240px); }
	.site-footer__colophon { flex-direction: column; align-items: flex-start; }
  .site-footer__legal { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
}

/* ---------- 17c. Term chips ---------- */
.term-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 1.5rem;
}
.term-chips li a {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--surface);
  color: var(--teal-dark);
  text-decoration: none;
  border-radius: 999px;
}
.term-chips li a:hover { background: var(--teal); color: var(--base); }

/* Code-owned shell. The navigation panel remains visible until JavaScript enhances it. */
.site-header__inner,
.site-main__inner {
	width: var(--shell);
	margin-inline: auto;
}

.site-navigation {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.site-navigation__toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 44px;
	height: 44px;
	padding: 10px;
	border: 1px solid var(--line);
	border-radius: 0;
	background: transparent;
	color: var(--ink);
	cursor: pointer;
}

.site-navigation__toggle > span:not(.screen-reader-text) {
	display: block;
	width: 100%;
	height: 2px;
	background: currentColor;
	transition: transform 0.2s, opacity 0.2s;
}

.site-navigation__toggle[aria-expanded="true"] > span:not(.screen-reader-text):nth-child(2) {
	transform: translateY(7px) rotate(45deg);
}

.site-navigation__toggle[aria-expanded="true"] > span:not(.screen-reader-text):nth-child(3) {
	opacity: 0;
}

.site-navigation__toggle[aria-expanded="true"] > span:not(.screen-reader-text):nth-child(4) {
	transform: translateY(-7px) rotate(-45deg);
}

@media (prefers-reduced-motion: reduce) {
	.site-navigation__toggle > span:not(.screen-reader-text) { transition: none; }
}

.site-navigation__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 1.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-navigation__list a {
	text-underline-offset: 0.18em;
}

/* ---------- Grouped navigation ----------
   Two disclosure groups keep ten routes inside a six-item bar. The toggle is a
   real <button> (PHP fallback emits one; navigation.js swaps the assigned menu's
   `#` parent link for one), so keyboard and touch behave the same as the mouse.
   With JavaScript off no button exists and the submenus simply render inline. */
.site-navigation__submenu-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	font-size: 0.85rem;
	font-weight: 650;
	cursor: pointer;
}
.site-navigation__submenu-toggle::after {
	content: "";
	width: 0.4em;
	height: 0.4em;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-0.15em) rotate(45deg);
	transition: transform 0.15s;
}
@media (prefers-reduced-motion: reduce) {
	.site-navigation__submenu-toggle::after { transition: none; }
}
.site-navigation__submenu-toggle:hover { color: var(--teal); }
.site-navigation__item--group.is-open > .site-navigation__submenu-toggle::after {
	transform: translateY(0.1em) rotate(-135deg);
}
/* A submenu item being current has to show on the closed bar too. */
.site-navigation__list .current-menu-ancestor > .site-navigation__submenu-toggle {
	color: var(--teal-dark);
	font-weight: 800;
	text-decoration: underline;
	text-decoration-color: var(--terracotta);
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}
.site-navigation__list .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

@media (min-width: 701px) {
	.site-navigation__item--group { position: relative; }
	.site-navigation--enhanced .site-navigation__item--group > .sub-menu {
		position: absolute;
		top: calc(100% + 0.75rem);
		left: -1rem;
		z-index: 30;
		display: none;
		min-width: 20rem;
		padding-block: 0.4rem;
		background: var(--base);
		border: 1px solid var(--line);
		box-shadow: 0 12px 28px color-mix(in srgb, var(--ink) 14%, transparent);
	}
	/* Bridges the gap below the toggle so the pointer can reach the panel. */
	.site-navigation--enhanced .site-navigation__item--group > .sub-menu::before {
		content: "";
		position: absolute;
		inset-inline: 0;
		bottom: 100%;
		height: 0.75rem;
	}
	.site-navigation--enhanced .site-navigation__item--group:hover > .sub-menu,
	.site-navigation--enhanced .site-navigation__item--group:focus-within > .sub-menu,
	.site-navigation--enhanced .site-navigation__item--group.is-open > .sub-menu {
		display: block;
	}
	.site-navigation--enhanced .sub-menu a {
		display: block;
		padding: 0.5rem 1rem;
		white-space: nowrap;
	}
	.site-navigation--enhanced .sub-menu a:hover { background: var(--surface); }
	.site-navigation:not(.site-navigation--enhanced) .sub-menu { display: flex; gap: 1.25rem; }
}

.site-main__inner {
	padding-block: var(--space-5);
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Back-to-top: floating, bottom-right, only once there is a page to come back up.
   Replaces the footer link — a fixed control is reachable from mid-page, which is
   where a reader actually wants it. The corner is free because the citation
   confirmation now reads on its own button rather than in a toast. */
.back-to-top {
	position: fixed;
	right: 1.25rem;
	bottom: 1.25rem;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	/* Light chip, not a dark one: the footer is --ink, so an ink button vanishes
	   into it and leaves a floating arrow. */
	background: var(--base);
	color: var(--ink);
	border: 1px solid var(--ink);
	border-radius: 0;
	box-shadow: var(--shadow-float);
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(0.5rem);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.back-to-top.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.back-to-top:hover {
	background: var(--teal-dark);
	border-color: var(--teal-dark);
	color: var(--base);
}
@media (prefers-reduced-motion: reduce) {
	.back-to-top {
		transition: opacity 0.2s ease, visibility 0.2s;
		transform: none;
	}
}

/* The copy button swaps its own label on success; reserving the width keeps the
   surrounding action row from reflowing under the reader. */
[data-citation-copy] button {
	display: inline-block;
	min-width: 8.5rem;
	text-align: start;
}

.site-footer__identity { flex: 0 1 28rem; min-width: 0; }
/* The colophon stacks below 700px, where a 28rem basis would become a height. */
@media (max-width: 700px) {
	.site-footer__identity { flex: none; }
}
/* Footer actions share one cluster; editor reminders stay below the support link. */
.site-footer__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 1rem;
}
.site-footer__support {
	margin: 0;
	flex-direction: column;
	align-items: flex-start;
	max-width: 20rem;
}
.site-footer__support .pending-action__btn {
	min-height: 44px;
	height: 44px;
	padding: 0 1rem;
	background: transparent;
	border: 1px solid var(--base);
	color: var(--base);
	text-decoration: none;
}
.site-footer__support .pending-action__btn:hover {
	background: var(--base);
	color: var(--ink);
}
.site-footer__support .pending-action__btn:focus-visible {
	outline: 3px solid var(--amarillo);
	outline-offset: 3px;
}

/* Gallery lightbox filmstrip: core retains state, navigation and announcements. */
.wp-lightbox-overlay.has-gallery-filmstrip {
	height: 100dvh;
	color: var(--ink);
	/* Core's zoom geometry assumes the whole viewport, not the reserved strip. */
	animation: none !important;
}
.wp-lightbox-overlay.has-gallery-filmstrip .scrim {
	animation: none !important;
}
.wp-lightbox-overlay.has-gallery-filmstrip .lightbox-image-container {
	top: calc(64px + env(safe-area-inset-top));
	left: 64px;
	width: calc(100% - 128px);
	height: calc(100% - 216px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
	transform: none;
	animation: none !important;
}
.wp-lightbox-overlay.has-gallery-filmstrip .lightbox-image-container figure {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100% !important;
	height: 100% !important;
	margin: 0 !important;
}
.wp-lightbox-overlay.has-gallery-filmstrip .lightbox-image-container img {
	width: 100% !important;
	height: 100% !important;
	min-width: 0;
	min-height: 0;
	object-fit: contain !important;
	animation: none !important;
}
.wp-lightbox-overlay.has-gallery-filmstrip > button,
.wp-lightbox-overlay.has-gallery-filmstrip > button:is(:hover, :focus-visible) {
	background: var(--base) !important;
	color: var(--ink);
	fill: var(--ink) !important;
}
.wp-lightbox-overlay.has-gallery-filmstrip button:focus-visible {
	outline: 3px solid var(--ink);
	outline-offset: 3px;
}
.wp-lightbox-overlay .gallery-filmstrip {
	position: absolute;
	z-index: 4000000;
	inset-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right));
	bottom: calc(16px + env(safe-area-inset-bottom));
	display: flex;
	gap: 12px;
	align-items: center;
	width: max-content;
	max-width: calc(100% - 32px - env(safe-area-inset-left) - env(safe-area-inset-right));
	margin-inline: auto;
	padding: 8px;
	background: var(--surface);
	overflow-x: auto;
	overscroll-behavior-inline: contain;
	touch-action: pan-x;
	scroll-behavior: auto;
	cursor: default;
}
.wp-lightbox-overlay .gallery-filmstrip[hidden] { display: none; }
.wp-lightbox-overlay .gallery-filmstrip button {
	flex: 0 0 96px;
	width: 96px;
	height: 72px;
	padding: 0;
	border: 2px solid transparent;
	background: var(--surface);
	cursor: pointer;
}
.wp-lightbox-overlay .gallery-filmstrip button[aria-current="true"] {
	outline: 3px solid var(--ink);
	outline-offset: 2px;
}
.wp-lightbox-overlay .gallery-filmstrip button[aria-current="true"]:focus-visible {
	outline-color: var(--ink);
}
.wp-lightbox-overlay .gallery-filmstrip img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
@media (max-width: 959px) {
	.wp-lightbox-overlay.has-gallery-filmstrip .lightbox-image-container {
		left: 16px;
		width: calc(100% - 32px);
	}
	.wp-lightbox-overlay.has-gallery-filmstrip .wp-lightbox-navigation-button {
		bottom: calc(112px + env(safe-area-inset-bottom));
	}
}
@media (prefers-reduced-motion: reduce) {
	.wp-lightbox-overlay.has-gallery-filmstrip,
	.wp-lightbox-overlay.has-gallery-filmstrip * {
		animation: none !important;
		transition: none !important;
		scroll-behavior: auto !important;
	}
}

/* Brief L: duplicate media/CTA links defer keyboard and announcement to the title. */
.project-story__media { position: absolute; inset: 0; }
.project-card__title-link { color: inherit; text-decoration: none; }
.project-card__title-link:hover { text-decoration: underline; }
.project-card__title-link:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

/* The new record band is a screen treatment, not a print ink flood. */
@media print {
  .record-strip { background: var(--surface); color: var(--ink); }
  .record-fact--pending strong { color: var(--terracotta-dark); }
  .record-strip__asof { color: var(--muted); }
  .record-strip .record-fact .meta { color: var(--muted); }
}

/* Paper keeps the content and a compact logo, not navigation or ink floods. */
@media print {
  .skip-link,
  .site-header .site-navigation,
  .site-header .site-navigation__toggle,
  .back-to-top,
  .archive-filters,
  .pagination,
  .site-footer,
  .wp-block-buttons,
  .pending-action,
  .pub-intro__actions,
  .project-support,
  button[data-citation-target],
  .wp-lightbox-container button,
  .wp-lightbox-overlay {
    display: none !important;
  }

  .site-header {
    position: static;
    background: white;
    backdrop-filter: none;
  }
  .site-header__inner { min-height: 0; padding-block: 0.5rem; }
  .site-header .custom-logo,
  .site-header .site-branding__logo {
    width: auto;
    height: 28px;
    max-height: 28px;
    max-width: 160px;
  }

  /* All 19 var(--ink) grounds across base, components and templates.
     Important also wins over templates loaded after this stylesheet. */
  body,
  .skip-link,
  .btn,
  .btn--ghost:hover,
  .pending-action__btn,
  .record-strip,
  .media-frame--dark,
  .mesa-chapter,
  .site-footer,
  .thumb-cover--fallback,
  .thumb-cover--informe,
  .page-hero,
  .mesa-hero,
  .museo-hero,
  .strip-nav__btn:hover:not([disabled]),
  .museo-principles,
  .asidehu-filters button[type="submit"],
  .contacto-social__list a:hover,
  .search-form .search-submit,
  .organization-belt__name {
    background: white !important;
  }

  /* Explicit light descendant colors must not become white-on-white text. */
  body,
  body * { color: var(--ink) !important; }
}
