:root {
  --brand: #0f766e; --brand-2: #14b8a6; --brand-soft: #e6f4f2; --ink: #0f172a; --text: #334155;
  --muted: #64748b; --line: #e2e8f0; --bg: #f8fafc; --card: #fff; --warn: #b45309; --bad: #dc2626; --good: #16a34a;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 15.5px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--text); background: var(--bg); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { color: var(--ink); line-height: 1.2; }
.eyebrow { margin: 0 0 6px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.sub { margin: 0; font-size: 18px; color: #d1fae5; }
.sub.dark { color: var(--muted); font-size: 16px; margin-bottom: 20px; }

/* Barra superior */
.bar { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar-in { display: flex; align-items: center; gap: 10px; height: 58px; }
.bar img { width: 30px; height: 30px; border-radius: 7px; }
.bar strong { color: var(--ink); }
.bar nav { margin-left: auto; display: flex; gap: 2px; }
.bar nav a { padding: 6px 12px; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; }
.bar nav a:hover { color: var(--brand); background: var(--brand-soft); }

/* Portada */
.hero { background: linear-gradient(135deg, #0f766e 0%, #115e59 55%, #134e4a 100%); color: #fff; padding: 56px 0 64px; }
.hero .eyebrow { color: #99f6e4; }
.hero h1 { color: #fff; font-size: clamp(30px, 4.5vw, 46px); margin: 0 0 10px; max-width: 760px; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-top: 30px; }
.choice { all: unset; cursor: pointer; display: flex; flex-direction: column; background: #fff; color: var(--text); border-radius: 16px; padding: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.18); transition: transform .15s, box-shadow .15s; }
.choice:hover, .choice:focus-visible { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(0,0,0,.25); outline: none; }
.choice svg { width: 100%; height: 92px; margin-bottom: 10px; }
.choice .pill { align-self: flex-start; font-size: 11.5px; font-weight: 800; color: var(--brand); background: var(--brand-soft); padding: 2px 9px; border-radius: 99px; margin-bottom: 6px; }
.choice b { color: var(--ink); font-size: 16.5px; }
.choice span.d { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.choice .go { margin-top: 12px; font-weight: 700; color: var(--brand); font-size: 14px; }

/* Bloques */
.block { padding: 56px 24px 8px; scroll-margin-top: 60px; }
.block h2 { font-size: 30px; margin: 0 0 10px; }

/* Asistente */
.guide-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.guide-switch { display: flex; gap: 4px; background: #eef2f6; padding: 4px; border-radius: 12px; flex-wrap: wrap; }
.guide-switch button { all: unset; cursor: pointer; padding: 7px 14px; border-radius: 9px; font-weight: 700; font-size: 14px; color: var(--muted); }
.guide-switch button[aria-selected="true"] { background: #fff; color: var(--brand); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.progress { height: 6px; background: #e2e8f0; border-radius: 99px; overflow: hidden; margin-bottom: 18px; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .3s; }
.stage { display: grid; grid-template-columns: 1.35fr 1fr; gap: 24px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: 0 6px 24px rgba(15,23,42,.06); }
.shot { margin: 0; background: #eef2f6; border-radius: 12px; padding: 18px; display: grid; place-items: center; min-height: 380px; }
.shot svg { width: 100%; height: auto; max-height: 470px; }
.explain { display: flex; flex-direction: column; }
.step-count { margin: 4px 0 4px; font-weight: 800; color: var(--brand); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.explain h3 { font-size: 24px; margin: 0 0 12px; }
.step-text { font-size: 16px; }
.step-text p { margin: 0 0 10px; }
.step-text ul { margin: 0 0 10px; padding-left: 20px; }
.step-text .callouts { list-style: none; padding: 0; margin: 4px 0 12px; display: grid; gap: 8px; }
.step-text .callouts li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; }
.step-text .callouts li i { font-style: normal; width: 26px; height: 26px; border-radius: 50%; background: #f97316; color: #fff; font-weight: 800; font-size: 13px; display: grid; place-items: center; }
.tipbox { background: var(--brand-soft); border-left: 4px solid var(--brand); border-radius: 8px; padding: 10px 12px; font-size: 14.5px; margin: 6px 0 10px; }
.warnbox { background: #fff7ed; border-left: 4px solid #f97316; border-radius: 8px; padding: 10px 12px; font-size: 14.5px; margin: 6px 0 10px; }
.nav-buttons { display: flex; gap: 10px; margin-top: auto; padding-top: 14px; }
.btn { all: unset; cursor: pointer; padding: 11px 18px; border-radius: 10px; background: var(--brand); color: #fff; font-weight: 700; text-align: center; flex: 1; }
.btn:hover { background: #115e59; }
.btn.ghost { background: #eef2f6; color: var(--text); }
.btn.ghost:hover { background: #e2e8f0; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.dots { list-style: none; display: flex; gap: 6px; padding: 0; margin: 14px 0 0; flex-wrap: wrap; }
.dots button { all: unset; cursor: pointer; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; background: #eef2f6; color: var(--muted); }
.dots button.on { background: var(--brand); color: #fff; }
.dots button.done { background: var(--brand-soft); color: var(--brand); }
code, kbd { font: 13px ui-monospace, Consolas, monospace; background: #eef2f6; padding: 1px 6px; border-radius: 5px; }

/* Síntomas */
.symptoms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.symptom { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.symptom .pic { background: #eef2f6; padding: 16px; display: grid; place-items: center; height: 170px; }
.symptom .pic svg { width: 100%; height: 100%; }
.symptom .body { padding: 14px 16px 16px; }
.symptom h3 { font-size: 17px; margin: 0 0 8px; }
.symptom .why { font-size: 14px; color: var(--muted); margin: 0 0 8px; }
.symptom .why b { color: var(--bad); }
.symptom .fix { font-size: 14px; margin: 0; padding-left: 18px; }
.symptom .fix li { margin-bottom: 3px; }
.symptom .fix-title { font-size: 12px; font-weight: 800; color: var(--good); text-transform: uppercase; letter-spacing: .05em; margin: 0 0 4px; }

/* Tabla y glosario */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 14.5px; vertical-align: top; }
th { background: #f1f5f9; font-size: 13px; color: var(--ink); }
tr:last-child td { border-bottom: 0; }
.glossary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 0; }
.glossary > div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.glossary dt { font-weight: 800; color: var(--ink); }
.glossary dd { margin: 4px 0 0; font-size: 14.5px; }
.foot { padding: 40px 24px 60px; color: var(--muted); text-align: center; }

@media (max-width: 960px) {
  .choices { grid-template-columns: repeat(2, 1fr); }
  .stage { grid-template-columns: 1fr; }
  .symptoms { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .bar nav { display: none; }
  .choices, .symptoms, .glossary { grid-template-columns: 1fr; }
}

/* Consejo final destacado y pie de página */
.foot-tip { display: flex; gap: 14px; align-items: flex-start; margin: 10px auto 48px; padding: 18px 22px; background: #fff7ed; border: 1px solid #fed7aa; border-left: 5px solid #f97316; border-radius: 14px; }
.foot-tip p { margin: 0; color: #7c2d12; font-size: 15.5px; }
.foot-tip-ico { font-size: 22px; line-height: 1.2; }
.site-foot { background: #0f1b2d; color: #cbd5e1; padding: 26px 0; font-size: 14px; }
.site-foot .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.site-foot a { color: #e2e8f0; text-decoration: none; }
.site-foot a:hover { color: #fff; text-decoration: underline; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot-brand { font-weight: 800; font-size: 16px; color: #fff !important; }
.foot-by { color: #94a3b8; }
/* Cabecera: los enlaces no se parten en varias líneas; en pantallas medianas se desplazan en horizontal */
.bar nav a { white-space: nowrap; }
@media (max-width: 960px) {
  .bar-in { flex-wrap: wrap; row-gap: 4px; height: auto; padding: 8px 0; }
  .bar nav { flex-basis: 100%; overflow-x: auto; scrollbar-width: none; margin-left: -12px; }
  .bar nav::-webkit-scrollbar { display: none; }
}
.lang-select { flex: none; padding: 5px 8px; border: 1px solid var(--line, #e2e8f0); border-radius: 8px; background: #fff; color: var(--muted); font: 600 13px/1.2 inherit; cursor: pointer; }
@media (max-width: 960px) { .lang-select { margin-left: auto; } .bar nav { order: 1; } }
