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

/* ===== 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/users/ficha.css ===== */
/* ============================================================================
   FICHA DE PERFIL — sistema «mostrador técnico» (30-10-2026)
   ----------------------------------------------------------------------------
   Va detrás de css/comparator/cmpx.css (paquete "profile").
   Solo templates/users/profile.html y sus parciales. La edición del perfil y
   la lista de seguidores siguen con users/profile.css hasta que migren.

   Qué cambia respecto a la versión anterior:
   - Sin banda de color ni tarjeta con sombra en la cabecera.
   - Cada bloque es una lista de filas en una sola caja con borde, no una
     tarjeta con sombra dentro de otra.
   - Las medallas pasan de rejilla de 15 tarjetas a dos listas.
   - El morado queda para «Seguir» y el foco. Lo demás, tinta.
   Las clases profile-* y company-* que siguen aquí las usa el JS en línea de
   profile.html (modales, borrar filas): no renombrar.
   Móvil primero; 640, 768 y 1024 en min-width.
   ============================================================================ */

.pf { padding-bottom: 64px; }

/* ── Cabecera ───────────────────────────────────────────────────────────── */
.pf-intro { padding-block: 28px; }
.pf-id {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  grid-template-areas:
    "avatar main"
    "actions actions";
  gap: 16px 18px;
  align-items: start;
}
.pf-avatar {
  grid-area: avatar;
  inline-size: 72px;
  block-size: 72px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--x-tray);
  border: 1px solid var(--x-line);
  color: var(--x-ink);
  font-stretch: 104%;
  font-weight: 650;
  font-size: 24px;
}
.pf-avatar img { inline-size: 100%; block-size: 100%; object-fit: cover; }

.pf-id__main { grid-area: main; min-width: 0; }
.pf-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-stretch: 104%;
  font-size: clamp(24px, 3.2vw, 34px);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -.022em;
}
.pf-verified { display: inline-grid; color: var(--x-ink); }
.pf-verified svg { inline-size: .72em; block-size: .72em; }
.pf-verified--sm svg { inline-size: 14px; block-size: 14px; }

.pf-handle { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 6px; font-size: 14px; color: var(--x-ink-3); }
.pf-rank {
  display: inline-flex;
  padding: 2px 9px;
  border: 1px solid var(--x-line-2);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--x-ink);
  text-decoration: none;
}
a.pf-rank:hover { border-color: var(--x-ink); }
.pf-handle__ok::before { content: "✓ "; color: var(--x-low); }

.pf-headline { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 12px; font-size: 15.5px; color: var(--x-ink-2); }
.pf-headline__role { color: var(--x-ink); font-weight: 600; }
.pf-headline__place { display: inline-flex; align-items: center; gap: 5px; }
.pf-headline__place svg { inline-size: 15px; block-size: 15px; color: var(--x-ink-3); }
.pf-todo { color: var(--x-ink-2); text-underline-offset: 3px; }

.pf-bio { margin-top: 10px; max-width: 64ch; font-size: 15px; line-height: 1.6; color: var(--x-ink-2); }

.pf-facts { margin: 16px 0 0; padding: 0; list-style: none; }
.pf-facts a { text-decoration: none; }
.pf-facts a:hover { text-decoration: underline; text-underline-offset: 3px; }

