/* TechSostenible · hoja de estilos del sitio (TS-004), derivada del prototipo revisado TS-006 con H-01 cerrada.
   Sendero interpretativo con los colores del logo: placas verde hoja, ruta azul y señales amarillas sobre base blanca.
   Única hoja del sitio: los cambios de color, tipografía o componentes se hacen aquí una sola vez. */

/* Tipografía (TS-D13): Barlow Semi Condensed para rótulos y Barlow para lectura, SIL Open Font License 1.1
   (fuentes/OFL-barlow.txt). Se sirven desde el propio sitio, solo con el subconjunto latino (español incluido),
   para que se vean iguales en Windows, macOS, Android e iOS. Sustituyen a Bahnschrift y Segoe UI del prototipo. */
@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("fuentes/barlow-semi-condensed-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("fuentes/barlow-semi-condensed-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("fuentes/barlow-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("fuentes/barlow-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("fuentes/barlow-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  /* Muestras aproximadas del PNG (harness/evidence/TS-003/revision-color/muestreo.json). */
  --leaf: #64AB4F;
  --sky: #1E89B0;
  --sun: #FBC633;

  /* Derivados funcionales para texto, estados y tintes. */
  --ground: #FAFBF7;
  --surface: #FFFFFF;
  --ink: #1F2B30;
  --ink-muted: #4A585E;
  --on-ink: #FFFFFF;
  --on-ink-muted: #C9D3D7;
  --green: #3A7A2B;
  --green-hover: #2F6624;
  --blue: #13708F;
  --sun-hover: #FCD45F;
  --leaf-tint: #EEF6E9;
  --sky-tint: #E8F3F8;
  --sun-tint: #FFF5D6;
  --line: #DCE3DA;
  --line-strong: #A8B5AC;
  --plate: #FFFEFA;
  --focus: var(--blue);

  --font-sign: "Barlow Semi Condensed", "Bahnschrift", "DIN Alternate", system-ui, sans-serif;
  --font-text: "Barlow", "Segoe UI", system-ui, -apple-system, "Roboto", sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1200px;
  --header-h: 64px;
  --radius: 10px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
  scrollbar-color: var(--green) var(--leaf-tint);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-tap-highlight-color: rgba(100, 171, 79, 0.25);
  touch-action: manipulation;
  overflow-wrap: break-word;
}

::selection { background: var(--sun); color: var(--ink); }

img, svg { display: block; max-width: 100%; }

h1, h2, h3 {
  font-family: var(--font-sign);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 0;
}
/* Con el texto muy ampliado, una palabra del titular puede no caber en la columna: se corta en lugar de
   desbordar la página. Con el tamaño normal no se aplica. */
h1 { overflow-wrap: anywhere; }

p { margin: 0; text-wrap: pretty; }

a { color: var(--blue); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 12px 16px;
  background: var(--ink);
  color: var(--on-ink);
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
}
.skip-link:focus-visible { top: 12px; }

main:focus { outline: none; }

/* Mejoras que solo existen con JavaScript y su alternativa. `hidden` prevalece sobre display de componentes. */
[hidden] { display: none !important; }
.js .no-js-only { display: none; }

/* Aviso de la versión de revisión (solo en el modo «revision» del generador) */
.review-notice {
  padding: 6px var(--gutter);
  background: var(--sun-tint);
  color: var(--ink-muted);
  font-size: 0.875rem;
  text-align: center;
  line-height: 1.4;
}

/* Encabezado */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
}

/* Franja de color del cartel: verde hoja, azul y amarillo del logo, en tramos. */
.site-header::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--leaf) 0 50%, var(--sky) 50% 80%, var(--sun) 80% 100%);
}

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: calc(var(--max) + 2 * var(--gutter));
  min-height: var(--header-h);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  font-family: var(--font-sign);
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.15;
  text-decoration: none;
}


.menu-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--ink-muted);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: 600 1rem/1 var(--font-text);
  cursor: pointer;
}
.menu-toggle:hover { border-color: var(--ink); background: var(--leaf-tint); }

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.975rem;
  text-decoration: none;
  border-radius: 6px;
}
.site-nav a:hover { background: var(--leaf-tint); }

/* Página actual: barra inferior y peso, además del color. */
.site-nav a[aria-current="page"] { color: var(--green); }
.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 3px;
  height: 4px;
  border-radius: 2px;
  background: var(--green);
}

