/* 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['training-lesson'] */

/* ===== 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/lesson.css ===== */
/* ============================================================================
   LECCIÓN DE FORMACIÓN — sistema «mostrador técnico» (29-10-2026)
   ----------------------------------------------------------------------------
   Va detrás de css/comparator/cmpx.css (paquete "training-lesson"), del que
   toma la ruta, la línea de datos, los rótulos, los botones y .cmpx-h2.

   Columnas:
     < 1024   una columna; barra del módulo fija bajo la cabecera que abre el
              índice en un cajón; «En esta lección» plegable sobre el texto.
     ≥ 1024   índice del módulo a la izquierda + texto.
     ≥ 1280   + «En esta lección» a la derecha.
   El texto se queda en ~70 caracteres por línea en todos los tamaños.

   El contenido viene del editor (CKEditor) con estas piezas, todas cubiertas
   aquí: h2/h3/h4, p, ul/ol, figure.article-media (+ tamaños aricle-media-img-*
   y article-media-img-*), figcaption, .article-media-point (recuadro),
   .article-media-formula (MathJax), table.
   ============================================================================ */

.tr { padding-bottom: 64px; }

/* Anclas: que el título no quede bajo la cabecera fija (ni bajo la barra del
   módulo en móvil). */
.tr-prose h2,
.tr-sec { scroll-margin-top: calc(var(--header-h, 68px) + 64px); }

/* ── Barra del módulo (móvil y tableta) ─────────────────────────────────── */
.tr-bar {
  position: sticky;
  top: var(--header-h, 68px);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px));
  background: var(--x-surface);
  border-bottom: 1px solid var(--x-line);
}
.tr-bar__btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px 7px 10px;
  border: 1px solid var(--x-line-2); border-radius: var(--x-r);
  background: var(--x-surface); color: var(--x-ink);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: border-color 150ms ease;
}
.tr-bar__btn:hover { border-color: var(--x-ink); }
.tr-bar__btn svg { width: 18px; height: 18px; }
.tr-bar__pos { font-size: 13.5px; color: var(--x-ink-2); white-space: nowrap; }

/* ── Cajón del índice (móvil y tableta) ─────────────────────────────────── */
/* main.js pone .is-open y bloquea el scroll del fondo. */
.tr-drawer { position: fixed; inset: 0; z-index: var(--z-drawer, 500); display: none; background: rgb(15 15 17 / .45); }
.tr-drawer.is-open { display: block; }
.tr-drawer__panel {
  position: absolute; inset-block: 0; inset-inline-start: 0;
  display: flex; flex-direction: column;
  width: 88%; max-width: 360px;
  background: var(--x-surface); border-inline-end: 1px solid var(--x-line);
  overflow-y: auto; overscroll-behavior: contain;
}
.tr-drawer__head {
  position: sticky; top: 0; z-index: 1;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: var(--header-h, 68px); padding: 12px 16px;
  background: var(--x-surface); border-bottom: 1px solid var(--x-line);
}
.tr-drawer__title { font-stretch: 104%; font-size: 17px; font-weight: 650; }
.tr-drawer__close {
  display: grid; place-items: center; flex: none; width: 40px; height: 40px; padding: 0;
  border: 1px solid var(--x-line-2); border-radius: var(--x-r); background: none; color: var(--x-ink); cursor: pointer;
}
.tr-drawer__close:hover { border-color: var(--x-ink); }
.tr-drawer__close svg { width: 20px; height: 20px; }
.tr-drawer .tr-idx { padding: 12px 8px 24px; }

/* ── Estructura ─────────────────────────────────────────────────────────── */
.tr-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
.tr-side, .tr-toc { display: none; }
.tr-main { min-width: 0; max-width: 720px; }

/* ── Cabecera de la lección ─────────────────────────────────────────────── */
.tr-head { padding: 24px 0 20px; border-bottom: 1px solid var(--x-line); margin-bottom: 28px; }
.tr-head h1 {
  margin-top: 14px;
  max-width: 24ch;
  font-stretch: 104%;
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -.022em;
}
.tr-head .cmpx-facts { margin-top: 14px; }

