/* Dr. Carlos Torres Lleras — sitio público
   Paleta tomada del quirófano: azul marino del gorro, celeste del pijama, verde de acción. */
:root {
  --ink: #13233f;
  --ink-2: #3a4a66;
  --ink-3: #5b6b86;
  --scrub: #a9c8ec;
  --scrub-2: #d7e6f7;
  --mist: #eef4fa;
  --paper: #f7fafd;
  --white: #ffffff;
  --line: #d5e1ee;
  --action: #0f7a5f;
  --action-2: #0b624c;
  --wa: #1f9d55;
  --radius: 14px;
  --radius-sm: 8px;
  --wrap: 1160px;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.6;
  color: var(--ink); background: var(--paper); text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--action); text-underline-offset: 3px; }
a:hover { color: var(--action-2); }
:focus-visible { outline: 3px solid #2b6fd6; outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100; border-radius: 6px; }
.skip:focus { left: 8px; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.narrow { width: min(100% - 40px, 720px); margin-inline: auto; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 60ch; }
.muted { color: var(--ink-3); }
.small { font-size: .9rem; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 999px; border: 2px solid transparent;
  font: 600 1rem/1 var(--sans); text-decoration: none; cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: #18834a; color: #fff; }
.btn-primary { background: var(--action); color: #fff; }
.btn-primary:hover { background: var(--action-2); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-block { width: 100%; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); }
@supports (backdrop-filter: blur(8px)) { .site-header { background: rgba(255,255,255,.85); backdrop-filter: blur(10px); } }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { height: 34px; width: auto; }
.brand span { display: flex; flex-direction: column; line-height: 1.15; }
.brand strong { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; }
.brand small { font-size: .78rem; color: var(--ink-3); }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: .97rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }
.nav .btn { min-height: 44px; padding: 0 18px; font-size: .95rem; color: #fff; text-decoration: none; }
.menu-btn { display: none; background: none; border: 0; padding: 10px; color: var(--ink); cursor: pointer; }
.menu-btn svg { width: 26px; height: 26px; }
@media (max-width: 900px) {
  .menu-btn { display: block; }
  .nav { position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
         background: #fff; border-bottom: 1px solid var(--line); padding: 8px 20px 20px; display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 14px 4px; border-bottom: 1px solid var(--mist); font-size: 1.05rem; }
  .nav .btn { margin-top: 14px; border-bottom: 0; }
}

/* Hero */
.hero { background: var(--white); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; align-items: stretch; min-height: 560px; }
.hero-copy { padding: 64px 40px 64px 0; display: flex; flex-direction: column; justify-content: center; }
.hero-kicker { color: var(--ink-3); font-weight: 500; margin-bottom: 14px; }
.hero h1 { margin-bottom: .4em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 30px; }
.creds { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 0; margin: 0; list-style: none; color: var(--ink-2); font-size: .95rem; }
.creds li { display: flex; align-items: center; gap: 8px; }
.creds svg { width: 18px; height: 18px; color: var(--action); }
.hero-photo { position: relative; margin-right: calc((100vw - min(100vw - 40px, var(--wrap))) / -2); background: var(--scrub-2); }
.hero-photo picture, .hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 40% 30%; }
.hero-photo { clip-path: polygon(16% 0, 100% 0, 100% 100%, 0 100%); }
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; min-height: 0; }
  .hero-photo { order: -1; margin: 0 -20px; height: 300px; clip-path: polygon(0 0, 100% 0, 100% 86%, 0 100%); }
  .hero-photo img { object-position: 50% 12%; }
  .hero-copy { padding: 28px 0 40px; }
}

/* Secciones */
.section { padding: 84px 0; }
.section-alt { background: var(--white); border-block: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 40px; }

/* Lista de procedimientos (filas, no tarjetas) */
.procs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.procs li { display: grid; grid-template-columns: 260px 1fr auto; gap: 24px; align-items: baseline; padding: 26px 0; border-bottom: 1px solid var(--line); }
.procs h3 { margin: 0; font-size: 1.6rem; }
.procs p { margin: 0; color: var(--ink-2); }
.procs a.more { font-weight: 600; white-space: nowrap; }
@media (max-width: 760px) { .procs li { grid-template-columns: 1fr; gap: 8px; } }

/* Pasos (es una secuencia real) */
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.steps li { counter-increment: s; border-top: 3px solid var(--ink); padding-top: 18px; }
.steps li { position: relative; }
.steps li::before { content: counter(s); position: absolute; top: 20px; right: 0; font-family: var(--serif); font-size: 2rem; line-height: 1; color: var(--scrub); }
.step-ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--mist); color: var(--action); margin-bottom: 14px; }
.step-ico svg { width: 24px; height: 24px; }
.steps h3 { font-size: 1.2rem; font-family: var(--sans); font-weight: 600; }
.steps p { color: var(--ink-2); font-size: .97rem; margin: 0; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* Sobre el doctor */
.about { display: grid; grid-template-columns: 380px 1fr; gap: 56px; align-items: center; }
.about img { border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; object-position: 45% 20%; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 28px; margin: 24px 0 0; padding: 0; list-style: none; }
.facts li { border-left: 3px solid var(--scrub); padding-left: 12px; color: var(--ink-2); }
.facts strong { display: block; color: var(--ink); }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; gap: 28px; } .about img { max-width: 360px; } .facts { grid-template-columns: 1fr; } }