.site-nav a.site-nav__contact {
  margin-left: 8px;
  padding-inline: 16px;
  background: var(--sun);
  color: var(--ink);
}
.site-nav a.site-nav__contact:hover { background: var(--sun-hover); }
.site-nav a.site-nav__contact[aria-current="page"]::after { background: var(--ink); }

/* Placa: superficie verde hoja con texto tinta */
.plate-wrap {
  padding: clamp(16px, 3vw, 32px) var(--gutter) 0;
}

.plate {
  --focus: var(--ink);
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(24px, 3.5vw, 48px);
  background: var(--leaf);
  color: var(--ink);
  border-radius: var(--radius);
}

.plate h1 {
  font-size: clamp(2.25rem, 1.2rem + 3.2vw, 4rem);
  line-height: 1.02;
  max-width: 16ch;
}

.plate__lead {
  margin-top: 20px;
  max-width: 52ch;
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.55;
}

.plate--compact h1 { font-size: clamp(2rem, 1.2rem + 2.4vw, 3.25rem); max-width: 22ch; }
.plate--compact .plate__lead { margin-top: 12px; }

.plate__note {
  margin-top: 12px;
  max-width: 60ch;
  font-size: 1rem;
}

/* Apertura de Inicio */
.trailhead {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 4vw, 64px);
}

.trailhead__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.trailhead h1 { margin-top: clamp(20px, 2.5vw, 32px); max-width: 14ch; }

.logo-plate {
  width: clamp(136px, 13vw, 184px);
  padding: 8px;
  background: var(--plate);
  border-radius: 8px;
}

/* Derivado web del logo, ya recortado sin el margen vacío (sitio/src/marca/derivados.json). */
.logo-plate img { width: 100%; height: auto; aspect-ratio: 480 / 366; }

/* Hojas del poste indicador */
.fingerpost {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 16px;
  margin-top: clamp(24px, 3vw, 36px);
}

.blade {
  --blade-bg: var(--sun);
  --blade-fg: var(--ink);
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  max-width: 100%;
  padding: 12px 44px 12px 20px;
  border: 0;
  background: none;
  color: var(--blade-fg);
  font: 700 1.125rem/1.25 var(--font-sign);
  letter-spacing: 0.005em;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.blade::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--blade-bg);
  border-radius: 6px 0 0 6px;
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 50%, calc(100% - 22px) 100%, 0 100%);
  transition: background-color 160ms var(--ease-out);
}

.blade .icon { transition: transform 200ms var(--ease-out); }
.blade:hover .icon { transform: translateX(3px); }
.blade:hover { text-decoration: none; }
.blade:focus-visible { border-radius: 6px; }

.blade--primary:hover { --blade-bg: var(--sun-hover); }

/* Secundaria sobre placa: hoja blanca. Sobre fondo claro: hoja verde con texto blanco. */
.blade--light { --blade-bg: var(--surface); font-size: 1.0625rem; }
.blade--light:hover { --blade-bg: var(--leaf-tint); }

.blade--green { --blade-bg: var(--green); --blade-fg: var(--on-ink); font-size: 1.0625rem; }
.blade--green:hover { --blade-bg: var(--green-hover); }

/* Mapa esquemático: tablero blanco con la ruta azul */
.trail-map {
  /* Contenedor de consulta: el recorrido pasa a vertical según el ancho del mapa medido en su propio
     tamaño de letra (TS004-H01), además del corte por ancho de ventana. */
  container: trail-map / inline-size;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  margin: 0;
}

.trail-map__field {
  position: relative;
  flex: 1;
  min-height: 440px;
  background: var(--surface);
  border-radius: 8px;
}