/* ── «En esta lección» plegable (< 1280) ────────────────────────────────── */
.tr-toc-inline { margin: -8px 0 28px; border: 1px solid var(--x-line); border-radius: 12px; background: var(--x-surface); }
.tr-toc-inline summary { padding: 12px 16px; font-size: 14.5px; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.tr-toc-inline summary::-webkit-details-marker { display: none; }
.tr-toc-inline summary::after { content: "+"; color: var(--x-ink-3); font-weight: 400; }
.tr-toc-inline[open] summary::after { content: "–"; }
.tr-toc-inline ol { margin: 0; padding: 4px 16px 14px 36px; display: grid; gap: 6px; font-size: 14.5px; color: var(--x-ink-2); }
.tr-toc-inline a { color: var(--x-ink); text-decoration: none; }
.tr-toc-inline a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ============================================================================
   TEXTO DE LA LECCIÓN
   ============================================================================ */
.tr-prose {
  font-size: 17px;
  line-height: 1.7;
  color: var(--x-ink);
  overflow-wrap: break-word;
}
.tr-prose > * + * { margin-top: 1.05em; }
.tr-prose p { color: var(--x-ink); }
.tr-prose b, .tr-prose strong { font-weight: 650; }

.tr-prose h2 {
  margin-top: 2em;
  font-stretch: 104%;
  font-size: clamp(23px, 2.4vw, 27px);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -.016em;
}
.tr-prose h3 { margin-top: 1.6em; font-stretch: 104%; font-size: 19.5px; font-weight: 650; line-height: 1.3; letter-spacing: -.01em; }
.tr-prose h4 { margin-top: 1.3em; font-size: 17px; font-weight: 650; line-height: 1.35; }
.tr-prose h2 + *, .tr-prose h3 + *, .tr-prose h4 + * { margin-top: .55em; }
.tr-prose > :first-child { margin-top: 0; }

/* Enlaces dentro del texto: subrayados en tinta. El morado se reserva para
   acciones; en el texto habría decenas por página. */
.tr-prose a {
  color: var(--x-ink);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--x-line-2);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
.tr-prose a:hover { text-decoration-color: currentColor; }

/* Listas: marcador en gris, no de color. */
.tr-prose ul, .tr-prose ol { padding-left: 1.3em; }
.tr-prose li + li { margin-top: .4em; }
.tr-prose li::marker { color: var(--x-ink-3); }
.tr-prose ul li::marker { font-size: .9em; }

/* ── Figuras ──────────────────────────────────────────────────────────── */
/* Las imágenes traen el fondo blanco cocido (ver imagenes-formacion en la
   guía): se presentan como lámina clara con borde fino, también en oscuro. */
.tr-prose .article-media { margin-inline: auto; text-align: center; }
.tr-prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin-inline: auto;
  border: 1px solid var(--x-line);
  border-radius: 10px;
  background: #fff;
}
.tr-prose .article-media img { width: 100%; }
.tr-prose figcaption {
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--x-ink-3);
  text-wrap: balance;
}

/* Tres tamaños, puestos en la <img> (aricle- sin «t» es el nombre que llevan
   las imágenes publicadas; article- el bien escrito): la figura toma el ancho
   y la imagen la llena. Móvil: min 80 %, med y max 100 %. */
.tr-prose .article-media:has(> :is(.aricle-media-img-min, .article-media-img-min)) { width: 80%; }
.tr-prose .article-media:has(> :is(.aricle-media-img-med, .article-media-img-med)),
.tr-prose .article-media:has(> :is(.aricle-media-img-max, .article-media-img-max)) { width: 100%; }

/* ── Vídeo de YouTube ──────────────────────────────────────────────────── */
/* Bajo la cabecera o donde el autor puso [video]. Miniatura con un botón de
   play hasta que se pulsa; luego el iframe ocupa el mismo hueco 16:9. */
