/* ── Variables ─────────────────────────────────── */
:root {
  --mint:       #01f3b3;
  --mint-dark:  #01f3b3;
  --mint-glow:  rgba(1, 243, 179, 0.25);
  --mint-soft:  rgba(1, 243, 179, 0.10);
  --mint-softer:rgba(1, 243, 179, 0.06);

  --bg:         #ffffff;
  --surface:    #ffffff;
  --surface-2:  #f8faf9;

  --border:     #e0e6e3;
  --border-act: #01f3b3;

  --text:       #111614;
  --text-muted: #6b7f78;
  --text-dim:   #b0bdb9;

  --radius:     14px;
  --radius-sm:  9px;
  --ease:       cubic-bezier(0.16, 1, 0.3, 1);

  font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
}

/* ── Reset ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding: 3rem 1.25rem 5rem;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  scrollbar-width: none;
}

body::-webkit-scrollbar { display: none; }

.noise { display: none; }

/* ── Container ─────────────────────────────────── */
.container {
  max-width: 540px;
  margin: 0 auto;
}

/* ── Hero ──────────────────────────────────────── */
.hero {
  margin-bottom: 2.75rem;
  animation: fadeUp 0.6s var(--ease) both;
  text-align: center;
}

.eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--mint-dark);
  margin-bottom: 0.75rem;
}

h1 {
  font-size: clamp(2.2rem, 7vw, 3.4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 0.6rem;
}

h1 em {
  font-style: normal;
  color: var(--mint-dark);
}

.hero-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 400;
  line-height: 1.5;
}

/* ── Progress track ────────────────────────────── */
.progress-track {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 2rem;
  animation: fadeUp 0.6s 0.08s var(--ease) both;
}

.progress-line {
  position: absolute;
  top: 13px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
  z-index: 0;
}

.progress-fill {
  height: 100%;
  background: var(--mint-dark);
  width: 0%;
  transition: width 0.5s var(--ease);
}

.step-dot {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border: none;
  cursor: default;
  padding: 0 4px;
}

.dot-inner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text-dim);
  transition: all 0.35s var(--ease);
}

.dot-label {
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  transition: color 0.35s;
  white-space: nowrap;
}

.step-dot.active .dot-inner {
  background: var(--mint);
  border-color: var(--mint);
  color: #000;
  box-shadow: 0 0 0 4px var(--mint-glow);
}

.step-dot.active .dot-label { color: var(--mint-dark); font-weight: 700; }

.step-dot.done .dot-inner {
  background: var(--mint-soft);
  border-color: var(--mint-dark);
  color: var(--mint-dark);
}

.step-dot.done .dot-label { color: var(--text-muted); }

/* ── Cards ─────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.03);
}

.card::before { display: none; }

.step-card { display: none; animation: fadeUp 0.45s var(--ease) both; }
.step-card.active { display: block; }

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.card-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mint-dark);
  margin-bottom: 1rem;
}

.btn-back {
  background: none;
  border: none;
  font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}

.btn-back:hover {
  color: var(--text);
}

.card h2 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 1.4rem;
  line-height: 1.2;
}

/* ── Choice cards ──────────────────────────────── */
.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.choice-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.15rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  background: var(--surface-2);
}

.choice-card:hover {
  border-color: var(--mint);
  background: var(--mint-softer);
}

.choice-card.selected {
  border-color: var(--mint);
  background: var(--mint-soft);
  box-shadow: 0 0 0 1px var(--mint);
}

.choice-icon {
  width: 30px;
  height: 30px;
  color: var(--mint-dark);
}

.choice-icon svg { width: 100%; height: 100%; }

.choice-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.choice-desc {
  font-size: 0.73rem;
  color: var(--text-muted);
  font-weight: 400;
  line-height: 1.4;
}

/* ── Exentos ───────────────────────────────────── */
.exentos {
  margin-top: 1.1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.exentos summary {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.75rem 1rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  transition: color 0.2s, background 0.2s;
}

.exentos summary::-webkit-details-marker { display: none; }

.exentos summary::after {
  content: '▾';
  font-size: 0.75rem;
  transition: transform 0.2s;
}

.exentos[open] summary::after {
  transform: rotate(180deg);
}

.exentos summary:hover {
  color: var(--text);
  background: var(--surface-2);
}

.exentos ul {
  list-style: none;
  padding: 0 1rem 0.85rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0;
}

.exentos ul li {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  line-height: 1.4;
}

.exentos ul li:last-child {
  border-bottom: none;
}

/* ── Renta list ────────────────────────────────── */
.renta-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.renta-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--surface-2);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  user-select: none;
}

.renta-item:hover {
  border-color: var(--mint);
  background: var(--mint-softer);
}

.renta-item.selected {
  border-color: var(--mint);
  background: var(--mint-soft);
  box-shadow: 0 0 0 1px var(--mint);
}

.renta-label {
  font-size: 0.87rem;
  color: var(--text);
  font-weight: 400;
}