.trail-map__route {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.trail-map__route path {
  fill: none;
  stroke: var(--sky);
  stroke-width: 5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

@media (prefers-reduced-motion: no-preference) {
  .trail-map__route {
    animation: draw-route 1400ms var(--ease-out) 150ms backwards; /* sin estado final retenido: la ruta queda sin recorte */
  }
  @keyframes draw-route {
    from { clip-path: inset(100% 0 0 0); }
    to { clip-path: inset(0 0 0 0); }
  }
}

.trail-map__stops {
  margin: 0;
  padding: 0;
  list-style: none;
}

.stop {
  position: absolute;
  left: calc(var(--x) * 1% - 24px);
  top: calc(var(--y) * 1% - 24px);
  right: 12px;
}
/* Posición de cada parada sobre la ruta (porcentajes del tablero), en el orden del recorrido. En el prototipo
   eran atributos style; aquí viven en la hoja para que la política de seguridad no admita estilos en línea. */
.trail-map__stops > :nth-child(1) { --x: 8; --y: 93; }
.trail-map__stops > :nth-child(2) { --x: 14; --y: 73; }
.trail-map__stops > :nth-child(3) { --x: 52; --y: 57; }
.trail-map__stops > :nth-child(4) { --x: 14; --y: 39; }
.trail-map__stops > :nth-child(5) { --x: 52; --y: 23; }
.trail-map__stops > :nth-child(6) { --x: 14; --y: 7; }

.stop__link,
.stop--origin {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}
.stop__link { width: fit-content; max-width: 100%; border-radius: 28px 8px 8px 28px; }
.trail-map { --focus: var(--blue); }

.stop__mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 50%;
  background: var(--sun);
  color: var(--ink);
  box-shadow: 0 0 0 4px var(--surface);
  transition: transform 200ms var(--ease-out), background-color 160ms var(--ease-out);
}

.stop--origin .stop__mark,
.stop--meeting .stop__mark { background: var(--ink); color: var(--on-ink); }

.stop__label {
  font-family: var(--font-sign);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.2;
  min-width: 0;
}
.stop__label strong {
  display: block;
  font-weight: 700;
  color: var(--green);
  font-size: 0.875rem;
  letter-spacing: 0.02em;
}

.stop__link:hover .stop__label { text-decoration: underline; text-underline-offset: 0.2em; }
.stop__link:hover .stop__mark { transform: scale(1.08); background: var(--sun-hover); }
.stop--meeting .stop__link:hover .stop__mark { background: var(--green); }

.trail-map figcaption {
  font-size: 0.875rem;
  line-height: 1.45;
}

/* Secciones */
.section {
  padding: clamp(56px, 8vw, 104px) var(--gutter) 0;
}

.section--tight { padding-top: clamp(24px, 3vw, 40px); }

.section__inner {
  max-width: var(--max);
  margin: 0 auto;
}

.section h2 {
  font-size: clamp(1.875rem, 1.4rem + 1.8vw, 2.75rem);
}

.section__intro {
  margin-top: 16px;
  max-width: 60ch;
  color: var(--ink-muted);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 12px;
  color: var(--green);
  font-family: var(--font-sign);
  font-weight: 700;
  font-size: 1.0625rem;
  text-decoration: underline;
  text-decoration-thickness: 1px;
}
.text-link .icon { width: 20px; height: 20px; transition: transform 200ms var(--ease-out); }
.text-link:hover { color: var(--green-hover); text-decoration-thickness: 2px; }
.text-link:hover .icon { transform: translateX(3px); }

/* Inicio: resumen de líneas como tramo de sendero horizontal */
.trail-row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px clamp(20px, 3vw, 40px);
  margin: clamp(32px, 4vw, 48px) 0 0;
  padding: 0;
  list-style: none;
}

.trail-row::before {
  content: "";
  position: absolute;
  left: 34px;
  right: 0;
  top: 31.5px;
  height: 5px;
  border-radius: 3px;
  background: var(--sky);
}

.trail-row a {
  position: relative;
  display: block;
  color: var(--ink);
  text-decoration: none;
  border-radius: 8px;
}

.trail-row__name {
  display: block;
  margin-top: 16px;
  font-family: var(--font-sign);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.15;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.22em;
}
.trail-row a:hover .trail-row__name { text-decoration-color: var(--green); }
.trail-row__text { display: block; margin-top: 8px; color: var(--ink-muted); font-size: 1rem; line-height: 1.5; }
.trail-row a:hover .disc { transform: scale(1.06); }

.disc {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--sun);
  color: var(--ink);
  box-shadow: 0 0 0 6px var(--ground);
  transition: transform 200ms var(--ease-out);
}
.disc .icon { width: 32px; height: 32px; stroke-width: 1.75; }

