/* Madrinas Insurance brand (Madrinas_BrandGuidelines.pdf): blues dominate, bright accents.
   Futura PT is the brand face; fall back to similar geometric system fonts (no external font requests). */
:root {
  --blue: #0078cd;
  --blue-dark: #005a9a;
  --bright: #00b6ed;
  --magenta: #ff399e;
  --yellow: #ffeb00;
  --orange: #fbab18;
  --green: #7cc242;
  --red: #ed383f;
  --ink: #404040;          /* 75% black */
  --muted: #6b6b6b;        /* 70% gray copy */
  --line: #d9e6f2;
  --bg: #f2f8fd;
  --card: #ffffff;
  --radius: 14px;
  font-family: "Futura PT", Futura, "Century Gothic", "Avenir Next", Avenir, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% -10%, rgba(0, 182, 237, .18), transparent 40%),
    radial-gradient(circle at 110% 10%, rgba(255, 57, 158, .10), transparent 35%),
    var(--bg);
  line-height: 1.5;
  font-size: 16px;
}

.top {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 640px; margin: 0 auto; padding: 20px 16px 8px;
}
.logo { width: 180px; height: auto; }
.lang { display: flex; border: 2px solid var(--blue); border-radius: 999px; overflow: hidden; }
.lang button {
  border: 0; background: transparent; color: var(--blue); font: inherit; font-weight: 700;
  padding: 6px 14px; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--blue); color: #fff; }

.banner {
  max-width: 640px; margin: 8px auto 0; padding: 10px 16px; border-radius: 10px;
  background: #fff8c2; border-left: 6px solid var(--yellow); font-size: 14px;
}

.card {
  max-width: 640px; margin: 12px auto; background: var(--card); border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 90, 154, .10); padding: 0 24px 24px; overflow: hidden;
}
@media (max-width: 672px) { .card, .banner { margin-left: 16px; margin-right: 16px; } .card { padding: 0 16px 20px; } }

.progress { height: 6px; background: var(--line); margin: 0 -24px 16px; }
@media (max-width: 672px) { .progress { margin: 0 -16px 16px; } }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--bright)); transition: width .3s ease; }
.step-count { margin: 0; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

h1 { color: var(--blue); font-size: 26px; line-height: 1.2; margin: 6px 0 8px; font-weight: 800; letter-spacing: -.01em; }
h2 { color: var(--blue); margin: 0 0 8px; }
.hint { color: var(--muted); margin: 0 0 18px; }
.fine { color: var(--muted); font-size: 13px; }

.field { display: block; border: 0; padding: 0; margin: 0 0 14px; }
.field > span, .field > legend { display: block; font-weight: 700; margin-bottom: 6px; }
.field small { display: block; color: var(--muted); margin: -2px 0 8px; }

input[type="text"], input[type="email"], input[type="tel"], input[type="date"], input[type="number"], input:not([type]) {
  width: 100%; font: inherit; font-size: 18px; padding: 12px 14px; border: 2px solid var(--line);
  border-radius: 10px; background: #fff; color: var(--ink);
}
input:focus { outline: none; border-color: var(--bright); box-shadow: 0 0 0 3px rgba(0, 182, 237, .25); }
input[aria-invalid="true"] { border-color: var(--red); }

.choices { display: grid; gap: 10px; }
.choices.two { grid-template-columns: 1fr 1fr; }
.choice {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 2px solid var(--line);
  border-radius: 10px; cursor: pointer; font-weight: 600; background: #fff;
}
.choice:has(input:checked) { border-color: var(--blue); background: #eaf4fc; }
.choice input { accent-color: var(--blue); width: 18px; height: 18px; margin: 0; }

.stepper { display: flex; gap: 8px; align-items: stretch; max-width: 220px; }
.stepper input { text-align: center; }
.stepper button {
  width: 52px; border: 2px solid var(--blue); background: #fff; color: var(--blue); border-radius: 10px;
  font-size: 24px; font-weight: 700; cursor: pointer;
}
.money { display: flex; align-items: center; border: 2px solid var(--line); border-radius: 10px; background: #fff; }
.money:focus-within { border-color: var(--bright); box-shadow: 0 0 0 3px rgba(0, 182, 237, .25); }
.money span { padding-left: 14px; font-size: 18px; color: var(--muted); }
.money input { border: 0; box-shadow: none !important; }

.plans { display: grid; gap: 12px; }
.plan {
  display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; padding: 14px; border: 2px solid var(--line);
  border-radius: 12px; cursor: pointer; background: #fff;
}
.plan:has(input:checked) { border-color: var(--blue); background: #eaf4fc; }
.plan input { grid-row: span 3; accent-color: var(--blue); width: 20px; height: 20px; margin-top: 4px; }
.plan .name { font-weight: 800; color: var(--blue-dark); }
.plan .meta { font-size: 14px; color: var(--muted); }
.metal { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: #f4d7b4; color: #6a3d00; }
.tag {
  display: inline-block; margin: 0 0 10px; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: rgba(255, 57, 158, .12); color: #b0186a;
}

.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: 8px 0 4px; }
.consent input { accent-color: var(--blue); width: 20px; height: 20px; margin-top: 2px; flex: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }

.summary { display: grid; grid-template-columns: 1fr auto; gap: 0; margin: 0 0 12px; }
.summary dt, .summary dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); }
.summary dt { color: var(--muted); font-size: 14px; }
.summary dt b { display: block; color: var(--ink); font-size: 16px; }
.summary dd { text-align: right; }
.summary dd button { border: 0; background: none; color: var(--blue); font: inherit; font-weight: 700; cursor: pointer; padding: 0; }

.error { color: var(--red); font-size: 14px; margin: -6px 0 10px; min-height: 0; }
.error:empty { display: none; }
.form-error { margin: 12px 0 0; }

.actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }
.btn {
  font: inherit; font-weight: 800; font-size: 17px; border-radius: 999px; padding: 12px 24px; cursor: pointer;
  border: 2px solid transparent; text-decoration: none; text-align: center; display: inline-block;
}
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-dark); }
.btn.primary[disabled] { opacity: .6; cursor: progress; }
.btn.ghost { background: #fff; color: var(--blue); border-color: var(--blue); }
.btn.link { background: none; color: var(--blue); padding: 8px 0; }
.btn.wide { display: block; width: 100%; margin: 8px 0 12px; }
#next { margin-left: auto; min-width: 160px; }

.done-icon {
  width: 64px; height: 64px; border-radius: 50%; background: var(--green); color: #fff; font-size: 36px; font-weight: 800;
  display: grid; place-items: center; margin: 8px 0 4px;
}
.done-icon.warn { background: var(--orange); }

dialog {
  border: 0; border-radius: var(--radius); padding: 24px; max-width: min(440px, calc(100vw - 32px));
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25); color: var(--ink);
}
dialog::backdrop { background: rgba(0, 40, 70, .45); }
dialog .actions { margin-top: 16px; }

.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 8px 16px 32px; max-width: 640px; margin: 0 auto; }
.tagline { color: var(--blue); font-weight: 800; font-size: 15px; margin-bottom: 4px; }

@media (max-width: 420px) {
  h1 { font-size: 22px; }
  .choices.two { grid-template-columns: 1fr; }
  .logo { width: 140px; }
}
