/* ═══════════════════════════════════════════════════════════════════════
   QUANTUM CLUB — BLOG  (/blog y /blog/<artículo>/)
   ───────────────────────────────────────────────────────────────────────
   Misma estética que /masterclass (píldora de cristal, degradado
   cian→azul, JetBrains Mono para lo técnico) pero pensada para leer:
   sin fondo de partículas, columna de ~70 caracteres y buen contraste.
   Escrita a mano, sin Tailwind ni Font Awesome.

   Las páginas las genera _blog/build.py: no editar el HTML de /blog a mano.
   El modo claro base lo pone /theme.css; aquí se repintan las piezas
   propias, al final del fichero.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
    --bg:     #020203;
    --ink:    #ffffff;
    --body:   #d1d5db;
    --muted:  #9ca3af;
    --faint:  #6b7280;
    --line:   rgba(255, 255, 255, 0.08);
    --panel:  rgba(255, 255, 255, 0.025);
    --cyan:   #22d3ee;
    --blue:   #60a5fa;
    --link:   #67e8f9;
    --code-bg: #070b14;
    --grad:   linear-gradient(135deg, #22d3ee 0%, #3b82f6 55%, #2563eb 100%);
    --grad-t: linear-gradient(135deg, #22d3ee 0%, #2563eb 100%);
    /* Figuras: paleta validada (dataviz) en oscuro sobre #08080a; 3 colores
       categóricos + gris de contexto. En claro se redefinen abajo. */
    --fig-surface: #08080a;
    --fig-ink: #e5e7eb;
    --fig-muted: #8b93a5;
    --fig-grid: #23262f;
    --fig-ctx: #3b4150;
    --fig-s1: #1f95d6;
    --fig-s2: #d95926;
    --fig-s3: #199e70;
    --t-k: #c084fc; --t-s: #86efac; --t-n: #fbbf24; --t-c: #6b7280; --t-f: #60a5fa; --t-b: #22d3ee;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 6rem; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--ink);
    background-color: var(--bg);
    background-image:
        radial-gradient(60rem 30rem at 50% -10rem, rgba(37, 99, 235, 0.16), transparent 70%),
        radial-gradient(40rem 24rem at 100% 10rem, rgba(34, 211, 238, 0.06), transparent 70%);
    background-repeat: no-repeat;
    overflow-x: hidden;
}
::selection { background: rgba(59, 130, 246, 0.3); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }

.mono { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }
.grad-text {
    background: var(--grad-t);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}


