/* ---------- Tarjetas de opción (perfil, campus) ---------- */
.option-grid {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 480px) {
  .option-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}
.option-card {
  min-width: 0;
  position: relative;
  text-align: left;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  transition:
    transform var(--dur-fast) var(--ease-out),
    border-color var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out),
    background var(--dur) var(--ease-out);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
@media (hover: hover) {
  .option-card:hover {
    border-color: var(--ceu-blue-600);
    box-shadow: var(--shadow-md);
  }
}
.option-card:active {
  transform: scale(0.99);
}
.option-card:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}
.option-card[aria-pressed='true'] {
  border-color: var(--ceu-blue);
  background: var(--surface-2);
  box-shadow: var(--shadow-md);
}
.option-card[aria-pressed='true']::after {
  content: '✓';
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  width: 26px;
  height: 26px;
  border-radius: var(--r-full);
  background: var(--ceu-blue);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: var(--fs-xs);
  font-weight: 700;
  animation: pop var(--dur) var(--ease-out) both;
}
@keyframes pop {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
.option-card .oc-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: var(--ceu-blue-100);
  color: var(--ceu-blue-700);
  display: grid;
  place-items: center;
  margin-bottom: var(--sp-2);
}
.option-card h2,
.option-card .campus-titulo {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--ceu-blue-800);
}
.campus-titulo {
  display: block;
}
.option-card p {
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

/* Tarjetas de campus: nombre arriba, foto debajo */
.campus-card {
  padding: var(--sp-4);
  gap: var(--sp-3);
  overflow: hidden;
}
.perfil-pregunta {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  color: var(--ceu-navy);
}
.perfil-card {
  display: block;
  position: relative;
  width: 100%;
  justify-self: center;
  aspect-ratio: 16 / 10; /* en móvil las dos opciones se ven a la vez */
  padding: 0;
  overflow: hidden;
}
.campus-card .campus-titulo {
  padding-right: 32px; /* espacio para el check de selección */
  line-height: 1.25;
}
.campus-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 1; /* franja baja: tres campus caben sin tanto desplazamiento (≥860: vertical) */
  object-fit: cover;
  border-radius: var(--r-md);
  background: var(--ceu-blue-100);
  transition: transform var(--dur) var(--ease-out);
}
.campus-card:hover .campus-img,
.perfil-card:hover .perfil-img {
  transform: scale(1.02);
}
.perfil-img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center bottom; /* al recortar la tarjeta se pierde la parte de arriba de la foto */
  border-radius: inherit;
  transition: transform var(--dur) var(--ease-out);
}
/* En el primer paso la entradilla ocupa todo el ancho para que el paso quepa en una pantalla. */
.shell--perfil .card-head p {
  max-width: none;
}
.perfil-copy {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  padding: var(--sp-3) var(--sp-4);
  color: #fff;
  text-align: left;
  background: linear-gradient(0deg, rgba(7, 8, 80, 0.96), rgba(7, 8, 80, 0));
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}
.perfil-title {
  padding-right: 32px;
  color: #fff;
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: 1.2;
}
.perfil-description {
  color: rgba(255, 255, 255, 0.94);
  font-size: var(--fs-xs);
  line-height: 1.35;
}
.perfil-card::after {
  z-index: 2;
}
@media (min-width: 640px) {
  .perfil-card {
    width: 82%;
    aspect-ratio: 5 / 6; /* algo más baja que la foto (3:4): se recorta por arriba */
  }
}
/* auto-fill: con un solo campus la tarjeta conserva su ancho y no ocupa toda la fila. */
@media (min-width: 480px) {
  .campus-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}
.campus-item {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  min-width: 0;
}
.campus-mapa {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: var(--sp-1) var(--sp-2);
  color: var(--ceu-blue-700);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.campus-mapa:hover,
.campus-mapa:focus-visible {
  color: var(--ceu-blue-800);
  text-decoration-thickness: 2px;
}
@media (min-width: 860px) {
  .campus-img {
    aspect-ratio: 364 / 432;
  }
  .campus-card .campus-titulo {
    min-height: 2.5em; /* reserva dos líneas para que las fotos empiecen a la misma altura */
  }
}
@media (prefers-reduced-motion: reduce) {
  .campus-card:hover .campus-img,
  .perfil-card:hover .perfil-img {
    transform: none;
  }
}

@media (max-height: 760px) {
  .shell--perfil {
    padding-top: var(--sp-2);
    padding-bottom: var(--sp-4);
  }
  .shell--perfil .topbar {
    margin-bottom: var(--sp-2);
  }
  .shell--perfil .progress {
    padding-top: var(--sp-3);
  }
  .shell--perfil .card-head,
  .shell--perfil .card-body {
    padding: var(--sp-3) var(--sp-4);
  }
  .shell--perfil .legal {
    margin-top: var(--sp-3);
  }
}

/* Chips (selección compacta, campus/idioma-nivel) */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.chip {
  max-width: 100%;
  border: 1.5px solid var(--control-line);
  background: var(--surface);
  border-radius: var(--r-full);
  min-height: 44px;
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text);
  overflow-wrap: anywhere;
  transition:
    transform var(--dur-fast) var(--ease-out),
    border-color var(--dur) var(--ease-out),
    background var(--dur) var(--ease-out);
}
@media (hover: hover) {
  .chip:hover {
    border-color: var(--ceu-blue-600);
  }
}
.chip:active {
  transform: scale(0.96);
}
.chip[aria-pressed='true'] {
  background: var(--ceu-blue);
  border-color: var(--ceu-blue);
  color: #fff;
}