/* Callout */
.callout { background: var(--mist); border-radius: var(--radius); padding: 32px; display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; }
.callout h2, .callout h3 { margin-bottom: .3em; }
.callout p { margin: 0; color: var(--ink-2); }
@media (max-width: 760px) { .callout { grid-template-columns: 1fr; } }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 44px 22px 0; position: relative; font-weight: 600; font-size: 1.08rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 12px; height: 12px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq .answer { padding: 0 0 22px; color: var(--ink-2); max-width: 68ch; }

/* Grilla de artículos */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.post-link { display: block; text-decoration: none; color: var(--ink); padding: 22px 0 0; border-top: 2px solid var(--ink); }
.post-link span { display: block; font-size: .88rem; color: var(--ink-3); margin-bottom: 6px; }
.post-link strong { display: block; font-family: var(--serif); font-weight: 500; font-size: 1.3rem; line-height: 1.25; margin-bottom: 8px; }
.post-link p { color: var(--ink-2); font-size: .97rem; margin: 0; }
.post-link:hover strong { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 860px) { .posts { grid-template-columns: 1fr; } }

/* Contacto */
.contact { display: grid; grid-template-columns: 1fr 460px; gap: 56px; align-items: start; }
.contact-side p { color: var(--ink-2); }
.contact-side .btn { margin: 8px 0 18px; }
.form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.form h3 { font-family: var(--sans); font-weight: 600; font-size: 1.2rem; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .93rem; margin-bottom: 6px; }
.field .hint { font-weight: 400; color: var(--ink-3); }
.field input, .field select {
  width: 100%; min-height: 50px; padding: 0 14px; border: 1.5px solid #b9c9dc; border-radius: var(--radius-sm);
  font: 400 1rem var(--sans); color: var(--ink); background: #fff;
}
.field input:focus, .field select:focus { border-color: var(--ink); outline: 3px solid var(--scrub-2); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--ink-2); margin: 6px 0 18px; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--action); }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .85rem; color: var(--ink-3); margin: 12px 0 0; }
.alert { background: #fff4e5; border: 1px solid #f0c27a; color: #6b4300; padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: .95rem; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; gap: 32px; } }
@media (max-width: 420px) { .row2 { grid-template-columns: 1fr; } .form { padding: 22px; } }

/* Artículo y página pilar */
.crumbs { font-size: .9rem; color: var(--ink-3); padding: 22px 0 0; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.crumbs a { color: var(--ink-3); }
.page-head { padding: 26px 0 36px; }
.page-head h1 { font-size: clamp(2rem, 4vw, 3rem); max-width: 22ch; }
.meta { color: var(--ink-3); font-size: .93rem; }
.answer-box { background: #fff; border-left: 4px solid var(--action); padding: 20px 24px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: 1.08rem; margin: 0 0 36px; }
.prose { font-size: 1.07rem; }
.prose h2 { font-size: 1.75rem; margin-top: 1.8em; }
.prose h3 { font-size: 1.3rem; margin-top: 1.5em; font-family: var(--sans); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .4em; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: .97rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--mist); font-weight: 600; }
.prose blockquote { margin: 1.4em 0; padding: 14px 20px; background: var(--mist); border-radius: var(--radius-sm); }
.inline-cta { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 28px; margin: 44px 0; display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; }
.inline-cta p { margin: 0; color: #dfe8f4; }
.inline-cta strong { display: block; font-family: var(--serif); font-weight: 500; font-size: 1.4rem; color: #fff; margin-bottom: 4px; }
@media (max-width: 640px) { .inline-cta { grid-template-columns: 1fr; } }
.author { display: flex; gap: 16px; align-items: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 20px 0; margin: 40px 0; }
.author img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; object-position: 50% 25%; }
.author p { margin: 0; font-size: .95rem; color: var(--ink-2); }
.author strong { color: var(--ink); }
.related { margin: 40px 0; }
.disclaimer { font-size: .88rem; color: var(--ink-3); border-top: 1px solid var(--line); padding-top: 16px; margin-top: 40px; }

.cluster { margin-bottom: 56px; }
.cluster h2 a { color: inherit; text-decoration: none; }
.cluster h2 a:hover { text-decoration: underline; }

/* Footer */
.site-footer { background: var(--ink); color: #c7d4e6; padding: 56px 0 48px; font-size: .95rem; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h2 { font-family: var(--sans); font-size: 1rem; font-weight: 600; color: #fff; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #c7d4e6; }
.site-footer a:hover { color: #fff; }
.site-footer .legal { border-top: 1px solid #2a3c5c; margin-top: 40px; padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; font-size: .85rem; }
.made { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.made svg { width: 15px; height: 15px; vertical-align: -2px; }
.ico-heart { color: #ff6b81; display: inline-flex; }
.ico-coffee { color: #e0b98a; display: inline-flex; }
@media (max-width: 860px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .site-footer .cols { grid-template-columns: 1fr; } }

/* WhatsApp: botón flotante en escritorio, barra fija en móvil */
.wa-float { position: fixed; right: 22px; bottom: 22px; z-index: 50; width: 58px; height: 58px; border-radius: 50%; background: var(--wa); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(19,35,63,.25); }
.wa-float svg { width: 30px; height: 30px; }
.wa-float:hover { background: #18834a; color: #fff; }
.mobile-bar { display: none; }
@media (max-width: 760px) {
  .wa-float { display: none; }
  .site-footer { padding-bottom: 110px; }
  .mobile-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); }
  .mobile-bar .btn { min-height: 48px; padding: 0 10px; font-size: .95rem; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

/* ===== v3: coberturas, tarjetas e iconos ===== */
.coverage { background: #fff; border-bottom: 1px solid var(--line); }
.coverage .wrap { padding: 28px 0 30px; }
.cov-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; margin-bottom: 18px; }
.cov-head h2 { font-family: var(--sans); font-size: 1rem; font-weight: 600; color: var(--ink-2); margin: 0; }
.cov-head a { font-size: .93rem; }
.cov-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; }
.wm { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 78px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); text-align: center; line-height: 1.1; }
.wm span { font-weight: 700; font-size: 1.12rem; letter-spacing: -.01em; }
.wm-fonasa span { color: #e8710a; font-weight: 800; font-size: 1.4rem; letter-spacing: -.04em; }
.wm-fonasa small { background: #fde7d2; color: #a94f00; font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.wm-colmena { flex-direction: row; gap: 7px; }
.wm-colmena i { width: 13px; height: 15px; background: #f2b705; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.wm-colmena span { color: #3b3b3b; }
.wm-cruz { flex-direction: row; gap: 3px; }
.wm-cruz b { color: #e30613; font-size: 1.35rem; line-height: 1; }
.wm-cruz span { color: #0b3d91; font-style: italic; }
.wm-consalud span { color: #0e7c86; font-family: Georgia, serif; font-size: 1.2rem; }
.wm-banmedica span { color: #1d7a3a; text-transform: uppercase; font-size: .92rem; letter-spacing: .08em; border-bottom: 2px solid #32a852; padding-bottom: 2px; }
.wm-masvida { flex-direction: row; gap: 1px; }
.wm-masvida em { font-style: normal; color: #7a2fb4; font-weight: 700; font-size: 1.05rem; }
.wm-masvida span { color: #3b3b3b; font-size: 1.05rem; }
.wm-part span { color: var(--ink-2); font-weight: 600; font-size: 1rem; }
@media (max-width: 1000px) { .cov-list { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 560px) { .cov-list { grid-template-columns: repeat(2, 1fr); } .wm { min-height: 64px; } }

.ico-tile { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--mist); color: var(--action); }
.ico-tile svg { width: 24px; height: 24px; }
.ico-lg { width: 56px; height: 56px; border-radius: 14px; }
.ico-lg svg { width: 30px; height: 30px; }

.cards { display: grid; gap: 20px; }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1080px) { .cards-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) { .cards-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .cards-2, .cards-3, .cards-4 { grid-template-columns: 1fr; } }
.narrow .cards-3 { grid-template-columns: 1fr; }
@media (min-width: 700px) { .narrow .cards-3 { grid-template-columns: 1fr 1fr; } }

.card { display: flex; flex-direction: column; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px; color: var(--ink); text-decoration: none; transition: border-color .2s, transform .2s, box-shadow .2s; }
.card:hover { color: var(--ink); border-color: var(--scrub); transform: translateY(-2px); box-shadow: 0 10px 24px -14px rgba(19,35,63,.35); }
.card strong { display: block; font-family: var(--serif); font-weight: 500; font-size: 1.32rem; line-height: 1.22; }
.card .card-text { display: block; color: var(--ink-2); font-size: .97rem; line-height: 1.55; }
.card .go { font-weight: 600; color: var(--action); font-size: .95rem; }
.card:hover .go { text-decoration: underline; text-underline-offset: 3px; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.card-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--mist); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.read { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: .86rem; }
.read svg, .meta svg { width: 16px; height: 16px; }
.meta svg { vertical-align: -3px; margin-right: 6px; }

.chip { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 600; color: var(--ink-2); background: var(--mist); border-radius: 999px; padding: 4px 11px; }
.chip svg { width: 16px; height: 16px; color: var(--action); }
.chip-link { text-decoration: none; border: 1px solid transparent; }
.chip-link:hover { border-color: var(--scrub); color: var(--ink); }
.topic-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.topic-nav .chip { padding: 8px 14px; font-size: .9rem; background: #fff; border: 1px solid var(--line); }

.proc-card { flex-direction: row; align-items: flex-start; gap: 18px; padding: 28px; }
.proc-body { display: flex; flex-direction: column; gap: 8px; }
.proc-card strong { font-size: 1.55rem; }

.cluster-head { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; margin-bottom: 22px; }
.cluster-head h2 { margin: 0 0 4px; }
.cluster-head p { margin: 0; max-width: 70ch; font-size: .97rem; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: .9rem; }
@media (max-width: 760px) { .cluster-head { grid-template-columns: auto 1fr; } .cluster-head .btn { grid-column: 1 / -1; justify-self: start; } }
.cluster { scroll-margin-top: 90px; }

.head-ico { margin-bottom: 16px; }
.page-head .chip { margin-bottom: 16px; }
.related .cards { margin-top: 8px; }
@media (max-width: 760px) { .callout { grid-template-columns: 1fr; } }

/* ===== v4: asistente por pasos ===== */
.wizard { padding: 0; overflow: hidden; }
.wz-head { padding: 24px 28px 0; }
.wz-kicker { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .9rem; color: var(--ink-3); margin: 0 0 10px; }
.wz-kicker strong { color: var(--ink); font-size: 1rem; }
.wz-bar { height: 6px; border-radius: 999px; background: var(--mist); overflow: hidden; }
.wz-bar span { display: block; height: 100%; width: 25%; background: var(--action); border-radius: 999px; transition: width .35s ease; }
.wz-step { border: 0; margin: 0; padding: 24px 28px 8px; min-width: 0; }
.wz-step + .wz-step { border-top: 1px solid var(--mist); }
.wz-title { font-family: var(--serif); font-weight: 500; font-size: 1.55rem; line-height: 1.2; color: var(--ink); padding: 0; margin: 0 0 6px; outline: none; }
.wz-help { color: var(--ink-2); font-size: .95rem; margin: 0 0 18px; }
.wz-on .wz-step { display: none; border-top: 0; }
.wz-on .wz-step.is-active { display: block; animation: wzIn .3s ease; }
@keyframes wzIn { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
.wz-nav { display: flex; gap: 10px; justify-content: space-between; padding: 8px 28px 26px; }
.wz-nav .btn { min-height: 50px; }
.wz-nav [data-wz-next], .wz-nav [data-wz-send] { margin-left: auto; min-width: 170px; }
.wizard:not(.wz-on) [data-wz-prev], .wizard:not(.wz-on) [data-wz-next] { display: none; }
.wizard:not(.wz-on) [data-wz-send] { display: inline-flex !important; }
.btn-text { background: none; border: 0; color: var(--ink-2); font: 600 .97rem var(--sans); cursor: pointer; padding: 0 6px; min-height: 50px; }
.btn-text:hover { color: var(--ink); text-decoration: underline; }
.wz-foot { padding: 0 28px 24px; margin: 0; font-size: .85rem; color: var(--ink-3); }

.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opt-grid.cols-1 { grid-template-columns: 1fr; }
.opt { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; transition: border-color .15s, background .15s; }
.opt:hover { border-color: var(--scrub); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt .ico-tile { width: 40px; height: 40px; }
.opt .ico-tile svg { width: 22px; height: 22px; }
.opt-txt { display: flex; flex-direction: column; line-height: 1.3; }
.opt-txt strong { font-size: 1rem; }
.opt-txt small { color: var(--ink-3); font-size: .84rem; }
.opt:has(input:checked) { border-color: var(--action); background: #f0faf6; box-shadow: inset 0 0 0 1px var(--action); }
.opt:has(input:checked) .ico-tile { background: var(--action); color: #fff; }
.opt:has(input:focus-visible) { outline: 3px solid #2b6fd6; outline-offset: 2px; }
.opt-wide { grid-column: 1 / -1; }
.opt-sm { padding: 10px 14px; }
@media (max-width: 460px) { .opt-grid { grid-template-columns: 1fr; } }

.imc-box { margin-top: 18px; border: 1px dashed var(--line); border-radius: 12px; padding: 14px 16px; background: var(--paper); }
.imc-box > summary { cursor: pointer; font-weight: 600; font-size: .95rem; color: var(--ink-2); }
.imc-box[open] > summary { margin-bottom: 12px; }
.imc-out { display: flex; flex-direction: column; gap: 4px; background: var(--mist); border-radius: 10px; padding: 12px 14px; font-size: .9rem; color: var(--ink-2); margin-top: 4px; }
.imc-out strong { font-size: 1.05rem; color: var(--ink); }
.note { display: flex; gap: 10px; align-items: flex-start; background: var(--mist); border-radius: 12px; padding: 12px 14px; font-size: .9rem; color: var(--ink-2); margin-top: 14px; }
.note svg { width: 20px; height: 20px; flex: none; color: var(--action); margin-top: 1px; }

.sum { list-style: none; margin: 0 0 16px; padding: 0; border: 1px solid var(--line); border-radius: 12px; }
.sum li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; font-size: .93rem; border-bottom: 1px solid var(--mist); }
.sum li:last-child { border-bottom: 0; }
.sum span:first-child { color: var(--ink-3); }
.sum span:last-child { font-weight: 600; text-align: right; }
.sum a { font-size: .85rem; font-weight: 600; margin-left: 8px; }
.field textarea { width: 100%; min-height: 84px; padding: 12px 14px; border: 1.5px solid #b9c9dc; border-radius: var(--radius-sm); font: 400 1rem var(--sans); color: var(--ink); resize: vertical; }
.field textarea:focus { border-color: var(--ink); outline: 3px solid var(--scrub-2); }
.field input:user-invalid, .field select:user-invalid { border-color: #c2410c; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-check { position: relative; }
.chip-check input { position: absolute; opacity: 0; }
.chip-check span { display: inline-block; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 999px; font-size: .92rem; cursor: pointer; background: #fff; }
.chip-check input:checked + span { border-color: var(--action); background: #f0faf6; color: var(--action-2); font-weight: 600; }
.chip-check input:focus-visible + span { outline: 3px solid #2b6fd6; outline-offset: 2px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .row3 { grid-template-columns: 1fr; } }

/* Página de ficha */
.ficha-wrap { display: grid; grid-template-columns: 1fr 1.35fr; gap: 48px; align-items: start; padding: 32px 0 88px; }
.ficha-side { position: sticky; top: 96px; }
.ficha-side ol { padding-left: 1.2em; color: var(--ink-2); }
.ficha-side li { margin-bottom: 8px; }
@media (max-width: 900px) { .ficha-wrap { grid-template-columns: 1fr; gap: 24px; } .ficha-side { position: static; } }
.wz-nav [hidden] { display: none !important; }
.wz-title { float: left; width: 100%; margin-bottom: 6px; }
.wz-help { clear: both; }
.wz-step::after { content: ""; display: block; clear: both; }
