/* Generado por `manage.py bundle_css`. NO editar a mano:
   se sobrescribe en cada build. Las fuentes son las de
   apps/core/css_bundles.py → BUNDLES['home'] */

/* ===== css/comparator/cmpx.css ===== */
/* ============================================================================
   Sistema nuevo («mostrador técnico», oct-2026) — tokens y componentes comunes

   Lo comparten todas las páginas del comparador.
   Los componentes van bajo .cmpx. Los tokens --x-* están en tokens.css
   (globales desde el 29-10-2026, cuando migró la cabecera y el pie).
   Ver DESIGN-GUIDE.md.

   Cada página añade su hoja propia detrás (index.css, cmpx-category.css).
   Móvil primero; solo los cinco breakpoints de la guía, en min-width.
   ============================================================================ */


.cmpx {
  background: var(--x-paper);
  color: var(--x-ink);
  font-family: var(--x-font);
  font-size: 15px;
  line-height: 1.5;
}


.cmpx *, .cmpx *::before, .cmpx *::after { box-sizing: border-box; }
:where(.cmpx) a { color: inherit; }
.cmpx :focus-visible { outline: 2px solid var(--x-accent); outline-offset: 2px; border-radius: 4px; }
.cmpx h1, .cmpx h2, .cmpx h3 { margin: 0; font-family: var(--x-font); color: var(--x-ink); text-wrap: balance; }
/* :where() deja la especificidad en 0: cualquier clase propia gana. */
:where(.cmpx) p { margin: 0; }

.cmpx-wrap { max-width: 1200px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* Franja de campaña (Black Friday): portada del comparador y home. */
.cmpx-strip { background: var(--x-strip); color: var(--x-strip-ink); font-size: 13.5px; }
.cmpx-strip .cmpx-wrap { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; justify-content: space-between; padding-block: 9px; }
.cmpx-strip strong { font-weight: 700; }
.cmpx-strip a { font-weight: 600; text-underline-offset: 3px; }
.cmpx-num { font-variant-numeric: tabular-nums; }
.cmpx-label { font-stretch: 78%; font-weight: 600; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--x-ink-3); }


/* --- Entrada --------------------------------------------------------------- */
.cmpx-intro { padding-block: 28px; border-bottom: 1px solid var(--x-line); }
.cmpx-intro__grid { display: grid; gap: 28px; align-items: start; }
.cmpx-intro__main { min-width: 0; }

.cmpx-crumbs { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; font-size: 13.5px; color: var(--x-ink-3); }
.cmpx-crumbs li + li::before { content: "/"; margin-right: 8px; }
.cmpx-crumbs a { text-decoration: none; }
.cmpx-crumbs a:hover { color: var(--x-ink); text-decoration: underline; text-underline-offset: 3px; }
.cmpx-crumbs [aria-current] { color: var(--x-ink-2); }

.cmpx-intro h1 { font-stretch: 104%; font-weight: 650; font-size: clamp(28px, 3.2vw, 38px); line-height: 1.12; letter-spacing: -.022em; margin-top: 14px; max-width: 22ch; }
.cmpx-lead { color: var(--x-ink-2); font-size: 16px; max-width: 58ch; margin: 12px 0 24px; }