/* Inicio: dos tableros de texto */
.signposts {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 40px clamp(32px, 6vw, 96px);
  padding-top: clamp(32px, 4vw, 48px);
  border-top: 2px solid var(--ink);
}
.signposts p { margin-top: 16px; max-width: 52ch; }
.signposts .lead { font-size: clamp(1.125rem, 1.05rem + 0.4vw, 1.3125rem); line-height: 1.5; color: var(--ink); }

/* Banda de cierre hacia Contacto */
.closing {
  padding: clamp(56px, 8vw, 104px) var(--gutter) 0;
}
.closing__band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 48px;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 48px);
  background: var(--sky-tint);
  border-radius: var(--radius);
}
.closing__band h2 { font-size: clamp(1.625rem, 1.3rem + 1.4vw, 2.25rem); max-width: 22ch; }
.closing__band p { margin-top: 8px; max-width: 52ch; color: var(--ink-muted); }

/* Fundación */
.foundation__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px clamp(32px, 6vw, 96px);
}
.foundation__grid h2 { font-size: clamp(1.625rem, 1.3rem + 1.4vw, 2.25rem); color: var(--green); }
.foundation__grid p { margin-top: 12px; max-width: 62ch; }

.values {
  margin-top: clamp(48px, 6vw, 72px);
  padding-top: 32px;
  border-top: 2px solid var(--ink);
}
.values h2 { font-size: clamp(1.625rem, 1.3rem + 1.4vw, 2.25rem); }

.values__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 40px;
  margin: 24px 0 0;
}
.values__list div { padding-top: 14px; border-top: 4px solid var(--leaf); }
.values__list dt {
  font-family: var(--font-sign);
  font-weight: 700;
  font-size: 1.125rem;
}
.values__list dd {
  margin: 4px 0 0;
  color: var(--ink-muted);
  font-size: 1rem;
  line-height: 1.5;
}

.note {
  margin-top: clamp(40px, 5vw, 56px);
  max-width: 62ch;
  color: var(--ink-muted);
  font-size: 1rem;
}

/* Enlace cruzado hacia Investigación (Inicio y Fundación): fila bajo un filete fino, sin tarjeta. */
.crosslink {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  align-items: end;
  gap: 8px clamp(32px, 6vw, 96px);
  margin-top: clamp(8px, 1vw, 16px);
  padding-top: 24px;
  border-top: 1px solid var(--line-strong);
}
.crosslink h2 { grid-column: 1; font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.625rem); }
.crosslink p { grid-column: 1; margin-top: 0; max-width: 52ch; color: var(--ink-muted); }
.crosslink .text-link { grid-column: 2; grid-row: 1 / span 2; justify-self: start; }
.foundation__grid + .values + .section__inner .crosslink,
.values + .section__inner .crosslink { margin-top: clamp(40px, 5vw, 56px); }

.collab__intro .collab__research { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line-strong); }

.next__text { margin-top: 12px; max-width: 56ch; color: var(--ink-muted); }

/* Investigación: lectura. El grupo y su objetivo en dos columnas, como Misión y Visión. */
.research__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px clamp(32px, 6vw, 96px);
}
.research__grid h2 { font-size: clamp(1.625rem, 1.3rem + 1.4vw, 2.25rem); color: var(--green); }
.research__grid p { margin-top: 12px; max-width: 62ch; }
.research__grid--rule { padding-top: 32px; border-top: 2px solid var(--ink); }
.research__grid--rule h2 { color: var(--ink); }
.research__lead { font-size: clamp(1.125rem, 1.05rem + 0.4vw, 1.3125rem); line-height: 1.5; }
.research__muted { color: var(--ink-muted); font-size: 1rem; }
.research__subhead { margin-top: clamp(32px, 4vw, 44px); }

.research__id { margin: 16px 0 0; }
.research__id div { padding: 10px 0; border-top: 1px solid var(--line); }
.research__id div:last-child { border-bottom: 1px solid var(--line); }
.research__id dt { color: var(--ink-muted); font-size: 0.9375rem; }
.research__id dd { margin: 2px 0 0; font-family: var(--font-sign); font-weight: 600; font-size: 1.125rem; line-height: 1.3; }