/* Cantidad de una opción repetible (varios bonos de 10 viajes al mes). */
.cantidad-opcion {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-3);
}
.cantidad-opcion[hidden] {
  display: none;
}
.cantidad-opcion-etq {
  font-size: var(--fs-sm);
  color: var(--text-muted, var(--text));
}
.cantidad-btn {
  width: 2.75rem;
  height: 2.75rem;
  border: 1.5px solid var(--control-line);
  background: var(--surface);
  border-radius: var(--r-full);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
  color: var(--text);
}
.cantidad-btn:disabled {
  opacity: 0.4;
}
.cantidad-valor {
  min-width: 1.5rem;
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ---------- Selects ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}
.field label {
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--text);
}
/* El asterisco de «obligatorio» va en azul: en rojo parecería un error. */
.field .req {
  color: var(--color-primary);
}
.input,
.select {
  width: 100%;
  border: 1.5px solid var(--control-line);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-base);
  background: var(--surface);
  color: var(--text);
  transition:
    border-color var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out);
}
.input:focus,
.select:focus {
  outline: none;
  border-color: var(--ceu-blue);
  box-shadow: var(--ring);
}
/* Desplegable nativo (<select>): mismo aspecto que el desplegable con buscador,
   con la flecha propia en lugar de la del navegador. */
select.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  font-family: inherit;
  line-height: 1.55; /* misma altura que el desplegable con buscador */
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%235a6178' stroke-width='2'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 12px 8px;
  cursor: pointer;
}
select.select:disabled {
  background-color: var(--bg-subtle);
  color: var(--text-muted);
  cursor: not-allowed;
}
.input.invalid,
.select.invalid {
  border-color: var(--danger);
}
/* ---------- Desplegable con buscador (selector-con-buscador.js) ---------- */
.buscador {
  position: relative;
}
.buscador-boton {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  font: inherit;
  font-size: var(--fs-base);
  text-align: left;
  cursor: pointer;
}
.buscador-boton::after {
  content: '';
  flex: none;
  width: 8px;
  height: 8px;
  margin-right: var(--sp-1);
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--dur) var(--ease-out);
}
.buscador-boton[aria-expanded='true']::after {
  transform: translateY(2px) rotate(-135deg);
}
.buscador-valor {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.buscador-boton--vacio .buscador-valor {
  color: var(--text-muted);
}
.buscador-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + var(--sp-1));
  left: 0;
  right: 0;
  padding: var(--sp-2);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
}
.buscador-campo {
  min-height: 44px;
  padding: var(--sp-2) var(--sp-3) var(--sp-2) 40px;
  background: var(--surface)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%235a6178' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='m12.5 12.5 4 4'/%3E%3C/svg%3E")
    no-repeat 14px center;
}
.buscador-lista {
  max-height: 15rem;
  margin: var(--sp-2) 0 0;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
}
.buscador-opcion {
  padding: 10px var(--sp-3);
  border-radius: var(--r-sm);
  cursor: pointer;
}
.buscador-opcion--activa {
  background: var(--surface-2);
  color: var(--ceu-navy);
}
.buscador-opcion[aria-selected='true'] {
  font-weight: 600;
  color: var(--ceu-blue-700);
}
/* Cabecera de grupo (p. ej. una titulación con varios grupos de idioma) y sus
   opciones sangradas debajo. */
