/* AutoLeads — blog. Lectura larga sobre el sistema «Tinta y marfil» (docs/brand/BRAND.md §3):
   solo usa los tokens de /assets/site.css, así que funciona igual en claro y en oscuro.
   Columna de lectura de ~68ch, cifras destacadas con su fuente y gráficos SVG sin estilos en línea. */

/* ---------- Cabecera de artículo e índice ---------- */
.post-hero { position: relative; isolation: isolate; overflow: hidden; padding: 64px 0 40px; border-bottom: 1px solid var(--line); }
.post-hero::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  top: -40%; right: -20%; width: min(860px, 110vw); aspect-ratio: 1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 12%, transparent), transparent 72%);
}
.post-hero .overline a { color: inherit; text-decoration: none; }
.post-hero .overline a:hover { color: var(--accent); }
.post-hero h1 { margin-top: 18px; max-width: 980px; font-size: clamp(34px, 5.2vw, 64px); font-weight: 460; letter-spacing: -0.03em; line-height: 1.06; text-wrap: balance; }
.post-hero .lead { margin-top: 22px; max-width: 700px; font-size: clamp(17.5px, 1.7vw, 20.5px); line-height: 1.55; color: var(--ink-2); }
.post-meta { margin: 26px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--ink-3); font-size: 14px; }
.post-meta li { display: inline-flex; align-items: center; gap: 8px; }
.post-meta svg { flex: none; width: 15px; height: 15px; color: var(--ink-3); }

/* ---------- Cuerpo: índice + columna de lectura ---------- */
.post-body { padding: 48px 0 104px; }
.post-layout { display: grid; grid-template-columns: 228px minmax(0, 68ch); gap: 64px; align-items: start; justify-content: start; }
.post-toc { position: sticky; top: 92px; font-size: 14px; }
.post-toc .toc-title { font: 600 12px/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 12px; }
.post-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-left: 1px solid var(--line-2); counter-reset: toc; }
.post-toc li { counter-increment: toc; }
.post-toc a { display: grid; grid-template-columns: 22px minmax(0, 1fr); margin-left: -1px; padding: 6px 0 6px 12px; border-left: 1px solid transparent; color: var(--ink-2); text-decoration: none; line-height: 1.4; }
.post-toc a::before { content: counter(toc); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.post-toc a:hover { color: var(--ink); border-left-color: var(--accent); }
.post-toc .toc-cta { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 13.5px; line-height: 1.5; }
.post-toc .toc-cta a { display: inline; padding: 0; border: 0; margin: 0; color: var(--accent); font-weight: 600; }
.post-toc .toc-cta a::before { content: none; }
@media (max-width: 1040px) {
  .post-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .post-toc { position: static; max-width: 68ch; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px 14px; }
  .post-toc ol { border-left: 0; }
  .post-toc a { padding: 6px 0; margin-left: 0; border-left: 0; }
  .post-toc .toc-cta { display: none; }
}

/* Texto */
.post { max-width: 68ch; min-width: 0; }
.post > p, .post > ul:not([class]) > li, .post > ol:not([class]) > li { color: var(--ink-2); font-size: 18px; line-height: 1.72; }
.post > p + p { margin-top: 18px; }
.post > p.intro { color: var(--ink); font-size: 19.5px; line-height: 1.65; }
.post strong { color: var(--ink); font-weight: 600; }
.post h2 { scroll-margin-top: 92px; margin: 72px 0 18px; font-size: clamp(28px, 3.4vw, 40px); font-weight: 470; line-height: 1.12; text-wrap: balance; }
.post h2 .h-n { display: block; margin-bottom: 10px; font: 600 12px/1 var(--sans); letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent); }
.post h3 { scroll-margin-top: 92px; margin: 40px 0 10px; font: 600 19px/1.35 var(--sans); letter-spacing: -0.005em; color: var(--ink); }
.post > ul:not([class]), .post > ol:not([class]) { margin: 16px 0; padding-left: 22px; display: grid; gap: 10px; }
.post > ul:not([class]) > li::marker { color: var(--accent); }
.post a { overflow-wrap: anywhere; }
.post sup { font-size: 0.68em; line-height: 0; vertical-align: super; margin-left: 1px; }
.post sup a { text-decoration: none; font-weight: 600; padding: 0 1px; }
.post sup a:hover { text-decoration: underline; }
@media (max-width: 640px) {
  .post > p, .post > ul:not([class]) > li, .post > ol:not([class]) > li { font-size: 17px; line-height: 1.7; }
  .post > p.intro { font-size: 18px; }
  .post h2 { margin-top: 56px; }
}

