/* ==========================================================================
   kernel · hoja de estilos común a la portada y a todos los artículos
   Mismo lenguaje visual que el portfolio de Alejandro García Nicolás:
   negro dominante, blanco de contraste, Hello Yellow como acento (nunca texto
   blanco sobre amarillo ni amarillo sobre blanco), grises Slate / Warm Slate
   para la jerarquía, Inter muy negra en mayúsculas para los titulares y
   JetBrains Mono para etiquetas y datos.
   ========================================================================== */

:root {
  --accent: #FFFF00;
  --black: #000000;
  --white: #ffffff;
  --s50: #F7F7F4;  --s100: #EFEFEA; --s200: #E3E3DB; --s300: #D5D5CB;
  --s400: #8F8F87; --s500: #666666; --s600: #555555; --s700: #3D3D3D; --s800: #1F1F1F;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', Menlo, monospace;
  --gutter: 24px;
  --rail: 0px;
}
@media (min-width: 768px)  { :root { --gutter: 48px; --rail: 80px; } }
@media (min-width: 1024px) { :root { --gutter: 80px; --rail: 96px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { margin: 0; background: var(--white); color: var(--black); font-family: var(--sans); font-size: 17px; line-height: 1.65; }
::selection { background: var(--accent); color: var(--black); }
img, svg { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--black); outline-offset: 3px; }

.custom-scroll::-webkit-scrollbar { width: 4px; height: 4px; }
.custom-scroll::-webkit-scrollbar-thumb { background: var(--s200); }

/* ---------- Tipografía base de la marca ---------- */
.kicker, .kicker-y {
  display: inline-block; width: max-content; max-width: 100%;
  font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; line-height: 1.4;
}
.kicker-y { background: var(--accent); color: var(--black); padding: .28em .55em; }
@media (min-width: 1024px) { .kicker-y.lg { font-size: 12px; } }
.mono { font-family: var(--mono); }
.label { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--s600); }
.hl-y { background: var(--accent); color: var(--black); padding: 0 .08em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.display {
  margin: 0; font-weight: 900; text-transform: uppercase; letter-spacing: -.05em; line-height: .95; color: var(--black);
  overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto;
}
/* El punto final amarillo de los titulares */
.display .dot { display: inline-block; background: var(--accent); line-height: .88; padding: .06em .1em .02em; margin-left: .02em; }
/* Palabra resaltada en un titular: el amarillo se ciñe a las letras (como en el CV) */
.display .hl-y { display: inline-block; line-height: .88; padding: .06em .1em .02em; margin-top: .1em; }
.display .hl-y .dot { padding: 0; margin: 0; background: none; line-height: inherit; }

/* ---------- Navegación tipo cartucho (igual que el CV) ---------- */
#nav-capsule {
  position: fixed; left: 16px; top: 24px; height: 56px; max-width: 56px;
  background: rgba(255,255,255,.98); border-radius: 9999px; border: 1px solid var(--s200);
  box-shadow: 0 4px 24px rgba(0,0,0,.04); overflow: hidden; z-index: 100;
  display: flex; align-items: center;
  transition: max-width .6s cubic-bezier(.7,0,.3,1), box-shadow .4s ease;
}
#nav-capsule.menu-open { max-width: calc(100vw - 32px); box-shadow: 0 12px 48px rgba(0,0,0,.08); }
#menu-trigger {
  width: 48px; height: 48px; margin: 4px; flex-shrink: 0; border-radius: 9999px; border: 0; cursor: pointer;
  background: var(--black); color: var(--white); font-family: var(--sans); font-weight: 900; font-size: 13px; letter-spacing: -.02em;
  transition: background .3s, color .3s;
}
#menu-trigger:hover { background: var(--accent); color: var(--black); }
#menu-content { display: flex; align-items: center; white-space: nowrap; opacity: 0; transition: opacity .3s; }
#nav-capsule.menu-open #menu-content { opacity: 1; }
#menu-content nav { display: flex; align-items: center; gap: 4px; padding: 0 16px 0 12px; }
.menu-link {
  display: flex; align-items: center; padding: 10px 16px; border-radius: 9999px; text-decoration: none;
  font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; color: var(--s500);
  transition: background .2s, color .2s;
}
.menu-link:hover { background: var(--accent); color: var(--black); }
.menu-link.is-current { background: var(--black); color: var(--white); }

/* ---------- Estructura de página ---------- */
main { padding-left: var(--rail); }
.wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); }
section { scroll-margin-top: 24px; }

/* Barra de progreso de lectura */
#progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--black); z-index: 110; }
#progress::after { content: ""; position: absolute; right: 0; top: 0; width: 24px; height: 3px; background: var(--accent); }

/* ---------- Cabecera (hero) ---------- */
.hero { min-height: 92vh; display: flex; flex-direction: column; justify-content: center; padding: 112px 0 48px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px 48px; align-items: center; }
@media (min-width: 1280px) { .hero-grid { grid-template-columns: 3fr 2fr; } .hero-side { text-align: right; align-items: flex-end; } }
.hero-id { font-size: 17px; font-weight: 900; letter-spacing: -.02em; margin: 0 0 16px; }
.hero-id a { text-decoration: none; }
.hero .kicker-y { margin-bottom: 24px; }
.hero h1 { font-size: clamp(2.5rem, 7.2vw, 5.4rem); line-height: 1; }
.hero-side { display: flex; flex-direction: column; gap: 20px; }
.hero-lead { font-size: 19px; line-height: 1.6; margin: 0; }
@media (min-width: 1024px) { .hero-lead { font-size: 21px; } }
.hero-meta { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--s600); line-height: 1.9; }
.hero-meta span + span::before { content: " · "; color: var(--s400); }

.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 20px; border-radius: 9999px; border: 0; cursor: pointer;
  background: var(--black); color: var(--white); text-decoration: none; width: max-content;
  font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; transition: background .25s, color .25s;
}
.btn:hover { background: var(--accent); color: var(--black); }
.btn.ghost { background: var(--s50); color: var(--black); border: 1px solid var(--s200); }
.btn.ghost:hover { background: var(--black); color: var(--white); }

/* Cifras de cabecera (como los KPI del CV) */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px 24px; margin-top: 64px; padding-top: 24px; border-top: 2px solid var(--black); }
@media (min-width: 1024px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat b { display: block; font-size: clamp(2rem, 3.4vw, 3rem); font-weight: 900; letter-spacing: -.05em; line-height: 1; }
.stat span { display: block; margin-top: 10px; font-size: 13px; color: var(--s500); line-height: 1.5; max-width: 30ch; }

/* ---------- Artículo: índice lateral + cuerpo ---------- */
.article-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; padding: 48px 0 96px; }
@media (min-width: 1100px) { .article-grid { grid-template-columns: 240px minmax(0, 1fr); gap: 72px; } }
.toc { display: none; }
@media (min-width: 1100px) {
  .toc { display: block; position: sticky; top: 32px; align-self: start; max-height: calc(100vh - 64px); overflow-y: auto; }
}
.toc .kicker-y { margin-bottom: 16px; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a {
  display: grid; grid-template-columns: 28px 1fr; padding: 7px 0; text-decoration: none; border-top: 1px solid var(--s200);
  font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; line-height: 1.4; color: var(--s400); transition: color .2s;
}
.toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--mono); font-weight: 700; }
.toc a:hover { color: var(--black); }
.toc a.is-current { color: var(--black); }
.toc a.is-current::before { background: var(--accent); width: max-content; padding: 0 3px; height: max-content; }

