/* ============================================================
   Formulario de socios · ELSA Barcelona-UB
   Colores y tipografía en :root — si ELSA tiene un manual de
   marca, basta con cambiar aquí los valores.
   ============================================================ */

:root {
  --azul-noche: #0B1C3F;
  --azul-hondo: #122B5E;
  --azul: #1B438F;
  --azul-claro: #EDF2FB;
  --oro: #B8964F;
  --oro-claro: #D9C18C;
  --papel: #F7F4EE;
  --blanco: #FFFFFF;
  --tinta: #121A2E;
  --texto: #2B3346;
  --gris: #5E6678;
  --linea: #E6E1D6;
  --linea-campo: #CDD3DF;
  --error: #B3261E;
  --exito: #1E7A4F;

  --serif: 'Cormorant Garamond', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --sombra: 0 1px 2px rgba(16, 32, 70, .05), 0 12px 32px -18px rgba(16, 32, 70, .28);
  --anillo: 0 0 0 4px rgba(27, 67, 143, .14);

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--texto);
  background: var(--papel);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.08;
  color: var(--tinta);
}

p { margin: 0; }
a { color: inherit; text-underline-offset: 3px; }
button, input, textarea { font: inherit; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }

:focus-visible { outline: 3px solid rgba(27, 67, 143, .45); outline-offset: 3px; }

/* ---------- Marca ---------- */

.marca {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--tinta);
}
.marca__sigla {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 30px;
  line-height: 1;
  letter-spacing: .14em;
  margin-right: -.14em;
}
.marca__sede {
  padding: 3px 0 3px 14px;
  border-left: 1px solid var(--oro);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .26em;
  text-transform: uppercase;
  line-height: 1.2;
}
.marca--clara { color: #fff; }
.marca--clara .marca__sede { border-color: rgba(217, 193, 140, .6); color: rgba(255, 255, 255, .82); }

/* ---------- Botones ---------- */

.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--azul);
  color: #fff;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  box-shadow: 0 8px 20px -10px rgba(11, 28, 63, .7);
  transition: background-color .2s, color .2s, border-color .2s, box-shadow .2s, transform .15s;
}
.boton:hover { background: var(--azul-hondo); }
.boton:active { transform: translateY(1px); }
.boton svg { width: 18px; height: 18px; flex: none; }
.boton .flecha { transition: transform .2s; }
.boton:hover .flecha { transform: translateX(3px); }
.boton[disabled] { cursor: progress; opacity: .75; }

.boton--claro { background: var(--papel); color: var(--azul-noche); box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .6); }
.boton--claro:hover { background: #fff; }

.boton--fantasma { background: transparent; color: var(--tinta); border-color: var(--linea-campo); box-shadow: none; }
.boton--fantasma:hover { background: #fff; border-color: #AFB8C8; }

.enlace {
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--azul);
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(27, 67, 143, .35);
  text-underline-offset: 4px;
  cursor: pointer;
}
.enlace:hover { text-decoration-color: currentColor; }
.enlace[disabled] { color: var(--gris); opacity: .6; cursor: default; }

/* ============================================================
   Portada (bienvenida y pantalla final)
   ============================================================ */

.portada {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(28px, 4.5vw, 56px) clamp(24px, 5.5vw, 72px);
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(1100px 620px at 88% -8%, rgba(64, 104, 196, .38), transparent 62%),
    radial-gradient(900px 520px at -6% 108%, rgba(184, 150, 79, .16), transparent 62%),
    linear-gradient(160deg, #0E2250 0%, var(--azul-noche) 58%, #081530 100%);
}

.portada__marco {
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(217, 193, 140, .26);
  border-radius: 3px;
  pointer-events: none;
}
.portada__marco::after {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(217, 193, 140, .1);
  border-radius: 2px;
}

.portada__sello {
  position: absolute;
  right: -2vw;
  bottom: -18vh;
  font-family: var(--serif);
  font-weight: 500;
  font-size: min(92vh, 72vw);
  line-height: 1;
  color: rgba(255, 255, 255, .035);
  pointer-events: none;
  user-select: none;
}

.portada__cabecera {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.portada__curso {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .6);
}

.portada__cuerpo {
  position: relative;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .9fr);
  align-items: center;
  gap: clamp(40px, 6vw, 96px);
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(40px, 7vh, 88px) 0;
}

.antetitulo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--oro-claro);
}
.antetitulo::before {
  content: '';
  width: 36px;
  height: 1px;
  background: currentColor;
}