.buscador-grupo {
  padding: var(--sp-2) var(--sp-3) var(--sp-1);
  color: var(--text);
  font-weight: 600;
  cursor: default;
}
.buscador-opcion--sangrada {
  margin-left: var(--sp-5);
  padding-left: var(--sp-3);
  border-left: 1px solid var(--border-strong);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
/* En el paso de titulación no hay campos debajo y la tarjeta (overflow: clip)
   recortaría el panel flotante: se despliega dentro del flujo y empuja los botones. */
.campo-titulacion .buscador-panel {
  position: static;
  margin-top: var(--sp-1);
}
.campo-titulacion .buscador-lista {
  max-height: 20rem;
}
/* Titulaciones sin grupos, en negrita como las cabeceras de las que sí tienen. */
.campo-titulacion .buscador-opcion--suelta {
  font-weight: 600;
}
.buscador-boton:disabled {
  background: var(--bg-subtle);
  color: var(--text-muted);
  cursor: not-allowed;
}
.buscador-vacio {
  margin: var(--sp-2) var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
/* Dato fijado por el perfil (p. ej. país España para estudiante nacional). */
.input[readonly] {
  background: var(--bg-subtle);
  color: var(--text-muted);
  cursor: default;
}
.field .err {
  color: var(--danger);
  font-size: var(--fs-xs);
  font-weight: 600;
  min-height: 1em;
}

/* ---------- Bloques de gasto + sliders ---------- */

.gasto-block {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  min-width: 0;
  padding: var(--sp-4);
  margin-bottom: var(--sp-4);
  background: var(--surface);
  transition: box-shadow var(--dur) var(--ease-out);
}
@media (hover: hover) {
  .gasto-block:hover {
    box-shadow: var(--shadow-sm);
  }
}
.gasto-block h2,
.gasto-block .gasto-cabecera {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--ceu-blue-800);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-direction: column;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
@media (min-width: 480px) {
  .gasto-block h2,
  .gasto-block .gasto-cabecera {
    align-items: center;
    flex-direction: row;
  }
}
@media (min-width: 640px) {
  .gasto-block {
    padding: var(--sp-5);
  }
}
.gasto-block .amount-pill {
  font-variant-numeric: tabular-nums;
  background: var(--ceu-blue-100);
  color: var(--ceu-blue-800);
  border-radius: var(--r-full);
  padding: 2px var(--sp-3);
  font-size: var(--fs-sm);
  font-weight: 700;
  white-space: nowrap;
}

/* En móvil el valor va debajo y el deslizador ocupa todo el ancho (más preciso con el
   dedo y sin que las marcas se pisen); desde 480 px, el valor a la derecha. */
.slider-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-3) 0;
}
@media (min-width: 480px) {
  .slider-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--sp-4);
  }
}
.slider-row > * {
  min-width: 0;
}
.slider-row + .slider-row {
  border-top: 1px dashed var(--border);
}
.slider-label {
  font-size: var(--fs-sm);
  font-weight: 600;
}
.slider-label small {
  display: block;
  color: var(--text-muted);
  font-weight: 500;
  font-size: var(--fs-xs);
}
.slider-value {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--ceu-blue-700);
}
@media (min-width: 480px) {
  .slider-value {
    min-width: 72px;
    text-align: right;
  }
}

/* Range input estilizado. La pista visible, de 8 px, se dibuja en su propio pseudoelemento
   y el tirador de 24 px se centra en ella. En pantallas táctiles el elemento mide 44 px de
   alto (zona táctil, ver abajo); con ratón se queda en los 8 px de la pista. */
.rng {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  min-width: 0;
  margin: 0;
  height: 8px;
  background: transparent;
  outline: none;
  /* El gesto vertical sigue desplazando la página; solo el horizontal mueve el deslizador. */
  touch-action: pan-y;
}
@media (pointer: coarse) {
  .rng {
    height: 44px;
  }
}
.rng::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: var(--r-full);
  background: var(--track);
}
.rng::-moz-range-track {
  height: 8px;
  border-radius: var(--r-full);
  background: var(--track);
}
.rng::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  margin-top: -8px; /* (8 − 24) / 2: centra el tirador en la pista */
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid var(--ceu-blue);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out);
}
.rng::-webkit-slider-thumb:active {
  transform: scale(1.15);
}
.rng::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid var(--ceu-blue);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
/* El aro de foco rodea al tirador, no a toda la zona táctil. El contorno transparente
   lo dibuja el sistema en modo de alto contraste. */
.rng:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
}
.rng:focus-visible::-webkit-slider-thumb {
  box-shadow: var(--ring);
}
.rng:focus-visible::-moz-range-thumb {
  box-shadow: var(--ring);
}
.rng-ticks {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-1);
  margin-top: var(--sp-1);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  font-weight: 600;
}
.rng-ticks span {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  text-align: center;
  overflow-wrap: anywhere;
}
@media (pointer: coarse) {
  /* Se mete en el hueco libre bajo la pista (el tirador acaba 10 px antes de la zona táctil). */
  .rng-ticks {
    margin-top: -10px;
  }
  .rng-ticks span {
    min-height: 44px;
  }
}
.rng-ticks small {
  font-size: var(--fs-xs);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.rng-ticks span.on {
  color: var(--ceu-blue-700);
}

/* opción-rango: cards de tipo + slider al seleccionar */
.tipo-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-3);
  min-width: 0;
}
.tipo-item {
  min-width: 0;
  border: 1.5px solid var(--control-line);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  transition:
    border-color var(--dur) var(--ease-out),
    background var(--dur) var(--ease-out);
}
.tipo-item[data-selected='true'] {
  border-color: var(--ceu-blue);
  background: var(--surface-2);
}
/* En móvil el importe baja a su propia línea bajo el nombre: en una sola fila la píldora
   «desde 400 €/mes» se quedaba con el ancho y el nombre se partía letra a letra. */
