/* =========================================================================
   PACTO-MI Digital — sistema de diseño
   Paleta institucional: rojo oscuro, dorado, crema y tinta.
   Todo el color vive en tokens; el modo oscuro solo los redefine.
   ========================================================================= */

:root {
  color-scheme: light;

  /* Marca */
  --red: #7a171b;
  --red-bright: #a2262c;
  --red-deep: #540e12;
  --gold: #b8862b;
  --gold-bright: #f0c86b;

  /* Colores de marca en su versión legible como texto.
     Los tokens --red y --gold se reservan para rellenos y bordes: aplicados a
     texto pequeño no alcanzan el contraste 4.5:1 que exige WCAG 2.2 AA. */
  --accent-text: #85590f;
  --link: #7a171b;

  /* Superficies */
  --paper: #fbf7f1;
  --surface: #ffffff;
  --surface-2: #f4ece1;
  --surface-inset: #fdfaf6;
  --line: #e2d6c6;
  --line-strong: #cdbca6;

  /* Texto */
  --ink: #1d1613;
  --ink-2: #4a3f38;
  --ink-3: #6d5f55;
  --on-dark: #fdf8f2;
  --on-dark-2: #e3d3c2;

  /* Semántica */
  --ok: #1f6b4f;
  --ok-bg: #e4f1ea;
  --warn: #8a5209;
  --warn-bg: #fbeedb;
  --idle: #5b5049;
  --idle-bg: #eee6da;

  /* Forma */
  --radius: 10px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgb(45 26 18 / 8%), 0 2px 8px rgb(45 26 18 / 6%);
  --shadow: 0 12px 32px rgb(45 26 18 / 10%), 0 2px 8px rgb(45 26 18 / 6%);
  --shell: 1180px;

  /* Tipografía */
  /* Solo fuentes del sistema: el sitio no descarga tipografías de terceros,
     de modo que no hay ninguna petición a otro dominio. */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --red: #c4383e;
    --red-bright: #e0565c;
    --red-deep: #7a171b;
    --gold: #e0b25c;
    --gold-bright: #f5d693;
    --accent-text: #e0b25c;
    --link: #e8686d;

    --paper: #16100e;
    --surface: #221917;
    --surface-2: #2b201d;
    --surface-inset: #1c1512;
    --line: #3a2c27;
    --line-strong: #4e3c35;

    --ink: #f6ede4;
    --ink-2: #d3c3b6;
    --ink-3: #a89689;
    --on-dark: #f6ede4;
    --on-dark-2: #cbb8a8;

    --ok: #6bc79c;
    --ok-bg: #17342a;
    --warn: #e3ac5d;
    --warn-bg: #38270f;
    --idle: #b3a396;
    --idle-bg: #2e2521;

    --shadow-sm: 0 1px 2px rgb(0 0 0 / 40%);
    --shadow: 0 12px 32px rgb(0 0 0 / 45%);
  }
}

/* ---------------------------------------------------- reinicio y base --- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0;
}

h1 { font-size: clamp(2.1rem, 1.3rem + 3.4vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 1.15rem + 1.9vw, 2.6rem); font-weight: 800; }
h3 { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem); font-weight: 700; }

p { margin: 0 0 1rem; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--link); text-underline-offset: 0.2em; text-decoration-thickness: 1.5px; }
a:hover { color: var(--red-bright); }

img, svg { max-width: 100%; }
ul, ol { margin: 0; padding: 0; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--gold-bright); color: var(--red-deep); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  background: var(--red);
  color: #fff;
  padding: 12px 18px;
  border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 700;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0; color: #fff; }

.shell {
  width: min(var(--shell), 100% - 2.5rem);
  margin-inline: auto;
}
.shell.narrow { width: min(760px, 100% - 2.5rem); }

/* ------------------------------------------------------------ botones --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 0.55rem 1.1rem; font-size: 0.9rem; }

.btn-primary {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.btn-primary:hover { background: var(--red-bright); border-color: var(--red-bright); color: #fff; }

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--red); color: var(--link); background: var(--surface); }

/* ----------------------------------------------------------- cabecera --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.site-header[data-elevated="true"] {
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--red);
  margin-right: auto;
}
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-text { display: grid; line-height: 1.05; }
.brand-text strong {
  font-size: 1.12rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand-text small {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.nav { display: flex; align-items: center; gap: 1rem; }
.nav ul { display: flex; align-items: center; gap: 0.15rem; list-style: none; }
.nav a {
  display: block;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius);
  color: var(--ink-2);
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"],
.nav a[aria-current="true"] {
  color: var(--link);
  background: color-mix(in srgb, var(--red) 9%, transparent);
}
/* Gana a `.nav a`, que si no impone su propio color sobre el botón. */
.nav a.nav-cta { padding: 0.6rem 1.1rem; font-size: 0.9rem; color: #fff; }
.nav a.nav-cta:hover { background: var(--red-bright); color: #fff; }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
}
.nav-toggle-bars { display: grid; gap: 5px; }
.nav-toggle-bars i {
  display: block;
  width: 20px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1040px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute;
    inset: 74px 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 1rem 1.25rem 1.5rem;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
  }
  .nav[data-open="true"] { display: flex; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0.1rem; }
  .nav a { padding: 0.75rem 0.85rem; font-size: 1rem; }
  .nav-cta { margin-top: 0.5rem; }
}

/* --------------------------------------------------------------- hero --- */

.hero { padding: clamp(3rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5rem); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero h1 { margin-bottom: 1.25rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.75rem 0 1.5rem; }

.eyebrow {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--link);
}