.tr-video { margin: 0 0 28px; }
.tr-prose .tr-video { margin-bottom: 0; }
.tr-video__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--x-line);
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}
.tr-video__btn {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  width: 100%; padding: 0; border: 0;
  background: none; cursor: pointer;
}
/* Gana a .tr-prose img (borde y fondo blanco de las láminas). */
.tr-video .tr-video__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; max-width: none;
  margin: 0; border: 0; border-radius: 0;
  object-fit: cover;
  background: #000;
}
.tr-video__play {
  position: relative;
  display: grid; place-items: center;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--x-accent); color: var(--x-accent-ink);
  transition: filter 150ms ease;
}
.tr-video__play svg { width: 28px; height: 28px; margin-left: 3px; }
.tr-video__btn:hover .tr-video__play { filter: brightness(.88); }
.tr-video__btn:focus-visible { outline-offset: -4px; }
.tr-video__iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tr-video figcaption { margin-top: 8px; font-size: 13.5px; line-height: 1.45; color: var(--x-ink-3); text-align: left; }
.tr-video figcaption a { color: inherit; text-underline-offset: 3px; }
.tr-video figcaption a:hover { color: var(--x-ink); }

/* ── Recuadro destacado ─────────────────────────────────────────────────── */
.tr-prose .article-media-point {
  padding: 16px 18px;
  border: 1px solid var(--x-line);
  border-left: 3px solid var(--x-ink);
  border-radius: 0 10px 10px 0;
  background: var(--x-surface);
}
.tr-prose .article-media-point > * + * { margin-top: .7em; }
.tr-prose .article-media-point > :first-child { margin-top: 0; }
.tr-prose .article-media-point h4 { font-size: 16.5px; }

/* ── Fórmulas (MathJax) ─────────────────────────────────────────────────── */
.tr-prose .article-media-formula {
  padding: 14px 16px;
  border: 1px solid var(--x-line);
  border-radius: 10px;
  background: var(--x-surface);
  text-align: center;
  font-size: 18px;
  overflow-x: auto;
}
.tr-prose mjx-container { color: var(--x-ink); }

/* ── Tablas: como las del comparador ────────────────────────────────────── */
.tr-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}
.tr-prose th, .tr-prose td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--x-line); }
.tr-prose th,
.tr-prose thead td {
  font-stretch: 78%;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--x-ink-3);
  border-bottom-color: var(--x-line-2);
}
.tr-prose code { font-size: .92em; padding: 1px 5px; border-radius: 4px; background: var(--x-tray); color: var(--x-ink); }
[data-theme="dark"] .tr-prose code { background: var(--x-line-2); }

/* ============================================================================
   DESPUÉS DEL TEXTO
   ============================================================================ */

/* Siguiente lección: lo primero al acabar de leer. */
.tr-next { margin-top: 48px; display: grid; gap: 10px; }
.tr-next__go {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "label arrow" "title arrow";
  align-items: center;
  gap: 4px 16px;
  padding: 18px 20px;
  border: 1px solid var(--x-ink);
  border-radius: 12px;
  background: var(--x-surface);
  color: var(--x-ink);
  text-decoration: none;
  transition: background-color 150ms ease;
}
.tr-next__go:hover { background: var(--x-paper); }
.tr-next__go .cmpx-label { grid-area: label; }
.tr-next__title { grid-area: title; font-stretch: 104%; font-size: 19px; font-weight: 650; line-height: 1.25; }
.tr-next__go svg { grid-area: arrow; width: 22px; height: 22px; }
.tr-next__prev { justify-self: start; font-size: 14px; color: var(--x-ink-2); text-decoration: none; }
.tr-next__prev:hover { color: var(--x-ink); text-decoration: underline; text-underline-offset: 3px; }