.renta-badge {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--mint-dark);
  background: var(--mint-soft);
  padding: 0.18rem 0.6rem;
  border-radius: 20px;
  border: 1px solid rgba(0, 184, 130, 0.25);
  white-space: nowrap;
  margin-left: 0.75rem;
  flex-shrink: 0;
}

/* ── Selects ───────────────────────────────────── */
.select-group {
  margin-bottom: 1rem;
}

.select-group.hidden { display: none; }

.select-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.label-hint {
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-dim);
}

.select-wrap { position: relative; }

select {
  width: 100%;
  padding: 0.7rem 2.4rem 0.7rem 0.9rem;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.88rem;
  font-weight: 400;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

select:focus {
  outline: none;
  border-color: var(--mint);
  box-shadow: 0 0 0 3px var(--mint-glow);
}

.select-arrow {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  color: var(--text-muted);
  pointer-events: none;
}

/* ── Mode pills ────────────────────────────────── */
.mode-pills {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.mode-pill {
  flex: 1;
  padding: 0.45rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: var(--surface-2);
  color: var(--text-muted);
  font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.mode-pill.active {
  background: var(--mint-soft);
  border-color: var(--mint);
  color: var(--text);
  font-weight: 700;
}

.mode-pill:hover:not(.active) {
  border-color: var(--mint);
  color: var(--text);
}

/* ── Search / Autocomplete ─────────────────────── */
.search-wrap {
  position: relative;
}

.search-wrap input[type="text"] {
  width: 100%;
  padding: 0.7rem 0.9rem 0.7rem 2.4rem;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.88rem;
  font-weight: 400;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-wrap input[type="text"]::placeholder {
  color: var(--text-dim);
}

.search-wrap input[type="text"]:focus {
  outline: none;
  border-color: var(--mint);
  box-shadow: 0 0 0 3px var(--mint-glow);
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--text-dim);
  pointer-events: none;
}

.suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1.5px solid var(--mint);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  list-style: none;
  padding: 0.3rem 0;
  z-index: 100;
  overflow-y: auto;
  max-height: 260px;
  scrollbar-width: none;
}

.suggestions::-webkit-scrollbar { display: none; }

.suggestions[hidden] { display: none; }

.suggestions li {
  padding: 0.6rem 0.9rem;
  font-size: 0.87rem;
  color: var(--text);
  cursor: pointer;
  transition: background 0.12s;
  outline: none;
}

.suggestions li:hover,
.suggestions li:focus {
  background: var(--mint-soft);
}

.suggestions li mark {
  background: transparent;
  color: var(--mint-dark);
  font-weight: 700;
}

.suggestions li.no-results {
  color: var(--text-dim);
  font-style: italic;
  cursor: default;
  pointer-events: none;
}

/* ── Botón calcular ────────────────────────────── */
.btn-calcular {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.85rem;
  background: var(--text);
  color: #fff;
  font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.btn-calcular:hover {
  background: #222;
  transform: translateY(-1px);
}

.btn-calcular.hidden { display: none; }

/* ── Resultado ─────────────────────────────────── */
.result-card { border-color: var(--mint); box-shadow: 0 0 0 1px var(--mint), 0 4px 24px var(--mint-glow); }

.result-hero {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-bottom: 1.4rem;
  margin-bottom: 1.4rem;
  border-bottom: 1px solid var(--border);
}

.result-eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.result-amount {
  font-size: clamp(3rem, 10vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--mint-dark);
  line-height: 1;
}

.result-details {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.detail-row:last-child { border-bottom: none; }

.detail-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
}

.detail-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  text-align: right;
  max-width: 55%;
}

.info-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text-dim);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  font-style: normal;
  cursor: default;
  position: relative;
  vertical-align: middle;
  margin-left: 4px;
  flex-shrink: 0;
}

.info-tip .tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.45;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  width: 230px;
  text-align: left;
  pointer-events: none;
  z-index: 10;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.info-tip .tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--text);
}

.info-tip:hover .tooltip,
.info-tip:focus .tooltip {
  display: block;
}

.result-note {
  font-size: 0.72rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 1.4rem;
}

.btn-reiniciar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem;
  background: transparent;
  color: var(--text-muted);
  font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.83rem;
  font-weight: 400;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.btn-reiniciar svg { width: 15px; height: 15px; }

.btn-reiniciar:hover {
  color: var(--mint-dark);
  border-color: var(--mint);
}

/* ── Animaciones ───────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes glowPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.8; }
}

/* ── Nota resultado ────────────────────────────── */
.result-nota {
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--text);
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

/* ── Footer fuente ─────────────────────────────── */
.fuente {
  max-width: 560px;
  margin: 2rem auto 2.5rem;
  padding: 0 1.25rem;
  text-align: center;
}
.fuente p {
  font-size: 0.72rem;
  line-height: 1.55;
  color: var(--text-dim);
}

/* ── Responsive ────────────────────────────────── */
@media (max-width: 400px) {
  .choice-grid { grid-template-columns: 1fr; }
  .card { padding: 1.35rem 1.1rem; }
  .dot-label { display: none; }
}
