/* [CEREBRO SAP · RUTA VIVA] «Mira cómo lo estoy buscando» — una ventana al trabajo de Brainmore.
 * La ventana es oscura en los dos temas (es un holograma: la luz son los datos). Movimiento calmo: nada rebota,
 * nada gira sin motivo; con `prefers-reduced-motion` sólo cambian colores y textos.
 * Marca buscable: ruta_viva_pantalla
 */
.rv {
  --rv-bg0: #050914;
  --rv-bg1: #0A1124;
  --rv-bg2: #111B36;
  --rv-borde: rgba(148, 163, 184, .16);
  --rv-texto: #E7EDF8;
  --rv-suave: #9AA8C1;
  --rv-tenue: #5B6B88;
  --rv-verde: #34D399;
  --rv-azul: #60A5FA;
  --rv-ambar: #FBBF24;
  --rv-rojo: #F87171;
  --rv-gris: #64748B;
  --rv-violeta: #A78BFA;
  position: relative;
  margin: 14px 0 12px;
  border-radius: 20px;
  border: 1px solid var(--rv-borde);
  color: var(--rv-texto);
  background:
    radial-gradient(120% 90% at 12% 10%, rgba(59, 130, 246, .20), transparent 55%),
    radial-gradient(80% 70% at 92% 100%, rgba(124, 58, 237, .16), transparent 60%),
    linear-gradient(180deg, var(--rv-bg2) 0%, var(--rv-bg1) 45%, var(--rv-bg0) 100%);
  box-shadow: 0 24px 60px -28px rgba(2, 6, 23, .7), 0 2px 0 rgba(255, 255, 255, .04) inset;
  overflow: hidden;
  isolation: isolate;
  font-feature-settings: "tnum" 1;
  animation: rv-aparece .5s cubic-bezier(.2, .8, .2, 1);
}
.rv[hidden] { display: none !important; }
@keyframes rv-aparece { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── cabecera ─────────────────────────────────────────────────────────────── */
.rv-cab {
  display: flex; align-items: center; gap: 12px; justify-content: space-between;
  padding: 12px 14px 8px 16px; position: relative; z-index: 3;
}
.rv-resumen {
  all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 auto;
  cursor: default; border-radius: 10px; padding: 2px 4px;
}
.rv.is-final .rv-resumen, .rv.is-compacto .rv-resumen { cursor: pointer; }
.rv-resumen:focus-visible { outline: 2px solid var(--rv-azul); outline-offset: 2px; }
.rv-vivo {
  width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--rv-azul);
  box-shadow: 0 0 0 0 rgba(96, 165, 250, .55); animation: rv-late 1.8s ease-out infinite;
}
.rv.is-final .rv-vivo, .rv.is-compacto .rv-vivo { background: var(--rv-verde); animation: none; box-shadow: 0 0 10px rgba(52, 211, 153, .6); }
.rv.is-con-avisos .rv-vivo { background: var(--rv-ambar); box-shadow: 0 0 10px rgba(251, 191, 36, .5); }
@keyframes rv-late { 0% { box-shadow: 0 0 0 0 rgba(96, 165, 250, .55); } 70% { box-shadow: 0 0 0 9px rgba(96, 165, 250, 0); } 100% { box-shadow: 0 0 0 0 rgba(96, 165, 250, 0); } }
.rv-titulo { font-size: 13.5px; font-weight: 650; letter-spacing: .01em; white-space: nowrap; color: var(--rv-texto); }
.rv.is-final .rv-titulo { color: #BBF7D0; }
.rv.is-con-avisos .rv-titulo { color: #FDE68A; }
.rv-camino {
  font-size: 12.5px; color: var(--rv-suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
  opacity: 0; transition: opacity .4s;
}
.rv.is-compacto .rv-camino { opacity: 1; }
.rv-chevron { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--rv-suave); stroke-width: 1.8; stroke-linecap: round;
  stroke-linejoin: round; transform: rotate(180deg); transition: transform .35s; opacity: 0; }
.rv.is-final .rv-chevron, .rv.is-compacto .rv-chevron { opacity: 1; }
.rv.is-compacto .rv-chevron { transform: none; }

.rv-controles { display: flex; align-items: center; gap: 8px; flex: none; }
.rv-niveles {
  display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(15, 23, 42, .6);
  border: 1px solid var(--rv-borde);
}
.rv-niveles button {
  all: unset; cursor: pointer; font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; color: var(--rv-suave);
  transition: background .25s, color .25s;
}
.rv-niveles button[aria-checked="true"] { background: rgba(96, 165, 250, .18); color: #DBEAFE; box-shadow: inset 0 0 0 1px rgba(96, 165, 250, .35); }
.rv-niveles button:focus-visible { outline: 2px solid var(--rv-azul); }
.rv-voybien {
  all: unset; cursor: pointer; font-size: 12px; font-weight: 600; color: #FDE68A; padding: 5px 11px; border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, .35); background: rgba(251, 191, 36, .08); transition: background .25s;
}
.rv-voybien:hover { background: rgba(251, 191, 36, .16); }
.rv-voybien:focus-visible { outline: 2px solid var(--rv-ambar); outline-offset: 2px; }
.rv-voybien[hidden] { display: none; }
.rv.is-compacto .rv-controles { display: none; }

/* ── cuerpo plegable ──────────────────────────────────────────────────────── */
.rv-cuerpo { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .6s cubic-bezier(.2, .8, .2, 1); }
.rv.is-compacto .rv-cuerpo { grid-template-rows: 0fr; }
.rv-cuerpo-in { min-height: 0; overflow: hidden; }

/* ── la escena ────────────────────────────────────────────────────────────── */
.rv-escena { position: relative; height: 300px; margin: 0 8px; border-radius: 14px; overflow: hidden; transition: height .5s; }
.rv-escena::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .055) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse at 40% 50%, #000 30%, transparent 80%);
  mask-image: radial-gradient(ellipse at 40% 50%, #000 30%, transparent 80%);
}
.rv-escena::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(5, 9, 20, .55) 100%);
}
.rv-svg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; overflow: visible; }
.rv-capa { position: absolute; inset: 0; z-index: 3; }