/* IOTERRA (TS-008): identidad y equipo según GrupLAC, con la fuente al pie de ambas columnas. */
.research__name { margin-top: 12px; font-family: var(--font-sign); font-weight: 600; font-size: 1.1875rem; line-height: 1.3; }
.research__sigla { display: block; font-size: clamp(1.5rem, 1.25rem + 0.9vw, 1.875rem); font-weight: 700; letter-spacing: 0.02em; }
.research__source {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.research__source p { margin: 0; color: var(--ink-muted); font-size: 0.9375rem; }
.plate .fingerpost { margin-top: 20px; }

.team { margin: 16px 0 0; padding: 0; list-style: none; }
.team li { padding: 12px 0; border-top: 1px solid var(--line); }
.team li:last-child { border-bottom: 1px solid var(--line); }
.team__name { display: block; font-family: var(--font-sign); font-weight: 600; font-size: 1.125rem; line-height: 1.3; }
.team__meta { display: block; margin-top: 2px; color: var(--ink-muted); font-size: 0.9375rem; }
.team__lead { color: var(--green); font-weight: 600; }
.team__academic { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-top: 6px; font-size: 0.9375rem; }
.team__degree {
  padding: 1px 8px;
  border-radius: 4px;
  background: var(--leaf-tint);
  font-family: var(--font-sign);
  font-weight: 700;
}
.team__profile { display: inline-block; padding: 4px 0; }

/* Texto solo para lectores de pantalla (por ejemplo, de quién es cada perfil académico). */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Publicaciones registradas: referencias bibliográficas en una columna de lectura, con el DOI enlazado. */
.pubs { margin: 24px 0 0; padding: 0; list-style: none; max-width: 80ch; }
.pub { padding: 18px 0; border-top: 1px solid var(--line); }
.pub:last-child { border-bottom: 1px solid var(--line); }
.pub p { margin: 0; }
.pub__title { font-family: var(--font-sign); font-weight: 600; font-size: 1.125rem; line-height: 1.3; }
.pub__authors { margin-top: 6px !important; font-size: 1rem; }
.pub__source { margin-top: 2px !important; color: var(--ink-muted); font-size: 0.9375rem; }
.pub__doi { margin-top: 4px !important; font-size: 0.9375rem; color: var(--ink-muted); overflow-wrap: anywhere; }

/* Diez líneas de investigación: índice numerado en dos columnas, distinto del sendero de cuatro estaciones. */
.research__lines { padding-top: 32px; border-top: 2px solid var(--ink); }
.research__lines h2 { font-size: clamp(1.625rem, 1.3rem + 1.4vw, 2.25rem); }
.research-lines {
  counter-reset: linea;
  columns: 2;
  column-gap: clamp(32px, 6vw, 96px);
  margin: 24px 0 28px;
  padding: 0;
  list-style: none;
}
.research-lines li {
  counter-increment: linea;
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  break-inside: avoid;
  font-family: var(--font-sign);
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.3;
}
.research-lines li::before {
  content: counter(linea);
  color: var(--green);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.research__objectives { margin: 16px 0 0; padding: 0; list-style: none; }
.research__objectives li {
  position: relative;
  padding: 10px 0 10px 28px;
  border-top: 1px solid var(--line);
  max-width: 62ch;
}
.research__objectives li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 19px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--sky);
}

.ods { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.ods li {
  display: inline-flex;
  align-items: center;
  max-width: 100%; /* con texto muy ampliado, el nombre largo del ODS pasa a otra línea en lugar de desbordar */
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  font-size: 0.9375rem;
  line-height: 1.3;
}
.ods__num {
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--leaf-tint);
  font-family: var(--font-sign);
  font-weight: 700;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Siguiente parada al final de cada página interior */
.next {
  padding: clamp(56px, 8vw, 104px) var(--gutter) 0;
}
.next__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding-top: 32px;
  border-top: 2px solid var(--ink);
}
.next h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.next .fingerpost { margin-top: 20px; }

/* Líneas: índice local dentro de la placa */
.local-index {
  margin-top: clamp(24px, 3vw, 36px);
  padding: 20px clamp(16px, 2.5vw, 28px);
  background: var(--surface);
  border-radius: 8px;
}
.local-index__title {
  font-family: var(--font-sign);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--green);
}
.local-index ol {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 20px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.local-index ol::before {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  top: 21.5px;
  height: 5px;
  border-radius: 3px;
  background: var(--sky);
}
.local-index a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 48px;
  color: var(--ink);
  font-family: var(--font-sign);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  border-radius: 6px;
}
.local-index a span:last-child { min-width: 0; }
.local-index a:hover span:last-child { text-decoration: underline; text-underline-offset: 0.2em; }
.local-index .stop__mark { width: 48px; height: 48px; box-shadow: 0 0 0 4px var(--surface); }
.plate .local-index { --focus: var(--blue); }