.tr-sec { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--x-line); }
.tr-sec .cmpx-h2 { margin-bottom: 6px; }
.tr-sec .cmpx-head { margin-bottom: 12px; }
.tr-sec__lead { margin-bottom: 14px; font-size: 14.5px; color: var(--x-ink-2); max-width: 62ch; }
.tr-sec__note { margin-top: 12px; font-size: 14px; color: var(--x-ink-2); }
.tr-sec__note a { color: var(--x-ink); text-underline-offset: 3px; }
.tr-sec > .cmpx-btn { margin-top: 14px; }
.tr-link { font-size: 14.5px; font-weight: 600; color: var(--x-ink); text-underline-offset: 3px; }

/* Preguntas frecuentes: filas plegables separadas por línea. */
.tr-faqs { border-top: 1px solid var(--x-line); margin-top: 14px; }
.tr-faq { border-bottom: 1px solid var(--x-line); }
.tr-faq summary {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 14px 0;
  font-size: 16px; font-weight: 600; line-height: 1.4;
  cursor: pointer; list-style: none;
}
.tr-faq summary::-webkit-details-marker { display: none; }
.tr-faq summary::after { content: "+"; flex: none; color: var(--x-ink-3); font-weight: 400; }
.tr-faq[open] summary::after { content: "–"; }
.tr-faq p { padding: 0 0 16px; font-size: 15.5px; line-height: 1.65; color: var(--x-ink-2); max-width: 66ch; }

/* Equipo relacionado y recursos: filas como en el comparador. */
.tr-gear { margin: 0; padding: 0; list-style: none; border: 1px solid var(--x-line); border-radius: 12px; background: var(--x-surface); overflow: hidden; }
.tr-gear li + li { border-top: 1px solid var(--x-line); }
.tr-gear__row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  color: var(--x-ink); text-decoration: none;
  transition: background-color 150ms ease;
}
.tr-gear__row:hover { background: var(--x-paper); }
.tr-gear__pics { display: flex; gap: 4px; flex: none; }
.tr-gear__pics .cmpx-pic { width: 52px; height: 52px; }
.tr-gear__text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.tr-gear__name { font-size: 15.5px; font-weight: 650; line-height: 1.3; }
.tr-gear__meta { font-size: 13.5px; color: var(--x-ink-3); }
.tr-gear__arrow { flex: none; width: 18px; height: 18px; color: var(--x-ink-3); }

/* Dudas: lista de hilos del foro. */
.tr-list { margin: 0 0 4px; padding: 0; list-style: none; border-top: 1px solid var(--x-line); }
.tr-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--x-line); }
.tr-list a { font-weight: 600; color: var(--x-ink); text-decoration: none; min-width: 0; }
.tr-list a:hover { text-decoration: underline; text-underline-offset: 3px; }
.tr-list span { flex: none; font-size: 13.5px; color: var(--x-ink-3); }

/* Fuente preferida: una línea discreta. */
.tr-pref {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px;
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--x-line);
}
.tr-pref p { flex: 1 1 280px; font-size: 14px; color: var(--x-ink-2); }

/* ============================================================================
   ÍNDICE DEL MÓDULO (columna izquierda y cajón)
   ============================================================================ */
.tr-side__area { display: block; margin: 0 8px 10px; font-stretch: 104%; font-size: 16px; font-weight: 650; color: var(--x-ink); text-decoration: none; }
.tr-side__area:hover { text-decoration: underline; text-underline-offset: 3px; }

.tr-idx__progress { display: flex; justify-content: space-between; gap: 8px; margin: 0 8px; font-size: 13px; color: var(--x-ink-2); }
.tr-idx__progress a { color: var(--x-ink); font-weight: 600; text-underline-offset: 3px; }
.tr-idx__bar { height: 3px; margin: 8px 8px 0; border-radius: 2px; background: var(--x-line); overflow: hidden; }
.tr-idx__bar i { display: block; height: 100%; background: var(--x-ink); }

