:root {
  --navy: #123a63;
  --navy-d: #0e2e4e;
  --red: #b0211e;
  --ink: #23303f;
  --muted: #6b7480;
  --line: #e2e6ec;
  --line-2: #d5dbe2;
  --bg: #f4f6f8;
  --card: #ffffff;
  --ok: #197a3d;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100dvh;
}
.app {
  max-width: 520px; margin: 0 auto; padding: 20px 16px 28px;
  min-height: 100dvh; display: flex; flex-direction: column;
}

/* Header */
.head { text-align: center; padding: 14px 0 20px; }
.logo { height: 84px; width: auto; }
.head-sub { margin: 8px 0 0; color: var(--muted); font-size: 13.5px; }

/* Stepper */
.stepper { display: flex; align-items: center; gap: 8px; padding: 0 4px 18px; }
.stepper .dot { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.stepper .dot i {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-style: normal; font-weight: 700; font-size: 13px;
  color: var(--muted); background: #fff; border: 1.5px solid var(--line-2);
}
.stepper .dot label { font-size: 11px; color: var(--muted); }
.stepper .bar { flex: 1; height: 2px; background: var(--line-2); }
.stepper .dot.active i { background: var(--navy); color: #fff; border-color: var(--navy); }
.stepper .dot.active label { color: var(--navy); font-weight: 600; }
.stepper .dot.done i { background: #fff; color: var(--navy); border-color: var(--navy); }

/* Card */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 24px 22px; box-shadow: 0 1px 2px rgba(20,40,70,.05);
}
.card.hidden { display: none; }
h1 { font-size: 21px; margin: 0 0 4px; color: var(--navy); font-weight: 700; }
.hint { margin: 0 0 20px; color: var(--muted); font-size: 14px; }

/* Fields */
.field { margin-bottom: 15px; }
.field label, #form-fields label { display: block; font-size: 13px; font-weight: 600; color: #3a4756; margin-bottom: 6px; }
input, select, textarea {
  width: 100%; padding: 12px 13px; font-size: 16px; color: var(--ink);
  background: #fff; border: 1px solid var(--line-2); border-radius: 8px;
  transition: border-color .12s, box-shadow .12s; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(18,58,99,.12); }
textarea { min-height: 90px; resize: vertical; }
select {
  appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7480' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
}

/* File picker */
.filewrap input[type="file"] { display: none; }
.filebtn {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 13px; border: 1px dashed var(--line-2); border-radius: 8px; background: #fff;
  color: var(--muted); font-size: 14.5px; transition: border-color .12s, color .12s;
}
.filebtn:hover { border-color: var(--navy); color: var(--navy); }
.filebtn.has { border-style: solid; border-color: var(--ok); color: #14532d; background: #f4fbf6; }
.filebtn svg { width: 19px; height: 19px; flex: 0 0 auto; }

/* Buttons */
button { cursor: pointer; border: none; font-family: inherit; }
.primary {
  width: 100%; padding: 14px; border-radius: 8px; font-size: 15.5px; font-weight: 600;
  color: #fff; background: var(--navy); transition: background .12s; margin-top: 4px;
}
.primary:hover { background: var(--navy-d); }
.primary:disabled { background: #b7c0cc; cursor: not-allowed; }
.ghost {
  width: 100%; padding: 12px; border-radius: 8px; font-size: 15px; font-weight: 600;
  color: var(--navy); background: #fff; border: 1px solid var(--line-2); transition: background .12s;
}
.ghost:hover { background: #f4f6f8; }
.row { display: flex; gap: 12px; margin-top: 12px; }
.row button { flex: 1; margin-top: 0; }

/* Choice list */
.choices { display: grid; gap: 10px; margin-bottom: 16px; }
.choice {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 16px; text-align: left; width: 100%;
  padding: 16px 16px 16px 18px; border-radius: 10px; background: #fff; border: 1px solid var(--line-2);
  transition: border-color .12s, background .12s;
}
.choice::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--red); transform: scaleY(0); transform-origin: center; transition: transform .15s;
}
.choice:hover { border-color: var(--navy); background: #fafbfc; }
.choice:hover::before { transform: scaleY(1); }
.choice .idx {
  font-variant-numeric: tabular-nums; font-weight: 700; font-size: 17px;
  color: #b3bcc8; flex: 0 0 auto; min-width: 26px;
}
.choice:hover .idx { color: var(--navy); }
.choice .ct { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.choice .ct strong { font-size: 15.5px; color: var(--ink); font-weight: 600; }
.choice .ct small { font-size: 12.5px; color: var(--muted); }
.choice .chev { font-size: 22px; line-height: 1; color: #b3bcc8; flex: 0 0 auto; }
.choice:hover .chev { color: var(--navy); }

/* Error */
.error { color: #8a1a17; font-size: 14px; font-weight: 600; margin: 4px 0 0; padding: 10px 12px; background: #fbeeee; border: 1px solid #f2cfcf; border-radius: 8px; }
.error.hidden { display: none; }

/* Success */
#step-done { text-align: center; padding: 36px 22px; }
.success {
  width: 72px; height: 72px; margin: 0 auto 20px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: var(--ok);
}
.success svg { width: 38px; height: 38px; }
#done-msg { font-size: 16px; font-weight: 600; color: var(--ink); margin: 0 0 22px; line-height: 1.5; }

.foot { text-align: center; color: #9aa4b0; font-size: 12px; margin-top: auto; padding-top: 22px; }

/* Honeypot: fuera de pantalla (mejor que display:none contra bots) */
.hp { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
