/* Página de detalle de un trámite. */
.migas { display: flex; flex-wrap: wrap; gap: var(--espacio-2); margin-bottom: var(--espacio-3); font-size: var(--texto-s); color: rgba(255, 255, 255, 0.8); }
.migas a { color: var(--white); }
.migas [aria-current] { color: rgba(255, 255, 255, 0.8); }

.detalle__rejilla { display: grid; gap: var(--espacio-5); }
.detalle h2 { font-size: 1.3rem; margin: var(--espacio-5) 0 var(--espacio-3); color: var(--blue-dark); }
.detalle__principal > h2:first-child, .detalle__principal > p + h2 { margin-top: var(--espacio-4); }
.requisitos li { display: flex; gap: var(--espacio-2); align-items: flex-start; margin-bottom: var(--espacio-2); }
.requisitos .icono { color: var(--success); flex: none; margin-top: 3px; }
.vacio, .aviso-costo { padding: var(--espacio-3); background: var(--blue-pale); border-radius: var(--radio-chico); }

.variantes { display: flex; flex-wrap: wrap; gap: var(--espacio-2); margin-bottom: var(--espacio-3); }
.variantes a { padding: 0.5rem 1rem; border: 1px solid var(--border); border-radius: 999px; color: var(--navy); font-weight: 600; font-size: var(--texto-s); text-decoration: none; }
.variantes a:hover { border-color: var(--blue); }
.variantes a[aria-current="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); }

.desglose { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--border); border-radius: var(--radio-chico); overflow: hidden; }
.desglose th, .desglose td { padding: 0.75rem 1rem; text-align: left; font-weight: 500; border-bottom: 1px solid var(--border); }
.desglose thead th { background: var(--blue-pale); font-size: var(--texto-s); color: var(--blue-dark); }
.desglose .grupo th { background: var(--blue-pale-2); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
.desglose .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.desglose small { display: block; color: var(--text-muted); font-weight: 500; }
.desglose .subtotal th, .desglose .subtotal td { font-weight: 700; }
.desglose .total th, .desglose .total td { font-size: 1.2rem; font-weight: 700; background: var(--navy); color: var(--white); border-bottom: 0; }
.desglose .pendiente { color: var(--text-muted); font-style: italic; font-weight: 600; }
.desglose .total .pendiente { color: rgba(255, 255, 255, 0.85); }
.desglose .variable td { color: var(--text-muted); font-style: italic; }
.nota { margin-top: var(--espacio-3); font-size: var(--texto-s); color: var(--text-muted); }

.detalle__lateral { align-self: start; padding: var(--espacio-4); border: 1px solid var(--border); border-radius: var(--radio); background: var(--blue-pale-2); display: grid; gap: var(--espacio-3); }
.detalle__lateral h2 { margin: 0; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (min-width: 900px) {
  .detalle__rejilla { grid-template-columns: 1fr 340px; }
  .detalle__lateral { position: sticky; top: calc(var(--alto-encabezado) + var(--espacio-3)); }
}

/* Los textos largos ("Costo total por confirmar") deben partirse en líneas, no ensanchar la tabla. */
.desglose .pendiente { white-space: normal; max-width: 11rem; }
.desglose th { overflow-wrap: anywhere; }