/* ---------- Cifras destacadas ---------- */
.stats { margin: 30px 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stats.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat { margin: 0; padding: 20px 20px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-1); display: grid; align-content: start; gap: 8px; }
.stat-n { font: 460 clamp(32px, 3.6vw, 42px)/1 var(--serif); letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: lining-nums; }
.stat-n small { font-size: 0.5em; letter-spacing: 0; color: var(--ink-2); margin-left: 2px; }
.stat-l { color: var(--ink-2); font-size: 15px; line-height: 1.45; }
.stat-s { color: var(--ink-3); font-size: 12.5px; line-height: 1.4; }
.stat-s a { color: inherit; }
.stat.key { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 28%, var(--line)); }
.stat.key .stat-n { color: var(--accent-ink); }
@media (max-width: 720px) { .stats, .stats.two { grid-template-columns: minmax(0, 1fr); gap: 10px; } .stat { grid-template-columns: auto minmax(0, 1fr); column-gap: 16px; align-items: baseline; } .stat-n { grid-row: span 2; min-width: 3.6ch; } }

/* ---------- Gráficos ---------- */
.chart { margin: 34px 0; padding: 22px 22px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.chart-title { margin: 0 0 4px; font: 600 15.5px/1.4 var(--sans); color: var(--ink); }
.chart-sub { margin: 0 0 18px; color: var(--ink-3); font-size: 13.5px; line-height: 1.45; }
.chart figcaption { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 13px; line-height: 1.5; }
.chart figcaption a { color: inherit; }

/* Barras horizontales: etiqueta en HTML (se lee bien en el móvil), barra en SVG */
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.bars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: baseline; }
.bar-l { color: var(--ink-2); font-size: 14.5px; line-height: 1.35; }
.bar-l small { display: block; color: var(--ink-3); font-size: 12.5px; }
.bar-v { font: 600 15px/1 var(--sans); color: var(--ink); font-variant-numeric: tabular-nums; }
.bars svg { grid-column: 1 / -1; display: block; width: 100%; height: 12px; }
.bar-track { fill: var(--paper-3); }
.bar-fill { fill: var(--accent); }
.bar-fill.soft { fill: color-mix(in srgb, var(--accent) 45%, var(--paper-3)); }
.bar-fill.ink { fill: var(--ink-3); }

/* Línea de tiempo de un contrato (SVG con viewBox fijo) */
.timeline svg { display: block; width: 100%; max-width: 480px; height: auto; margin: 0 auto; overflow: visible; }
.tl-track { fill: var(--paper-3); }
.tl-run { fill: color-mix(in srgb, var(--accent) 30%, var(--paper-3)); }
.tl-window { fill: var(--accent); }
.tl-tick { stroke: var(--line-2); stroke-width: 1; }
.tl-mark { stroke: var(--ink); stroke-width: 1.5; }
.tl-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.tl-end { fill: var(--ink); stroke: var(--surface); stroke-width: 2; }
.tl-t { fill: var(--ink-3); font: 500 12.5px var(--sans); }
.tl-t.strong { fill: var(--ink); font-weight: 600; }
.tl-t.accent { fill: var(--accent); font-weight: 600; }
@media (max-width: 520px) { .chart { padding: 18px 16px 14px; } .tl-t { font-size: 14.5px; } }

/* ---------- Embudo de un caso ---------- */
.funnel { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.funnel li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: baseline; }
.funnel svg { grid-column: 1 / -1; display: block; width: 100%; height: 30px; }
.funnel .bar-v { font: 480 22px/1 var(--serif); letter-spacing: -0.02em; }

/* ---------- Avisos, citas y ejemplos ---------- */
.callout { margin: 28px 0; padding: 18px 22px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 4px 12px 12px 4px; }
.callout p { color: var(--ink); font-size: 16px; line-height: 1.6; }
.callout p + p { margin-top: 8px; }
.callout .callout-t { font: 600 12px/1.3 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 8px; }
.callout.warn { border-left-color: var(--warn); background: var(--warn-soft); }
.callout.warn .callout-t { color: var(--warn); }