.tipo-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--sp-1) var(--sp-3);
  min-height: 44px;
  cursor: pointer;
  font-weight: 600;
}
.tipo-name {
  min-width: 0;
  overflow-wrap: break-word;
}
.tipo-head input {
  accent-color: var(--ceu-blue);
  width: 20px;
  height: 20px;
  margin: 0;
}
.tipo-head .amount-pill {
  grid-column: 2;
  justify-self: start;
  max-width: 100%;
}
@media (min-width: 480px) {
  .tipo-head {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .tipo-head .amount-pill {
    grid-column: auto;
    justify-self: auto;
  }
}
.tipo-slider {
  min-width: 0;
  margin-top: var(--sp-4);
}
.tipo-item[data-selected='false'] .tipo-slider {
  display: none;
}

/* ---------- Resumen ---------- */
.summary-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
}
.summary-parts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-4);
}
@media (min-width: 640px) {
  .summary-parts {
    grid-template-columns: 1fr 1fr;
  }
}
.stat {
  min-width: 0;
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  border: 1px solid var(--border);
}
.stat.big {
  background: linear-gradient(135deg, var(--ceu-blue), var(--ceu-blue-700));
  color: #fff;
  border: none;
  box-shadow: var(--shadow-md);
}
.stat .stat-label {
  font-size: var(--fs-sm);
  opacity: 0.9;
  font-weight: 600;
}
.stat .stat-value {
  font-size: clamp(1.75rem, 9vw, var(--fs-3xl));
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin-top: var(--sp-1);
}
@media (min-width: 640px) {
  .stat {
    padding: var(--sp-5);
  }
  .stat .stat-value {
    font-size: var(--fs-3xl);
  }
}
.stat .stat-note {
  font-size: var(--fs-xs);
  opacity: 0.85;
  margin-top: var(--sp-2);
}
.stat.part {
  background: var(--surface-2);
  border-color: var(--ceu-blue-100);
}
.stat.part .stat-label,
.stat.part .stat-value {
  color: var(--ceu-blue-800);
}
/* Precio oficial = «impreso»: sólido, borde azul y cifra en negrita.
   Estimación = «a lápiz»: borde discontinuo, sin relleno y cifra más ligera. */
.stat.part--oficial {
  background: var(--surface);
  border: 1.5px solid var(--ceu-blue);
}
.stat.part--estimacion {
  background: transparent;
  border: 1.5px dashed var(--border-strong);
}
.stat.part--estimacion .stat-value {
  font-weight: 600;
}
/* El enlace «Añadir gastos de vida» alinea su texto con el resto de la tarjeta. */
.stat .link-cambiar {
  margin: var(--sp-1) 0 calc(-1 * var(--sp-2)) calc(-1 * var(--sp-2));
  font-size: var(--fs-sm);
}
.stat.part .stat-value {
  font-size: clamp(var(--fs-xl), 7vw, var(--fs-2xl));
}