.portada h1 {
  color: #fff;
  font-size: clamp(36px, 6vw, 78px);
  font-weight: 600;
  letter-spacing: -.005em;
}
.portada__nombre {
  display: block;
  font-style: italic;
  font-weight: 500;
  color: var(--oro-claro);
  white-space: nowrap;
}

.portada__lema {
  margin-top: 22px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.3;
  color: rgba(255, 255, 255, .92);
}

.portada__intro {
  max-width: 560px;
  margin-top: 18px;
  color: rgba(255, 255, 255, .74);
}

.ventajas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 32px;
  max-width: 620px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.ventajas li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: 15px;
  line-height: 1.45;
  color: rgba(255, 255, 255, .9);
}
.ventajas__num {
  flex: none;
  min-width: 26px;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  color: var(--oro-claro);
}

.portada__cierre {
  max-width: 560px;
  margin-top: 22px;
  color: rgba(255, 255, 255, .74);
}

.portada__accion {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin-top: 34px;
}
.portada__datos {
  font-size: 13.5px;
  letter-spacing: .02em;
  color: rgba(255, 255, 255, .6);
}

.portada__pie {
  position: relative;
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: rgba(255, 255, 255, .45);
}

/* Itinerario (tarjeta de la derecha en la bienvenida) */

.itinerario {
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .03));
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.itinerario__titulo {
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(217, 193, 140, .3);
  color: #fff;
  font-size: 26px;
}
.itinerario__lista {
  margin: 0;
  padding: 0;
  list-style: none;
}
.itinerario__lista li {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  padding: 20px 0 0;
}
.itinerario__lista li:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 21px;
  top: 66px;
  bottom: -18px;
  width: 1px;
  background: rgba(217, 193, 140, .3);
}
.itinerario__num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(217, 193, 140, .55);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--oro-claro);
}
.itinerario__lista strong {
  display: block;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
}
.itinerario__lista span:not(.itinerario__num) {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, .66);
}

/* Pantalla final */

.final {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 700px;
  margin: 0 auto;
  padding: clamp(40px, 8vh, 96px) 0;
  text-align: center;
}
.final h1 { font-size: clamp(34px, 5.4vw, 64px); outline: none; }
.final__texto {
  max-width: 560px;
  margin-top: 24px;
  color: rgba(255, 255, 255, .78);
}
.final .portada__lema { margin-top: 26px; }
.final__firma {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid rgba(217, 193, 140, .35);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--oro-claro);
}

.emblema {
  position: relative;
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  margin-bottom: 34px;
  border: 1px solid rgba(217, 193, 140, .6);
  border-radius: 50%;
  color: var(--oro-claro);
}
.emblema::before {
  content: '';
  position: absolute;
  inset: -9px;
  border: 1px solid rgba(217, 193, 140, .22);
  border-radius: 50%;
}
.emblema svg { width: 66px; height: 66px; }
.emblema__balanza {
  stroke-dasharray: 260;
  stroke-dashoffset: 260;
  animation: trazar 1.6s .15s ease-out forwards;
}
@keyframes trazar { to { stroke-dashoffset: 0; } }

/* ============================================================
   Inscripción: barra lateral + contenido
   ============================================================ */

.inscripcion {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
}

.lateral {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 36px;
  height: 100vh;
  height: 100dvh;
  padding: 40px 30px 32px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(600px 400px at 110% -10%, rgba(64, 104, 196, .35), transparent 60%),
    linear-gradient(170deg, #0E2250 0%, var(--azul-noche) 70%);
}
.lateral__antetitulo {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--oro-claro);
}
.lateral__curso {
  margin-top: 6px;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
}