.prose { max-width: 760px; }
.prose > section { padding-top: 56px; }
.prose > section:first-child { padding-top: 0; }
.sec-head { margin-bottom: 28px; }
.sec-num { display: block; font-size: 64px; font-weight: 900; letter-spacing: -.05em; line-height: .9; color: var(--s100); margin-bottom: 4px; }
.prose h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); }
.prose h3 { margin: 40px 0 12px; font-size: 18px; font-weight: 900; text-transform: uppercase; letter-spacing: -.01em; line-height: 1.3; }
.prose p, .prose li { color: var(--s800); }
.prose p { margin: 0 0 18px; }
.prose .lead { font-size: 20px; line-height: 1.6; color: var(--s500); font-weight: 300; }
.prose ul, .prose ol { margin: 0 0 20px; padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose ul li::marker { color: var(--s400); }
.prose strong { font-weight: 800; color: var(--black); }
.prose a { text-decoration: underline; text-decoration-color: var(--s300); text-underline-offset: 3px; transition: text-decoration-color .2s, background .2s; }
.prose a:hover { text-decoration-color: var(--black); background: var(--accent); }
.prose code { font-family: var(--mono); font-size: .86em; background: var(--s50); border: 1px solid var(--s200); padding: .05em .35em; border-radius: 3px; }
.ui { font-weight: 700; }   /* nombres de comandos y menús del software */
.ui::before { content: "‹"; color: var(--s400); font-weight: 400; margin-right: 1px; }
.ui::after { content: "›"; color: var(--s400); font-weight: 400; margin-left: 1px; }

/* Bloques de código / STEP */
.prose pre {
  margin: 0 0 24px; padding: 20px 22px; background: var(--black); color: var(--white); border-radius: 6px; overflow-x: auto;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.7;
}
.prose pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.prose pre .c { color: var(--s400); }
.prose pre .y { color: var(--accent); }

/* Fórmulas */
.formula { margin: 0 0 24px; padding: 18px 22px; border-left: 4px solid var(--black); background: var(--s50); font-family: var(--mono); font-size: 14px; line-height: 1.9; overflow-x: auto; }

/* Tablas */
.table-wrap { margin: 8px 0 28px; overflow-x: auto; border-top: 2px solid var(--black); }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
.prose th {
  text-align: left; vertical-align: bottom; padding: 12px 14px 10px 0; border-bottom: 1px solid var(--black);
  font-family: var(--mono); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--s600); white-space: nowrap;
}
.prose td { padding: 11px 14px 11px 0; border-bottom: 1px solid var(--s200); vertical-align: top; color: var(--s800); }
.prose td:first-child { font-weight: 800; color: var(--black); }
.prose td.num, .prose td .mono { font-family: var(--mono); font-size: 13px; }
.prose tr.is-key td { background: var(--accent); }
.table-note { margin-top: -18px; font-size: 12px; color: var(--s500); }

/* Avisos */
.callout { margin: 28px 0; padding: 22px 24px; border: 1px solid var(--s200); background: var(--s50); border-radius: 6px; }
.callout .kicker-y { margin-bottom: 10px; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout.dark { background: var(--black); border-color: var(--black); color: var(--white); }
.callout.dark p, .callout.dark li, .callout.dark strong { color: var(--white); }
.callout.dark .label { color: var(--accent); }
.callout.dark a { text-decoration-color: var(--s500); }
.callout.dark code { background: var(--s800); border-color: var(--s700); color: var(--white); }
.callout.dark a:hover { color: var(--black); }
.callout.check { background: var(--white); border: 1px solid var(--black); }

/* Cita destacada */
.quote { margin: 32px 0; padding: 0 0 0 24px; border-left: 4px solid var(--accent); }
.quote p { font-size: 22px; line-height: 1.45; font-weight: 300; letter-spacing: -.01em; color: var(--black); margin-bottom: 10px; }
.quote cite { font-style: normal; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--s500); }

/* Pasos numerados (como el plan de éxito del CV) */
.steps { list-style: none; padding: 0 !important; margin: 8px 0 28px; counter-reset: step; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 18px 52px; margin: 0; }
.steps > li::before {
  content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: -2px; width: 34px; height: 34px; border-radius: 9999px;
  background: var(--black); color: var(--white); display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 11px; font-weight: 700;
}
.steps > li::after { content: ""; position: absolute; left: 16.5px; top: 36px; bottom: 2px; width: 1px; background: var(--s300); }
.steps > li:last-child::after { display: none; }
.steps > li:last-child::before { background: var(--accent); color: var(--black); border: 1px solid var(--black); }

/* Tarjetas de los tres orígenes */
.cards3 { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 8px 0 28px; }
@media (min-width: 720px) { .cards3 { grid-template-columns: repeat(3, 1fr); } }
.card3 { border-top: 2px solid var(--black); padding-top: 14px; }
.card3 svg { width: 44px; height: 44px; display: block; margin-bottom: 12px; }
.card3 b { display: block; font-size: 14px; font-weight: 900; text-transform: uppercase; letter-spacing: -.01em; line-height: 1.25; margin-bottom: 6px; }
.card3 p { font-size: 14px; line-height: 1.55; color: var(--s600) !important; margin: 0; }

/* Figura / diagrama */
figure.diagram { margin: 12px 0 32px; }
figure.diagram svg { width: 100%; height: auto; display: block; }
figure.diagram figcaption { margin-top: 10px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--s500); }

/* Errores comunes: lista numerada grande */
.errors { list-style: none; padding: 0 !important; margin: 8px 0 24px; counter-reset: err; display: grid; grid-template-columns: 1fr; gap: 0 32px; }
@media (min-width: 720px) { .errors { grid-template-columns: 1fr 1fr; } }
.errors li { counter-increment: err; position: relative; padding: 12px 0 12px 40px; margin: 0; border-top: 1px solid var(--s200); font-size: 15px; line-height: 1.5; }
.errors li::before { content: counter(err, decimal-leading-zero); position: absolute; left: 0; top: 14px; font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--s400); }

/* Checklist */
.checklist { list-style: none; padding: 0 !important; }
.checklist li { position: relative; padding-left: 30px; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .32em; width: 16px; height: 16px; border: 2px solid var(--black); border-radius: 3px; }

/* Etiqueta "por confirmar" */
.tag { display: inline-block; vertical-align: .1em; margin-left: 4px; padding: 1px 6px; border-radius: 9999px; border: 1px solid var(--black); font-family: var(--mono); font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--black); white-space: nowrap; }
.tag.y { background: var(--accent); }

/* Glosario */
.glossary { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0 0 24px; }
@media (min-width: 720px) { .glossary { grid-template-columns: 200px 1fr; } }
.glossary dt { padding: 12px 16px 0 0; font-weight: 900; font-size: 13px; text-transform: uppercase; letter-spacing: .02em; border-top: 1px solid var(--s200); }
.glossary dd { margin: 0; padding: 4px 0 12px; font-size: 15px; color: var(--s700); }
@media (min-width: 720px) { .glossary dd { padding: 12px 0; border-top: 1px solid var(--s200); } }

/* Fuentes */
.sources { font-size: 13px; line-height: 1.6; padding-left: 20px !important; }
.sources li { margin: 4px 0; color: var(--s600) !important; word-break: break-word; }

/* Navegación entre artículos de la serie */
.series-nav { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 64px; padding-top: 24px; border-top: 2px solid var(--black); }
@media (min-width: 720px) { .series-nav { grid-template-columns: 1fr 1fr; } }
.series-nav a, .series-nav .empty { display: block; padding: 20px; border: 1px solid var(--s200); border-radius: 6px; text-decoration: none; transition: background .2s, border-color .2s; }
.series-nav a:hover { background: var(--accent); border-color: var(--black); }
.series-nav .empty { color: var(--s400); background: var(--s50); }
.series-nav .next { text-align: right; }
.series-nav b { display: block; margin-top: 6px; font-size: 18px; font-weight: 900; text-transform: uppercase; letter-spacing: -.02em; line-height: 1.15; }