.lead {
  font-size: clamp(1.05rem, 1rem + 0.35vw, 1.25rem);
  color: var(--ink-2);
  line-height: 1.6;
}

.hero-credential {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--ink-3);
}

.hero-panel {
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.panel-title {
  margin-bottom: 1.25rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.cycle { list-style: none; display: grid; gap: 0.9rem; }
.cycle li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.85rem;
  align-items: baseline;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}
.cycle li:last-child { border-bottom: 0; padding-bottom: 0; }
.cycle-n {
  grid-row: span 2;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-text);
}
.cycle li strong { font-size: 1rem; font-weight: 700; }
.cycle-detail { font-size: 0.88rem; color: var(--ink-3); line-height: 1.5; }

/* ------------------------------------------------- hero de página int. --- */

.page-hero {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem);
  background: linear-gradient(160deg, var(--surface-2), var(--paper) 70%);
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { margin-bottom: 1rem; max-width: 20ch; }
.page-hero .lead { max-width: 62ch; }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 1.75rem;
  list-style: none;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-3);
}
.hero-meta li { display: flex; align-items: center; gap: 0.5rem; }
.hero-meta li::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

/* ---------------------------------------------------------- secciones --- */

.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.band {
  padding: clamp(3rem, 6vw, 5rem) 0;
  background: var(--surface-2);
  border-block: 1px solid var(--line);
}
.band-dark {
  background: linear-gradient(150deg, var(--red-deep), var(--red));
  border-color: transparent;
  color: var(--on-dark);
}
.band-dark h2, .band-dark h3, .band-dark strong { color: var(--on-dark); }
.band-dark p, .band-dark .lead, .band-dark span { color: var(--on-dark-2); }
.band-dark .eyebrow { color: var(--gold-bright); }
.band-dark a { color: var(--gold-bright); }
.band-dark .btn-ghost { border-color: rgb(255 255 255 / 35%); color: var(--on-dark); }
.band-dark .btn-ghost:hover { border-color: var(--gold-bright); color: var(--gold-bright); background: rgb(0 0 0 / 15%); }
.band-dark .btn-primary { background: var(--gold-bright); border-color: var(--gold-bright); color: var(--red-deep); }
.band-dark .btn-primary:hover { background: #fff; border-color: #fff; color: var(--red-deep); }

.section-head { max-width: 68ch; margin-bottom: 2.5rem; }
.section-head[data-align="center"] { margin-inline: auto; text-align: center; }
.section-head h2 { margin-bottom: 0.85rem; }

.band-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 1rem 2rem;
  margin-bottom: 2.5rem;
}
.band-head p { max-width: 52ch; font-size: 0.95rem; margin: 0; }

.section-cta { margin-top: 2rem; }
.center-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-top: 1.75rem; }
.center-text { max-width: 58ch; margin-inline: auto; text-align: center; color: var(--ink-2); }

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.prose > p, .prose > ul, .prose > ol { max-width: 68ch; }
.prose h2 + p { margin-top: 0; }

/* ------------------------------------------------------------ tarjetas --- */

.card-grid { display: grid; gap: 1.25rem; }
.card-grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card-grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.card {
  padding: 1.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: 0.6rem; }
.card p { color: var(--ink-2); font-size: 0.97rem; }
.card ul { margin-top: 0.5rem; padding-left: 1.15rem; color: var(--ink-2); font-size: 0.95rem; }
.card ul li { margin-bottom: 0.35rem; }
.card-compact { padding: 1.3rem; }
.card-compact p { font-size: 0.92rem; }

.card-n {
  display: block;
  margin-bottom: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-text);
}
.card-kicker {
  margin-bottom: 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.card-link {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.card-link:hover {
  transform: translateY(-3px);
  border-color: var(--red);
  box-shadow: var(--shadow);
  color: inherit;
}
.card-arrow {
  display: block;
  margin-top: 1rem;
  font-size: 1.3rem;
  color: var(--link);
}

.card-warn { border-left: 4px solid var(--warn); }
.card-ok { border-left: 4px solid var(--ok); }
.card-territory { border-top: 4px solid var(--red); }

/* ------------------------------------------------------------ badges ----- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge[data-tone="ok"] { background: var(--ok-bg); color: var(--ok); }
.badge[data-tone="warn"] { background: var(--warn-bg); color: var(--warn); }
.badge[data-tone="idle"] { background: var(--idle-bg); color: var(--idle); }
.badge::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink-2);
}

/* ------------------------------------------------------- indicadores ----- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
}
.stat-grid.cols-1 { grid-template-columns: 1fr; }
.stat-grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.stat-grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); margin-top: 2rem; }

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.band-dark .stat {
  background: rgb(255 255 255 / 7%);
  border-color: rgb(255 255 255 / 16%);
  backdrop-filter: blur(4px);
}
.stat-value {
  margin: 0;
  font-size: clamp(1.9rem, 1.5rem + 1.5vw, 2.8rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--link);
  font-variant-numeric: tabular-nums;
}
.band-dark .stat-value { color: var(--gold-bright); }
.stat-lg .stat-value { font-size: clamp(2.4rem, 1.8rem + 2.4vw, 3.6rem); }
.stat-label { margin: 0; font-size: 1rem; font-weight: 700; }
.stat-detail { margin: 0; font-size: 0.88rem; color: var(--ink-3); line-height: 1.5; }
.stat-source {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0.4rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--ink-3);
}
.band-dark .stat-source { border-top-color: rgb(255 255 255 / 18%); }
.stat-source .badge { align-self: flex-start; }

.stat-empty .stat-value {
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  font-style: italic;
  font-weight: 700;
  color: var(--ink-3);
  line-height: 1.35;
}

/* ------------------------------------------------------------- avance ---- */

.progress-list { display: grid; gap: 1.75rem; }
.progress-row {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.progress-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem 1.5rem;
  margin-bottom: 0.9rem;
}
.progress-figure { margin: 0; font-size: 0.95rem; color: var(--ink-2); }
.progress-figure strong { font-size: 1.35rem; color: var(--link); font-variant-numeric: tabular-nums; }
.progress-figure em { font-style: italic; color: var(--ink-3); }
.progress-track {
  height: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.progress-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--red-bright));
  border-radius: 999px;
}
.progress-note { margin: 0.75rem 0 0; font-size: 0.84rem; color: var(--ink-3); }