.pasos-lista {
  position: relative;
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pasos-lista li { position: relative; }
.pasos-lista li:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 31px;
  top: 58px;
  height: 22px;
  width: 1px;
  background: rgba(255, 255, 255, .16);
}
.pasos-lista button {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: rgba(255, 255, 255, .5);
  text-align: left;
  cursor: default;
  transition: background-color .2s, color .2s;
}
.pasos-lista__num {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  transition: all .25s;
}
.pasos-lista__texto strong { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; }
.pasos-lista__texto small { display: block; font-size: 12.5px; opacity: .75; }

.pasos-lista .es-actual button { background: rgba(255, 255, 255, .07); color: #fff; }
.pasos-lista .es-actual .pasos-lista__num { border-color: var(--oro-claro); color: var(--oro-claro); box-shadow: 0 0 0 4px rgba(217, 193, 140, .12); }

.pasos-lista .es-hecho button { color: rgba(255, 255, 255, .82); cursor: pointer; }
.pasos-lista .es-hecho button:hover { background: rgba(255, 255, 255, .06); }
.pasos-lista .es-hecho .pasos-lista__num {
  border-color: var(--oro);
  background: var(--oro) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%230B1C3F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.pasos-lista .es-hecho .pasos-lista__num span { visibility: hidden; }

.lateral__contacto {
  position: relative;
  margin-top: auto;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .55);
}
.lateral__contacto a { color: rgba(255, 255, 255, .9); }
.lateral__sello {
  position: absolute;
  right: -40px;
  bottom: -90px;
  font-family: var(--serif);
  font-size: 380px;
  line-height: 1;
  color: rgba(255, 255, 255, .035);
  pointer-events: none;
  user-select: none;
}

.contenido {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0 clamp(20px, 5vw, 72px);
}

.cabecera-paso {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 26px 0 18px;
  background: linear-gradient(var(--papel) 78%, rgba(247, 244, 238, 0));
}
.cabecera-paso__texto {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gris);
}
.progreso {
  flex: 1;
  height: 3px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--linea);
}
.progreso__relleno {
  display: block;
  width: 33.34%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--azul), var(--oro));
  transition: width .45s cubic-bezier(.2, .7, .2, 1);
}

.solo-movil { display: none !important; }

.formulario {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 18px 0 40px;
}

.pie {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 22px 0 32px;
  border-top: 1px solid var(--linea);
  font-size: 12.5px;
  color: var(--gris);
}

/* ---------- Pasos ---------- */

.paso { animation: entrar .4s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes entrar {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.paso__cabecera { margin-bottom: 28px; }
.paso__num {
  margin-bottom: 10px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--oro);
}
.paso__cabecera h2 {
  font-size: clamp(38px, 5vw, 54px);
  outline: none;
}
.paso__intro {
  max-width: 620px;
  margin-top: 12px;
  font-size: 17px;
  color: var(--gris);
}
.paso__destacado {
  margin-top: 14px;
  font-family: var(--serif);
  font-size: 25px;
  font-style: italic;
  font-weight: 600;
  line-height: 1.3;
  color: var(--azul);
}
.paso__destacado + .paso__intro { margin-top: 6px; }

.paso__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 32px;
}

/* ---------- Tarjetas ---------- */

.tarjeta {
  padding: clamp(22px, 3.6vw, 36px);
  border: 1px solid var(--linea);
  border-radius: 18px;
  background: var(--blanco);
  box-shadow: var(--sombra);
}
.tarjeta + .tarjeta,
.pago + .tarjeta,
.tarjeta + .legal { margin-top: 20px; }

.tarjeta__nota {
  margin-bottom: 22px;
  font-size: 13.5px;
  color: var(--gris);
}

.rejilla {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 24px;
}
.campo--ancho { grid-column: 1 / -1; }

/* ---------- Campos ---------- */

.campo label,
.campo legend {
  display: block;
  margin-bottom: 8px;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--tinta);
}
.campo__ayuda {
  margin: -2px 0 10px;
  font-size: 13.5px;
  color: var(--gris);
}