.pf-actions { grid-area: actions; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.pf-actions__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-actions .js-share.is-copied { border-color: var(--x-ink); }

.pf-social { display: flex; gap: 4px; }
.pf-social__a {
  display: grid;
  place-items: center;
  inline-size: 36px;
  block-size: 36px;
  border-radius: var(--x-r);
  color: var(--x-ink-2);
  transition: background-color 150ms ease;
}
.pf-social__a:hover { color: var(--x-ink); background: var(--x-surface); }
.pf-social__a svg { inline-size: 17px; block-size: 17px; }

/* ── Columnas ───────────────────────────────────────────────────────────── */
.pf-layout { display: grid; gap: 40px; padding-top: 8px; }
.pf-main { min-width: 0; }
.pf-aside { min-width: 0; display: grid; gap: 32px; align-content: start; }

/* ── Pestañas ───────────────────────────────────────────────────────────── */
.pf-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--x-line);
  overflow-x: auto;
  scrollbar-width: none;
}
.pf-tabs::-webkit-scrollbar { display: none; }
.pf-tab {
  flex: none;
  padding: 14px 12px 12px;
  margin-bottom: -1px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--x-ink-3);
  cursor: pointer;
  transition: border-color 150ms ease;
}
.pf-tab:hover { color: var(--x-ink); }
.pf-tab[aria-selected="true"] { color: var(--x-ink); border-bottom-color: var(--x-ink); }
.pf-tab:focus-visible { outline-offset: -2px; }
.pf-panel[hidden] { display: none; }
.pf-panel { display: grid; gap: 36px; }

/* ── Bloques y filas ────────────────────────────────────────────────────── */
.pf-sec { min-width: 0; }
.pf-sec__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.pf-sec__title { font-stretch: 104%; font-size: 19px; font-weight: 650; line-height: 1.25; }
.pf-n { margin-left: 4px; font-size: 15px; font-weight: 500; color: var(--x-ink-3); }
.pf-note { font-size: 13px; color: var(--x-ink-3); }
.pf-btn-sm { padding: 7px 12px; font-size: 13.5px; }
.pf-sublabel { margin: 18px 0 8px; }
.pf-sublabel:first-of-type { margin-top: 4px; }

.pf-rows {
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--x-surface);
  border: 1px solid var(--x-line);
  border-radius: 14px;
  overflow: hidden;
}
.pf-row { padding: 14px 16px; min-width: 0; }
.pf-row + .pf-row { border-top: 1px solid var(--x-line); }

/* Fila con enlace (post, recurso, hilo, comentario) y acción opcional. */
.pf-item { display: flex; align-items: center; gap: 12px; padding: 0; transition: background-color 150ms ease; }
.pf-item:hover { background: var(--x-paper); }
.pf-item__link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 14px 16px; color: inherit; text-decoration: none; }
.pf-item__link:hover .pf-item__title { text-decoration: underline; text-underline-offset: 3px; }
.pf-item__link:focus-visible { outline-offset: -2px; }
.pf-item__link--inline { justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; }
.pf-item__body { min-width: 0; display: grid; gap: 3px; }
.pf-item__title { font-size: 15.5px; font-weight: 600; line-height: 1.35; color: var(--x-ink); }
.pf-item__excerpt { font-size: 14px; line-height: 1.5; color: var(--x-ink-2); }
.pf-item__excerpt--ink { color: var(--x-ink); }
.pf-kicker { font-size: 12.5px; font-weight: 600; color: var(--x-ink-3); }

.pf-thumb {
  flex: none;
  inline-size: 72px;
  block-size: 48px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--x-tray);
}
.pf-thumb img { inline-size: 100%; block-size: 100%; object-fit: cover; }

.pf-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 13px; color: var(--x-ink-3); }
.pf-draft { font-weight: 600; color: var(--x-high); }
.pf-best { font-weight: 600; color: var(--x-low); }

.pf-act {
  flex: none;
  margin-right: 12px;
  padding: 6px 10px;
  border: 1px solid var(--x-line-2);
  border-radius: 8px;
  background: var(--x-surface);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--x-ink);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 150ms ease;
}
.pf-act:hover { border-color: var(--x-ink); }
.pf-act--quiet { margin: 0; border-color: transparent; padding-inline: 0; color: var(--x-ink-3); background: none; }
.pf-act--quiet:hover { color: var(--x-ink); border-color: transparent; text-decoration: underline; text-underline-offset: 3px; }