/* el Cerebro de fondo: desenfocado y tenue; la zona de la pregunta, nítida */
.rv-fondo { filter: blur(1.1px); opacity: .9; }
.rv-anillo { fill: none; stroke: rgba(148, 163, 184, .10); stroke-width: 1; stroke-dasharray: 2 6; vector-effect: non-scaling-stroke; }
.rv-polvo { fill: rgba(147, 197, 253, .35); }
.rv-radio { stroke: rgba(148, 163, 184, .12); stroke-width: 1; vector-effect: non-scaling-stroke; }
.rv-zona.is-cerca .rv-area:not(.is-foco) .rv-area-txt { opacity: 0; }
.rv-zona .rv-area-txt { transition: opacity .6s; }
.rv-area { opacity: .26; filter: blur(1.3px); transition: opacity .8s, filter .8s; }
.rv-area .rv-area-punto { fill: #64748B; }
.rv-area .rv-area-halo { fill: none; stroke: transparent; stroke-width: 1.2; }
.rv-area-txt { fill: #94A3B8; font-size: 11px; font-weight: 600; text-anchor: middle; letter-spacing: .04em; text-transform: uppercase; }
.rv-area.is-foco { opacity: .72; filter: none; }
.rv-area.is-foco .rv-area-punto { fill: var(--rv-azul); }
.rv-area.is-principal { opacity: 1; }
.rv-area.is-principal .rv-area-halo { stroke: rgba(96, 165, 250, .55); fill: rgba(96, 165, 250, .08); }
.rv-area.is-principal .rv-area-txt { fill: #BFDBFE; }

/* el núcleo holográfico: el origen de la ruta */
.rv-nucleo .rv-orbita ellipse { fill: none; stroke: rgba(147, 197, 253, .55); stroke-width: 1; vector-effect: non-scaling-stroke; }
.rv-nucleo .rv-orbita { transform-box: fill-box; transform-origin: center; }
.rv.is-buscando .rv-nucleo .rv-orbita { animation: rv-orbita 7s linear infinite; }
.rv.is-buscando .rv-nucleo .rv-orbita-2 { animation-duration: 11s; animation-direction: reverse; }
.rv-nucleo-core { filter: drop-shadow(0 0 8px rgba(96, 165, 250, .9)); }
.rv.is-buscando .rv-nucleo-core { animation: rv-respira 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes rv-orbita { to { transform: rotate(360deg); } }
@keyframes rv-respira { 50% { transform: scale(1.08); } }

/* tramos y pulsos */
.rv-arista {
  fill: none; stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linecap: round; opacity: .75;
  stroke: rgba(96, 165, 250, .6); transition: opacity .7s;
}
.rv-arista[data-color="verificado"] { stroke: rgba(52, 211, 153, .62); }
.rv-arista[data-color="hipotesis"] { stroke: rgba(251, 191, 36, .55); stroke-dasharray: 4 5; }
.rv-arista[data-descartada] { stroke: rgba(248, 113, 113, .35); stroke-dasharray: 3 6; opacity: .45; }
.rv-relacion { stroke: rgba(167, 139, 250, .35); stroke-dasharray: 2 5; stroke-width: 1; }
.rv-pulso { fill: #E0F2FE; filter: url(#rvBrillo); }
.rv-pulso[data-color="verificado"] { fill: #D1FAE5; }
.rv-pulso[data-color="hipotesis"] { fill: #FEF3C7; }
.rv-pulso[data-k="1"] { opacity: .5; }
.rv-pulso[data-k="2"] { opacity: .22; }

/* ── las fichas (nodos) ───────────────────────────────────────────────────── */
.rv-chip {
  --c: var(--rv-azul);
  all: unset; box-sizing: border-box; position: absolute; left: 0; top: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; max-width: 240px;
  padding: 6px 12px 6px 7px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(20, 30, 58, .92), rgba(12, 19, 40, .92));
  border: 1px solid color-mix(in srgb, var(--c) 55%, transparent);
  color: var(--rv-texto);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 9%, transparent), 0 10px 26px -12px color-mix(in srgb, var(--c) 70%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: opacity .7s ease, border-color .5s, box-shadow .5s, filter .7s;
  will-change: transform;
}
.rv-chip:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.rv-chip[data-color="verificado"] { --c: var(--rv-verde); }
.rv-chip[data-color="consultando"] { --c: var(--rv-azul); }
.rv-chip[data-color="hipotesis"] { --c: var(--rv-ambar); border-style: dashed; }
.rv-chip[data-color="descartado"] { --c: var(--rv-rojo); }
.rv-chip[data-tipo="concepto"] { background: linear-gradient(180deg, rgba(49, 46, 129, .9), rgba(30, 27, 75, .92)); }
.rv-chip[data-tipo="correccion"] { background: linear-gradient(180deg, rgba(120, 83, 9, .55), rgba(40, 30, 8, .9)); }
.rv-chip[data-tipo="resultado"] { background: linear-gradient(180deg, rgba(6, 78, 59, .9), rgba(6, 45, 36, .92)); }
.rv-chip.is-rama { transform-origin: center; }
.rv-chip.is-rama .rv-txt b { font-weight: 560; }
.rv-chip.is-descartado { opacity: .36; filter: saturate(.6); }
.rv-chip.is-descartado .rv-txt b { text-decoration: line-through; text-decoration-color: rgba(248, 113, 113, .6); }
.rv-ico {
  width: 20px; height: 20px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: color-mix(in srgb, var(--c) 20%, transparent); color: var(--c);
  box-shadow: 0 0 12px color-mix(in srgb, var(--c) 45%, transparent);
}
.rv-ico svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.rv-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.18; }
.rv-txt b { font-size: 12.5px; font-weight: 640; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-txt small { display: none; font-size: 10.5px; color: var(--rv-suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.rv-chip.is-actual .rv-txt small, .rv-chip[data-tipo="consulta"] .rv-txt small,
.rv-chip[data-tipo="resultado"] .rv-txt small, .rv-chip[data-tipo="correccion"] .rv-txt small { display: block; }
.rv-chip.is-actual { z-index: 2; }
.rv-chip.is-vivo .rv-ico { animation: rv-chip-vivo 1.6s ease-in-out infinite; }
@keyframes rv-chip-vivo { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 18%, transparent), 0 0 14px color-mix(in srgb, var(--c) 55%, transparent); } }
.rv-entra { animation: rv-entra .55s cubic-bezier(.2, .8, .2, 1) backwards; }
@keyframes rv-entra { from { opacity: 0; filter: blur(4px); } to { opacity: 1; filter: none; } }
.rv-destello { animation: rv-destello 1.25s ease-out; }
@keyframes rv-destello {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .55), 0 10px 26px -12px rgba(52, 211, 153, .7); }
  100% { box-shadow: 0 0 0 14px rgba(52, 211, 153, 0), 0 10px 26px -12px rgba(52, 211, 153, .7); }
}
.rv-apaga { opacity: 0 !important; filter: blur(3px); pointer-events: none; }
.rv-retrocede { opacity: .18 !important; filter: blur(2px); pointer-events: none; transition: opacity .7s, filter .7s; }
.rv-union {
  position: absolute; left: 0; top: 0; font: 500 10px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #C4B5FD; background: rgba(15, 23, 42, .75); border: 1px solid rgba(167, 139, 250, .25); padding: 2px 6px;
  border-radius: 6px; white-space: nowrap; pointer-events: none;
}

/* la ficha de un nodo */
.rv-ficha {
  position: absolute; z-index: 6; width: 240px; padding: 12px 14px 12px; border-radius: 14px;
  background: rgba(10, 16, 34, .96); border: 1px solid rgba(148, 163, 184, .22);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .7); font-size: 12.5px; color: var(--rv-suave);
  animation: rv-entra .25s ease both;
}
.rv-ficha[hidden] { display: none; }
.rv-ficha p { margin: 4px 0 0; line-height: 1.4; }
.rv-ficha-t { display: flex; align-items: center; gap: 8px; margin: 0 22px 0 0 !important; color: var(--rv-texto); font-weight: 650; font-size: 13px; }
.rv-ficha .rv-ico { --c: var(--rv-azul); }
.rv-ficha .rv-ico[data-color="verificado"] { --c: var(--rv-verde); }
.rv-ficha .rv-ico[data-color="hipotesis"] { --c: var(--rv-ambar); }
.rv-ficha .rv-ico[data-color="descartado"] { --c: var(--rv-rojo); }
.rv-ficha-e { font-weight: 650; font-size: 11.5px; color: var(--rv-azul); }
.rv-ficha-e[data-color="verificado"] { color: var(--rv-verde); }
.rv-ficha-e[data-color="hipotesis"] { color: var(--rv-ambar); }
.rv-ficha-e[data-color="descartado"] { color: var(--rv-rojo); }
.rv-ficha-s { color: var(--rv-tenue); font-size: 11.5px; }
.rv-ficha-d { color: var(--rv-texto); }
.rv-ficha-x { all: unset; cursor: pointer; position: absolute; top: 8px; right: 10px; font-size: 16px; color: var(--rv-suave); }

/* ── pie: frase, descubrimiento, corrección, qué comprobé ─────────────────── */
.rv-pie { padding: 10px 18px 16px; position: relative; z-index: 3; }
.rv-frase { margin: 0; min-height: 24px; position: relative; font-size: 15.5px; font-weight: 600; letter-spacing: .005em; color: #F1F5FF; }
.rv-frase span { display: block; animation: rv-frase .45s cubic-bezier(.2, .8, .2, 1) .16s both; }
.rv-frase span.rv-sale { position: absolute; inset: 0 auto auto 0; animation: rv-frase-sale .22s ease both; }
@keyframes rv-frase { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes rv-frase-sale { to { opacity: 0; transform: translateY(-6px); } }
.rv.is-final .rv-frase { color: #D1FAE5; }
.rv-contadores { margin: 5px 0 0; min-height: 17px; font-size: 12.5px; color: var(--rv-suave); letter-spacing: .01em; }
.rv-sap { color: #BFDBFE; white-space: nowrap; }
.rv-sap i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--rv-azul); margin: 0 6px 1px 0;
  box-shadow: 0 0 8px var(--rv-azul); animation: rv-chip-vivo 1.4s ease-in-out infinite; }

.rv-corregir { margin-top: 12px; padding: 12px; border-radius: 14px; background: rgba(251, 191, 36, .06); border: 1px solid rgba(251, 191, 36, .25);
  animation: rv-entra .3s ease both; }
.rv-corregir[hidden] { display: none; }
.rv-corregir label { display: block; font-size: 12.5px; color: #FDE68A; margin-bottom: 8px; }
.rv-corregir-fila { display: flex; gap: 8px; flex-wrap: wrap; }
.rv-corregir input {
  flex: 1 1 220px; min-width: 0; font: inherit; font-size: 14px; color: var(--rv-texto); background: rgba(2, 6, 23, .6);
  border: 1px solid rgba(148, 163, 184, .28); border-radius: 10px; padding: 9px 12px; outline: none;
}
.rv-corregir input:focus { border-color: rgba(251, 191, 36, .6); box-shadow: 0 0 0 3px rgba(251, 191, 36, .15); }
.rv-btn { all: unset; cursor: pointer; font-size: 13px; font-weight: 600; padding: 9px 14px; border-radius: 10px; color: var(--rv-texto);
  border: 1px solid var(--rv-borde); background: rgba(148, 163, 184, .08); }
.rv-btn-primario { background: #F59E0B; color: #1C1303; border-color: transparent; }
.rv-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.rv-comprobe { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rv-borde); }
.rv-comprobe[hidden] { display: none; }
.rv-comprobe-t { margin: 8px 0 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--rv-tenue); }
.rv-comprobe-t:first-child { margin-top: 0; }
.rv-comprobe-l { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 8px; }
.rv-comprobe-l li {
  position: relative; z-index: 1; background-color: #0B1F22;
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #D1FAE5; padding: 5px 10px; border-radius: 999px;
  background: linear-gradient(rgba(52, 211, 153, .08), rgba(52, 211, 153, .08)), #0B1F22; border: 1px solid rgba(52, 211, 153, .22); animation: rv-frase .45s ease both;
}
.rv-comprobe-l li span { color: var(--rv-verde); font-weight: 800; }
.rv-comprobe-f, .rv-comprobe-c { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--rv-suave); line-height: 1.55; }
.rv-comprobe-f li.is-no, .rv-comprobe-c li.is-no { color: #FCA5A5; }
.rv-comprobe-f small { color: var(--rv-tenue); }
.rv-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; color: #C7D2FE; margin: 0; }
/* [2026-09-30] las cifras del resultado (sin ✓: son lo que el resultado declara, no un control) y lo que faltó */
.rv-comprobe-cifras { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px;
  font-size: 13px; color: var(--rv-texto); font-variant-numeric: tabular-nums; }
.rv-comprobe-cifras li::before { content: "·"; color: var(--rv-tenue); margin-right: 6px; }
.rv-comprobe-falta { margin: 8px 0 0; padding: 6px 10px; border-radius: 10px; font-size: 13px; color: #FDE68A;
  background: rgba(251, 191, 36, .08); border: 1px solid rgba(251, 191, 36, .3); }
/* el nombre de una tabla no se corta nunca */
.rv-chip[data-tipo="tabla"] { max-width: none; }
.rv-chip[data-tipo="tabla"] .rv-txt b { overflow: visible; text-overflow: clip; }
.rv-ficha-u { margin: 2px 0 0; padding-left: 16px; font-size: 11.5px; }
/* ── [2026-09-30] el SQL exacto: ver, copiar, corregir ─────────────────────── */
.rv-sql { margin: 6px 0 10px; border: 1px solid var(--rv-borde); border-radius: 12px; background: rgba(2, 6, 23, .55); overflow: hidden; }
.rv-sql-cab { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  padding: 7px 8px 7px 12px; font-size: 12.5px; color: var(--rv-suave); border-bottom: 1px solid var(--rv-borde); }
.rv-sql-acc { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.rv-sql-acc .rv-btn { padding: 6px 11px; font-size: 12.5px; }
.rv-sql-pre { max-height: 260px; overflow: auto; padding: 10px 12px; white-space: pre; tab-size: 4; font-size: 11.5px; line-height: 1.5; }
.rv-sql-editor { padding: 10px 12px 12px; border-top: 1px solid var(--rv-borde); }
.rv-sql-editor[hidden] { display: none; }
.rv-sql-l { display: block; font-size: 12.5px; color: var(--rv-suave); margin-bottom: 6px; }
.rv-sql-txt { box-sizing: border-box; width: 100%; min-height: 180px; resize: vertical; padding: 10px; border-radius: 10px;
  background: rgba(2, 6, 23, .8); border: 1px solid var(--rv-borde); color: #E0E7FF; font-size: 11.5px; line-height: 1.5; }
.rv-sql-txt:focus { outline: 2px solid var(--rv-azul); outline-offset: 1px; }
.rv-sql-fila { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.rv-sql-msg { margin: 8px 0 0; font-size: 13px; color: var(--rv-suave); min-height: 1em; }
.rv-sql-msg[data-estado="no"] { color: #FCA5A5; }
.rv-sql-msg[data-estado="ok"] { color: var(--rv-verde); }
/* el resultado de la consulta corregida vive en el área de la respuesta (tema claro de la página) */
.rv-sql-resultado { margin: 0 0 14px; padding: 14px 16px; border-radius: 14px; border: 2px solid #F59E0B;
  background: #FFFBEB; color: #1F2937; }
.rv-sql-resultado-t { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #92400E; }
.rv-sql-resultado-m { margin: 4px 0 10px; font-size: 14px; }
.rv-sql-resultado .rv-sql-tabla { max-width: 100%; overflow: auto; max-height: 360px; border: 1px solid #FDE68A; border-radius: 10px; background: #fff; }
.rv-sql-resultado table { border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.rv-sql-resultado th, .rv-sql-resultado td { padding: 6px 10px; border-bottom: 1px solid #F3F4F6; text-align: left; white-space: nowrap; }
.rv-sql-resultado th { position: sticky; top: 0; background: #FEF3C7; font-weight: 700; }
.rv-sql-resultado .rv-btn { color: #1C1303; }
.rv-sql-resultado .rv-sql-msg { color: #374151; }

/* ── la respuesta, conectada al último nodo ───────────────────────────────── */
.rv-puente {
  position: absolute; z-index: 2; width: 2px; margin-left: -1px; pointer-events: none; opacity: 0; transition: opacity .6s;
  background: linear-gradient(180deg, rgba(52, 211, 153, .9), rgba(52, 211, 153, .15));
  box-shadow: 0 0 10px rgba(52, 211, 153, .6);
}
.rv-puente2 {
  position: absolute; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .6s; box-sizing: border-box;
  border-top: 2px solid rgba(52, 211, 153, .75); border-right: 2px solid rgba(52, 211, 153, .75);
  border-top-right-radius: 12px; filter: drop-shadow(0 0 5px rgba(52, 211, 153, .5)); margin-left: -1px;
}
.rv.is-compacto .rv-puente, .rv.is-compacto .rv-puente2 { opacity: 0 !important; }
.rv-enlace { position: absolute; z-index: 30; width: 2px; margin-left: -1px; pointer-events: none; opacity: 0; transition: opacity .5s; }
.rv-enlace i { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(52, 211, 153, .5), rgba(52, 211, 153, .95));
  box-shadow: 0 0 10px rgba(52, 211, 153, .6); border-radius: 2px; }
.rv-enlace b { position: absolute; left: 50%; bottom: -5px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%;
  background: #34D399; box-shadow: 0 0 0 4px rgba(52, 211, 153, .22), 0 0 14px rgba(52, 211, 153, .8); }
#resultado.rv-con-ruta > .thinking { display: none; }
/* [DECISIÓN DEL DUEÑO · 4.15.0] mientras se busca, la portada «Tu empresa, conectada» no se ve debajo de la ruta */
html.rv-buscando #capacidades { display: none !important; }
#resultado.rv-conectada { position: relative; }
#resultado.rv-conectada::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; border-radius: 2px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(52, 211, 153, .85), transparent);
  box-shadow: 0 0 14px rgba(52, 211, 153, .6); animation: rv-conecta 2.6s ease both;
}
@keyframes rv-conecta { 0% { opacity: 0; transform: scaleX(.2); } 25% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* ── compacto: «¿Cómo llegué a esto?» ──────────────────────────────────────── */
.rv.is-compacto { background: linear-gradient(180deg, var(--rv-bg2), var(--rv-bg1)); }
.rv.is-compacto .rv-cab { padding: 10px 14px 10px 16px; }
.rv.is-compacto .rv-titulo { color: var(--rv-texto); }

/* ── teléfono (390 px) ────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .rv { margin: 10px 0; border-radius: 18px; }
  .rv-cab { flex-wrap: wrap; gap: 8px; padding: 12px 12px 6px 14px; }
  .rv-resumen { flex-basis: 100%; }
  .rv-controles { width: 100%; justify-content: space-between; }
  .rv.is-compacto .rv-resumen { flex-wrap: nowrap; }
  .rv-escena { margin: 0 6px; }
  .rv-chip { max-width: min(300px, 86vw); padding: 5px 10px 5px 6px; gap: 6px; }
  .rv-txt b { font-size: 11.5px; }
  .rv-pie { padding: 10px 14px 14px; }
  .rv-frase { font-size: 15px; }
  .rv-ficha { width: 220px; }
}

/* en el teléfono las ramas son sólo su ícono (la actual dice su nombre): el hilo principal queda legible */
.rv.is-movil .rv-chip.is-rama:not(.is-actual) { padding: 5px; gap: 0; }
.rv.is-movil .rv-chip.is-rama:not(.is-actual) .rv-txt { display: none; }
.rv.is-movil .rv-union { display: none; }

@media (prefers-reduced-motion: reduce) {
  .rv, .rv *, .rv *::before, .rv *::after { animation: none !important; transition: none !important; }
}

/* [2026-09-30] la evidencia de una corrección (en el área de la respuesta, tema claro) */
.rv-ev { margin-top: 12px; padding-top: 10px; border-top: 1px dashed #FCD34D; }
.rv-ev-t { margin: 0 0 6px; font-size: 13px; font-weight: 800; color: #78350F; display: flex; align-items: center; gap: 8px; }
.rv-ev-st { margin: 10px 0 6px; font-size: 12px; font-weight: 700; color: #92400E; }
.rv-ev-riesgo { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #E5E7EB; color: #374151; }
.rv-ev-riesgo[data-riesgo="medio"] { background: #FEF3C7; color: #92400E; }
.rv-ev-riesgo[data-riesgo="alto"] { background: #FEE2E2; color: #991B1B; }
.rv-ev-porque { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.5; }
.rv-ev-diff { margin-top: 10px; font-size: 12.5px; }
.rv-ev-diff summary { cursor: pointer; color: #92400E; font-weight: 600; }
.rv-ev-diff pre { margin-top: 6px; padding: 10px; border-radius: 10px; background: #111827; color: #E5E7EB; overflow: auto;
  max-height: 280px; white-space: pre; font-size: 11.5px; }
.rv-ev-mas { color: #6EE7B7; }
.rv-ev-menos { color: #FCA5A5; }