.campo input:not([type="radio"]):not([type="checkbox"]),
.campo textarea {
  display: block;
  width: 100%;
  height: 50px;
  padding: 0 15px;
  border: 1px solid var(--linea-campo);
  border-radius: 10px;
  background: #fff;
  color: var(--tinta);
  font-size: 16px;
  transition: border-color .15s, box-shadow .15s;
}
.campo textarea {
  height: auto;
  min-height: 132px;
  padding: 13px 15px;
  line-height: 1.55;
  resize: vertical;
}
.campo input::placeholder,
.campo textarea::placeholder { color: #A2A8B5; }
.campo input:hover,
.campo textarea:hover { border-color: #AFB8C8; }
.campo input:focus,
.campo textarea:focus {
  outline: none;
  border-color: var(--azul);
  box-shadow: var(--anillo);
}

.tiene-error > input,
.tiene-error > textarea {
  border-color: var(--error);
  box-shadow: 0 0 0 4px rgba(179, 38, 30, .09);
}

.campo__error {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  margin-top: 8px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--error);
}
.campo__error::before {
  content: '';
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7' fill='%23B3261E'/%3E%3Cpath d='M8 4.5v4.2' stroke='%23fff' stroke-width='1.6' stroke-linecap='round'/%3E%3Ccircle cx='8' cy='11.3' r='.95' fill='%23fff'/%3E%3C/svg%3E") center / contain no-repeat;
}
.campo__error:empty { display: none; }

.campo--otro { margin-top: 16px; }

/* ---------- Desplegable con texto libre (grado) ---------- */

.combo { position: relative; scroll-margin-top: 76px; }
.campo .combo > input[role="combobox"] { padding-right: 52px; }
.combo__boton {
  position: absolute;
  top: 1px;
  right: 1px;
  bottom: 1px;
  display: grid;
  place-items: center;
  width: 46px;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--linea);
  border-radius: 0 9px 9px 0;
  background: transparent;
  color: var(--gris);
  cursor: pointer;
}
.combo__boton:hover { color: var(--azul); background: var(--azul-claro); }
.combo__boton svg { width: 18px; height: 18px; transition: transform .2s; }
.combo.esta-abierto .combo__boton svg { transform: rotate(180deg); }