.replies { list-style: none; margin: 26px 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.replies li { position: relative; margin: 0; padding: 18px 20px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px 14px 14px 14px; }
.replies .r-tag { display: block; margin-bottom: 8px; font: 600 11.5px/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.replies p { color: var(--ink); font-size: 15.5px; line-height: 1.55; }
.post > .replies-note { margin-top: -10px; line-height: 1.5; color: var(--ink-3); font-size: 13px; }
@media (max-width: 640px) { .replies { grid-template-columns: minmax(0, 1fr); } }

.example { margin: 22px 0; display: grid; gap: 12px; }
.msg { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px 18px; }
.msg-label { display: block; margin-bottom: 10px; font: 600 12px/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; }
.msg p { color: var(--ink); font-size: 16px; line-height: 1.6; }
.msg p + p { margin-top: 8px; }
.msg.before { background: transparent; border-style: dashed; }
.msg.before .msg-label { color: var(--bad); }
.msg.before p { color: var(--ink-2); }
.msg.after .msg-label { color: var(--ok); }
.msg-why { margin-top: 10px; color: var(--ink-3); font-size: 13.5px; line-height: 1.5; }

/* Perfil leído: la frase que demuestra que encaja, con el subrayador de la marca */
.profile { margin: 26px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-2); padding: 20px 22px 18px; }
.pf-head { display: flex; align-items: center; gap: 12px; }
.pf-avatar { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-3); color: var(--ink-2); font: 600 14px/1 var(--sans); }
.pf-head b { display: block; color: var(--ink); font-size: 16px; }
.pf-head small { display: block; color: var(--ink-3); font-size: 13.5px; }
.profile .pf-text { margin-top: 14px; color: var(--ink); font-size: 15.5px; line-height: 1.6; }
.profile mark { background: linear-gradient(transparent 12%, var(--marker) 12%, var(--marker) 88%, transparent 88%); color: inherit; padding: 0 2px; border-radius: 2px; }
.pf-why { margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.pf-why b { color: var(--ok); }
.post > .profile-note { margin-top: -12px; line-height: 1.5; color: var(--ink-3); font-size: 13px; }

/* Cargos a buscar */
.roles { list-style: none; margin: 22px 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.roles li { padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.roles b { display: block; color: var(--ink); font-size: 15.5px; line-height: 1.35; }
.roles span { display: block; margin-top: 4px; color: var(--ink-3); font-size: 13.5px; line-height: 1.45; }
@media (max-width: 640px) { .roles { grid-template-columns: minmax(0, 1fr); } }

/* Tablas (comparativa de canales, cadencia) */
.table-wrap { margin: 24px 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.tbl thead th { font: 600 11.5px/1.3 var(--sans); letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-3); background: var(--paper-2); }
.tbl tbody th { color: var(--ink); font-weight: 600; }
.tbl td { color: var(--ink-2); }
.tbl tbody tr:last-child th, .tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tr.ours th, .tbl tr.ours td { background: var(--accent-soft); color: var(--ink); }
.tbl .yes { color: var(--ok); font-weight: 600; }
.tbl .no { color: var(--bad); font-weight: 600; }
.post > .table-note { margin-top: -12px; line-height: 1.5; color: var(--ink-3); font-size: 13px; }
@media (max-width: 640px) {
  .table-wrap { border: 0; background: transparent; border-radius: 0; overflow: visible; }
  .tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tbl, .tbl tbody, .tbl tr, .tbl th, .tbl td { display: block; width: auto; }
  .tbl tr { margin-bottom: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px 0 8px; }
  .tbl tbody th { padding: 12px 16px 4px; border-bottom: 0; font-size: 16px; }
  .tbl td { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; padding: 4px 16px; border-bottom: 0; font-size: 14.5px; }
  .tbl td::before { content: attr(data-label); padding-top: 2px; font: 600 11px/1.4 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
  .tbl tr.ours { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
  .tbl tr.ours th, .tbl tr.ours td { background: transparent; }
}

/* Objeciones */
.objections { margin: 22px 0 0; display: grid; gap: 12px; }
.objection { padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.objection h3 { margin: 0 0 8px; font: 480 21px/1.3 var(--serif); letter-spacing: -0.01em; }
.objection p { color: var(--ink-2); font-size: 16.5px; line-height: 1.65; }
.objection p + p { margin-top: 10px; }

/* Escalera de cierre */
.steps { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 12px; counter-reset: st; }
.steps > li { counter-increment: st; position: relative; padding: 22px 22px 22px 70px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.steps > li::before { content: counter(st); position: absolute; left: 22px; top: 20px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); font: 500 17px/1 var(--serif); color: var(--accent); }
.steps h3 { margin: 0 0 6px; font: 480 21px/1.3 var(--serif); letter-spacing: -0.01em; }
.steps p { color: var(--ink-2); font-size: 16px; line-height: 1.6; }
.steps .ctas { margin-top: 16px; }
.steps > li.main { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 28%, var(--line)); }
.steps .fine { margin-top: 10px; color: var(--ink-3); font-size: 13.5px; }
@media (max-width: 520px) {
  .steps > li { padding: 62px 18px 20px; }
  .steps > li::before { left: 18px; top: 18px; }
  .steps .ctas .btn { width: 100%; }
}

/* Fuentes */
.sources { margin-top: 72px; padding-top: 24px; border-top: 1px solid var(--line); }
.sources h2 { margin-top: 0; font-size: 26px; }
.sources > p { color: var(--ink-3); font-size: 14px; line-height: 1.55; }
.sources ol { margin: 16px 0 0; padding-left: 26px; display: grid; gap: 10px; }
.sources li { color: var(--ink-2); font-size: 14.5px; line-height: 1.5; scroll-margin-top: 92px; }
.sources li::marker { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.sources li:target { background: var(--accent-soft); border-radius: 6px; }
.sources .src-note { display: block; color: var(--ink-3); font-size: 13px; }
.post > .post-end { margin-top: 32px; color: var(--ink-3); font-size: 13.5px; line-height: 1.55; }

/* ---------- Índice del blog ---------- */
.blog-hero h1 { font-size: clamp(40px, 6.4vw, 84px); max-width: 1000px; }
.blog-hero .lead { max-width: 640px; }
.blog-list { padding: 48px 0 40px; }
.feature { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-2); overflow: hidden; transition: border-color 160ms, transform 200ms var(--ease); }
.feature:hover { border-color: var(--line-2); transform: translateY(-2px); }
.feature-main { padding: 34px 34px 32px; display: grid; align-content: start; gap: 14px; }
.feature-main .overline { color: var(--accent); }
.feature h2 { font-size: clamp(28px, 3.2vw, 42px); font-weight: 470; line-height: 1.1; text-wrap: balance; }
.feature h2 a { color: var(--ink); text-decoration: none; }
.feature h2 a::after { content: ""; position: absolute; inset: 0; border-radius: 20px; }
.feature-main > p { color: var(--ink-2); font-size: 17px; line-height: 1.6; }
.feature .post-meta { margin-top: 2px; }
.feature .more { margin-top: 6px; color: var(--accent); font-weight: 600; font-size: 15.5px; }
.feature-side { padding: 30px 30px 28px; background: var(--paper-2); border-left: 1px solid var(--line); display: grid; align-content: center; gap: 18px; }
.feature-side .k { display: grid; gap: 4px; }
.feature-side .k-n { font: 460 38px/1 var(--serif); letter-spacing: -0.03em; color: var(--ink); }
.feature-side .k-l { color: var(--ink-2); font-size: 14px; line-height: 1.4; }
.feature-side .k + .k { padding-top: 18px; border-top: 1px solid var(--line); }
@media (max-width: 860px) {
  .feature { grid-template-columns: minmax(0, 1fr); }
  .feature-main { padding: 26px 22px 24px; }
  .feature-side { border-left: 0; border-top: 1px solid var(--line); padding: 22px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-content: start; }
  .feature-side .k + .k { padding-top: 0; border-top: 0; }
  .feature-side .k-n { font-size: 28px; }
  .feature-side .k-l { font-size: 12.5px; }
}
@media (max-width: 420px) { .feature-side { grid-template-columns: minmax(0, 1fr); } .feature-side .k { grid-template-columns: 92px minmax(0, 1fr); align-items: baseline; gap: 12px; } }

.blog-about { padding: 24px 0 96px; }
.blog-about .sec-t { font-size: clamp(26px, 3vw, 36px); font-weight: 470; max-width: 760px; }
.pillars { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pillars li { padding: 24px 22px; border-top: 2px solid var(--accent); background: var(--surface); border-radius: 0 0 14px 14px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pillars h3 { font-size: 22px; font-weight: 480; }
.pillars p { margin-top: 8px; color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }
@media (max-width: 860px) { .pillars { grid-template-columns: minmax(0, 1fr); } }
.blog-cta { margin-top: 40px; padding: 28px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.blog-cta p { color: var(--ink-2); font-size: 16.5px; max-width: 560px; }
.blog-cta p strong { color: var(--ink); }
@media (max-width: 520px) { .blog-cta { padding: 22px 18px; } .blog-cta .ctas { width: 100%; } .blog-cta .btn { flex: 1 1 100%; } }

@media (prefers-reduced-motion: reduce) { .feature, .feature:hover { transition: none; transform: none; } }
@media print {
  .top, .foot, .skip, .post-toc, .steps .ctas { display: none !important; }
  body { background: #fff; color: #000; }
  .post-layout { display: block; }
}