/* ------------------------------------------------------------ avisos ----- */

.callout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  margin: 2rem 0 0;
  padding: 1.4rem 1.6rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
}
.callout h3 { margin-bottom: 0.5rem; font-size: 1.05rem; }
.callout p { margin: 0; font-size: 0.96rem; color: var(--ink-2); }
.callout-icon {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.9rem;
}
.callout[data-tone="info"] { border-left: 4px solid var(--red); }
.callout[data-tone="info"] .callout-icon { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
.callout[data-tone="warn"] { border-left: 4px solid var(--warn); background: var(--warn-bg); }
.callout[data-tone="warn"] .callout-icon { background: color-mix(in srgb, var(--warn) 20%, transparent); color: var(--warn); }
.callout[data-tone="warn"] p { color: var(--ink); }
.callout[data-tone="ok"] { border-left: 4px solid var(--ok); background: var(--ok-bg); }
.callout[data-tone="ok"] .callout-icon { background: color-mix(in srgb, var(--ok) 20%, transparent); color: var(--ok); }
.callout[data-tone="ok"] p { color: var(--ink); }

/* El aviso conserva su propia tarjeta clara aunque esté dentro de una banda
   oscura, así que debe recuperar los colores de texto sobre fondo claro. */
.band-dark .callout h3 { color: var(--ink); }
.band-dark .callout p { color: var(--ink-2); }
.band-dark .callout[data-tone="warn"] p,
.band-dark .callout[data-tone="ok"] p { color: var(--ink); }
.band-dark .callout a { color: var(--link); }

/* -------------------------------------------------------------- listas --- */

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0 0;
  list-style: none;
}
.pill-list li {
  padding: 0.35rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-2);
}
.pill-list-lg li { padding: 0; }
.pill-list-lg a { display: block; padding: 0.6rem 1.2rem; text-decoration: none; font-weight: 700; }

.org-list, .source-list, .gap-list { display: grid; gap: 0.9rem; list-style: none; }
.org-list li, .source-list li, .gap-list li {
  display: grid;
  gap: 0.25rem;
  padding: 1.1rem 1.3rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.band-dark .org-list li, .band-dark .source-list li {
  background: rgb(255 255 255 / 7%);
  border-color: rgb(255 255 255 / 16%);
}
.org-list strong, .source-list strong, .gap-list strong { font-size: 1rem; }
.org-list span, .source-list span, .gap-list span { font-size: 0.9rem; color: var(--ink-3); }
.band-dark .org-list span, .band-dark .source-list span { color: var(--on-dark-2); }
.gap-list li { border-left: 4px solid var(--idle); }

.check-list { display: grid; gap: 0.6rem; margin: 1.25rem 0 0; list-style: none; }
.check-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: baseline;
  font-size: 0.97rem;
  color: var(--ink-2);
}
.check-list li::before {
  content: "✓";
  font-weight: 800;
  color: var(--ok);
}

.rule-list { display: grid; gap: 0.6rem; margin: 1.25rem 0; list-style: none; }
.rule-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: baseline;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.96rem;
}
.rule-list li::before { content: "✕"; font-weight: 800; color: var(--link); }

.numbered, .consent-list, .roadmap, .flow { display: grid; gap: 1rem; list-style: none; counter-reset: item; }
.numbered li, .consent-list li, .roadmap li, .flow li {
  position: relative;
  display: grid;
  gap: 0.3rem;
  padding: 1.1rem 1.3rem 1.1rem 3.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  counter-increment: item;
}
.numbered li::before, .consent-list li::before, .roadmap li::before, .flow li::before {
  content: counter(item, decimal-leading-zero);
  position: absolute;
  left: 1.3rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-text);
}
.consent-list span, .roadmap span, .flow span { font-size: 0.92rem; color: var(--ink-3); }
.numbered li { font-size: 0.97rem; color: var(--ink-2); }
.numbered strong { color: var(--ink); }

.def-list { display: grid; gap: 1rem; margin: 1.5rem 0; }
.def-list > div {
  padding: 1.1rem 1.3rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
}
.def-list dt { font-weight: 800; margin-bottom: 0.3rem; }
.def-list dd { margin: 0; font-size: 0.95rem; color: var(--ink-2); }

.split-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.split-lists h3 { margin-bottom: 0.5rem; }

.contact-list { display: grid; gap: 0.6rem; margin-top: 1.75rem; list-style: none; max-width: 460px; margin-inline: auto; }
.contact-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.contact-list span { font-weight: 700; font-size: 0.9rem; color: var(--ink-3); }

/* --------------------------------------------------------------- mitos --- */

