:root {
  --bg: #faf6f1;
  --surface: #ffffff;
  --ink: #2b2230;
  --muted: #6b6070;
  --line: #e7ded6;
  --accent: #b5543c;
  --accent-ink: #ffffff;
  --accent-soft: #f6e4dc;
  --ok: #2f7a5b;
  --ok-soft: #e1f1e9;
  --warn: #9a6a12;
  --warn-soft: #fbf0d9;
  --danger: #a3303a;
  --radius: 14px;
  --serif: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--sans); }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }

.wrap { max-width: 880px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 640px; }

header.top { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { font: 700 1.4rem var(--serif); color: var(--ink); text-decoration: none; letter-spacing: .5px; }
.brand span { color: var(--accent); }
nav { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
nav a:hover, nav a.active { color: var(--ink); }

main { padding: 40px 0 80px; }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; padding: 24px 0 40px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; margin-bottom: 20px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 999px;
  padding: 12px 22px; font: 600 1rem var(--sans); cursor: pointer; text-decoration: none; background: var(--accent); color: var(--accent-ink); }
.btn:hover { filter: brightness(.95); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ok { background: var(--ok); }
.btn.link { background: none; color: var(--muted); padding: 8px 4px; font-weight: 500; text-decoration: underline; }
.btn.danger-link { background: none; color: var(--danger); padding: 8px 4px; font-weight: 500; text-decoration: underline; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* Landing */
.hero { padding: 24px 0 8px; }
.hero p.lead { font-size: 1.2rem; color: var(--muted); max-width: 36em; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 32px 0; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.step b { display: block; font-family: var(--serif); font-size: 1.1rem; margin-bottom: 4px; }
.why { margin: 0 auto 32px; }
.why h2 { margin-bottom: .6em; }
.step .n { color: var(--accent); font: 700 .8rem var(--sans); letter-spacing: 1px; text-transform: uppercase; }

.tabs { display: flex; gap: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-bottom: 20px; }
.tabs button { flex: 1; border: 0; background: none; border-radius: 999px; padding: 10px; font: 600 .95rem var(--sans); color: var(--muted); cursor: pointer; }
.tabs button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* Formularios */
label.field { display: block; margin-bottom: 18px; }
label.field > span, .field-label { display: block; font-weight: 600; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], select, textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
textarea { min-height: 110px; resize: vertical; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.err { color: var(--danger); font-size: .88rem; margin-top: 4px; }
.has-err input, .has-err select, .has-err textarea, .has-err .likert, .has-err .checks, .has-err .phone-prefix { border-color: var(--danger); }
.field .field-label { margin-bottom: 6px; }
.pw { position: relative; }
.pw input { padding-right: 46px; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); cursor: pointer; padding: 6px; display: grid; place-items: center; }
.pw-toggle:hover { color: var(--ink); }
.has-warn input { border-color: var(--warn); }
.reqs { display: grid; gap: 6px; margin-top: 10px; background: var(--bg); border-radius: 10px; padding: 12px 14px; }
.req { display: flex; align-items: center; gap: 8px; margin: 0; font-size: .8rem; color: var(--muted); }
.req.ok { color: var(--ok); }
.req .mark { display: inline-grid; place-items: center; width: 20px; height: 20px; border: 1px solid currentColor; border-radius: 50%; font-size: 8px; font-weight: 700; flex: none; }
.combo { position: relative; }
.combo-input { position: relative; }
.combo-input input { padding-right: 42px; }
.combo-clear, .combo-chevron { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.combo-clear { border: 0; background: none; font-size: 1.2rem; line-height: 1; cursor: pointer; padding: 4px; }
.combo-clear:hover { color: var(--ink); }
.combo-chevron { pointer-events: none; }
.combo-list { position: absolute; z-index: 20; left: 0; right: 0; margin-top: 6px; max-height: 264px; overflow-y: auto; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; padding: 6px 0; box-shadow: 0 8px 24px rgba(43, 34, 48, .12); }
.combo-opt { display: flex; justify-content: space-between; width: 100%; border: 0; background: none; text-align: left; padding: 8px 14px; font: inherit; font-size: .95rem; color: var(--ink); cursor: pointer; }
.combo-opt:hover, .combo-opt.active { background: var(--bg); }
.combo-opt.sel { background: var(--accent-soft); color: var(--accent); }
.combo-opt.custom { color: var(--accent); border-top: 1px solid var(--line); }
.combo-empty { padding: 10px 14px; margin: 0; font-size: .9rem; color: var(--muted); }
.phone { display: grid; grid-template-columns: 104px 1fr; gap: 8px; }
.phone-code { position: relative; }
.phone-prefix { display: flex; align-items: center; justify-content: space-between; height: 100%; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; font-weight: 600; }
.phone-code select { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.phone-code:focus-within .phone-prefix { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.combo-chevron-inline { color: var(--muted); font-weight: 400; }
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; }
.alert.error { background: #fbe7e8; color: var(--danger); }
.alert.info { background: var(--accent-soft); }
.alert.warn { background: var(--warn-soft); color: var(--warn); }

.checks { display: grid; gap: 8px; border: 1px solid transparent; border-radius: 10px; }
.checks label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; cursor: pointer; }
.checks input { margin-top: 5px; accent-color: var(--accent); width: 18px; height: 18px; flex: none; }

.likert { border: 1px solid transparent; border-radius: 10px; }
.likert .opts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.likert .opts label { display: block; cursor: pointer; }
.likert .opts input { position: absolute; opacity: 0; pointer-events: none; }
.likert .opts span { display: block; text-align: center; padding: 10px 0; border: 1px solid var(--line); border-radius: 10px; font-weight: 600; background: #fff; }
.likert .opts input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.likert .opts input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.likert .ends { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); margin-top: 4px; }

.section-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.progress { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 8px 0 24px; }
.progress div { height: 100%; background: var(--accent); transition: width .3s; }
.form-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }

/* Panel */
.status { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; padding: 4px 12px; border-radius: 999px; }
.status.propuesto { background: var(--warn-soft); color: var(--warn); }
.status.mutuo { background: var(--ok-soft); color: var(--ok); }
.person { display: flex; gap: 20px; align-items: center; margin: 16px 0 20px; }
.avatar { width: 72px; height: 72px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font: 700 1.8rem var(--serif); flex: none; }
.bio { white-space: pre-wrap; background: var(--bg); border-radius: 10px; padding: 16px; }
ul.clean { padding-left: 1.2em; margin: 0 0 1em; }
ul.clean li { margin-bottom: 6px; }
.bars { display: grid; gap: 10px; margin: 12px 0; }
.bar { display: grid; grid-template-columns: 110px 1fr 40px; gap: 10px; align-items: center; font-size: .9rem; }
.bar .track { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--accent); }
.whatsapp { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; background: var(--ok-soft); border-radius: var(--radius); padding: 20px; margin: 16px 0; }
.whatsapp .num { font: 700 1.3rem var(--sans); letter-spacing: .5px; }
details { margin-top: 12px; }
summary { cursor: pointer; color: var(--muted); }

/* Método */
.principles { margin: 0; padding-left: 1.3em; display: grid; gap: 14px; }
.principles li { padding-left: 4px; }
.more > summary { color: var(--ink); margin: 0; }
.more[open] > summary { margin-bottom: 20px; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--muted); }
.table-wrap { overflow-x: auto; }

@media (max-width: 560px) {
  .card { padding: 20px; }
  .bar { grid-template-columns: 90px 1fr 36px; }
  .person { flex-direction: column; align-items: flex-start; }
}