.summary-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin-top: var(--sp-4);
}
.summary-table td {
  min-width: 0;
  padding: var(--sp-3) var(--sp-2);
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-sm);
  overflow-wrap: anywhere;
  vertical-align: top;
}
.summary-table td:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: normal;
}
.summary-table .summary-link {
  color: var(--ceu-blue-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.summary-table .summary-link:hover,
.summary-table .summary-link:focus-visible {
  color: var(--ceu-blue-800);
  text-decoration-thickness: 2px;
}
.summary-table--study td:first-child {
  width: 40%;
}
.summary-table--study td:last-child {
  width: 60%;
}
.summary-table--costs td:first-child {
  width: 62%;
}
.summary-table--costs td:last-child {
  width: 38%;
  white-space: nowrap;
}
/* «Ver desglose» / «Show breakdown» es más ancho que esa columna en 320–360 px: pasa a dos líneas. */
.summary-table--costs .desglose-toggle {
  max-width: 100%;
  margin-left: 0;
  white-space: normal;
  text-align: right;
}
@media (min-width: 640px) {
  .summary-table td {
    padding: var(--sp-3) var(--sp-4);
  }
  .summary-table--study td:first-child {
    width: 32%;
  }
  .summary-table--study td:last-child {
    width: 68%;
  }
  .summary-table--costs td:first-child {
    width: 72%;
  }
  .summary-table--costs td:last-child {
    width: 28%;
  }
}
.summary-table tr.total td {
  font-weight: 800;
  color: var(--ceu-blue-800);
  border-top: 2px solid var(--ceu-blue-100);
  font-size: var(--fs-base);
}
.summary-section-title {
  margin: var(--sp-6) 0 var(--sp-2);
  font-size: var(--fs-lg);
  color: var(--ceu-blue-800);
}
/* Título de sección con una acción a la derecha («Cambiar» en gastos de vida). */
.summary-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin: var(--sp-6) 0 var(--sp-2);
}
.summary-section-head .summary-section-title {
  margin: 0;
}
.summary-section-head .link-cambiar {
  flex: none;
  margin: -14px calc(-1 * var(--sp-2)) -14px 0; /* el texto queda alineado con el borde derecho */
}

.becas {
  margin-top: var(--sp-6);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  min-width: 0;
  padding: var(--sp-4);
  background: var(--surface-2);
}
.becas h2 {
  color: var(--ceu-blue-800);
  font-size: var(--fs-lg);
}
.becas p {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  margin-top: var(--sp-2);
}
.beca-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-top: 1px dashed var(--border-strong);
}
.beca-info {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}
.beca-row .beca-name {
  min-width: 0;
  font-weight: 600;
  font-size: var(--fs-sm);
  overflow-wrap: anywhere;
}
.beca-info-trigger {
  display: inline-grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 auto;
  margin-left: var(--sp-2);
  padding: 0;
  border: 1px solid var(--ceu-blue-500);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ceu-blue-700);
  font: 700 0.75rem/1 var(--font-sans);
  cursor: pointer;
  position: relative;
}
/* Área táctil de ~44 px sin agrandar el icono visible. */
.beca-info-trigger::after {
  content: '';
  position: absolute;
  inset: -0.625rem;
}
.beca-info-trigger:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}
.summary-table .summary-info {
  display: inline-flex;
  width: auto;
  max-width: 100%;
  vertical-align: middle;
}
.beca-tooltip {
  position: absolute;
  z-index: 4;
  top: calc(100% + var(--sp-2));
  left: 0;
  display: none;
  width: min(24rem, calc(100vw - 5rem));
  padding: var(--sp-3);
  border-radius: var(--r-md);
  background: var(--ceu-blue-800);
  box-shadow: var(--shadow-md);
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: 400;
  line-height: 1.4;
}
/* Puente invisible entre el icono y el tooltip: sin él, al cruzar el hueco
   de 8 px se pierde :hover antes de poder pulsar el enlace. */
.beca-tooltip::before {
  content: '';
  position: absolute;
  top: calc(-1 * var(--sp-2));
  right: 0;
  left: 0;
  height: var(--sp-2);
}
.beca-tooltip a {
  display: block;
  width: fit-content;
  margin-top: var(--sp-2);
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
}
.beca-info[data-open='true'] .beca-tooltip {
  display: block;
}
/* El hover solo existe en dispositivos con ratón; en táctil quedaría "pegado"
   tras el toque e impediría cerrar el globo. */
@media (hover: hover) {
  .beca-info:hover .beca-tooltip {
    display: block;
  }
}
.beca-row .btn {
  width: 100%;
  padding: var(--sp-2) var(--sp-4);
}
.beca-mas {
  margin-top: var(--sp-3);
}
.becas-mas {
  margin-top: var(--sp-3);
}
.beca-row[data-active='true'] {
  color: var(--ceu-blue-700);
}
/* Beca simulada: fila (o variante dentro de un grupo) resaltada en menta, igual que
   «Recibir por correo» y el proceso de admisión, para verla de un vistazo en móvil. */
.beca-row[data-active='true']:not(.beca-grupo),
.beca-opcion[data-active='true'] {
  padding-right: var(--sp-3);
  padding-left: var(--sp-3);
  border-radius: var(--r-md);
  background: var(--ceu-mint-50);
  box-shadow: inset 0 0 0 1.5px var(--ceu-mint);
}
.beca-row[data-active='true']:not(.beca-grupo) {
  border-top-color: transparent;
}
.beca-opcion[data-active='true'] {
  padding-top: var(--sp-2);
  padding-bottom: var(--sp-2);
}
/* «Quitar simulación»: relleno en menta (contraste 5,7:1 con texto blanco). */
.btn.btn-beca-activa {
  background: var(--ceu-mint-700);
  border-color: var(--ceu-mint-700);
  color: #fff;
}
.btn.btn-beca-activa:hover {
  background: var(--ceu-mint-800);
  border-color: var(--ceu-mint-800);
}
.beca-titulo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-1);
  flex: 1;
  min-width: 0;
}
.beca-estado {
  padding: 2px var(--sp-3);
  border-radius: var(--r-full);
  background: var(--ceu-mint-700);
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: 700;
}
.beca-estado::before {
  content: '✓';
  margin-right: 0.4em;
}
/* Grupo de variantes de un mismo programa (Pioneros): un solo bloque, una fila por variante. */
.beca-grupo {
  gap: var(--sp-2);
}
.beca-opciones {
  display: grid;
  gap: var(--sp-3);
  margin: var(--sp-1) 0;
  padding-left: var(--sp-3);
  border-left: 2px solid var(--ceu-blue-100);
}
.beca-opcion {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-2);
}
.beca-opcion .btn {
  width: 100%;
  padding: var(--sp-2) var(--sp-4);
}
.beca-opcion-nombre {
  font-size: var(--fs-sm);
  font-weight: 600;
}
.beca-grupo .beca-requisitos {
  width: fit-content;
}
@media (min-width: 480px) {
  .beca-row {
    display: flex;
    align-items: center;
  }
  .beca-row .btn {
    width: auto;
  }
  .beca-grupo {
    display: grid;
    align-items: stretch;
  }
  .beca-opcion {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
  }
  .beca-opcion .btn {
    width: auto;
    flex: 0 0 auto;
  }
}
@media (min-width: 640px) {
  .becas {
    padding: var(--sp-5);
  }
}