/* Reseñas */
.pf-review { display: grid; gap: 6px; }
.pf-review__head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.pf-review__product { font-size: 15.5px; font-weight: 600; color: var(--x-ink); text-underline-offset: 3px; }
.pf-review__body { font-size: 15px; line-height: 1.55; color: var(--x-ink-2); }
.pf-review__del { justify-self: start; }
.pf-stars { display: inline-flex; gap: 1px; }
.pf-stars svg { inline-size: 14px; block-size: 14px; fill: var(--x-line-2); }
.pf-stars svg.is-on { fill: var(--x-star); }

/* Barras de progreso: tinta, como en formación. */
.pf-bar { display: block; block-size: 4px; border-radius: 2px; background: var(--x-line); overflow: hidden; }
.pf-bar i { display: block; block-size: 100%; background: var(--x-ink); }

/* Nivel */
.pf-level {
  display: grid;
  gap: 12px;
  padding: 18px 16px;
  background: var(--x-surface);
  border: 1px solid var(--x-line);
  border-radius: 14px;
}
.pf-level__name { margin-top: 4px; font-stretch: 104%; font-size: 22px; font-weight: 650; }
.pf-level__meta { margin-top: 4px; font-size: 14px; color: var(--x-ink-2); }

/* Módulos */
.pf-area { display: grid; gap: 8px; }
.pf-area__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.pf-area__name { font-size: 15.5px; font-weight: 600; color: var(--x-ink); text-decoration: none; }
.pf-area__name:hover { text-decoration: underline; text-underline-offset: 3px; }
.pf-area__pct { font-size: 14px; font-weight: 650; color: var(--x-ink); }

/* Medallas: dos listas, no rejilla de tarjetas. */
.pf-medals {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--x-surface);
  border: 1px solid var(--x-line);
  border-radius: 14px;
  overflow: hidden;
}
.pf-medal { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 12px 16px; border-top: 1px solid var(--x-line); }
.pf-medal:first-child { border-top: 0; }
.pf-medal__ic {
  display: grid;
  place-items: center;
  inline-size: 34px;
  block-size: 34px;
  border: 1px solid var(--x-line-2);
  border-radius: 50%;
  color: var(--x-ink-3);
}
.pf-medal.is-earned .pf-medal__ic { border-color: var(--x-ink); color: var(--x-ink); }
.pf-medal__ic svg { inline-size: 17px; block-size: 17px; }
.pf-medal__txt { display: grid; gap: 2px; min-width: 0; }
.pf-medal__txt b { font-size: 14.5px; font-weight: 650; color: var(--x-ink); }
.pf-medal__txt > span { font-size: 13.5px; line-height: 1.45; color: var(--x-ink-2); }
.pf-medal__prog { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; margin-top: 6px; font-size: 12.5px; color: var(--x-ink-3); }

/* Etiquetas seguidas */
.pf-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pf-tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--x-line-2);
  border-radius: 999px;
  background: var(--x-surface);
  font-size: 14px;
  transition: border-color 150ms ease;
}
.pf-tag:hover { border-color: var(--x-ink); }
.pf-tag a { padding: 6px 4px 6px 12px; text-decoration: none; }
.pf-tag a:only-child { padding-right: 12px; }
.pf-tag__x { display: grid; place-items: center; inline-size: 30px; block-size: 30px; padding: 0; border: 0; background: none; color: var(--x-ink-3); cursor: pointer; border-radius: 50%; }
.pf-tag__x:hover { color: var(--x-ink); }
.pf-tag__x svg { inline-size: 12px; block-size: 12px; }

/* Estado vacío */
.pf-empty { padding: 20px; border: 1px dashed var(--x-line-2); border-radius: 14px; }
.pf-empty p { max-width: 60ch; font-size: 15px; line-height: 1.55; color: var(--x-ink-2); }
.pf-empty__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 14px; }
.pf-empty__alt { font-size: 14px; color: var(--x-ink-2); text-underline-offset: 3px; }
.pf-quiet { color: var(--x-ink-2); }