/* ---------- Portada de la serie ---------- */
.series-head { display: flex; flex-direction: column; align-items: flex-end; text-align: right; padding: 64px 0 40px; }
.series-head h2 { font-size: clamp(2.6rem, 5vw, 3.8rem); }
.series-head p { font-size: 18px; font-weight: 300; color: var(--s500); max-width: 36rem; margin: 16px 0 0; }
.article-list { list-style: none; margin: 0; padding: 32px 0 96px; border-top: 2px solid var(--black); display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px 20px; }
@media (min-width: 640px) { .article-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .article-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.article-item a { display: flex; flex-direction: column; gap: 14px; height: 100%; text-decoration: none; }
.article-item h3 { margin: 0 0 8px; font-size: clamp(1.3rem, 2vw, 1.6rem); font-weight: 900; text-transform: uppercase; letter-spacing: -.04em; line-height: 1; }
.article-item p { margin: 0; color: var(--s500); font-size: 15px; line-height: 1.55; }
.article-item .meta { margin: 0 0 8px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--s600); line-height: 1.9; }
.lectura-t { margin: 14px 0 0; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--s600); }
.lectura-t b { color: var(--black); font-weight: 700; }
.article-item .meta .soon { background: var(--s100); padding: 1px 6px; margin-left: 4px; }
.article-item a:hover .cover { border-color: var(--black); }
.article-item a:hover .cover-n { color: var(--black); }
.article-item a:hover .cover img { transform: scale(1.06); }
.article-item.is-soon a { pointer-events: none; }
.article-item.is-soon h3 { color: var(--s400); }
.article-item.is-soon .cover { opacity: .5; }

/* ---------- Identidad común de los artículos: cubierta y ficha ---------- */
/* Cubierta = papel cuadriculado + número + ilustración (assets/img/cubiertas/<slug>.svg, 320×200, trazo negro 3, una sola pieza amarilla) + tema + sello BF.
   El pictograma (assets/img/iconos/<slug>.svg) va en el menú de diapositivas. */
.cover {
  position: relative; aspect-ratio: 16 / 10; border: 1px solid var(--s200); border-radius: 6px; overflow: hidden; transition: border-color .2s;
  background-color: var(--s50);
  background-image: radial-gradient(circle, var(--s300) 1.25px, transparent 1.75px);
  background-size: 20px 20px; background-position: 10px 10px;
}
.cover img { position: absolute; inset: 14% 8% 15%; width: 84%; height: 71%; object-fit: contain; transition: transform .3s; }
.cover-n { position: absolute; left: 14px; top: 8px; font-size: clamp(2.4rem, 4vw, 3.4rem); font-weight: 900; letter-spacing: -.05em; line-height: 1; color: var(--s300); transition: color .2s; }
.cover-t { position: absolute; left: 14px; bottom: 12px; background: var(--accent); color: var(--black); font-family: var(--mono); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; padding: 2px 6px; }
.cover-bf { position: absolute; right: 12px; bottom: 10px; width: 28px; height: 28px; border-radius: 9999px; background: var(--black); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 900; letter-spacing: -.02em; }
/* Ficha de identidad en la portada de cada artículo (<div class="card w6 ficha" data-ficha></div>, la rellena web.js) */
.card.ficha { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 12px; }
@media (min-width: 560px) { .card.ficha { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; } }
.card.ficha .cover { border-color: var(--s200); }
.card.ficha .cover-n { color: var(--black); }
.ficha-info { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; padding: 4px 8px 8px; }
.ficha-info .c-title { font-size: clamp(1.2rem, 1.8vw, 1.6rem); }
.deck-ico { display: block; width: 44px; height: 44px; margin: 0 0 10px; }

/* ---------- Pie ---------- */
footer.site {
  border-top: 1px solid var(--s200); padding: 32px 0 40px var(--rail);
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--s400);
}
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
footer.site .sep { color: var(--black); background: var(--accent); padding: 0 3px; }

@media print {
  #nav-capsule, #progress, .toc, .series-nav { display: none !important; }
  main { padding-left: 0; }
  .hero { min-height: 0; }
}

/* ==========================================================================
   Artículo en dos capas (mismo patrón que el portfolio)
   Capa 1: una diapositiva a pantalla completa por idea, legible en 15 s,
   compuesta en bloques (titular + tarjetas visuales) a todo el ancho.
   Capa 2: ficha emergente con el detalle, también en tarjetas, sin repetir
   ningún texto de su diapositiva.
   ========================================================================== */
:root { --side: 0px; --pad: 16px; }
@media (min-width: 768px) { :root { --pad: 28px; } }
@media (min-width: 1200px) { :root { --side: 272px; --pad: 40px; } }
@media (min-width: 1200px) and (min-height: 700px) { html:has(.deck) { scroll-snap-type: y mandatory; } }
main.deck { padding-left: var(--side); overflow-x: clip; }
body:has(.deck) footer.site { padding-left: var(--side); }

.slide {
  background: var(--white);
  position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
  padding: 92px var(--pad) 84px; scroll-snap-align: start; border-bottom: 1px solid var(--s100);
}
@media (min-width: 1200px) { .slide { padding: 40px var(--pad); } }

/* Rejilla de bloques: titular a la izquierda, tarjetas a la derecha */
.bento { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; width: 100%; }
@media (min-width: 1000px) { .bento { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; align-items: stretch; } }
.b-title { display: flex; flex-direction: column; justify-content: center; padding: 8px 4px 16px 0; min-width: 0; }
.b-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; min-width: 0; }
@media (min-width: 640px) { .b-cards { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; } }
.w6, .w4 { grid-column: span 2; }
.w3, .w2 { grid-column: span 1; }
@media (min-width: 640px) { .w6 { grid-column: span 6; } .w4 { grid-column: span 4; } .w3 { grid-column: span 3; } .w2 { grid-column: span 2; } }
.m-full { grid-column: span 2; }
@media (min-width: 640px) { .m-full.w2 { grid-column: span 2; } .m-full.w3 { grid-column: span 3; } }

.slide-n { display: block; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .1em; color: var(--s400); margin-bottom: 12px; }
/* Sin cabecera pequeña sobre el titular (contador, bloque, regla y antetítulo): el menú ya lo dice.
   El antetítulo sigue en el HTML para el buscador y la accesibilidad del índice. */
.slide .slide-n, .slide .slide-n + .kicker-y { display: none; }
.slide .kicker-y { margin-bottom: 16px; }
.slide h2 { font-size: clamp(2.1rem, 4.6vw, 4rem); }
.slide h1.display { font-size: clamp(2.5rem, 6.4vw, 5.2rem); line-height: 1; }
@media (max-width: 480px) { .slide h2 { font-size: 2rem; } }
.slide-lead { margin: 18px 0 0; max-width: 36ch; font-size: 18px; line-height: 1.5; color: var(--s700); }
@media (min-width: 1200px) { .slide-lead { font-size: 20px; } }
.slide-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.l2-btn .plus { display: inline-block; font-size: 15px; line-height: 1; transition: transform .3s; }
.l2-btn:hover .plus { transform: rotate(90deg); }

/* Tarjeta */
.card {
  position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 16px;
  background: var(--white); border: 1px solid var(--s200); border-radius: 8px;
}
@media (min-width: 1200px) { .card { padding: 20px; } }
.card.g { background: var(--s50); }
.card.k { background: var(--black); border-color: var(--black); color: var(--white); }
.card.y { background: var(--accent); border-color: var(--black); }
.c-label { font-family: var(--mono); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--s500); line-height: 1.4; }
.card.k .c-label { color: var(--accent); }
.card.y .c-label { color: var(--black); }
.c-num { display: block; font-size: clamp(2.6rem, 5vw, 4.6rem); font-weight: 900; letter-spacing: -.05em; line-height: .9; }
.c-num small { font-size: .4em; letter-spacing: -.02em; margin-left: .08em; }
.c-num.xl { font-size: clamp(3.4rem, 7vw, 6.4rem); }
.c-text { font-size: 15px; font-weight: 700; line-height: 1.35; letter-spacing: -.01em; }
.c-title { font-size: clamp(1.05rem, 1.5vw, 1.3rem); font-weight: 900; text-transform: uppercase; letter-spacing: -.02em; line-height: 1.1; }
.c-foot { margin-top: auto; font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--s500); line-height: 1.5; }
.card.k .c-foot { color: var(--s300); }
.card svg.draw { display: block; width: 100%; height: auto; max-height: 300px; }
.card .ico { width: 40px; height: 40px; display: block; }
.card .ico.wide { width: 120px; height: 60px; }
.badge { display: inline-block; width: max-content; padding: 3px 8px; border-radius: 9999px; font-family: var(--mono); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; border: 1px solid var(--black); }
.badge.y { background: var(--accent); color: var(--black); }
.badge.k { background: var(--black); color: var(--white); }
.badge.n { border-color: var(--s300); color: var(--s500); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 7px 11px; border: 1px solid var(--black); border-radius: 4px; font-size: 14px; font-weight: 800; line-height: 1.2; background: var(--white); color: var(--black); }
.chip .mono { font-size: 10px; font-weight: 700; color: var(--s500); }
.chip.y { background: var(--accent); }
.chip.k { background: var(--black); color: var(--white); }
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.flow .arrow { font-weight: 900; color: var(--s400); }

