:root {
  --primario: #0877a8;
  --acento: #1d9bd1;
  --tinta: #14212b;
  --suave: #53636e;
  --linea: #d9e2e8;
  --fondo: #f4f7f9;
  --boton: #d3f0e1;
  --boton-hover: #c1e8d2;
  --boton-borde: #43946b;
  --boton-texto: #14472b;
  --error-fondo: #fde8e8;
  --error-texto: #7a1c1c;
  --ok-fondo: #e3f6ec;
  --ok-texto: #14472b;
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--tinta); background: var(--fondo); line-height: 1.55; min-height: 100vh; display: flex; flex-direction: column;
}
img { max-width: 100%; display: block; }
a { color: var(--primario); }
h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.02em; }
h2 { font-size: 1.3rem; margin: 0 0 .5rem; }
p { margin: 0 0 1rem; }
:focus-visible { outline: 3px solid var(--acento); outline-offset: 2px; border-radius: 6px; }
.envoltorio { width: min(720px, 100% - 32px); margin-inline: auto; }
.saltar { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; border-radius: 8px; z-index: 10; }
.saltar:focus { left: 8px; }
.cabecera { background: #fff; border-bottom: 1px solid var(--linea); }
.cabecera .envoltorio { height: 76px; display: flex; align-items: center; }
.cabecera img { height: 44px; width: auto; }
main { flex: 1; padding: 28px 0 40px; }
.tarjeta { background: #fff; border: 1px solid var(--linea); border-radius: 16px; padding: clamp(18px, 4vw, 32px); box-shadow: 0 10px 30px rgba(20, 33, 43, .08); }
.entradilla { color: var(--suave); }
.tipos { display: flex; gap: 8px; margin: 0 0 1.25rem; }
.tipo { padding: 8px 16px; border: 1.5px solid var(--linea); border-radius: 999px; text-decoration: none; color: var(--tinta); font-weight: 600; }
.tipo[aria-current='true'] { background: var(--boton); border-color: var(--boton-borde); color: var(--boton-texto); }
.campo { margin-bottom: 1rem; }
.fila { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
label { display: block; font-weight: 600; margin-bottom: 4px; }
input[type='text'], input[type='email'], input[type='tel'], input[type='number'], textarea {
  width: 100%; font: inherit; color: inherit; padding: 11px 12px; border: 1.5px solid #b9c7d0; border-radius: 10px; background: #fff;
}
input:focus, textarea:focus { border-color: var(--primario); }
textarea { resize: vertical; min-height: 96px; }
fieldset { border: 1.5px solid var(--linea); border-radius: 12px; margin: 0 0 1rem; padding: 14px 16px 4px; }
fieldset[hidden] { display: none; }
legend { font-weight: 700; padding: 0 6px; }
.ayuda { color: var(--suave); font-size: .9rem; margin: 4px 0 0; }
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consentimiento { background: var(--fondo); border-radius: 12px; padding: 14px 16px; margin: 1.25rem 0; }
.casilla { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; margin: 0; cursor: pointer; }
.casilla input { width: 20px; height: 20px; margin-top: 3px; flex: none; }
.boton {
  display: inline-flex; align-items: center; justify-content: center; padding: 13px 22px; border-radius: 12px; font: inherit; font-weight: 700;
  border: 1.5px solid var(--boton-borde); background: var(--boton); color: var(--boton-texto); cursor: pointer; text-decoration: none;
}
.boton:hover { background: var(--boton-hover); }
.boton:disabled { opacity: .6; cursor: progress; }
.boton.secundario { background: #fff; border-color: var(--linea); color: var(--tinta); }
#enviar { width: 100%; min-height: 48px; }
.estado { border-radius: 10px; padding: 12px 14px; margin: 0 0 1rem; background: var(--fondo); }
.estado[hidden], .recibido[hidden], form[hidden] { display: none; }
.estado.error { background: var(--error-fondo); color: var(--error-texto); }
.estado.ok { background: var(--ok-fondo); color: var(--ok-texto); }
.aviso { background: #fff3cd; color: #5c3a00; border-radius: 10px; padding: 12px 14px; }
.recibido { background: var(--ok-fondo); color: var(--ok-texto); border-radius: 12px; padding: 18px 20px; }
.pie { border-top: 1px solid var(--linea); background: #fff; padding: 18px 0; font-size: .9rem; color: var(--suave); }
.pie .envoltorio { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
@media (max-width: 560px) {
  .fila { grid-template-columns: 1fr; }
  .tipos { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