.myth-list { display: grid; gap: 1.25rem; margin-top: 1.5rem; }
.myth {
  padding: 1.4rem 1.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.myth-claim {
  margin-bottom: 0.6rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--link);
  font-style: italic;
}
.myth p:last-child { font-size: 0.96rem; color: var(--ink-2); margin: 0; }

/* ------------------------------------------------------------- módulos --- */

.module-list { display: grid; gap: 1.1rem; list-style: none; }
.module {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 100px;
}
.module-index {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  background: linear-gradient(145deg, var(--red), var(--red-deep));
  border-radius: var(--radius);
  color: var(--gold-bright);
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
}
.module-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-bottom: 0.6rem;
}
.module-summary { color: var(--ink-2); font-size: 0.97rem; }
.module-format {
  margin: 0 0 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-text);
}
.module-details summary {
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--link);
  padding: 0.35rem 0;
}
.module-details ul { margin: 0.6rem 0 0; padding-left: 1.25rem; font-size: 0.93rem; color: var(--ink-2); }
.module-details li { margin-bottom: 0.35rem; }

/* ------------------------------------------------------------ recursos --- */

.hub-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.9fr);
  gap: 2rem;
  align-items: end;
  margin-bottom: 1.25rem;
}
.hub-head .section-head { margin-bottom: 0; }
.hub-controls { display: grid; gap: 0.85rem; }

.search-box input {
  width: 100%;
  padding: 0.8rem 1.1rem;
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.98rem;
  color: var(--ink);
}
.search-box input::placeholder { color: var(--ink-3); }

