/* Colores (contraste sobre el fondo #ffffff): texto #1b1f24 (16,6:1), botón principal #0a4f8f con texto blanco
   (8,3:1), error #a3201b (7,6:1), borde de campos #5c6670 (5,9:1), contorno de foco #0a4f8f (8,3:1). No se usa el color solo para dar información. */
:root {
  --fondo: #ffffff;
  --texto: #1b1f24;
  --principal: #0a4f8f;
  --error: #a3201b;
  --borde: #5c6670;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font: 1.0625rem/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

main {
  max-width: 34rem;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

h1 {
  font-size: 1.5rem;
  line-height: 1.25;
}

h2 {
  font-size: 1.25rem;
}

label {
  display: block;
  margin-top: 1rem;
  font-weight: 600;
}

input {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.625rem 0.75rem;
  border: 2px solid var(--borde);
  border-radius: 0.375rem;
  font: inherit;
  color: var(--texto);
  background: var(--fondo);
}

button {
  min-height: 2.75rem;
  margin-top: 1.25rem;
  padding: 0.625rem 1.25rem;
  border-radius: 0.375rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

button.principal {
  border: 2px solid var(--principal);
  background: var(--principal);
  color: #ffffff;
}

button.secundario {
  border: 2px solid var(--texto);
  background: var(--fondo);
  color: var(--texto);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.botones {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

:focus-visible {
  outline: 3px solid var(--principal);
  outline-offset: 2px;
}

.error {
  color: var(--error);
  font-weight: 600;
}

.error::before {
  content: "Error: ";
}

.nota {
  font-size: 0.95rem;
}

/* Aviso de destino inesperado: fondo #fff4f2, borde #a3201b (7,0:1 sobre ese fondo), texto #1b1f24 (15,4:1) y la
   palabra «Atención»: no depende solo del color. */
.aviso {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border: 3px solid var(--error);
  border-radius: 0.375rem;
  background: #fff4f2;
}

.confirmar {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-weight: 600;
}

.confirmar input {
  width: auto;
  margin-top: 0.3rem;
}

button.enlace {
  min-height: 2.75rem;
  margin-top: 0.75rem;
  padding: 0.5rem 0;
  border: 0;
  background: none;
  color: var(--principal);
  text-decoration: underline;
}