.pf-pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 20px; font-size: 14px; color: var(--x-ink-2); }

/* ── Lateral: personas que seguir y alta ────────────────────────────────── */
.pf-person { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.pf-person__link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; text-decoration: none; }
.pf-person__link:hover .pf-person__name { text-decoration: underline; text-underline-offset: 3px; }
.pf-mini-avatar {
  flex: none;
  display: grid;
  place-items: center;
  inline-size: 40px;
  block-size: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--x-tray);
  font-size: 13px;
  font-weight: 650;
  color: var(--x-ink);
}
.pf-mini-avatar img { inline-size: 100%; block-size: 100%; object-fit: cover; }
.pf-person__txt { display: grid; min-width: 0; }
.pf-person__name { font-size: 14.5px; font-weight: 600; color: var(--x-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-person__at { font-size: 13px; color: var(--x-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pf-join { padding: 20px; background: var(--x-surface); border: 1px solid var(--x-line); border-radius: 14px; }
.pf-join__title { font-stretch: 104%; font-size: 18px; font-weight: 650; line-height: 1.25; }
.pf-join__txt { margin-top: 8px; font-size: 14.5px; line-height: 1.55; color: var(--x-ink-2); }
.pf-join__btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* ── Trayectoria (clases profile-* que usa el JS) ───────────────────────── */
.pf .profile-company-list,
.pf .profile-edu-list {
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--x-surface);
  border: 1px solid var(--x-line);
  border-radius: 14px;
  overflow: hidden;
}
.pf .profile-company-group,
.pf .profile-edu-item { padding: 16px; }
.pf .profile-company-group + .profile-company-group,
.pf .profile-edu-item + .profile-edu-item { border-top: 1px solid var(--x-line); }
.pf .profile-exp-row { display: flex; gap: 14px; }
/* Logos de empresa: casi todos con fondo blanco cocido, así que van en el
   pozo claro con multiply, igual que las fotos de producto. */
.pf .profile-company-logo {
  flex: none;
  display: grid;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--x-tray);
  color: var(--x-ink-3);
}
.pf .profile-company-logo img { inline-size: 100%; block-size: 100%; object-fit: contain; mix-blend-mode: multiply; }
.pf .profile-company-logo svg { inline-size: 20px; block-size: 20px; color: #6F7076; }
.pf .profile-exp-content { flex: 1; min-width: 0; }
.pf .profile-company-name { display: block; font-size: 15.5px; font-weight: 650; color: var(--x-ink); }
.pf .profile-roles-list { margin: 0; padding: 0; list-style: none; }
.pf .profile-roles-list--multi { display: grid; gap: 14px; margin-top: 10px; padding-left: 14px; border-left: 2px solid var(--x-line); }
.pf .profile-timeline-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.pf .profile-timeline-header > div:first-child { min-width: 0; }
.pf .profile-timeline-title { display: block; font-size: 15.5px; font-weight: 650; line-height: 1.35; color: var(--x-ink); }
.pf .profile-roles-list--multi .profile-timeline-title { font-size: 15px; font-weight: 600; }
.pf .profile-timeline-subtitle { display: block; margin-top: 1px; font-size: 14px; color: var(--x-ink-2); }
.pf .profile-timeline-dates { display: block; margin-top: 2px; font-size: 13px; color: var(--x-ink-3); font-variant-numeric: tabular-nums; }
.pf .profile-timeline-dates strong { font-weight: 600; color: var(--x-ink); }
.pf .profile-timeline-description { margin-top: 8px; max-width: 72ch; font-size: 14.5px; line-height: 1.6; color: var(--x-ink-2); }
.pf .profile-timeline-actions { flex: none; display: flex; gap: 4px; }
.pf .profile-timeline-btn-edit,
.pf .profile-timeline-btn-delete {
  display: grid;
  place-items: center;
  inline-size: 32px;
  block-size: 32px;
  padding: 0;
  border: 1px solid var(--x-line);
  border-radius: 8px;
  background: var(--x-surface);
  color: var(--x-ink-3);
  cursor: pointer;
  transition: border-color 150ms ease;
}
.pf .profile-timeline-btn-edit:hover { border-color: var(--x-ink); color: var(--x-ink); }
.pf .profile-timeline-btn-delete:hover { border-color: var(--x-high); color: var(--x-high); }
.pf .profile-timeline-btn-edit svg,
.pf .profile-timeline-btn-delete svg { inline-size: 14px; block-size: 14px; }

/* ── Modales de experiencia y formación ─────────────────────────────────── */
/* Fuera de .pf: el parcial se pinta después del contenedor. */
.profile-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgb(10 10 12 / .5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease;
  font-family: var(--x-font);
  color: var(--x-ink);
}
.profile-modal-overlay.is-open { opacity: 1; pointer-events: auto; }
.profile-modal {
  display: flex;
  flex-direction: column;
  inline-size: 100%;
  max-inline-size: 560px;
  max-block-size: 92dvh;
  background: var(--x-surface);
  border: 1px solid var(--x-line);
  border-radius: 14px 14px 0 0;
}
.profile-modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--x-line); flex: none; }
.profile-modal-title { margin: 0; font-family: var(--x-font); font-stretch: 104%; font-size: 19px; font-weight: 650; color: var(--x-ink); }
.profile-modal-close { display: grid; place-items: center; inline-size: 36px; block-size: 36px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--x-ink-3); cursor: pointer; }
.profile-modal-close:hover { color: var(--x-ink); background: var(--x-paper); }
.profile-modal-close:focus-visible,
.profile-modal-overlay :focus-visible { outline: 2px solid var(--x-accent); outline-offset: 2px; }
/* Cuerpo con scroll propio y barra de acciones fija: «Guardar» siempre a mano. */
.profile-modal-form { display: flex; flex-direction: column; gap: 16px; min-block-size: 0; overflow-y: auto; padding: 18px 20px 0; }
.profile-modal-row { display: grid; gap: 16px; }
.profile-modal-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: auto -20px 0;
  padding: 14px 20px 18px;
  background: var(--x-surface);
  border-top: 1px solid var(--x-line);
}
.profile-modal-error,
.company-creator-error {
  padding: 10px 12px;
  border: 1px solid var(--x-high);
  border-inline-start-width: 3px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--x-ink);
}
.profile-modal-error[hidden],
.company-creator-error[hidden] { display: none; }