.tr-idx__list { margin: 12px 0 0; padding: 0; list-style: none; }
.tr-idx__list ol { margin: 0; padding: 0 0 4px 14px; list-style: none; }
.tr-idx__sec { margin: 18px 8px 0; }

.tr-idx__row,
.tr-idx__group summary {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 14.5px; line-height: 1.3;
  color: var(--x-ink-2); text-decoration: none;
  transition: background-color 150ms ease;
}
.tr-idx__row:hover,
.tr-idx__group summary:hover { background: var(--x-paper); color: var(--x-ink); }
.tr-idx__row.is-current { color: var(--x-ink); font-weight: 650; background: var(--x-paper); }
.tr-idx__row.is-current::before { content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 2px; border-radius: 2px; background: var(--x-ink); }
.tr-idx__name { min-width: 0; flex: 1; }
.tr-idx__ic { flex: none; width: 14px; height: 14px; color: var(--x-ink-3); }

/* Estado: círculo vacío pendiente, lleno con ✓ hecho. */
.tr-idx__dot { flex: none; width: 14px; height: 14px; border: 1.5px solid var(--x-line-2); border-radius: 50%; }
.tr-idx__dot.is-done { border-color: var(--x-ink); background: var(--x-ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 9px no-repeat; }
[data-theme="dark"] .tr-idx__dot.is-done { background-image: 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.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }

.tr-idx__group summary { cursor: pointer; list-style: none; }
.tr-idx__group summary::-webkit-details-marker { display: none; }
.tr-idx__group summary::after { content: "+"; color: var(--x-ink-3); }
.tr-idx__group[open] summary::after { content: "–"; }
.tr-idx__n { font-size: 12.5px; color: var(--x-ink-3); }

/* ============================================================================
   «EN ESTA LECCIÓN» (columna derecha, ≥ 1280)
   ============================================================================ */
.tr-toc ol { margin: 10px 0 0; padding: 0; list-style: none; border-left: 1px solid var(--x-line); }
.tr-toc a {
  display: block;
  margin-left: -1px;
  padding: 5px 0 5px 12px;
  border-left: 1px solid transparent;
  font-size: 13.5px; line-height: 1.35;
  color: var(--x-ink-2); text-decoration: none;
  transition: border-color 150ms ease;
}
.tr-toc a:hover { color: var(--x-ink); border-left-color: var(--x-ink); }

/* ============================================================================
   BREAKPOINTS
   ============================================================================ */
@media (min-width: 640px) {
  .tr-prose .article-media:has(> :is(.aricle-media-img-min, .article-media-img-min)) { width: 50%; }
  .tr-prose .article-media:has(> :is(.aricle-media-img-med, .article-media-img-med)) { width: 75%; }
}

@media (min-width: 1024px) {
  .tr-bar, .tr-drawer { display: none; }
  .tr-drawer.is-open { display: none; }
  .tr-prose h2, .tr-sec { scroll-margin-top: calc(var(--header-h, 68px) + 24px); }

  .tr-layout { grid-template-columns: 232px minmax(0, 1fr); gap: 48px; }
  .tr-side { display: block; }
  .tr-side__sticky {
    position: sticky;
    top: calc(var(--header-h, 68px) + 24px);
    max-height: calc(100vh - var(--header-h, 68px) - 48px);
    overflow-y: auto;
    padding: 28px 4px 24px 0;
    scrollbar-width: thin;
  }
  .tr-head { padding-top: 28px; }
}

@media (min-width: 1280px) {
  .tr-layout { grid-template-columns: 220px minmax(0, 1fr) 190px; gap: 40px; }
  .tr-toc { display: block; }
  .tr-toc__sticky { position: sticky; top: calc(var(--header-h, 68px) + 24px); padding-top: 32px; }
  .tr-toc-inline { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .tr-bar__btn, .tr-next__go, .tr-gear__row, .tr-idx__row, .tr-idx__group summary, .tr-toc a { transition: none; }
}
