/* =====================================================================
   CiberBase · Hoja de estilos
   Concepto: "informe de auditoría". Azul tinta y papel frío; la tinta roja
   del auditor marca riesgos y el verde marca controles superados.
   Fuentes autoalojadas (sin peticiones a terceros: RGPD).
   ===================================================================== */

@font-face {
  font-family: "Source Serif";
  src: url("../fonts/source-serif-4-var.woff2") format("woff2-variations"), url("../fonts/source-serif-4-var.woff2") format("woff2");
  font-weight: 200 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Plex Sans";
  src: url("../fonts/ibm-plex-sans-var.woff2") format("woff2-variations"), url("../fonts/ibm-plex-sans-var.woff2") format("woff2");
  font-weight: 100 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Plex Sans";
  src: url("../fonts/ibm-plex-sans-var-italic.woff2") format("woff2-variations"), url("../fonts/ibm-plex-sans-var-italic.woff2") format("woff2");
  font-weight: 100 700; font-style: italic; font-display: swap;
}

:root {
  --ink: #10233d;
  --ink-2: #1b3557;
  --ink-3: #2c4a72;
  --paper: #f4f6f8;
  --surface: #ffffff;
  --text: #17222e;
  --muted: #56636f;
  --rule: #d6dde4;
  --rule-soft: #e7ecf0;
  --red: #b3261e;
  --red-soft: #fbeceb;
  --green: #0f6b4f;
  --green-soft: #e6f3ee;
  --amber: #8a5a00;
  --amber-soft: #fbf3e2;
  --focus: #2f6feb;

  --serif: "Source Serif", "Iowan Old Style", "Charter", Georgia, serif;
  --sans: "Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5625rem;
  --step-3: clamp(1.75rem, 1.4rem + 1.4vw, 2.25rem);
  --step-4: clamp(2.1rem, 1.5rem + 2.6vw, 3.25rem);
  --step-5: clamp(2.4rem, 1.4rem + 4vw, 4rem);

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --r-sm: 4px;
  --r: 8px;
  --shadow: 0 1px 2px rgba(16, 35, 61, .06), 0 8px 24px -12px rgba(16, 35, 61, .18);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font-family: var(--sans); font-size: var(--step-0); line-height: 1.6;
  font-feature-settings: "kern"; text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; display: block; }
video { border-radius: var(--r); background: #000; margin: 1.5rem 0; }
a { color: var(--ink-3); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; color: var(--ink); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; font-optical-sizing: auto; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); line-height: 1.3; }
p { margin: 0 0 1em; }
.lede { font-size: var(--step-1); color: var(--muted); max-width: 62ch; line-height: 1.55; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 640px; margin: 0 auto; padding: 0 var(--gutter); }
.measure { max-width: 68ch; }
.muted { color: var(--muted); }
.small { font-size: var(--step--1); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; z-index: 100; border-radius: var(--r-sm); }
.skip:focus { top: 8px; color: #fff; }
.icon { width: 1.15em; height: 1.15em; flex: none; }

/* ---------------------------------------------------------------- Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: 600 1rem/1 var(--sans); padding: .95em 1.4em; border-radius: var(--r);
  border: 1.5px solid var(--ink); background: var(--ink); color: #fff; text-decoration: none;
  cursor: pointer; transition: background .15s, border-color .15s, color .15s; min-height: 48px;
}
.btn:hover { background: var(--ink-2); border-color: var(--ink-2); color: #fff; }
.btn-light { background: var(--surface); color: var(--ink); }
.btn-light:hover { background: var(--rule-soft); color: var(--ink); border-color: var(--ink); }
.btn-on-dark { background: #fff; color: var(--ink); border-color: #fff; }
.btn-on-dark:hover { background: #e8eef5; border-color: #e8eef5; color: var(--ink); }
.btn-small { padding: .6em 1em; font-size: .9375rem; min-height: 38px; }
.btn-danger { background: var(--surface); color: var(--red); border-color: var(--red); }
.btn-danger:hover { background: var(--red-soft); color: var(--red); border-color: var(--red); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: 0; color: var(--ink-3); font: inherit; text-decoration: underline; text-underline-offset: .18em; cursor: pointer; }

/* --------------------------------------------------------------- Cabecera */
.site-header { background: var(--surface); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 40; }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand svg { width: 34px; height: 34px; }
.brand-name { font-family: var(--serif); font-weight: 650; font-size: 1.375rem; letter-spacing: -.01em; }
.nav { display: flex; gap: 26px; margin-left: auto; align-items: center; }
.nav a { color: var(--text); text-decoration: none; font-size: .9688rem; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: .35em; }
.nav .btn { color: #fff; padding: .7em 1.1em; min-height: 42px; }
.nav .btn:hover { text-decoration: none; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--rule); border-radius: var(--r); padding: 8px 10px; color: var(--ink); cursor: pointer; }
@media (max-width: 920px) {
  .nav-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--rule); flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 20px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--rule-soft); }
  .nav .btn { margin-top: 12px; border-bottom: 0; }
}