.cmpx-btn { font: inherit; font-weight: 600; font-size: 14.5px; line-height: 1.2; border-radius: var(--x-r); padding: 10px 16px; border: 1px solid transparent; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.cmpx-btn--primary { background: var(--x-accent); color: var(--x-accent-ink); }
.cmpx-btn--primary:hover { filter: brightness(1.08); }
.cmpx-btn--ghost { background: var(--x-surface); color: var(--x-ink); border-color: var(--x-line-2); }
.cmpx-btn--ghost:hover { border-color: var(--x-ink); }
.cmpx-btn--ink { background: var(--x-ink); color: var(--x-paper); }
.cmpx-btn--ink:hover { background: color-mix(in srgb, var(--x-ink) 85%, var(--x-paper)); }

.cmpx-cats { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 16px 0 0; max-width: 680px; }
.cmpx-chip { display: inline-flex; gap: 7px; align-items: baseline; text-decoration: none; font-size: 14px; padding: 6px 11px; border: 1px solid var(--x-line-2); border-radius: 999px; background: var(--x-surface); transition: border-color .15s ease; }
.cmpx-chip span { color: var(--x-ink-3); font-size: 12.5px; }
.cmpx-chip:hover { border-color: var(--x-ink); }
.cmpx-chip.is-active { border-color: var(--x-ink); background: var(--x-ink); color: var(--x-paper); font-weight: 600; }
.cmpx-chip.is-active span { color: inherit; opacity: .7; }

.cmpx-facts { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 22px; font-size: 13.5px; color: var(--x-ink-2); }
.cmpx-facts b { color: var(--x-ink); font-weight: 650; }

/* Leyenda del medidor */
.cmpx-legend { background: var(--x-surface); border: 1px solid var(--x-line); border-radius: 14px; padding: 20px; max-width: 560px; }
.cmpx-legend h2 { font-stretch: 104%; font-weight: 650; font-size: 17px; line-height: 1.3; margin: 6px 0; }
.cmpx-legend > p { color: var(--x-ink-2); font-size: 14px; margin-bottom: 16px; }
.cmpx-legend__sample { border-top: 1px dashed var(--x-line-2); padding-top: 14px; }
.cmpx-legend ul { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 7px; font-size: 13.5px; color: var(--x-ink-2); }
.cmpx-legend li { display: flex; gap: 9px; align-items: center; }
.cmpx-swatch { width: 18px; height: 8px; border-radius: 2px; flex: none; }
.cmpx-swatch--low { background: var(--x-low); }
.cmpx-swatch--mid { background: var(--x-ink-3); }
.cmpx-swatch--high { background: var(--x-high); }

/* --- Medidor de rango de 90 días ------------------------------------------ */
.cmpx-meter { display: grid; gap: 5px; min-width: 0; }
.cmpx-meter__seg { display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; height: 10px; align-items: end; }
.cmpx-meter__seg i { display: block; height: 6px; border-radius: 1.5px; background: var(--x-mid); }
.cmpx-meter__seg i.z-low { background: color-mix(in srgb, var(--x-low) 35%, var(--x-mid)); }
.cmpx-meter__seg i.z-high { background: color-mix(in srgb, var(--x-high) 30%, var(--x-mid)); }
.cmpx-meter__seg i.on { height: 10px; background: var(--x-ink); }
.cmpx-meter__seg i.on.z-low { background: var(--x-low); }
.cmpx-meter__seg i.on.z-high { background: var(--x-high); }
.cmpx-meter__ends { display: flex; justify-content: space-between; gap: 6px; font-size: 11.5px; color: var(--x-ink-3); }
/* Los precios de los extremos no se parten; el veredicto sí puede ir a dos líneas. */
.cmpx-meter__ends > :first-child, .cmpx-meter__ends > :last-child { white-space: nowrap; flex: none; }
.cmpx-meter__verdict { font-size: 12.5px; font-weight: 600; text-align: center; min-width: 0; }
.cmpx-meter__verdict.v-low { color: var(--x-low); }
.cmpx-meter__verdict.v-mid { color: var(--x-ink-2); }
.cmpx-meter__verdict.v-high { color: var(--x-high); }
.cmpx-meter--none { font-size: 12.5px; color: var(--x-ink-3); }

/* --- Secciones ------------------------------------------------------------- */
.cmpx-block { padding-block: 40px 8px; }
.cmpx-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; margin-bottom: 18px; }
.cmpx-head > div { min-width: 0; }
.cmpx h2.cmpx-h2 { font-stretch: 104%; font-weight: 650; font-size: clamp(22px, 2.4vw, 26px); letter-spacing: -.018em; line-height: 1.18; }
.cmpx-head p { color: var(--x-ink-2); font-size: 14.5px; max-width: 62ch; margin-top: 6px; }
.cmpx-head__tools { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.cmpx .cmpx-textlink { font-weight: 600; font-size: 14.5px; color: var(--x-accent); text-underline-offset: 3px; }
.cmpx-empty { color: var(--x-ink-2); padding: 20px; border: 1px dashed var(--x-line-2); border-radius: 12px; }


/* Tabla de bajadas: lista en móvil, rejilla de columnas en escritorio */
.cmpx-rows { list-style: none; margin: 0; padding: 0; border: 1px solid var(--x-line); border-radius: 14px; background: var(--x-surface); overflow: hidden; }
.cmpx-rows__head { display: none; }
.cmpx-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-areas: "pic name name" "pic price price" "meter meter meter" "shop shop cmp"; gap: 10px 14px; align-items: center; padding: 14px; }
.cmpx-row + .cmpx-row { border-top: 1px solid var(--x-line); }
.cmpx-row__pic { grid-area: pic; align-self: start; }
.cmpx-row__name { grid-area: name; min-width: 0; }
.cmpx-row__price { grid-area: price; }
.cmpx-row__meter { grid-area: meter; min-width: 0; }
.cmpx-row__shop { grid-area: shop; min-width: 0; }
.cmpx-row__cmp { grid-area: cmp; }

.cmpx-pic { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 8px; background: var(--x-tray); overflow: hidden; }
.cmpx-pic img { width: 88%; height: 88%; object-fit: contain; mix-blend-mode: multiply; }
.cmpx-pname { display: block; font-weight: 650; font-size: 15px; line-height: 1.25; text-decoration: none; }
.cmpx-pname:hover { text-decoration: underline; text-underline-offset: 3px; }
.cmpx-pcat { color: var(--x-ink-3); font-size: 13px; margin-top: 2px; }
.cmpx-price { font-stretch: 104%; font-weight: 700; font-size: 20px; letter-spacing: -.01em; line-height: 1.1; }
.cmpx-was { color: var(--x-ink-3); font-size: 13px; margin-top: 3px; }
.cmpx-was s { text-decoration-thickness: 1px; }
.cmpx-was .cmpx-drop:first-child { margin-left: 0; }