.callout {
  border: 1px solid var(--ceu-blue-100);
  background: var(--ceu-blue-50);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-top: var(--sp-4);
}

/* Total fijo del resumen: pegado al borde inferior mientras la cabecera con el
   total no está a la vista. Se oculta con visibility para no tapar clics. */
.fijo-resumen {
  margin-top: var(--sp-4);
}
.fijo-resumen[data-visible='true'] {
  position: sticky;
  bottom: max(var(--sp-3), env(safe-area-inset-bottom));
  z-index: 3;
}
/* Ya dentro del grupo fijo, la banda no necesita su propio margen superior. */
.fijo-resumen .banda-correo {
  margin-top: 0;
}
.fijo-resumen[data-visible='true'] .banda-correo {
  box-shadow: var(--shadow-md);
}
.total-fijo {
  display: none; /* oculta, no reserva hueco bajo el contenido */
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-lg);
  background: var(--ceu-blue);
  color: var(--text-onblue);
  box-shadow: var(--shadow-md);
}
.total-fijo[data-visible='true'] {
  display: flex;
  animation: total-in var(--dur) var(--ease-out) both;
}
@keyframes total-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .total-fijo[data-visible='true'] {
    animation: none;
  }
}
.total-fijo-etiqueta {
  min-width: 0;
  font-size: var(--fs-sm);
  font-weight: 600;
}
.total-fijo-valor {
  flex: 0 0 auto;
  font-size: var(--fs-xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* Siguientes pasos del resumen: tarjetas con enlaces a la web de la universidad. */
.pasos-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-3);
  margin-top: var(--sp-3);
}
@media (min-width: 640px) {
  .pasos-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 860px) {
  .pasos-grid {
    grid-template-columns: repeat(var(--pasos-cols, 3), minmax(0, 1fr));
  }
}
/* Banda de «Recibir por correo» bajo el total: ancho completo y en menta para que destaque. */
.banda-correo {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  border: 1.5px solid var(--ceu-mint);
  border-radius: var(--r-lg);
  background: var(--ceu-mint-50);
}
.banda-correo h2 {
  color: var(--ceu-mint-800);
  font-size: var(--fs-lg);
}
.banda-correo p {
  margin: var(--sp-1) 0 0;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  line-height: 1.45;
}
.banda-correo .btn-primary {
  background: var(--ceu-mint-700);
}
.banda-correo .btn-primary:hover {
  background: var(--ceu-mint-800);
}
/* En pantallas estrechas, fijada ocupa poco: título y botón en una fila, sin el párrafo. */
.banda-correo-texto {
  min-width: 0;
}
/* Fijada en pantalla estrecha, la banda es solo el botón a ancho completo: título y párrafo
   quedan para lectores de pantalla (el título y el botón no caben juntos en 320–390 px). */