/* ── Barra ─────────────────────────────────────────────────────────── */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; padding: 0.75rem 1rem; }
.nav-pill {
    max-width: 64rem; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
    padding: 0.5rem 0.6rem 0.5rem 1.1rem;
    border-radius: 9999px;
    background: rgba(2, 3, 8, 0.72);
    -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
}
.brand {
    display: inline-flex; align-items: center; gap: 0.5rem;
    font-size: 0.75rem; font-weight: 800; letter-spacing: -0.05em; text-transform: uppercase;
    color: var(--ink); text-decoration: none; flex: 0 0 auto;
}
.brand img { height: 1.6rem; width: auto; }
.brand-txt span { color: var(--blue); }
/* En móviles estrechos la marca se queda en el icono para que quepa el botón */
@media (max-width: 379px) { .brand-txt { display: none; } }
.nav-links { display: none; gap: 1.75rem; font-size: 10px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
.nav-links a { color: var(--muted); text-decoration: none; transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.nav-right { display: flex; align-items: center; gap: 0.5rem; }
.nav-cta {
    display: inline-flex; align-items: center;
    padding: 0.55rem 1rem; border-radius: 999px;
    background: var(--grad); color: #fff; text-decoration: none;
    font-size: 9.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap;
    box-shadow: 0 0 18px rgba(59, 130, 246, 0.45);
}
@media (min-width: 768px) { .nav-links { display: flex; } }


/* ── Contenedor ────────────────────────────────────────────────────── */
.wrap { max-width: 46rem; margin: 0 auto; padding: 6.5rem 1rem 4rem; }
.wrap--wide { max-width: 60rem; }
@media (min-width: 640px) { .wrap { padding: 8rem 1.5rem 5rem; } }

.crumbs { display: flex; flex-wrap: wrap; gap: 0.5rem; font-size: 10px; letter-spacing: 0.08em; color: var(--faint); margin-bottom: 1.75rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs [aria-current] { color: var(--faint); }


/* ── Cabecera del artículo ─────────────────────────────────────────── */
.level {
    display: inline-block; margin: 0 0 1rem; padding: 0.35rem 0.8rem; border-radius: 999px;
    font-size: 9.5px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
    border: 1px solid;
}
.level-1 { color: #4ade80; border-color: rgba(74, 222, 128, 0.35); background: rgba(74, 222, 128, 0.07); }
.level-2 { color: #67e8f9; border-color: rgba(34, 211, 238, 0.35); background: rgba(34, 211, 238, 0.07); }
.level-3 { color: #c4b5fd; border-color: rgba(167, 139, 250, 0.4); background: rgba(167, 139, 250, 0.08); }
.level-4 { color: #fcd34d; border-color: rgba(252, 211, 77, 0.4); background: rgba(252, 211, 77, 0.07); }

h1 {
    margin: 0 0 1rem;
    font-size: clamp(1.9rem, 6.5vw, 3rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.035em;
    color: var(--ink); text-wrap: balance;
}
.post-lead { margin: 0 0 1.75rem; font-size: 1.125rem; font-weight: 300; line-height: 1.55; color: var(--body); }

.byline { display: flex; align-items: center; gap: 0.8rem; padding-bottom: 1.75rem; border-bottom: 1px solid var(--line); }
.avatar { border-radius: 50%; object-fit: cover; border: 1px solid rgba(34, 211, 238, 0.45); box-shadow: 0 0 22px rgba(59, 130, 246, 0.3); }
.byline .avatar { width: 2.5rem; height: 2.5rem; }
.byline-name { margin: 0; font-weight: 700; font-size: 0.95rem; }
.byline-meta { margin: 0.1rem 0 0; font-size: 10.5px; color: var(--faint); }


/* ── Índice ────────────────────────────────────────────────────────── */
.toc { margin: 1.75rem 0 0; padding: 1rem 1.25rem; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
.toc summary { cursor: pointer; font-size: 10px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.toc ol { margin: 0.8rem 0 0.2rem; padding-left: 1.3rem; display: grid; gap: 0.35rem; font-size: 0.92rem; }
.toc a { color: var(--body); text-decoration: none; }
.toc a:hover { color: var(--link); }


/* ── Texto del artículo ────────────────────────────────────────────── */
.prose { font-size: 1.0625rem; color: var(--body); }
.prose > * + * { margin-top: 1.1rem; }
.prose p, .prose ul, .prose ol { margin-bottom: 0; }
.prose h2 {
    margin: 2.8rem 0 0; font-size: clamp(1.35rem, 4.5vw, 1.7rem); font-weight: 800;
    line-height: 1.2; letter-spacing: -0.02em; color: var(--ink);
}
.prose h3 { margin: 2rem 0 0; font-size: 1.15rem; font-weight: 700; color: var(--ink); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--link); text-decoration: underline; text-decoration-color: rgba(103, 232, 249, 0.35); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: currentColor; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li + li { margin-top: 0.45rem; }
.prose li::marker { color: var(--blue); }
.prose :not(pre) > code {
    font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.86em;
    padding: 0.12em 0.4em; border-radius: 6px; background: rgba(96, 165, 250, 0.1); color: #bfdbfe;
}
.prose blockquote {
    margin-left: 0; margin-right: 0; padding: 0.2rem 0 0.2rem 1.1rem;
    border-left: 2px solid rgba(34, 211, 238, 0.55); font-style: italic; color: var(--muted);
}
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

/* Recuadros dentro del texto */
.prose .note, .prose .warn, .prose .key {
    padding: 1rem 1.2rem; border-radius: 16px; font-size: 0.98rem; border: 1px solid;
}
.prose .note { background: rgba(96, 165, 250, 0.06); border-color: rgba(96, 165, 250, 0.22); }
.prose .warn { background: rgba(251, 191, 36, 0.06); border-color: rgba(251, 191, 36, 0.28); }
.prose .key  { background: rgba(74, 222, 128, 0.05); border-color: rgba(74, 222, 128, 0.25); }
.prose .note > :first-child, .prose .warn > :first-child, .prose .key > :first-child { margin-top: 0; }
.prose .note > * + *, .prose .warn > * + *, .prose .key > * + * { margin-top: 0.6rem; }

/* Tablas: se desplazan en horizontal dentro de su caja, nunca la página */
.prose .table { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.prose th, .prose td { padding: 0.65rem 0.9rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--ink); font-weight: 700; background: var(--panel); }
@media (min-width: 640px) { .prose th { white-space: nowrap; } }
.prose tr:last-child td { border-bottom: 0; }

/* Fórmulas: las largas se desplazan dentro de su bloque */
.prose .katex-display { overflow-x: auto; overflow-y: hidden; padding: 0.3rem 0; margin: 1.3rem 0; }
.prose .katex { font-size: 1.08em; }

/* Figuras: SVG generados por _blog/figuras.py e incrustados (heredan tema y fuente) */
.prose .fig { margin: 2rem 0; }
.fig-body {
    padding: 1rem 0.75rem 0.6rem; border-radius: 18px;
    background: var(--fig-surface); border: 1px solid var(--line);
}
.fig-body svg { display: block; width: 100%; max-width: 30rem; height: auto; margin: 0 auto; font-family: 'Plus Jakarta Sans', system-ui, sans-serif; }
.prose figcaption { margin-top: 0.65rem; font-size: 0.85rem; line-height: 1.5; color: var(--faint); text-align: center; }
.prose figcaption a { color: var(--muted); }


/* Línea de tiempo vertical */
.prose .timeline { list-style: none; padding: 0 0 0 0.3rem; margin-top: 1.4rem; position: relative; }
.prose .timeline::before { content: ""; position: absolute; left: 3.5rem; top: 0.5rem; bottom: 0.5rem; width: 2px; background: var(--line); }
.prose .timeline li { position: relative; display: grid; grid-template-columns: 2.6rem 1fr; gap: 1.6rem; margin: 0; padding: 0.35rem 0; font-size: 0.97rem; }
.prose .timeline li::after {
    content: ""; position: absolute; left: 2.95rem; top: 0.72rem; width: 10px; height: 10px; border-radius: 50%;
    background: var(--fig-s1); box-shadow: 0 0 0 3px var(--bg);
}
.tl-y { font-size: 0.8rem; font-weight: 700; color: var(--ink); padding-top: 0.15rem; text-align: right; }

/* Preguntas con solución desplegable (entrevistas) */
.prose .qa { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.prose .qa + .qa { margin-top: 0.7rem; }
.prose .qa summary {
    list-style: none; cursor: pointer; display: flex; gap: 0.8rem; align-items: baseline;
    padding: 0.95rem 1.1rem; font-weight: 600; color: var(--ink);
}
.prose .qa summary::-webkit-details-marker { display: none; }
.prose .qa summary::after { content: "Ver solución"; margin-left: auto; flex: 0 0 auto; font: 700 9.5px/1 'JetBrains Mono', monospace; letter-spacing: 0.12em; text-transform: uppercase; color: var(--link); }
.prose .qa[open] summary::after { content: "Ocultar"; }
.qa-n { flex: 0 0 auto; font-size: 0.8rem; color: var(--fig-s1); }
.qa-a { padding: 0 1.1rem 1rem 3.2rem; }
.qa-a > * + * { margin-top: 0.7rem; }
.qa-a > :first-child { margin-top: 0; }
@media (max-width: 520px) { .prose .qa summary { flex-wrap: wrap; } .prose .qa summary::after { margin-left: 2rem; } .qa-a { padding-left: 1.1rem; } }

/* Hoja de ruta por fases (artículo «cómo ser quant») */
.prose .roadmap { list-style: none; padding: 0; margin-top: 1.6rem; display: grid; gap: 0.6rem; counter-reset: none; }
.prose .roadmap li {
    position: relative; display: grid; grid-template-columns: 4.6rem 1fr; gap: 0.1rem 0.9rem;
    padding: 0.85rem 1.1rem; border-radius: 16px; background: var(--panel); border: 1px solid var(--line);
    margin: 0;
}
.prose .roadmap li + li::before {
    content: ""; position: absolute; left: 2.9rem; top: -0.65rem; height: 0.6rem; width: 2px; background: var(--fig-s1); opacity: 0.6;
}
.rm-n { grid-row: span 2; align-self: center; font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fig-s1); }
.rm-t { font-weight: 700; color: var(--ink); }
.rm-d { font-size: 0.9rem; color: var(--muted); }
@media (min-width: 700px) {
    .prose .roadmap { grid-template-columns: repeat(5, 1fr); gap: 0.6rem; }
    .prose .roadmap li { grid-template-columns: 1fr; padding: 0.9rem 0.8rem; }
    .prose .roadmap li + li::before { left: -0.65rem; top: 50%; width: 0.6rem; height: 2px; }
    .rm-n { grid-row: auto; }
    .rm-d { font-size: 0.8rem; line-height: 1.4; }
}

/* Calculadora interactiva (Black-Scholes) */
.prose .calc { margin: 2rem 0; padding: 1.2rem; border-radius: 20px; background: var(--fig-surface); border: 1px solid rgba(31, 149, 214, 0.35); }
.calc-title { margin: 0 0 1rem; font-weight: 800; color: var(--ink); }
.calc-title .mono { margin-left: 0.4rem; font-size: 9.5px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fig-s1); }
.calc-grid { display: grid; gap: 1.2rem; }
@media (min-width: 700px) { .calc-grid { grid-template-columns: 13rem 1fr; } }
.calc-ctrl { display: grid; gap: 0.85rem; align-content: start; }
.calc-ctrl label { display: grid; grid-template-columns: 1fr auto; gap: 0.3rem; font-size: 0.85rem; color: var(--muted); }
.calc-ctrl output { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.calc-ctrl input { grid-column: 1 / -1; width: 100%; accent-color: var(--fig-s1); }
.calc-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; margin-bottom: 0.8rem; }
@media (min-width: 900px) { .calc-stats { grid-template-columns: repeat(4, 1fr); } }
.calc-stats > div { padding: 0.6rem 0.75rem; border-radius: 12px; border: 1px solid var(--line); }
.calc-l { display: block; font-size: 0.75rem; color: var(--muted); }
.calc-v { display: block; font-size: 1.15rem; font-weight: 700; color: var(--ink); }
.calc-chart { position: relative; }
.calc-chart svg { display: block; width: 100%; height: auto; touch-action: pan-y; font-family: 'Plus Jakarta Sans', system-ui, sans-serif; }
.calc-chart .c-grid { stroke: var(--fig-grid); stroke-width: 1; }
.calc-chart .c-ax { fill: var(--fig-muted); font-size: 10px; }
.calc-chart .c-s1 { fill: none; stroke: var(--fig-s1); stroke-width: 2; stroke-linejoin: round; }
.calc-chart .c-s3 { fill: none; stroke: var(--fig-s3); stroke-width: 1.6; stroke-linejoin: round; }
.calc-chart .c-dot { fill: var(--fig-s1); stroke: var(--fig-surface); stroke-width: 2; }
.calc-chart .c-hover { stroke: var(--fig-muted); stroke-width: 1; }
.calc-tip {
    position: absolute; top: 0; transform: translateX(-50%); pointer-events: none;
    padding: 0.4rem 0.6rem; border-radius: 8px; font-size: 11px; line-height: 1.45; white-space: nowrap;
    color: var(--ink); background: var(--bg); border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
.calc-legend { margin: 0.5rem 0 0; font-size: 10.5px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.5rem; }
.calc-legend .k { display: inline-block; width: 14px; height: 2px; border-radius: 1px; }
.calc-legend .k1 { background: var(--fig-s1); }
.calc-legend .k3 { background: var(--fig-s3); margin-left: 0.6rem; }

/* ── Código ────────────────────────────────────────────────────────── */
.code { position: relative; margin-top: 1.3rem; border-radius: 16px; background: var(--code-bg); border: 1px solid rgba(96, 165, 250, 0.16); }
.code pre {
    margin: 0; padding: 2.4rem 1.1rem 1.1rem; overflow-x: auto;
    font: 400 13.5px/1.6 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    color: #e5e7eb; tab-size: 4;
}
.code-lang { position: absolute; top: 0.7rem; left: 1.1rem; font-size: 9.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint); }
.code-copy {
    position: absolute; top: 0.45rem; right: 0.5rem;
    padding: 0.3rem 0.7rem; border-radius: 999px; cursor: pointer;
    font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--muted); background: transparent; border: 1px solid var(--line);
}
.code-copy:hover { color: var(--ink); border-color: rgba(255, 255, 255, 0.25); }
.t-k { color: var(--t-k); } .t-s { color: var(--t-s); } .t-n { color: var(--t-n); }
.t-c { color: var(--t-c); font-style: italic; } .t-f { color: var(--t-f); } .t-b { color: var(--t-b); }
.prose .output {
    margin-top: 0; padding: 0.8rem 1.1rem; border-radius: 0 0 16px 16px;
    font: 400 12.5px/1.55 'JetBrains Mono', ui-monospace, monospace; white-space: pre; overflow-x: auto;
    color: var(--muted); background: rgba(255, 255, 255, 0.02); border: 1px solid var(--line); border-top: 0;
}
.code:has(+ .output) { border-radius: 16px 16px 0 0; }


/* Enlace al curso justo después del código */
.prose .cta-code {
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.2rem;
    margin-top: 1.1rem; padding: 0.85rem 1.1rem; border-radius: 14px;
    background: rgba(59, 130, 246, 0.06); border: 1px solid rgba(59, 130, 246, 0.22);
    border-left: 3px solid var(--fig-s1);
}
.prose .cta-code p { flex: 1 1 18rem; margin: 0; font-size: 0.92rem; color: var(--body); }
.prose .cta-code a {
    flex: 0 0 auto; font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--link); text-decoration: none; white-space: nowrap;
}
.prose .cta-code a:hover { text-decoration: underline; }
html[data-theme="light"] .prose .cta-code { background: rgba(37, 99, 235, 0.045); }

/* ── Cajas de llamada (guía, curso) ────────────────────────────────── */
.box { margin: 2.5rem 0 0; padding: 1.5rem 1.4rem; border-radius: 24px; border: 1px solid; }
.box p { margin: 0 0 1rem; color: var(--body); font-size: 0.97rem; }
.box-kicker { font-size: 9.5px !important; letter-spacing: 0.22em; text-transform: uppercase; margin-bottom: 0.45rem !important; }
.box-title { font-size: 1.25rem !important; font-weight: 800; line-height: 1.25; color: var(--ink) !important; margin-bottom: 0.6rem !important; }
.box-guia { background: rgba(34, 211, 238, 0.045); border-color: rgba(34, 211, 238, 0.22); }
.box-guia .box-kicker { color: #67e8f9; }
.box-cta { background: rgba(59, 130, 246, 0.07); border-color: rgba(59, 130, 246, 0.3); box-shadow: 0 0 60px rgba(37, 99, 235, 0.12); }
.box-cta .box-kicker { color: var(--blue); }
.box-mc { background: rgba(59, 130, 246, 0.045); border-color: rgba(96, 165, 250, 0.25); }
.box-mc .box-kicker { color: var(--blue); }
.box-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
.btn-link { font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted) !important; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(156, 163, 175, 0.4); }
.btn-link:hover { color: var(--ink) !important; }
.nav-arrow { display: none; }
@media (min-width: 480px) { .nav-arrow { display: inline; white-space: pre; } }
.btn, .btn-sec {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.85rem 1.4rem; border-radius: 999px; text-decoration: none !important;
    font-size: 10.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
}
.btn { color: #fff !important; background: var(--grad); box-shadow: 0 0 36px rgba(59, 130, 246, 0.4); transition: transform .2s; }
.btn:hover { transform: scale(1.03); }
.btn-sec { color: #67e8f9 !important; border: 1px solid rgba(34, 211, 238, 0.4); }
.btn-sec:hover { background: rgba(34, 211, 238, 0.08); }


/* ── Autor, anterior/siguiente, serie ──────────────────────────────── */
.author { display: flex; gap: 1rem; align-items: flex-start; margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.author .avatar { width: 3.5rem; height: 3.5rem; flex: 0 0 auto; }
.author p { margin: 0; font-size: 0.93rem; color: var(--muted); }
.author .author-name { color: var(--ink); font-weight: 700; margin-bottom: 0.3rem; }
.author a { color: var(--link); }

.prevnext { display: grid; gap: 0.75rem; margin-top: 2.5rem; }
@media (min-width: 640px) { .prevnext { grid-template-columns: 1fr 1fr; } .prevnext .pn:last-child { text-align: right; } }
.pn { display: block; padding: 1rem 1.2rem; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; transition: border-color .2s; }
.pn:hover { border-color: rgba(34, 211, 238, 0.4); }
.pn-label { display: block; font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--faint); margin-bottom: 0.3rem; }
.pn-title { font-weight: 600; font-size: 0.95rem; color: var(--ink); }

.series { margin-top: 2.5rem; padding: 1.3rem 1.3rem 1rem; border-radius: 22px; border: 1px solid var(--line); }
.series-title { margin: 0 0 0.9rem; font-size: 9.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.series ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; font-size: 0.92rem; }
.series li { display: flex; gap: 0.8rem; color: var(--muted); }
.series li .mono { color: var(--faint); font-size: 0.8rem; padding-top: 0.12rem; }
.series li a { color: var(--body); text-decoration: none; }
.series li a:hover { color: var(--link); }
.series li.is-here { color: var(--ink); font-weight: 700; }
.series-all { display: inline-block; margin-top: 0.9rem; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--link); text-decoration: none; }
.series-all:hover { text-decoration: underline; }
.series li.is-here .mono { color: var(--cyan); }


/* ── Portada del blog ──────────────────────────────────────────────── */
.blog-head { text-align: center; margin-bottom: 1rem; }
.blog-head h1 { font-size: clamp(2rem, 7.5vw, 3.6rem); text-transform: uppercase; letter-spacing: -0.045em; }
.blog-head .post-lead { max-width: 38rem; margin-left: auto; margin-right: auto; }
.pill {
    display: inline-flex; margin: 0 0 1.25rem; padding: 0.45rem 1rem; border-radius: 999px;
    background: rgba(34, 211, 238, 0.08); border: 1px solid rgba(34, 211, 238, 0.3);
    font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: #67e8f9;
}
.group { margin-top: 3rem; }
.group-desc { margin: -0.4rem 0 1.1rem; color: var(--muted); font-size: 0.95rem; }
@media (min-width: 760px) { .cards.cards--one { grid-template-columns: 1fr; } .cards--one .card-mini { flex: 0 0 17rem; height: 8rem; } .cards--one .card { flex-wrap: nowrap; align-items: center; } }
.blog-start { margin-top: 0.4rem; }
.group-title { display: flex; align-items: center; gap: 0.8rem; margin: 0 0 1rem; font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; }
.group-title .level { margin: 0; }
.cards { display: grid; gap: 0.8rem; }
@media (min-width: 760px) { .cards { grid-template-columns: 1fr 1fr; } }
.card {
    display: flex; flex-wrap: wrap; gap: 1rem; padding: 1.3rem 1.3rem; border-radius: 22px;
    background: var(--panel); border: 1px solid var(--line); text-decoration: none;
    transition: border-color .2s, transform .2s, background-color .2s;
}
.card:hover { border-color: rgba(34, 211, 238, 0.4); background: rgba(34, 211, 238, 0.035); transform: translateY(-2px); }
.card-mini {
    flex: 0 0 100%; display: flex; align-items: center; justify-content: center;
    height: 6.25rem; padding: 0.6rem 1rem; border-radius: 14px;
    background: var(--fig-surface); border: 1px solid var(--line);
}
.card-mini svg { height: 100%; width: auto; max-width: 100%; }
/* Miniatura con cifra destacada (artículos narrativos) */
.card-stat { flex-direction: column; gap: 0.25rem; text-align: center; }
.stat-v { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; background: var(--grad-t); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-row { display: flex; justify-content: center; gap: 0.4rem 1.1rem; flex-wrap: wrap; }
.stat-i { display: flex; flex-direction: column; gap: 0.2rem; }
.stat-v--sm { font-size: 1.25rem; }
@media (max-width: 480px) { .stat-v--sm { font-size: 1.05rem; } .stat-row { gap: 0.3rem 0.8rem; } }
.stat-cap { margin-top: 0.35rem; color: var(--faint); }
.stat-l { font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); max-width: 16rem; line-height: 1.4; }
.card-body { flex: 1; min-width: 0; }
.card-num { font-size: 1.15rem; font-weight: 700; line-height: 1.3; background: var(--grad-t); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.card-body { display: flex; flex-direction: column; gap: 0.45rem; }
.card-title { font-weight: 700; font-size: 1.02rem; line-height: 1.3; color: var(--ink); }
.card-desc { font-size: 0.88rem; font-weight: 300; line-height: 1.5; color: var(--muted); }
.card-meta { margin-top: auto; font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }


/* ── Pie ───────────────────────────────────────────────────────────── */
.foot { padding: 3.5rem 1rem 3rem; text-align: center; border-top: 1px solid rgba(255, 255, 255, 0.05); }
.foot img { height: 3rem; width: auto; margin: 0 auto 0.8rem; opacity: 0.9; filter: drop-shadow(0 0 26px rgba(59, 130, 246, 0.3)); }
.foot-brand { margin: 0 0 1.5rem; font-size: 11px; letter-spacing: 0.34em; text-transform: uppercase; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem 1.4rem; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--ink); }
.foot-legal { margin: 1.6rem auto 0; max-width: 30rem; font-size: 10px; color: var(--faint); }
.foot-copy { margin: 1rem 0 0; font-size: 9px; letter-spacing: 0.5em; text-transform: uppercase; color: #4b5563; }


/* ═══════════════════════════════════════════════════════════════════════
   MODO CLARO
   ═══════════════════════════════════════════════════════════════════════ */
html[data-theme="light"] {
    --bg:    #f7f9fc;
    --ink:   #0a0f1a;
    --body:  #313a4d;
    --muted: #4d5568;
    --faint: #6b7385;
    --line:  #e2e7f0;
    --panel: #ffffff;
    --cyan:  #0891b2;
    --blue:  #2563eb;
    --link:  #0e7490;
    --code-bg: #0b1120;
    --grad:   linear-gradient(135deg, #0891b2 0%, #2563eb 55%, #1d4ed8 100%);
    --grad-t: linear-gradient(135deg, #0891b2 0%, #1d4ed8 100%);
}
html[data-theme="light"] body {
    background-color: var(--bg);
    background-image: radial-gradient(60rem 30rem at 50% -10rem, rgba(37, 99, 235, 0.08), transparent 70%);
}
html[data-theme="light"] .nav-pill { background: rgba(255, 255, 255, 0.88); border-color: var(--line); box-shadow: 0 12px 32px rgba(10, 15, 26, 0.06); }
html[data-theme="light"] .nav-cta,
html[data-theme="light"] .btn { box-shadow: 0 10px 26px rgba(37, 99, 235, 0.25); }
html[data-theme="light"] .level-1 { color: #15803d; border-color: rgba(21, 128, 61, 0.3); background: rgba(21, 128, 61, 0.06); }
html[data-theme="light"] .level-2 { color: #0e7490; border-color: rgba(14, 116, 144, 0.3); background: rgba(14, 116, 144, 0.06); }
html[data-theme="light"] .level-3 { color: #6d28d9; border-color: rgba(109, 40, 217, 0.3); background: rgba(109, 40, 217, 0.06); }
html[data-theme="light"] .level-4 { color: #a16207; border-color: rgba(161, 98, 7, 0.3); background: rgba(161, 98, 7, 0.06); }
html[data-theme="light"] .prose :not(pre) > code { background: rgba(37, 99, 235, 0.08); color: #1e3a8a; }
html[data-theme="light"] .prose a { text-decoration-color: rgba(14, 116, 144, 0.35); }
html[data-theme="light"] .prose .output { color: #3c4457; background: #ffffff; }
html[data-theme="light"] .code { border-color: #1e293b; }
html[data-theme="light"] .box-guia { background: rgba(8, 145, 178, 0.05); border-color: rgba(8, 145, 178, 0.25); }
html[data-theme="light"] .box-guia .box-kicker, html[data-theme="light"] .btn-sec { color: #0e7490 !important; }
html[data-theme="light"] .btn-sec { border-color: rgba(14, 116, 144, 0.4); }
html[data-theme="light"] .box-cta { background: rgba(37, 99, 235, 0.05); box-shadow: none; }
html[data-theme="light"] .box-mc { background: rgba(37, 99, 235, 0.035); border-color: rgba(37, 99, 235, 0.22); }
html[data-theme="light"] .pill { background: rgba(8, 145, 178, 0.07); border-color: rgba(8, 145, 178, 0.3); color: #0e7490; }
html[data-theme="light"] .card:hover { background: #ffffff; border-color: rgba(8, 145, 178, 0.45); box-shadow: 0 12px 30px rgba(10, 15, 26, 0.06); }
html[data-theme="light"] .foot { border-top-color: #edf0f6; }
html[data-theme="light"] .avatar { border-color: rgba(8, 145, 178, 0.35); box-shadow: 0 6px 16px rgba(10, 15, 26, 0.12); }
html[data-theme="light"] .foot-copy { color: #8a92a3; }
html[data-theme="light"] {
    --fig-surface: #ffffff;
    --fig-ink: #0a0f1a;
    --fig-muted: #5b6375;
    --fig-grid: #e3e7ee;
    --fig-ctx: #c3c9d4;
    --fig-s1: #1a7fc0;
    --fig-s2: #eb6834;
    --fig-s3: #1baf7a;
}