/* Selector de mercado (estilos base en comparator.css) */
.cmpx .comparator-market-selector__trigger,
.cmpx .comparator-market-selector__option { font-family: var(--x-font); }
.cmpx-drop { display: inline-block; font-weight: 650; font-size: 12.5px; color: var(--x-low); background: var(--x-low-soft); padding: 2px 7px; border-radius: 5px; margin-left: 6px; vertical-align: 1px; }
.cmpx-shop { font-size: 13.5px; color: var(--x-ink-2); line-height: 1.35; }
.cmpx-shop b { color: var(--x-ink); font-weight: 600; }

/* Botón comparar: comparator_compare.js cambia el texto y pone .is-comparing */
.cmpx-cmp { font: inherit; font-size: 13.5px; font-weight: 600; color: var(--x-ink); background: var(--x-surface); border: 1px solid var(--x-line-2); border-radius: var(--x-r); padding: 7px 12px; cursor: pointer; white-space: nowrap; transition: border-color .15s ease, background .15s ease; }
.cmpx-cmp:hover { border-color: var(--x-ink); }
.cmpx-cmp.is-comparing { border-color: var(--x-accent); color: var(--x-accent); background: var(--x-accent-soft); }
.cmpx-cmp:disabled { opacity: .45; cursor: not-allowed; }


/* --- Formularios y avisos (ficha, comparativas) ------------------------ */
.cmpx-alert { margin-top: 20px; padding: 18px; background: var(--x-surface); border: 1px solid var(--x-line); border-radius: 14px; display: grid; gap: 14px; scroll-margin-top: calc(var(--header-h, 68px) + 56px); }
.cmpx-alert h3 { font-stretch: 104%; font-weight: 650; font-size: 17px; }
.cmpx-alert__text p { margin-top: 4px; font-size: 14px; color: var(--x-ink-2); }
.cmpx-alert__fields { display: grid; gap: 12px; align-items: end; }
.cmpx-field { display: grid; gap: 5px; font-size: 13px; color: var(--x-ink-2); min-width: 0; }
.cmpx-field input, .cmpx-field textarea, .cmpx-field__box { font: inherit; font-size: 15px; color: var(--x-ink); background: var(--x-surface); border: 1px solid var(--x-line-2); border-radius: var(--x-r); padding: 9px 12px; width: 100%; }
.cmpx-field textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.cmpx-field input:focus, .cmpx-field textarea:focus, .cmpx-field__box:focus-within { outline: none; border-color: var(--x-ink); box-shadow: 0 0 0 3px var(--x-accent-soft); }
.cmpx-field__box { display: flex; align-items: center; gap: 6px; padding-block: 0; }
.cmpx-field__box input { border: 0; padding: 9px 0; box-shadow: none; -moz-appearance: textfield; font-variant-numeric: tabular-nums; }
.cmpx-field__box input:focus { box-shadow: none; }
.cmpx-field__box input::-webkit-outer-spin-button,
.cmpx-field__box input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cmpx-field--static b { color: var(--x-ink); font-weight: 600; font-size: 15px; padding: 9px 0; }
.cmpx-alert__fields .cmpx-btn { justify-content: center; padding-block: 11px; }
.cmpx-alert__legal { font-size: 12.5px; color: var(--x-ink-3); }
.cmpx-alert__legal a { text-underline-offset: 2px; }
.cmpx-alert__nl label { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--x-ink-2); cursor: pointer; }
.cmpx-alert__nl input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--x-accent); flex: none; }
.cmpx-alert__fb { font-size: 14px; font-weight: 600; padding: 10px 12px; border-radius: var(--x-r); }
.cmpx-alert__fb.ok { color: var(--x-low); background: var(--x-low-soft); }
.cmpx-alert__fb.err { color: var(--x-high); background: color-mix(in srgb, var(--x-high) 12%, var(--x-surface)); }


.cmpx-check { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 14px; cursor: pointer; }
.cmpx-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--x-accent); flex: none; }
.cmpx-check span:first-of-type { min-width: 0; }
.cmpx-check__n { margin-left: auto; color: var(--x-ink-3); font-size: 12.5px; }


.cmpx-prose { max-width: 70ch; padding-top: 32px; color: var(--x-ink-2); font-size: 15.5px; line-height: 1.65; }
.cmpx-prose p + p { margin-top: 12px; }


/* --- Tabla cara a cara (_compare_table.html: versus y comparar) ---------- */
.cmpx-ctable { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 13px; background: var(--x-surface); border: 1px solid var(--x-line); border-radius: 14px; }
.cmpx-ctable th, .cmpx-ctable td { padding: 9px 8px; text-align: left; vertical-align: top; border-top: 1px solid var(--x-line); overflow-wrap: break-word; hyphens: auto; }
.cmpx-ctable thead th, .cmpx-ctable thead td { border-top: 0; }
/* Cabecera fija bajo la cabecera de la web: al bajar por la tabla se sigue
   viendo qué columna es cada producto. */