/* Líneas: estaciones */
.trail {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

.trail::before {
  content: "";
  position: absolute;
  left: 34px;
  top: 36px;
  bottom: 0;
  width: 5px;
  margin-left: -2.5px;
  border-radius: 3px;
  background: var(--sky);
}

.station {
  position: relative;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: clamp(16px, 3vw, 40px);
  padding-bottom: clamp(40px, 5vw, 64px);
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.station .disc { position: relative; }

.station__body {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 20px clamp(24px, 4vw, 64px);
  padding: 14px 0 clamp(40px, 5vw, 56px);
  border-bottom: 1px solid var(--line-strong);
}
.station:last-child .station__body { border-bottom: 0; padding-bottom: 0; }

.station h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2.125rem); }
.station__main p { margin-top: 12px; max-width: 48ch; font-size: 1.125rem; }

.station__topics-title {
  font-family: var(--font-sign);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--green);
}
.station__topics ul {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.station__topics li {
  padding: 8px 0;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 1rem;
  line-height: 1.4;
}

/* Colabora: directorio */
.collab__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 40px clamp(32px, 6vw, 96px);
  align-items: start;
}
.collab__intro p { margin-top: 16px; max-width: 46ch; }
.collab__intro p:first-of-type { margin-top: 0; }
.collab__intro .collab__muted { color: var(--ink-muted); font-size: 1rem; }

.directory {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
}

/* Franja de cabecera del directorio, como en un cartel. */
.directory .directory__title {
  padding: 14px 24px;
  background: var(--leaf);
  font-family: var(--font-sign);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--ink);
}

.directory__rows {
  margin: 0;
  padding: 0;
  list-style: none;
}

.directory__rows li:first-child a { border-top: 0; }

.directory__rows a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 24px;
  gap: 8px 24px;
  align-items: center;
  padding: 18px 24px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  transition: background-color 160ms var(--ease-out);
}
.directory__rows a:hover { background: var(--leaf-tint); }
.directory__rows a:hover .directory__what { text-decoration: underline; text-underline-offset: 0.2em; }
.directory__rows a:hover .icon { transform: translateX(3px); }
.directory__rows a:focus-visible { outline-offset: -3px; border-radius: 0; }
.directory__rows .icon { color: var(--green); transition: transform 200ms var(--ease-out); }

.directory__who {
  font-family: var(--font-sign);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.3;
}
.directory__what { color: var(--blue); font-weight: 600; line-height: 1.4; }

/* Contacto: punto de encuentro */
.meeting {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 40px clamp(32px, 6vw, 96px);
  align-items: start;
}

.meeting__board {
  padding: clamp(24px, 4vw, 48px);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  min-width: 0;
}

.field-label {
  display: block;
  font-family: var(--font-sign);
  font-weight: 600;
  font-size: 1rem;
  color: var(--green);
}

.topic-select {
  display: block;
  width: 100%;
  max-width: 34rem;
  min-height: 48px;
  margin-top: 8px;
  padding: 10px 44px 10px 14px;
  border: 1px solid var(--ink-muted);
  border-radius: 8px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%231F2B30' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
  color: var(--ink);
  font: 400 1.0625rem/1.3 var(--font-text);
  appearance: none;
  cursor: pointer;
}
.topic-select:hover { border-color: var(--ink); }

.topic-field { margin-bottom: 28px; }

.meeting__email-label {
  margin-top: 0;
  color: var(--ink-muted);
  font-size: 0.9375rem;
}