/* ------------------------------------------------------------------ Avisos */
.flashes { padding-top: 20px; }
.flash { border-left: 4px solid var(--ink-3); background: var(--surface); padding: 14px 18px; border-radius: var(--r-sm); margin-bottom: 10px; box-shadow: var(--shadow); }
.flash-ok { border-color: var(--green); }
.flash-error { border-color: var(--red); }
.flash-info { border-color: var(--amber); }
.alert { padding: 14px 18px; border-radius: var(--r); margin: 0 0 1.25rem; font-size: .9688rem; }
.alert-error { background: var(--red-soft); color: #7a1912; }
.alert-ok { background: var(--green-soft); color: #0b4a37; }
.alert-info { background: var(--amber-soft); color: #5e3d00; }

/* ===================================================================== HOME */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 7vw, 96px); background: var(--surface); border-bottom: 1px solid var(--rule); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: var(--step-5); font-weight: 600; line-height: 1.04; letter-spacing: -.02em; margin-bottom: .45em; text-wrap: balance; }
.hero .lede { margin-bottom: 1.75rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.assurances { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--muted); font-size: .9375rem; }
.assurances li { display: inline-flex; align-items: center; gap: 8px; }
.assurances .icon { color: var(--green); }
@media (max-width: 960px) { .hero .wrap { grid-template-columns: 1fr; } }

/* Correo bajo auditoría: el elemento memorable */
.specimen { position: relative; }
.mail {
  background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; box-shadow: 0 30px 60px -30px rgba(16,35,61,.35), 0 2px 6px rgba(16,35,61,.06);
  font-size: .9375rem; overflow: visible;
}
.mail-bar { display: flex; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--rule-soft); }
.mail-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--rule); }
.mail-head { padding: 16px 22px 12px; border-bottom: 1px solid var(--rule-soft); display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; }
.mail-head dt { color: var(--muted); font-size: .8125rem; padding-top: 2px; }
.mail-head dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.mail-subject { font-weight: 600; }
.mail-body { padding: 18px 22px 22px; }
.mail-body p { margin-bottom: .8em; }
.mail-link { color: var(--ink-3); text-decoration: underline; }
.mail-attach { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--rule); border-radius: var(--r); padding: 8px 12px; font-size: .875rem; background: var(--paper); }
.mail-attach svg { width: 18px; height: 18px; color: var(--muted); }

.flag { position: relative; display: inline; white-space: nowrap; }
.flag::after {
  content: ""; position: absolute; inset: -5px -9px; border: 2px solid var(--red);
  border-radius: 48% 52% 46% 54% / 60% 44% 56% 40%; transform: rotate(-1.5deg); pointer-events: none;
  opacity: 0; transition: opacity .3s;
}
.flag.wide::after { inset: -6px -12px; }
.flag:nth-of-type(2n)::after { transform: rotate(1.2deg); border-radius: 52% 48% 55% 45% / 45% 58% 42% 55%; }
.js .flag.drawn::after, .no-js .flag::after { opacity: 1; }
.mark {
  position: absolute; top: -14px; right: -22px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--red); color: #fff; border: 0; font: 700 .75rem/24px var(--sans); text-align: center; cursor: pointer; padding: 0;
  box-shadow: 0 0 0 3px var(--surface); opacity: 0; transform: scale(.6); transition: opacity .25s, transform .25s;
}
.js .flag.drawn .mark, .no-js .mark { opacity: 1; transform: none; }
.mark[aria-expanded="true"] { background: var(--ink); }
.findings-notes { list-style: none; counter-reset: n; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.findings-notes li { counter-increment: n; position: relative; padding: 10px 12px 10px 42px; border-radius: var(--r); font-size: .9063rem; line-height: 1.45; transition: background .2s; }
.findings-notes li::before { content: counter(n); position: absolute; left: 10px; top: 10px; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--red); color: var(--red); font: 700 .75rem/19px var(--sans); text-align: center; }
.findings-notes li strong { color: var(--ink); display: block; }
.findings-notes li.active { background: var(--red-soft); }
.specimen-caption { margin-top: 14px; font-size: .9063rem; color: var(--muted); }
@media (max-width: 560px) { .findings-notes { grid-template-columns: 1fr; } .mark { right: -16px; } .flag { white-space: normal; } }

