:root {
  --imss: #006847;
  --imss-oscuro: #004d35;
  --azul: #17365d;
  --fondo: #eef3f5;
  --texto: #243746;
  --suave: #667985;
  --borde: #d5e0e4;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: linear-gradient(180deg, #e8f1ee 0, var(--fondo) 260px);
  color: var(--texto);
  font-family: "Segoe UI", Arial, sans-serif;
}
.contenedor { width: min(680px, calc(100% - 28px)); margin: 24px auto 45px; }
.centro { min-height: calc(100vh - 50px); display: grid; place-items: center; }
.encabezado { padding: 14px 4px 18px; }
.encabezado h1, .confirmacion h1 { color: var(--azul); margin: 5px 0; font-size: clamp(27px, 7vw, 38px); }
.encabezado p, .confirmacion > p { margin: 5px 0; color: var(--suave); }
.institucion { color: var(--imss); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.tarjeta { background: white; border: 1px solid var(--borde); border-radius: 14px; box-shadow: 0 8px 26px rgba(25,55,72,.08); }
.ubicacion { padding: 18px 20px; margin-bottom: 14px; border-left: 5px solid var(--imss); }
.ubicacion h2 { color: var(--azul); margin: 5px 0; font-size: 21px; }
.ubicacion p { margin: 4px 0 0; color: var(--suave); }
.etiqueta { color: var(--imss); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.formulario { padding: 22px 20px; }
.pregunta { display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: start; padding: 16px 0; border-bottom: 1px solid #e4ecef; }
.pregunta:first-of-type { padding-top: 0; }
.numero { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--imss); color: white; font-weight: 800; }
.contenido-pregunta label { margin-top: 4px; }
.otro-en-pregunta { margin-top: 12px; padding: 12px; border-radius: 8px; background: #f1f7f5; border-left: 4px solid var(--imss); }
.otro-en-pregunta label { margin: 0 0 7px; font-size: 14px; }
.separador-formulario { height: 1px; background: #dce6e9; margin: 22px 0; }
fieldset { border: 0; border-top: 1px solid #dce6e9; margin: 24px 0 0; padding: 18px 0 0; }
fieldset:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
legend { color: var(--imss-oscuro); font-size: 18px; font-weight: 800; padding: 0 8px 0 0; }
[hidden] { display: none !important; }
label { display: block; margin: 17px 0 7px; color: var(--azul); font-weight: 700; }
label:first-of-type { margin-top: 0; }
label strong { color: #b42318; }
input, select, textarea {
  width: 100%; border: 1px solid #afc0c8; border-radius: 8px;
  padding: 12px 13px; color: var(--texto); background: white; font: inherit;
}
textarea { resize: vertical; min-height: 115px; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(0,104,71,.15); border-color: var(--imss); }
input[type="file"] { padding: 10px; background: #f7fafb; }
.aviso, .obligatorio, .nota { color: var(--suave); font-size: 13px; line-height: 1.45; }
button {
  width: 100%; margin-top: 20px; border: 0; border-radius: 9px;
  padding: 14px; background: var(--imss); color: white; font: inherit;
  font-weight: 800; cursor: pointer;
}
button:hover { background: var(--imss-oscuro); }
.alerta { border-radius: 9px; padding: 12px 14px; margin: 12px 0; line-height: 1.4; }
.error { color: #8a251c; background: #fff0ee; border: 1px solid #efb1aa; }
.oculto { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.confirmacion { width: 100%; padding: 34px 24px; text-align: center; }
.circulo {
  width: 66px; height: 66px; margin: 0 auto 17px; border-radius: 50%;
  display: grid; place-items: center; color: white; background: var(--imss);
  font-size: 34px; font-weight: 800;
}
.error-circulo { background: #b42318; }
.folio { margin: 24px 0 18px; padding: 17px; border-radius: 10px; background: #edf7f3; }
.folio span { display: block; color: var(--suave); font-size: 12px; text-transform: uppercase; }
.folio strong { display: block; margin-top: 5px; color: var(--imss-oscuro); font-size: 25px; letter-spacing: .04em; }
.dato { margin: 7px 0; }
.dos-columnas { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dos-columnas label { margin-top: 17px; }
@media (max-width: 480px) {
  .contenedor { margin-top: 12px; }
  .formulario, .confirmacion { padding: 20px 16px; }
  .dos-columnas { grid-template-columns: 1fr; gap: 0; }
  .pregunta { grid-template-columns: 34px 1fr; gap: 9px; }
}