.profile-form-field { display: grid; gap: 6px; min-width: 0; }
.profile-form-field > label { font-size: 14px; font-weight: 600; color: var(--x-ink); }
.req { color: var(--x-high); }
.profile-form-optional { font-weight: 400; color: var(--x-ink-3); }
.profile-form-field input[type="text"],
.profile-form-field textarea,
.profile-form-field select,
.mys-month,
.mys-year {
  inline-size: 100%;
  padding: 10px 12px;
  border: 1px solid var(--x-line-2);
  border-radius: var(--x-r);
  background: var(--x-surface);
  font: inherit;
  font-size: 16px;
  color: var(--x-ink);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.profile-form-field textarea { min-block-size: 96px; resize: vertical; line-height: 1.5; }
.profile-form-field input:focus,
.profile-form-field textarea:focus,
.mys-month:focus,
.mys-year:focus { outline: none; border-color: var(--x-ink); box-shadow: 0 0 0 3px var(--x-accent-soft); }

.month-year-select { display: flex; gap: 8px; }
.month-year-select .mys-month,
.month-year-select .mys-year {
  appearance: none;
  padding-right: 30px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236F7076' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 13px;
}
.month-year-select .mys-month { flex: 1 1 auto; min-width: 0; }
.month-year-select .mys-year { flex: 0 0 104px; }
.month-year-select option { background: var(--x-surface); color: var(--x-ink); }

/* Buscador de empresa / institución */
.company-search-wrap { position: relative; }
.company-search-field { display: flex; align-items: center; gap: 8px; }
.company-search-field input { flex: 1; min-width: 0; }
.company-selected-logo { flex: none; inline-size: 32px; block-size: 32px; border-radius: 8px; overflow: hidden; background: var(--x-tray); }
.company-selected-logo[hidden] { display: none; }
.company-selected-logo img { inline-size: 100%; block-size: 100%; object-fit: contain; mix-blend-mode: multiply; }
.company-new-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: stretch;
  padding: 0 12px;
  border: 1px solid var(--x-line-2);
  border-radius: var(--x-r);
  background: var(--x-surface);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--x-ink);
  cursor: pointer;
}
.company-new-btn:hover { border-color: var(--x-ink); }
.company-suggestions {
  position: absolute;
  z-index: 5;
  inset-inline: 0;
  top: calc(100% + 4px);
  max-block-size: 260px;
  overflow-y: auto;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: var(--x-surface);
  border: 1px solid var(--x-line-2);
  border-radius: var(--x-r);
}
.company-suggestions[hidden] { display: none; }
.company-suggestion-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 15px; color: var(--x-ink); cursor: pointer; }
.company-suggestion-item:hover { background: var(--x-paper); }
.company-suggestion-item--new { font-weight: 600; }
.company-suggestion-logo { flex: none; inline-size: 26px; block-size: 26px; border-radius: 6px; background: var(--x-tray); object-fit: contain; mix-blend-mode: multiply; }
.company-suggestion-logo--empty { display: inline-block; }
.company-suggestion-plus { flex: none; display: grid; place-items: center; inline-size: 26px; block-size: 26px; border: 1px dashed var(--x-line-2); border-radius: 6px; font-weight: 700; line-height: 1; }