.combo__lista {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 20;
  max-height: 300px;
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
  border: 1px solid var(--linea-campo);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 22px 44px -18px rgba(16, 32, 70, .38);
}
.combo__grupo {
  padding: 10px 12px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--oro);
}
.combo__grupo:not(:first-child) { margin-top: 4px; border-top: 1px solid var(--linea); padding-top: 14px; }
.combo__opcion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.35;
  color: var(--tinta);
  cursor: pointer;
}
.combo__opcion:hover,
.combo__opcion.esta-activa { background: var(--azul-claro); }
.combo__opcion[aria-selected="true"] { color: var(--azul); font-weight: 600; }
.combo__opcion[aria-selected="true"]::after {
  content: '';
  flex: none;
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%231B438F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.combo__vacio { padding: 12px; font-size: 14px; color: var(--gris); }

.tiene-error > .combo > input {
  border-color: var(--error);
  box-shadow: 0 0 0 4px rgba(179, 38, 30, .09);
}

.contador-texto {
  margin-top: 6px;
  font-size: 12.5px;
  text-align: right;
  color: var(--gris);
  font-variant-numeric: tabular-nums;
}

/* ---------- Opciones (baldosas) ---------- */

.opciones {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.opciones--compactas { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }

.opcion { position: relative; display: block; }
.opcion input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.opcion__caja {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--linea-campo);
  border-radius: 10px;
  background: #fff;
  color: var(--tinta);
  font-size: 15px;
  line-height: 1.35;
  cursor: pointer;
  user-select: none;
  transition: border-color .15s, background-color .15s, box-shadow .15s, opacity .15s;
}
.opcion__caja:hover { border-color: #9FB0CF; }
.opcion__marca {
  flex: none;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1.5px solid #97A1B4;
  border-radius: 6px;
  background: #fff;
  color: #fff;
  transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.opcion--radio .opcion__marca { border-radius: 50%; }
.opcion__marca svg { width: 14px; height: 14px; opacity: 0; transform: scale(.5); transition: opacity .15s, transform .15s; }

.opcion input:checked + .opcion__caja {
  border-color: var(--azul);
  background: var(--azul-claro);
  box-shadow: inset 0 0 0 1px var(--azul);
}
.opcion input:checked + .opcion__caja .opcion__marca { border-color: var(--azul); background: var(--azul); }
.opcion--checkbox input:checked + .opcion__caja .opcion__marca svg { opacity: 1; transform: none; }
.opcion--radio input:checked + .opcion__caja .opcion__marca { box-shadow: inset 0 0 0 4px #fff; }

.opcion input:focus-visible + .opcion__caja { outline: 3px solid rgba(27, 67, 143, .4); outline-offset: 2px; }

.opcion input:disabled + .opcion__caja { opacity: .42; cursor: not-allowed; }
.opcion input:disabled + .opcion__caja:hover { border-color: var(--linea-campo); }

.opciones--compactas .opcion__caja { justify-content: center; padding: 10px; font-weight: 500; text-align: center; }
.opciones--compactas .opcion__marca { display: none; }

.tiene-error > .opciones .opcion__caja { border-color: rgba(179, 38, 30, .55); }

/* ---------- Preguntas del paso 2 ---------- */

.tarjeta--preguntas { padding-top: clamp(26px, 3.6vw, 38px); }

.pregunta + .pregunta {
  margin-top: 34px;
  padding-top: 34px;
  border-top: 1px solid var(--linea);
}
.pregunta__titulo {
  display: flex;
  gap: 14px;
  width: 100%;
  margin-bottom: 6px;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
  line-height: 1.22;
  color: var(--tinta);
}
.pregunta > legend.pregunta__titulo { float: left; }
.pregunta > legend + * { clear: both; }
.campo .pregunta__titulo { display: flex; font-size: 25px; font-weight: 600; margin-bottom: 6px; line-height: 1.22; }
.pregunta__num {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-top: 1px;
  border: 1px solid var(--oro);
  border-radius: 50%;
  font-size: 16px;
  color: var(--oro);
  font-variant-numeric: lining-nums;
}
.pregunta__ayuda {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px 44px;
  font-size: 14px;
  color: var(--gris);
}
.pregunta .opciones,
.pregunta .campo--otro,
.pregunta > .campo__error,
.pregunta textarea,
.pregunta .contador-texto { margin-left: 44px; }
.pregunta textarea { width: calc(100% - 44px); }

.contador {
  display: inline-flex;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--azul-claro);
  color: var(--azul);
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: background-color .2s, color .2s;
}
.contador.esta-lleno { background: var(--azul); color: #fff; }

/* ---------- Pago ---------- */

.pago {
  overflow: hidden;
  border: 1px solid var(--linea);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--sombra);
}
.pago__cabecera {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px clamp(22px, 3.6vw, 36px);
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(420px 220px at 100% 0%, rgba(64, 104, 196, .45), transparent 70%),
    linear-gradient(135deg, var(--azul-hondo), var(--azul-noche));
}
.pago__cabecera::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--oro), var(--oro-claro), var(--oro));
}
.pago__antetitulo {
  margin-bottom: 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--oro-claro);
}
.pago__cabecera h3 { color: #fff; font-size: clamp(22px, 2.6vw, 27px); }
.pago__importe {
  flex: none;
  font-family: var(--serif);
  font-size: 56px;
  font-weight: 600;
  line-height: 1;
  color: var(--oro-claro);
  font-variant-numeric: lining-nums;
}
.pago__importe span { margin-left: 4px; font-size: .55em; vertical-align: .55em; }

.pago__cuerpo { padding: 22px clamp(22px, 3.6vw, 36px) clamp(22px, 3.6vw, 32px); }
.pago__instruccion { font-size: 15px; color: var(--gris); }

.pago__datos { margin: 10px 0 0; }
.pago__fila {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 16px;
  min-height: 60px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--linea);
}
.pago__fila dt {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gris);
}
.pago__fila dd {
  grid-column: 2;
  margin: 0;
  font-weight: 500;
  color: var(--tinta);
  overflow-wrap: anywhere;
}
#dato-iban { font-variant-numeric: tabular-nums; letter-spacing: .04em; }

