:root {
  --bg: #f7f3ee; --surface: #fff; --surface-2: #f0e9e1; --ink: #1d1a17; --ink-2: #5e564d; --line: #e2d8cc;
  --accent: #b8533a; --accent-2: #9a4330; --accent-ink: #fff; --accent-soft: #f6e2da; --amber: #c98a2b;
  --ok: #2f6f4f; --ok-soft: #e2f0e7; --warn: #8a5a00; --warn-soft: #fbefd4; --bad: #9b2c2c; --bad-soft: #f8e1e1;
  --radius: 16px; --shadow: 0 10px 30px -18px rgba(60, 30, 15, .35);
  --font: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #1b1815; --surface: #24201c; --surface-2: #2e2924; --ink: #f4eee7; --ink-2: #c3b8ab; --line: #3d362f;
    --accent: #df7a5f; --accent-2: #f08f74; --accent-ink: #1b1815; --accent-soft: #46271e; --ok: #82c9a3; --ok-soft: #1f3a2c;
    --warn: #f0c060; --warn-soft: #3d3016; --bad: #f19a9a; --bad-soft: #452222; color-scheme: dark; }
}
* { box-sizing: border-box; }
html { font-size: 17px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); line-height: 1.55; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .6rem; letter-spacing: -.01em; }
h1 { font-family: var(--serif); font-size: clamp(2rem, 7vw, 3rem); font-weight: 600; }
h2 { font-size: 1.35rem; } h3 { font-size: 1.05rem; }
p { margin: .3rem 0 .8rem; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wrap { max-width: 640px; margin: 0 auto; padding: 0 1rem; }
header.top { padding: .9rem 0; 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: .5rem; }
.brand { font-weight: 700; text-decoration: none; color: var(--ink); display: flex; align-items: center; gap: .5rem; }
.brand i { width: 26px; height: 26px; border-radius: 8px; background: var(--accent); display: inline-block; }
.brand small { font-weight: 500; color: var(--ink-2); }
main { padding: 1.4rem 0 4rem; min-height: 70vh; }
footer { border-top: 1px solid var(--line); padding: 1.5rem 0 2.5rem; color: var(--ink-2); font-size: .85rem; }
footer p { margin: .2rem 0; }

.hero { padding: 1.2rem 0 .5rem; }
.kicker { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: .6rem; }
.lead-text { font-size: 1.1rem; color: var(--ink-2); }
.trust { display: grid; gap: .6rem; margin: 1.4rem 0; }
.trust div { display: flex; gap: .7rem; align-items: flex-start; }
.trust b { display: block; }
.dot { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 800; font-size: .85rem; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; box-shadow: var(--shadow); margin-bottom: 1rem; }
.btn { font: inherit; font-weight: 700; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 14px; padding: .8rem 1.1rem; min-height: 52px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; text-decoration: none; }
.btn:hover { border-color: var(--accent); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-2); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--accent); }
.btn.wide { width: 100%; }
.btn.small { min-height: 40px; padding: .4rem .8rem; font-size: .9rem; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.between { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
@media (max-width: 420px) { .grid2.stack { grid-template-columns: 1fr; } }

.progress { height: 6px; background: var(--surface-2); border-radius: 6px; overflow: hidden; margin-bottom: 1.2rem; }
.progress > span { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.q { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; margin-bottom: 1rem; }
.opts { display: grid; gap: .6rem; }
.opt { text-align: left; justify-content: flex-start; font-weight: 600; }
.opt[aria-pressed='true'] { border-color: var(--accent); background: var(--accent-soft); }
.opt small { display: block; font-weight: 400; color: var(--ink-2); }
label { display: block; font-weight: 600; margin: .8rem 0 .3rem; }
input[type=text], input[type=tel], input[type=email], input[type=number], input[type=password], input[type=search], select, textarea {
  font: inherit; width: 100%; padding: .75rem .85rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); min-height: 52px; }
textarea { min-height: 6rem; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; font-size: .92rem; }
.check input { width: 22px; height: 22px; flex: none; margin-top: .15rem; accent-color: var(--accent); }
.stepper { display: flex; align-items: center; gap: .6rem; }
.stepper button { width: 52px; }
.stepper output { min-width: 3ch; text-align: center; font-size: 1.3rem; font-weight: 700; }
.list { max-height: 50vh; overflow: auto; border: 1px solid var(--line); border-radius: 12px; margin-top: .5rem; }
.list button { display: flex; width: 100%; justify-content: space-between; border: 0; border-bottom: 1px solid var(--line); background: var(--surface); padding: .8rem .9rem; font: inherit; color: var(--ink); cursor: pointer; min-height: 48px; }
.list button:hover, .list button:focus-visible { background: var(--accent-soft); }
.nav { display: flex; justify-content: space-between; gap: .6rem; margin-top: 1.2rem; }

.price { font-family: var(--serif); font-size: clamp(2rem, 9vw, 2.8rem); font-weight: 700; line-height: 1.1; color: var(--accent); }
.badge { display: inline-block; border-radius: 999px; padding: .15rem .6rem; font-size: .78rem; font-weight: 700; background: var(--surface-2); color: var(--ink-2); }
.badge.alta, .badge.caliente { background: var(--bad-soft); color: var(--bad); }
.badge.alta { background: var(--ok-soft); color: var(--ok); }
.badge.media, .badge.templado { background: var(--warn-soft); color: var(--warn); }
.badge.baja, .badge.frio { background: var(--surface-2); color: var(--ink-2); }
.factors { list-style: none; padding: 0; margin: .5rem 0; }
.factors li { display: flex; justify-content: space-between; padding: .35rem 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.note { border-radius: 12px; padding: .8rem .9rem; background: var(--surface-2); font-size: .9rem; color: var(--ink-2); }
.note.warn { background: var(--warn-soft); color: var(--ink); }
.note.ok { background: var(--ok-soft); color: var(--ink); }
.note.bad { background: var(--bad-soft); color: var(--ink); }
.muted { color: var(--ink-2); } .small { font-size: .85rem; }
.spinner { width: 20px; height: 20px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.hp { position: absolute; left: -9999px; }

/* Panel */
.panel-wrap { max-width: 980px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; margin-bottom: 1rem; }
@media (max-width: 640px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: .8rem; }
.kpi b { display: block; font-size: 1.6rem; }
.kpi span { color: var(--ink-2); font-size: .85rem; }
.tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tabs .btn[aria-pressed='true'] { background: var(--accent-soft); border-color: var(--accent); }
.lead { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1rem; margin-bottom: .7rem; }
.lead h3 { margin: 0; }
details summary { cursor: pointer; font-weight: 600; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: .5rem .4rem; border-bottom: 1px solid var(--line); text-align: left; }
td input { min-height: 40px; padding: .4rem .5rem; width: 7rem; }
.toast { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: .7rem 1rem; border-radius: 12px; z-index: 20; max-width: 90vw; }

.nw { white-space: nowrap; }
.price { font-size: clamp(1.7rem, 8vw, 2.6rem); }