/* Alta de empresa o centro: un paso dentro del formulario. */
.company-creator { display: grid; gap: 14px; margin-top: 10px; padding: 16px; background: var(--x-paper); border: 1px solid var(--x-line); border-radius: 12px; }
.company-creator[hidden] { display: none; }
.company-creator-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.company-creator-heading { display: grid; gap: 2px; min-width: 0; }
.company-creator-title { font-size: 15px; font-weight: 650; color: var(--x-ink); }
.company-creator-hint { font-size: 13px; line-height: 1.45; color: var(--x-ink-3); }
.company-creator-close { flex: none; display: grid; place-items: center; inline-size: 30px; block-size: 30px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--x-ink-3); cursor: pointer; }
.company-creator-close:hover { color: var(--x-ink); background: var(--x-surface); }
.company-creator-save { justify-self: start; }
.company-creator-save:disabled { opacity: .55; cursor: not-allowed; }

.company-logo-upload { display: flex; align-items: center; gap: 12px; }
.company-logo-preview { flex: none; display: grid; place-items: center; inline-size: 52px; block-size: 52px; overflow: hidden; border: 1px dashed var(--x-line-2); border-radius: 10px; background: var(--x-surface); color: var(--x-ink-3); }
.company-logo-copy { display: grid; justify-items: start; gap: 3px; min-width: 0; }
.profile-form-field .company-logo-label { display: inline-flex; padding: 7px 12px; border: 1px solid var(--x-line-2); border-radius: 8px; background: var(--x-surface); font-size: 13.5px; font-weight: 600; color: var(--x-ink); cursor: pointer; }
.profile-form-field .company-logo-label:hover { border-color: var(--x-ink); }
.company-logo-meta { font-size: 12.5px; color: var(--x-ink-3); }
.company-logo-input { display: none; }