.copiar {
  grid-column: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--linea-campo);
  border-radius: 8px;
  background: #fff;
  color: var(--azul);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, background-color .15s, color .15s;
}
.copiar::before {
  content: '';
  width: 14px;
  height: 14px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='5' y='5' width='8.5' height='8.5' rx='1.6' fill='none' stroke='black' stroke-width='1.5'/%3E%3Cpath d='M10.5 3.2V3a1.3 1.3 0 0 0-1.3-1.3H3.3A1.3 1.3 0 0 0 2 3v5.9a1.3 1.3 0 0 0 1.3 1.3h.2' fill='none' stroke='black' stroke-width='1.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='5' y='5' width='8.5' height='8.5' rx='1.6' fill='none' stroke='black' stroke-width='1.5'/%3E%3Cpath d='M10.5 3.2V3a1.3 1.3 0 0 0-1.3-1.3H3.3A1.3 1.3 0 0 0 2 3v5.9a1.3 1.3 0 0 0 1.3 1.3h.2' fill='none' stroke='black' stroke-width='1.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.copiar:hover { border-color: var(--azul); background: var(--azul-claro); }
.copiar.esta-copiado { border-color: var(--exito); background: #EAF6EF; color: var(--exito); }
.copiar.esta-copiado::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7.5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7.5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.pendiente {
  display: inline-flex;
  padding: 3px 11px;
  border: 1px dashed #D29A2E;
  border-radius: 999px;
  background: #FFF6E3;
  color: #7A5000;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
}

.nota {
  display: flex;
  gap: 14px;
  margin-top: 20px;
  padding: 16px 18px;
  border-left: 3px solid var(--oro);
  border-radius: 4px 10px 10px 4px;
  background: #FAF7F0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--texto);
}
.nota svg { flex: none; width: 22px; height: 22px; color: var(--oro); }
.nota strong { color: var(--tinta); }

/* ---------- Cláusulas legales ---------- */

.legal {
  padding: clamp(22px, 3.6vw, 36px);
  border: 1px solid var(--linea);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--sombra);
}
.legal h3 { font-size: 27px; }
.legal__texto {
  position: relative;
  max-height: 230px;
  margin-top: 16px;
  padding: 18px 20px;
  overflow: auto;
  border: 1px solid var(--linea);
  border-radius: 12px;
  background: #FAF8F3;
  font-size: 13.5px;
  line-height: 1.7;
  color: #4A5263;
}
.legal__texto p + p { margin-top: 10px; }
.legal__texto a { color: var(--azul); }

.consentimientos { margin-top: 10px; }
.casilla {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 15px 2px;
  border-bottom: 1px solid var(--linea);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--texto);
  cursor: pointer;
}
.consentimientos > .casilla:last-child { border-bottom: 0; padding-bottom: 4px; }
.casilla-campo .casilla { border-bottom: 0; }
.casilla-campo { border-bottom: 1px solid var(--linea); padding-bottom: 4px; }
.casilla-campo .campo__error { margin: -4px 0 12px 38px; }
.casilla input {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  border: 1.5px solid #97A1B4;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  transition: background-color .15s, border-color .15s;
}
.casilla input:checked {
  border-color: var(--azul);
  background: var(--azul) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.casilla input:focus-visible { outline: 3px solid rgba(27, 67, 143, .4); outline-offset: 2px; }
.tiene-error .casilla input { border-color: var(--error); box-shadow: 0 0 0 4px rgba(179, 38, 30, .09); }
.obligatoria {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--azul-claro);
  color: var(--azul);
  font-size: 11.5px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: .04em;
  vertical-align: 1px;
}

