/* ── Calculadora de Redención de Pena ─────────────────────────────────
   Tono sobrio e institucional (es un tema serio, con familias detrás).
   Azul profundo de confianza + verde/ámbar/rojo solo para el semáforo.
   Móvil primero: mucha gente la abrirá desde el celular en la fila.
   ------------------------------------------------------------------- */

:root {
  --navy: #0F2A3F;
  --navy-2: #163A57;
  --ink: #16202B;
  --ink-2: #46586B;
  --muted: #6C7C8C;
  --line: #DDE5EC;
  --bg: #F4F7FA;
  --card: #FFFFFF;

  --ok: #12855B;
  --ok-bg: #E6F4EE;
  --wait: #B4690E;
  --wait-bg: #FDF3E3;
  --no: #B42318;
  --no-bg: #FDECEA;

  --radius: 14px;
  --shadow: 0 8px 28px rgba(15, 42, 63, .09);
  --fs: 'Source Serif 4', Georgia, serif;
  --fb: 'Inter', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { font-family: var(--fb); background: var(--bg); color: var(--ink); line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--fs); font-weight: 700; line-height: 1.2; }
input, button { font-family: inherit; font-size: 1rem; }

.container { max-width: 880px; margin: 0 auto; padding: 0 1.1rem; }

/* ── Header ─────────────────────────────────────────────────────── */
.top { background: var(--navy); color: #fff; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 0; }
.brand { display: flex; align-items: center; gap: .55rem; font-size: 1.05rem; }
.brand-mark { font-size: 1.4rem; }
.brand-txt b { font-weight: 700; }
.badge-free { font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: rgba(255,255,255,.14); padding: .25rem .6rem; border-radius: 50px; white-space: nowrap; }

/* ── Aviso legal ────────────────────────────────────────────────── */
.alert-legal { background: #FFF8E6; border-bottom: 2px solid #F0D9A0; color: #6B4E12; font-size: .88rem; padding: .8rem 0; }
.alert-legal strong { display: block; margin-bottom: .1rem; color: #7A4B00; }

/* ── Layout ─────────────────────────────────────────────────────── */
.main { padding: 1.6rem 1.1rem 3rem; }
.intro { margin-bottom: 1.5rem; }
.intro h1 { font-size: clamp(1.5rem, 4.6vw, 2.1rem); margin-bottom: .5rem; }
.intro p { color: var(--ink-2); }
.law-flash { margin-top: 1rem; background: #EAF3FB; border-left: 4px solid var(--navy-2); border-radius: 10px; padding: .85rem 1rem; font-size: .9rem; color: #1D3A52; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); margin-bottom: 1.3rem; }
.card-title { font-size: 1.15rem; margin-bottom: 1rem; }
.card-title.mt { margin-top: 1.8rem; }

/* ── Formulario ─────────────────────────────────────────────────── */
.field-group { margin-bottom: 1.1rem; }
.group-label { display: block; font-size: .82rem; font-weight: 700; color: var(--ink-2); margin-bottom: .45rem; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .9rem; }
.field > span { font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.field input {
  border: 1.5px solid var(--line); border-radius: 10px; padding: .7rem .8rem;
  background: #fff; color: var(--ink); outline: none; width: 100%;
}
.field input:focus { border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(22,58,87,.1); }
.hint { font-size: .82rem; color: var(--muted); }
.hint.mb { margin-bottom: .9rem; }

.acts { display: flex; flex-direction: column; gap: .9rem; }
.act { border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1rem .1rem; background: #FBFDFF; }
.act-head { display: flex; align-items: center; gap: .5rem; font-size: .95rem; margin-bottom: .6rem; }
.act-ico { font-size: 1.1rem; }
.act-rule { margin-left: auto; font-size: .74rem; font-weight: 600; color: var(--muted); background: #EEF3F8; padding: .16rem .5rem; border-radius: 50px; white-space: nowrap; }

.check { display: flex; gap: .7rem; align-items: flex-start; margin-top: 1.2rem; padding: .9rem 1rem; background: #FDF6F5; border: 1px solid #F3D6D2; border-radius: 12px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: .15rem; flex-shrink: 0; accent-color: var(--no); }
.check b { display: block; font-size: .92rem; color: #7A2018; }
.check small { display: block; font-size: .8rem; color: var(--ink-2); margin-top: .2rem; line-height: 1.45; }

.actions { display: flex; gap: .7rem; margin-top: 1.4rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font-weight: 700; border: 2px solid transparent; border-radius: 10px; padding: .8rem 1.5rem; cursor: pointer; transition: background .18s, border-color .18s, transform .1s; }
.btn:active { transform: scale(.98); }
.btn-lg { flex: 1; padding: .95rem 1.5rem; font-size: 1.03rem; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--muted); }

/* ── Resumen ────────────────────────────────────────────────────── */
.resumen { background: var(--navy); color: #E9F1F8; border: none; }
.resumen h2 { color: #fff; font-size: 1.15rem; margin-bottom: 1rem; }
.res-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; }
.res-item { background: rgba(255,255,255,.07); border-radius: 10px; padding: .8rem; }
.res-item b { display: block; font-family: var(--fs); font-size: 1.25rem; color: #fff; line-height: 1.15; }
.res-item span { display: block; font-size: .74rem; color: #A9C1D6; margin-top: .15rem; }
.res-bar { margin-top: 1rem; }
.bar { height: 12px; background: rgba(255,255,255,.14); border-radius: 50px; overflow: hidden; display: flex; }
.bar-fis { background: #4FA3E3; }
.bar-red { background: #5FD3A5; }
.bar-legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .78rem; color: #A9C1D6; margin-top: .5rem; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: .3rem; }

/* ── Beneficios ─────────────────────────────────────────────────── */
.sec-title { font-size: 1.3rem; margin-bottom: .3rem; }
.sec-sub { font-size: .87rem; color: var(--muted); margin-bottom: 1rem; }
.benefits { display: flex; flex-direction: column; gap: .8rem; margin-bottom: 1.3rem; }
.ben { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.ben.ok { border-left-color: var(--ok); }
.ben.wait { border-left-color: var(--wait); }
.ben.no { border-left-color: var(--no); }
.ben-head { display: flex; align-items: flex-start; gap: .7rem; }
.ben-title { flex: 1; }
.ben-title b { display: block; font-size: 1.02rem; }
.ben-title small { display: block; font-size: .78rem; color: var(--muted); }
.ben-state { font-size: .76rem; font-weight: 700; padding: .25rem .65rem; border-radius: 50px; white-space: nowrap; }
.ben.ok .ben-state { background: var(--ok-bg); color: var(--ok); }
.ben.wait .ben-state { background: var(--wait-bg); color: var(--wait); }
.ben.no .ben-state { background: var(--no-bg); color: var(--no); }
.ben-msg { margin-top: .6rem; font-size: .93rem; }
.ben-msg b { color: var(--ink); }
.ben-date { font-size: .85rem; color: var(--ink-2); margin-top: .2rem; }
.ben-prog { height: 7px; background: #EDF2F6; border-radius: 50px; margin-top: .7rem; overflow: hidden; }
.ben-prog i { display: block; height: 100%; border-radius: 50px; background: var(--ok); }
.ben.wait .ben-prog i { background: var(--wait); }
.ben.no .ben-prog i { background: var(--no); }

.ben details { margin-top: .7rem; }
.ben summary { cursor: pointer; font-size: .82rem; font-weight: 600; color: var(--navy-2); }
.calc-box { margin-top: .6rem; background: #F7FAFC; border: 1px dashed var(--line); border-radius: 10px; padding: .8rem; font-size: .85rem; color: var(--ink-2); }
.calc-box table { width: 100%; border-collapse: collapse; }
.calc-box td { padding: .22rem 0; }
.calc-box td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.calc-box .sep td { border-top: 1px solid var(--line); padding-top: .4rem; }
.calc-law { margin-top: .6rem; font-size: .8rem; color: var(--muted); font-style: italic; }

/* ── Aclaraciones y marco legal ─────────────────────────────────── */
.disclaimer-card h3 { font-size: 1.02rem; margin-bottom: .7rem; }
.disc-list { list-style: none; display: flex; flex-direction: column; gap: .55rem; }
.disc-list li { font-size: .89rem; color: var(--ink-2); padding-left: 1.3rem; position: relative; }
.disc-list li::before { content: '•'; position: absolute; left: .35rem; color: var(--navy-2); font-weight: 700; }

.legal { border-bottom: 1px solid var(--line); padding: .8rem 0; }
.legal:last-child { border-bottom: none; padding-bottom: 0; }
.legal summary { cursor: pointer; font-size: .95rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.legal summary::-webkit-details-marker { display: none; }
.legal summary::after { content: '+'; color: var(--navy-2); font-weight: 700; flex-shrink: 0; }
.legal[open] summary::after { content: '−'; }
.legal p { font-size: .88rem; color: var(--ink-2); margin-top: .6rem; }
.legal-note { font-size: .82rem !important; color: var(--muted) !important; font-style: italic; }

/* ── Footer ─────────────────────────────────────────────────────── */
.foot { background: var(--navy); color: #A9C1D6; padding: 1.8rem 0; text-align: center; font-size: .82rem; }
.foot-legal { max-width: 640px; margin: 0 auto .7rem; line-height: 1.6; }
.foot-brand b { color: #fff; }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 620px) {
  .res-grid { grid-template-columns: 1fr 1fr; }
  .actions { flex-direction: column-reverse; }
  .btn-lg { width: 100%; }
}
@media (max-width: 420px) {
  .row-3 { grid-template-columns: 1fr 1fr; }
  .row-3 .field:first-child { grid-column: 1 / -1; }
}
