/* ==========================================================================
   El Fracaso del Bolívar — components.css
   Nav, cards, botones, chips, ticker, timeline, tablas, gráficos, esqueletos.
   ========================================================================== */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 20px;
}
.shell--narrow { max-width: 860px; }
.section { padding-block: clamp(56px, 8vw, 104px); position: relative; z-index: 2; }
.section--tight { padding-block: clamp(36px, 5vw, 64px); }

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
  border: 0;
}

/* ---------------------------------------------------------------- Header -- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  background: color-mix(in srgb, var(--bg-base) 82%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.site-header.is-stuck { border-bottom-color: var(--border); }

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  height: var(--nav-h);
}

.brand { display: flex; align-items: center; gap: 11px; flex: none; }
.brand__mark {
  width: 36px; height: 36px; flex: none;
  border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, #2a2418, #14161b 65%);
  border: 1px solid rgba(233, 185, 73, 0.34);
  box-shadow: var(--glow-gold);
  font-family: var(--font-display);
  font-weight: 700; font-size: 15px; color: var(--gold);
}
.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.brand__tag {
  display: block;
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 500;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}
.nav__link, .nav__group > button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 13px;
  border-radius: 9px;
  font-size: 0.87rem;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: 0;
  cursor: pointer;
  transition: color 0.16s ease, background 0.16s ease;
  white-space: nowrap;
}
.nav__link:hover, .nav__group > button:hover,
.nav__link[aria-current='page'] {
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
}
.nav__link[aria-current='page'] { color: var(--gold); }

.nav__group { position: relative; }
.nav__panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 290px;
  padding: 9px;
  border-radius: var(--r-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: 0 26px 60px -22px rgba(0, 0, 0, 0.9);
  display: none;
  z-index: 100;
}
.nav__group[data-open='true'] .nav__panel { display: block; }
.nav__panel a {
  display: block;
  padding: 9px 11px;
  border-radius: 9px;
  font-size: 0.86rem;
  color: var(--text-muted);
}
.nav__panel a:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.nav__panel .nav__panel-head {
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 8px 11px 4px;
}
.nav__panel a small { display: block; color: var(--text-dim); font-size: 0.74rem; }

.nav__actions { display: flex; align-items: center; gap: 8px; flex: none; }
.nav__toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  cursor: pointer;
  place-items: center;
}
.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.16s ease, border-color 0.16s ease;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }

/* Menú móvil */
.nav__mobile {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--bg-deep);
  padding: 14px 0 22px;
}
.nav__mobile[data-open='true'] { display: block; }
.nav__mobile a {
  display: block;
  padding: 11px 4px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.95rem;
}
.nav__mobile a:hover { color: var(--gold); }

@media (max-width: 1080px) {
  .nav__menu { display: none; }
  .nav__toggle { display: grid; }
  .nav__actions { margin-left: auto; }
}

/* --------------------------------------------------------------- Ticker -- */
.ticker {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.78rem;
  line-height: 1;
  white-space: nowrap;
}
.ticker__item { display: flex; align-items: baseline; gap: 6px; }
.ticker__label { color: var(--text-dim); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; }
.ticker__value { font-weight: 600; font-variant-numeric: tabular-nums; }
.ticker__sep { width: 1px; height: 16px; background: var(--border-strong); }
@media (max-width: 780px) { .ticker__hide-sm { display: none; } }

/* ----------------------------------------------------------------- Cards -- */
.card {
  position: relative;
  border-radius: var(--r-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0) 42%),
    var(--bg-surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  padding: 22px;
}
.card--flat { background: var(--bg-surface); }
.card--flush { padding: 0; overflow: hidden; }
.card--glow { box-shadow: var(--shadow-card), var(--glow-gold); }
.card--hover { transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.25s ease; }
.card--hover:hover { transform: translateY(-4px); border-color: var(--border-strong); }

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.card__title { font-size: 0.98rem; font-weight: 600; font-family: var(--font-display); }

/* Tarjeta de tasa */
.rate-card { display: flex; flex-direction: column; gap: 10px; min-height: 152px; }
.rate-card__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rate-card__name { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }
.rate-card__value {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.rate-card__value span { font-size: 0.42em; font-weight: 500; color: var(--text-dim); margin-left: 5px; letter-spacing: 0; }
.rate-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }

.delta { display: inline-flex; align-items: center; gap: 4px; font-size: 0.78rem; font-weight: 600; }
.delta--up { color: var(--danger-2); }
.delta--down { color: var(--stable); }
.delta--flat { color: var(--text-dim); }