.filters { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chip {
  padding: 0.4rem 0.95rem;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.chip:hover { border-color: var(--red); color: var(--link); }
.chip[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #fff; }

.hub-count { font-size: 0.88rem; color: var(--ink-3); margin-bottom: 1.5rem; }
.hub-empty {
  padding: 2.5rem;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  color: var(--ink-3);
}

.resource-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.25rem; }
.resource {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.resource[hidden] { display: none; }
.resource-top { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.resource h3 { margin: 0; }
.resource-summary { margin: 0; font-size: 0.94rem; color: var(--ink-2); flex: 1; }
.resource-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem 1rem;
  margin: 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}
.resource-meta dt {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.resource-meta dd { margin: 0.15rem 0 0; font-size: 0.87rem; font-weight: 600; }
.tag-list { display: flex; flex-wrap: wrap; gap: 0.35rem; list-style: none; }
.tag-list li {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-3);
}
.tag-list li::before { content: "#"; color: var(--accent-text); }
.resource-action { margin-top: auto; padding-top: 0.5rem; }
.resource-pending { margin: 0; font-size: 0.85rem; font-style: italic; color: var(--ink-3); }

/* ---------------------------------------------------------- expert talks --- */

.talk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; }
.talk {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.talk-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.9rem; }
.talk-n {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.talk h3 { margin-bottom: 0.25rem; }
.talk-expertise { font-size: 0.9rem; color: var(--ink-3); margin-bottom: 1rem; }
.talk-meta { display: grid; gap: 0.5rem; margin: 0; padding-top: 0.9rem; border-top: 1px solid var(--line); }
.talk-meta > div { display: flex; justify-content: space-between; gap: 1rem; }
.talk-meta dt { font-size: 0.82rem; font-weight: 700; color: var(--ink-3); }
.talk-meta dd { margin: 0; font-size: 0.85rem; text-align: right; }

/* ------------------------------------------------------ imágenes y galería --- */

.figure { margin: 0; }
.figure img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.figure figcaption {
  margin-top: 0.6rem;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--ink-3);
}
.figure-wide { margin-bottom: 1.5rem; }
.figure-zoom { display: block; cursor: zoom-in; border-radius: var(--radius-lg); }
.figure-zoom:hover img { border-color: var(--red); }

/* Columnas: cada imagen conserva su proporción, sin recortes. */
.gallery { columns: 3 280px; column-gap: 1.25rem; }
.gallery .figure { break-inside: avoid; margin-bottom: 1.25rem; }

.pillars { margin-top: 2rem; }
.pillars h3 { margin-bottom: 0.25rem; font-size: 1rem; }

.event-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.75rem 1.25rem;
  margin: 1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.event-facts dt {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.event-facts dd { margin: 0.15rem 0 0; font-size: 0.92rem; font-weight: 600; }

/* ---------------------------------------------------------- trayectoria --- */

.trayectoria-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
.timeline { list-style: none; position: relative; display: grid; gap: 0; padding-left: 1.6rem; }
.timeline::before {
  content: "";
  position: absolute;
  left: 0.42rem;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 2px;
  background: var(--line-strong);
}
.timeline li { position: relative; padding: 0 0 1.35rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -1.6rem;
  top: 0.35rem;
  width: 0.95rem;
  height: 0.95rem;
  background: var(--paper);
  border: 3px solid var(--red);
  border-radius: 50%;
}
.timeline-when {
  margin: 0 0 0.1rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.timeline h3 { margin: 0 0 0.15rem; font-size: 1.02rem; line-height: 1.3; }
.timeline h3 a { color: var(--ink); text-decoration: none; }
.timeline h3 a:hover { color: var(--link); text-decoration: underline; }
.timeline-place { margin: 0; font-size: 0.86rem; color: var(--ink-3); }

/* ------------------------------------------------- sesiones y ponentes --- */

.session-list { display: grid; gap: 1.5rem; margin-bottom: 2rem; }
.session {
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 100px;
}
.session.has-flyer {
  display: grid;
  grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
  gap: 1.75rem;
  align-items: start;
}
.session-flyer { position: sticky; top: 96px; }
.session-main { min-width: 0; }
.session-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-bottom: 0.9rem; }
.session-n {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.session-when { margin: 0; font-weight: 800; color: var(--link); }
.session h3 { margin-bottom: 0.6rem; }
.session-objective { margin-bottom: 1.25rem; font-size: 0.95rem; color: var(--ink-3); }

.speaker-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  list-style: none;
}
.speaker {
  padding: 1.1rem 1.2rem;
  background: var(--surface-inset);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.speaker-name { margin: 0 0 0.2rem; font-weight: 800; }
.speaker-role { margin: 0 0 0.6rem; font-size: 0.85rem; color: var(--ink-3); line-height: 1.45; }
.speaker-talk { margin: 0 0 0.5rem; font-size: 0.92rem; font-weight: 600; color: var(--ink-2); }
.speaker-topics { margin: 0; padding-left: 1.1rem; font-size: 0.86rem; color: var(--ink-3); }
.speaker-topics li { margin-bottom: 0.25rem; }

/* -------------------------------------------------------------- eventos --- */

.event-list { display: grid; gap: 1.5rem; }
.event {
  display: grid;
  grid-template-columns: minmax(180px, 220px) 1fr;
  gap: 2rem;
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 100px;
}
.event-date-block { display: grid; gap: 0.75rem; align-content: start; }
.event-date-block .badge { justify-self: start; }
.event-date-label { font-size: 1.05rem; font-weight: 800; color: var(--link); }
.event h3 { margin-bottom: 0.3rem; }
.event-place { font-size: 0.9rem; font-weight: 600; color: var(--ink-3); margin-bottom: 0.9rem; }
.event-method, .event-venue { font-size: 0.92rem; color: var(--ink-2); }
.event-attendance { margin: 0.75rem 0 0; font-size: 0.95rem; }
.event-attendance strong { font-size: 1.4rem; color: var(--link); }
.event-attendance-pending { font-style: italic; color: var(--ink-3); font-size: 0.88rem; }

.event-next {
  padding: 1.75rem;
  background: linear-gradient(150deg, var(--red-deep), var(--red));
  border-radius: var(--radius-lg);
  color: var(--on-dark);
  box-shadow: var(--shadow);
}
.event-next h3 { color: var(--on-dark); margin-bottom: 0.9rem; }
.event-next p { color: var(--on-dark-2); font-size: 0.95rem; }
.event-next .eyebrow { color: var(--gold-bright); }
.event-meta { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-bottom: 1rem; font-size: 0.88rem; }
.event-date { font-weight: 700; color: var(--gold-bright) !important; margin-bottom: 1.25rem; }
.event-next .btn-primary { background: var(--gold-bright); border-color: var(--gold-bright); color: var(--red-deep); }
.event-next .btn-primary:hover { background: #fff; border-color: #fff; }

/* ------------------------------------------------------------ equipo ----- */

.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.person {
  padding: 1.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.person-avatar {
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  margin-bottom: 1rem;
  background: linear-gradient(145deg, var(--red), var(--red-deep));
  border-radius: 50%;
  color: var(--gold-bright);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.person h3 { margin-bottom: 0.25rem; font-size: 1.08rem; }
.person-role { margin-bottom: 0.15rem; font-size: 0.9rem; font-weight: 700; color: var(--link); }
.person-program {
  margin-bottom: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-text);
}
.person-bio { margin: 0; font-size: 0.92rem; color: var(--ink-2); }

.partner-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; }
.partner {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
}
.partner-kind {
  margin-bottom: 0.5rem;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.partner h3 { margin-bottom: 0.5rem; font-size: 1.05rem; }
.partner p:last-child { font-size: 0.92rem; color: var(--ink-2); margin: 0; }

/* ------------------------------------------------------------ tablas ----- */

.status-table-wrap, .fact-table-wrap { overflow-x: auto; }
.status-table, .fact-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.92rem;
  overflow: hidden;
}
.status-table th, .status-table td,
.fact-table th, .fact-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.status-table thead th, .fact-table thead th {
  background: var(--surface-2);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.status-table tbody th, .fact-table tbody th { font-weight: 700; }
.status-table td:last-child { color: var(--ink-2); font-size: 0.88rem; }
.fact-table tbody tr:last-child th, .fact-table tbody tr:last-child td { border-bottom: 0; }
.fact-table .row-empty td, .fact-table .row-empty th { color: var(--ink-3); font-style: italic; }
.fact-table td:nth-child(2) { font-weight: 700; font-variant-numeric: tabular-nums; }

.source-block { margin-bottom: 2.5rem; }
.source-block h3 { margin-bottom: 0.4rem; }
.source-note { margin-bottom: 1rem; font-size: 0.92rem; color: var(--ink-3); }

/* --------------------------------------------------------- action lab ---- */

.lab {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
  gap: 2rem;
  align-items: start;
}
.lab-form {
  display: grid;
  gap: 1.1rem;
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.1rem; }
.field { display: grid; gap: 0.4rem; }
.field-label { font-size: 0.88rem; font-weight: 700; }
.field-label em { color: var(--link); font-style: normal; }
.field-hint { font-size: 0.8rem; color: var(--ink-3); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: var(--surface-inset);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.96rem;
  color: var(--ink);
}
.field textarea { resize: vertical; min-height: 72px; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--red); }
.field [aria-invalid="true"] { border-color: var(--red-bright); background: color-mix(in srgb, var(--red) 6%, var(--surface-inset)); }

.lab-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.5rem; }
.lab-privacy {
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--ink-3);
}
.field-error { margin: 0; font-size: 0.85rem; font-weight: 600; color: var(--red-bright); }

.lab-output {
  display: block;
  padding: 1.75rem;
  background: var(--surface-inset);
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  position: sticky;
  top: 100px;
}
.lab-output[data-filled="true"] { border-style: solid; border-color: var(--gold); background: var(--surface); }
.lab-placeholder h3 { margin-bottom: 0.5rem; color: var(--ink-3); }
.lab-placeholder p { font-size: 0.92rem; color: var(--ink-3); }

.canvas-title { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.35rem; }
.canvas-meta { margin-bottom: 1.25rem; font-size: 0.84rem; color: var(--ink-3); }
.canvas-fields { display: grid; gap: 0.85rem; margin: 0 0 1.5rem; }
.canvas-fields > div { display: grid; gap: 0.2rem; padding-bottom: 0.85rem; border-bottom: 1px solid var(--line); }
.canvas-fields > div:last-child { border-bottom: 0; padding-bottom: 0; }
.canvas-fields dt {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.canvas-fields dd { margin: 0; font-size: 0.96rem; }
.canvas-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* ------------------------------------------------------------- error ----- */

.error-page { text-align: center; padding-block: clamp(4rem, 10vw, 7rem); }
.error-page .pill-list { justify-content: center; margin-top: 2rem; }

/* -------------------------------------------------------------- footer --- */

.site-footer {
  background: linear-gradient(160deg, var(--red-deep), #2c0a0c);
  color: var(--on-dark-2);
  padding-top: clamp(3rem, 6vw, 4.5rem);
}
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 3rem;
  padding-bottom: 3rem;
}
.footer-brand .brand-mark { width: 42px; height: 42px; color: var(--on-dark); margin-bottom: 1rem; }
.footer-descriptor {
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-bright);
}
.footer-claim {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--on-dark);
  max-width: 34ch;
  margin-bottom: 0.9rem;
}
.footer-note { font-size: 0.88rem; max-width: 44ch; }
.footer-contact { display: grid; gap: 0.35rem; margin-top: 1.25rem; list-style: none; font-size: 0.9rem; }
.footer-contact a { color: var(--gold-bright); text-decoration: none; }
.footer-contact a:hover { text-decoration: underline; color: var(--gold-bright); }

.footer-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 2rem; }
.footer-links h2 {
  margin-bottom: 0.85rem;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-bright);
}
.footer-links ul { display: grid; gap: 0.5rem; list-style: none; }
.footer-links a { color: var(--on-dark-2); font-size: 0.92rem; text-decoration: none; }
.footer-links a:hover { color: var(--on-dark); text-decoration: underline; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid rgb(255 255 255 / 14%);
  font-size: 0.82rem;
}
.footer-bottom p { margin: 0; }
.footer-disclaimer { max-width: 52ch; opacity: 0.85; }