.cmpx-ctable thead th, .cmpx-ctable thead td { position: sticky; top: var(--header-h, 68px); z-index: 5; background: var(--x-surface); border-bottom: 1px solid var(--x-line-2); }
.cmpx-ctable thead > tr > :first-child { border-top-left-radius: 14px; }
.cmpx-ctable thead > tr > :last-child { border-top-right-radius: 14px; }
.cmpx-ctable--2 .cmpx-ctable__corner { width: 34%; }
.cmpx-ctable--3 .cmpx-ctable__corner { width: 25%; }
/* Móvil: foto encima y nombre debajo, partiendo solo entre palabras (con guiones
   salía «Ya-maha»). Como mucho tres líneas. Desde 640px, foto y nombre en fila. */
.cmpx-ctable thead th { hyphens: manual; overflow-wrap: normal; }
.cmpx-ctable__prod { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; font-weight: 650; font-size: 12.5px; line-height: 1.25; text-decoration: none; }
.cmpx-ctable__prod > span:last-child { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cmpx-ctable__prod:hover span:last-child { text-decoration: underline; text-underline-offset: 3px; }
.cmpx-ctable__prod .cmpx-pic { width: 36px; height: 36px; border-radius: 6px; flex: none; }
.cmpx-ctable tbody th[scope="row"] { font-weight: 400; color: var(--x-ink-2); }
.cmpx-ctable__group th { padding-top: 18px; font-stretch: 78%; font-weight: 600; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--x-ink-3); background: var(--x-paper); }
.cmpx-ctable td.is-cheapest { color: var(--x-low); font-weight: 700; background: var(--x-low-soft); }
.cmpx-ctable td.is-better { font-weight: 700; }
.cmpx-ctable__na, .cmpx-ctable__no { color: var(--x-ink-3); }
.cmpx-ctable tbody:last-child tr:last-child > :first-child { border-bottom-left-radius: 14px; }
.cmpx-ctable tbody:last-child tr:last-child > :last-child { border-bottom-right-radius: 14px; }
@media (min-width: 480px) {
  .cmpx-ctable { font-size: 14px; }
  .cmpx-ctable th, .cmpx-ctable td { padding: 10px 12px; }
}
@media (min-width: 640px) {
  .cmpx-ctable__prod { flex-direction: row; align-items: center; gap: 8px; font-size: 14px; }
}

/* Tarjeta: solo para objetos sueltos (alternativas, mínimos). Sin sombra. */
/* Columna flexible: el cuerpo (.cmpx-card__body) se estira y el precio queda
   abajo y alineado en toda la fila aunque los nombres ocupen 1 o 2 líneas. */
.cmpx-card { display: flex; flex-direction: column; gap: 10px; background: var(--x-surface); border: 1px solid var(--x-line); border-radius: 12px; padding: 12px; text-decoration: none; transition: border-color .15s ease; }
.cmpx-card:hover { border-color: var(--x-line-2); }
.cmpx-card .cmpx-pic { width: 100%; max-width: 100%; height: auto; aspect-ratio: 4 / 3; }
.cmpx-card .cmpx-pic img { width: 70%; height: 70%; }
.cmpx-card .cmpx-pname { font-size: 14.5px; }
.cmpx-card .cmpx-pcat { display: block; }
.cmpx-card__body { flex: 1 1 auto; }
.cmpx-card__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 8px; }
.cmpx-card .cmpx-price { font-size: 18px; }
.cmpx-end { height: 64px; }

/* --- Breakpoints ----------------------------------------------------------- */
@media (min-width: 640px) {
  .cmpx-intro { padding-block: 40px 36px; }
  .cmpx-lead { font-size: 16.5px; }
  .cmpx-row { grid-template-columns: 72px minmax(0, 1fr) auto; grid-template-areas: "pic name price" "pic meter meter" "pic shop cmp"; gap: 10px 16px; padding: 14px 18px; }
  .cmpx-row__price { text-align: right; }
  .cmpx-row .cmpx-pic { width: 72px; height: 72px; }
}

@media (min-width: 1024px) {
  .cmpx-intro { padding-block: 44px 36px; }
  .cmpx-intro__grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 56px; }
  .cmpx-block { padding-block: 48px 8px; }

  .cmpx-rows__head,
  .cmpx-row { grid-template-columns: 72px minmax(0, 1.6fr) 150px minmax(170px, 1.2fr) minmax(0, 1fr) 128px; grid-template-areas: none; gap: 20px; padding: 14px 18px; }
  .cmpx-rows__head { display: grid; padding-block: 10px; border-bottom: 1px solid var(--x-line); background: var(--x-paper); }
  .cmpx-row > * { grid-area: auto; }
  .cmpx-row__price { text-align: left; }
  .cmpx-row__cmp { justify-self: end; }
}

@media (prefers-reduced-motion: reduce) {
  .cmpx-chip, .cmpx-cmp, .cmpx-card { transition: none; }
}

/* ============================================================================
   Barra de comparar (base.html, #compare-bar.cmpx-bar)

   Vive fuera de .cmpx, por eso los tokens también se declaran en .cmpx-bar.
   La mecánica del desplegable de añadir (.cmp-addpop, .cmp-result) sigue en
   comparator.css; aquí van colores, tipografía y el resto de la barra.
   Móvil: barra fija abajo a todo el ancho. Desde 768px: panel flotante.
   ============================================================================ */