/* ── Breakpoints ────────────────────────────────────────────────────────── */
@media (min-width: 640px) {
  .profile-modal-overlay { align-items: center; padding: 24px; }
  .profile-modal { border-radius: 14px; max-block-size: min(88dvh, 860px); }
  .profile-modal-row { grid-template-columns: 1fr 1fr; }
  .pf-thumb { inline-size: 96px; block-size: 64px; }
}

@media (min-width: 768px) {
  .pf-intro { padding-block: 40px 32px; }
  .pf-id {
    grid-template-columns: 96px minmax(0, 1fr) auto;
    grid-template-areas: "avatar main actions";
    gap: 24px;
  }
  .pf-avatar { inline-size: 96px; block-size: 96px; font-size: 30px; }
  .pf-actions { flex-direction: column; align-items: flex-end; justify-content: flex-start; }
  .pf-medals { grid-template-columns: 1fr 1fr; }
  .pf-medal { border-top: 1px solid var(--x-line); }
  .pf-medal:nth-child(-n+2) { border-top: 0; }
  .pf-medal:nth-child(even) { border-left: 1px solid var(--x-line); }
  .pf-level { grid-template-columns: minmax(0, 1fr) minmax(0, 280px); align-items: end; gap: 24px; padding: 20px 24px; }
  .pf-level__bar { margin-bottom: 8px; }
}

@media (min-width: 1024px) {
  /* Con lateral, dos columnas; sin él, la columna de contenido no pasa de
     880px para que las filas no se estiren hasta 1200. */
  .pf-layout:has(.pf-aside) { grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; }
  .pf-main { max-inline-size: 880px; }
  .pf-aside { padding-top: 76px; }
}

@media (prefers-reduced-motion: reduce) {
  .pf-tab, .pf-item, .pf-act, .pf-tag, .pf-social__a,
  .profile-modal-overlay, .profile-form-field input, .profile-form-field textarea,
  .pf .profile-timeline-btn-edit, .pf .profile-timeline-btn-delete { transition: none; }
}