.fijo-resumen[data-visible='true'] .banda-correo {
  padding: var(--sp-3) var(--sp-4);
}
.fijo-resumen[data-visible='true'] .banda-correo .banda-correo-texto {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
@media (min-width: 640px) {
  .banda-correo,
  .fijo-resumen[data-visible='true'] .banda-correo {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-5);
    padding: var(--sp-4) var(--sp-5);
  }
  .fijo-resumen[data-visible='true'] .banda-correo .banda-correo-texto {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
  }
  .banda-correo .btn {
    flex: 0 0 auto;
  }
}
.paso-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  min-width: 0;
  padding: var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.paso-card h3 {
  color: var(--ceu-blue-800);
  font-size: var(--fs-base);
}
/* Tarjeta destacada (proceso de admisión): menta para separarla de la información. */
.paso-card-destacada {
  border-color: var(--ceu-mint);
  background: var(--ceu-mint-50);
}
.paso-card-destacada .paso-btn-principal {
  background: var(--ceu-mint-700);
}
.paso-card-destacada .paso-btn-principal:hover {
  background: var(--ceu-mint-800);
}
.paso-card p {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  line-height: 1.45;
}
.paso-links {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--sp-2);
  margin-top: auto;
  padding-top: var(--sp-2);
}
/* Botones a todo el ancho de la tarjeta; el nombre largo de la titulación pasa a dos líneas. */
.paso-btn {
  padding: var(--sp-2) var(--sp-4);
  text-align: center;
  text-decoration: none;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.field .opcional {
  color: var(--text-muted);
  font-weight: 400;
}
.pdf-action {
  position: relative;
  width: 100%;
  text-align: center;
}
.pdf-status {
  margin-top: var(--sp-2);
  color: var(--text-muted);
  font-size: var(--fs-sm);
}
@media (min-width: 480px) {
  .pdf-action {
    width: auto;
    text-align: right;
  }
  /* En fila, el aviso va bajo el botón sin ocupar sitio: así el botón queda
     alineado con los demás. */
  .pdf-status {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
  }
}

.note-obs {
  margin-top: var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface-2);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

/* ---------- Estados ---------- */
.center-msg {
  text-align: center;
  padding: var(--sp-8) var(--sp-4);
  color: var(--text-muted);
}
/* Qué fichero de contenido falla: lo lee quien lo ha editado, no el alumno. */
.center-msg .error-detalle {
  font-family: ui-monospace, Consolas, monospace;
  font-size: var(--fs-xs);
  overflow-wrap: anywhere;
}
.spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid var(--ceu-blue-100);
  border-top-color: var(--ceu-blue);
  margin: 0 auto var(--sp-4);
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Contenido estático de index*.html (generado): pantalla de carga y texto
   para buscadores y asistentes de IA que no ejecutan JavaScript. */
.intro-estatica {
  max-width: 40rem;
  margin: 0 auto;
  padding: var(--sp-8) var(--sp-4);
  text-align: center;
  color: var(--text-muted);
}
.intro-estatica h1 {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-2xl);
  line-height: 1.2;
  color: var(--ceu-navy);
}
.intro-estatica p {
  margin: 0 0 var(--sp-5);
  line-height: 1.55;
}
.intro-estatica-aviso {
  color: var(--text);
  font-weight: 600;
}
.intro-estatica-idiomas {
  font-size: var(--fs-sm);
}
.intro-estatica-idiomas a {
  color: var(--ceu-blue-700);
}
.intro-estatica-idiomas a[aria-current='page'] {
  color: var(--text);
  text-decoration: none;
}
/* Con JavaScript la intro dura un instante (hasta el primer render) y su texto
   parpadea sin llegar a leerse: se deja solo el spinner a la vista. El texto
   sigue en el HTML para buscadores y lectores de pantalla. */
@media (scripting: enabled) {
  .intro-estatica > h1,
  .intro-estatica > p {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}
.privacy-link {
  color: var(--ceu-blue-700);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
}

/* «Cambiar» junto a cada gasto del resumen: vuelve a su paso y regresa al resumen. */
.link-cambiar {
  margin: -14px 0 -14px var(--sp-2);
  padding: 14px var(--sp-2); /* área pulsable de ~44 px con el texto de 13 px */
  border: 0;
  background: none;
  color: var(--ceu-blue-700);
  font: inherit;
  font-size: var(--fs-xs);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-cambiar:hover {
  color: var(--ceu-blue-800);
}
.link-cambiar:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--r-sm);
}

/* Botón o barra de acciones ocultos: .btn y .actions fijan su propio display. */
.btn[hidden],
.actions[hidden] {
  display: none;
}