#compare-bar.cmpx-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; padding: 0; display: flex; justify-content: center; pointer-events: none; font-family: var(--x-font); color: var(--x-ink); }
#compare-bar.cmpx-bar[hidden] { display: none; }
.cmpx-bar .cmpbar__inner {
  pointer-events: auto; position: relative; display: flex; align-items: center; gap: 10px;
  width: 100%; max-width: none; background: var(--x-surface); color: var(--x-ink);
  border: 1px solid var(--x-line-2); border-width: 1px 0 0; border-radius: 14px 14px 0 0;
  box-shadow: 0 -6px 24px rgb(20 20 22 / .12);
  padding: 10px max(14px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px));
}
#compare-bar.cmpx-bar .cmpbar__left { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 auto; }
/* En móvil no caben «2 de 3» ni «Vaciar»: cada producto ya tiene su ×. */
#compare-bar.cmpx-bar .cmpbar__title, #compare-bar.cmpx-bar .cmpbar__clear { display: none; }
#compare-bar.cmpx-bar .cmpbar__title {  align-items: baseline; gap: 4px; font-size: 13.5px; font-weight: 400; color: var(--x-ink-2); white-space: nowrap; }
#compare-bar.cmpx-bar .cmpbar__count { display: inline; min-width: 0; height: auto; padding: 0; background: none; color: var(--x-ink); font-size: 16px; font-weight: 700; border-radius: 0; font-variant-numeric: tabular-nums; }
#compare-bar.cmpx-bar .cmpbar__list { display: flex; gap: 6px; min-width: 0; }
#compare-bar.cmpx-bar .cmpbar__item { display: flex; align-items: center; gap: 6px; max-width: 210px; margin: 0; padding: 3px; background: var(--x-paper); border: 1px solid var(--x-line); border-radius: 10px; }
#compare-bar.cmpx-bar .cmpbar__item-pic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 7px; background: var(--x-tray); overflow: hidden; flex: none; }
#compare-bar.cmpx-bar .cmpbar__item-pic img { width: 86%; height: 86%; object-fit: contain; mix-blend-mode: multiply; border: 0; border-radius: 0; background: none; }
#compare-bar.cmpx-bar .cmpbar__item-name { display: none; font-size: 13.5px; font-weight: 600; color: var(--x-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
#compare-bar.cmpx-bar .cmpbar__item-remove { display: grid; place-items: center; width: 26px; height: 26px; border: 0; background: none; color: var(--x-ink-3); border-radius: 6px; cursor: pointer; flex: none; }
#compare-bar.cmpx-bar .cmpbar__item-remove:hover { color: var(--x-ink); background: var(--x-tray); }
#compare-bar.cmpx-bar .cmpbar__add { display: grid; place-items: center; width: 42px; min-width: 42px; height: 42px; margin: 0; border: 1px dashed var(--x-line-2); border-radius: 10px; background: none; color: var(--x-ink-2); cursor: pointer; flex: none; }
#compare-bar.cmpx-bar .cmpbar__add:hover,
#compare-bar.cmpx-bar .cmpbar__add.is-open { border-style: solid; border-color: var(--x-ink); color: var(--x-ink); background: none; }
#compare-bar.cmpx-bar .cmpbar__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }
#compare-bar.cmpx-bar .cmpbar__hint { display: none; font-size: 13px; color: var(--x-ink-3); }
#compare-bar.cmpx-bar .cmpbar__clear { font: inherit; font-size: 13.5px; color: var(--x-ink-2); background: none; border: 0; padding: 6px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
#compare-bar.cmpx-bar .cmpbar__clear:hover { color: var(--x-ink); }
#compare-bar.cmpx-bar .cmpbar__btn { display: inline-flex; align-items: center; padding: 10px 16px; background: var(--x-accent); color: var(--x-accent-ink); border-radius: var(--x-r); font-size: 14.5px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: filter .15s ease; transform: none; box-shadow: none; }
#compare-bar.cmpx-bar .cmpbar__btn:hover { filter: brightness(1.08); transform: none; box-shadow: none; }
#compare-bar.cmpx-bar .cmpbar__btn[aria-disabled="true"] { opacity: .4; pointer-events: none; }
#compare-bar.cmpx-bar :focus-visible { outline: 2px solid var(--x-accent); outline-offset: 2px; }

