/* ═══════════════════════════════════════════════
   DOMÉNICA · ENTREGABLE V.2 — COMPONENTES
   Se carga DESPUÉS de shared/entregable.css
   ═══════════════════════════════════════════════ */

/* ─── Tokens propios V.2 — solo paleta Monza ─────────────────── */
:root,
.theme-enzo {
  --insight-bg: rgba(248, 180, 217, 0.06);
  --insight-border-left: var(--accent);
  --insight-text: rgba(255, 252, 247, 0.92);
  --insight-eyebrow: var(--accent);
  --insight-closing-bg: rgba(248, 180, 217, 0.08);
  --thread-tint: rgba(248, 180, 217, 0.28);
  --estado-pendiente: #D69E2E;
  --estado-encurso: #38A169;
  --estado-evaluar: #3182CE;
  --estado-monitorear: rgba(255, 252, 247, 0.30);
  --brand-deep: #0B0B10;
}

.theme-modena {
  --insight-bg: #FBEEF4;
  --insight-border-left: var(--accent);
  --insight-text: rgba(11, 11, 16, 0.88);
  --insight-eyebrow: #B5447F;
  --insight-closing-bg: #F8DCE9;
  --thread-tint: rgba(248, 180, 217, 0.45);
  --estado-pendiente: #B07B1E;
  --estado-encurso: #2F8156;
  --estado-evaluar: #2A6BB0;
  --estado-monitorear: rgba(11, 11, 16, 0.30);
  --brand-deep: #0B0B10;
}

/* ─── Insight callout "Qué nos dice esto." ─────────────────────── */
.insight-callout {
  position: relative;
  margin: var(--space-6) 0 var(--space-8);
  padding: var(--space-6) var(--space-8);
  background: var(--insight-bg);
  border-left: 3px solid var(--insight-border-left);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--insight-text);
}

.insight-callout .insight-eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--insight-eyebrow);
  margin-bottom: var(--space-2);
}

.insight-callout p {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  font-style: italic;
  margin: 0 0 var(--space-3);
  color: var(--insight-text);
}
.insight-callout p:last-child { margin-bottom: 0; }
.insight-callout p strong { color: inherit; font-weight: 600; font-style: italic; }

.insight-callout.closing {
  background: var(--insight-closing-bg);
  border-left-width: 0;
  text-align: center;
  padding: var(--space-12) var(--space-8);
  margin-top: var(--space-12);
}
.insight-callout.closing p {
  font-family: var(--font-display);
  font-style: normal;
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.01em;
  max-width: 38em;
  margin-left: auto;
  margin-right: auto;
}
.insight-callout.closing p:last-child {
  font-size: 1.05rem;
  color: var(--insight-eyebrow);
  margin-top: var(--space-6);
}

.insight-callout.muted {
  background: var(--surface-footer);
  border-left-color: var(--text-muted);
}
.insight-callout.muted .insight-eyebrow { color: var(--text-muted); }
.insight-callout.muted p { font-style: normal; color: var(--text-secondary); }

/* ─── Vuelo de pájaro: thread highlight + toggle ────────────────── */
.thread {
  background: transparent;
  transition: background 0.35s ease;
}
html.thread-on .thread {
  background: linear-gradient(transparent 60%, var(--thread-tint) 60%);
  padding: 0 0.05em;
  border-radius: 2px;
}

.thread-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: var(--transition);
}
.thread-toggle:hover {
  color: var(--text-primary);
  border-color: var(--accent);
}
.thread-toggle[aria-pressed="true"] {
  background: var(--accent);
  color: #0B0B10;
  border-color: var(--accent);
}
.thread-toggle .thread-icon {
  font-size: 0.9rem;
  line-height: 1;
}

/* ─── Phase strip / Horizon strip (3 cards horizontales) ──────── */
.phase-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin: var(--space-8) 0;
  position: relative;
}

.phase-strip .phase-card {
  position: relative;
  padding: var(--space-6);
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
  display: block;
  text-decoration: none;
  color: inherit;
}

.phase-strip .phase-card.current {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-glow);
}

.phase-strip a.phase-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.phase-strip .phase-num {
  display: block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.phase-strip .phase-card.current .phase-num {
  color: var(--accent);
}

.phase-strip .phase-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: var(--space-1);
  color: var(--text-primary);
}

.phase-strip .phase-range {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
}

.phase-strip .phase-desc {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}

@media (max-width: 768px) {
  .phase-strip { grid-template-columns: 1fr; }
}

@media print {
  .phase-strip { grid-template-columns: repeat(3, 1fr); }
  .phase-strip .phase-card { break-inside: avoid; }
}