/* ---------------------------------------------------------- responsive --- */

@media (max-width: 960px) {
  .trayectoria-grid { grid-template-columns: 1fr; }
  .session.has-flyer { grid-template-columns: 1fr; }
  .session-flyer { position: static; max-width: 320px; }
  .hero-grid, .split-section, .lab, .hub-head, .footer-top { grid-template-columns: 1fr; }
  .lab-output { position: static; }
  .event { grid-template-columns: 1fr; gap: 1.25rem; }
  .event-date-block { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .shell, .shell.narrow { width: min(100% - 2rem, var(--shell)); }
  .resource-grid { grid-template-columns: 1fr; }
  .module { grid-template-columns: 1fr; }
  .module-index { width: 44px; height: 44px; font-size: 0.95rem; }
  .hero-actions .btn, .center-cta .btn, .lab-actions .btn { width: 100%; }
  .resource-meta { grid-template-columns: 1fr; }
  .contact-list li { flex-direction: column; gap: 0.25rem; }
}

/* ------------------------------------------------------------ toolkit --- */

.tk-hub { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.tk-hub p { color: var(--ink-2); }
.tk-closing { font-weight: 800; color: var(--accent-text) !important; }
.tk-hub-cta { justify-content: flex-start; flex-wrap: wrap; }
.tk-hub-card h3 { font-size: 1.05rem; margin-bottom: 0.75rem; }

.module-tk { grid-template-columns: 150px 1fr; align-items: start; }
.module-cover img {
  width: 100%; height: auto; display: block;
  border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.module-n {
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-text);
}
.module-tk h3 { font-size: 1.2rem; margin-bottom: 0.25rem; }
.module-tk h3 a { color: var(--ink); text-decoration: none; }
.module-tk h3 a:hover { color: var(--link); text-decoration: underline; }
.module-sub { font-style: italic; color: var(--ink-3); margin-bottom: 0.6rem; font-size: 0.95rem; }
.module-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1rem 0 0; }
.module-actions .btn { padding: 0.55rem 1rem; font-size: 0.88rem; }

.tk-layout {
  display: grid; grid-template-columns: 250px minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem); padding: clamp(2rem, 5vw, 3.5rem) 0 4rem; align-items: start;
}
.tk-aside { position: sticky; top: 96px; display: grid; gap: 0.75rem; }
.tk-cover img { border-radius: var(--radius); }
.tk-download, .tk-print { width: 100%; justify-content: center; }
.tk-meta { font-weight: 500; opacity: 0.85; font-size: 0.85em; }
.tk-toc { margin-top: 0.5rem; padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); max-height: 50vh; overflow: auto; }
.tk-toc-title { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 0.5rem; }
.tk-toc ol { margin: 0; padding-left: 1.1rem; font-size: 0.86rem; display: grid; gap: 0.35rem; }
.tk-toc a { color: var(--ink-2); text-decoration: none; }
.tk-toc a:hover { color: var(--link); text-decoration: underline; }