/* Buscador para añadir un producto (popover sobre la barra) */
#compare-bar.cmpx-bar .cmp-addpop { font-family: var(--x-font); background: var(--x-surface); border: 1px solid var(--x-line); border-radius: 12px; box-shadow: 0 8px 24px rgb(20 20 22 / .14); }
#compare-bar.cmpx-bar .cmp-addpop__head { border-bottom-color: var(--x-line); }
#compare-bar.cmpx-bar .cmp-addpop__icon, #compare-bar.cmpx-bar .cmp-addpop__close { color: var(--x-ink-3); }
#compare-bar.cmpx-bar .cmp-addpop__close:hover { background: var(--x-tray); color: var(--x-ink); }
#compare-bar.cmpx-bar .cmp-addpop__input { font-family: var(--x-font); font-size: 15px; color: var(--x-ink); }
#compare-bar.cmpx-bar .cmp-addpop__input::placeholder { color: var(--x-ink-3); }
#compare-bar.cmpx-bar .cmp-addpop__results { scrollbar-color: var(--x-line-2) transparent; }
#compare-bar.cmpx-bar .cmp-result { font-family: var(--x-font); color: var(--x-ink); border-radius: 8px; padding: 8px; }
#compare-bar.cmpx-bar .cmp-result:hover, #compare-bar.cmpx-bar .cmp-result.is-active { background: var(--x-paper); }
#compare-bar.cmpx-bar .cmp-result__img { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border-radius: 8px; background: var(--x-tray); overflow: hidden; flex: none; }
#compare-bar.cmpx-bar .cmp-result__img img { width: 86%; height: 86%; object-fit: contain; mix-blend-mode: multiply; }
#compare-bar.cmpx-bar .cmp-result__name { font-size: 14.5px; font-weight: 600; }
#compare-bar.cmpx-bar .cmp-result__cat, #compare-bar.cmpx-bar .cmp-result__added, #compare-bar.cmpx-bar .cmp-addpop__empty, #compare-bar.cmpx-bar .cmp-addpop__hint { color: var(--x-ink-3); font-family: var(--x-font); }
#compare-bar.cmpx-bar .cmp-result__price { font-family: var(--x-font); font-variant-numeric: tabular-nums; font-weight: 650; color: var(--x-ink); }
#compare-bar.cmpx-bar .cmp-addpop__hint { border-top-color: var(--x-line); }

@media (min-width: 480px) {
  #compare-bar.cmpx-bar .cmpbar__title { display: inline-flex; }
  #compare-bar.cmpx-bar .cmpbar__clear { display: inline; }
}
@media (min-width: 640px) {
  #compare-bar.cmpx-bar .cmpbar__hint { display: inline; }
}

@media (min-width: 768px) {
  #compare-bar.cmpx-bar { bottom: 16px; padding: 0 16px; }
  .cmpx-bar .cmpbar__inner { width: auto; max-width: min(100%, 980px); gap: 16px; border-width: 1px; border-radius: 14px; box-shadow: 0 10px 30px rgb(20 20 22 / .16); padding: 10px 10px 10px 16px; }
  #compare-bar.cmpx-bar .cmpbar__item { padding: 3px 3px 3px 3px; }
  #compare-bar.cmpx-bar .cmpbar__item-name { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  #compare-bar.cmpx-bar .cmpbar__btn { transition: none; }
}

/* ===== css/training/portada.css ===== */
/* ============================================================================
   PORTADA DE FORMACIÓN — sistema «mostrador técnico» (29-10-2026)
   ----------------------------------------------------------------------------
   Va detrás de css/comparator/cmpx.css (paquete "training-index").
   Los módulos son una lista numerada, no tarjetas con imagen: número, nombre,
   una frase, lecciones / minutos / tests y, con sesión, tu progreso.
   La newsletter (includes/newsletter.html) se reestiliza aquí bajo .tri; la
   home la sigue pintando con components.css hasta que migre.
   Móvil primero; 768 en min-width.
   ============================================================================ */

.tri { padding-bottom: 32px; }

/* ── Lista de módulos ───────────────────────────────────────────────────── */
.tri-list {
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--x-surface);
  border: 1px solid var(--x-line);
  border-radius: 14px;
  overflow: hidden;
}

.tri-row {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  grid-template-areas:
    "n main arrow"
    "n progress progress";
  align-items: start;
  gap: 12px 12px;
  padding: 18px 16px;
  transition: background-color 150ms ease;
}
.tri-row + .tri-row { border-top: 1px solid var(--x-line); }
.tri-row:hover { background: var(--x-paper); }
.tri-row:has(.tri-row__title:focus-visible) { outline: 2px solid var(--x-accent); outline-offset: -2px; }

.tri-row__n { grid-area: n; padding-top: 3px; font-stretch: 104%; font-size: 17px; font-weight: 650; color: var(--x-ink-3); }
.tri-row__main { grid-area: main; min-width: 0; }

.tri-row__title {
  font-stretch: 104%;
  font-size: 20px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -.012em;
  color: var(--x-ink);
  text-decoration: none;
}
/* Toda la fila es pulsable. */
.tri-row__title::after { content: ""; position: absolute; inset: 0; }
.tri-row__title:hover { text-decoration: underline; text-underline-offset: 3px; }
.tri-row__title:focus-visible { outline: none; }

.tri-row__desc { margin-top: 6px; max-width: 64ch; font-size: 15px; line-height: 1.5; color: var(--x-ink-2); }
.tri-row__meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: 13.5px; color: var(--x-ink-3); }

.tri-row__progress { grid-area: progress; display: grid; gap: 6px; font-size: 13px; color: var(--x-ink-2); }
.tri-bar { display: block; height: 4px; border-radius: 2px; background: var(--x-line); overflow: hidden; }
.tri-bar i { display: block; height: 100%; background: var(--x-ink); }

.tri-row__arrow { grid-area: arrow; width: 20px; height: 20px; margin-top: 2px; color: var(--x-ink-3); }