.bars { display: grid; gap: 6px; }
.bar { display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 10px; font-family: var(--mono); font-size: 11px; font-weight: 700; }
.bar i { display: flex; align-items: center; height: 24px; padding-left: 8px; background: var(--s200); font-style: normal; font-size: 10px; color: var(--s600); white-space: nowrap; overflow: hidden; }
.bar.is-key i { background: var(--accent); border: 1px solid var(--black); color: var(--black); }

.step-n { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 9999px; background: var(--black); color: var(--white); font-family: var(--mono); font-size: 11px; font-weight: 700; flex-shrink: 0; }
.card.y .step-n { background: var(--black); }
.card.k .step-n { background: var(--accent); color: var(--black); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }

/* Menú de diapositivas: lateral en escritorio, barra inferior en móvil */
#deck-nav { display: none; }
@media (min-width: 1200px) {
  #deck-nav {
    display: flex; flex-direction: column; position: fixed; left: 0; top: 0; bottom: 0; width: var(--side); z-index: 95;
    padding: var(--nav-top, 100px) 16px 20px 20px; background: var(--white);
  }
  #deck-nav .kicker-y { margin-bottom: 12px; }
  /* Solo el índice (portada + bloques con su contador): sistema, buscar, ayuda e idioma viven en el cartucho */
  #deck-nav > :not(ol) { display: none; }
  #deck-nav ol { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
  /* Sin barra de desplazamiento visible: el menú se mueve con la rueda del ratón */
  #deck-nav ol { scrollbar-width: none; -ms-overflow-style: none; overscroll-behavior: contain; }
  #deck-nav ol::-webkit-scrollbar { display: none; }
}

.nav-item a {
  display: grid; grid-template-columns: 26px 1fr; align-items: baseline; padding: 5px 8px; border-radius: 4px; text-decoration: none;
  font-size: 12px; font-weight: 500; line-height: 1.3; color: var(--s400);
  transition: background .2s, color .2s;
}
.nav-item a span { font-family: var(--mono); font-size: 9.5px; font-weight: 700; }
.nav-item a:hover { color: var(--black); background: var(--s50); }
.nav-item a.is-current { background: var(--black); color: var(--white); }
.nav-item a.is-current span { color: var(--accent); }
.nav-item a.is-done { color: var(--s600); }

#deck-bar { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 96; }
@media (min-width: 1200px) { #deck-bar { display: none; } }
#deck-bar-btn {
  width: 100%; display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 8px 0 16px; border-radius: 9999px; cursor: pointer;
  background: var(--black); color: var(--white); border: 0; box-shadow: 0 10px 30px rgba(0,0,0,.18); text-align: left;
  font-family: var(--sans); font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: .02em;
}
#deck-bar-btn .n { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--black); background: var(--accent); padding: 2px 6px; border-radius: 3px; }
#deck-bar-btn .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#deck-bar-btn .chev { width: 36px; height: 36px; border-radius: 9999px; background: var(--s800); display: flex; align-items: center; justify-content: center; transition: transform .3s; }
#deck-bar.is-open #deck-bar-btn .chev { transform: rotate(180deg); }
#deck-sheet {
  display: none; position: absolute; left: 0; right: 0; bottom: 62px; max-height: min(70vh, 560px); overflow-y: auto; padding: 10px;
  background: var(--white); border: 1px solid var(--s200); border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.2);
}
#deck-bar.is-open #deck-sheet { display: block; }
#deck-sheet ol { list-style: none; margin: 0; padding: 0; }
#deck-sheet .nav-item a { padding: 9px 8px; font-size: 13px; }
@media (min-width: 640px) { #deck-bar { left: auto; width: 420px; } }

/* Capa 2: ficha emergente (como la ficha de los casos del CV) */
#l2-modal { position: fixed; inset: 0; z-index: 205; display: none; align-items: center; justify-content: center; padding: 8px; background: rgba(0,0,0,.5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
@media (min-width: 1024px) { #l2-modal { padding: 28px; } }
#l2-modal.is-visible { display: flex; }
.l2-panel {
  position: relative; width: 100%; max-width: 84rem; max-height: 94vh; max-height: 94svh; overflow-y: auto; background: var(--s50); border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,.25); transform: translateY(24px) scale(.98); opacity: 0;
  transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .35s ease;
}
#l2-modal.is-open .l2-panel { transform: none; opacity: 1; }
.l2-close {
  position: sticky; top: 12px; float: right; margin-right: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 9999px; cursor: pointer;
  background: var(--black); border: 0; font-size: 14px; font-weight: 900; color: var(--white); transition: background .2s, color .2s;
}
.l2-close:hover { background: var(--accent); color: var(--black); }
.l2-body { padding: 18px 12px 24px; }
@media (min-width: 768px) { .l2-body { padding: 28px 28px 32px; } }
.l2-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding-right: 56px; margin-bottom: 16px; }
.l2-head h3 { margin: 0 !important; font-size: clamp(1.3rem, 2.4vw, 1.9rem) !important; font-weight: 900; text-transform: uppercase; letter-spacing: -.03em; line-height: 1; width: 100%; }
.l2-body .b-cards { gap: 12px; grid-auto-flow: row dense; }
.l2-body .card { font-size: 15px; line-height: 1.55; }
.l2-body .card p, .l2-body .card li { font-size: 15px; color: var(--s800); }
.l2-body .card.k p, .l2-body .card.k li, .l2-body .card.k strong { color: var(--white); }
.l2-body .card p { margin: 0; }
.l2-body .card ul, .l2-body .card ol { margin: 0; }
.l2-body .card h4 { margin: 0; font-size: 15px; font-weight: 900; text-transform: uppercase; letter-spacing: -.01em; }
.l2-body .table-wrap { margin: 0; }
.l2-body pre { margin: 0; }
.l2-body .formula { margin: 0; }
.l2-body.prose { max-width: none; }
body.l2-lock { overflow: hidden; }

/* Pasos verticales compactos */
.vsteps { list-style: none; margin: 0 !important; padding: 0 !important; counter-reset: vs; display: grid; gap: 10px; }
.vsteps li { counter-increment: vs; position: relative; padding-left: 38px; min-height: 28px; margin: 0 !important; }
.vsteps li::before { content: counter(vs, decimal-leading-zero); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 9999px; background: var(--black); color: var(--white); display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 10px; font-weight: 700; }
.vsteps li:last-child::before { background: var(--accent); color: var(--black); border: 1px solid var(--black); }

