/* Artículo «Auditoría SEO técnica: checklist de 18 puntos» (prefijo ba-).
   Los 18 puntos van como tarjetas numeradas por bloque; un contador «X de 18» fijo acompaña la lectura de los cuatro bloques.
   El HTML trae el estado final (18 de 18, todo marcado); el JS agrega .ba-live y va marcando a medida que se lee. */

/* Color del número de cada sección: 01 navy (compartido), bloques alternados lima/navy, 06 niebla (compartido) */
.bl-body .ba-b1, .bl-body .ba-b3 { --sec-c: var(--lime); --sec-on: var(--on-lime); }
.bl-body .ba-b2, .bl-body .ba-b4 { --sec-c: var(--navy); --sec-on: var(--lime); }
html.dark .bl-body .ba-b2, html.dark .bl-body .ba-b4 { --sec-c: #3a4f70; }

/* Herramientas: cada nombre es una pastilla con su ícono, dentro de la misma frase */
.bl-body .ba-tools p { line-height: 2.15; }
.bl-body .ba-tools strong { display: inline-flex; align-items: center; gap: 7px; padding: 2px 12px 2px 4px; border-radius: 999px; background: var(--tile); color: var(--ink); line-height: 1.55; white-space: nowrap; box-shadow: 0 1px 0 var(--border); transform-origin: 0 50%; }
.bl-body .ba-tools strong svg { flex: none; width: 24px; height: 24px; padding: 4px; border-radius: 50%; background: var(--navy); color: var(--lime); stroke-width: 2.4; }
html.dark .bl-body .ba-tools strong { background: #172231; }

/* Bloque de la checklist */
.bl-body > .ba-check { margin-top: clamp(52px, 6vw, 88px); }
.ba-check > .ga-sec + .ga-sec { margin-top: clamp(52px, 6vw, 88px); }
.ba-check > .ba-meter + .ga-sec { margin-top: clamp(24px, 3vw, 40px); }
.ba-check .ga-sec > * + * { margin-top: 1.1em; }
.ba-check .ga-split .ga-fig { top: 142px; }

/* Contador «X de 18»: barra fija bajo el menú mientras se leen los cuatro bloques */
.ba-meter { position: sticky; top: 68px; z-index: 6; display: flex; align-items: center; gap: 12px; padding: 8px 16px 8px 8px; border-radius: 16px; background: var(--navy); color: #f2f5f8; font-size: var(--t-small); line-height: 1.2; box-shadow: 0 14px 34px rgba(29, 42, 61, .18); }
.ba-meter-ic { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--lime); color: var(--on-lime); }
.ba-meter-ic svg { width: 20px; height: 20px; }
.ba-meter-c { flex: none; color: #dbe2ea; white-space: nowrap; }
.ba-meter-n { display: inline-block; min-width: 2ch; margin-right: 2px; text-align: right; font-size: 1.375rem; font-weight: 600; letter-spacing: -0.02em; color: var(--lime); font-variant-numeric: tabular-nums; transform-origin: 50% 70%; }
.ba-meter-bar { flex: 1; min-width: 0; display: flex; gap: 7px; }
.ba-seg { flex: 4; display: flex; gap: 3px; }
.ba-seg:nth-child(n+3) { flex: 5; }
.ba-seg i { flex: 1; height: 8px; border-radius: 4px; background: var(--lime); transition: background-color .3s ease, scale .3s var(--ease-out); }
.ba-live .ba-seg i { background: rgba(255, 255, 255, .16); scale: 1 .7; }
.ba-live .ba-seg i.is-on { background: var(--lime); scale: 1 1; }
.ba-meter-b { flex: none; padding: 5px 11px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-weight: 600; white-space: nowrap; }
/* Franja del color del cuerpo entre el menú y el contador, para que el texto no asome por encima */
.ba-meter::before { content: ''; position: absolute; z-index: -1; left: -6px; right: -6px; bottom: 100%; height: 14px; background: var(--tile); transition: background-color .25s ease; }
html.dark .ba-meter { background: #0e1724; box-shadow: 0 0 0 1px #2c3d57, 0 14px 34px rgba(0, 0, 0, .35); }

/* Tarjetas de los 18 puntos */
.ba-stack { display: grid; gap: 10px; align-self: start; }
.ba-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.bl-body .ba-pt { position: relative; min-width: 0; padding: 18px 20px 20px; border-radius: 18px; background: var(--surface); transition: translate .25s var(--ease-out), background-color .25s ease; }
.bl-body .ba-pt:hover { translate: 0 -3px; }
.bl-body .ba-pt h3 { margin: 0 0 .55em; padding-right: 38px; align-items: center; gap: 10px; font-size: 1.125rem; line-height: 1.3; }
.bl-body .ba-pt .bl-n { min-width: 38px; height: 30px; font-size: .875rem; }
.bl-body .ba-pt p { margin: 0; font-size: 1rem; line-height: 1.58; }
.bl-body .ba-pt p + p { margin-top: .7em; }
.bl-body .ba-pt code { background: var(--tile); overflow-wrap: anywhere; }
/* Visto bueno de cada punto (arriba a la derecha) */
.ba-pt::after { content: ''; position: absolute; top: 18px; right: 18px; width: 26px; height: 26px; border-radius: 50%; background: var(--navy) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c8d400' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 14px no-repeat; transition: scale .4s var(--ease-out), background-color .25s ease, box-shadow .25s ease; }
html.dark .ba-pt::after { background-color: var(--lime); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d2a3d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
.ba-live .ba-pt:not(.is-ok)::after { background-color: transparent; background-image: none; box-shadow: inset 0 0 0 2px var(--border); scale: .8; }

/* Punto 11: la URL correcta y la problemática, marcadas */
.bl-body code.ba-ok, .bl-body code.ba-bad { padding-inline: .45em; }
.bl-body code.ba-ok { background: color-mix(in srgb, var(--lime) 34%, var(--tile)); }
.bl-body code.ba-bad { background: color-mix(in srgb, #d9534f 16%, var(--tile)); text-decoration: line-through; text-decoration-color: color-mix(in srgb, #d9534f 70%, transparent); }
.bl-body code.ba-ok::after, .bl-body code.ba-bad::after { content: ''; display: inline-block; width: .95em; height: .95em; margin-left: .35em; vertical-align: -.14em; background: currentColor; -webkit-mask: var(--ba-ic) center / contain no-repeat; mask: var(--ba-ic) center / contain no-repeat; }
.bl-body code.ba-ok::after { --ba-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
.bl-body code.ba-bad::after { --ba-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E"); color: #c0392b; }
html.dark .bl-body code.ba-bad::after { color: #ff8a80; }

/* Punto 10: mini resultado de Google con el largo ideal del title y la description */
.ba-snip { min-width: 0; margin: 0; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 18px 20px; border-radius: 18px; background: #eff3cf; }
html.dark .ba-snip { background: #1d2410; }
.bl-body .ba-snip .ga-label { margin: 0; }
.ba-snip-card { display: grid; gap: 11px; padding: 16px; border-radius: 14px; background: var(--tile); box-shadow: 0 10px 26px rgba(29, 42, 61, .08); }
.ba-snip-url { display: flex; align-items: center; gap: 8px; }
.ba-snip-url i { flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); }
.ba-snip-url b { width: 42%; height: 7px; border-radius: 4px; background: var(--surface); transform-origin: 0 50%; }
.ba-snip-row { display: flex; align-items: center; gap: 10px; }
.ba-snip-l { flex: 1; height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--ink) 16%, transparent); transform-origin: 0 50%; }
.ba-snip-t { height: 12px; background: #3b6fd8; }
html.dark .ba-snip-t { background: #8ab4f8; }
.ba-snip-s { flex: 0 0 62%; }
.ba-snip-row em { flex: none; padding: 2px 9px; border-radius: 999px; background: var(--navy); color: var(--lime); font-size: .8125rem; font-style: normal; font-weight: 600; line-height: 1.5; font-variant-numeric: tabular-nums; }
html.dark .ba-snip-row em { background: var(--lime); color: var(--on-lime); }
.ba-snip figcaption { font-size: var(--t-small); line-height: 1.4; color: var(--soft); }

/* Cómo priorizar: escalera de prioridad, de lo más urgente (navy) a lo que puede esperar */
.bl-body ol.ba-prio { gap: 10px; }
.bl-body ol.ba-prio > li { padding: 18px 20px 18px 70px; border-radius: 18px; background: color-mix(in srgb, var(--lime) var(--ba-k, 0%), var(--surface)); font-size: 1rem; line-height: 1.5; transition: translate .25s var(--ease-out); }
.bl-body ol.ba-prio > li:hover { translate: 4px 0; }
.bl-body ol.ba-prio > li::before { left: 16px; top: 16px; width: 38px; height: 38px; border-radius: 12px; font-size: 1rem; }
.bl-body ol.ba-prio > li strong { color: var(--ink); }
.bl-body ol.ba-prio > li:nth-child(1) { background: var(--navy); color: #dbe2ea; }
.bl-body ol.ba-prio > li:nth-child(1) strong { color: #fff; }
.bl-body ol.ba-prio > li:nth-child(1)::before { background: var(--lime); color: var(--on-lime); }
.bl-body ol.ba-prio > li:nth-child(2) { --ba-k: 46%; }
.bl-body ol.ba-prio > li:nth-child(3) { --ba-k: 30%; }
.bl-body ol.ba-prio > li:nth-child(4) { --ba-k: 15%; }
html.dark .bl-body ol.ba-prio > li:nth-child(1) { background: #0e1724; box-shadow: inset 0 0 0 1px #2c3d57; }
html.dark .bl-body ol.ba-prio > li:nth-child(2) { --ba-k: 24%; }
html.dark .bl-body ol.ba-prio > li:nth-child(3) { --ba-k: 15%; }
html.dark .bl-body ol.ba-prio > li:nth-child(4) { --ba-k: 7%; }
.ba-prio-flag { display: table; margin-bottom: 8px; padding: 2px 10px; border-radius: 999px; background: var(--lime); color: var(--on-lime); font-size: .8125rem; font-weight: 600; line-height: 1.5; transform-origin: 0 50%; }

/* Cierre: el párrafo vigente es largo, se le da más ancho */
.bl-body .ba-cta p { max-width: 60ch; }
.bl-body .ba-cta p a { color: var(--lime); }

/* Cuerpo angosto: la ilustración va antes de sus tarjetas y el contador se simplifica */
@container ga-body (max-width: 640px) {
  .ba-check .ga-split .ga-fig { order: -1; }
  .ba-meter-b { display: none; }
}
@container ga-body (max-width: 560px) {
  .ba-grid { grid-template-columns: minmax(0, 1fr); }
  .ba-meter { gap: 10px; padding: 6px 14px 6px 6px; border-radius: 14px; }
  .ba-meter-ic { width: 32px; height: 32px; border-radius: 10px; }
  .ba-meter-ic svg { width: 17px; height: 17px; }
  .ba-meter-n { font-size: 1.25rem; }
  .ba-meter-bar { gap: 5px; }
  .ba-seg { gap: 2px; }
  .bl-body .ba-pt { padding: 16px 16px 18px; }
  .ba-pt::after { top: 16px; right: 14px; }
  .bl-body .ba-tools strong { white-space: normal; }
  .bl-body ol.ba-prio > li { padding: 16px 16px 16px 60px; }
  .bl-body ol.ba-prio > li::before { left: 14px; top: 14px; width: 32px; height: 32px; }
}