/* ── Newsletter (estilo nuevo solo en esta página) ──────────────────────── */
.tri-news .newsletter {
  display: grid;
  gap: 18px;
  padding: 24px 20px;
  background: var(--x-surface);
  border: 1px solid var(--x-line);
  border-radius: 14px;
  box-shadow: none;
}
.tri-news .newsletter__title { margin: 0; font-family: var(--x-font); font-stretch: 104%; font-size: clamp(21px, 2.4vw, 25px); font-weight: 650; line-height: 1.2; color: var(--x-ink); }
.tri-news .newsletter__lead { margin-top: 6px; max-width: 56ch; font-size: 15px; color: var(--x-ink-2); }
.tri-news .newsletter__form { margin: 0; display: grid; gap: 12px; }
.tri-news .newsletter__row { display: grid; gap: 8px; }
.tri-news .newsletter .input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--x-line-2);
  border-radius: var(--x-r);
  background: var(--x-surface);
  font: inherit;
  font-size: 15.5px;
  color: var(--x-ink);
}
.tri-news .newsletter .input:focus { outline: none; border-color: var(--x-ink); box-shadow: 0 0 0 3px var(--x-accent-soft); }
.tri-news .newsletter .btn {
  padding: 10px 16px;
  border: 0;
  border-radius: var(--x-r);
  background: var(--x-accent);
  color: var(--x-accent-ink);
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  box-shadow: none;
  cursor: pointer;
}
.tri-news .newsletter .btn:hover { filter: brightness(1.08); transform: none; }
.tri-news .newsletter__consent .checkbox { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; line-height: 1.45; color: var(--x-ink-2); }
.tri-news .newsletter__consent input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--x-accent); flex: none; }
.tri-news .newsletter__consent a { color: var(--x-ink); text-underline-offset: 2px; }
.tri-news .newsletter__msg { font-size: 14px; font-weight: 600; color: var(--x-ink); }

/* ── Breakpoints ────────────────────────────────────────────────────────── */
@media (min-width: 768px) {
  .tri-row {
    grid-template-columns: 56px minmax(0, 1fr) 180px 24px;
    grid-template-areas: "n main progress arrow";
    align-items: center;
    gap: 24px;
    padding: 22px 24px;
  }
  /* Sin sesión no hay columna de progreso. */
  .tri-row:not(:has(.tri-row__progress)) { grid-template-columns: 56px minmax(0, 1fr) 24px; grid-template-areas: "n main arrow"; }
  .tri-row__n { align-self: start; padding-top: 2px; font-size: 20px; }
  .tri-row__arrow { margin-top: 0; }

  .tri-news .newsletter { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: 32px; padding: 28px; }
  .tri-news .newsletter__row { grid-template-columns: minmax(0, 1fr) auto; }
}

@media (prefers-reduced-motion: reduce) {
  .tri-row { transition: none; }
}

/* ===== css/core/home.css ===== */
/* ============================================================================
   HOME — sistema «mostrador técnico» (29-10-2026)
   ----------------------------------------------------------------------------
   Paquete "home": comparator/cmpx.css (entrada, filas, tarjetas, chips,
   medidor, franja de campaña) + training/portada.css (lista de módulos y
   newsletter) + esta hoja, que solo trae lo propio de la home.

   Orden: entrada con bajadas reales a la derecha → formación → comparador →
   blog → foro y recursos → newsletter. Cada bloque enseña datos de verdad.
   Móvil primero; 640, 1024 en min-width. Sin animaciones de entrada.
   ============================================================================ */

.hm { padding-bottom: 24px; }

/* ── Entrada ────────────────────────────────────────────────────────────── */
.hm-intro { padding-block: 36px 40px; }
.hm-title {
  font-stretch: 104%;
  font-weight: 650;
  font-size: clamp(32px, 4.4vw, 50px);
  line-height: 1.06;
  letter-spacing: -.028em;
  max-width: 18ch;
  text-wrap: balance;
}
.cmpx .hm-lead { font-size: 17px; max-width: 54ch; margin: 16px 0 24px; }
.hm-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hm-intro .cmpx-facts { margin-top: 24px; }

/* Bajadas reales con el medidor (columna derecha). */
.hm-deals { background: var(--x-surface); border: 1px solid var(--x-line); border-radius: 14px; overflow: hidden; }
.hm-deals__head { padding: 18px 18px 12px; }
.hm-deals__head h2 { margin-top: 6px; font-stretch: 104%; font-weight: 650; font-size: 18px; line-height: 1.25; }
.hm-deals__list { margin: 0; padding: 0; list-style: none; }
.hm-deal {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  grid-template-areas: "pic name price" "pic meter meter";
  gap: 6px 12px;
  align-items: center;
  padding: 12px 18px;
  border-top: 1px solid var(--x-line);
  transition: background-color 150ms ease;
}
.hm-deal:hover { background: var(--x-paper); }
.hm-deal .cmpx-pic { grid-area: pic; width: 52px; height: 52px; align-self: start; }
.hm-deal__name { grid-area: name; min-width: 0; }
.hm-deal__name .cmpx-pname { font-size: 14.5px; }
/* Toda la fila es pulsable. */
.hm-deal__name .cmpx-pname::after { content: ""; position: absolute; inset: 0; }
.hm-deal__price { grid-area: price; text-align: right; line-height: 1.2; }
.hm-deal__price b { display: block; font-stretch: 104%; font-weight: 700; font-size: 16.5px; }
.hm-deal__price .cmpx-drop { margin: 3px 0 0; }
.hm-deal__meter { grid-area: meter; min-width: 0; }
.hm-deals__foot {
  display: grid; gap: 8px;
  padding: 12px 18px 16px;
  border-top: 1px solid var(--x-line);
  background: var(--x-paper);
}
.hm-deals__foot p { font-size: 12.5px; line-height: 1.45; color: var(--x-ink-3); }

