:root {
  --bg: #f6f5f0; --card: #ffffff; --ink: #14201a; --muted: #5d6b63; --line: #e2e2d8;
  --brand: #0f5132; --brand-2: #1c7a4d; --accent: #c6f432; --warn: #b54708; --hot: #d92d20;
  --radius: 14px; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 24px rgba(15,81,50,.07);
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0d1411; --card: #15201b; --ink: #eef3ef; --muted: #9aaba2; --line: #26342d; --brand: #7fd8a6; --brand-2: #a7e8c3; --shadow: none; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 "Inter", system-ui, sans-serif; }
h1, h2, h3 { font-family: "Sora", "Inter", sans-serif; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
a { color: var(--brand-2); }
img { max-width: 100%; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; gap: 12px; }
.logo { min-height: 44px; font: 800 1.25rem "Sora", sans-serif; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.logo i { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; font-style: normal; color: #14201a; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 999px; padding: 11px 20px; font: 600 15px "Inter", sans-serif; cursor: pointer; text-decoration: none; background: var(--brand); color: #fff; }
@media (prefers-color-scheme: dark) { .btn { color: #0d1411; } }
.btn.alt { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.lime { background: var(--accent); color: #14201a; }
.btn { min-height: 44px; }
.btn.sm { padding: 9px 16px; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: default; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); margin: 2px 4px 2px 0; }
label { display: block; font-weight: 600; font-size: 14px; margin: 12px 0 4px; }
input, select, textarea { width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; }
textarea { min-height: 90px; resize: vertical; }
input[type=checkbox], input[type=radio] { width: 22px; height: 22px; flex: none; margin: 0 8px 0 0; accent-color: var(--brand-2); }
.check { font-weight: 400; display: flex; align-items: flex-start; gap: 4px; min-height: 44px; padding: 10px 0; margin: 0; cursor: pointer; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > * { flex: 1 1 140px; }
.hero { padding: 40px 0 28px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.3rem); }
.hero p { font-size: 1.15rem; max-width: 640px; }
.mark { background: linear-gradient(transparent 60%, var(--accent) 60%); color: inherit; }
section { padding: 28px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 8px 16px; cursor: pointer; font: inherit; font-size: 14px; }
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
@media (prefers-color-scheme: dark) { .chip.on { color: #0d1411; } }
.trainer { display: flex; gap: 14px; align-items: flex-start; }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: #14201a; display: grid; place-items: center; font: 800 1.2rem "Sora"; flex: none; object-fit: cover; }
.score { font: 800 1.1rem "Sora"; color: var(--brand); }
#ec-toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 50; width: max-content; max-width: calc(100% - 32px); display: grid; gap: 8px; }
.toast { background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 12px; box-shadow: 0 4px 18px rgba(0,0,0,.25); }
footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 24px 0 40px; font-size: 14px; color: var(--muted); }
footer a { color: var(--muted); margin-right: 14px; }
.hidden { display: none !important; }
.steps { counter-reset: s; display: grid; gap: 12px; }
.steps li { list-style: none; padding-left: 40px; position: relative; }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #14201a; display: grid; place-items: center; font-weight: 800; }
.price { font: 800 2.2rem "Sora"; }
.price small { font-size: 1rem; color: var(--muted); font-weight: 500; }
ul.ticks { padding: 0; margin: 12px 0; }
ul.ticks li { list-style: none; padding: 4px 0 4px 26px; position: relative; }
ul.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--brand-2); font-weight: 800; }
/* Panel */
.app { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.side { background: var(--card); border-right: 1px solid var(--line); padding: 16px; position: sticky; top: 0; height: 100vh; overflow: auto; }
.side button { min-height: 44px; display: flex; width: 100%; text-align: left; background: none; border: 0; padding: 10px 12px; border-radius: 10px; font: 500 15px "Inter"; color: var(--ink); cursor: pointer; gap: 8px; align-items: center; }
.side button.on { background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); font-weight: 700; }
.side .badge { margin-left: auto; background: var(--hot); color: #fff; border-radius: 999px; font-size: 12px; padding: 0 7px; }
.main { padding: 24px; min-width: 0; }
.kpi { font: 800 1.9rem "Sora"; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; color: var(--muted); font-weight: 600; }
.tablewrap { overflow-x: auto; }
.heat { font-weight: 700; font-size: 13px; padding: 2px 8px; border-radius: 999px; }
.heat.h { background: #fee4e2; color: #b42318; }
.heat.m { background: #fef0c7; color: var(--warn); }
.heat.c { background: #e0eaff; color: #3538cd; }
.out { overflow-wrap: anywhere; white-space: pre-wrap; background: var(--bg); border: 1px dashed var(--line); padding: 14px; border-radius: 10px; font-size: 15px; }
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .side { position: sticky; top: 0; height: auto; display: flex; overflow-x: auto; gap: 4px; padding: 8px; border-right: 0; border-bottom: 1px solid var(--line); z-index: 5; }
  .side .logo, .side .sidefoot { display: none; }
  .side button { white-space: nowrap; width: auto; }
  .main { padding: 16px; }
}
:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 2px; }
h1:focus { outline: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.formerr { color: #b42318; font-weight: 600; font-size: 14px; margin: 10px 0 0; }
@media (prefers-color-scheme: dark) { .formerr { color: #fda29b; } }
.notice { border-left: 4px solid var(--warn); }
.tap { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }
button.linkbtn { background: none; border: 0; padding: 0 4px; min-height: 44px; font: inherit; font-size: 14px; color: var(--brand-2); text-decoration: underline; cursor: pointer; }
.g4 { grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); }
.side .sidefoot a { display: inline-flex; align-items: center; min-height: 44px; }
.pick { display: inline-flex; align-items: center; }
@media (max-width: 760px) {
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.stack tr { padding: 10px 6px; border-bottom: 1px solid var(--line); }
  table.stack td { border: 0; padding: 4px 4px; }
  table.stack td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
  .side .sidefoot { display: flex; flex: none; margin: 0 !important; padding: 0 8px; align-items: center; }
}
@media print { .side, .noprint { display: none !important; } .app { display: block; } }
select[data-status] { min-width: 120px; }
.nav .row > * { flex: none; }
@media (max-width: 420px) { .nav .btn.alt { display: none; } }
/* Zonas táctiles de enlaces sueltos (pie, listas de ciudades, enlaces al final de una tarjeta) */
footer a { display: inline-block; padding: 12px 0; }
#ciudades p a { display: inline-block; padding: 12px 4px; }
section .card > a:not(.btn), section .card > div > a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; }