.tk-main { min-width: 0; max-width: 900px; }
.tk-section { padding: 0 0 2.75rem; margin-bottom: 2.75rem; border-bottom: 1px solid var(--line); scroll-margin-top: 96px; }
.tk-section:last-of-type { border-bottom: 0; }
.tk-section > h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); margin-bottom: 1rem; }
.tk-section p { color: var(--ink-2); }
.tk-lead { font-size: 1.15rem; color: var(--ink) !important; font-weight: 500; }
.tk-h { font-size: 1.1rem; margin: 1.75rem 0 0.6rem; }
.tk-list, .tk-steps { padding-left: 1.3rem; color: var(--ink-2); }
.tk-list li, .tk-steps li { margin-bottom: 0.4rem; }
.tk-steps li::marker { font-weight: 800; color: var(--accent-text); }
.tk-source { font-size: 0.85rem; color: var(--ink-3) !important; font-style: italic; }
.tk-section .callout, .tk-intro .callout { margin: 1.25rem 0; }

.tk-table-wrap { overflow-x: auto; margin: 1.25rem 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.tk-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.tk-table caption { caption-side: top; text-align: left; padding: 0.8rem 1rem; font-weight: 800; color: var(--ink); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.tk-table th, .tk-table td { padding: 0.7rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.tk-table thead th { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); background: var(--surface-inset); }
.tk-table tbody th { font-weight: 700; color: var(--ink); min-width: 9rem; }
.tk-table td { color: var(--ink-2); min-width: 10rem; }
.tk-table tbody tr:last-child > * { border-bottom: 0; }

.tk-example, .tk-exercise {
  margin: 1.25rem 0; padding: 1.1rem 1.25rem; border-radius: var(--radius);
  background: var(--surface-inset); border: 1px dashed var(--line-strong);
}
.tk-example-title, .tk-exercise-title { font-weight: 800; color: var(--ink) !important; margin-bottom: 0.4rem; }
.tk-example p:last-child, .tk-exercise p:last-child { margin: 0; }
.tk-exercise { border-style: solid; border-left: 4px solid var(--gold); }
.tk-tag {
  display: inline-block; padding: 0.1rem 0.5rem; margin-right: 0.35rem; border-radius: 999px;
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  background: color-mix(in srgb, var(--gold) 22%, transparent); color: var(--accent-text);
}
.tk-time { font-size: 0.8rem; font-weight: 600; color: var(--ink-3); margin-left: 0.35rem; }

.tk-figure { margin: 1.5rem 0; }

.tk-timeline { list-style: none; padding: 0; margin: 1.5rem 0; border-left: 3px solid var(--red); }
.tk-timeline li { position: relative; padding: 0 0 1.1rem 1.25rem; }
.tk-timeline li::before {
  content: ""; position: absolute; left: -8px; top: 0.3rem; width: 13px; height: 13px;
  border-radius: 50%; background: var(--surface); border: 3px solid var(--red);
}
.tk-timeline h3 { font-size: 1rem; margin: 0.1rem 0 0.25rem; }
.tk-timeline p { margin: 0; font-size: 0.93rem; }
.tk-when { font-family: var(--font-mono); font-size: 0.78rem !important; font-weight: 700; color: var(--accent-text) !important; }

.tk-flow { margin: 1.5rem 0; }
.tk-flow-title { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3) !important; margin-bottom: 0.5rem; }
.tk-flow ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.tk-flow li {
  padding: 0.45rem 0.8rem; border-radius: 999px; font-size: 0.86rem; font-weight: 700;
  background: color-mix(in srgb, var(--red) 9%, var(--surface)); color: var(--ink); border: 1px solid var(--line);
}
.tk-flow li + li::before { content: "→"; margin-right: 0.5rem; color: var(--accent-text); }

.tk-cards { margin: 1.25rem 0; }
.tk-cards .card h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.tk-cards .card p { font-size: 0.93rem; margin: 0; }

.tk-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin: 1.25rem 0; }
.tk-stat { padding: 1.25rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--red); }
.tk-stat-value { font-size: 1.6rem; font-weight: 800; color: var(--ink) !important; margin-bottom: 0.35rem; }
.tk-stat p { font-size: 0.92rem; }
.tk-stat .tk-source { margin: 0; }

.tk-pairs { display: grid; gap: 1.25rem; margin: 1.25rem 0; }
.tk-pair { padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.tk-pair h3 { font-size: 1.02rem; margin-bottom: 0.75rem; }
.tk-pair-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0.75rem; }
.tk-pair blockquote { margin: 0; padding: 0.9rem 1rem; border-radius: var(--radius); background: var(--surface-inset); border: 1px solid var(--line); }
.tk-pair blockquote p { margin: 0.4rem 0 0; color: var(--ink) !important; font-weight: 600; }
.tk-reveal, .tk-details { margin-top: 0.9rem; }
.tk-reveal summary, .tk-details summary { cursor: pointer; font-weight: 700; color: var(--link); padding: 0.3rem 0; }
.tk-reveal dl { margin: 0.6rem 0 0; display: grid; gap: 0.6rem; }
.tk-reveal dt { font-weight: 800; font-size: 0.85rem; }
.tk-reveal dd { margin: 0; color: var(--ink-2); font-size: 0.93rem; }
.tk-details { padding: 0.6rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }

.tk-link a {
  display: inline-flex; gap: 0.4rem; align-items: center; font-weight: 700; color: var(--link);
  padding: 0.55rem 0.9rem; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface);
}
.tk-link a::after { content: "↗"; }

.tk-acronym { list-style: none; padding: 0; margin: 1.25rem 0; display: grid; gap: 0.9rem; }
.tk-acronym li { display: grid; grid-template-columns: 56px 1fr; gap: 1rem; align-items: start; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.tk-letter {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: var(--radius);
  background: linear-gradient(145deg, var(--red), var(--red-deep)); color: var(--gold-bright);
  font-size: 1.6rem; font-weight: 800;
}
.tk-acronym h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.tk-acronym p { margin: 0; font-size: 0.93rem; }

.tk-channels { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin: 1.25rem 0; }
.tk-channel { padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.tk-channel h3 { font-size: 1rem; margin-bottom: 0.4rem; }
.tk-channel p { font-size: 0.9rem; }
.tk-channel dl { margin: 0.6rem 0 0; display: grid; gap: 0.35rem; font-size: 0.88rem; }
.tk-channel dl div { display: flex; flex-wrap: wrap; gap: 0.15rem 0.5rem; }
.tk-channel dt { font-weight: 700; color: var(--ink-3); }
.tk-channel dd { margin: 0; overflow-wrap: anywhere; }
.tk-channel a { color: var(--link); font-weight: 600; }

.tk-pledge { margin: 1.5rem 0; padding: 1.5rem; border-radius: var(--radius-lg); background: linear-gradient(145deg, var(--red), var(--red-deep)); }
.tk-pledge p { color: var(--on-dark) !important; margin: 0; font-size: 1.02rem; }
.tk-pledge .tk-pledge-title { color: var(--gold-bright) !important; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.8rem; margin-bottom: 0.5rem; }

.tk-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; margin-top: 1.25rem; }
.tk-tool { padding: 1.25rem; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); break-inside: avoid; }
.tk-tool h3 { font-size: 1rem; margin-bottom: 0.4rem; }
.tk-tool-intro { font-size: 0.88rem; }
.tk-tool ul, .tk-tool ol { margin: 0.5rem 0 0; padding-left: 1.2rem; font-size: 0.9rem; color: var(--ink-2); }
.tk-tool li { margin-bottom: 0.7rem; }
.tk-tool li span:first-child { display: block; }
.tk-line { display: block; height: 1.4rem; border-bottom: 1px dotted var(--line-strong); }

.tk-keys { list-style: none; padding: 0; display: grid; gap: 0.6rem; }
.tk-keys li {
  padding: 0.85rem 1rem 0.85rem 2.6rem; position: relative; border-radius: var(--radius);
  background: var(--ok-bg); color: var(--ink); font-weight: 600; font-size: 0.95rem;
}
.tk-keys li::before { content: "✓"; position: absolute; left: 1rem; color: var(--ok); font-weight: 800; }

.tk-source-group h3 { font-size: 0.98rem; margin: 1.25rem 0 0.5rem; }
.tk-source-group ol { padding-left: 1.3rem; font-size: 0.9rem; color: var(--ink-2); }
.tk-source-group li { margin-bottom: 0.45rem; overflow-wrap: anywhere; }
.tk-source-group a { color: var(--link); }

.tk-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.tk-pager-link {
  display: grid; gap: 0.25rem; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.95rem;
}
.tk-pager-link span { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-text); }
.tk-pager-link:hover { border-color: var(--red); color: var(--link); }
.tk-pager-next { text-align: right; }

@media (max-width: 960px) {
  .tk-hub { grid-template-columns: 1fr; }
  .tk-layout { grid-template-columns: 1fr; }
  .tk-aside { position: static; grid-template-columns: 120px 1fr; align-items: start; }
  .tk-aside .tk-cover { grid-row: span 2; }
  .tk-toc { grid-column: 1 / -1; max-height: none; }
}
@media (max-width: 560px) {
  .tk-table thead { display: none; }
  .tk-table tr { display: block; padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
  .tk-table tbody tr:last-child { border-bottom: 0; }
  .tk-table th, .tk-table td { display: block; min-width: 0; border: 0; padding: 0.2rem 1rem; }
  .tk-table td[data-label]::before {
    content: attr(data-label); display: block; font-size: 0.7rem; font-weight: 800;
    letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); margin-top: 0.35rem;
  }
  .module-tk { grid-template-columns: 1fr; }
  .module-tk .module-cover { max-width: 140px; }
  .tk-pager { grid-template-columns: 1fr; }
  .tk-pager-next { text-align: left; }
  .tk-acronym li { grid-template-columns: 44px 1fr; }
  .tk-letter { width: 44px; height: 44px; font-size: 1.3rem; }
}

/* -------------------------------------------------------------- print --- */

@media print {
  .site-header, .site-footer, .skip-link, .lab-form, .hub-controls, .filters,
  .btn, .canvas-actions, .nav-toggle { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .lab { grid-template-columns: 1fr; }
  .lab-output { border: 1px solid #000; page-break-inside: avoid; }
  .section, .band { padding: 1rem 0; border: 0; background: #fff; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
  .tk-layout { display: block; padding: 0; }
  .tk-aside, .tk-pager, .tk-toc { display: none !important; }
  .tk-section { border: 0; padding: 0 0 1rem; margin: 0; }
  .tk-tool { border: 1px solid #000; page-break-inside: avoid; }
  .tk-line { border-bottom: 1px solid #000; height: 1.8rem; }
  .tk-details:not([open]) > :not(summary), .tk-reveal > :not(summary) { display: block !important; }
}
