/* ═══════════════════════════════════════════════════════════════════
   Matmap Blog Builder — public/css/post.css
   Scoped with .mbb-* prefix. No global selectors.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Tokens ──────────────────────────────────────────────────────── */
:root {
  /* Derivados de Matmap Tokens.
     Antes esta hoja usaba la paleta gris por defecto de Tailwind v1/v2
     (#2d3748, #1a202c, #4a5568, #e2e8f0, #f7fafc) y sus pasteles de estado
     (#c6f6d5, #fefcbf, #fed7d7). Eran grises azulados frios, mientras el resto
     del sitio usa neutros con sesgo navy: el blog no parecia de esta web, y
     ademas se le notaba la epoca. */
  --mbb-primary:       var(--mm-brand,      #3A3971);
  --mbb-accent:        var(--mm-accent,     #e69130);
  --mbb-accent-hover:  var(--mm-accent-ink, #C97918);
  --mbb-head:          var(--mm-ink,        #1A1A2E);
  --mbb-body:          var(--mm-ink-2,      #4C4C68);
  --mbb-bg:            var(--mm-paper,      #ffffff);
  --mbb-bg-alt:        var(--mm-wash,       #F6F6FA);
  --mbb-border:        var(--mm-line,       #E3E3EC);
  --mbb-success-bg:    var(--mm-good-bg,    #E4F4ED);
  --mbb-success-fg:    var(--mm-good,       #0E7C55);
  --mbb-warn-bg:       var(--mm-warn-bg,    #FBF0DA);
  --mbb-warn-fg:       var(--mm-warn,       #8A5A00);
  --mbb-danger-bg:     var(--mm-bad-bg,     #FBEAE7);
  --mbb-danger-fg:     var(--mm-bad,        #B8382A);
  --mbb-cta:           var(--mm-brand,      #3A3971);
  --mbb-font:          var(--mm-font, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif);
  --mbb-shadow-md:     var(--mm-sh-2, 0 4px 16px rgba(26,26,46,.08));
  --mbb-shadow-lg:     var(--mm-sh-3, 0 12px 32px rgba(26,26,46,.14));
  --mbb-radius:        var(--mm-r-lg, 16px);
  --mbb-wrap:          1100px;
  --mbb-wrap-mid:      980px;
  --mbb-wrap-narrow:   820px;
}

/* ── Reset (scoped) ──────────────────────────────────────────────── */
.mbb-hero *,
.mbb-hero *::before,
.mbb-hero *::after,
#mbb-main *,
#mbb-main *::before,
#mbb-main *::after,
.mbb-sticky-cta *,
.mbb-sticky-cta *::before,
.mbb-sticky-cta *::after {
  box-sizing: border-box;
}

.mbb-hero,
#mbb-main,
.mbb-sticky-cta {
  font-family: var(--mbb-font);
  color: var(--mbb-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

#mbb-main img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Utility ─────────────────────────────────────────────────────── */
.mbb-wrap       { max-width: var(--mbb-wrap);        margin: 0 auto; padding: 0 1.5rem; }
.mbb-wrap--mid  { max-width: var(--mbb-wrap-mid);    margin: 0 auto; padding: 0 1.5rem; }
.mbb-wrap--narrow { max-width: var(--mbb-wrap-narrow); margin: 0 auto; padding: 0 1.5rem; }

.mbb-vh {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ── Hero ────────────────────────────────────────────────────────── */
/* Altura contenida en vez de casi pantalla completa: el lector ve dónde
   empieza el artículo sin tener que hacer scroll a ciegas. */
.mbb-hero {
  position: relative;
  min-height: 42vh;
  display: grid;
  place-items: center;
  isolation: isolate;
  background: var(--mm-ink, #1A1A2E);
}

.mbb-hero__images {
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: 1fr;
  z-index: -2; overflow: hidden;
}

/* Sin filter: la foto ya se protege con el degradado de abajo. Antes llevaba
   brightness(.65) Y ADEMAS un velo negro al .58-.68 encima: multiplicando,
   la portada quedaba al ~23% de su brillo y no se veía lo que había. */
.mbb-hero__img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.mbb-hero__img--2 { display: none; }

/* Un solo velo, y en degradado: transparente arriba para que se vea la foto,
   oscuro abajo donde va el texto. Legibilidad sin borrar la imagen. */
.mbb-hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
              rgba(15,15,25,.12) 0%,
              rgba(15,15,25,.42) 45%,
              rgba(15,15,25,.72) 100%);
  pointer-events: none;
  z-index: 0;
}

.mbb-hero__content {
  position: relative; z-index: 1;
  color: #fff; text-align: center;
  padding: 2rem;
}

.mbb-hero__kicker {
  margin: 0 0 .5rem;
  font-weight: var(--mm-fw-medium, 600);
  letter-spacing: var(--mm-ls-eyebrow, .07em);
  text-transform: uppercase;
  font-size: var(--mm-fs-eyebrow, 11.5px);
  opacity: .92;
}

.mbb-hero__title {
  margin: .25rem 0 .6rem;
  line-height: 1.06; color: #fff;
  font-weight: var(--mm-fw-bold, 700);
  font-size: clamp(1.9rem, 5vw, 2.8rem);
  letter-spacing: var(--mm-ls-title, -.012em);
  text-wrap: balance;
  text-shadow: 0 1px 10px rgba(0,0,0,.28);
}

.mbb-hero__sub {
  max-width: 66ch; margin: 0 auto 1.1rem;
  font-size: clamp(1.05rem, 2.3vw, 1.22rem);
  color: #fff;
}

.mbb-hero__ctas {
  display: flex; gap: .8rem;
  justify-content: center; flex-wrap: wrap;
}

@media (min-width: 980px) {
  .mbb-hero              { min-height: 48vh; }
  .mbb-hero__images      { grid-template-columns: 1fr 1fr; }
  .mbb-hero__img--2      { display: block; }
  .mbb-hero__content     {
    text-align: left;
    max-width: 52%;
    justify-self: start;
    margin-left: 2rem;
  }
  .mbb-hero__ctas        { justify-content: flex-start; }
  .mbb-hero__sub         { margin-left: 0; }
}

/* ── Sections ────────────────────────────────────────────────────── */
.mbb-section      { padding: 3rem 0; }
.mbb-section--alt { background: var(--mbb-bg-alt); }

.mbb-section h2,
.mbb-section h3 { color: var(--mbb-head); line-height: 1.3; }

/* Titulos alineados a la izquierda, como el resto de la web.
   El titulo centrado con su entradilla centrada debajo es el patron que mas
   delataba la epoca del blog, y ademas es el unico sitio del sitio donde se
   centra texto: la ficha, el catalogo y las FAQ van todos a la izquierda.
   Centrar tambien obliga al ojo a buscar el inicio de cada linea. */
.mbb-section__title {
  font-size: var(--mm-fs-h2, clamp(20px, 2vw, 26px));
  margin: 0 0 .75rem;
  font-weight: var(--mm-fw-bold, 700);
  letter-spacing: var(--mm-ls-title, -.012em);
  line-height: var(--mm-lh-tight, 1.2);
  text-align: left;
  text-wrap: balance;
}

.mbb-section__intro {
  max-width: 70ch;
  margin: 0 0 1.6rem;
  text-align: left;
  color: var(--mm-ink-2, #4C4C68);
}

.mbb-lead {
  max-width: 74ch; margin: 1rem auto 0;
  font-size: 1.05rem; opacity: .95;
}

/* ── Cards ───────────────────────────────────────────────────────── */
.mbb-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.mbb-card {
  background: #fff;
  border: 1px solid var(--mbb-border);
  border-radius: var(--mbb-radius);
  padding: 1.2rem;
  box-shadow: var(--mbb-shadow-md);
}

.mbb-card__icon {
  font-size: 1.5rem;
  display: block;
  margin-bottom: .25rem;
}

.mbb-card__title {
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  margin: 0 0 .5rem; font-weight: 800;
  color: var(--mbb-head);
}

.mbb-card__body { margin: 0; }

@media (min-width: 900px) {
  .mbb-cards { grid-template-columns: 1fr 1fr; }
}

/* ── Decision cards ──────────────────────────────────────────────── */
.mbb-decision-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem; text-align: center;
  margin-top: 1.6rem;
}

.mbb-decision-card {
  background: #fff;
  padding: 1.4rem;
  border-radius: var(--mbb-radius);
  border: 1px solid var(--mbb-border);
  box-shadow: var(--mbb-shadow-md);
}

.mbb-decision-card__icon {
  font-size: 2.1rem; margin-bottom: .2rem;
}

.mbb-decision-card__title {
  font-weight: 800; color: var(--mbb-head);
  margin: .2rem 0 .25rem;
  font-size: 1.1rem;
}

.mbb-decision-card__winner {
  display: block; font-weight: 800;
  color: var(--mbb-primary); font-size: 1.05rem;
  margin-bottom: .35rem;
}

.mbb-decision-card__desc { font-size: .97rem; margin: 0; }

@media (min-width: 768px) {
  .mbb-decision-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── Table ───────────────────────────────────────────────────────── */
/* Tabla editorial: sin caja, sin sombra y sin rejilla.
   Antes llevaba borde completo, sombra, esquinas redondeadas y una linea bajo
   CADA celda, con la cabecera en peso 800 sobre un azul grisaceo. Todo junto
   pesaba mas que los datos. Ahora manda el contenido: cabecera en versalitas
   discretas con un filete debajo, y separadores finos entre filas. */
.mbb-table {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
  border: 0;
  margin-top: 1.25rem;
  font-size: var(--mm-fs-base, 15px);
}

.mbb-table th,
.mbb-table td {
  padding: 14px 20px 14px 0;
  text-align: left;
  vertical-align: top;
  border: 0;
}
.mbb-table th:last-child,
.mbb-table td:last-child { padding-right: 0; }

.mbb-table thead th {
  padding-bottom: 10px;
  border-bottom: 1.5px solid var(--mm-line-strong, #CFCFDC);
  font-size: var(--mm-fs-eyebrow, 11.5px);
  font-weight: var(--mm-fw-medium, 600);
  letter-spacing: var(--mm-ls-eyebrow, .07em);
  text-transform: uppercase;
  color: var(--mm-muted, #74748c);
  white-space: nowrap;
}

.mbb-table tbody td {
  border-bottom: 1px solid var(--mm-line, #e3e3ec);
  color: var(--mm-ink-2, #4c4c68);
  line-height: 1.55;
}
/* La primera columna es la que nombra la fila: se lee como titulo. */
.mbb-table tbody td:first-child {
  color: var(--mm-ink, #1a1a2e);
  font-weight: var(--mm-fw-medium, 600);
}
.mbb-table tbody tr:last-child td { border-bottom: 0; }
.mbb-table tbody tr:hover td { background: var(--mm-wash, #f6f6fa); }

.mbb-table caption {
  caption-side: bottom;
  padding-top: 12px;
  font-size: var(--mm-fs-sm, 13.5px);
  color: var(--mm-muted, #74748c);
  text-align: left;
}

/* ── Tabla deslizable en movil ──
   Antes se apilaba: cada fila pasaba a bloque con su etiqueta, y una tabla de
   6 filas ocupaba 1213px de alto. Ademas se pierde lo que hace util una
   tabla, que es comparar en horizontal.
   Deslizando de lado se conserva la comparacion y el alto baja a ~350px. */
.mbb-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.mbb-table-wrap:focus-visible {
  outline: 3px solid rgba(58,57,113,.38);
  outline-offset: 2px;
}

@media (max-width: 720px) {
  /* table-layout:fixed reparte las columnas por igual. Con el reparto
     automatico la primera se llevaba 570px de 780 y las otras dos quedaban a
     ~100px: el texto se partia tanto que cada fila media 191px de alto. Con
     columnas iguales baja a 72px. */
  .mbb-table {
    min-width: 780px;
    table-layout: fixed;
  }
  .mbb-table th,
  .mbb-table td {
    padding: 12px 16px 12px 0;
    white-space: normal;
  }

  /* Pista de que hay mas contenido a la derecha. */
  .mbb-table-wrap {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent 100%);
            mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent 100%);
  }
  .mbb-table-wrap::-webkit-scrollbar { height: 4px; }
  .mbb-table-wrap::-webkit-scrollbar-thumb {
    background: var(--mm-line-strong, #CFCFDC);
    border-radius: 999px;
  }
}

/* ── Badges ──────────────────────────────────────────────────────── */
.mbb-badge {
  display: inline-block; border-radius: 999px;
  padding: .3rem .7rem; font-weight: 800; font-size: .85rem;
}

.mbb-badge--ok     { background: var(--mbb-success-bg); color: var(--mbb-success-fg); }
.mbb-badge--warn   { background: var(--mbb-warn-bg);    color: var(--mbb-warn-fg);    }
.mbb-badge--danger { background: var(--mbb-danger-bg);  color: var(--mbb-danger-fg);  }

/* ── Analysis grid (image + text) ────────────────────────────────── */
.mbb-analysis-grid {
  display: grid; gap: 1.6rem;
  grid-template-columns: 1fr;
  margin-top: 2.4rem;
}

.mbb-analysis-item img {
  border-radius: var(--mbb-radius);
  margin-bottom: .9rem;
  box-shadow: var(--mbb-shadow-lg);
  width: 100%; height: 320px;
  object-fit: cover;
}

.mbb-analysis-item h3 {
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  margin: 0 0 .6rem; font-weight: 800;
  color: var(--mbb-head);
}

.mbb-analysis-item ul {
  margin: .35rem 0 0; padding-left: 1.1rem;
}

@media (min-width: 980px) {
  .mbb-analysis-grid { grid-template-columns: 1fr 1fr; }
}

/* ── CTA Banner ──────────────────────────────────────────────────── */
.mbb-cta-banner {
  background: var(--mbb-cta); color: #fff;
  text-align: center; padding: 2.6rem 1.2rem;
  border-radius: var(--mbb-radius);
}

.mbb-cta-banner__title {
  color: #fff !important; margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
}

.mbb-cta-banner__body {
  max-width: 60ch; margin: .8rem auto 1.2rem; opacity: .95;
}

/* ── Buttons ─────────────────────────────────────────────────────── */
/* Misma geometria que los botones del resto de la web: radio 12px, peso 600,
   alto minimo 46px y borde de 1,5px. Antes eran pildoras de 999px con peso 800
   y borde de 2px, y no se parecian a ningun otro boton del sitio. */
.mbb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--mm-control-h, 46px);
  padding: 11px 20px;
  border-radius: var(--mm-r-md, 12px);
  font-size: var(--mm-fs-base, 15px);
  font-weight: var(--mm-fw-medium, 600);
  text-decoration: none;
  border: 1.5px solid transparent;
  line-height: 1.2;
  font-family: var(--mbb-font);
  cursor: pointer;
  transition: background var(--mm-ease, .18s ease), border-color var(--mm-ease, .18s ease),
              box-shadow var(--mm-ease, .18s ease);
}

/* Mismo anillo de foco que el resto de la web. Antes era un gris suelto que
   apenas contrastaba sobre fondo claro. */
.mbb-btn:focus { outline: none; }
.mbb-btn:focus-visible { outline: 3px solid rgba(58,57,113,.38); outline-offset: 2px; }

.mbb-btn--primary {
  background: var(--mbb-accent); color: #fff;
}
.mbb-btn--primary:hover {
  background: var(--mbb-accent-hover);
  
  box-shadow: var(--mbb-shadow-md);
  color: #fff;
}

.mbb-btn--ghost {
  background: transparent;
  border-color: #fff; color: #fff;
}
.mbb-btn--ghost:hover {
  background: #fff; color: var(--mbb-primary);
}

/* ── FAQ ─────────────────────────────────────────────────────────── */
/* ── FAQ ──
   Mismo lenguaje que el acordeon de la ficha de producto y que el bloque de
   preguntas frecuentes: un solo recuadro con separadores internos y el chevron
   en circulo. Antes era una lista pelada con un "+" naranja de peso 900. */
.mbb-faq {
  border: 1px solid var(--mm-line, #e3e3ec);
  border-radius: var(--mm-r-lg, 16px);
  background: var(--mm-paper, #fff);
  box-shadow: var(--mm-sh-1, 0 1px 2px rgba(26,26,46,.06));
  overflow: hidden;
}

.mbb-faq__item {
  margin: 0;
  border: 0;
}
.mbb-faq__item + .mbb-faq__item { border-top: 1px solid var(--mm-line, #e3e3ec); }
.mbb-faq__item:first-of-type { border-top: 0; }

.mbb-faq__q {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 17px 20px;
  font-size: var(--mm-fs-md, 16px);
  font-weight: var(--mm-fw-medium, 600);
  line-height: 1.3;
  color: var(--mm-brand, #3A3971);
  cursor: pointer;
  list-style: none;
  transition: background var(--mm-ease, .18s ease);
}
.mbb-faq__q:hover { background: var(--mm-wash, #f6f6fa); }
.mbb-faq__q:focus-visible { outline: 2px solid var(--mm-brand, #3A3971); outline-offset: -2px; }
.mbb-faq__q::-webkit-details-marker { display: none; }
.mbb-faq__q::marker { display: none; }

/* Chevron en circulo, identico al del acordeon de ficha. */
.mbb-faq__q::before { content: none; }
.mbb-faq__q::after {
  content: "";
  margin-left: auto;
  flex: 0 0 26px;
  width: 26px; height: 26px;
  border-radius: var(--mm-r-full, 999px);
  background-color: var(--mm-wash, #f6f6fa);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233A3971' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 11px 11px;
  box-shadow: inset 0 0 0 1px var(--mm-line, #e3e3ec);
  transition: transform var(--mm-ease, .18s ease), background-color var(--mm-ease, .18s ease);
}
details[open] > .mbb-faq__q { background: var(--mm-wash, #f6f6fa); }
details[open] > .mbb-faq__q::after {
  background-color: var(--mm-paper, #fff);
  transform: rotate(180deg);
}

.mbb-faq__a {
  margin: 0;
  padding: 4px 20px 20px;
  font-size: var(--mm-fs-base, 15px);
  line-height: var(--mm-lh-loose, 1.65);
  color: var(--mm-ink-2, #4c4c68);
}
.mbb-faq__a > *:first-child { margin-top: 0; }
.mbb-faq__a > *:last-child { margin-bottom: 0; }

@media (max-width: 640px) {
  .mbb-faq__q { padding: 15px 16px; font-size: .95rem; gap: 10px; }
  .mbb-faq__a { padding: 2px 16px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .mbb-faq__q, .mbb-faq__q::after { transition: none; }
}

/* ── Author card ─────────────────────────────────────────────────── */
.mbb-author-card {
  background: #fff;
  border: 1px solid var(--mbb-border);
  border-radius: var(--mbb-radius);
  box-shadow: var(--mbb-shadow-md);
  padding: 1.1rem;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 1rem;
  align-items: flex-start;
}

.mbb-author-card__img {
  width: 72px; height: 72px;
  border-radius: 50%; object-fit: cover;
}

.mbb-author-card__name {
  margin: .1rem 0 .2rem;
  font-size: 1.2rem !important;
  color: var(--mbb-head);
  text-align: left !important;
  font-weight: 800;
}

.mbb-author-card__meta {
  margin: 0 0 .5rem; font-weight: 700; color: var(--mbb-head);
}

.mbb-author-card__bullets {
  margin: .2rem 0 .4rem; padding-left: 1.15rem;
}
.mbb-author-card__bullets li { margin: .15rem 0; }

.mbb-author-card__link {
  font-weight: 800; text-decoration: none;
  color: var(--mbb-primary);
  display: inline-block; margin-top: .35rem;
}
.mbb-author-card__link:hover { text-decoration: underline; }

/* ── Sticky mobile CTA ───────────────────────────────────────────── */
.mbb-sticky-cta {
  position: sticky; bottom: 0;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(8px);
  padding: .8rem;
  border-top: 1px solid var(--mbb-border);
  display: flex; gap: .6rem;
  z-index: 100;
}

.mbb-sticky-cta .mbb-btn { flex: 1; text-align: center; }

@media (min-width: 900px) { .mbb-sticky-cta { display: none; } }

/* ── Reduced motion ──────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .mbb-hero,
  #mbb-main,
  .mbb-sticky-cta {
    * { transition: none !important; animation: none !important; }
  }
}

/* ── Print ───────────────────────────────────────────────────────── */
@media print {
  .mbb-hero__images,
  .mbb-hero::after,
  .mbb-sticky-cta { display: none; }
  .mbb-hero { min-height: auto; background: none; }
  .mbb-hero__content { color: #000; padding: 0; }
  .mbb-hero__title   { color: #000; text-shadow: none; }
}

/* ── Bloque Texto / Encabezado ─────────────────────────── */
.mbb-section--text .mbb-wrap--narrow { max-width: 780px; }

.mbb-text-heading {
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  font-weight: 700;
  color: var(--mbb-brand, #3A3971);
  margin: 0 0 .75em;
  line-height: 1.25;
}

.mbb-text-body {
  font-size: 1rem;
  line-height: 1.75;
  color: #333;
}
.mbb-text-body p  { margin: 0 0 1em; }
.mbb-text-body p:last-child { margin-bottom: 0; }
.mbb-text-body strong { color: inherit; font-weight: 700; }
.mbb-text-body a  { color: var(--mbb-brand, #3A3971); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(58,57,114,.3); }
.mbb-text-body ul, .mbb-text-body ol { padding-left: 1.5em; margin: .75em 0; }
.mbb-text-body li { margin-bottom: .35em; }

/* ── Products block (PLP-style) ─────────────────────────────────── */
.mbb-products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 28px;
}
@media (min-width: 768px) {
  .mbb-products-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
  .mbb-products-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
  .mbb-products-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }
}
.mbb-product-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--mbb-border);
  border-radius: var(--mbb-radius);
  padding: 12px;
  text-decoration: none;
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.mbb-product-card:hover {
  box-shadow: var(--mbb-shadow-lg);
  transform: translateY(-3px);
  border-color: var(--mbb-accent);
}
.mbb-product-card__img {
  display: block;
  border-radius: calc(var(--mbb-radius) - 4px);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--mbb-bg-alt);
}
.mbb-product-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mbb-product-card__name {
  font-weight: 700;
  color: var(--mbb-head);
  font-size: .95rem;
  line-height: 1.35;
}
.mbb-product-card:hover .mbb-product-card__name { color: var(--mbb-accent-hover); }
.mbb-product-card__price {
  margin-top: auto;
  font-weight: 700;
  color: var(--mbb-cta);
  font-size: .95rem;
}
.mbb-product-card__price del { color: var(--mm-muted, #74748C); font-weight: 400; margin-right: 6px; }
.mbb-product-card__price ins { text-decoration: none; }


/* ═══════════════════════════════════════════════════════════════════════
   Señales de confianza: fechas, revisor, índice y fuentes
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Fecha y revisor, bajo el subtítulo ── */
.mbb-hero__meta{
  display:flex;flex-wrap:wrap;align-items:center;gap:8px 18px;
  margin:14px 0 0;
  font-size:var(--mm-fs-sm,13.5px);
  line-height:1.4;
  color:var(--mm-muted,#74748c);
}
.mbb-meta-item{display:inline-flex;align-items:center;gap:6px}
.mbb-meta-item time{color:inherit;font-weight:var(--mm-fw-medium,600)}
.mbb-meta-item--upd time{color:var(--mm-good,#0e7c55)}
.mbb-meta-item--rev a{color:inherit;text-decoration:underline;text-underline-offset:2px}
.mbb-meta-item--rev a:hover{color:var(--mm-brand,#3A3971)}
/* Separador entre datos, sin pintarlo en el primero */
.mbb-meta-item + .mbb-meta-item::before{
  content:"·";margin-right:12px;opacity:.55;
}

/* ── Índice de contenidos ── */
.mbb-toc{
  border:1px solid var(--mm-line,#e3e3ec);
  border-radius:var(--mm-r-lg,16px);
  background:var(--mm-wash,#f6f6fa);
  padding:20px 22px;
}
.mbb-toc__title{
  margin:0 0 12px;
  font-size:var(--mm-fs-eyebrow,11.5px);
  font-weight:var(--mm-fw-medium,600);
  letter-spacing:var(--mm-ls-eyebrow,.07em);
  text-transform:uppercase;
  color:var(--mm-muted,#74748c);
}
.mbb-toc__list{
  margin:0;padding:0 0 0 1.2em;
  display:grid;gap:8px 28px;
  list-style:decimal;
}
@media (min-width:720px){
  .mbb-toc__list{grid-template-columns:1fr 1fr}
}
.mbb-toc__list li{margin:0;color:var(--mm-muted,#74748c)}
.mbb-toc__list a{
  color:var(--mm-brand,#3A3971);
  text-decoration:none;
  border-bottom:1px solid transparent;
  transition:border-color var(--mm-ease,.18s ease);
}
.mbb-toc__list a:hover{border-bottom-color:currentColor}
.mbb-toc__list a:focus-visible{outline:2px solid var(--mm-brand,#3A3971);outline-offset:3px;border-radius:3px}

/* Al saltar por el índice, el título no queda pegado al borde superior. */
[id]{scroll-margin-top:24px}

/* ── Fuentes ── */
.mbb-sources__title{
  margin:0 0 12px;
  font-size:var(--mm-fs-eyebrow,11.5px);
  font-weight:var(--mm-fw-medium,600);
  letter-spacing:var(--mm-ls-eyebrow,.07em);
  text-transform:uppercase;
  color:var(--mm-muted,#74748c);
}
.mbb-sources__list{
  margin:0;padding:0 0 0 1.3em;
  display:flex;flex-direction:column;gap:7px;
  font-size:var(--mm-fs-sm,13.5px);
  line-height:1.5;
  color:var(--mm-ink-2,#4c4c68);
}
.mbb-sources__list a{
  color:var(--mm-brand,#3A3971);
  text-decoration:underline;
  text-underline-offset:2px;
}
.mbb-sources__list a:hover{color:var(--mm-brand-ink,#2C2B57)}

@media (prefers-reduced-motion:reduce){
  .mbb-toc__list a{transition:none}
}


/* ── Fecha y revisor ──
   Alineadas con el borde izquierdo dominante del articulo: el mismo que usan
   los titulos de seccion, las entradillas y las tablas (--mbb-wrap, 1100px).

   Antes iban dentro del hero, sobre la foto, sin contraste para leerlas. Al
   sacarlas las puse en el ancho estrecho (820px) y quedaban 140px adentro
   respecto a todo lo demas: una linea suelta que no pertenecia a nada.

   El filete inferior les da un trabajo: cerrar la cabecera y separar del
   cuerpo del articulo, en vez de flotar entre dos bloques.

   Sin separador "·" entre datos: puesto como ::before del segundo, en movil
   se quedaba huerfano al principio de la linea siguiente. El hueco basta. */
.mbb-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 24px;
  max-width: var(--mbb-wrap, 1100px);
  margin: 0 auto;
  padding: 18px 1.5rem;
  border-bottom: 1px solid var(--mm-line, #e3e3ec);
  font-size: var(--mm-fs-sm, 13.5px);
  line-height: 1.5;
  color: var(--mm-muted, #74748c);
}
.mbb-meta-item {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}
.mbb-meta-item time {
  color: var(--mm-ink-2, #4c4c68);
  font-weight: var(--mm-fw-medium, 600);
}
.mbb-meta-item--rev { white-space: normal; }
.mbb-meta-item--rev a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.mbb-meta-item--rev a:hover { color: var(--mm-brand, #3A3971); }

@media (max-width: 600px) {
  .mbb-hero__meta { gap: 2px 16px; padding: 14px 1.5rem; }
}




/* ═══════════════════════════════════════════════════════════════════════
   COLUMNA DE LECTURA
   -----------------------------------------------------------------------
   El articulo usaba tres anchos de contenedor (1100 / 980 / 820) y cada
   bloque elegia uno, asi que el borde izquierdo del texto saltaba entre
   cuatro posiciones distintas al bajar por la pagina.

   El primer intento fue alinearlo todo a la izquierda dentro del contenedor
   ancho, y quedo peor: cada bloque de texto dejaba ~460px muertos a su
   derecha y la pagina se leia descolgada, no editorial.

   Lo correcto es una COLUMNA CENTRADA. El texto vive en una medida comoda
   (~72 caracteres) centrada en la pagina, y los elementos que necesitan mas
   aire —tablas, rejillas de tarjetas— se ensanchan hacia los dos lados por
   igual. Comparten eje central, y ese desbordamiento simetrico se lee como
   una decision, no como un descuadre.
   ═══════════════════════════════════════════════════════════════════════ */
:root {
  --mbb-col:  46rem;   /* columna de lectura, ~72 caracteres a 15px */
  --mbb-wide: 60rem;   /* ensanchado para tablas y rejillas */
}

.mbb-wrap,
.mbb-wrap--mid,
.mbb-wrap--narrow,
/* Los bloques de texto traian su propio ancho con mas especificidad
   (.mbb-section--text .mbb-wrap--narrow: 780px) y se saltaban el sistema. */
.mbb-section--text .mbb-wrap--narrow { max-width: var(--mbb-wrap, 1100px); }

/* Texto: columna centrada. */
.mbb-section__title,
.mbb-section__intro,
.mbb-text-heading,
.mbb-text-body,
.mbb-lead,
.mbb-faq,
.mbb-toc,
.mbb-sources__title,
.mbb-sources__list,
.mbb-author-card {
  max-width: var(--mbb-col);
  margin-left: auto;
  margin-right: auto;
}

/* El titulo usa la misma columna: nunca se recorta ni se estrecha aparte.
   Antes le puse 30ch y partia titulos largos donde no tocaba. */
.mbb-section__title { max-width: var(--mbb-col); }

/* Elementos que se ensanchan a los dos lados: necesitan el aire y con la
   medida de lectura se apretarian.
   60rem y no el contenedor completo (1100px): con el ancho maximo, el salto
   respecto al texto era de 158px por lado y el ojo lo lee como un descuadre
   en vez de como una jerarquia. A 60rem son 112px, suficiente para que la
   tabla respire sin romper el ritmo de la pagina. */
.mbb-table-wrap,
.mbb-cards,
.mbb-analysis-grid,
.mbb-decision-grid,
.mbb-products-grid {
  max-width: var(--mbb-wide, 60rem);
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 900px) {
  /* Sin espacio de sobra, la medida la impone la pantalla. */
  .mbb-section__title,
  .mbb-section__intro,
  .mbb-text-heading,
  .mbb-text-body,
  .mbb-lead,
  .mbb-faq,
  .mbb-toc,
  .mbb-sources__title,
  .mbb-sources__list,
  .mbb-author-card { max-width: 100%; }
}

/* Fechas: acompanan a la COLUMNA DE LECTURA, no al contenedor ancho.
   Medido a 1585px: el texto arrancaba en 424 y la fecha en 266 —158px a su
   izquierda— y el filete se extendia de 242 a 1342, mas ancho incluso que la
   tabla. Es un metadato del articulo, no necesita aire. */
.mbb-hero__meta {
  max-width: var(--mbb-col, 46rem);
}

/* ── Objetivo tactil del enlace de autor ──
   Media 155x24: por debajo del minimo comodo para el pulgar. */
.mbb-author-card__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 0;
}


/* ═══════════════════════════════════════════════════════════════════════
   MOVIL: MENOS SCROLL VERTICAL
   -----------------------------------------------------------------------
   Medido en un articulo real a 390px: 13.579px de alto, 16,1 pantallas.
   El grueso se iba en tres sitios: la tabla apilada (1213px), la rejilla de
   tarjetas en una columna (1044px) y 96px de padding por seccion x13.
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 720px) {

  /* Menos aire entre secciones. 48+48 era generoso en escritorio y excesivo
     en una pantalla de 844px de alto. */
  .mbb-section { padding-top: 32px; padding-bottom: 32px; }

  /* overflow-x:clip contiene el sangrado lateral de los carruseles sin crear
     un contenedor de scroll: con hidden o sin nada, los margenes negativos
     hacian que la PAGINA ENTERA se desplazara de lado. clip ademas no rompe
     position:sticky, que hidden si romperia. */
  .mbb-section { overflow-x: clip; }

  /* Tarjetas en carrusel en vez de una debajo de otra. Se ve que hay mas
     contenido al lado y se recorta mucho recorrido vertical. */
  .mbb-cards,
  .mbb-analysis-grid,
  .mbb-decision-grid,
  .mbb-products-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-bottom: 4px;
    /* Se sale del contenedor para llegar al borde de la pantalla: asi se ve
       que la fila continua. */
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  .mbb-cards::-webkit-scrollbar,
  .mbb-analysis-grid::-webkit-scrollbar,
  .mbb-decision-grid::-webkit-scrollbar,
  .mbb-products-grid::-webkit-scrollbar { display: none; }

  .mbb-cards > *,
  .mbb-analysis-grid > *,
  .mbb-decision-grid > *,
  .mbb-products-grid > * {
    flex: 0 0 82%;
    scroll-snap-align: start;
    min-width: 0;
  }

  /* El hero tambien se contiene un poco mas. */
  .mbb-hero { min-height: 38vh; }
}

@media (prefers-reduced-motion: reduce) {
  .mbb-cards, .mbb-analysis-grid, .mbb-decision-grid,
  .mbb-products-grid, .mbb-table-wrap { scroll-behavior: auto; }
}

/* ── Puntos del carrusel ──
   Se generan desde post.js solo cuando el contenido desborda de verdad. Sin
   ellos no se sabe cuantas tarjetas hay ni por donde se va; con el gesto solo,
   la mitad de la gente no llega a descubrir que hay mas contenido. */
.mbb-swipe-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.mbb-swipe-dot {
  position: relative;
  appearance: none;
  border: 0;
  padding: 0;
  width: 7px;
  height: 7px;
  border-radius: var(--mm-r-full, 999px);
  background: var(--mm-line-strong, #CFCFDC);
  cursor: pointer;
  transition: width .2s ease, background .2s ease;
}
.mbb-swipe-dot.is-active {
  width: 22px;
  background: var(--mm-brand, #3A3971);
}
/* Zona de toque de 44px sin agrandar el punto. */
.mbb-swipe-dot::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
}
.mbb-swipe-dot:focus-visible {
  outline: 2px solid var(--mm-brand, #3A3971);
  outline-offset: 4px;
}

@media (min-width: 721px) { .mbb-swipe-dots { display: none; } }
@media (prefers-reduced-motion: reduce) { .mbb-swipe-dot { transition: none; } }