.prose code { overflow-wrap: anywhere; }
@media print { #deck-nav, #deck-bar, .slide-actions { display: none !important; } main.deck { padding-left: 0; } .slide { min-height: 0; break-inside: avoid; } }

/* Capa 2 en móvil: una tarjeta por fila; diagramas contenidos */
@media (max-width: 767px) { .l2-body .b-cards > .card { grid-column: 1 / -1; } }
.l2-body .diagram { margin: 0; }
.l2-body .diagram svg { display: block; width: 100%; height: auto; max-height: 340px; }

/* ---------- Hilo narrativo: capítulos ---------- */
/* data-cap="I · El problema" en la primera slide de cada capítulo: cabecera en el menú y rótulo junto a la numeración */
/* Menú plegable por capítulos: solo el del visitante desplegado */
.nav-group { list-style: none; }
.nav-group > ol { display: none; list-style: none; margin: 0 0 6px; padding: 0; }
.nav-group.is-open > ol { display: block; }
.nav-cap { width: 100%; margin: 4px 0 2px; padding: 9px 8px; border: 0; border-radius: 6px; background: none; cursor: pointer; text-align: left; font-family: var(--sans); font-size: 14px; font-weight: 900; text-transform: uppercase; letter-spacing: -.01em; line-height: 1.15; color: var(--s600); display: flex; align-items: center; gap: 8px; }
.nav-group + .nav-group > .nav-cap { border-top: 1px solid var(--s100); border-radius: 0 0 6px 6px; }
.nav-cap b { font-weight: 900; flex: 1; }
.nav-cap em { font-style: normal; font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0; color: var(--s400); }
.nav-cap i { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .2s; flex: none; }
.nav-group.is-open > .nav-cap i { transform: rotate(45deg); }
.nav-cap:hover { background: var(--s50); color: var(--black); }
.nav-group.is-here > .nav-cap { color: var(--black); }
.nav-group.is-here > .nav-cap em { background: var(--accent); color: var(--black); padding: 1px 6px; border-radius: 9999px; }
#deck-sheet .nav-cap { padding: 12px 8px; font-size: 16px; }
.slide-cap { display: inline-block; margin-left: 10px; padding-left: 10px; border-left: 1px solid var(--s300); color: var(--black); font-weight: 700; }
.slide.is-cap-start .slide-cap { background: var(--black); color: var(--accent); border: 0; padding: 2px 8px; }

/* ---------- Capa 2 más visual ---------- */
.l2-body .card h4 { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.l2-body .card h4::before { content: ""; width: 10px; height: 10px; flex-shrink: 0; background: var(--accent); border: 1.5px solid var(--black); }
.l2-body .card.y h4::before { background: var(--black); }
.l2-body .card.k h4::before { border-color: var(--accent); }
.l2-body .card.k h4 { color: var(--white); }
.l2-body .card ul { list-style: none; padding: 0; display: grid; gap: 8px; }
.l2-body .card ul li { position: relative; padding-left: 18px; margin: 0; }
.l2-body .card ul li::before { content: ""; position: absolute; left: 2px; top: .6em; width: 7px; height: 7px; background: var(--black); }
.l2-body .card.k ul li::before { background: var(--accent); }
.l2-body .card ul.sources li::before, .l2-body .card ul.checklist li::before { content: none; }
.l2-body .card p + p { margin-top: 8px; }
.l2-body .card .step-n + .c-title { margin-top: 10px; display: block; }
.l2-body .card .c-title + p { margin-top: 6px; }
.l2-head .label { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--s500); }

/* Mapa del artículo por bloques (portada) */
/* Portada del artículo: país del lector (sin datum ni EPSG) */
.pais-portada { display: flex; flex-direction: column; gap: 16px; }
.pp-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.pp-pais { font-weight: 900; text-transform: uppercase; letter-spacing: -.04em; line-height: .95; font-size: clamp(2rem, 3.4vw, 3rem); }
.pp-pais::after { content: "."; background: var(--accent); }
.pp-reg { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pp-reg li { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px dashed var(--s300); background: var(--white); }
.pp-reg b { font-weight: 900; text-transform: uppercase; font-size: 13px; line-height: 1.1; letter-spacing: -.01em; }
.pp-reg em { font-style: normal; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--s500); }
.pp-reg li.is-key { background: var(--accent); border: 1px solid var(--black); }
.pp-reg li.is-key em { color: var(--black); }
.pp-hint { margin: 0; font-size: 14px; line-height: 1.5; color: var(--s600, #555); max-width: 52ch; }
@media (max-width: 639px) { .pp-reg { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mapa { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.mapa a { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 2px 12px; padding: 8px 10px; background: var(--white); border: 1px solid var(--s200); border-radius: 6px; text-decoration: none; transition: border-color .2s, background .2s; }
.mapa a:hover { border-color: var(--black); }
.mapa b { grid-row: span 2; width: 34px; height: 34px; border-radius: 9999px; background: var(--black); color: var(--white); display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 11px; }
.mapa span { font-weight: 900; text-transform: uppercase; letter-spacing: -.01em; font-size: 14px; line-height: 1.1; }
.mapa em { font-style: normal; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--s500); }
.mapa .is-key a { background: var(--accent); border-color: var(--black); }
.mapa .is-key b { background: var(--black); color: var(--accent); }
.mapa .is-key em { color: var(--black); }
@media (min-width: 1200px) { .mapa { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mapa li.is-key { grid-column: 1 / -1; } }
.w2 .c-num { font-size: clamp(2rem, 3.4vw, 3.2rem); }
.card { min-width: 0; overflow-wrap: break-word; } .card .c-title { hyphens: auto; }
.badge { max-width: 100%; }
.card.k code { background: rgba(255,255,255,.14); color: var(--white); border-color: transparent; }
.card.k pre code, .card pre code { background: none; border: 0; padding: 0; color: inherit; }
.card.k .tag { color: var(--white); border-color: var(--white); }

/* Iconos de programas y formatos: monogramas con los colores de la web (no son los logotipos) */
.sw { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 7px; margin-right: 10px; border-radius: 10px; vertical-align: middle; font-family: var(--mono); font-size: 15px; font-weight: 700; letter-spacing: 0; text-transform: none; line-height: 1; flex: none; }
.sw-p { background: var(--black); color: var(--accent); }
.sw-e { background: var(--accent); color: var(--black); border: 2px solid var(--black); }
.sw-f { background: var(--white); color: var(--black); border: 2px solid var(--black); border-radius: 3px 14px 3px 3px; }
.card.k .sw-p { background: var(--accent); color: var(--black); }
.sw-logo { width: 44px; min-width: 0; padding: 0; }
.sw-logo i { display: block; width: 78%; height: 78%; background: currentColor; -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat; }
.sw-e.sw-logo i { width: 76%; height: 76%; }
.kicker-y .sw-logo, .c-label .sw-logo { width: 36px; }
.kicker-y .sw { height: 36px; min-width: 36px; font-size: 13px; border-radius: 8px; margin: -4px 10px -4px 0; }
.c-label .sw { height: 36px; min-width: 36px; font-size: 13px; border-radius: 8px; }

/* Lector de coordenadas */
.lector { display: grid; gap: 10px; }
.lector-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lector-bar .chip { cursor: pointer; font: inherit; font-family: var(--mono); font-size: 11px; }
.lector-bar .chip.is-on { background: var(--black); color: var(--accent); }
.lector-svg { width: 100%; height: auto; display: block; border: 1px solid var(--s200); border-radius: 6px; background: var(--white); user-select: none; }
.lector-out { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
@media (min-width: 1200px) { .lector-out { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.lector-out > div { padding: 8px 10px; border: 1px solid var(--s200); border-radius: 6px; min-width: 0; }
.lector-out b { display: block; font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; }
.lector-out .is-key { background: var(--accent); border-color: var(--black); }
.lector-out .k { background: var(--black); color: var(--white); }
.lector-out .k .label { color: var(--s300); }

/* Selector de país */
.paises-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 14px; }
.paises-sel { display: inline-flex; align-items: center; gap: 10px; }
.paises-sel select { appearance: none; -webkit-appearance: none; font-family: var(--sans); font-weight: 900; text-transform: uppercase; font-size: 14px; letter-spacing: .02em; color: var(--accent); background: var(--black) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23FFFF00' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center / 12px 8px; border: 0; border-radius: 9999px; padding: 10px 38px 10px 16px; cursor: pointer; max-width: 100%; }
.paises-sel select:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.paises-hint { font-family: var(--mono); font-size: 10.5px; color: var(--s500); }
.paises-out .mono a { color: inherit; }
.paises-out { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.paises-out > div { border: 1.5px solid var(--black); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.paises-out b { font-family: var(--sans); font-weight: 900; text-transform: uppercase; letter-spacing: -.01em; font-size: 16px; line-height: 1.1; }
.paises-out b a { color: inherit; }
.paises-out .mono { font-family: var(--mono); font-size: 11px; color: var(--s600); }
.paises-proy { grid-row: span 2; background: var(--s50); }
.paises-proy svg { width: 100%; max-width: 180px; height: auto; margin-bottom: 6px; }
.paises-codes { grid-column: 1 / -1; }
.paises-codes > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.paises-code { display: inline-flex; align-items: baseline; gap: 6px; border: 1.5px solid var(--black); border-radius: 9999px; padding: 3px 10px; font-family: var(--mono); font-size: 11px; }
.paises-code b { font-family: var(--mono); font-size: 13px; text-transform: none; letter-spacing: 0; }
.paises-code.is-key { background: var(--accent); }
.paises-codes p { margin: 6px 0 0; font-size: 13px; color: var(--s600); }
@media (min-width: 1200px) { .paises-out { grid-template-columns: 1.2fr 1fr 1fr 1fr; } .paises-proy { grid-row: auto; } }
.table-wrap td > .sw, .table-wrap th > .sw { float: left; margin: 0 10px 2px 0; }
.paises-desc { font-size: 12.5px; line-height: 1.35; color: var(--s600); margin-top: 4px; }
.paises-out b.paises-red { font-size: 13px; text-transform: none; letter-spacing: 0; font-weight: 800; }
.paises-out b { font-size: 14px; hyphens: auto; overflow-wrap: break-word; }
.paises-proy b { font-size: 13px; }
.paises-sel .label { white-space: nowrap; }
@media (max-width: 899px) { .paises-proy { grid-column: 1 / -1; grid-row: auto; } .paises-proy svg { max-width: 120px; } }
@media (min-width: 1200px) { .paises-out b { font-size: 13px; } .paises-out { grid-template-columns: 1.3fr 1fr 1fr 1.2fr; } }
@media (min-width: 900px) { .paises-out { grid-template-columns: 1fr 1.1fr; } .paises-out .paises-proy { grid-row: span 3; } .paises-out b { font-size: 14px; } }
@media (min-width: 900px) and (max-width: 1199px) { .paises-proy svg { max-width: 110px; } .paises-desc { display: none; } .paises-out > div { padding: 8px 10px; } }

/* Sistema del lector: ventana de bienvenida y botón «Tu sistema» */
#crs-dialog { position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.crs-box { background: var(--white); border-radius: 16px; width: min(640px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 28px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.crs-box .kicker-y { align-self: flex-start; }
.crs-box h3 { margin: 0; font-family: var(--sans); font-weight: 900; text-transform: uppercase; letter-spacing: -.03em; font-size: clamp(26px, 5vw, 40px); line-height: 1; }
.crs-box h3 .dot { background: var(--accent); }
.crs-box p { margin: 0; color: var(--s600); }
.crs-codes { display: flex; flex-wrap: wrap; gap: 6px; }
button.paises-code { cursor: pointer; background: var(--white); color: var(--black); font: inherit; font-family: var(--mono); font-size: 11px; }
button.paises-code:hover { background: var(--s50); }
button.paises-code.is-key, button.paises-code[aria-pressed="true"] { background: var(--accent); }
.crs-prev { border: 2px solid var(--black); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.crs-prev b { font-family: var(--mono); font-size: 18px; }
.crs-prev .mono { font-family: var(--mono); font-size: 11px; color: var(--s600); }
.crs-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.crs-skip { background: none; border: 0; padding: 6px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--s600); cursor: pointer; text-decoration: underline; }
.crs-chip { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; margin: 0 0 10px; padding: 8px 10px; border: 1.5px solid var(--black); border-radius: 8px; background: var(--white); cursor: pointer; text-align: left; }
.crs-chip .label { font-family: var(--mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--s500); }
.crs-chip b { font-family: var(--sans); font-weight: 900; font-size: 12px; text-transform: uppercase; }
.crs-chip i { font-style: normal; font-family: var(--mono); font-size: 10px; text-decoration: underline; color: var(--s600); }
.crs-chip:hover { background: var(--accent); }
@media (min-width: 900px) and (max-width: 1199px) { .paises-code { font-size: 10px; padding: 2px 8px; } .paises-code b { font-size: 11.5px; } .paises-codes p { font-size: 12px; } .paises-bar { margin-bottom: 8px; } .paises-out { gap: 8px; } }
@media (min-width: 900px) and (max-width: 1199px) { .paises-hint { display: none; } }
.paises-code { max-width: 100%; flex-wrap: wrap; row-gap: 0; }
.paises-sel { max-width: 100%; min-width: 0; }
.paises-sel select { min-width: 0; }

/* =====================================================================
   Navegación y ayuda al lector (assets/js/ayuda.js)
   Buscador de la serie, guía «Cómo se lee», definiciones al pasar,
   portada (dudas, bloques, filtros) y página del glosario.
   ===================================================================== */
kbd { display: inline-block; min-width: 1.6em; padding: 1px 5px; border: 1px solid var(--s300); border-bottom-width: 2px; border-radius: 4px; background: var(--white); color: var(--black); font-family: var(--mono); font-size: 10px; font-weight: 700; line-height: 1.5; text-align: center; }
.linklike { border: 0; background: none; padding: 0; font: inherit; text-decoration: underline; cursor: pointer; }

/* Botones de filtro (pastilla) con estado aria-pressed */
.bfb-f { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--s300); border-radius: 9999px; background: var(--white); color: var(--black); font-family: var(--mono); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; cursor: pointer; white-space: nowrap; }
.bfb-f span { color: var(--s500); }
.bfb-f:hover { border-color: var(--black); }
.bfb-f[aria-pressed="true"] { background: var(--black); border-color: var(--black); color: var(--accent); }
.bfb-f[aria-pressed="true"] span { color: var(--white); }

/* Menú en cartucho y menú de diapositivas */
.bf-menu-btn { border: 0; background: none; font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.bf-menu-btn kbd { font-size: 9px; }
.bf-tools { display: flex; gap: 6px; margin: 0 0 10px; }
.bf-tool { flex: 1; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1.5px solid var(--black); border-radius: 9999px; background: var(--black); color: var(--white); font-family: var(--sans); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .02em; cursor: pointer; }
.bf-tool kbd { margin-left: auto; background: var(--s800); border-color: var(--s700); color: var(--white); }
.bf-tool:hover { background: var(--accent); color: var(--black); }
.bf-tool.q { flex: 0 0 38px; justify-content: center; padding: 8px 0; background: var(--white); color: var(--black); font-size: 15px; }
.bf-tool.q:hover { background: var(--accent); }
#deck-sheet .bf-tools { margin: 4px 0 10px; }
#deck-sheet .bf-tool kbd { display: none; }

/* Buscador */
#bf-buscar, #bf-guia { position: fixed; inset: 0; z-index: 260; display: none; background: rgba(0,0,0,.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); padding: 12px; }
#bf-buscar.is-open, #bf-guia.is-open { display: flex; align-items: flex-start; justify-content: center; }
@media (min-width: 768px) { #bf-buscar, #bf-guia { padding: 8vh 24px 24px; } }
.bfb-box { width: min(760px, 100%); max-height: 100%; display: flex; flex-direction: column; background: var(--white); border-radius: 16px; box-shadow: 0 30px 80px rgba(0,0,0,.35); overflow: hidden; }
@media (min-width: 768px) { .bfb-box { max-height: 82vh; } }
.bfb-top { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 2px solid var(--black); }
.bfb-top input { flex: 1; min-width: 0; border: 0; outline: 0; font-family: var(--sans); font-size: 18px; font-weight: 700; background: none; color: var(--black); }
.bfb-top input::placeholder { color: var(--s400); font-weight: 400; }
.bfb-x { border: 1px solid var(--s300); border-radius: 6px; background: var(--s50); font-family: var(--mono); font-size: 11px; padding: 4px 8px; cursor: pointer; }
.bfb-filtros { display: flex; flex-direction: column; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--s200); background: var(--s50); }
.bfb-filtros > div { display: flex; flex-wrap: nowrap; gap: 6px; align-items: center; overflow-x: auto; scrollbar-width: none; }
.bfb-filtros > div::-webkit-scrollbar { display: none; }
.bfb-filtros .label { margin-right: 4px; }
.bfb-res { flex: 1; overflow-y: auto; padding: 4px 8px 12px; }
.bfb-res ul { list-style: none; margin: 0; padding: 0; }
.bfb-sec { margin: 12px 8px 6px; font-family: var(--mono); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--s500); }
.bfb-item { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 10px 8px; border-radius: 8px; text-decoration: none; color: var(--black); }
.bfb-item:hover, .bfb-item.is-sel { background: var(--s100); }
.bfb-item.is-sel { box-shadow: inset 3px 0 0 var(--black); }
.bfb-ico { width: 32px; height: 32px; border-radius: 8px; border: 1.5px solid var(--black); display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 12px; font-weight: 700; background: var(--white); }
.t-concepto .bfb-ico { background: var(--accent); }
.t-articulo .bfb-ico { background: var(--black); color: var(--white); }
.is-q .bfb-ico { background: var(--black); color: var(--accent); font-family: var(--sans); font-weight: 900; }
.bfb-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bfb-txt b { font-size: 15px; font-weight: 800; line-height: 1.3; }
.is-q .bfb-txt b { padding-top: 6px; }
.bfb-sub { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--s500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bfb-snip { font-size: 13px; line-height: 1.45; color: var(--s600); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bfb-item mark { background: var(--accent); color: var(--black); padding: 0 1px; }
.bfb-b, .bfd-b { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 22px; padding: 0 6px; border-radius: 9999px; border: 1px solid var(--black); font-family: var(--mono); font-size: 10px; font-weight: 700; background: var(--white); color: var(--black); }
.bfb-terms { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 8px 8px; }
.bfb-terms .chip { font-size: 12px; padding: 5px 9px; text-decoration: none; }
.bfb-terms .chip:hover { background: var(--accent); color: var(--black); }
.bfb-vacio { padding: 24px 12px; }
.bfb-vacio p { color: var(--s600); margin: 6px 0 0; font-size: 14px; }
.bfb-pie { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--s200); font-size: 11px; color: var(--s500); }
.bfb-pie a { margin-left: auto; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--black); }
@media (max-width: 640px) { .bfb-pie span { display: none; } }

/* Guía «Cómo se lee» */
.bfg-box { position: relative; width: min(980px, 100%); max-height: 100%; overflow-y: auto; background: var(--white); border-radius: 16px; padding: 24px; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
@media (min-width: 768px) { .bfg-box { max-height: 86vh; padding: 32px; } }
.bfg-box .bfg-x { position: absolute; top: 16px; right: 16px; float: none; margin: 0; }
.bfg-box h3 { margin: 12px 0 20px; font-weight: 900; text-transform: uppercase; letter-spacing: -.04em; font-size: clamp(28px, 5vw, 48px); line-height: 1; }
.bfg-box h3 .dot { background: var(--accent); }
.bfg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 900px) { .bfg-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.bfg-grid .card { gap: 8px; }
.bfg-grid .c-text { font-weight: 400; font-size: 13px; line-height: 1.45; color: var(--s600); }
.bfg-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 20px; }
@media (min-width: 900px) { .bfg-cols { grid-template-columns: 1fr 1.3fr; } }
.bfg-keys { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 10px 0 0; font-size: 14px; }
.bfg-keys dt { white-space: nowrap; font-size: 12px; color: var(--s500); }
.bfg-keys dd { margin: 0; }
.bfg-q { list-style: none; margin: 8px 0 0; padding: 0; }
.bfg-q a { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--s200); text-decoration: none; font-weight: 700; font-size: 14px; }
.bfg-q a:hover { background: var(--accent); }
.bfg-acc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

/* Términos del glosario dentro del texto y su definición */
.gl-term { all: unset; cursor: help; text-decoration: underline dotted var(--s400); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.gl-term:hover, .gl-term[aria-expanded="true"] { background: var(--accent); text-decoration-color: var(--black); }
.gl-term:focus-visible { outline: 2px solid var(--black); outline-offset: 2px; }
.card.k .gl-term { text-decoration-color: var(--s500); }
.card.k .gl-term:hover, .card.k .gl-term[aria-expanded="true"] { color: var(--black); }
#bf-pop { position: fixed; z-index: 320; display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: var(--black); color: var(--white); border-radius: 10px; box-shadow: 0 16px 48px rgba(0,0,0,.3); font-size: 14px; line-height: 1.5; }
#bf-pop[hidden] { display: none; }
#bf-pop .c-label { color: var(--accent); }
#bf-pop b { font-weight: 900; text-transform: uppercase; letter-spacing: -.01em; font-size: 15px; line-height: 1.2; }
#bf-pop .mono { font-size: 11px; color: var(--s300); }
#bf-pop p { margin: 4px 0 2px; color: var(--white); }
#bf-pop a { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }

/* Portada: buscador, dudas frecuentes, filtros y bloques */
.bf-search-trigger { display: flex; align-items: center; gap: 12px; width: min(460px, 100%); padding: 14px 16px; border: 2px solid var(--black); border-radius: 9999px; background: var(--white); color: var(--s500); font-family: var(--sans); font-size: 15px; cursor: text; text-align: left; }
.bf-search-trigger span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bf-search-trigger svg { color: var(--black); flex: none; }
.bf-search-trigger:hover { background: var(--accent); color: var(--black); }
.hero-acc { display: flex; flex-wrap: wrap; gap: 8px; }
@media (min-width: 1280px) { .hero-acc { justify-content: flex-end; } }
.hero-meta button, .hero-meta a { border: 0; background: none; padding: 0; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; text-decoration: underline; text-decoration-color: var(--s300); text-underline-offset: 3px; }
.hero-meta button:hover, .hero-meta a:hover { background: var(--accent); color: var(--black); }
.hero-meta button + button::before, .hero-meta button + a::before { content: " · "; color: var(--s400); display: inline-block; margin-right: .4em; text-decoration: none; }

.bf-dudas { list-style: none; margin: 0; padding: 24px 0 64px; border-top: 2px solid var(--black); display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
@media (min-width: 720px) { .bf-dudas { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.bf-dudas a { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; height: 100%; padding: 16px; border: 1px solid var(--s200); border-radius: 8px; text-decoration: none; transition: background .2s, border-color .2s; }
.bf-dudas a:hover { background: var(--accent); border-color: var(--black); }
.bf-dudas .bfd-b { grid-row: span 3; }
.bf-dudas b { font-size: 16px; font-weight: 900; line-height: 1.25; letter-spacing: -.01em; }
.bfd-r { font-size: 13px; color: var(--s600); }
.bfd-a { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--s500); }

.bf-filtros { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 0 0 16px; }
.bf-filtros > div { display: flex; flex-wrap: wrap; gap: 6px; }
.bff-chk { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; cursor: pointer; }
.bff-chk input { accent-color: #000; width: 16px; height: 16px; }
.bff-n { margin-left: auto; }
.article-item[hidden] { display: none; }

.bf-bloques { list-style: none; margin: 0; padding: 24px 0 96px; border-top: 2px solid var(--black); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 1024px) { .bf-bloques { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.bf-bloques button { all: unset; box-sizing: border-box; display: flex; flex-direction: column; gap: 6px; width: 100%; height: 100%; padding: 18px; border: 1px solid var(--s200); border-radius: 8px; cursor: pointer; transition: background .2s, border-color .2s; }
.bf-bloques button:hover, .bf-bloques button:focus-visible { background: var(--accent); border-color: var(--black); }
.bfk-r { font-size: clamp(2.2rem, 4vw, 3.4rem); font-weight: 900; letter-spacing: -.05em; line-height: .9; }
.bf-bloques b { font-size: 16px; font-weight: 900; text-transform: uppercase; letter-spacing: -.01em; line-height: 1.15; }
.bfk-d { font-size: 13px; color: var(--s600); line-height: 1.4; }
.bfk-n { margin-top: auto; font-family: var(--mono); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }

/* Página del glosario */
.gl-hero { padding: 120px 0 32px; }
.gl-hero h1 { font-size: clamp(2.4rem, 6.4vw, 4.8rem); line-height: 1; margin: 20px 0 20px; }
.gl-hero .hero-lead { max-width: 44rem; }
.gl-filtros { display: flex; flex-direction: column; gap: 10px; padding: 16px 0 12px; background: var(--white); border-bottom: 2px solid var(--black); }
.gl-filtros > div { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.gl-q { display: flex; align-items: center; gap: 10px; max-width: 520px; padding: 10px 14px; border: 2px solid var(--black); border-radius: 9999px; }
.gl-q input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 16px; font-weight: 700; background: none; }
.gl-az { display: flex; flex-wrap: wrap; gap: 2px; font-family: var(--mono); font-size: 12px; font-weight: 700; }
.gl-az a, .gl-az span { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 4px; text-decoration: none; }
.gl-az a:hover { background: var(--accent); }
.gl-az span { color: var(--s300); }
.gl-filtros .bff-n { margin-left: 0; }
.gl-lista { padding: 8px 0 96px; }
.gl-letra { scroll-margin-top: 24px; padding-top: 24px; }
@media (min-width: 900px) { .gl-filtros { position: sticky; top: 0; z-index: 50; } .gl-card { scroll-margin-top: 220px; } .gl-letra { scroll-margin-top: 200px; } }
.gl-L { margin: 0 0 12px; font-size: 40px; font-weight: 900; letter-spacing: -.05em; line-height: 1; }
.gl-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 900px) { .gl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gl-card { scroll-margin-top: 24px; display: flex; flex-direction: column; gap: 12px; padding: 20px; border: 1px solid var(--s200); border-radius: 8px; background: var(--white); }
.gl-card.is-target { animation: gl-flash 1.6s ease-out; border-color: var(--black); }
@keyframes gl-flash { 0%, 40% { background: var(--accent); } 100% { background: var(--white); } }
.gl-head { display: flex; gap: 12px; align-items: flex-start; }
.gl-head h3 { margin: 0; font-size: 18px; font-weight: 900; text-transform: uppercase; letter-spacing: -.02em; line-height: 1.15; }
.gl-head .mono { font-size: 11px; color: var(--s500); }
.gl-d { margin: 0; font-size: 15px; line-height: 1.55; color: var(--s800); }
.gl-err { padding: 10px 12px; border-left: 4px solid var(--black); background: var(--s50); }
.gl-err p { margin: 4px 0 0; font-size: 14px; line-height: 1.5; }
.gl-card details { font-size: 14px; color: var(--s700); }
.gl-card summary { cursor: pointer; font-family: var(--mono); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.gl-card details p { margin: 8px 0 0; line-height: 1.5; }
.gl-donde ul { list-style: none; margin: 6px 0 0; padding: 0; }
.gl-donde a { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--s100); text-decoration: none; font-weight: 700; font-size: 14px; }
.gl-donde a .mono { font-size: 10px; color: var(--s500); white-space: nowrap; }
.gl-donde a:hover { background: var(--accent); }
.gl-rel > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.gl-rel .chip { font-size: 12px; padding: 4px 8px; text-decoration: none; }
.gl-rel .chip:hover { background: var(--accent); }

/* ---------- Idiomas: selector ES · EN · DE en el menú del cartucho (assets/js/idioma.js) ---------- */
.bf-lang { display: inline-flex; align-items: center; gap: 2px; margin-left: 6px; padding-left: 8px; border-left: 1px solid var(--s200); font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .06em; }
.bf-lang a, .bf-lang span { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 6px; border-radius: 9999px; text-decoration: none; color: var(--s500); }
.bf-lang a:hover { background: var(--accent); color: var(--black); }
.bf-lang .is-current { background: var(--black); color: var(--white); }
/* En móvil el menú no cabe entero: se desliza en horizontal para llegar al idioma */
@media (max-width: 767px) { #nav-capsule.menu-open #menu-content { max-width: calc(100vw - 32px - 58px); overflow-x: auto; scrollbar-width: none; } #menu-content::-webkit-scrollbar { display: none; } }

/* ---------- Idioma a la vista (assets/js/ayuda.js): fila en el menú de diapositivas, botón fijo y sugerencia única ---------- */
.bf-lang-fila { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; }
.bf-lang-fila .bf-lang { margin: 0; padding: 0; border: 0; }
.bf-lang-fila .bf-lang a, .bf-lang-fila .bf-lang span { min-width: 30px; height: 28px; }
#bf-lang-fijo { position: fixed; top: 24px; right: 16px; z-index: 90; padding: 4px; background: var(--white); border: 1px solid var(--s200); border-radius: 9999px; box-shadow: 0 4px 24px rgba(0,0,0,.04); }
@media (min-width: 768px) { #bf-lang-fijo { right: 24px; } }
#bf-lang-fijo .bf-lang { margin: 0; padding: 0; border: 0; }
#bf-lang-aviso { position: fixed; z-index: 250; left: 16px; right: 16px; bottom: 84px; display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; background: var(--white); border: 2px solid var(--black); border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
@media (min-width: 640px) { #bf-lang-aviso { left: auto; right: 24px; bottom: 24px; width: 360px; } }
#bf-lang-aviso p { margin: 0; font-weight: 800; line-height: 1.35; }
#bf-lang-aviso > div { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
@media (min-width: 1200px) { #bf-lang-fijo.en-articulo { display: none; } }
.crs-chip.crs-portada { width: auto; margin: 0; }

/* ---------- Menú general: panel del cartucho (assets/js/ayuda.js) ---------- */
/* El cartucho ya no se despliega en horizontal: el botón abre un panel vertical con la serie, consulta y preferencias */
#nav-capsule.bf-panel-on #menu-content { display: none; }
#nav-capsule.bf-menu-abierto #menu-trigger { background: var(--accent); color: var(--black); }
#bf-menu { position: fixed; z-index: 240; left: 12px; right: 12px; top: 88px; max-height: calc(100vh - 100px); overflow-y: auto; overscroll-behavior: contain;
  display: none; flex-direction: column; gap: 4px; padding: 12px; background: var(--white); border: 1px solid var(--s200); border-radius: 12px; box-shadow: 0 24px 64px rgba(0,0,0,.16); }
@media (min-width: 640px) { #bf-menu { left: 16px; right: auto; width: 400px; } }
#bf-menu.is-open { display: flex; }
.bfm-search { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border: 2px solid var(--black); border-radius: 9999px; background: var(--white); color: var(--s500); font: inherit; font-size: 14px; cursor: text; text-align: left; }
.bfm-search span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bfm-search svg { color: var(--black); flex: none; }
.bfm-search:hover { background: var(--accent); color: var(--black); }
.bfm-sec { display: flex; flex-direction: column; gap: 2px; padding: 12px 4px 4px; border-top: 1px solid var(--s100); margin-top: 8px; }
.bfm-sec > .label { margin: 0 8px 6px; }
.bfm-h { display: flex; justify-content: space-between; align-items: baseline; margin: 0 8px 6px; }
.bfm-h a { font-family: var(--mono); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; text-decoration: none; }
.bfm-h a:hover { background: var(--accent); }
.bfm-arts { list-style: none; margin: 0; padding: 0; }
.bfm-a { display: grid; grid-template-columns: 22px 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 6px; text-decoration: none; color: var(--black); }
.bfm-a img { width: 28px; height: 28px; }
.bfm-n { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--s500); }
.bfm-t { font-size: 14px; font-weight: 800; line-height: 1.2; }
.bfm-e { font-family: var(--mono); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--s500); border: 1px solid var(--s200); border-radius: 9999px; padding: 1px 6px; white-space: nowrap; }
a.bfm-a:hover { background: var(--s50); }
.bfm-a.is-current { background: var(--black); color: var(--white); }
.bfm-a.is-current .bfm-n { color: var(--accent); }
.bfm-a.is-current img { filter: invert(1); }
.bfm-a.is-current .bfm-e { color: var(--s300); border-color: var(--s700); }
.bfm-a.is-soon { opacity: .45; }
.bfm-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 8px; border: 0; border-radius: 6px; background: none; font: inherit; font-size: 14px; font-weight: 800; color: var(--black); text-decoration: none; text-align: left; cursor: pointer; }
.bfm-row svg { flex: none; }
.bfm-row span { white-space: nowrap; }
.bfm-row em { margin-left: auto; font-style: normal; font-family: var(--mono); font-size: 10px; font-weight: 400; color: var(--s500); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.bfm-row kbd { margin-left: auto; }
.bfm-row:hover { background: var(--accent); }
.bfm-row:hover em { color: var(--black); }
.bfm-row.is-current { background: var(--black); color: var(--white); }
.bfm-lang { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px; font-size: 14px; font-weight: 800; }
.bfm-lang .bf-lang { margin: 0; padding: 0; border: 0; }
