/* Integraciones y automatización: escenas propias. Todas las clases llevan el prefijo ig-. */

/* ── Portada: una venta pagada que, sola, emite boleta, crea despacho y descuenta stock ── */
/* El mosaico de la portada es siempre claro: los colores van fijos, sin depender del tema. */
html:not(.ph-oscura) .ig-stage { padding-inline: clamp(24px, 3vw, 48px); }
.ig-flow { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1.32fr); align-items: center; column-gap: clamp(26px, 2.8vw, 44px); width: min(100%, 640px); }
.ig-wires { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.ig-wires path { fill: none; stroke: #7c8a00; stroke-width: 2; stroke-linecap: round; stroke-opacity: .7; }
.ig-wires circle { fill: #c8d400; stroke: #283850; stroke-width: 2.5; opacity: 0; }
.ig-order { position: relative; z-index: 1; display: grid; justify-items: start; gap: 3px; padding: 20px 18px; border-radius: 18px; font-size: 1rem; box-shadow: 0 18px 44px rgba(29, 42, 61, .14); }
.ig-order-k { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: .875rem; font-weight: 600; color: #5f6800; }
.ig-order-k svg { width: 18px; height: 18px; }
.ig-order-t { font-size: 1.0625rem; font-weight: 600; line-height: 1.2; }
.ig-order-n { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.ig-paid { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; padding: 4px 11px 4px 8px; border-radius: 999px; background: #e3f5ea; color: #13703a; font-size: .8125rem; font-weight: 600; }
.ig-paid svg { width: 14px; height: 14px; }
.ig-hub { position: relative; z-index: 1; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: #000000; box-shadow: 0 0 0 6px rgba(200, 212, 0, .4); }
.ig-hub img { width: 34px; }
.ig-outs { position: relative; z-index: 1; display: grid; gap: 8px; }
.ig-out { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; box-shadow: 0 10px 28px rgba(29, 42, 61, .1); }
.ig-ico { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: #c8d400; color: #1d2a3d; }
.ig-ico svg { width: 19px; height: 19px; }
.ig-tx { display: grid; min-width: 0; }
.ig-tx b { font-size: 1rem; font-weight: 600; line-height: 1.2; }
.ig-tx small { font-size: .8125rem; line-height: 1.25; color: #4f5c70; }
.ig-out .ok { flex: none; margin-left: auto; width: 20px; height: 20px; color: #178a45; }
.ig-left { font-variant-numeric: tabular-nums; }
.ig-puzzle { width: clamp(92px, 8.4vw, 132px); right: clamp(12px, 1.8vw, 28px); top: clamp(8px, 1.2vw, 18px); }
.ig-toast { position: absolute; z-index: 4; left: clamp(14px, 2.4vw, 40px); bottom: clamp(18px, 2.4vw, 32px); display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 12px; border-radius: 16px; font-size: .9375rem; box-shadow: 0 18px 44px rgba(29, 42, 61, .24); }
.ig-toast b { display: block; font-size: 1rem; font-weight: 600; }
.ig-msg { color: var(--ui-soft); }

/* ── El mapa: tu web al centro y seis sistemas alrededor ── */
.ig-map-tile { padding: clamp(28px, 3.6vw, 56px) clamp(20px, 3vw, 48px); }
.ig-map { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, .72fr) minmax(0, 1fr); align-items: center; column-gap: clamp(48px, 7vw, 120px); width: 100%; max-width: 1120px; margin-inline: auto; }
.ig-map-wires { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.ig-map-wires path { fill: none; stroke: var(--brand); stroke-width: 1.8; stroke-opacity: .45; stroke-dasharray: 3 6; stroke-linecap: round; }
.ig-map-wires circle { fill: var(--lime); stroke: var(--navy); stroke-width: 2.5; opacity: 0; }
html.dark .ig-map-wires circle { stroke: #0b111b; }
.ig-col { position: relative; z-index: 1; display: grid; gap: 14px; }
.ig-node { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 18px; background: var(--bg); color: var(--ink); transition: box-shadow .3s ease, translate .3s var(--ease-out); }
.ig-node .ico-box { background: var(--lime); color: var(--on-lime); transition: background-color .3s ease, color .3s ease; }
.ig-node-tx { min-width: 0; }
.ig-node-tx b { display: block; font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; }
.ig-node-tx small { display: block; margin-top: 2px; font-size: .875rem; line-height: 1.3; color: var(--soft); }
.ig-node.is-on { translate: 0 -3px; box-shadow: 0 0 0 2px var(--lime), 0 14px 30px rgba(29, 42, 61, .1); }
.ig-node.is-on .ico-box { background: var(--navy); color: var(--lime); }
html.dark .ig-node.is-on .ico-box { background: var(--lime); color: var(--on-lime); }
.ig-core { position: relative; z-index: 1; display: grid; justify-items: center; gap: 2px; padding: 30px 20px 26px; border-radius: 26px; background: var(--navy); color: #ffffff; text-align: center; box-shadow: 0 0 0 8px rgba(200, 212, 0, .28); }
html.dark .ig-core { background: #24344d; }
.ig-core-ico { display: grid; place-items: center; width: 66px; height: 66px; margin-bottom: 10px; border-radius: 18px; background: #000000; }
.ig-core-ico img { width: 40px; }
.ig-core b { font-size: 1.3125rem; font-weight: 600; letter-spacing: -0.018em; line-height: 1.2; }
.ig-core small { font-size: .9375rem; color: #c8d1dc; }
.ig-map-3d { width: clamp(80px, 7vw, 112px); right: clamp(12px, 1.6vw, 24px); top: clamp(10px, 1.2vw, 18px); }

/* ── El recorrido: mini pantallas de cada paso ── */
.ig-mini { gap: 6px; }
.ig-mini-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.ig-mini-head b { font-weight: 600; color: var(--ui-ink); }
.ig-pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; background: var(--lime); color: #1d2a3d; font-size: .8125rem; font-weight: 600; white-space: nowrap; }
.ig-pill svg { width: 13px; height: 13px; }
.ig-pill.is-ok { background: #e3f5ea; color: #13703a; }
html.dark .ig-pill.is-ok { background: rgba(127, 227, 174, .14); color: #7fe3ae; }
.ig-mini-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 9px; background: var(--tile); font-size: .8125rem; line-height: 1.25; }
.ig-mini-row span { color: var(--ui-soft); }
.ig-mini-row b { font-weight: 600; color: var(--ui-ink); text-align: right; }
.ig-label { display: flex; align-items: stretch; justify-content: space-between; height: 34px; padding: 7px 12px; border-radius: 9px; background: var(--tile); }
.ig-label span { flex: none; width: 3px; border-radius: 1px; background: var(--ui-ink); }
.ig-label span:nth-child(3n) { width: 6px; }
.ig-label span:nth-child(4n) { width: 2px; }
.ig-label span:nth-child(5n) { width: 5px; opacity: .7; }
.rstep.is-on .ig-pill { scale: 1.08; }
.ig-pill { transition: scale .3s var(--ease-out); }

/* ── Con qué conectamos: cuatro grupos de herramientas, solo con su nombre ── */
.ig-tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.ig-group { padding: clamp(22px, 2.2vw, 30px); }
.ig-group-h { display: flex; align-items: center; gap: 12px; font-size: clamp(1.25rem, 1.05rem + .6vw, 1.625rem); font-weight: 600; letter-spacing: -0.022em; line-height: 1.15; }
.ig-group .ico-box { background: var(--lime); color: var(--on-lime); }
.t-lime.ig-group .ico-box { background: var(--navy); color: var(--lime); }
.ig-list { display: grid; gap: 8px; margin-top: 18px; padding: 0; list-style: none; }
.ig-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 10px 12px 10px 16px; border-radius: 13px; background: var(--bg); transition: box-shadow .3s ease, translate .3s var(--ease-out); }
.ig-list b { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em; }
.t-lime .ig-list li { background: rgba(255, 255, 255, .6); color: #1d2a3d; }
.ig-on { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px 3px 7px; border-radius: 999px; background: #e3f5ea; color: #13703a; font-size: .8125rem; font-weight: 600; white-space: nowrap; }
.ig-on svg { width: 13px; height: 13px; }
html.dark .t-white .ig-on { background: rgba(127, 227, 174, .14); color: #7fe3ae; }
.ig-list li.is-hit { translate: 4px 0; box-shadow: 0 0 0 2px var(--lime); }
.t-lime .ig-list li.is-hit { box-shadow: 0 0 0 2px var(--navy); }
.ig-other { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: var(--t-small); font-weight: 600; line-height: 1.3; }
.ig-other svg { flex: none; width: 18px; height: 18px; }

/* Preguntas: el título vigente es largo; se le da más ancho para que quepa en dos líneas. */
@media (min-width: 1024px) {
  #preguntas.faq { grid-template-columns: 5fr 7fr; }
}
@media (max-width: 1023px) {
  .ig-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ig-map { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 10px; }
  .ig-col { display: contents; }
  .ig-core { grid-column: 1 / -1; order: -1; margin-bottom: 14px; padding: 22px 18px; box-shadow: none; }
  .ig-map-wires { display: none; }
}
@media (max-width: 720px) {
  html:not(.ph-oscura) .ig-stage { padding-bottom: 104px; }
  .ig-flow { grid-template-columns: minmax(0, 1fr); justify-items: center; row-gap: 28px; }
  .ig-order { justify-self: stretch; padding: 16px; }
  .ig-order-n { font-size: 1.25rem; }
  .ig-outs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; width: 100%; }
  .ig-out { flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px 12px; text-align: center; }
  .ig-out .ok { position: absolute; right: 6px; top: 6px; width: 16px; height: 16px; margin: 0; }
  .ig-tx b { font-size: .875rem; }
  .ig-tx small { font-size: .8125rem; }
  html:not(.ph-oscura) .ph-stage .ig-puzzle { width: 64px; right: 10px; top: 8px; }
  html:not(.ph-oscura) .ph-stage .ig-toast { left: 10px; right: 10px; bottom: 14px; }
  .ig-node { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; }
  .ig-node .ico-box { width: 36px; height: 36px; border-radius: 11px; }
  .ig-node-tx b { font-size: 1.0625rem; }
  .ig-node-tx small { font-size: .8125rem; }
  .ig-map-3d { width: 64px; }
}
@media (max-width: 560px) {
  .ig-tools { grid-template-columns: minmax(0, 1fr); }
}
