:root {
  color-scheme: light;
  --blue: #0057a8;
  --blue-deep: #003b73;
  --blue-soft: #e7f0fa;
  --coral: #f2804f;
  --coral-soft: #fbe6da;
  --green: #1e8e5a;
  --green-soft: #e7f5ee;
  --danger: #c7382f;
  --danger-soft: #fdecea;
  --warning: #9a5a13;
  --warning-soft: #fff5e6;
  --ink: #1e2329;
  --muted: #667085;
  --line: #e3e9f1;
  --surface: #fff;
  --canvas: #f1f6fc;
  --shadow-card: 0 1px 2px rgba(16, 40, 72, .04), 0 12px 32px -16px rgba(16, 40, 72, .18);
  --shadow-pop: 0 18px 50px -20px rgba(0, 87, 168, .45);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; letter-spacing: 0; }
html { min-height: 100%; -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--canvas);
  color: var(--ink);
  font: 15px/1.45 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

button, input { font: inherit; }
button { touch-action: manipulation; }
.hidden { display: none !important; }

.toprule { height: 3px; background: var(--coral); }
.topbar { padding: 20px; background: var(--blue); text-align: center; }
.topbar .logo { display: inline-block; width: auto; height: 46px; vertical-align: middle; }

.shell { width: min(760px, calc(100% - 40px)); margin: 0 auto; padding: 8px 0 64px; }
.stepper-shell { padding-bottom: 0; }
.sitefoot { margin-top: auto; padding: 22px 20px 26px; background: var(--blue); color: #fff; text-align: center; }
.sitefoot b { display: block; font-size: 13.5px; font-weight: 600; }
.sitefoot span { display: block; margin-top: 5px; color: #bbd3ec; font-size: 12.5px; }

.stepper { display: flex; align-items: flex-start; margin: 18px 2px 22px; }
.stepper .node { position: relative; display: flex; flex: 1 1 0; flex-direction: column; align-items: center; gap: 8px; }
.stepper .node:not(:first-child)::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 15px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: var(--line);
}
.stepper .node.done::before, .stepper .node.active::before { background: var(--blue); }
.stepper .dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  transition: all .35s var(--ease);
}
.stepper .node.active .dot { border-color: var(--blue); background: var(--blue); color: #fff; box-shadow: 0 0 0 5px var(--blue-soft); }
.stepper .node.done .dot { border-color: var(--blue); background: var(--blue); color: #fff; }
.stepper .label { color: var(--muted); font-size: 12.5px; font-weight: 600; line-height: 1.2; text-align: center; }
.stepper .node.active .label { color: var(--blue-deep); }
.stepper .node.done .label { color: var(--blue); }
.stepper svg { width: 15px; height: 15px; }

.card {
  margin-bottom: 14px;
  padding: 26px 26px 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.card .eyebrow { display: inline-block; margin: 0 0 12px; padding: 4px 11px; border-radius: 999px; background: var(--coral-soft); color: #b54218; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.card h2 { margin: 0 0 5px; color: var(--blue-deep); font-family: "Righteous", "Inter", sans-serif; font-size: 25px; font-weight: 400; }
.card .lede { margin: 0 0 20px; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.appear { animation: appear .45s var(--ease) both; }
@keyframes appear { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.summary { display: flex; align-items: center; gap: 13px; width: 100%; margin-bottom: 12px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-card); }
.summary .ic { display: grid; flex: 0 0 auto; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--green-soft); color: var(--green); }
.summary .ic svg { width: 17px; height: 17px; }
.summary .txt { min-width: 0; }
.summary .txt b { display: block; color: var(--ink); font-size: 13px; font-weight: 600; }
.summary .txt span { display: block; margin-top: 1px; overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }

.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: 1fr 1fr; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: flex; min-width: 0; flex-direction: column; gap: 7px; }
.field label { color: var(--blue-deep); font-size: 13px; font-weight: 600; }
.field .hint { color: var(--muted); font-size: 12px; font-weight: 400; }
.field input {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  transition: border-color .18s, box-shadow .18s;
}
.field input::placeholder { color: #aeb6c2; }
.field input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.field.invalid input { border-color: #e0463c; box-shadow: 0 0 0 4px #fce9e7; }
.field .err { display: none; color: var(--danger); font-size: 12.5px; font-weight: 500; }
.field.invalid .err { display: block; }
.cuil-picker { position: relative; }
.cuil-picker input { padding-right: 46px; }
.cuil-picker-toggle { position: absolute; top: 0; right: 0; width: 44px; height: 46px; border: 0; border-radius: 0 8px 8px 0; background: transparent; color: var(--blue); cursor: pointer; font-size: 20px; line-height: 1; }
.cuil-picker-toggle:hover, .cuil-picker-toggle:focus-visible { background: var(--blue-soft); outline: none; }
.cuil-options { position: relative; z-index: 3; display: grid; gap: 2px; max-height: 190px; margin-top: 4px; padding: 4px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow-pop); }
.cuil-options[hidden] { display: none; }
.cuil-option { width: 100%; padding: 9px 11px; border: 0; border-radius: 5px; background: transparent; color: var(--ink); cursor: pointer; text-align: left; }
.cuil-option:hover, .cuil-option:focus-visible { background: var(--blue-soft); color: var(--blue-deep); outline: none; }
.num { font-variant-numeric: tabular-nums; }
.documents { margin-top: 4px; padding-top: 18px; border-top: 1px dashed var(--line); }
.documents-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.documents-head b { color: var(--blue-deep); font-size: 14px; }
.documents-head span { color: var(--muted); font-size: 12px; }
.file-field input { min-height: 74px; padding: 10px; color: var(--muted); font-size: 12px; }
.file-field input::file-selector-button { margin: 0 8px 5px 0; padding: 7px 10px; border: 0; border-radius: 6px; background: var(--blue-soft); color: var(--blue); cursor: pointer; font-weight: 600; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 12px 22px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: transform .12s var(--ease), box-shadow .2s, background .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 10px 24px -12px rgba(0, 87, 168, .85); }
.btn-primary:hover { background: var(--blue-deep); }
.btn-ghost { border: 1.5px solid var(--line); background: #fff; color: var(--blue); }
.btn-ghost:hover { border-color: var(--blue); background: var(--blue-soft); }
.btn[disabled] { cursor: not-allowed; opacity: .58; transform: none; box-shadow: none; }
.btn .spin { width: 16px; height: 16px; border: 2.5px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.btn-ghost .spin { border-color: rgba(0, 87, 168, .3); border-top-color: var(--blue); }
@keyframes spin { to { transform: rotate(360deg); } }
.actions { display: flex; align-items: center; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.actions .grow { margin-left: auto; }

.notice { display: flex; align-items: flex-start; gap: 11px; margin-top: 18px; padding: 13px 15px; border-radius: 10px; font-size: 14px; line-height: 1.45; }
.notice svg { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 1px; }
.notice.ok { border: 1px solid #bfe6cf; background: var(--green-soft); color: #13693f; }
.notice.bad { border: 1px solid #f6c9c3; background: var(--danger-soft); color: #9a2820; }
.notice.warn { border: 1px solid #f2d6ad; background: var(--warning-soft); color: var(--warning); }

.limit-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin: 0 0 18px; padding-bottom: 18px; border-bottom: 1px dashed var(--line); }
.limit-box { display: flex; flex-direction: column; gap: 2px; }
.limit-box .k { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; }
.limit-box .v { color: var(--blue-deep); font-family: "Righteous", "Inter", sans-serif; font-size: 27px; font-variant-numeric: tabular-nums; font-weight: 400; line-height: 1; }

.plans { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 22px; }
.plan { position: relative; min-height: 108px; overflow: hidden; padding: 14px 13px 13px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); cursor: pointer; text-align: left; transition: transform .16s var(--ease), border-color .16s, box-shadow .2s; }
.plan::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: transparent; }
.plan:hover { border-color: #b9cbe0; transform: translateY(-2px); }
.plan .monto { color: var(--blue-deep); font-size: 16px; font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.plan .cuotas { margin-top: 5px; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.plan .cuotas b { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 600; }
.plan[aria-pressed="true"] { border-color: var(--blue); box-shadow: var(--shadow-pop); transform: translateY(-3px); }
.plan[aria-pressed="true"]::before { background: var(--coral); }
.plan .pick { position: absolute; top: 9px; right: 9px; display: none; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--blue); }
.plan[aria-pressed="true"] .pick { display: grid; }
.plan .pick svg { width: 11px; height: 11px; color: #fff; }

.recalc { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 14px; }
.recalc .btn { min-width: 150px; }

.final { padding: 42px 26px 36px; text-align: center; }
.final .seal { display: grid; place-items: center; width: 74px; height: 74px; margin: 0 auto 18px; border-radius: 50%; background: var(--green-soft); animation: pop .5s var(--ease) both; }
.final .seal svg { width: 38px; height: 38px; color: var(--green); }
.final h2 { margin: 0 0 8px; color: var(--blue-deep); font-family: "Righteous", "Inter", sans-serif; font-size: 27px; font-weight: 400; }
.final p { max-width: 460px; margin: 0 auto 6px; color: var(--muted); font-size: 15px; line-height: 1.55; }
@keyframes pop { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: scale(1); } }

@media (max-width: 680px) {
  .shell { width: min(100% - 28px, 760px); }
  .card { padding: 22px 18px 24px; }
  .plans { grid-template-columns: repeat(5, minmax(132px, 1fr)); margin-right: -2px; margin-left: -2px; padding: 4px 2px 10px; overflow-x: auto; scroll-snap-type: x mandatory; }
  .plan { scroll-snap-align: start; }
  .recalc, .grid.two, .grid.three { grid-template-columns: 1fr; }
  .documents-head { align-items: flex-start; flex-direction: column; gap: 3px; }
  .recalc .btn { width: 100%; }
  .actions .grow { width: 100%; margin-left: 0; }
  .stepper .label { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