/* ─── Legend box (Parte 2) ────────────────────────────────────── */
.legend-box {
  margin: var(--space-4) 0 var(--space-6);
  padding: var(--space-4) var(--space-5);
  background: var(--surface-footer);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.legend-box .legend-eyebrow {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}
.legend-box p { margin: var(--space-2) 0; font-size: 0.88rem; line-height: 1.6; }
.legend-box p:last-child { margin-bottom: 0; }
.legend-box .estado-pill {
  margin-right: var(--space-2);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  vertical-align: middle;
}
.legend-box .estado-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ─── Gap matrix (matrices por eje de Parte 2) ────────────────── */
.gap-matrix {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-3) 0 var(--space-8);
  font-size: 0.92rem;
}

.gap-matrix thead th {
  text-align: left;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: var(--space-3) var(--space-3);
  border-bottom: 1px solid var(--border);
  background: var(--table-header-bg);
}

.gap-matrix tbody tr.matrix-row {
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.18s ease;
}
.gap-matrix tbody tr.matrix-row:nth-child(4n+1) {
  background: var(--surface-footer);
}
.gap-matrix tbody tr.matrix-row:hover {
  background: var(--surface-card-hover);
}
.gap-matrix tbody td {
  padding: var(--space-3) var(--space-3);
  vertical-align: top;
  line-height: 1.5;
}

.gap-matrix td.estado-cell {
  position: relative;
  padding-left: calc(var(--space-3) + 8px);
}
.gap-matrix td.estado-cell::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--estado-monitorear);
}
.gap-matrix tr[data-estado="pendiente"] td.estado-cell::before { background: var(--estado-pendiente); }
.gap-matrix tr[data-estado="en-curso"] td.estado-cell::before,
.gap-matrix tr[data-estado="en-proceso"] td.estado-cell::before { background: var(--estado-encurso); }
.gap-matrix tr[data-estado="por-evaluar"] td.estado-cell::before { background: var(--estado-evaluar); }
.gap-matrix tr[data-estado="por-monitorear"] td.estado-cell::before { background: var(--estado-monitorear); }

.matrix-badge {
  display: inline-block;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  white-space: nowrap;
  text-transform: uppercase;
}
.matrix-badge.hab {
  background: var(--accent);
  color: #0B0B10;
}
.matrix-badge.fort {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-strong);
}

.estado-pill {
  display: inline-block;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: var(--surface-footer);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  white-space: nowrap;
}

.gap-matrix tr.matrix-detail {
  display: none;
  background: var(--surface-card);
}
.gap-matrix tr.matrix-detail.open { display: table-row; }
.gap-matrix tr.matrix-detail td {
  padding: var(--space-4) var(--space-6);
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-secondary);
  border-left: 4px solid var(--accent);
}
.gap-matrix tr.matrix-detail strong {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-right: var(--space-2);
}

@media (max-width: 768px) {
  .gap-matrix thead { display: none; }
  .gap-matrix, .gap-matrix tbody { display: block; }
  .gap-matrix tr { display: block; }
  .gap-matrix td { display: block; padding: var(--space-1) 0; border: none; }
  .gap-matrix tr.matrix-row {
    padding: var(--space-4);
    margin-bottom: var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
  }
  .gap-matrix td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 2px;
  }
  .gap-matrix td.estado-cell {
    padding-left: var(--space-3);
    border-left: 4px solid var(--estado-monitorear);
    margin-bottom: var(--space-2);
  }
  .gap-matrix tr[data-estado="pendiente"] td.estado-cell { border-left-color: var(--estado-pendiente); }
  .gap-matrix tr[data-estado="en-curso"] td.estado-cell,
  .gap-matrix tr[data-estado="en-proceso"] td.estado-cell { border-left-color: var(--estado-encurso); }
  .gap-matrix tr[data-estado="por-evaluar"] td.estado-cell { border-left-color: var(--estado-evaluar); }
  .gap-matrix td.estado-cell::before { display: none; }
}

@media print {
  .gap-matrix tr.matrix-detail { display: table-row; }
  .gap-matrix tbody tr.matrix-row { break-inside: avoid; }
}

/* ─── Matrix filters (chips) ──────────────────────────────────── */
.matrix-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  margin: var(--space-4) 0 var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--surface-footer);
  border-radius: var(--radius-sm);
  align-items: center;
}

.matrix-filters .filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.matrix-filters .filter-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-right: var(--space-1);
}

.matrix-filters .filter-chip {
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.matrix-filters .filter-chip:hover {
  color: var(--text-primary);
  border-color: var(--accent);
}
.matrix-filters .filter-chip[aria-pressed="true"] {
  background: var(--accent);
  color: #0B0B10;
  border-color: var(--accent);
}

@media print {
  .matrix-filters { display: none; }
}

/* ─── Threshold cards (Umbrales del reto 5.4) ─────────────────── */
.threshold-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  align-items: end;
  margin: var(--space-8) 0 var(--space-6);
}

.threshold-cards .threshold-card {
  position: relative;
  padding: calc(var(--space-6) + 10px) var(--space-6) var(--space-8);
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
}

.threshold-cards .threshold-card:nth-child(2) { padding-top: calc(var(--space-6) + 26px); }
.threshold-cards .threshold-card:nth-child(3) { padding-top: calc(var(--space-6) + 42px); }