/* ── Seguidores / siguiendo (users/follow_list.html) ────────────────────── */
.fl-narrow > * { max-width: 760px; }
.fl-title { margin-top: 14px; font-stretch: 104%; font-size: clamp(26px, 3vw, 34px); font-weight: 650; line-height: 1.15; letter-spacing: -.02em; overflow-wrap: anywhere; }
.fl-body { padding-top: 8px; }
.fl .pf-tab { text-decoration: none; }
.fl .pf-tab[aria-current="page"] { color: var(--x-ink); border-bottom-color: var(--x-ink); }
.fl .pf-person { padding: 12px 16px; }
.fl .pf-mini-avatar { inline-size: 44px; block-size: 44px; }
.fl-role { margin-top: 2px; font-size: 13.5px; line-height: 1.45; color: var(--x-ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fl-search { margin-bottom: 12px; }
.fl-search input {
  inline-size: 100%;
  padding: 10px 12px;
  border: 1px solid var(--x-line-2);
  border-radius: var(--x-r);
  background: var(--x-surface);
  font: inherit;
  font-size: 16px;
  color: var(--x-ink);
}
.fl-search input:focus { outline: none; border-color: var(--x-ink); box-shadow: 0 0 0 3px var(--x-accent-soft); }
.fl #flNoResults { margin-top: 12px; }

/* ── Editar perfil (users/profile_edit.html) ────────────────────────────── */
.ed-lead { margin-bottom: 0; }
.ed-grid { display: grid; gap: 40px; padding-top: 32px; }
.ed-main { display: grid; gap: 32px; min-width: 0; max-inline-size: 680px; }
.ed-sec { display: grid; gap: 18px; padding: 20px 16px; background: var(--x-surface); border: 1px solid var(--x-line); border-radius: 14px; }
.ed-sec > .ed-hint { margin-top: -10px; }

.ed-avatar { display: flex; align-items: center; gap: 16px; }
/* .pf-avatar trae grid-area de la cabecera de la ficha: aquí no aplica. */
.ed-avatar__pic,
.ed-mini__avatar { grid-area: auto; }
.ed-avatar__pic { inline-size: 72px; block-size: 72px; font-size: 22px; flex: none; }
.ed-avatar__main { display: grid; justify-items: start; gap: 6px; min-width: 0; }
.ed-file:focus-visible + label { outline: 2px solid var(--x-accent); outline-offset: 2px; }

.ed-field { display: grid; gap: 6px; min-width: 0; }
.ed-field > label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--x-ink); }
.ed-opt { font-weight: 400; color: var(--x-ink-3); font-size: 14px; }
.ed-net { display: inline-grid; color: var(--x-ink-2); }
.ed-net svg { inline-size: 15px; block-size: 15px; }
.ed-field input[type="text"],
.ed-field input[type="url"],
.ed-field textarea {
  inline-size: 100%;
  padding: 10px 12px;
  border: 1px solid var(--x-line-2);
  border-radius: var(--x-r);
  background: var(--x-surface);
  font: inherit;
  font-size: 16px;
  color: var(--x-ink);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.ed-field textarea { min-block-size: 96px; resize: vertical; line-height: 1.5; }
.ed-field input:focus,
.ed-field textarea:focus { outline: none; border-color: var(--x-ink); box-shadow: 0 0 0 3px var(--x-accent-soft); }
.ed-hint { font-size: 13.5px; line-height: 1.5; color: var(--x-ink-3); }
.ed-err { font-size: 13.5px; font-weight: 600; color: var(--x-high); }
.ed-foot { display: flex; justify-content: space-between; gap: 12px; }
.ed-count { flex: none; font-size: 13px; color: var(--x-ink-3); }
.ed-count.is-warn { color: var(--x-high); font-weight: 600; }
.ed-social { display: grid; gap: 16px; }
.ed-alert { padding: 12px 14px; border: 1px solid var(--x-high); border-inline-start-width: 3px; border-radius: var(--x-r); background: var(--x-surface); font-size: 14.5px; }
.ed-actions { display: flex; justify-content: flex-end; gap: 8px; }

.ed-side { display: grid; gap: 14px; align-content: start; min-width: 0; }
.ed-mini { display: grid; justify-items: start; gap: 4px; padding: 20px; background: var(--x-surface); border: 1px solid var(--x-line); border-radius: 14px; }
.ed-mini__avatar { inline-size: 56px; block-size: 56px; font-size: 18px; margin-bottom: 8px; }
.ed-mini__name { font-stretch: 104%; font-size: 19px; font-weight: 650; line-height: 1.2; overflow-wrap: anywhere; }
.ed-mini__user { font-size: 13.5px; color: var(--x-ink-3); }
.ed-mini__meta { margin-top: 6px; font-size: 14px; font-weight: 600; color: var(--x-ink); }
.ed-mini__meta:empty { display: none; }
.ed-mini__bio { margin-top: 4px; font-size: 14px; line-height: 1.55; color: var(--x-ink-2); overflow-wrap: anywhere; }
.ed-mini__social { display: flex; gap: 10px; margin-top: 10px; color: var(--x-ink-2); }
.ed-mini__social span { display: inline-grid; }
.ed-mini__social span.off { display: none; }
.ed-mini__social svg { inline-size: 16px; block-size: 16px; }
.ed-tips { display: grid; gap: 8px; margin: 0; padding: 0 0 0 1.1em; font-size: 14px; line-height: 1.5; color: var(--x-ink-2); }

@media (min-width: 640px) {
  .ed-sec { padding: 24px; }
  .ed-social { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .ed-grid { grid-template-columns: minmax(0, 680px) 320px; justify-content: start; gap: 56px; }
  .ed-side { position: sticky; top: 96px; }
}
@media (prefers-reduced-motion: reduce) {
  .ed-field input, .ed-field textarea { transition: none; }
}
