/* Colores de los tres contadores */
.stx-c-v { --c: #2563eb; }
.stx-c-s { --c: #6D4AFF; }
.stx-c-n { --c: #10b981; }
.stx-c-g { --c: #c9cddc; }

/* Hero: panel de estadísticas */
.stx-hero { position: relative; width: 100%; max-width: 620px; padding: 0 0 34px; }
.stx-dash .ux-main { min-width: 0; }
.stx-dash__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.stx-dash__sel { gap: 6px; font-weight: 700; white-space: nowrap; }
.stx-dash__sel .ux-av { width: 18px; height: 18px; }
.stx-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0 10px; }
.stx-kpi {
  position: relative;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 10px 10px 12px;
  overflow: hidden;
  border: 1px solid #eceef5;
  border-radius: 12px;
  background: #fff;
}
.stx-kpi > i { position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c); }
.stx-kpi small { color: #6b7190; font-size: 10px; line-height: 1.25; }
.stx-kpi b { color: #070d38; font-size: 20px; font-weight: 900; line-height: 1; letter-spacing: -.5px; }
.stx-kpi--v { --c: #2563eb; }
.stx-kpi--s { --c: #6D4AFF; }
.stx-kpi--n { --c: #10b981; }
.stx-bars {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  align-items: end;
  gap: 4px;
  height: 118px;
  padding-bottom: 1px;
  background: repeating-linear-gradient(0deg, #f1f2f7 0 1px, transparent 1px 29.5px);
  border-bottom: 1px solid #e3e6f0;
}
.stx-bars > span { display: flex; align-items: flex-end; justify-content: center; gap: 1.5px; height: 100%; }
.stx-bars i { flex: 1; max-width: 6px; border-radius: 3px 3px 1px 1px; }
.stx-bars i:nth-child(1) { height: calc(var(--v) * 1%); background: #2563eb; }
.stx-bars i:nth-child(2) { height: calc(var(--s) * 1%); background: #6D4AFF; }
.stx-bars i:nth-child(3) { height: calc(var(--n) * 1%); background: #10b981; }
.stx-axis { display: flex; justify-content: space-between; margin-top: 6px; color: #8a90a6; font-size: 9.5px; }
.stx-hero__chip { left: -18px; bottom: 0; }
.stx-dots { display: flex; }
.stx-dots i { width: 14px; height: 14px; border: 2px solid #fff; border-radius: 50%; background: var(--c); }
.stx-dots i + i { margin-left: -5px; }

/* Tres carriles */
.stx-lanes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; max-width: 980px; margin: 0 auto; }
.stx-lane { display: grid; justify-items: center; text-align: center; }
.stx-lane--v { --c: #2563eb; --bg: #e8efff; }
.stx-lane--s { --c: #6D4AFF; --bg: #efeaff; }
.stx-lane--n { --c: #10b981; --bg: #e3f7ee; }
.stx-src {
  display: grid;
  justify-items: center;
  gap: 6px;
  width: 100%;
  padding: 24px 20px 22px;
  border: 1px solid #eceef5;
  border-radius: 20px;
  background: #fff;
}
.stx-src__ico { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 6px; border-radius: 14px; background: var(--bg); }
.stx-src__ico svg { width: 22px; height: 22px; fill: none; stroke: var(--c); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stx-src b { font-size: 17px; font-weight: 800; }
.stx-src small { color: #5b6280; font-size: 14px; line-height: 1.45; }
.stx-pipe { position: relative; display: block; width: 2px; height: 54px; background: repeating-linear-gradient(180deg, var(--c) 0 5px, transparent 5px 10px); opacity: .55; }
.stx-pipe i {
  position: absolute;
  left: 50%;
  top: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 4px var(--bg);
  transform: translateX(-50%);
  animation: stx-drop 2.4s ease-in infinite;
}
.stx-lane--s .stx-pipe i { animation-delay: .8s; }
.stx-lane--n .stx-pipe i { animation-delay: 1.6s; }
@keyframes stx-drop {
  0% { top: -4px; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { top: 48px; opacity: 0; }
}
.stx-pipe::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 8px;
  height: 8px;
  border: solid var(--c);
  border-width: 0 2px 2px 0;
  transform: translateX(-50%) rotate(45deg);
}
.stx-count {
  display: grid;
  gap: 4px;
  width: min(100%, 220px);
  padding: 18px 16px;
  border-radius: 18px;
  background: #2563eb;
  color: #fff;
  box-shadow: inset 0 3px 0 var(--c), 0 18px 36px rgb(16 24 64 / 14%);
}
.stx-count small { color: rgb(255 255 255 / 85%); font-size: 13px; font-weight: 700; }
.stx-count b { font-size: 38px; font-weight: 900; line-height: 1; letter-spacing: -1px; }
.stx-qrnote {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  max-width: 980px;
  margin: 40px auto 0;
  padding: 18px 20px;
  border: 1px dashed #c9cfe6;
  border-radius: 18px;
  background: #fff;
  color: #070d38;
  text-decoration: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.stx-qrnote:hover { border-color: #6D4AFF; box-shadow: 0 12px 28px rgb(16 24 64 / 8%); }
.stx-qrnote .mi { width: 40px; height: 40px; border-radius: 12px; background-size: 20px 20px; }
.stx-qrnote b { display: block; font-size: 16px; }
.stx-qrnote small { display: block; margin-top: 2px; color: #5b6280; font-size: 14px; line-height: 1.45; }
.stx-qrnote__go { color: #6D4AFF; font-size: 14px; font-weight: 800; white-space: nowrap; }
.stx-qrnote__go::after { content: " →"; }

/* Pro: detalle */
.stx-detail { max-width: 470px; }
.stx-detail__head { display: grid; gap: 10px; padding: 16px 16px 0; }
.stx-detail__head b { display: block; font-size: 14px; }
.stx-detail__head small { color: #6b7190; font-size: 11px; }
.stx-detail__tabs { margin: 0; }
.stx-detail__body { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 20px; padding: 16px 18px 20px; }
.stx-donut { display: grid; justify-items: center; gap: 10px; }
.stx-donut__ring {
  position: relative;
  display: grid;
  place-content: center;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: conic-gradient(#2563eb 0 78%, #dfe3ee 78% 100%);
  text-align: center;
}
.stx-donut__ring::before { content: ""; position: absolute; inset: 14px; border-radius: 50%; background: #fff; }
.stx-donut__ring b,
.stx-donut__ring small { position: relative; }
.stx-donut__ring b { font-size: 20px; font-weight: 900; }
.stx-donut__ring small { color: #6b7190; font-size: 10px; }
.stx-donut__leg { display: grid; gap: 4px; font-size: 10.5px; color: #3a4170; }
.stx-donut__leg > span { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.stx-donut__leg i { width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.stx-hbars { display: grid; gap: 12px; }
.stx-hbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 8px; font-size: 11px; color: #3a4170; }
.stx-hbar > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stx-hbar b { grid-column: 2; grid-row: 1; color: #070d38; font-weight: 800; }
.stx-hbar i { position: relative; grid-column: 1 / -1; height: 8px; overflow: hidden; border-radius: 6px; background: #f0f1f6; }
.stx-hbar i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--w) * 2%); border-radius: 6px; background: linear-gradient(90deg, #FB2B7D, #ff7aa8); }

/* Business: equipo */
.stx-team { max-width: 480px; padding-bottom: 8px; }
.stx-team__head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid #eef0f5; }
.stx-team__head img { border-radius: 7px; }
.stx-team__head > span:nth-child(2) { flex: 1; min-width: 0; }
.stx-team__head b { display: block; font-size: 13px; }
.stx-team__head small { color: #6b7190; font-size: 10.5px; }
.stx-team__cols,
.stx-team__row {
  display: grid;
  grid-template-columns: 16px 30px minmax(0, 1fr) 58px 40px 40px;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
}
.stx-team__cols { padding-top: 10px; padding-bottom: 4px; color: #8a90a6; font-size: 9.5px; font-weight: 800; letter-spacing: .05em; text-align: right; text-transform: uppercase; }
.stx-team__cols > span:first-child { grid-column: 1 / 4; }
.stx-team__cols span[class] { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.stx-team__cols span[class]::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.stx-team__row { padding-top: 10px; padding-bottom: 10px; border-top: 1px solid #f3f4f8; }
.stx-team__row em { color: #8a90a6; font-size: 11px; font-style: normal; font-weight: 800; }
.stx-team__row:nth-of-type(3) em { color: #d99b00; }
.stx-team__row .ux-av { width: 30px; height: 30px; }
.stx-team__who { display: grid; min-width: 0; }
.stx-team__who b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.stx-team__who small { color: #6b7190; font-size: 10px; }
.stx-team__who i { position: relative; display: block; height: 5px; margin-top: 5px; overflow: hidden; border-radius: 4px; background: #f0f1f6; }
.stx-team__who i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--w) * 1%); border-radius: 4px; background: linear-gradient(90deg, #6D4AFF, #2563eb); }
.stx-team__row > b { color: #070d38; font-size: 12.5px; font-weight: 800; text-align: right; }

/* Escalera de niveles */
.stx-ladder {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.stx-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 22px 20px 20px;
  border: 1px solid #e6e8f2;
  border-radius: 20px 20px 6px 6px;
  background: #fff;
}
.stx-step--1 { min-height: 260px; }
.stx-step--2 { min-height: 310px; }
.stx-step--3 { min-height: 360px; }
.stx-step--4 { min-height: 410px; border-color: #2563eb; background: #2563eb; color: #fff; }
.stx-step h3 { margin: 6px 0 0; font-size: 22px; font-weight: 900; letter-spacing: -.4px; }
.stx-step p { margin: 0; color: #5b6280; font-size: 15px; line-height: 1.5; }
.stx-step--4 p { color: rgb(255 255 255 / 88%); }
.stx-step--4 .px-tag--ent { background: #fff; color: #070d38; }
.stx-step + .stx-step::before {
  content: "+";
  position: absolute;
  left: -19px;
  top: 22px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #6D4AFF;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}
.stx-step__viz { display: flex; align-items: flex-end; gap: 6px; width: 100%; margin-top: auto; padding-top: 18px; }
.stx-viz-kpi i { flex: 1; height: 34px; border-radius: 9px; background: #f4f5f9; box-shadow: inset 3px 0 0 var(--c); }
.stx-viz-bars { height: 72px; }
.stx-viz-bars i { flex: 1; height: calc(var(--h) * 1%); border-radius: 4px 4px 1px 1px; background: linear-gradient(180deg, #FB2B7D, #ffb3cf); }
.stx-viz-team img { width: 34px; height: 34px; border: 2px solid #fff; border-radius: 50%; object-fit: cover; box-shadow: 0 4px 10px rgb(16 24 64 / 14%); }
.stx-viz-team img + img { margin-left: -14px; }
.stx-viz-org { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.stx-viz-org i { height: 14px; border-radius: 4px; background: rgb(255 255 255 / 18%); }
.stx-viz-org i:nth-child(3n+1) { background: rgb(109 74 255 / 70%); }
.stx-viz-org i:nth-child(4n+2) { background: rgb(37 99 235 / 70%); }
.stx-ladder__more { margin: 26px 0 0; text-align: center; }
.stx-ladder__more a { color: #6D4AFF; font-size: 15px; font-weight: 800; text-decoration: none; }
.stx-ladder__more a::after { content: " →"; }

@media (max-width: 1080px) {
  .stx-ladder { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 18px; }
  .stx-step--1, .stx-step--2 { min-height: 250px; }
  .stx-step--3, .stx-step--4 { min-height: 290px; }
  .stx-step:nth-child(3)::before { display: none; }
}
@media (max-width: 899px) {
  .stx-hero { max-width: 640px; margin: 0 auto; }
  .stx-lanes { grid-template-columns: minmax(0, 1fr); max-width: 460px; gap: 26px; }
  .stx-qrnote { grid-template-columns: auto minmax(0, 1fr); }
  .stx-qrnote__go { grid-column: 2; }
}
@media (max-width: 560px) {
  .stx-hero { padding-bottom: 48px; }
  .stx-hero__chip { left: 6px; }
  .stx-dash__top { flex-direction: column; }
  .stx-kpi { padding: 8px 8px 8px 10px; }
  .stx-kpi b { font-size: 17px; }
  .stx-kpi small { font-size: 9px; }
  .stx-bars { gap: 2px; height: 96px; }
  .stx-bars i { max-width: 4px; }
  .stx-detail__body { grid-template-columns: minmax(0, 1fr); justify-items: stretch; }
  .stx-donut { grid-template-columns: auto auto; justify-content: center; align-items: center; gap: 16px; }
  .stx-team__cols,
  .stx-team__row { grid-template-columns: 12px 26px minmax(0, 1fr) 50px 30px 30px; gap: 6px; padding-left: 12px; padding-right: 12px; }
  .stx-team__row .ux-av { width: 26px; height: 26px; }
  .stx-ladder { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .stx-step--1, .stx-step--2, .stx-step--3, .stx-step--4 { min-height: 0; }
  .stx-step + .stx-step::before,
  .stx-step:nth-child(3)::before { display: block; left: 50%; top: -19px; transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .stx-pipe i { animation: none; top: 20px; }
}