/* ---------------------------------------------------------------- Chips --- */
.chip, .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.5;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  white-space: nowrap;
}
.chip--gold   { color: var(--gold);    border-color: rgba(233, 185, 73, 0.3);  background: rgba(233, 185, 73, 0.09); }
.chip--danger { color: var(--danger-2);border-color: rgba(224, 66, 74, 0.32);  background: rgba(224, 66, 74, 0.1); }
.chip--stable { color: var(--stable);  border-color: rgba(47, 191, 113, 0.3);  background: rgba(47, 191, 113, 0.09); }
.chip--digital{ color: var(--digital); border-color: rgba(56, 189, 248, 0.3);  background: rgba(56, 189, 248, 0.09); }
.chip--violet { color: var(--violet);  border-color: rgba(139, 124, 246, 0.3); background: rgba(139, 124, 246, 0.1); }

.tag {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 600;
}

/* -------------------------------------------------------------- Botones --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 20px;
  border-radius: 11px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-display);
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.2s ease;
}
.btn:hover { background: rgba(255, 255, 255, 0.09); }
.btn:active { transform: translateY(1px); }
.btn--gold {
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: #16120a;
  border-color: rgba(233, 185, 73, 0.7);
  box-shadow: var(--glow-gold);
}
.btn--gold:hover { background: linear-gradient(180deg, #ffe9a8, var(--gold-2)); }
.btn--ghost { background: transparent; }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.06); }
.btn--sm { padding: 8px 14px; font-size: 0.82rem; border-radius: 9px; }
.btn--block { width: 100%; }

/* CTA banner */
.cta-banner {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  border: 1px solid rgba(233, 185, 73, 0.28);
  background:
    radial-gradient(120% 130% at 12% 0%, rgba(233, 185, 73, 0.14), transparent 55%),
    linear-gradient(140deg, #191713 0%, #101216 45%, #0b0d11 100%);
  padding: clamp(28px, 5vw, 52px);
}
.cta-banner__rail {
  position: absolute; inset: auto 0 0 0; height: 5px;
  background: linear-gradient(90deg, var(--gold) 0%, #d9822b 42%, var(--danger) 82%, #4a1418 100%);
}
.cta-banner__ghost {
  position: absolute;
  right: -4%; top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(7rem, 22vw, 17rem);
  letter-spacing: -0.06em;
  color: rgba(255, 255, 255, 0.026);
  pointer-events: none;
  user-select: none;
  line-height: 0.8;
}

/* ---------------------------------------------------------------- Stats --- */
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat__value {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.7rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat__label { font-size: 0.82rem; color: var(--text-muted); }
.stat__hint { font-size: 0.72rem; color: var(--text-dim); }

.grid-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.grid-stats > * { background: var(--bg-surface); padding: 22px; }

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

/* -------------------------------------------------------------- Timeline -- */
.tl { position: relative; padding-left: 0; }
.tl__era { margin-bottom: 14px; }
.tl__rail {
  position: absolute;
  left: 15px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--gold), #d9822b 45%, var(--danger) 78%, #3a0f12);
  opacity: 0.4;
  border-radius: 2px;
}
.tl__list { list-style: none; margin: 0; padding: 0; position: relative; }
.tl__item { position: relative; padding: 0 0 22px 48px; }
.tl__dot {
  position: absolute;
  left: 8px; top: 26px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--bg-base);
  border: 2px solid var(--era-color, var(--gold));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--era-color, var(--gold)) 12%, transparent);
}
.tl__item[data-ceros='true'] .tl__dot::after {
  content: '';
  position: absolute; inset: 4px;
  border-radius: 50%;
  background: var(--era-color, var(--gold));
}
.tl__year {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--era-color, var(--gold));
  letter-spacing: -0.02em;
}
.tl__card {
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  padding: 16px 18px;
  transition: border-color 0.22s ease, transform 0.22s ease;
}
.tl__card:hover { border-color: var(--border-strong); transform: translateX(3px); }
.tl__title { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; margin: 2px 0 7px; }
.tl__body { color: var(--text-muted); font-size: 0.9rem; margin: 0 0 12px; }
.tl__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tl__rate {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 3px 9px;
  border-radius: 7px;
  background: rgba(224, 66, 74, 0.1);
  border: 1px solid rgba(224, 66, 74, 0.26);
  color: var(--danger-2);
}
.tl__rate--good {
  background: rgba(47, 191, 113, 0.09);
  border-color: rgba(47, 191, 113, 0.26);
  color: var(--stable);
}
.tl__src { font-size: 0.7rem; color: var(--text-dim); }