/* Secciones */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head p { color: var(--muted); font-size: var(--step-1); line-height: 1.5; margin: 0; }
.section-dark { background: var(--ink); color: #dbe4ee; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark a { color: #fff; }
.section-dark .section-head p { color: #b9c6d4; }
.section-surface { background: var(--surface); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }

/* Datos con fuente */
.evidence { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid rgba(255,255,255,.18); border-bottom: 1px solid rgba(255,255,255,.18); margin-bottom: 48px; }
.evidence > div { padding: 24px 28px 24px 0; }
.evidence > div + div { border-left: 1px solid rgba(255,255,255,.18); padding-left: 28px; }
.evidence b { display: block; font-family: var(--serif); font-size: var(--step-3); font-weight: 600; color: #fff; line-height: 1.1; margin-bottom: 6px; }
.evidence span { color: #c5d1dd; }
.evidence cite { display: block; font-style: normal; font-size: .8125rem; color: #93a5b8; margin-top: 8px; }
@media (max-width: 720px) { .evidence { grid-template-columns: 1fr; } .evidence > div + div { border-left: 0; border-top: 1px solid rgba(255,255,255,.18); padding-left: 0; } }

/* Tabla de hallazgos de auditoría */
.findings { width: 100%; border-collapse: collapse; font-size: .9688rem; }
.findings caption { text-align: left; color: #93a5b8; font-size: .8125rem; padding-bottom: 12px; }
.findings th { text-align: left; font-weight: 500; font-size: .8125rem; color: #93a5b8; padding: 0 16px 12px 0; border-bottom: 1px solid rgba(255,255,255,.22); }
.findings td { padding: 18px 16px 18px 0; border-bottom: 1px solid rgba(255,255,255,.12); vertical-align: top; color: #dbe4ee; }
.findings td:first-child { color: #fff; font-weight: 500; width: 34%; }
.sev { display: inline-block; font-size: .8125rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.sev-crit { background: #f6d6d3; color: #7a1912; }
.sev-high { background: #f7e6c4; color: #5e3d00; }
.sev-med { background: #dfe7f0; color: var(--ink); }
.findings .fix { color: #fff; white-space: nowrap; }
@media (max-width: 760px) {
  .findings thead { display: none; }
  .findings tr { display: block; padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,.14); }
  .findings td { display: block; border: 0; padding: 3px 0; width: auto !important; }
  .findings td[data-label]::before { content: attr(data-label) ": "; color: #93a5b8; font-size: .8125rem; }
}

/* Temario */
.syllabus { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; counter-reset: mod; }
.syllabus > li { counter-increment: mod; border-top: 1px solid var(--rule); }
.syllabus details { padding: 22px 0; }
.syllabus summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 52px 1fr auto; gap: 4px 12px; align-items: baseline; }
.syllabus summary::-webkit-details-marker { display: none; }
.syllabus summary::before { content: counter(mod, decimal-leading-zero); font-family: var(--serif); font-size: 1.75rem; color: var(--ink-3); line-height: 1; grid-row: span 2; font-variant-numeric: lining-nums; }
.syllabus summary h3 { margin: 0; font-size: 1.1875rem; }
.syllabus summary .muted { grid-column: 2; font-size: .9375rem; }
.syllabus summary .plus { grid-column: 3; grid-row: 1; width: 22px; height: 22px; color: var(--muted); transition: transform .2s; }
.syllabus details[open] .plus { transform: rotate(45deg); }
.syllabus .lessons { list-style: none; padding: 14px 0 0 64px; margin: 0; }
.syllabus .lessons li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: .9688rem; border-bottom: 1px dashed var(--rule-soft); }
.syllabus .lessons li span:last-child { color: var(--muted); white-space: nowrap; }
@media (max-width: 860px) { .syllabus { grid-template-columns: 1fr; } }
.course-facts { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--rule); color: var(--muted); }
.course-facts b { color: var(--ink); font-weight: 600; }

/* Cómo funciona (secuencia real) */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: st; }
.steps li { counter-increment: st; position: relative; padding: 0 24px 0 0; }
.steps li::before { content: counter(st); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--ink); color: var(--ink); font: 600 1rem var(--sans); background: var(--surface); position: relative; z-index: 1; margin-bottom: 18px; }
.steps li::after { content: ""; position: absolute; top: 20px; left: 40px; right: 0; height: 1.5px; background: var(--rule); }
.steps li:last-child::after { display: none; }
.steps h3 { font-size: 1.125rem; margin-bottom: .35em; }
.steps p { color: var(--muted); font-size: .9688rem; margin: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; gap: 26px; } .steps li { padding: 0 0 0 58px; } .steps li::before { position: absolute; left: 0; top: 0; margin: 0; } .steps li::after { display: none; } }

/* Auditor */
.expert { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.expert-portrait { position: sticky; top: 100px; }
.expert-portrait img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r); filter: grayscale(.15); }
.monogram { aspect-ratio: 4 / 5; border-radius: var(--r); background: var(--ink); color: #fff; display: grid; place-items: center; font-family: var(--serif); font-size: 5rem; font-weight: 500; letter-spacing: .02em; position: relative; overflow: hidden; }
.monogram::after { content: ""; position: absolute; inset: 14px; border: 1px solid rgba(255,255,255,.25); border-radius: 4px; }
.expert-sign { margin-top: 16px; }
.expert-sign strong { display: block; font-family: var(--serif); font-size: 1.25rem; color: var(--ink); }
.expert-sign span { color: var(--muted); font-size: .9375rem; }
.expert blockquote { margin: 0 0 28px; font-family: var(--serif); font-size: var(--step-2); line-height: 1.35; color: var(--ink); font-weight: 450; max-width: 30ch; text-wrap: pretty; }
.expert-bio p { max-width: 64ch; }
.expert-stats { display: flex; flex-wrap: wrap; gap: 0; margin: 32px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.expert-stats div { padding: 18px 32px 18px 0; margin-right: 32px; }
.expert-stats div + div { border-left: 1px solid var(--rule); padding-left: 32px; }
.expert-stats b { display: block; font-family: var(--serif); font-size: 2rem; color: var(--ink); line-height: 1.1; font-weight: 600; }
.expert-stats span { color: var(--muted); font-size: .9375rem; }
.credentials { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 28px; }
.credentials li { display: flex; gap: 10px; align-items: flex-start; }
.credentials .icon { color: var(--green); margin-top: .25em; }
@media (max-width: 860px) { .expert { grid-template-columns: 1fr; } .expert-portrait { position: static; max-width: 260px; } .credentials { grid-template-columns: 1fr; } .expert-stats div + div { border-left: 0; padding-left: 0; } }

/* Para empresas */
.business { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 72px); align-items: center; }
.benefits { list-style: none; padding: 0; margin: 0; }
.benefits li { padding: 16px 0 16px 36px; border-bottom: 1px solid var(--rule); position: relative; }
.benefits li:first-child { border-top: 1px solid var(--rule); }
.benefits li .icon { position: absolute; left: 0; top: 19px; color: var(--green); }
.benefits strong { color: var(--ink); }
.panel-preview { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; font-size: .875rem; }
.panel-preview header { padding: 16px 20px; border-bottom: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.panel-preview header strong { font-family: var(--serif); font-size: 1.0625rem; color: var(--ink); }
.panel-preview table { width: 100%; border-collapse: collapse; }
.panel-preview td, .panel-preview th { padding: 11px 20px; text-align: left; border-bottom: 1px solid var(--rule-soft); white-space: nowrap; }
.panel-preview th { font-weight: 500; color: var(--muted); font-size: .8125rem; }
.panel-preview figcaption { padding: 10px 20px; color: var(--muted); font-size: .8125rem; background: var(--paper); }
.bar { display: inline-block; width: 70px; height: 6px; background: var(--rule-soft); border-radius: 3px; vertical-align: middle; margin-right: 8px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ink-3); border-radius: 3px; width: 0; }
@media (max-width: 960px) { .business { grid-template-columns: 1fr; } .panel-preview { overflow-x: auto; } }

/* Estados */
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.tag-ok { background: var(--green-soft); color: var(--green); }
.tag-run { background: #e3ecf7; color: var(--ink-3); }
.tag-wait { background: var(--rule-soft); color: var(--muted); }
.tag-bad { background: var(--red-soft); color: var(--red); }
.tag-warn { background: var(--amber-soft); color: var(--amber); }

/* Precios */
.pricing { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.tiers { width: 100%; border-collapse: collapse; }
.tiers th, .tiers td { padding: 16px 0; border-bottom: 1px solid var(--rule); text-align: left; }
.tiers th { font-size: .8125rem; color: var(--muted); font-weight: 500; }
.tiers td:last-child, .tiers th:last-child { text-align: right; }
.tiers td b { font-family: var(--serif); font-size: 1.5rem; color: var(--ink); font-weight: 600; }
.tiers tr.current td { background: var(--green-soft); }
.tiers tr.current td:first-child { box-shadow: inset 4px 0 0 var(--green); padding-left: 14px; }
.tiers tr td:first-child { transition: padding .15s; }
.calc { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: clamp(22px, 3vw, 32px); box-shadow: var(--shadow); }
.calc h3 { margin-bottom: .25em; }
.qty { display: flex; align-items: stretch; border: 1.5px solid var(--rule); border-radius: var(--r); overflow: hidden; width: fit-content; margin: 16px 0 22px; }
.qty button { width: 48px; background: var(--paper); border: 0; font-size: 1.375rem; color: var(--ink); cursor: pointer; }
.qty button:hover { background: var(--rule-soft); }
.qty input { width: 92px; text-align: center; border: 0; border-left: 1.5px solid var(--rule); border-right: 1.5px solid var(--rule); font: 600 1.25rem var(--sans); color: var(--ink); padding: 10px 4px; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sum { width: 100%; border-collapse: collapse; margin-bottom: 22px; }
.sum td { padding: 8px 0; }
.sum td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.sum tr.total td { border-top: 1.5px solid var(--ink); padding-top: 14px; font-weight: 600; color: var(--ink); font-size: 1.25rem; }
.sum .note td { font-size: .8125rem; color: var(--muted); padding-top: 0; }
@media (max-width: 860px) { .pricing { grid-template-columns: 1fr; } }

/* Garantías */
.guarantees { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 40px; list-style: none; padding: 0; margin: 0; }
.guarantees li { padding-top: 18px; border-top: 2px solid var(--ink); }
.guarantees h3 { font-size: 1.0625rem; font-family: var(--sans); font-weight: 600; letter-spacing: 0; display: flex; gap: 10px; align-items: center; }
.guarantees h3 .icon { color: var(--ink-3); }
.guarantees p { color: var(--muted); font-size: .9688rem; margin: 0; }
@media (max-width: 860px) { .guarantees { grid-template-columns: 1fr; } }

/* Testimonios */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; }
.quotes figure { margin: 0; padding: 26px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); }
.quotes blockquote { margin: 0 0 14px; font-family: var(--serif); font-size: 1.125rem; line-height: 1.5; color: var(--ink); }
.quotes figcaption { color: var(--muted); font-size: .9375rem; }

/* FAQ */
.faq { max-width: 860px; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq details:first-child { border-top: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; font-weight: 600; color: var(--ink); position: relative; font-size: 1.0625rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { color: var(--text); max-width: 70ch; padding-bottom: 20px; margin: 0; }

/* Cierre */
.closing { background: var(--ink); color: #dbe4ee; padding: clamp(56px, 8vw, 96px) 0; }
.closing .wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) auto; gap: 32px; align-items: end; }
.closing h2 { color: #fff; font-size: var(--step-4); max-width: 18ch; margin-bottom: .3em; }
.closing p { color: #b9c6d4; font-size: var(--step-1); margin: 0; max-width: 52ch; }
@media (max-width: 760px) { .closing .wrap { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------- Pie */
.site-footer { background: #0b1a2e; color: #9fb0c2; padding: 56px 0 32px; font-size: .9375rem; }
.site-footer a { color: #d5dfe9; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 32px; padding-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-grid h2 { font-family: var(--sans); font-size: .875rem; font-weight: 600; color: #fff; margin-bottom: 12px; letter-spacing: 0; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer .brand { color: #fff; margin-bottom: 12px; }
.withdraw-link { display: inline-block; margin-top: 4px; padding: 8px 12px; border: 1px solid rgba(255,255,255,.35); border-radius: var(--r-sm); color: #fff !important; }
.footer-legal { padding-top: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .8438rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ================================================================ FORMULARIOS */
.page-title { padding-top: clamp(32px, 5vw, 56px); padding-bottom: clamp(20px, 3vw, 32px); }
.page-title h1 { font-size: var(--step-4); margin-bottom: .25em; }
.page-title p { color: var(--muted); font-size: var(--step-1); margin: 0; max-width: 60ch; }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: clamp(20px, 3vw, 32px); }
.card + .card { margin-top: 20px; }
.field { margin-bottom: 18px; }
.field label, .label { display: block; font-weight: 600; font-size: .9375rem; color: var(--ink); margin-bottom: 6px; }
.field .hint { display: block; font-weight: 400; color: var(--muted); font-size: .8438rem; margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=search], select, textarea {
  width: 100%; font: 400 1rem/1.4 var(--sans); color: var(--text); background: var(--surface);
  border: 1.5px solid #c3ccd5; border-radius: var(--r); padding: 12px 14px; min-height: 48px; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px rgba(47,111,235,.18); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--red); }
.error { color: var(--red); font-size: .875rem; margin-top: 6px; display: block; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 2fr; gap: 0 16px; }
@media (max-width: 560px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; margin-bottom: 14px; font-size: .9375rem; line-height: 1.5; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ink); }
.code-input { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace !important; letter-spacing: .06em; text-transform: uppercase; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; }

/* Checkout */
.checkout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .9fr); gap: clamp(24px, 4vw, 48px); align-items: start; padding-bottom: 80px; }
.checkout-step { padding: 26px 0; border-top: 1px solid var(--rule); }
.checkout-step:first-of-type { border-top: 0; padding-top: 0; }
.checkout-step > legend, .checkout-step > h2 { font-family: var(--serif); font-size: 1.375rem; font-weight: 600; color: var(--ink); margin-bottom: 16px; display: flex; gap: 12px; align-items: baseline; }
.step-n { font-family: var(--sans); font-size: .875rem; font-weight: 600; color: #fff; background: var(--ink); width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; transform: translateY(-2px); }
.choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.choice label { display: flex; gap: 12px; align-items: center; border: 1.5px solid var(--rule); border-radius: var(--r); padding: 14px 16px; cursor: pointer; background: var(--surface); font-weight: 500; color: var(--text); min-height: 60px; transition: border-color .15s, background .15s; }
.choice label:hover { border-color: #9fb0c2; }
.choice input { accent-color: var(--ink); width: 18px; height: 18px; margin: 0; }
.choice label:has(input:checked) { border-color: var(--ink); background: #f3f6fa; box-shadow: inset 0 0 0 1px var(--ink); }
.choice .pay-sub { display: block; font-weight: 400; font-size: .8125rem; color: var(--muted); }
.pay-logos { margin-left: auto; display: flex; gap: 6px; }
.pay-logos span { font-size: .6875rem; font-weight: 700; border: 1px solid var(--rule); border-radius: 3px; padding: 2px 5px; color: var(--muted); letter-spacing: .02em; }
@media (max-width: 560px) { .choice { grid-template-columns: 1fr; } }
.summary { position: sticky; top: 96px; }
.summary h2 { font-size: 1.375rem; }
.summary .sum { margin-bottom: 10px; }
.trust { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; font-size: .875rem; color: var(--muted); }
.trust li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; }
.trust .icon { color: var(--green); margin-top: 2px; }
.trust strong { color: var(--text); font-weight: 600; }
.secure-note { display: flex; gap: 10px; align-items: center; font-size: .8438rem; color: var(--muted); margin-top: 12px; justify-content: center; }
.company-fields[hidden] { display: none; }
@media (max-width: 960px) { .checkout { grid-template-columns: 1fr; } .summary { position: static; } }

/* Mensajes de pago / páginas estrechas */
.page-narrow main { min-height: 60vh; }
.center-card { max-width: 560px; margin: clamp(32px, 6vw, 72px) auto; }
.status-icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 18px; }
.status-ok { background: var(--green-soft); color: var(--green); }
.status-info { background: var(--rule-soft); color: var(--ink); }
.status-error { background: var(--red-soft); color: var(--red); }
.status-icon svg { width: 28px; height: 28px; }

/* Panel de empresa */
.panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: end; padding: clamp(28px, 4vw, 48px) 0 24px; }
.panel-head h1 { font-size: var(--step-3); margin: 0; }
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--rule); border-radius: 12px; background: var(--surface); margin-bottom: 28px; }
.stat-row div { padding: 18px 22px; }
.stat-row div + div { border-left: 1px solid var(--rule); }
.stat-row b { display: block; font-family: var(--serif); font-size: 1.875rem; color: var(--ink); line-height: 1.15; font-weight: 600; }
.stat-row span { color: var(--muted); font-size: .875rem; }
@media (max-width: 760px) { .stat-row { grid-template-columns: 1fr 1fr; } .stat-row div:nth-child(3) { border-left: 0; } .stat-row div:nth-child(n+3) { border-top: 1px solid var(--rule); } }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; }
.table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.table th { text-align: left; font-weight: 500; color: var(--muted); font-size: .8125rem; padding: 14px 16px; border-bottom: 1px solid var(--rule); white-space: nowrap; background: var(--paper); }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--rule-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .9063rem; letter-spacing: .03em; white-space: nowrap; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form input[type=email] { min-height: 38px; padding: 7px 10px; width: 210px; font-size: .9063rem; }
.welcome-box { background: var(--ink); color: #dbe4ee; border-radius: 12px; padding: clamp(22px, 3vw, 32px); margin-bottom: 28px; display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; }
.welcome-box h2 { color: #fff; font-size: 1.5rem; margin-bottom: .25em; }
.welcome-box p { margin: 0; color: #c5d1dd; }
@media (max-width: 700px) { .welcome-box { grid-template-columns: 1fr; } }
.section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 36px 0 14px; }
.section-title h2 { font-size: 1.5rem; margin: 0; }

/* ===================================================================== CAMPUS */
.campus-bar { background: var(--ink); color: #c5d1dd; font-size: .9063rem; }
.campus-bar .wrap { display: flex; align-items: center; gap: 18px; min-height: 64px; flex-wrap: wrap; }
.campus-bar .brand { color: #fff; }
.campus-bar .brand svg { width: 28px; height: 28px; }
.campus-bar .brand-name { font-size: 1.1875rem; }
.access-clock { margin-left: auto; display: inline-flex; gap: 8px; align-items: center; background: rgba(255,255,255,.08); padding: 7px 12px; border-radius: 999px; }
.access-clock b { color: #fff; font-weight: 600; }
.access-clock.urgent { background: #5c1a15; }
.campus-bar nav { display: flex; gap: 16px; align-items: center; }
.campus-bar nav a, .campus-bar .link-btn { color: #fff; text-decoration: none; font-weight: 500; }
.campus-bar nav a:hover, .campus-bar .link-btn:hover { text-decoration: underline; }
@media (max-width: 700px) { .access-clock { margin-left: 0; order: 3; width: 100%; justify-content: center; margin-bottom: 10px; } .campus-bar nav { margin-left: auto; } }

.campus-grid { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); padding-top: 36px; padding-bottom: 80px; align-items: start; }
.toc { position: sticky; top: 24px; font-size: .9063rem; }
.toc-progress { margin-bottom: 16px; }
.toc ol { list-style: none; padding: 0; margin: 0; }
.toc > ol > li { margin-bottom: 14px; }
.toc .mod-title { font-weight: 600; color: var(--ink); display: block; margin-bottom: 4px; }
.toc .mod-title span { color: var(--muted); font-weight: 500; margin-right: 4px; }
.toc ol ol li a { display: flex; gap: 8px; align-items: flex-start; padding: 5px 8px; border-radius: var(--r-sm); color: var(--text); text-decoration: none; line-height: 1.35; }
.toc ol ol li a:hover { background: var(--rule-soft); }
.toc ol ol li a[aria-current="page"] { background: #e3ecf7; color: var(--ink); font-weight: 600; }
.toc .dot { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #9fb0c2; flex: none; margin-top: 2px; display: grid; place-items: center; }
.toc .dot.ok { background: var(--green); border-color: var(--green); color: #fff; }
.toc .dot svg { width: 10px; height: 10px; }
.toc-exam { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--rule); }
@media (max-width: 900px) { .campus-grid { grid-template-columns: 1fr; } .toc { position: static; order: 2; } }

.progress { height: 8px; background: var(--rule-soft); border-radius: 4px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--green); width: 0; border-radius: 4px; transition: width .4s; }
.progress-label { display: flex; justify-content: space-between; font-size: .8438rem; color: var(--muted); margin-bottom: 6px; }

.lesson { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: clamp(24px, 4vw, 48px); }
.lesson-meta { color: var(--muted); font-size: .9063rem; margin-bottom: 10px; }
.lesson h1 { font-size: var(--step-3); margin-bottom: .6em; }
.prose { max-width: 68ch; font-size: 1.0938rem; line-height: 1.7; }
.prose p, .prose ul { margin: 0 0 1.1em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--ink-3); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose aside { margin: 1.6em 0; padding: 18px 22px; border-radius: var(--r); font-size: 1.0313rem; }
.prose aside p:last-child { margin: 0; }
.prose aside.note { background: #edf3fa; border-left: 4px solid var(--ink-3); }
.prose aside.case { background: var(--paper); border: 1px solid var(--rule); border-left: 4px solid var(--ink); }
.prose aside.warn { background: var(--red-soft); border-left: 4px solid var(--red); }
.prose ul.checklist { list-style: none; padding: 0; }
.prose ul.checklist li { padding-left: 32px; position: relative; }
.prose ul.checklist li::before { content: ""; position: absolute; left: 0; top: .32em; width: 18px; height: 18px; border-radius: 4px; background: var(--green-soft); border: 1.5px solid var(--green); }
.prose ul.checklist li::after { content: ""; position: absolute; left: 6px; top: .5em; width: 5px; height: 9px; border-right: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(45deg); }
.lesson-points { margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--rule); }
.lesson-points h2 { font-size: 1.125rem; }
.lesson-nav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--rule); align-items: center; }

.module-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.module-card { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 18px 22px; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 6px 16px; align-items: center; }
.module-card .n { font-family: var(--serif); font-size: 1.5rem; color: var(--ink-3); }
.module-card h3 { margin: 0; font-size: 1.125rem; }
.module-card p { margin: 0; color: var(--muted); font-size: .9063rem; grid-column: 2; }
.module-card .state { grid-column: 3; grid-row: 1 / span 2; }
.module-card a { text-decoration: none; color: inherit; }
.module-card a:hover h3 { text-decoration: underline; }
.dash-hero { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; padding: 36px 0 28px; align-items: stretch; }
.dash-hero .card { display: flex; flex-direction: column; justify-content: center; }
@media (max-width: 900px) { .dash-hero { grid-template-columns: 1fr; } }

.question { padding: 22px 0; border-bottom: 1px solid var(--rule); }
.question legend { font-weight: 600; color: var(--ink); font-size: 1.0625rem; margin-bottom: 12px; line-height: 1.45; display: flex; gap: 10px; }
.question legend span { color: var(--muted); font-weight: 500; flex: none; }
.option { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--rule); border-radius: var(--r); margin-bottom: 8px; cursor: pointer; background: var(--surface); line-height: 1.45; }
.option:hover { border-color: #9fb0c2; }
.option input { margin: 3px 0 0; width: 18px; height: 18px; accent-color: var(--ink); flex: none; }
.option:has(input:checked) { border-color: var(--ink); background: #f3f6fa; }
.exam-timer { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--rule); padding: 12px 0; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.exam-timer b { font-variant-numeric: tabular-nums; font-size: 1.25rem; color: var(--ink); }
.exam-timer.low b { color: var(--red); }
.score { font-family: var(--serif); font-size: 4rem; line-height: 1; color: var(--ink); font-weight: 600; }
.review-item { padding: 16px 0; border-bottom: 1px solid var(--rule-soft); }
.review-item p { margin: 0 0 4px; }

/* ===================================================================== ADMIN */
.admin-bar { background: #0b1a2e; color: #c5d1dd; }
.admin-bar .wrap { display: flex; gap: 22px; align-items: center; min-height: 60px; flex-wrap: wrap; }
.admin-bar .brand { color: #fff; }
.admin-bar .brand svg { width: 26px; height: 26px; }
.admin-bar .brand-name { font-size: 1.0625rem; }
.admin-bar nav { display: flex; gap: 18px; flex-wrap: wrap; }
.admin-bar nav a { color: #c5d1dd; text-decoration: none; font-size: .9375rem; }
.admin-bar nav a:hover, .admin-bar nav a[aria-current="page"] { color: #fff; }
.admin-bar .right { margin-left: auto; display: flex; gap: 14px; align-items: center; }
.admin-bar .link-btn { color: #fff; }
.admin-main { padding: 32px 0 80px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 28px; }
.kpis div { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 16px 18px; }
.kpis b { display: block; font-family: var(--serif); font-size: 1.75rem; color: var(--ink); font-weight: 600; }
.kpis span { color: var(--muted); font-size: .8438rem; }
@media (max-width: 860px) { .kpis { grid-template-columns: 1fr 1fr; } }
.checklist-admin { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checklist-admin li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: .9375rem; }
.checklist-admin .icon { margin-top: 3px; }
.checklist-admin .ok .icon { color: var(--green); }
.checklist-admin .no .icon { color: var(--red); }
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 960px) { .two-col { grid-template-columns: 1fr; } }
.secret { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.125rem; letter-spacing: .12em; background: var(--paper); border: 1px dashed var(--rule); padding: 12px 14px; border-radius: var(--r); overflow-wrap: anywhere; }
dl.meta { display: grid; grid-template-columns: 170px 1fr; gap: 8px 16px; margin: 0; font-size: .9375rem; }
dl.meta dt { color: var(--muted); }
dl.meta dd { margin: 0; overflow-wrap: anywhere; }
.pager { display: flex; gap: 8px; margin-top: 16px; }

/* ===================================================================== CHAT */
.chat-launch {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: #fff; border: 0; border-radius: 999px; padding: 14px 20px 14px 16px; font: 600 .9688rem var(--sans);
  box-shadow: 0 12px 30px -10px rgba(16,35,61,.55); cursor: pointer;
}
.chat-launch:hover { background: var(--ink-2); }
.chat-launch svg { width: 22px; height: 22px; }
.chat-panel {
  position: fixed; right: 20px; bottom: 20px; z-index: 70; width: min(400px, calc(100vw - 24px)); height: min(600px, calc(100vh - 40px));
  background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; box-shadow: 0 30px 70px -20px rgba(16,35,61,.45);
  display: flex; flex-direction: column; overflow: hidden;
}
.chat-panel[hidden] { display: none; }
.chat-head { padding: 16px 18px; border-bottom: 1px solid var(--rule); display: flex; gap: 12px; align-items: flex-start; }
.chat-head h2 { font-size: 1.0625rem; margin: 0; font-family: var(--sans); font-weight: 600; letter-spacing: 0; }
.chat-head p { margin: 2px 0 0; font-size: .8125rem; color: var(--muted); line-height: 1.4; }
.chat-close { margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px; border-radius: var(--r-sm); }
.chat-close svg { width: 20px; height: 20px; }
.chat-log { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; background: var(--paper); }
.msg { max-width: 86%; padding: 10px 14px; border-radius: 12px; font-size: .9375rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.bot { background: var(--surface); border: 1px solid var(--rule); border-bottom-left-radius: 4px; align-self: flex-start; }
.msg.user { background: var(--ink); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.msg.typing { color: var(--muted); font-style: italic; }
.chat-suggest { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 10px; background: var(--paper); }
.chat-suggest button { background: var(--surface); border: 1px solid var(--rule); border-radius: 999px; padding: 6px 12px; font: 500 .8125rem var(--sans); color: var(--ink); cursor: pointer; }
.chat-suggest button:hover { border-color: var(--ink); }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--rule); background: var(--surface); }
.chat-form input { flex: 1; min-height: 44px; padding: 10px 12px; }
.chat-form button { min-height: 44px; padding: 0 16px; }
.chat-foot { font-size: .75rem; color: var(--muted); padding: 0 14px 10px; background: var(--surface); }
@media print { .chat-launch, .chat-panel, .site-header, .site-footer { display: none !important; } }

/* Legal */
.legal { padding-top: 8px; padding-bottom: 80px; }
.legal .prose h2 { font-size: 1.375rem; margin-top: 1.8em; }
.legal .prose h3 { font-size: 1.125rem; margin-top: 1.4em; }
.legal table { border-collapse: collapse; width: 100%; font-size: .9375rem; margin: 1em 0 1.5em; }
.legal th, .legal td { border: 1px solid var(--rule); padding: 10px 12px; text-align: left; vertical-align: top; }
.legal th { background: var(--paper); font-weight: 600; }
.legal-updated { color: var(--muted); font-size: .9063rem; }
h1.h2 { font-size: var(--step-3); }
.center-card .card > :last-child { margin-bottom: 0; }
h2.h3 { font-size: var(--step-1); }
.self-use { margin: 12px 0 0; }
.table-wrap { margin-top: 12px; }
.meta + .self-use, dl.meta { margin-top: 0; }
.dash-hero dl.meta { margin-top: 18px; }
figure.specimen { margin: 0; }
@media (max-width: 560px) {
  .flag { white-space: normal; text-decoration: underline wavy var(--red); text-decoration-thickness: 1.5px; text-underline-offset: 5px; text-decoration-skip-ink: none; }
  .flag::after { display: none; }
  .mark { position: static; display: inline-block; width: 20px; height: 20px; line-height: 20px; font-size: .6875rem; margin-left: 4px; vertical-align: 2px; box-shadow: none; }
  .chat-launch { padding: 14px; right: 14px; bottom: 14px; }
  .chat-launch-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .mail-head, .mail-body { padding-left: 16px; padding-right: 16px; }
  .hero-actions .btn { flex: 1 1 100%; }
}
.choice { margin-bottom: 20px; }
.nowrap { white-space: nowrap; }
.expert-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }

/* ====================================================== SEO: REGIÓN Y GUÍAS */
.kicker { display: block; font-family: var(--sans); font-size: .875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--green); margin: 0 0 .9rem; line-height: 1.3; }
.hero h1 .kicker { margin-bottom: 1.1rem; }
.region-hero .wrap { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; }
.region-hero h1 { max-width: 20ch; }
.course-card { background: var(--paper); border: 1px solid var(--rule); border-radius: 12px; padding: clamp(22px, 3vw, 32px); }
.course-card .kicker { margin-bottom: .4rem; }
.course-card-title { font-family: var(--serif); font-size: 1.375rem; font-weight: 600; color: var(--ink); margin: 0 0 1rem; line-height: 1.25; }
.course-card dl { margin: 0 0 1.25rem; display: grid; grid-template-columns: auto 1fr; gap: 0; }
.course-card dt, .course-card dd { margin: 0; padding: 11px 0; border-top: 1px solid var(--rule); }
.course-card dt { color: var(--muted); font-size: .9375rem; padding-right: 18px; }
.course-card dd { color: var(--ink); font-weight: 600; text-align: right; }
.course-card .btn { width: 100%; }
@media (max-width: 960px) { .region-hero .wrap { grid-template-columns: 1fr; } }
.provinces { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.provinces li { padding: 6px 12px; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper); color: var(--ink); font-size: .9063rem; font-weight: 500; }
.module-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; counter-reset: mod; }
.module-list li { counter-increment: mod; border-top: 1px solid var(--rule); padding: 20px 0 20px 52px; position: relative; }
.module-list li::before { content: counter(mod, decimal-leading-zero); position: absolute; left: 0; top: 18px; font-family: var(--serif); font-size: 1.75rem; color: var(--ink-3); line-height: 1; }
.module-list h3 { font-size: 1.1875rem; margin-bottom: .3em; }
.module-list p { margin: 0; color: var(--muted); font-size: .9688rem; }
@media (max-width: 760px) { .module-list { grid-template-columns: 1fr; } }
.options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.options .card + .card { margin-top: 0; }
.options ul { padding-left: 1.2em; margin: 0; }
.options li { margin-bottom: .45em; }
.card-accent { border: 2px solid var(--ink); }
ul.checks { list-style: none; padding: 0; }
ul.checks li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; }
ul.checks .icon { color: var(--green); margin-top: 3px; }
@media (max-width: 760px) { .options { grid-template-columns: 1fr; } }

.guide-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.guide-card { display: flex; flex-direction: column; gap: 10px; padding: 24px; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; text-decoration: none; color: var(--text); transition: border-color .15s, box-shadow .15s; }
.section-surface .guide-card { background: var(--paper); }
.guide-card:hover { border-color: var(--ink); box-shadow: var(--shadow); }
.guide-meta { font-size: .8125rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--green); }
.guide-title { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; line-height: 1.25; color: var(--ink); text-wrap: balance; }
.guide-card:hover .guide-title { text-decoration: underline; text-underline-offset: .2em; }
.guide-summary { color: var(--muted); font-size: .9688rem; }
.guides-region { margin-top: 28px; color: var(--muted); }
.section-tight { padding-top: 8px; }

.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .875rem; color: var(--muted); margin-bottom: 18px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs [aria-current] { color: var(--text); }
.article-head { padding-top: clamp(32px, 5vw, 56px); padding-bottom: clamp(20px, 3vw, 32px); }
.article-head .lede { max-width: 62ch; }
.article-head h1 { font-size: var(--step-4); max-width: 24ch; text-wrap: balance; }
.article-head .lede { margin-bottom: 1.4rem; }
.byline { display: flex; align-items: center; gap: 12px; margin: 0; font-size: .9375rem; }
.byline img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.article-body { display: grid; grid-template-columns: minmax(0, 68ch) minmax(260px, 340px); gap: clamp(32px, 5vw, 72px); align-items: start; padding-bottom: clamp(48px, 7vw, 88px); }
.article-body .prose h2 { font-size: var(--step-2); margin-top: 1.6em; }
.article-body .prose h3 { margin-top: 1.2em; }
.article-body .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.article-body .prose ol li { margin-bottom: .55em; }
.article-cta { position: sticky; top: 100px; }
.article-cta .kicker { margin-bottom: .6rem; }
.article-cta-title { font-family: var(--serif); font-size: 1.375rem; font-weight: 600; color: var(--ink); line-height: 1.25; margin: 0 0 .5em; }
.article-cta .btn { width: 100%; justify-content: center; margin-top: 10px; }
@media (max-width: 960px) { .article-body { grid-template-columns: minmax(0, 1fr); } .article-cta { position: static; } }
