.section-title {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin: 0 0 1rem;
}

.page > h2.section-title:not(:first-child),
.page > h3.section-title:not(:first-child) {
  margin-top: 3.25rem;
}

.section-lead {
  color: var(--muted);
  max-width: 40rem;
  margin: 0 0 2.5rem;
  line-height: 1.7;
}

.feature-num {
  display: block;
  margin-bottom: 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.objective-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.objective-cards li {
  margin: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
  padding: 1.15rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.objective-cards .feature-num {
  margin: 0;
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  background: var(--plum);
  color: #fff;
  border-radius: var(--radius);
  font-size: 0.82rem;
  letter-spacing: 0;
}

.objective-cards p {
  margin: 0.15rem 0 0;
  font-weight: 500;
  line-height: 1.5;
}

.objective-cards + .btn {
  margin-top: 2.75rem;
}

.section-kicker {
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.stack {
  display: grid;
  gap: 1rem;
}

.grid-2 {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.prose {
  max-width: 42rem;
}

.prose p {
  margin: 0 0 1.25rem;
  line-height: 1.7;
}

.prose .btn,
.page > .btn {
  margin-top: 1rem;
}

.prose ul {
  padding-left: 1.15rem;
  margin: 0.35rem 0 0;
  display: grid;
  gap: 0.75rem;
  line-height: 1.65;
}

.red-facts,
.red-pillars {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.red-facts li {
  display: grid;
  gap: 0.2rem;
  padding: 0.25rem 0 0.25rem 1rem;
  border-left: 3px solid var(--accent);
}

.red-facts strong {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
}

.red-facts a {
  color: inherit;
  text-decoration-color: var(--accent);
}

.red-facts a:hover {
  color: var(--accent-hover);
}

.red-facts span {
  color: var(--muted);
  font-size: 0.9rem;
}

.red-pillars {
  margin-top: 2rem;
}

.red-pillars li {
  padding: 1.25rem 1.3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.red-pillars h3 {
  margin: 0 0 0.45rem;
  font-size: 1.2rem;
}

.red-pillars p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* Recta histórica — inspirada en RECORRIDO (presentación 2026) */
.timeline {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0.35rem 0 0.5rem;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  /* Año + margen + centro del punto (order corrige ::before en flex) */
  top: calc(1.5rem + 1.15rem + 6px);
  left: 8%;
  right: 8%;
  height: 2px;
  background: var(--accent);
  z-index: 0;
}

.timeline li {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 0.4rem;
  animation: rise 0.7s ease both;
}

.timeline li:nth-child(2) { animation-delay: 0.06s; }
.timeline li:nth-child(3) { animation-delay: 0.12s; }
.timeline li:nth-child(4) { animation-delay: 0.18s; }
.timeline li:nth-child(5) { animation-delay: 0.24s; }

.timeline-year {
  display: block;
  order: 1;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 1.15rem;
}

.timeline li::before {
  content: "";
  order: 2;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--plum);
  box-shadow: 0 0 0 4px var(--paper-2);
  flex-shrink: 0;
  margin-bottom: 1.35rem;
}

.timeline-text {
  order: 3;
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 11.75rem;
}

.flash-list {
  max-width: var(--max);
  margin: 1rem auto 0;
  padding: 0 1.25rem;
  display: grid;
  gap: 0.5rem;
}

.flash {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}

.flash-success {
  border-color: #b7e0cc;
  background: #edf8f2;
  color: var(--success);
}

.flash-error {
  border-color: #efc2c2;
  background: #fdf2f2;
  color: var(--danger);
}

.flash-warning {
  border-color: #e8d9a8;
  background: #fff9e9;
  color: var(--warning);
}

.muted {
  color: var(--muted);
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--paper);
  color: var(--muted);
}

.badge-public {
  border-color: #b7e0cc;
  color: var(--success);
  background: #edf8f2;
}

.badge-private {
  border-color: var(--border-strong);
  color: var(--ink-soft);
}

/* Las tablas aprovechan el ancho de pantalla más allá de --max, centradas sobre .page */
.table-wrap {
  width: min(calc(100vw - 2.5rem), var(--max-tabla));
  margin-inline: calc((100% - min(calc(100vw - 2.5rem), var(--max-tabla))) / 2);
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

table.data th,
table.data td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

table.data th {
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
}

table.data tr:last-child td {
  border-bottom: 0;
}

table.data-compact {
  font-size: 0.9rem;
}

table.data-compact th,
table.data-compact td {
  padding: 0.55rem 0.75rem;
  vertical-align: middle;
}

table.data-compact .muted {
  font-size: 0.82rem;
}

table.data-compact .nowrap,
table.data-compact .form-actions-inline {
  white-space: nowrap;
  flex-wrap: nowrap;
}

.th-orden {
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.th-orden:hover,
.th-orden.is-active {
  color: var(--accent);
}

.form-actions-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