/* Precio del primer curso bajo cada campus, para compararlos antes de elegir. */
.campus-precio {
  margin: 0;
  padding-left: var(--sp-2);
  color: var(--ceu-blue-800);
  font-size: var(--fs-base);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.center-msg .btn {
  margin-top: var(--sp-4);
}

/* «Cómo calculamos esto»: hipótesis de cada cifra, plegadas. */
/* Ayuda al principio del resumen: cerrada es un enlace alineado a la derecha; abierta, un panel. */
.como-calculamos {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.como-calculamos[open] {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
}
.como-calculamos summary {
  cursor: pointer;
  width: fit-content;
  margin-left: auto;
  /* Área pulsable de ~44 px sin mover nada (el texto mide ~23 px). */
  padding: 11px var(--sp-1);
  margin-top: -11px;
  margin-bottom: -11px;
  color: var(--ceu-blue-700);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  border-radius: var(--r-sm);
}
.como-calculamos summary:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}
.como-calculamos ul {
  margin: var(--sp-3) 0 0;
  padding-left: var(--sp-5);
}
.como-calculamos li + li {
  margin-top: var(--sp-2);
}
.note-obs a {
  color: var(--ceu-blue-700);
  font-weight: 600;
  text-underline-offset: 3px;
}

/* «Empezar de nuevo» como enlace discreto, lejos del botón del PDF. */
.link-reiniciar {
  display: block;
  margin: var(--sp-4) auto 0;
  font-size: var(--fs-sm);
}
.cierre-resumen {
  margin: var(--sp-4) 0 0;
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.beca-nota {
  margin: var(--sp-3) 0 0;
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

/* Chip seleccionado: además del color, lleva un ✓ (no depende solo del fondo). */
.chip[aria-pressed='true']::before {
  content: '✓';
  margin-right: 0.4em;
}

/* Acciones del resumen bajo el total: PDF principal y «Ajustar gastos» secundario. */
.acciones-resumen {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--sp-3);
  margin: var(--sp-3) 0 var(--sp-5);
}
.acciones-resumen .pdf-status {
  position: static;
  margin-top: var(--sp-2);
}
.acciones-resumen .pdf-action {
  text-align: left;
}
.acciones-resumen .btn {
  width: 100%;
}
@media (min-width: 480px) {
  .acciones-resumen .btn {
    width: auto;
  }
}
.beca-criterio {
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-weight: 400;
}
.beca-requisitos {
  color: var(--ceu-blue-700);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-underline-offset: 3px;
}

/* Títulos con interlineado de titular, no el del cuerpo. */
.summary-section-title,
.gasto-block h2,
.gasto-block .gasto-cabecera {
  line-height: 1.25;
}
/* Campus: precio en cada tarjeta, solo cuando difiere entre campus. */
.campus-precio-card {
  display: block;
  color: var(--ceu-blue-800);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.beca-requisitos {
  display: inline-block;
  padding: 13px 0;
  margin: -13px 0; /* área pulsable de ~44 px sin mover nada */
}

/* ---------- Modal «Recibir por correo» (correo.js) ---------- */
.modal {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: none;
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}
.modal::backdrop {
  background: rgba(7, 8, 80, 0.45);
}
.modal-contenido {
  padding: var(--sp-5);
}
.modal-cabecera {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-3);
}
.modal-cabecera h2 {
  color: var(--ceu-blue-800);
  font-size: var(--fs-xl);
  line-height: 1.25;
}
.modal-cerrar {
  flex: none;
  width: 44px;
  height: 44px;
  margin: calc(-1 * var(--sp-2)) calc(-1 * var(--sp-2)) 0 0;
  border: 0;
  border-radius: var(--r-full);
  background: transparent;
  color: var(--text-muted);
  font-size: 1.75rem;
  line-height: 1;
}
.modal-cerrar:hover {
  background: var(--surface-2);
  color: var(--ceu-blue-800);
}
.modal-cerrar:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}
.modal-intro {
  margin: var(--sp-2) 0 var(--sp-5);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  line-height: 1.45;
}
.modal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: var(--sp-4);
}
@media (min-width: 640px) {
  .modal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* Teléfono: prefijo (fijo en el perfil nacional, desplegable en el internacional) y número. */
.tel-grupo {
  display: flex;
  gap: var(--sp-2);
}
.tel-grupo .input {
  flex: 1 1 auto;
  min-width: 0;
}
/* El desplegable con buscador ocupa lo justo en la fila, pero su panel se abre con el ancho del campo entero. */
.tel-grupo {
  position: relative;
}
.tel-grupo .buscador {
  position: static;
  flex: 0 0 6.5rem;
}
.tel-prefijo-fijo {
  flex: none;
  display: flex;
  align-items: center;
  padding: var(--sp-3) var(--sp-4);
  border: 1.5px solid var(--control-line);
  border-radius: var(--r-md);
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: var(--fs-base);
  line-height: 1.55;
}
.check-privacidad label {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  font-weight: 400;
  cursor: pointer;
}
.check-privacidad input {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  accent-color: var(--ceu-blue);
}
.check-privacidad a,
.nota-legal a {
  color: var(--ceu-blue-700);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.nota-legal {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--fs-xs);
  line-height: 1.45;
}
.modal-error {
  margin: var(--sp-3) 0 0;
  color: var(--danger);
  font-size: var(--fs-sm);
  font-weight: 600;
}
.modal-error:empty {
  display: none;
}
.modal-acciones {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
}
.modal-acciones .btn {
  flex: 1 1 100%;
}
@media (min-width: 480px) {
  .modal-acciones .btn {
    flex: 0 1 auto;
  }
}
/* Campo trampa contra bots: fuera de la vista, sin ocupar sitio. */
.campo-trampa {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Página del enlace del correo (main.js, pantallaPdf): la estimación en una línea. */
.pdf-enlace-resumen {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  margin-bottom: var(--sp-2);
  padding: var(--sp-4);
  border-radius: var(--r-lg);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: var(--fs-sm);
}
.pdf-enlace-resumen strong {
  color: var(--ceu-blue-800);
  font-size: var(--fs-lg);
}