.error-envio {
  margin-top: 20px;
  padding: 14px 18px;
  border: 1px solid rgba(179, 38, 30, .3);
  border-radius: 12px;
  background: #FCEFED;
  color: var(--error);
  font-size: 14.5px;
  font-weight: 500;
}

/* ---------- Aviso de configuración (solo mientras falte algo) ---------- */

.aviso-config {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 50;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 10px 10px 10px 16px;
  border: 1px solid #E3B35A;
  border-radius: 12px;
  background: #FFF6E3;
  box-shadow: 0 12px 30px -14px rgba(0, 0, 0, .45);
  color: #6B4700;
  font-size: 13px;
  line-height: 1.45;
  transform: translateX(-50%);
}
.aviso-config p { padding-top: 3px; }
.aviso-config button {
  flex: none;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.aviso-config button:hover { background: rgba(107, 71, 0, .1); }

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1080px) {
  .inscripcion { grid-template-columns: 290px minmax(0, 1fr); }
  .lateral { padding: 34px 22px 28px; }
}

@media (max-width: 959px) {
  .portada__cuerpo { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .itinerario { max-width: 620px; }

  .inscripcion { grid-template-columns: minmax(0, 1fr); }
  .lateral { display: none; }
  .contenido { padding: 0; }

  .solo-movil { display: inline-flex !important; }
  .cabecera-paso {
    max-width: none;
    padding: 14px 20px 0;
    gap: 12px;
    justify-content: space-between;
    background: var(--azul-noche);
    color: #fff;
  }
  .cabecera-paso .marca__sigla { font-size: 23px; }
  .cabecera-paso .marca__sede { font-size: 10px; padding-left: 11px; }
  .cabecera-paso__texto { color: rgba(255, 255, 255, .7); font-size: 11.5px; }
  .cabecera-paso .progreso {
    flex-basis: 100%;
    margin: 0 -20px;
    border-radius: 0;
    background: rgba(255, 255, 255, .12);
  }
  .cabecera-paso .progreso__relleno { border-radius: 0; background: linear-gradient(90deg, var(--oro), var(--oro-claro)); }

  .formulario { padding: 28px 20px 36px; }
  .pie { padding: 20px; }
}

@media (max-width: 640px) {
  .portada { padding: 30px 24px 26px; }
  .portada__marco { inset: 9px; }
  .portada__curso { display: none; }
  .antetitulo { gap: 12px; font-size: 11.5px; letter-spacing: .15em; }
  .antetitulo::before { width: 24px; }
  .portada__cuerpo { padding: 44px 0 36px; }
  .ventajas { grid-template-columns: minmax(0, 1fr); }
  .portada__accion { margin-top: 30px; }
  .portada__accion .boton { width: 100%; }
  .portada__pie { font-size: 14px; }

  .rejilla { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .opciones { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .opciones--compactas { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .opcion__caja { min-height: 50px; }
  .combo__lista { max-height: 260px; }

  .pregunta__titulo,
  .campo .pregunta__titulo { font-size: 22px; gap: 12px; }
  .pregunta__num { width: 28px; height: 28px; font-size: 15px; }
  .pregunta__ayuda,
  .pregunta .opciones,
  .pregunta .campo--otro,
  .pregunta > .campo__error,
  .pregunta textarea,
  .pregunta .contador-texto { margin-left: 0; }
  .pregunta textarea { width: 100%; }

  .pago__cabecera { align-items: flex-start; }
  .pago__importe { font-size: 46px; }
  .pago__fila { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .pago__fila dt { grid-column: 1 / -1; }
  .pago__fila dd { grid-column: 1; }
  .copiar { grid-column: 2; }

  .paso__nav .boton { flex: 1; padding: 0 18px; }
  .paso__nav .boton--fantasma { flex: 0 0 auto; }
  .aviso-config { width: calc(100% - 32px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .emblema__balanza { stroke-dashoffset: 0; }
}
