/* Blog de LeiAI Hub (crm.leiai.online/blog). Lo generan docs/blog/build.mjs y las fuentes de docs/blog/posts. */
:root {
  --bg: #050608; --bg-2: #0b0d12; --line: rgba(255,255,255,.09); --line-2: rgba(255,255,255,.16);
  --text: #f3f4f6; --soft: #d5d9df; --muted: #8b919c; --accent: #00d4ff; --ok: #5cf2a8; --warn: #ffd27a;
  --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 17px/1.7 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
body::before { content: ''; position: fixed; inset: -20vh -10vw auto; height: 70vh; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 50% 60% at 70% 20%, rgba(0,212,255,.10), transparent 70%), radial-gradient(ellipse 40% 50% at 20% 0%, rgba(47,107,255,.08), transparent 70%); }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -.03em; line-height: 1.08; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); letter-spacing: -.01em; }
.wrap { width: min(1120px, 100%); margin: 0 auto; padding: 0 var(--gutter); }

/* Barra superior flotante (igual que /acerca) */
.top { position: sticky; top: 14px; z-index: 10; display: flex; justify-content: center; padding: 0 12px; }
.top .bar { display: flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 6px 6px 14px; border: 1px solid rgba(255,255,255,.14); border-radius: 999px;
  background: rgba(11,13,18,.72); backdrop-filter: blur(18px) saturate(140%); box-shadow: 0 18px 50px -20px rgba(0,0,0,.9); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 17px; letter-spacing: -.02em; white-space: nowrap; }
.brand img { width: 28px; height: 28px; border-radius: 8px; }
.top nav { margin-left: 12px; display: flex; align-items: center; gap: 4px; font-size: 14px; }
.top nav a { text-decoration: none; color: var(--muted); padding: 8px 12px; border-radius: 999px; white-space: nowrap; }
.top nav a:hover, .top nav a[aria-current] { color: var(--text); background: rgba(255,255,255,.05); }
.top nav a.pill { background: #f5f6f8; color: #050608; padding: 9px 16px; font-weight: 500; }

/* Portada del blog */
.hero { padding: clamp(56px, 9vw, 110px) 0 clamp(28px, 4vw, 44px); }
.kicker { font: 500 12px/1 var(--mono); letter-spacing: .04em; color: var(--muted); }
.kicker b { color: var(--text); font-weight: 500; margin-right: 10px; }
.hero h1 { font-size: clamp(40px, 7vw, 84px); margin-top: 18px; max-width: 16ch; }
.hero p { margin: 22px 0 0; max-width: 60ch; font-size: clamp(17px, 2vw, 20px); color: var(--muted); }
.list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding-bottom: 40px; }
.post-card { display: flex; flex-direction: column; gap: 12px; padding: 26px; border: 1px solid var(--line); border-radius: 24px; text-decoration: none;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.012)); transition: border-color .2s, transform .2s; }
.post-card:hover { border-color: rgba(0,212,255,.45); transform: translateY(-2px); }
.post-card h2 { font-size: clamp(22px, 2.6vw, 28px); line-height: 1.15; }
.post-card p { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.6; }
.post-card .more { margin-top: auto; color: var(--accent); font-size: 14.5px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; color: var(--muted); }
.chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--soft); font-size: 12.5px; }

/* Artículo */
.article-head { padding: clamp(48px, 8vw, 96px) 0 28px; }
.crumbs { font-size: 14px; color: var(--muted); }
.crumbs a { text-decoration: none; } .crumbs a:hover { color: var(--text); }
.article-head h1 { font-size: clamp(34px, 5.6vw, 64px); margin: 18px 0 0; max-width: 20ch; }
.article-head .lead { margin: 20px 0 0; max-width: 62ch; font-size: clamp(17px, 2vw, 20px); color: var(--muted); }
.article-head .meta { margin-top: 22px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 56px; align-items: start; padding-bottom: 32px; }
.toc { position: sticky; top: 96px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.025); font-size: 14px; }
.toc b { display: block; font: 500 11.5px/1 var(--mono); letter-spacing: .04em; color: var(--muted); margin-bottom: 10px; text-transform: uppercase; }
.toc a { display: block; padding: 5px 0; color: var(--muted); text-decoration: none; line-height: 1.4; }
.toc a:hover { color: var(--text); }
.prose { max-width: 70ch; color: var(--soft); }
.prose > * + * { margin-top: 1.05em; }
.prose h2 { font-size: clamp(26px, 3.2vw, 34px); color: var(--text); margin-top: 2em; scroll-margin-top: 100px; }
.prose h3 { font-size: 21px; color: var(--text); margin-top: 1.6em; letter-spacing: -.02em; }
.prose p, .prose li { color: var(--soft); }
.prose strong, .prose b { color: var(--text); font-weight: 600; }
.prose a { color: var(--accent); text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose code { font: 14px var(--mono); background: rgba(255,255,255,.07); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; color: var(--text); word-break: break-all; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.prose th { text-align: left; color: var(--muted); font-weight: 500; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.prose td { padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose td:first-child { color: var(--text); font-weight: 500; }
.box { padding: 20px 22px; border-radius: 20px; border: 1px solid; }
.box > * + * { margin-top: .6em; }
.box.tldr { border-color: rgba(0,212,255,.35); background: rgba(0,212,255,.06); }
.box.tip { border-color: rgba(92,242,168,.35); background: rgba(92,242,168,.05); }
.box.warn { border-color: rgba(255,210,122,.4); background: rgba(255,210,122,.05); }
.box .label { display: block; font: 500 11.5px/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; }
.box.tldr .label { color: var(--accent); } .box.tip .label { color: var(--ok); } .box.warn .label { color: var(--warn); }
.formula { font: 15px/1.6 var(--mono); color: var(--text); padding: 14px 18px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid var(--line); }
.checklist { list-style: none; padding-left: 0 !important; }
.checklist li { position: relative; padding-left: 30px; }
.checklist li::before { content: '✓'; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: rgba(0,212,255,.14); border: 1px solid rgba(0,212,255,.5); color: var(--accent); font-size: 12px; line-height: 19px; text-align: center; }
.sources { font-size: 14.5px; color: var(--muted); }
.sources a { color: var(--muted); }

/* Llamado a la acción y relacionados */
.cta { margin: 48px 0 0; padding: clamp(26px, 4vw, 40px); border-radius: 28px; border: 1px solid rgba(0,212,255,.3);
  background: radial-gradient(80% 120% at 100% 0%, rgba(0,212,255,.16), transparent 60%), linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.01)); }
.cta h2 { font-size: clamp(26px, 3.4vw, 38px); }
.cta p { margin: 12px 0 0; color: var(--muted); max-width: 56ch; }
.cta .btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; text-decoration: none; font-weight: 500; font-size: 15px; border: 1px solid var(--line-2); }
.btn.solid { background: #f5f6f8; color: #050608; border-color: #f5f6f8; }
.related { padding: 40px 0 24px; border-top: 1px solid var(--line); margin-top: 48px; }
.related h2 { font-size: 26px; margin-bottom: 18px; }
.author { display: flex; align-items: center; gap: 12px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--muted); }
.author img { width: 40px; height: 40px; border-radius: 11px; }
.author b { color: var(--text); font-weight: 500; display: block; }

footer { margin-top: 24px; border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }
footer nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 18px; }
footer a { text-decoration: none; } footer a:hover { color: var(--text); }

@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 720px) {
  body { font-size: 16.5px; }
  .list { grid-template-columns: minmax(0, 1fr); }
  .top nav a.hide-sm { display: none; }
  footer nav { margin-left: 0; }
}
