:root {
  --navy: #123a5e;
  --navy-hi: #1c5182;
  --navy-lo: #0d2942;
  --buy: #e0393e;
  --buy-hi: #c22b30;
  --free: #0f8a4f;
  --ink: #1b2431;
  --muted: #5a6b7d;
  --line: #dfe5ec;
  --bg: #f4f6f9;
  --card: #ffffff;
  --bg-alt: #f7f9fb;
  --bg-alt2: #f2f5f9;
  --bg-alt3: #eef3f8;
  --acento: #123a5e;
  --enlace: #1c5182;
  --texto-suave: #40505f;
  --alerta-bg: #fffaf3;
  --alerta-line: #f0cf9a;
  --alerta-ink: #7a4a12;
  --ok-bg: #eef8f1;
  --ok-line: #b6e2c4;
  --ok-ink: #15633a;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 34, 55, .08), 0 6px 18px rgba(16, 34, 55, .07);
}

html.tema-oscuro {
  --navy: #3a7ab8;
  --navy-hi: #4a8ac8;
  --navy-lo: #2a5a8a;
  --buy: #f05a5e;
  --buy-hi: #d94a4e;
  --free: #2aaa7a;
  --ink: #e8eef4;
  --muted: #9ab0c4;
  --line: #3a4a5e;
  --bg: #1a1f26;
  --card: #242a33;
  --bg-alt: #2a3038;
  --bg-alt2: #2d333c;
  --bg-alt3: #303640;
  --acento: #7db4e8;
  --enlace: #7db4e8;
  --texto-suave: #b6c6d8;
  --alerta-bg: #2e2519;
  --alerta-line: #6b5636;
  --alerta-ink: #f0d9a8;
  --ok-bg: #1e3529;
  --ok-line: #35604a;
  --ok-ink: #a8e0bf;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 18px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}

a { color: var(--enlace); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg, video { max-width: 100%; height: auto; display: block; }

.envoltura { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* ---------- Cabecera ---------- */
.cabera { background: var(--navy-lo); color: #fff; }
.cabera__alta {
  display: flex; align-items: center; gap: 18px;
  padding: 14px 0;
}
.marca { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 19px; letter-spacing: .2px; }
.marca:hover { text-decoration: none; }
.marca__marca-svg { width: 34px; height: 34px; flex: none; }
.marca small { display: block; font-size: 11px; font-weight: 500; color: #a9c4dd; letter-spacing: .4px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; align-items: center; }
.nav a, .nav button {
  color: #dbe8f4; background: none; border: 0; font: inherit; font-size: 15px;
  padding: 9px 13px; border-radius: 7px; cursor: pointer;
}
.nav a:hover, .nav button:hover { background: var(--navy-hi); color: #fff; text-decoration: none; }
.nav__carrito { position: relative; color: #fff; background: var(--navy); font-weight: 600; }
.nav__carrito:hover { background: var(--navy-hi); }
.nav__contador {
  display: inline-block; min-width: 20px; padding: 0 5px; margin-left: 6px;
  background: var(--buy); color: #fff; border-radius: 999px; font-size: 12px; font-weight: 700; text-align: center;
}
.nav__contador[hidden] { display: none; }

.nav__tema {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; padding: 0;
  background: transparent; border: 1px solid rgba(255,255,255,.2); border-radius: 7px;
  color: #dbe8f4; cursor: pointer; transition: background .15s, border-color .15s;
}
.nav__tema:hover { background: var(--navy-hi); border-color: var(--navy-hi); color: #fff; }
.nav__tema-icono { width: 20px; height: 20px; }

/* Menú de móvil. En pantalla ancha la lista de enlaces `display: contents`, así
 * que siguen siendo hijos flexibles de `.nav` y la cabecera se ve igual que
 * siempre; el botón no aparece. La clase `menu-js` la pone tema.js: sin
 * JavaScript no hay lista envuelta ni botón, y los enlaces se siguen
 * acomodando en renglones como toda la vida. */
.nav__lista { display: contents; }
.nav__menu {
  display: none; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 12px;
  background: transparent; border: 1px solid rgba(255, 255, 255, .2); border-radius: 7px;
  color: #dbe8f4; font: inherit; font-size: 15px; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.nav__menu:hover { background: var(--navy-hi); border-color: var(--navy-hi); color: #fff; }
.nav__menu:focus-visible, .nav__lista a:focus-visible {
  outline: 2px solid #7fb4e8; outline-offset: -2px;
}
.nav__menu-icono { width: 20px; height: 20px; flex: none; }
html.menu-js .cabera { position: relative; }

.nav__dropdown { position: relative; }
.nav__dropdown-btn {
  display: inline-flex; align-items: center; gap: 6px;
}
.nav__dropdown-icon { width: 16px; height: 16px; transition: transform .2s; }
.nav__dropdown[aria-expanded="true"] .nav__dropdown-icon { transform: rotate(180deg); }
.nav__dropdown-menu {
  display: none; position: absolute; top: calc(100% + 4px); left: 0;
  min-width: 220px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px 0; z-index: 100;
}
.nav__dropdown:hover .nav__dropdown-menu,
.nav__dropdown[aria-expanded="true"] .nav__dropdown-menu { display: block; }
.nav__dropdown-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  color: var(--ink); font-size: 14px; cursor: pointer; transition: background .15s;
}
.nav__dropdown-item:hover { background: var(--bg); text-decoration: none; }
.nav__dropdown-item .icono { width: 32px; height: 32px; border-radius: 6px; flex: none; }
.nav__dropdown-item .icono svg { width: 18px; height: 18px; }
.nav__dropdown-item span { font-weight: 500; }

.baner { background: var(--navy); color: #cfe1f2; font-size: 14px; }
.baner__lista { display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 9px 0; }
.baner a { color: #fff; }
.baner span { color: #94b6d3; }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(120deg, var(--navy-lo), var(--navy) 60%, var(--navy-hi)); color: #fff; }
.hero__rejilla { display: grid; grid-template-columns: 1.05fr .95fr; gap: 34px; align-items: center; padding: 42px 0 46px; }
.hero h1 { font-size: 34px; line-height: 1.2; margin: 0 0 10px; }
.hero p { color: #d6e6f4; font-size: 17px; margin: 0 0 20px; }
.hero__botones { display: flex; flex-wrap: wrap; gap: 10px; }
.hero__tarjeta {
  background: var(--card); color: var(--ink); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px; display: grid; grid-template-columns: 92px 1fr; gap: 16px; align-items: start;
}
.hero__tarjeta h2 { margin: 0 0 4px; font-size: 21px; }
.hero__tarjeta p { color: var(--muted); font-size: 15px; margin: 0 0 12px; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); }

/* El hueco derecho del hero: un reel vertical con su pie, del tamaño de un
   teléfono y sin robarle protagonismo al titular. */
.hero__reel { display: grid; justify-items: center; }
.reel {
  width: min(300px, 100%); background: var(--card); color: var(--ink);
  border: 1px solid rgba(255, 255, 255, .22); border-radius: 18px; overflow: hidden;
  box-shadow: 0 18px 44px rgba(6, 20, 36, .38);
}
.reel__video {
  display: block; width: 100%; aspect-ratio: 9 / 16; object-fit: cover;
  background: var(--navy-lo, #0d2942);
}
.reel__pie { padding: 12px 14px 14px; }
.reel__titulo { margin: 0 0 3px; font-size: 16px; font-weight: 700; line-height: 1.3; }
.reel__nota { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.reel__botones { display: flex; flex-wrap: wrap; gap: 8px; }
.reel__btn {
  border: 1px solid var(--line); background: var(--bg-alt3); color: var(--ink);
  border-radius: 6px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.reel__btn:hover { border-color: var(--enlace); color: var(--enlace); text-decoration: none; }
.reel__btn[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.reel__btn:focus-visible { outline: 2px solid var(--enlace); outline-offset: 2px; }
@media (max-width: 620px) {
  .hero__reel { margin-top: 6px; }
  .reel { width: min(280px, 100%); }
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 7px; padding: 10px 18px;
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; text-align: center;
}
.btn:hover { text-decoration: none; }
.btn--descarga { background: var(--free); color: #fff; }
.btn--descarga:hover { background: #0c7543; }
.btn--comprar { background: var(--buy); color: #fff; }
.btn--comprar:hover { background: var(--buy-hi); }
.btn--mar { background: var(--navy); color: #fff; }
.btn--mar:hover { background: var(--navy-hi); }
.btn--fant { background: var(--card); color: var(--acento); border-color: var(--line); }
.btn--fant:hover { border-color: var(--enlace); color: var(--enlace); }
.btn--fant--claro { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn--fant--claro:hover { background: rgba(255, 255, 255, .12); color: #fff; border-color: #fff; }
.btn--grande { padding: 13px 26px; font-size: 16px; }
.btn--chica { padding: 7px 12px; font-size: 14px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* El botonazo al Escritorio: ancho completo de la columna, cálido sobre el
   azul del hero, con un brillo que pasa de vez en cuando. */
.btn--escritorio {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 14px;
  width: 100%; max-width: 480px; padding: 15px 20px 15px 16px;
  border: 0; border-radius: 15px;
  background: linear-gradient(112deg, #ffc24d 0%, #ff8a3d 48%, #ff5a3c 100%);
  color: #2a1608; text-align: left;
  box-shadow: 0 18px 38px rgba(255, 122, 45, .34), inset 0 1px 0 rgba(255, 255, 255, .55);
  transition: transform .18s ease, box-shadow .18s ease;
}
.btn--escritorio::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 32%, rgba(255, 255, 255, .5) 48%, transparent 64%);
  transform: translateX(-130%);
  animation: brillo-escritorio 5.5s ease-in-out infinite;
}
.btn--escritorio:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 48px rgba(255, 122, 45, .46), inset 0 1px 0 rgba(255, 255, 255, .7);
  text-decoration: none;
}
.btn--escritorio:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.btn--escritorio__icono {
  width: 48px; height: 48px; flex: none; display: grid; place-items: center;
  border-radius: 13px; background: rgba(255, 255, 255, .38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5);
}
.btn--escritorio__icono svg { width: 27px; height: 27px; fill: none; stroke: #2a1608; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn--escritorio__texto { display: flex; flex-direction: column; gap: 2px; line-height: 1.18; }
.btn--escritorio__texto strong { font-size: 20px; letter-spacing: -.01em; }
.btn--escritorio__texto small { font-size: 13px; font-weight: 600; opacity: .78; }
.btn--escritorio__flecha { margin-left: auto; font-size: 26px; line-height: 1; transition: transform .18s ease; }
.btn--escritorio:hover .btn--escritorio__flecha { transform: translateX(4px); }
@keyframes brillo-escritorio {
  0%, 58% { transform: translateX(-130%); }
  78%, 100% { transform: translateX(130%); }
}
@media (prefers-reduced-motion: reduce) {
  .btn--escritorio::after { animation: none; }
  .btn--escritorio, .btn--escritorio__flecha { transition: none; }
}
@media (max-width: 620px) {
  .btn--escritorio { max-width: none; }
  .btn--escritorio__texto strong { font-size: 18px; }
}

/* ---------- Secciones ---------- */
.seccion { padding: 40px 0; }
.seccion--blanca { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.seccion__titulo { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 0 0 6px; font-size: 25px; }
.seccion__texto { color: var(--muted); margin: 0 0 22px; max-width: 76ch; }
.seccion__subtitulo { font-size: 18px; margin: 32px 0 16px; color: var(--acento); font-weight: 600; }
.filtro { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.filtro button {
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
  border-radius: 999px; padding: 6px 15px; font: inherit; font-size: 14px; cursor: pointer;
}
.filtro button:hover { border-color: var(--enlace); color: var(--enlace); }
.filtro button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600; }

/* ---------- Rejilla de productos ---------- */
.rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 18px; }
.ficha {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow);
}
.ficha__cab { display: flex; gap: 12px; align-items: center; }
.ficha__nombre { font-size: 17px; font-weight: 700; margin: 0; line-height: 1.3; }
.ficha__nombre a { color: var(--ink); }
.ficha__cat { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.ficha__resumen { font-size: 14px; color: var(--texto-suave); margin: 0; flex: 1; }
.ficha__pie { display: flex; align-items: center; gap: 8px; justify-content: space-between; margin-top: 4px; }
.precio { font-weight: 700; font-size: 15px; }
.precio--gratis { color: var(--free); }
.precio--demo { color: var(--enlace); }
.precio--pedir { color: var(--muted); font-weight: 600; font-size: 14px; }
.etiqueta { font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 10px; background: var(--bg-alt3); color: var(--acento); }

.icono {
  width: 54px; height: 54px; border-radius: 12px; flex: none;
  display: grid; place-items: center; color: #fff;
}
.icono svg { width: 30px; height: 30px; }
.icono--grande { width: 92px; height: 92px; border-radius: 18px; }
.icono--grande svg { width: 48px; height: 48px; }
.icono--Fiscal { background: linear-gradient(150deg, #1f6fb2, #123a5e); }
.icono--Productividad { background: linear-gradient(150deg, #0f8a4f, #0a5c36); }
.icono--Legal { background: linear-gradient(150deg, #7a4fb2, #4a2c73); }
.icono--Psicologia { background: linear-gradient(150deg, #d9743a, #a4501f); }
.icono--Gestion { background: linear-gradient(150deg, #12a0a8, #0a6c72); }
.icono--default { background: linear-gradient(150deg, #55677c, #2c3948); }

/* ---------- Portales hermanos ---------- */
.portales__grupo { margin-top: 26px; }
.portales__grupo h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin: 0 0 12px; }
.rejilla--portales { grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); }
.portal {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0;
  display: block; color: inherit; overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.portal:hover { text-decoration: none; border-color: var(--navy-hi); box-shadow: var(--shadow); transform: translateY(-4px); }
.portal__img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; background: var(--bg-alt); }
.portal__cuerpo { padding: 16px 18px 18px; }
.portal__nombre { font-weight: 700; font-size: 18px; color: var(--acento); display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.portal__dom { font-size: 12px; color: var(--muted); font-family: ui-monospace, Consolas, monospace; margin-bottom: 8px; }
.portal__desc { font-size: 14px; color: var(--texto-suave); margin: 0; line-height: 1.5; }
.portal--fuera .portal__nombre { color: var(--muted); }
.portal--fuera { background: var(--bg-alt); border-style: dashed; }

/* ---------- Compartir ---------- */
.compartir { display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; font: inherit; }
.compartir svg { width: 17px; height: 17px; flex: 0 0 auto; }
.compartir span:empty { display: none; }

/* Un botón dentro de un <a> no es HTML válido: en las tarjetas de portal la
 * envoltura saca el botón fuera y lo ancla arriba a la derecha. */
.ficha.compartida, .portal-env { position: relative; }
.portal-env { display: flex; }
.portal-env > .portal { flex: 1; }
.compartir--ficha, .compartir--tarjeta {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  width: 34px; height: 34px; padding: 0; border-radius: 999px;
  background: rgba(255, 255, 255, .92); color: var(--navy);
  border: 1px solid rgba(16, 34, 55, .16);
  box-shadow: 0 1px 3px rgba(16, 34, 55, .3);
}
.compartir--ficha:hover, .compartir--tarjeta:hover { background: #fff; color: var(--enlace); }
.portal-env:hover .compartir--tarjeta { transform: translateY(-4px); }
/* Cuando el listado de estados apaga la tarjeta después de poner el botón, la
 * envoltura se esconde con ella: un cuadro vacío en la rejilla es el descuadre. */
.portal-env:has(> .portal.oculto) { display: none; }
.portal-env:has(> .portal[hidden]) { display: none; }
/* Lo que está en desarrollo o fuera de línea aún no se puede recomendar. */
.portal-env:has(> .portal--desarrollo) > .compartir,
.portal-env:has(> .portal--fuera) > .compartir { display: none; }
/* Cuando la tarjeta no lleva imagen, el sello cae sobre el nombre y le deja sitio. */
.portal-env > .portal > .portal__cuerpo:first-child .portal__nombre,
.ficha.compartida .ficha__nombre { padding-right: 40px; }

.compartir-menu {
  position: fixed; z-index: 80; min-width: 234px; max-width: calc(100vw - 24px);
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 12px 34px rgba(16, 34, 55, .24); padding: 5px 0 4px;
}
.compartir-menu[hidden] { display: none; }
.compartir__titulo {
  margin: 0; padding: 5px 14px 6px; font-size: 12px; font-weight: 700;
  letter-spacing: .5px; text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.compartir-menu ul { list-style: none; margin: 0; padding: 0; }
/* Nueve opciones en la lista: con las filas sueltas de antes la última ya no
   cabía en una pantalla de escritorio y el menú salía con scroll. Fila de 34px
   para que las nueve entren enteras. */
.compartir-menu a, .compartir-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 6px 14px; background: none; border: 0; font: inherit; font-size: 15px;
  line-height: 1.3; color: var(--ink); text-align: left; cursor: pointer; text-decoration: none;
}
.compartir-menu a:hover, .compartir-menu button:hover { background: var(--bg-alt3); color: var(--ink); text-decoration: none; }
.compartir__sello {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 5px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--sello, var(--navy)); color: #fff; font-size: 12px; font-weight: 800;
}
.compartir__sello--nativo { background: var(--navy); }
.compartir__sello--ligar { background: var(--muted); }
.compartir:focus-visible, .compartir-menu a:focus-visible, .compartir-menu button:focus-visible {
  outline: 2px solid var(--enlace); outline-offset: 2px;
}

/* ---------- Estado de WhatsApp (lámina preparada, no publicada) ---------- */
.estado {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center;
  padding: 16px; background: rgba(13, 41, 66, .74); overflow: auto;
}
.estado__caja {
  display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 22px;
  align-items: start; width: min(880px, 100%);
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 24px 60px rgba(8, 22, 38, .45); padding: 20px;
}
.estado__lamina img {
  display: block; width: 100%; height: auto;
  border-radius: 10px; border: 1px solid var(--line); background: var(--navy-lo);
}
.estado__titulo { margin: 0 0 10px; font-size: 20px; font-weight: 700; color: var(--ink); }
.estado__recado {
  margin: 0 0 12px; padding: 12px 14px; border-radius: 10px;
  background: var(--bg-alt3); color: var(--texto-suave);
  font-size: 14px; line-height: 1.5; white-space: pre-line;
}
.estado__pasos { margin: 0 0 8px; padding-left: 22px; font-size: 14px; color: var(--ink); }
.estado__pasos li { margin-bottom: 4px; }
.estado__botones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
@media (max-width: 700px) {
  .estado__caja { grid-template-columns: minmax(0, 1fr); }
  .estado__lamina { max-width: 250px; }
}

/* ---------- Ficha de producto ---------- */
.miga { font-size: 13px; color: var(--muted); padding: 14px 0 0; }
.producto { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; padding: 22px 0 40px; }
.producto__cab { display: flex; gap: 18px; align-items: center; margin-bottom: 8px; }
.producto__cab h1 { font-size: 30px; margin: 0 0 4px; }
.producto__resumen { color: var(--muted); font-size: 16px; margin: 0; }
.appficha__icono {
  flex: none; width: 76px; height: 76px; object-fit: cover;
  border-radius: 16px; border: 1px solid var(--line); background: var(--bg-alt2);
  box-shadow: var(--shadow);
}
.producto__cuerpo h2 { font-size: 21px; margin: 30px 0 10px; }
.producto__cuerpo p { margin: 0 0 14px; }
.lista--rasgos { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.lista--rasgos li { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--navy); border-radius: 8px; padding: 13px 16px; }
.lista--rasgos strong { display: block; margin-bottom: 3px; }
.lista--rasgos span { color: var(--texto-suave); font-size: 15px; }
.cifras {
  list-style: none; margin: 22px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px;
}
.cifras li {
  background: var(--bg-alt2); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; text-align: center;
}
.cifras strong { display: block; font-size: 26px; line-height: 1.1; color: var(--navy); }
.cifras span { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }
.galeria { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.galeria__pieza {
  display: block; border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; background: var(--bg-alt2); aspect-ratio: 16 / 10;
}
.galeria__pieza:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.galeria__pieza img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lista--cursos { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lista--cursos li { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; }
.lista--cursos strong { display: block; font-size: 15px; }
.lista--cursos span { color: var(--muted); font-size: 13px; }
@media (max-width: 700px) {
  .galeria { grid-template-columns: minmax(0, 1fr); }
  .galeria__pieza:first-child { aspect-ratio: 16 / 10; }
}
.recuadro { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.recuadro--aviso { border-left: 4px solid #d9743a; background: var(--alerta-bg); }
.compra { position: sticky; top: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.compra__precio { font-size: 26px; font-weight: 800; margin: 0 0 2px; }
.compra__nota { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 2px; }
.compra__imp { font-size: 13px; color: var(--muted); margin: 0 0 16px; }
.compra__botones { display: grid; gap: 9px; margin-bottom: 16px; }
.compra__datos { list-style: none; margin: 0; padding: 0; font-size: 14px; display: grid; gap: 8px; }
.compra__datos li { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
.compra__datos span:first-child { color: var(--muted); }
.compra__datos span:last-child { text-align: right; font-weight: 600; }
.medios { display: grid; gap: 16px; margin-top: 8px; }
.medios figure { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.medios figcaption { font-size: 13px; color: var(--muted); padding: 8px 12px; }
.video { aspect-ratio: 16 / 9; width: 100%; border: 0; }

/* ---------- Ficha de app en modal ---------- */
.ficha-modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 18px; }
.ficha-modal[hidden] { display: none; }
.ficha-modal__velo { position: absolute; inset: 0; background: rgba(6, 16, 28, .62); backdrop-filter: blur(3px); }
.ficha-modal__caja {
  position: relative; display: flex; flex-direction: column;
  width: min(880px, 100%); max-height: calc(100vh - 36px);
  background: var(--card); color: var(--texto);
  border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}
.ficha-modal__barra { display: flex; justify-content: flex-end; padding: 10px 12px 0; }
.ficha-modal__cerrar {
  width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg-alt2); color: var(--texto); font-size: 24px; line-height: 1;
  cursor: pointer;
}
.ficha-modal__cerrar:hover { background: var(--bg-alt3); }
.ficha-modal__contenido { overflow: auto; padding: 0 28px 28px; }
.ficha-modal__cab { display: flex; gap: 18px; align-items: center; margin: 4px 0 18px; }
.ficha-modal__cab h2 { font-size: 28px; margin: 0 0 4px; }
.ficha-modal__precios { display: grid; gap: 2px; margin-bottom: 14px; }
.compra__precio--licencia { font-size: 19px; color: var(--muted); }
.ficha-modal__compra { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.ficha-modal__compra .compra__imp { margin: 0; }
.ficha-modal__contenido > h2, .ficha-modal__contenido h3 { font-size: 21px; margin: 26px 0 10px; }
.ficha-modal-abierto { overflow: hidden; }

@media (max-width: 640px) {
  .ficha-modal { padding: 0; }
  .ficha-modal__caja { width: 100%; max-height: 100vh; border-radius: 0; }
  .ficha-modal__contenido { padding: 0 18px 24px; }
  .ficha-modal__cab h2 { font-size: 23px; }
}

/* ---------- Carrito ---------- */
.carrito { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 26px; align-items: start; padding: 26px 0 44px; }
.lineas { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.linea { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 14px 16px; border-top: 1px solid var(--line); }
.linea:first-child { border-top: 0; }
.linea__nombre { font-weight: 700; }
.linea__meta { font-size: 13px; color: var(--muted); }
.cantidad { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.cantidad button { width: 30px; height: 30px; border: 0; background: var(--bg-alt2); font-size: 17px; cursor: pointer; color: var(--acento); }
.cantidad button:hover { background: var(--navy); color: #fff; }
.cantidad span { min-width: 34px; text-align: center; font-weight: 700; font-size: 15px; }
.quitar { background: none; border: 0; color: var(--buy); font: inherit; font-size: 14px; cursor: pointer; text-decoration: underline; }
.vacio { padding: 40px 20px; text-align: center; color: var(--muted); background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); }
.total { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: var(--bg-alt); border-top: 1px solid var(--line); font-size: 17px; font-weight: 700; }

form .campo { margin-bottom: 13px; }
form label { display: block; font-size: 13px; font-weight: 600; color: var(--texto-suave); margin-bottom: 4px; }
form input, form select, form textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 7px;
  font: inherit; font-size: 15px; color: var(--ink); background: var(--card);
}
form input:focus, form select:focus, form textarea:focus { outline: 2px solid var(--navy-hi); outline-offset: 1px; border-color: var(--navy-hi); }
.fila { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.nota { font-size: 13px; color: var(--muted); }
.nota--alerta { background: var(--alerta-bg); border: 1px solid var(--alerta-line); border-radius: 8px; padding: 12px 14px; color: var(--alerta-ink); font-size: 14px; }
.nota--ok { background: var(--ok-bg); border: 1px solid var(--ok-line); color: var(--ok-ink); border-radius: 8px; padding: 12px 14px; font-size: 14px; }
.nota--hash code {
  display: block; margin: 5px 0; padding: 8px 10px; background: var(--bg-alt2); border: 1px solid var(--line);
  border-radius: 6px; font-family: ui-monospace, Consolas, monospace; font-size: 12px;
  word-break: break-all; color: var(--texto-suave);
}

/* ---------- Pie ---------- */
.pie { background: var(--navy-lo); color: #b9cfe3; font-size: 14px; margin-top: 30px; }
.pie__rejilla { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 26px; padding: 32px 0 22px; }
.pie h4 { color: #fff; font-size: 15px; margin: 0 0 10px; }
.pie a { color: #cfe1f2; }
.pie__base { border-top: 1px solid rgba(255, 255, 255, .12); padding: 14px 0 26px; display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: space-between; }

/* ---------- Utilidades ---------- */
.oculto { display: none !important; }
[saliva] { min-height: 20px; }
.centro { text-align: center; }
.marco { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; margin: 24px 0; max-width: 800px; }
.marco h1 { margin-top: 0; }
dl { margin: 0; }
dt { font-weight: 700; margin-top: 14px; }
dd { margin: 3px 0 0; color: var(--texto-suave); }

/* ---------- Explorador con pestañas ---------- */
.hero__rasgos {
  list-style: none; display: flex; flex-wrap: wrap; gap: 8px;
  margin: 20px 0 0; padding: 0;
}
.hero__rasgos li {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .09);
  color: #eaf4ff; border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 500;
}
.hero__rasgos li::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: #6ee7a8;
  box-shadow: 0 0 0 3px rgba(110, 231, 168, .2);
}
.explorador__cab {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 16px;
}
.explorador__cab .seccion__texto { margin-bottom: 0; }
/* Anclas viejas del catálogo (#productos, #descargas): siguen llevando al
   catálogo sin pedir que cada enlace publicado se reescriba. */
.ancla { display: block; position: relative; top: -84px; height: 0; visibility: hidden; }
.explorador__sello {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
  border-radius: 999px; padding: 7px 13px; font-size: 12px; font-weight: 700;
  letter-spacing: .4px; text-transform: uppercase; box-shadow: var(--shadow);
}
.explorador__sello::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--free);
  box-shadow: 0 0 0 4px rgba(15, 138, 79, .14);
}
.buscador {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 6px 8px 6px 14px;
  margin: 4px 0 14px; box-shadow: var(--shadow);
  transition: border-color .18s, box-shadow .18s;
}
.buscador:focus-within {
  border-color: var(--navy-hi);
  box-shadow: 0 0 0 3px rgba(28, 81, 130, .16), var(--shadow);
}
.buscador__icono {
  width: 20px; height: 20px; flex: none; fill: none; stroke: var(--muted);
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.buscador__campo {
  flex: 1; min-width: 0; border: 0; background: transparent;
  color: var(--ink); font: inherit; font-size: 16px; padding: 9px 0; outline: none;
}
.buscador__campo::placeholder { color: var(--muted); }
.buscador__campo::-webkit-search-cancel-button { display: none; }
.buscador__limpiar {
  flex: none; border: 0; background: var(--bg-alt3); color: var(--enlace);
  font: inherit; font-size: 13px; font-weight: 700; padding: 8px 14px;
  border-radius: 10px; cursor: pointer;
}
.buscador__limpiar:hover { background: var(--bg-alt2); }
.buscador__limpiar:focus-visible { outline: 2px solid var(--navy-hi); outline-offset: 2px; }
.buscador__estado {
  margin: 0 0 16px; color: var(--muted); font-size: 14px; font-weight: 600;
}
.tabs {
  position: sticky; top: 10px; z-index: 40;
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 7px; margin: 4px 0 26px; box-shadow: var(--shadow);
}
.tabs::-webkit-scrollbar { display: none; }
.tabs[hidden] { display: none; }
.tabs__boton {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid transparent; background: transparent; color: var(--muted);
  font: inherit; font-size: 15px; font-weight: 600; padding: 10px 15px;
  border-radius: 11px; cursor: pointer; scroll-margin-top: 96px;
  transition: background .18s, color .18s, box-shadow .18s, transform .18s;
}
.tabs__boton svg {
  width: 18px; height: 18px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.tabs__boton:hover { background: var(--bg-alt3); color: var(--enlace); }
.tabs__boton:focus-visible { outline: 2px solid var(--navy-hi); outline-offset: 2px; }
.tabs__boton[aria-selected="true"] {
  background: linear-gradient(135deg, var(--navy), var(--navy-hi)); color: #fff;
  box-shadow: 0 6px 16px rgba(18, 58, 94, .28);
}
.tabs__cuenta {
  min-width: 22px; padding: 1px 7px; border-radius: 999px;
  background: var(--bg-alt2); color: var(--muted);
  font-size: 12px; font-weight: 700; text-align: center;
}
.tabs__boton[aria-selected="true"] .tabs__cuenta {
  background: rgba(255, 255, 255, .22); color: #fff;
}
.tabs__boton[hidden], .tabs__panel[hidden] { display: none; }
.tabs__panel--entra { animation: panelEntra .32s ease; }
@keyframes panelEntra {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.tabs__panel .seccion__subtitulo:first-child { margin-top: 4px; }
.seccion, .tabs__panel, #portales { scroll-margin-top: 96px; }

@media (max-width: 940px) {
  .explorador__cab { flex-direction: column; }
  .tabs { top: 6px; }
  .hero__rejilla, .producto, .carrito { grid-template-columns: 1fr; }
  .compra { position: static; }
  /* Sin JavaScript la cabecera sigue como era: renglones de enlaces. */
  html:not(.menu-js) .cabera__alta { flex-wrap: wrap; }
  html:not(.menu-js) .nav { margin-left: 0; width: 100%; }
  /* Con menú: un solo renglón con marca, carrito, menú y tema; los enlaces
     caen a un cajón pegado bajo la cabecera. */
  html.menu-js .cabera__alta { flex-wrap: nowrap; }
  html.menu-js .nav { margin-left: auto; width: auto; gap: 6px; }
  html.menu-js .nav__menu { display: inline-flex; }
  html.menu-js .nav__lista {
    position: absolute; left: 0; right: 0; top: 100%; z-index: 60;
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    max-height: calc(100vh - 66px); overflow-y: auto;
    padding: 6px 20px 12px; background: var(--navy-lo);
    box-shadow: 0 14px 24px rgba(0, 0, 0, .26);
  }
  html.menu-js .nav--abierto .nav__lista { display: flex; }
  html.menu-js .nav__lista a {
    padding: 14px 8px; border-radius: 0; font-size: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .09);
  }
  html.menu-js .nav__lista a:last-child { border-bottom: 0; }
}
@media (max-width: 560px) {
  .fila { grid-template-columns: 1fr; }
  .hero h1 { font-size: 27px; }
  .linea { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .linea .quitar { grid-column: 2 / -1; justify-self: start; }
  /* En teléfono estrecho el botón del menú se queda con el gesto nada más. */
  html.menu-js .nav__menu-texto { display: none; }
  html.menu-js .nav__menu { width: 38px; padding: 0; }
  /* La marca se encoge antes que empujar los botones fuera de la pantalla. */
  html.menu-js .cabera__alta { gap: 10px; }
  html.menu-js .marca { font-size: 17px; min-width: 0; }
  html.menu-js .marca span { display: block; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  html.menu-js .marca__marca-svg { width: 28px; height: 28px; }
  html.menu-js .nav { gap: 4px; flex: none; }
  html.menu-js .nav__tema, html.menu-js .nav__menu { flex: none; }
}

/* ---------- Tema oscuro: superficies de marca ----------
   Al aclarar --navy, --buy y --free para que sigan sirviendo como TEXTO sobre
   el fondo oscuro, dejan de servir como FONDO bajo texto blanco: el blanco
   sobre un azul medio no llega a 4.5:1. Estas reglas devuelven a cada
   superficie de marca su tono profundo de siempre. */
html.tema-oscuro .cabera, html.tema-oscuro .pie { background: #10151b; }
html.tema-oscuro .nav__lista { background: #10151b; }
html.tema-oscuro .baner { background: #161c23; }
html.tema-oscuro .hero { background: linear-gradient(120deg, #0f141a, #1b3a5c 60%, #2a5a8a); }
html.tema-oscuro .nav a:hover, html.tema-oscuro .nav button:hover { background: #2a5a8a; }
html.tema-oscuro .nav__carrito { background: #123a5e; }
html.tema-oscuro .nav__contador { background: #e0393e; }
html.tema-oscuro .btn--mar { background: #1c5182; }
html.tema-oscuro .btn--mar:hover { background: #2a5a8a; }
html.tema-oscuro .filtro button[aria-pressed="true"] { background: #1c5182; border-color: #1c5182; }
html.tema-oscuro .btn--descarga { background: #0f8a4f; }
html.tema-oscuro .btn--descarga:hover { background: #0c7543; }
html.tema-oscuro .btn--comprar { background: #e0393e; }
html.tema-oscuro .btn--comprar:hover { background: #c22b30; }
html.tema-oscuro .tabs { background: #20262e; }
html.tema-oscuro .tabs__boton:hover { background: #2d333c; }
html.tema-oscuro .tabs__boton[aria-selected="true"] {
  background: linear-gradient(135deg, #1c5182, #2a5a8a);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .45);
}
html.tema-oscuro .explorador__sello { background: #242a33; }

/* ---------- Clasificación de apps PWA ----------
   Familia por naturaleza + nivel de alcance. Los colores de grupo se eligen
   desde admin.html y aquí se resuelven para tema claro y oscuro. */
:root {
  --g-teal: #0f766e; --g-teal-tinte: #e6f4f2;
  --g-amber: #b45309; --g-amber-tinte: #fdf2e3;
  --g-violet: #6d28d9; --g-violet-tinte: #f1ebfd;
  --g-navy: #123a5e; --g-navy-tinte: #e9f0f7;
  --g-green: #0f8a4f; --g-green-tinte: #eaf6ef;
  --g-rose: #be123c; --g-rose-tinte: #fcecef;
  --g-cyan: #0e7490; --g-cyan-tinte: #e6f3f7;
  --g-brown: #92400e; --g-brown-tinte: #f8efe6;
  --g-gray: #64748b; --g-gray-tinte: #eef1f5;
}
html.tema-oscuro {
  --g-teal: #5eead4; --g-teal-tinte: #16302d;
  --g-amber: #fbbf24; --g-amber-tinte: #322611;
  --g-violet: #c4b5fd; --g-violet-tinte: #28203c;
  --g-navy: #7db4e8; --g-navy-tinte: #1a2634;
  --g-green: #4ade80; --g-green-tinte: #172b20;
  --g-rose: #fda4af; --g-rose-tinte: #331b22;
  --g-cyan: #67e8f9; --g-cyan-tinte: #152c33;
  --g-brown: #fcd34d; --g-brown-tinte: #2e2413;
  --g-gray: #94a3b8; --g-gray-tinte: #232a33;
}
.grupo-color-teal { --grupo-color: var(--g-teal); --grupo-tinte: var(--g-teal-tinte); }
.grupo-color-amber { --grupo-color: var(--g-amber); --grupo-tinte: var(--g-amber-tinte); }
.grupo-color-violet { --grupo-color: var(--g-violet); --grupo-tinte: var(--g-violet-tinte); }
.grupo-color-navy { --grupo-color: var(--g-navy); --grupo-tinte: var(--g-navy-tinte); }
.grupo-color-green { --grupo-color: var(--g-green); --grupo-tinte: var(--g-green-tinte); }
.grupo-color-rose { --grupo-color: var(--g-rose); --grupo-tinte: var(--g-rose-tinte); }
.grupo-color-cyan { --grupo-color: var(--g-cyan); --grupo-tinte: var(--g-cyan-tinte); }
.grupo-color-brown { --grupo-color: var(--g-brown); --grupo-tinte: var(--g-brown-tinte); }
.grupo-color-gray { --grupo-color: var(--g-gray); --grupo-tinte: var(--g-gray-tinte); }

.rejilla[hidden] { display: none; }
.portal--clasificada { position: relative; }
.portal__familia {
  position: absolute; top: 10px; left: 10px; z-index: 3;
  display: inline-flex; align-items: center; gap: 6px;
  max-width: calc(100% - 64px);
  padding: 4px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, .95); color: #123a5e;
  font-size: 11px; font-weight: 700; letter-spacing: .2px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.portal__familia::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--grupo-color, #64748b); flex: none;
}
.portal__meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  margin: 2px 0 8px;
}
.portal__meta .portal__dom { margin-bottom: 0; }
.portal__sector {
  display: inline-block; vertical-align: middle;
  padding: 1px 8px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg-alt); color: var(--muted);
  font-size: 11px; line-height: 1.5;
}
.portal__nivel {
  display: flex; width: max-content; align-items: center; gap: 7px;
  margin-top: 10px; padding: 4px 9px; border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 11px; font-weight: 700;
}
.portal__nivel--n1 { color: var(--muted); background: var(--bg-alt); }
.portal__nivel--n2 { color: var(--navy-hi); border-color: var(--navy-hi); background: var(--bg-alt3); }
.portal__nivel--n3 { color: var(--free); border-color: var(--free); background: var(--ok-bg); }
.portal__puntos { display: inline-flex; gap: 3px; }
.portal__puntos i {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; opacity: .22;
}
.portal__puntos i.on { opacity: 1; }

.clasificacion__barra {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px 16px; margin: 0 0 18px; padding: 10px 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
}
.clasificacion__barra[hidden] { display: none; }
.clasificacion__vistas {
  display: inline-flex; gap: 3px; padding: 3px;
  background: var(--bg-alt2); border-radius: 999px;
}
.clasificacion__vistas button {
  border: 0; background: transparent; color: var(--muted);
  font: inherit; font-size: 13px; font-weight: 600;
  padding: 7px 13px; border-radius: 999px; cursor: pointer;
}
.clasificacion__vistas button:hover { color: var(--enlace); }
.clasificacion__vistas button[aria-pressed="true"] { background: var(--navy); color: #fff; }
html.tema-oscuro .clasificacion__vistas button[aria-pressed="true"] { background: #1c5182; }
.clasificacion__leyenda {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
  font-size: 12px; color: var(--muted);
}
.clasificacion__leyenda .portal__nivel { margin-top: 0; padding: 2px 8px; }
.clasificacion__nota { flex-basis: 100%; font-size: 11.5px; color: var(--muted); }

.familia-cabecera {
  grid-column: 1 / -1;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px;
  margin: 12px 0 0; padding: 12px 14px;
  background: var(--grupo-tinte); border-left: 4px solid var(--grupo-color);
  border-radius: 8px;
}
.familia-cabecera:first-child { margin-top: 0; }
.familia-cabecera__nombre { font-size: 16px; font-weight: 700; color: var(--ink); }
.familia-cabecera__cuenta {
  font-size: 11.5px; font-weight: 700; padding: 1px 8px;
  border-radius: 999px; color: var(--grupo-color);
  background: var(--card); border: 1px solid var(--line);
}
.familia-cabecera__desc { flex-basis: 100%; margin: 0; font-size: 12.5px; color: var(--muted); }

.matriz-clasificacion { margin: 0 0 18px; }
.matriz-clasificacion[hidden] { display: none; }
.matriz-clasificacion__stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px;
}
.matriz-clasificacion__stat {
  padding: 10px 12px; background: var(--card);
  border: 1px solid var(--line); border-radius: 10px;
}
.matriz-clasificacion__stat b { display: block; font-size: 22px; line-height: 1.1; color: var(--ink); }
.matriz-clasificacion__stat span {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--muted);
}
.matriz-clasificacion__fila {
  display: grid; grid-template-columns: 170px repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line); border-bottom: 0; background: var(--card);
}
.matriz-clasificacion__fila:first-child { border-radius: 8px 8px 0 0; }
.matriz-clasificacion__fila:last-child {
  border-bottom: 1px solid var(--line); border-radius: 0 0 8px 8px;
}
.matriz-clasificacion__fila--cab { background: var(--bg-alt2); }
.matriz-clasificacion__fila--cab > div {
  padding: 8px 10px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px; color: var(--muted);
}
.matriz-clasificacion__grupo {
  padding: 10px; border-left: 4px solid var(--grupo-color);
  border-right: 1px solid var(--line);
}
.matriz-clasificacion__grupo b { display: block; font-size: 12.5px; color: var(--ink); }
.matriz-clasificacion__grupo span { font-size: 11px; color: var(--muted); }
.matriz-clasificacion__celda {
  display: flex; flex-wrap: wrap; gap: 5px; align-content: flex-start;
  padding: 10px; border-right: 1px solid var(--line);
}
.matriz-clasificacion__celda:last-child { border-right: 0; }
.matriz-clasificacion__app {
  display: inline-flex; padding: 2px 8px; border-radius: 999px;
  background: var(--bg-alt); border: 1px solid var(--line);
  color: var(--ink); font-size: 11.5px;
}
.matriz-clasificacion__app:hover { border-color: var(--navy-hi); text-decoration: none; }
.matriz-clasificacion__vacio { font-size: 11.5px; color: var(--muted); }

@media (max-width: 720px) {
  .matriz-clasificacion__stats { grid-template-columns: 1fr; }
  .matriz-clasificacion__fila--cab { display: none; }
  .matriz-clasificacion__fila {
    grid-template-columns: 1fr; border-radius: 8px; margin-bottom: 10px;
    border-bottom: 1px solid var(--line);
  }
  .matriz-clasificacion__grupo { border-right: 0; border-bottom: 1px solid var(--line); }
  .matriz-clasificacion__celda { border-right: 0; border-bottom: 1px solid var(--line); }
  .matriz-clasificacion__celda:last-child { border-bottom: 0; }
  .matriz-clasificacion__celda::before {
    content: attr(data-label); display: block; width: 100%; margin-bottom: 3px;
    font-size: 10.5px; font-weight: 700; letter-spacing: .5px;
    text-transform: uppercase; color: var(--muted);
  }
}