.hm-link { font-size: 14.5px; font-weight: 600; color: var(--x-ink); text-decoration: underline; text-decoration-color: var(--x-line-2); text-underline-offset: 3px; white-space: nowrap; }
.hm-link:hover { text-decoration-color: currentColor; }

/* ── Secciones ──────────────────────────────────────────────────────────── */
.hm-sec { border-top: 1px solid var(--x-line); padding-block: 44px 8px; }
.hm-sec .cmpx-head { align-items: end; }
.cmpx .hm-sub { margin: 32px 0 12px; font-stretch: 104%; font-size: 18px; font-weight: 650; }
.hm-cats { margin-top: 4px; max-width: none; }

/* Comparador: tarjetas de equipos en su mínimo. */
.hm-mins { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hm-low { font-size: 12.5px; font-weight: 600; color: var(--x-low); }

/* Blog: destacado + lista. */
.hm-blog { display: grid; gap: 24px; }
.hm-lead { display: grid; gap: 14px; color: var(--x-ink); text-decoration: none; }
.hm-lead__img { display: block; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--x-tray); }
.hm-lead__img img { width: 100%; height: 100%; object-fit: cover; }
.hm-lead__body { display: grid; gap: 8px; }
.hm-lead__title { font-stretch: 104%; font-weight: 650; font-size: clamp(21px, 2.4vw, 26px); line-height: 1.18; letter-spacing: -.016em; }
.hm-lead:hover .hm-lead__title { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.hm-lead__excerpt { font-size: 15.5px; line-height: 1.55; color: var(--x-ink-2); max-width: 60ch; }
.hm-meta { font-size: 13px; color: var(--x-ink-3); }

.hm-posts { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--x-line); }
.hm-posts li { border-bottom: 1px solid var(--x-line); }
.hm-post { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 16px; align-items: center; padding: 16px 0; color: var(--x-ink); text-decoration: none; }
.hm-post__body { display: grid; gap: 5px; min-width: 0; }
.hm-post__title { font-size: 16.5px; font-weight: 650; line-height: 1.3; }
.hm-post:hover .hm-post__title { text-decoration: underline; text-underline-offset: 3px; }
.hm-post__img { display: block; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background: var(--x-tray); }
.hm-post__img img { width: 100%; height: 100%; object-fit: cover; }

/* Foro y recursos: dos columnas de filas. */
.hm-split { display: grid; gap: 40px; }
.hm-split > div { min-width: 0; }
.hm-rows { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--x-line); }
.hm-rows li { border-bottom: 1px solid var(--x-line); }
.hm-rows a { display: grid; gap: 4px; padding: 14px 0; color: var(--x-ink); text-decoration: none; }
.hm-rows a.hm-rows--pic { grid-template-columns: 52px minmax(0, 1fr); gap: 14px; align-items: center; }
.hm-rows__pic { width: 52px; height: 52px; }
.hm-rows__pic img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: normal; }
.hm-rows__text { display: grid; gap: 3px; min-width: 0; }
.hm-rows__title { font-size: 16px; font-weight: 650; line-height: 1.3; }
.hm-rows a:hover .hm-rows__title { text-decoration: underline; text-underline-offset: 3px; }
.hm-rows__meta { font-size: 13px; color: var(--x-ink-3); }
.hm-solved { color: var(--x-ink); font-weight: 700; }
.hm-more { display: inline-block; margin-top: 14px; }

.hm-news { border-top: 1px solid var(--x-line); padding-block: 44px 24px; }

/* ── Breakpoints ────────────────────────────────────────────────────────── */
@media (min-width: 640px) {
  .hm-mins { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .hm-post { grid-template-columns: minmax(0, 1fr) 128px; }
}

@media (min-width: 1024px) {
  .hm-intro { padding-block: 56px 56px; }
  .hm-intro .cmpx-intro__grid { grid-template-columns: minmax(0, 1fr) 420px; gap: 64px; align-items: start; }
  .hm-intro .cmpx-intro__main { padding-top: 20px; }
  .hm-blog { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; align-items: start; }
  .hm-posts { border-top: 0; }
  .hm-posts li:first-child .hm-post { padding-top: 0; }
  .hm-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; }
  /* Una sola columna: mismo ancho de página, contenido a la izquierda. */
  .hm-split--single { grid-template-columns: minmax(0, 1fr); }
  .hm-split--single > div { max-width: 720px; }
}

@media (prefers-reduced-motion: reduce) {
  .hm-deal { transition: none; }
}