.meeting__email {
  margin-top: 4px;
  font-family: var(--font-sign);
  font-weight: 600;
  font-size: clamp(1.125rem, 0.6rem + 2.2vw, 2rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
  user-select: all;
}

.meeting__subject {
  margin-top: 12px;
  color: var(--ink-muted);
  font-size: 1rem;
}
.meeting__subject strong { color: var(--ink); font-weight: 600; }

.meeting__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.meeting__status {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 1.6em;
  margin-top: 16px;
  font-weight: 600;
}
.meeting__status:empty { visibility: hidden; }
.meeting__status .icon { margin-top: 1px; }
.meeting__status[data-state="ok"] { color: var(--green); }
.meeting__status[data-state="error"] { padding: 10px 12px; background: var(--sun-tint); border-radius: 6px; color: var(--ink); }

.meeting__hint,
.meeting__pending {
  margin-top: 12px;
  color: var(--ink-muted);
  font-size: 0.9375rem;
  line-height: 1.5;
  max-width: 56ch;
}
.meeting__pending {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.meeting__aside h2 { font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.625rem); }
.meeting__aside ul { margin: 12px 0 0; padding: 0; list-style: none; }
.meeting__aside li {
  position: relative;
  padding: 10px 0 10px 28px;
  border-top: 1px solid var(--line);
}
.meeting__aside li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 19px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--sky);
}
.meeting__place { margin-top: 28px; }
.meeting__place .meeting__email-label { margin-top: 0; }
.meeting__place p:last-child { font-family: var(--font-sign); font-weight: 600; font-size: 1.125rem; }

/* Pie */
.site-footer {
  --focus: var(--sun);
  margin-top: clamp(64px, 9vw, 120px);
  padding: 40px var(--gutter) 40px;
  background: var(--ink);
  color: var(--on-ink-muted);
}
.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px 48px;
  max-width: var(--max);
  margin: 0 auto;
  font-size: 0.975rem;
}
.site-footer__name { font-family: var(--font-sign); font-weight: 700; font-size: 1.125rem; color: var(--on-ink); }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 0; padding: 0; list-style: none; }
.site-footer__links a { display: inline-block; padding: 10px 0; color: var(--on-ink); }
.site-footer__review { grid-column: 1 / -1; padding-top: 16px; border-top: 1px solid rgba(201, 211, 215, 0.3); font-size: 0.875rem; }

/* Cortes de diseño en em (TS004-H01): con la letra predeterminada de 16 px equivalen a 1080, 960, 760, 480 y 400 px,
   los mismos del prototipo; el menú compacto pasa de 880 a 960 px con la sexta página (TS-007) y a 1024 px con el
   nombre institucional más largo (TS-005). Si la persona amplía la letra del navegador, la disposición más estrecha llega
   antes y los textos conservan su espacio en lugar de superponerse o desbordar. */
/* Escritorio estrecho y tableta */
@media (max-width: 67.5em) {
  .trailhead { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .values__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trail-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trail-row::before { display: none; }
  .local-index ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .local-index ol::before { display: none; }
  .local-index a { flex-direction: row; align-items: center; gap: 12px; }
}

/* Navegación compacta: solo con JavaScript. Sin él, el menú queda visible y se ajusta en varias líneas.
   64 em equivale a 1024 px con la letra predeterminada de 16 px; si la persona amplía la letra del navegador, el menú
   compacto se activa antes en lugar de desbordar la ventana (TS004-H01). Historial del corte: 880 px con cinco páginas;
   960 px con seis (TS-007, el menú necesitaba ~900 px); 1024 px con el nombre «Fundación Social TechSostenible»
   (TS-005), que eleva la necesidad a ~951 px y deja ~67 px de margen. */
@media (max-width: 64em) {
  .site-header__inner { flex-wrap: wrap; }
  .site-nav ul { flex-wrap: wrap; }

  /* El menú desplegable es absoluto; si el nombre y el botón no caben (texto muy ampliado), el botón baja de línea. */
  .js .site-header__inner { flex-wrap: wrap; }
  .js .menu-toggle { display: inline-flex; }
  .js .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 8px var(--gutter) 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--line-strong);
    box-shadow: 0 12px 24px -12px rgba(31, 43, 48, 0.25);
  }
  .js .site-nav.is-open { display: block; }
  .js .site-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .js .site-nav a { display: flex; min-height: 48px; font-size: 1.0625rem; padding-left: 16px; }
  .js .site-nav a.site-nav__contact { margin: 8px 0 0; }
  .js .site-nav a[aria-current="page"]::after { left: 0; right: auto; top: 10px; bottom: 10px; width: 4px; height: auto; }
  .js .site-nav a.site-nav__contact[aria-current="page"]::after { left: 6px; }
}