.tl__era-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 30px 0 16px;
  padding: 14px 18px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: linear-gradient(90deg, color-mix(in srgb, var(--era-color) 11%, transparent), transparent 60%), var(--bg-surface-2);
  border-left: 3px solid var(--era-color);
}
.tl__era-name { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.tl__era-range { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-dim); }

/* Medidor de ceros flotante */
.zeros-meter {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  border-radius: var(--r-md);
  border: 1px solid rgba(224, 66, 74, 0.3);
  background: color-mix(in srgb, var(--bg-elevated) 92%, transparent);
  backdrop-filter: blur(12px);
  padding: 12px 15px;
  box-shadow: 0 20px 46px -20px rgba(0, 0, 0, 0.9);
  text-align: center;
  min-width: 118px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.zeros-meter[data-visible='false'] {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}
.zeros-meter__n {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--danger-2);
  font-variant-numeric: tabular-nums;
}
.zeros-meter__l { font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); }
.zeros-meter__bar { height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); margin-top: 8px; overflow: hidden; }
.zeros-meter__fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--danger)); transition: width 0.5s ease; }

/* --------------------------------------------------------------- Tablas --- */
.table-wrap { overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--border); }
table.data { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
table.data th {
  text-align: left;
  padding: 11px 14px;
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: var(--bg-surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  position: sticky; top: 0;
}
table.data td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--text-muted); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td { background: rgba(255, 255, 255, 0.025); color: var(--text); }
table.data td.em { color: var(--text); font-weight: 500; }
table.data td.num { font-family: var(--font-mono); text-align: right; }

/* -------------------------------------------------------------- Gráficos -- */
.chart { position: relative; width: 100%; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart__legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: 0.78rem; }
.chart__legend button {
  display: inline-flex; align-items: center; gap: 7px;
  background: none; border: 0; cursor: pointer; color: var(--text-muted);
  padding: 2px 4px; border-radius: 6px;
}
.chart__legend button[data-off='true'] { opacity: 0.38; text-decoration: line-through; }
.chart__legend i { width: 11px; height: 11px; border-radius: 3px; display: block; }
.chart__tooltip {
  position: absolute;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -118%);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 0.78rem;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.9);
  transition: opacity 0.12s ease;
  white-space: nowrap;
  z-index: 5;
}
.chart__tooltip[data-show='true'] { opacity: 1; }
.chart__tooltip b { font-family: var(--font-mono); font-weight: 600; }
.chart__tooltip .tt-row { display: flex; align-items: center; gap: 8px; }
.chart__tooltip .tt-row i { width: 9px; height: 9px; border-radius: 2px; }

.axis-label { font-size: 10px; fill: var(--text-dim); font-family: var(--font-mono); }
.grid-line { stroke: rgba(255, 255, 255, 0.07); stroke-width: 1; }
.grid-line--major { stroke: rgba(255, 255, 255, 0.12); }
.series-line { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.crosshair { stroke: rgba(255, 255, 255, 0.28); stroke-width: 1; stroke-dasharray: 3 3; }

.sparkline { display: block; }

/* ---------------------------------------------------------- Esqueletos --- */
.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.055);
  color: transparent !important;
  user-select: none;
}
.skeleton::after {
  content: '';
  position: absolute; inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.09), transparent);
  animation: shimmer 1.5s infinite;
}
.skeleton--text { height: 0.85em; margin-block: 0.2em; }

/* ------------------------------------------------------------- Controles -- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); }
.input, .select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 11px;
  border: 1px solid var(--border-strong);
  background: var(--bg-surface-2);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
  appearance: none;
}
.input:focus, .select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(233, 185, 73, 0.16);
}
.select { font-family: var(--font-sans); cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%239aa3b2' stroke-width='2'%3E%3Cpath d='M3 5l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }

.range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--gold), var(--danger));
  outline: none;
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--gold);
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.55);
}
.range::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--gold);
  cursor: pointer;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  gap: 3px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--bg-surface-2);
}
.segmented button {
  padding: 7px 13px;
  border-radius: 8px;
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: background 0.16s ease, color 0.16s ease;
  white-space: nowrap;
}
.segmented button[aria-pressed='true'] { background: var(--bg-elevated); color: var(--text); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset; }
.segmented button:hover { color: var(--text); }

/* ---------------------------------------------------------------- Result -- */
.result-box {
  border-radius: var(--r-lg);
  border: 1px solid rgba(233, 185, 73, 0.24);
  background: linear-gradient(160deg, rgba(233, 185, 73, 0.07), transparent 60%), var(--bg-surface-2);
  padding: 22px;
}
.result-box--danger { border-color: rgba(224, 66, 74, 0.26); background: linear-gradient(160deg, rgba(224, 66, 74, 0.08), transparent 60%), var(--bg-surface-2); }