.threshold-cards .threshold-num {
  position: absolute;
  top: -14px;
  left: var(--space-6);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: #0B0B10;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
}

.threshold-cards .threshold-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--text-primary);
}

.threshold-cards .threshold-amount {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent);
  margin-bottom: var(--space-3);
  line-height: 1.1;
}

.threshold-cards .threshold-meaning {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}

@media (max-width: 768px) {
  .threshold-cards { grid-template-columns: 1fr; align-items: stretch; }
  .threshold-cards .threshold-card:nth-child(2),
  .threshold-cards .threshold-card:nth-child(3) { padding-top: calc(var(--space-6) + 10px); }
}

/* ─── Tejado semáforo (sección 8.4) ───────────────────────────── */
.tejado-semaforo {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin: var(--space-6) 0;
}

.tejado-semaforo .sem-card {
  padding: var(--space-6);
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
}

.tejado-semaforo .sem-disc {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  margin-bottom: var(--space-4);
  display: block;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.04);
}
.tejado-semaforo .sem-card.verde .sem-disc { background: #38A169; }
.tejado-semaforo .sem-card.amarillo .sem-disc { background: #D69E2E; }
.tejado-semaforo .sem-card.rojo .sem-disc { background: #C53030; }

.tejado-semaforo .sem-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}
.tejado-semaforo .sem-card.verde .sem-title { color: #38A169; }
.tejado-semaforo .sem-card.amarillo .sem-title { color: #D69E2E; }
.tejado-semaforo .sem-card.rojo .sem-title { color: #C53030; }

.tejado-semaforo .sem-body {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}

@media (max-width: 768px) {
  .tejado-semaforo { grid-template-columns: 1fr; }
}

/* ─── Risk table badges (sección 7) ───────────────────────────── */
.risk-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.risk-badge.prob-probable { background: rgba(214, 158, 46, 0.18); color: #D69E2E; }
.risk-badge.prob-posible  { background: rgba(49, 130, 206, 0.18); color: #3182CE; }
.risk-badge.nivel-alto    { background: rgba(197, 48, 48, 0.18); color: #C53030; }
.risk-badge.nivel-medio   { background: rgba(214, 158, 46, 0.18); color: #D69E2E; }
.risk-badge.nivel-bajo    { background: rgba(56, 161, 105, 0.18); color: #38A169; }

/* ─── Objections accordion (sección 9.2) ──────────────────────── */
.objections-accordion {
  margin: var(--space-6) 0;
}

.objections-accordion details {
  border-bottom: 1px solid var(--border);
  padding: var(--space-3) 0;
}
.objections-accordion details:first-of-type {
  border-top: 1px solid var(--border);
}

.objections-accordion summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-primary);
}
.objections-accordion summary::-webkit-details-marker { display: none; }
.objections-accordion summary::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  flex-shrink: 0;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--accent);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
}
.objections-accordion details[open] summary::before {
  content: "−";
  background: var(--accent);
  color: #0B0B10;
  border-color: var(--accent);
}

.objections-accordion .objection-response {
  margin: var(--space-3) 0 var(--space-2) calc(1.4rem + var(--space-3));
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ─── Tablas de datos genéricas (TradeMap) ────────────────────── */
.table-wrap {
  overflow-x: auto;
  margin: var(--space-4) 0 var(--space-3);
  border-radius: var(--radius-sm);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.data-table thead th {
  text-align: left;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: var(--space-3) var(--space-3);
  background: var(--table-header-bg);
  border-bottom: 1px solid var(--border);
}
.data-table tbody td {
  padding: var(--space-3) var(--space-3);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.55;
}
.data-table tbody tr:nth-child(even) td { background: var(--surface-footer); }
.data-table tbody tr:last-child td { border-bottom: 1px solid var(--border-strong); }
.data-table tbody td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}
.table-caption {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: var(--space-4) 0 0;
}
.table-source {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  margin: var(--space-2) 0 var(--space-6);
}

/* ─── Blue Ocean figure ───────────────────────────────────────── */
.blue-ocean-figure {
  margin: var(--space-6) 0;
  padding: var(--space-4);
  background: #FFFCF7;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.blue-ocean-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}
.theme-modena .blue-ocean-figure { background: #FFFCF7; }

/* ─── Part subtitle ───────────────────────────────────────────── */
.part-banner .part-subtitle {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin-top: var(--space-2);
  font-style: italic;
}

/* ─── Sticky bar: SIEMPRE visible, controles a la mano ──────── */
.sticky-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 0.65rem clamp(1rem, 3vw, 2rem);
  background: rgba(11, 11, 16, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 252, 247, 0.08);
  color: #FFFCF7;
}
body { padding-top: 0 !important; }
/* La sticky bar siempre presente — toolbar del hero se vuelve redundante */
.hero.hero-brand .hero-toolbar,
.hero-toolbar { display: none !important; }
.hero.hero-brand { padding-top: clamp(5rem, 9vh, 7rem); }
.sticky-bar .sb-left {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.sticky-bar .sb-powered {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 252, 247, 0.10);
  background: rgba(255, 252, 247, 0.04);
  opacity: 0.65;
  transition: var(--transition);
}
.sticky-bar .sb-powered:hover {
  opacity: 1;
  border-color: var(--accent);
  background: rgba(248, 180, 217, 0.08);
}
.sticky-bar .sb-powered .monza-wordmark-inline {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0;
  color: #FFFCF7;
  line-height: 1;
}
.sticky-bar .sb-powered .helmet {
  width: 11px;
  height: 11px;
  margin: 0 1px;
  vertical-align: middle;
}
.sticky-bar .sb-breadcrumb {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: rgba(255, 252, 247, 0.85);
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.5rem;
}
.sticky-bar .sb-breadcrumb .bc-parent {
  color: rgba(255, 252, 247, 0.55);
  text-decoration: none;
  transition: var(--transition);
}
.sticky-bar .sb-breadcrumb .bc-parent:hover { color: #FFFCF7; }
.sticky-bar .sb-breadcrumb .bc-sep {
  color: rgba(255, 252, 247, 0.30);
  font-size: 0.9rem;
}
.sticky-bar .sb-breadcrumb .bc-current { color: var(--accent); font-weight: 700; }

/* Pajarito SVG — silueta tipo swallow, toma color vía currentColor */
.thread-toggle .bird-icon {
  width: 20px; height: 14px;
  display: inline-block;
  color: var(--accent);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}
.thread-toggle:hover .bird-icon { transform: translateY(-2px) rotate(-4deg); }
.thread-toggle[aria-pressed="true"] .bird-icon { color: #0B0B10; }
.sticky-bar .sb-controls { display: inline-flex; align-items: center; gap: 0.45rem; }
.sticky-bar .sb-controls .thread-toggle,
.sticky-bar .sb-controls .print-button {
  padding: 0.4rem 0.9rem;
  font-size: 0.7rem;
  border: 1px solid rgba(255, 252, 247, 0.16);
  background: transparent;
  color: rgba(255, 252, 247, 0.85);
  border-radius: 999px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.sticky-bar .sb-controls .thread-toggle:hover,
.sticky-bar .sb-controls .print-button:hover {
  background: rgba(255, 252, 247, 0.10);
  border-color: var(--accent);
  color: #FFFCF7;
}
.sticky-bar .sb-controls .thread-toggle[aria-pressed="true"] {
  background: var(--accent);
  color: #0B0B10;
  border-color: var(--accent);
}
.sticky-bar .sb-controls .theme-toggle {
  display: inline-flex;
  background: rgba(255, 252, 247, 0.08);
  border-radius: 999px;
  padding: 0.12rem;
  border: 1px solid rgba(255, 252, 247, 0.10);
}
.sticky-bar .sb-controls .theme-toggle span {
  padding: 0.28rem 0.7rem;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: var(--font-body);
  font-weight: 600;
  color: rgba(255, 252, 247, 0.6);
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
}
.sticky-bar .sb-controls .theme-toggle span.active {
  background: rgba(255, 252, 247, 0.18);
  color: #FFFCF7;
}
@media (max-width: 768px) {
  .sticky-bar { padding: 0.5rem 0.75rem; gap: 0.5rem; }
  .sticky-bar .sb-breadcrumb .bc-text { display: none; }
  .sticky-bar .sb-controls .thread-toggle span:not(.thread-icon) { display: none; }
}
@media print { .sticky-bar { display: none !important; } }

/* ─── Hero edge-to-edge potente ──────────────────────────────── */
/* Limpiamos el header/powered-by viejo que ya no usamos */
.site-header, .powered-by { display: none !important; }
body { padding-top: 0 !important; }

.hero.hero-brand {
  background: #0B0B10;
  height: 100vh;
  min-height: 640px;
  max-height: 980px;
  padding: clamp(5rem, 8vh, 6.5rem) clamp(1.5rem, 5vw, 5rem) clamp(1.5rem, 4vh, 2.75rem);
  position: relative;
  overflow: hidden;
  color: #FFFCF7;
  display: flex;
  flex-direction: column;
}
/* Modena: hero invertido en cream con texto oscuro */
.theme-modena .hero.hero-brand {
  background: #F5F0EB;
  color: #0B0B10;
}
.theme-modena .hero.hero-brand .eyebrow,
.theme-modena .hero.hero-brand .cover-arrow,
.theme-modena .hero.hero-brand h1,
.theme-modena .hero.hero-brand .cover-tagline {
  color: #0B0B10 !important;
}
.theme-modena .hero.hero-brand .hero-subtitle {
  color: rgba(11, 11, 16, 0.55);
}
.theme-modena .hero.hero-brand .hero-partners {
  border-top-color: rgba(11, 11, 16, 0.10);
}
.theme-modena .hero.hero-brand .hero-partners img {
  filter: none;
  opacity: 0.7;
}
/* Parte 2 en Modena: negro Enzo para contraste fuerte sobre el cream */
.theme-modena .hero.hero-brand .cover-parts a:nth-child(2) {
  background: linear-gradient(135deg, #0B0B10 0%, #1A1A24 100%);
  color: #FFFCF7;
  border: none;
}
.theme-modena .hero.hero-brand .cover-parts a:nth-child(2) .cover-part-num {
  color: rgba(255, 252, 247, 0.55);
}
.theme-modena .hero.hero-brand .cover-parts a:nth-child(2) .cover-part-title {
  color: #FFFCF7;
}
.theme-modena .hero.hero-brand .cover-parts a:nth-child(2)::after {
  background: var(--accent);
  color: #0B0B10;
}
.hero.hero-brand::before { display: none; }
.hero.hero-brand::after { display: none; }
.hero.hero-brand > div {
  position: relative;
  z-index: 2;
  max-width: 1320px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
  gap: clamp(1rem, 2vh, 2rem);
}

/* Toolbar flotante dentro del hero: breadcrumb a la izq, controles a la der */
.hero.hero-brand .hero-toolbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: clamp(1.25rem, 2vw, 1.75rem) clamp(1.5rem, 6vw, 6rem);
}
.hero.hero-brand .hero-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 252, 247, 0.75);
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.55rem 0.95rem;
  border: 1px solid rgba(255, 252, 247, 0.18);
  border-radius: 999px;
  background: rgba(11, 11, 16, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: var(--transition);
}
.hero.hero-brand .hero-breadcrumb:hover {
  color: #FFFCF7;
  border-color: var(--accent);
}
.hero.hero-brand .hero-breadcrumb .bc-back {
  font-size: 1rem;
  color: var(--accent);
}
.hero.hero-brand .hero-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.5rem;
  background: rgba(11, 11, 16, 0.3);
  border: 1px solid rgba(255, 252, 247, 0.18);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.hero.hero-brand .hero-controls .thread-toggle,
.hero.hero-brand .hero-controls .print-button {
  padding: 0.45rem 0.95rem;
  font-size: 0.75rem;
  border: none;
  background: transparent;
  color: rgba(255, 252, 247, 0.85);
  border-radius: 999px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.hero.hero-brand .hero-controls .thread-toggle:hover,
.hero.hero-brand .hero-controls .print-button:hover {
  background: rgba(255, 252, 247, 0.12);
  color: #FFFCF7;
}
.hero.hero-brand .hero-controls .thread-toggle[aria-pressed="true"] {
  background: var(--accent);
  color: #0B0B10;
}
.hero.hero-brand .hero-controls .theme-toggle {
  display: inline-flex;
  background: rgba(255, 252, 247, 0.08);
  border-radius: 999px;
  padding: 0.15rem;
  border: none;
}
.hero.hero-brand .hero-controls .theme-toggle span {
  padding: 0.35rem 0.85rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font-body);
  font-weight: 600;
  color: rgba(255, 252, 247, 0.6);
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
}
.hero.hero-brand .hero-controls .theme-toggle span.active,
.hero.hero-brand .hero-controls .theme-toggle span[data-theme]:hover {
  background: rgba(255, 252, 247, 0.18);
  color: #FFFCF7;
}

@media (max-width: 768px) {
  .hero.hero-brand .hero-toolbar { flex-direction: column; align-items: stretch; padding: var(--space-3) var(--space-4); }
  .hero.hero-brand .hero-controls { flex-wrap: wrap; justify-content: center; }
  .hero.hero-brand .hero-breadcrumb .bc-text { display: none; }
}
.hero.hero-brand::before {
  content: "";
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(70% 55% at 100% 0%, rgba(248, 180, 217, 0.55) 0%, transparent 55%),
    radial-gradient(80% 65% at 0% 100%, rgba(201, 165, 91, 0.35) 0%, transparent 55%),
    radial-gradient(60% 50% at 50% 50%, rgba(122, 88, 158, 0.4) 0%, transparent 60%),
    linear-gradient(155deg, #3D2255 0%, #0B0B10 50%, #0B0B10 100%);
}
.hero.hero-brand::after {
  display: none;
}
.hero.hero-brand > div {
  position: relative;
  z-index: 2;
  max-width: 1320px;
  margin: 0 auto;
  width: 100%;
}
/* Bloque texto centrado verticalmente, cards al final */
.hero.hero-brand .hero-top { display: flex; flex-direction: column; }
.hero.hero-brand .cover-arrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 252, 247, 0.7);
  margin: 0 0 clamp(0.5rem, 1.5vh, 1rem);
}
.hero.hero-brand .cover-arrow strong {
  color: var(--accent);
  font-weight: 700;
}
.hero.hero-brand .eyebrow {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent) !important;
  margin: 0 0 clamp(0.5rem, 1vh, 0.75rem);
}
.hero.hero-brand h1 {
  font-size: clamp(3.5rem, 11vh, 8rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  margin: 0 0 clamp(0.5rem, 1.5vh, 1rem);
  color: #FFFCF7;
  font-weight: 700;
}
.hero.hero-brand .cover-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.2vh, 1.5rem);
  font-style: normal;
  font-weight: 500;
  color: #FFFCF7;
  margin: 0 0 clamp(0.4rem, 1vh, 0.75rem);
  max-width: 760px;
  line-height: 1.25;
}
.hero.hero-brand .hero-subtitle {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: rgba(255, 252, 247, 0.6);
  margin: 0;
  max-width: 760px;
  letter-spacing: 0.02em;
  line-height: 1.5;
}

/* Cover-parts: dos tarjetas compactas pero presentes */
.hero.hero-brand .cover-parts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.75rem, 1.5vw, 1.5rem);
  max-width: 100%;
  margin-top: 0;
}
.hero.hero-brand .cover-parts a {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: var(--space-4);
  padding: clamp(1.25rem, 2.5vh, 1.85rem) clamp(1.25rem, 2vw, 2rem);
  border-radius: var(--radius);
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  min-height: clamp(120px, 16vh, 160px);
}
.hero.hero-brand .cover-parts a:nth-child(1) {
  background: linear-gradient(135deg, #F8B4D9 0%, #E899C7 100%);
  color: #0B0B10;
}
.hero.hero-brand .cover-parts a:nth-child(2) {
  background: linear-gradient(135deg, #FFFCF7 0%, #F2ECE3 100%);
  color: #0B0B10;
  border: 1px solid rgba(248, 180, 217, 0.4);
}
.hero.hero-brand .cover-parts a::after {
  content: "→";
  position: absolute;
  bottom: clamp(1.25rem, 2.5vh, 1.85rem);
  right: clamp(1.25rem, 2vw, 2rem);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #0B0B10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: #FFFCF7;
  transition: transform 0.25s ease, background 0.25s ease;
  z-index: 2;
}
.hero.hero-brand .cover-parts a::before { display: none; }
.hero.hero-brand .cover-parts a:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px -16px rgba(0, 0, 0, 0.5);
}
.hero.hero-brand .cover-parts a:hover::after {
  transform: translateX(4px);
}
.hero.hero-brand .cover-parts .cover-part-num {
  display: block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(42, 27, 61, 0.65);
  margin-bottom: var(--space-3);
}
.hero.hero-brand .cover-parts .cover-part-title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  font-weight: 700;
  line-height: 1.15;
  color: #0B0B10;
  display: block;
  letter-spacing: -0.01em;
  max-width: 80%;
}

.hero.hero-brand .hero-partners {
  margin-top: clamp(2.5rem, 4vw, 4rem);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255, 252, 247, 0.15);
  display: flex;
  gap: clamp(2rem, 4vw, 4rem);
  flex-wrap: wrap;
  align-items: center;
}
.hero.hero-brand .hero-partners img {
  height: 28px;
  opacity: 0.85;
  filter: brightness(0) invert(1);
}

@media (max-width: 768px) {
  .hero.hero-brand .cover-parts { grid-template-columns: 1fr; }
  .hero.hero-brand .cover-parts a { min-height: 160px; }
}

/* ─── Intro "Sobre este documento": dos bloques con presencia ── */
.intro-prologue-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
  max-width: 1320px;
  margin: 0 auto;
}
.intro-prologue-grid .intro-main {
  padding-top: var(--space-4);
}
.intro-prologue-grid .intro-main h2 {
  font-size: clamp(2.25rem, 3.8vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 var(--space-8);
  color: var(--text-primary);
}
.intro-prologue-grid .intro-main > p {
  font-size: 1.1rem;
  line-height: 1.75;
  margin: 0 0 var(--space-6);
  color: var(--text-primary);
  max-width: 60ch;
}
.intro-prologue-grid .intro-main > p:last-child { margin-bottom: 0; }
.intro-prologue-grid .intro-main > p strong { color: var(--text-primary); font-weight: 600; }

/* Sidebar con presencia: fondo color, borde grueso, tipografía grande */
.intro-prologue-grid .intro-side {
  position: sticky;
  top: 100px;
  padding: clamp(1.75rem, 2.5vw, 2.5rem);
  background: linear-gradient(160deg, #0B0B10 0%, #0B0B10 100%);
  border: none;
  border-radius: var(--radius-lg);
  color: #FFFCF7;
  box-shadow: 0 24px 48px -20px rgba(42, 27, 61, 0.35);
  position: relative;
  overflow: hidden;
}
.intro-prologue-grid .intro-side::before {
  content: "";
  position: absolute;
  top: -40%; right: -30%;
  width: 70%; height: 70%;
  background: radial-gradient(circle, rgba(248, 180, 217, 0.35) 0%, transparent 70%);
  z-index: 0;
}
.intro-prologue-grid .intro-side > * { position: relative; z-index: 1; }

.intro-prologue-grid .intro-side h3 {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.3vw, 1.25rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 var(--space-5);
  line-height: 1.2;
}
.intro-prologue-grid .intro-side ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.intro-prologue-grid .intro-side ul li {
  position: relative;
  padding: var(--space-4) 0 var(--space-4) var(--space-6);
  border-bottom: 1px solid rgba(255, 252, 247, 0.10);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(255, 252, 247, 0.92);
}
.intro-prologue-grid .intro-side ul li strong {
  color: var(--accent);
  font-weight: 600;
}
.intro-prologue-grid .intro-side ul li::before {
  content: "→";
  position: absolute;
  left: 0; top: var(--space-4);
  color: var(--accent);
  font-weight: 700;
  font-family: var(--font-display);
}
.intro-prologue-grid .intro-side ul li:last-child { border-bottom: none; }

.intro-prologue-grid .intro-eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #FFFCF7;
  background: var(--accent);
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  margin-bottom: var(--space-4);
}

@media (max-width: 900px) {
  .intro-prologue-grid { grid-template-columns: 1fr; }
  .intro-prologue-grid .intro-side { position: static; }
}

/* ─── Footer mejorado con powered-by ────────────────────────── */
.site-footer .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  max-width: 1320px;
  margin: 0 auto;
  padding: var(--space-6) clamp(1.5rem, 6vw, 6rem);
}
.site-footer .footer-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.site-footer .footer-powered {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: var(--transition);
}
.site-footer .footer-powered:hover {
  color: var(--text-primary);
  border-color: var(--accent);
}
.site-footer .footer-powered .powered-label {
  opacity: 0.7;
}
.site-footer .footer-powered .monza-wordmark-inline {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0;
}
.site-footer .footer-powered .monza-wordmark-inline .helmet {
  width: 14px; height: 14px;
  margin: 0 1px;
}
.site-footer .footer-powered .powered-arrow {
  color: var(--accent);
  font-weight: 700;
}

/* ─── Gap matrix: dar aire a las celdas y evitar saltos feos ─── */
table.gap-matrix { table-layout: fixed !important; width: 100%; }
table.gap-matrix col.col-opp        { width: auto; }
table.gap-matrix col.col-tipo       { width: 10rem; }
table.gap-matrix col.col-estado     { width: 8rem; }
table.gap-matrix col.col-resp       { width: 14rem; }
table.gap-matrix col.col-horiz      { width: 11rem; }

.gap-matrix tbody td {
  padding: var(--space-4) var(--space-3);
  vertical-align: top;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
/* Horizonte (última col) y Estado: una sola línea siempre */
.gap-matrix tbody tr.matrix-row td:nth-child(5) {
  white-space: nowrap !important;
}
.gap-matrix tbody tr.matrix-row td:nth-child(3) {
  white-space: nowrap !important;
}
/* La Oportunidad y Responsable wrappean naturalmente */
.gap-matrix tbody tr.matrix-row td:nth-child(1),
.gap-matrix tbody tr.matrix-row td:nth-child(4) {
  white-space: normal !important;
}
/* Pills no rompen */
.estado-pill, .matrix-badge { white-space: nowrap; }

/* Mobile: tabla colapsa, sin column widths */
@media (max-width: 768px) {
  table.gap-matrix { table-layout: auto !important; }
  .gap-matrix tbody tr.matrix-row td { white-space: normal !important; }
}

/* ─── Threshold cards: presencia premium en Modena ────────────── */
.theme-modena .threshold-cards .threshold-card {
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.65) 0%, rgba(244, 241, 234, 0.95) 100%);
  border-color: rgba(11, 11, 16, 0.10);
  box-shadow: 0 1px 0 rgba(11, 11, 16, 0.04), 0 18px 32px -22px rgba(11, 11, 16, 0.18);
}
.threshold-cards .threshold-amount {
  font-size: 1.65rem;
  line-height: 1.15;
}
.threshold-cards .threshold-meaning {
  margin-top: var(--space-2);
}

/* ─── Phase strip / Horizon strip: presencia premium ───────────── */
.theme-modena .phase-strip .phase-card {
  background: rgba(255, 252, 247, 0.7);
  border-color: rgba(11, 11, 16, 0.10);
  box-shadow: 0 1px 0 rgba(11, 11, 16, 0.04), 0 18px 32px -22px rgba(11, 11, 16, 0.18);
}
.theme-modena .phase-strip .phase-card.current {
  background: linear-gradient(180deg, rgba(248, 180, 217, 0.10) 0%, rgba(255, 252, 247, 0.85) 100%);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(248, 180, 217, 0.4), 0 24px 40px -22px rgba(248, 180, 217, 0.5);
}

/* ─── Tejado semáforo: tarjetas premium en Modena ──────────────── */
.theme-modena .tejado-semaforo .sem-card {
  background: rgba(255, 252, 247, 0.85);
  border-color: rgba(11, 11, 16, 0.10);
  box-shadow: 0 18px 32px -22px rgba(11, 11, 16, 0.18);
}

/* ─── Print: portada limpia + saltos de página + tema claro ───── */
@page {
  size: A4;
  margin: 18mm 14mm;
}

@media print {
  /* Forzar tema claro independiente del toggle */
  html, html.theme-enzo, html.theme-modena {
    background: #FFFFFF !important;
    color: #0B0B10 !important;
  }
  html.theme-enzo { --bg: #FFFFFF; --text-primary: #0B0B10; --text-secondary: rgba(11,11,16,0.65); --text-muted: rgba(11,11,16,0.45); --border: rgba(11,11,16,0.10); --border-strong: rgba(11,11,16,0.16); --surface-card: #FBF7F1; --surface-card-hover: #FBF7F1; --surface-footer: rgba(11,11,16,0.03); --table-header-bg: rgba(11,11,16,0.04); --insight-bg: #F4F1EA; --insight-text: rgba(11,11,16,0.88); --insight-eyebrow: #8A6A2E; --insight-closing-bg: #EFE8D6; --thread-tint: rgba(201,165,91,0.32); }

  html.thread-on .thread { background: transparent; }
  .thread-toggle,
  .theme-toggle,
  .print-button,
  .powered-by,
  .site-header .breadcrumb,
  .header-actions { display: none !important; }

  body { background: #FFFFFF !important; }

  /* Hero como portada de PDF: una página completa, foto + título */
  .hero {
    min-height: auto;
    height: 240mm;
    page-break-after: always;
    break-after: page;
    padding: 24mm 18mm;
    color: #FFFCF7;
  }
  .hero::after {
    background: linear-gradient(180deg, rgba(11,11,16,0.55) 0%, rgba(11,11,16,0.35) 50%, rgba(11,11,16,0.80) 100%) !important;
  }
  .hero h1, .hero .cover-tagline, .hero .hero-subtitle,
  .hero .cover-arrow, .hero .eyebrow,
  .hero .cover-parts .cover-part-title { color: #FFFCF7 !important; }
  .hero .cover-parts a { background: rgba(255,252,247,0.12) !important; border-color: rgba(255,252,247,0.30) !important; color: #FFFCF7 !important; }
  .hero .hero-partners img { filter: brightness(0) invert(1) !important; }

  /* La portada es UNA página: encogemos los tipos un poco */
  .hero h1 { font-size: 4rem; }
  .hero .cover-tagline { font-size: 1.25rem; }
  .hero .hero-subtitle { font-size: 0.95rem; }

  /* Layout: TOC fuera, contenido a ancho completo */
  .deliverable-layout { display: block !important; }
  .deliverable-toc { display: none !important; }
  .deliverable-body { width: 100% !important; }
  .container, .container-narrow { max-width: 100% !important; padding-left: 0 !important; padding-right: 0 !important; }

  /* Salto de página antes de cada Parte y antes del Cierre */
  .part-banner { page-break-before: always; break-before: page; padding: 12mm 0 6mm; }
  #cierre { page-break-before: always; break-before: page; }

  /* Secciones evitan partirse a la mitad */
  .doc-section { page-break-inside: avoid; break-inside: avoid; }
  .doc-section-header, .doc-subsection { page-break-after: avoid; break-after: avoid; }

  /* Tarjetas y matrices no se parten */
  .phase-strip, .threshold-cards, .tejado-semaforo { page-break-inside: avoid; break-inside: avoid; }
  .phase-strip .phase-card, .threshold-cards .threshold-card, .tejado-semaforo .sem-card { break-inside: avoid; }
  .insight-callout { break-inside: avoid; page-break-inside: avoid; }

  /* Matrices y tablas: mantener filas juntas */
  .gap-matrix tr.matrix-row, .gap-matrix tr.matrix-detail { break-inside: avoid; }
  .data-table tr { break-inside: avoid; }
  .gap-matrix tr.matrix-detail { display: table-row !important; }
  .gap-matrix tr.matrix-detail td { display: table-cell !important; }

  /* Acordeón abierto en print */
  .objections-accordion details { padding: var(--space-2) 0; break-inside: avoid; }
  .objections-accordion details[open] summary::before,
  .objections-accordion summary::before { display: none; }
  .objections-accordion .objection-response { margin-left: 0; }
  .objections-accordion details[open], .objections-accordion details { display: block; }
  .objections-accordion details summary { font-weight: 700; }

  /* Imprimir con colores ON */
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

  /* Footer mini */
  .site-footer { text-align: center; padding: var(--space-4) 0; border-top: 1px solid rgba(11,11,16,0.10); }
  .site-footer .footer-meta { font-size: 0.7rem; color: rgba(11,11,16,0.5); }

  /* Filters bar no en print */
  .matrix-filters { display: none !important; }

  /* Mantener semáforo en color */
  .tejado-semaforo .sem-card.verde .sem-disc { background: #38A169 !important; }
  .tejado-semaforo .sem-card.amarillo .sem-disc { background: #D69E2E !important; }
  .tejado-semaforo .sem-card.rojo .sem-disc { background: #C53030 !important; }
}