/* Mapa en recorrido vertical. En zigzag, a menos de 888 px las estaciones de la columna derecha no dejan
   ancho para «Emprendimiento» (H-01 de la revisión de Codex); se adelanta el recorrido vertical a 960 px (60 em). */
@media (max-width: 60em) {
  .trail-map__field {
    flex: none;
    min-height: 0;
    padding: 20px 16px;
  }
  .trail-map__route { display: none; }
  .trail-map__stops {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .trail-map__stops::before {
    content: "";
    position: absolute;
    left: 24px;
    top: 24px;
    bottom: 24px;
    width: 5px;
    margin-left: -2.5px;
    border-radius: 3px;
    background: var(--sky);
  }
  .stop { position: relative; left: auto; top: auto; right: auto; }
}

/* Mismo recorrido vertical cuando el mapa mide menos de 22,5 rem: con letra de 16 px son 360 px, por debajo del
   mapa más estrecho del zigzag (365 px a 1081 px de ventana), así que el comportamiento normal no cambia. Si la
   persona amplía el texto (preferencia del navegador o tamaño raíz), los rótulos crecen y el umbral con ellos:
   a 32 px el zigzag necesitaría 720 px y el mapa pasa a vertical en vez de superponer estaciones (TS004-H01).
   En rem y no en em: en una consulta de contenedor, em usa la letra del propio mapa (17 px), no la raíz.
   Mantener este bloque idéntico al anterior. */
@container trail-map (max-width: 22.5rem) {
  .trail-map__field {
    flex: none;
    min-height: 0;
    padding: 20px 16px;
  }
  .trail-map__route { display: none; }
  .trail-map__stops {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .trail-map__stops::before {
    content: "";
    position: absolute;
    left: 24px;
    top: 24px;
    bottom: 24px;
    width: 5px;
    margin-left: -2.5px;
    border-radius: 3px;
    background: var(--sky);
  }
  .stop { position: relative; left: auto; top: auto; right: auto; }
}

/* Móvil: una columna */
@media (max-width: 47.5em) {
  .trailhead,
  .signposts,
  .foundation__grid,
  .research__grid,
  .crosslink,
  .collab__grid,
  .meeting,
  .site-footer__inner { grid-template-columns: minmax(0, 1fr); }

  .plate-wrap { padding-inline: 12px; }
  .logo-plate { width: 128px; padding: 6px; }
  .fingerpost { flex-direction: column; }
  .blade { padding-right: 40px; font-size: 1.0625rem; }
  .trailhead { gap: 32px; }

  .trail-row { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .trail-row a { display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 0 16px; }
  .trail-row .disc { grid-row: span 2; }
  .trail-row__name { margin-top: 6px; }

  .station__body { grid-template-columns: minmax(0, 1fr); }
  .values__list { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .research-lines { columns: 1; }
  .crosslink .text-link { grid-column: 1; grid-row: auto; }

  .local-index ol { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .local-index a { flex-direction: row; align-items: center; gap: 12px; }

  .directory__rows a { grid-template-columns: minmax(0, 1fr) 24px; padding: 16px 20px; }
  .directory__who { grid-column: 1 / -1; }
  .directory__title { padding: 14px 20px; }

  .meeting__actions { flex-direction: column; align-items: stretch; }
  .meeting__actions .blade { justify-content: space-between; }
  .closing { padding-inline: 12px; }
}

@media (max-width: 30em) {
  .station { grid-template-columns: 52px minmax(0, 1fr); }
  .station .disc { width: 52px; height: 52px; box-shadow: 0 0 0 5px var(--ground); }
  .station .disc .icon { width: 26px; height: 26px; }
  .trail::before { left: 26px; top: 28px; }
  .fingerpost { align-self: stretch; }
  .fingerpost .blade { width: 100%; justify-content: space-between; }
  .closing__band .blade { width: 100%; justify-content: space-between; }
}

@media (max-width: 25em) {
  .site-header__inner { gap: 12px; }
  .brand { font-size: 1rem; gap: 8px; }
  .menu-toggle { padding-inline: 12px; }
}

@media (pointer: fine) {
  html { overscroll-behavior: none; }
}

@media (forced-colors: active) {
  .blade { border: 2px solid ButtonText; }
  .blade::before { display: none; }
  .stop__mark, .disc { border: 2px solid CanvasText; }
  .site-nav a[aria-current="page"]::after { background: CanvasText; }
}