.kv { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px dashed var(--border); }
.kv:last-child { border-bottom: 0; }
.kv__k { font-size: 0.82rem; color: var(--text-muted); }
.kv__v { font-family: var(--font-mono); font-weight: 600; text-align: right; }
.kv__v--text { font-family: var(--font-sans); font-weight: 500; color: var(--text-muted); }

/* --------------------------------------------------------------- Footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-deep);
  padding: 52px 0 32px;
  position: relative;
  z-index: 2;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(130px, 1fr));
  gap: 30px;
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col h4 { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 12px; font-family: var(--font-sans); font-weight: 700; }
.footer-col a { display: block; padding: 4px 0; font-size: 0.86rem; color: var(--text-muted); }
.footer-col a:hover { color: var(--gold); }
.footer-legal {
  margin-top: 38px; padding-top: 22px;
  border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between;
  font-size: 0.76rem; color: var(--text-dim);
}

/* ------------------------------------------------------------------ Misc -- */
.breadcrumbs { font-size: 0.78rem; color: var(--text-dim); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.breadcrumbs a:hover { color: var(--gold); }

/* Se llama «rich-text» y no «prose» para no chocar con el plugin typography. */
.rich-text { color: var(--text-muted); font-size: 1.02rem; line-height: 1.78; }
.rich-text h2 { color: var(--text); margin: 2.2em 0 0.6em; font-size: 1.65rem; }
.rich-text h3 { color: var(--text); margin: 1.8em 0 0.5em; }
.rich-text strong { color: var(--text); font-weight: 600; }
.rich-text a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.rich-text ul, .rich-text ol { padding-left: 1.25em; }
.rich-text li { margin-bottom: 0.5em; }
.rich-text blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--gold);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.1rem;
}
.rich-text code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: rgba(255, 255, 255, 0.07);
  padding: 2px 6px;
  border-radius: 5px;
  color: var(--gold-2);
}
.rich-text table { width: 100%; border-collapse: collapse; font-size: 0.88rem; margin: 1.4em 0; }
.rich-text th, .rich-text td { border-bottom: 1px solid var(--border); padding: 9px 12px; text-align: left; }
.rich-text th { color: var(--text-dim); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; }
.rich-text td:not(:first-child) { font-family: var(--font-mono); }
.rich-text img { border-radius: var(--r-md); margin: 1.6em 0; }

.callout {
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  background: var(--bg-surface-2);
  padding: 16px 18px;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 1.5em 0;
}
.callout--danger { border-left-color: var(--danger); }
.callout strong { color: var(--text); }

.toc { position: sticky; top: calc(var(--nav-h) + 24px); font-size: 0.84rem; }
.toc a { display: block; padding: 6px 0 6px 12px; border-left: 2px solid var(--border); color: var(--text-muted); }
.toc a:hover { color: var(--text); border-left-color: var(--border-strong); }
.toc a.is-active { color: var(--gold); border-left-color: var(--gold); }

.era-legend { display: flex; flex-wrap: wrap; gap: 10px; }
.era-legend button {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.76rem; cursor: pointer; color: var(--text-muted);
}
.era-legend button[aria-pressed='true'] { color: var(--text); border-color: var(--border-strong); background: rgba(255, 255, 255, 0.08); }
.era-legend i { width: 9px; height: 9px; border-radius: 50%; }

/* Visualizador de ceros */
.zero-vis { display: flex; align-items: baseline; gap: 2px; font-family: var(--font-mono); font-size: clamp(1.1rem, 4vw, 2rem); flex-wrap: wrap; }
.zero-vis .z-kept { color: var(--text); }
.zero-vis .z-gone { color: var(--danger); opacity: 0.85; }
.zero-vis .z-gone.is-falling { animation: fall-zero 0.8s cubic-bezier(0.5, 0, 0.75, 0) forwards; }

/* Modo cartel */
.poster-mode .site-header,
.poster-mode .site-footer,
.poster-mode .zeros-meter,
.poster-mode .no-poster { display: none !important; }
.poster-mode body, .poster-mode { background: #05060a; }
.poster-mode .section { padding-block: 40px; }
