/* Landing de Consilius. Tokens y componentes de la app según DESIGN.md (rama claude/concilium-redesign-57a599);
   la escala tipográfica grande y los botones de 44 px son propios de la landing. Archivo aparte: la CSP no permite estilos en línea.
   Excepciones decididas por Alejandro solo para la landing: Atlas con cara, paneles azules decorativos, fondo de luz que sigue
   al cursor y responde al clic, héroe en un patio de carga de plastilina e imágenes de carga discretas en los paneles azules. */
@font-face { font-family: Inter; src: url(inter.woff2) format("woff2"); font-weight: 400 600; font-display: swap; }

:root {
  color-scheme: light;
  --paper: #FFFFFF;
  --canvas: #F3F5F7;
  --bubble: #F0F0F0;
  --wash: #F3F3F3;
  --hover: #F7F7F7;
  --side: #FCFBFC;
  --ink: #232629;
  --ink-2: #6E7073;
  --ink-wash: #5C5F63;
  --line: #EEEFF1;
  --line-2: #E6E7E9;
  --edge: #D1D3D6;
  --blue: #276DF0;
  --blue-hover: #1F5FD8;
  --blue-bg: #E6EEFF;
  --blue-ink: #265ABF;
  --blue-line: #C9D5EE;
  --green-bg: #E0FCED;
  --green-ink: #027D53;
  --green-edge: #55D491;
  --violet: #9162F9;
  --violet-bg: #F5F0FF;
  --violet-ink: #613FB1;
  --ai-text: #6C63C9;
  --ai-label: #5F6AB5;
  --ai-label-bg: #F8F8FA;
  --yellow-bg: #FDF7C5;
  --yellow-ink: #5A5805;
  --yellow-tile: #FFF3CC;
  --pink-bg: #FEECF3;
  --pink-ink: #B81C5D;
  --red-ink: #B3261E;
  --font-ui: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --e1: 0 1px 2px rgba(28, 36, 64, .05);
  --e2: 0 1px 2px rgba(28, 36, 64, .05), 0 4px 16px rgba(28, 36, 64, .04);
  --e3: 0 2px 4px rgba(28, 36, 64, .04), 0 12px 40px rgba(28, 36, 64, .08);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-std: cubic-bezier(.2, 0, 0, 1);
  --flow: #FBFBFB;
  --col: #FDFDFD;
  --active: #EDEFF1;
  --ink-3: #979797;
  --dot: #BABBBC;
  --rail: #EEF1F0;
  --rail-fill: #CDCED2;
  --green: #0FC67D;
  --green-port: #02AD6E;
  --green-stat: #F4FCF7;
  --green-stat-ink: #125030;
  --green-stat-label: #3B7A5D;
  --red-stat: #FFF8F8;
  --red-stat-ink: #6B2926;
  --red-stat-label: #A5484D;
  --amber: #F4A400;
  --cyan-bg: #DDF7FF;
  --cyan-ink: #086C87;
  --t-xs: 12px/16px;
  --t-sm: 12.5px/18px;
  --t-md: 14px/20px;
  --t-lg: 16px/24px;
  --bar-h: 50px;
  --ctl-h: 30px;
  --node-w: 272px;
  --node-h: 68px;
  --run-panel-w: 328px;
  --r-ctl: 8px;
  --r-row: 10px;
  --r-card: 12px;
  --r-panel: 14px;
  --d-base: 200ms;
  --d-slow: 320ms;
  --d-move: 480ms;
  --d-camera: 640ms;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/28px var(--font-ui); -webkit-font-smoothing: antialiased; }
a { color: var(--blue-ink); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
[hidden] { display: none !important; }

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1 { max-width: 19em; font-size: clamp(34px, 4.2vw, 54px); line-height: 1.07; font-weight: 600; letter-spacing: -.035em; text-wrap: pretty; }
h2 { font-size: clamp(26px, 3.2vw, 38px); line-height: 1.16; font-weight: 600; letter-spacing: -.025em; max-width: 24em; text-wrap: balance; }
h3 { font-size: 18px; line-height: 26px; font-weight: 600; letter-spacing: -.01em; }

.marco { max-width: 1120px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 32px); }
.saltar { position: absolute; left: 16px; top: -48px; padding: 8px 12px; background: var(--paper); border-radius: 8px; z-index: 6; }
.saltar:focus { top: 8px; }

/* Controles */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border: 0; border-radius: 8px; background: linear-gradient(180deg, #4A87F7 0%, var(--blue) 54%, #1F5FD8 100%); color: #fff; font: 500 15px/20px var(--font-ui); text-decoration: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .42), 0 1px 2px rgba(20, 50, 130, .35); }
.btn:hover { background: linear-gradient(180deg, #3F7DF0 0%, var(--blue-hover) 58%, #1A54C4 100%); }
.btn-chico { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn-linea { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 18px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--paper); color: var(--ink); font-size: 15px; line-height: 20px; font-weight: 500; text-decoration: none; box-shadow: var(--e1); transition: background 120ms var(--ease-std); }
.btn-linea:hover { background: var(--hover); }
.btn-callado { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 10px; border: 0; border-radius: 8px; background: none; color: var(--ink-2); font: 500 14px/20px var(--font-ui); text-decoration: none; transition: background 120ms var(--ease-std), color 120ms var(--ease-std); }
.btn-callado:hover { background: var(--hover); color: var(--ink); }
.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* Cabecera */
.cabecera { position: sticky; top: 0; z-index: 5; background: rgba(255, 255, 255, .74); -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); }
.por-inducta { display: inline-flex; align-items: center; gap: 6px; margin-left: -12px; padding-left: 12px; border-left: 1px solid var(--line-2); color: var(--ink-2); font-size: 13px; line-height: 18px; text-decoration: none; }
.por-inducta img { display: block; width: 60px; height: 18px; }
.pie-logo { display: inline-block; margin-bottom: 8px; }
.pie-logo img { display: block; width: 87px; height: 26px; }
.cabecera-fila { display: flex; align-items: center; gap: 24px; min-height: 60px; }
.marca { display: inline-flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.marca img { display: block; width: auto; height: 26px; }
.menu { display: flex; gap: 4px; margin-right: auto; }
.menu a { padding: 6px 10px; border-radius: 8px; color: var(--ink-2); font-size: 14px; line-height: 20px; font-weight: 500; text-decoration: none; transition: background 120ms var(--ease-std), color 120ms var(--ease-std); }
.menu a:hover { background: var(--hover); color: var(--ink); }
.acciones { display: flex; align-items: center; gap: 6px; margin-left: auto; }

/* Héroe: un patio de carga de plastilina (patio.mp4, encargado a OpenRouter) bajo un cielo azul. La subida de la cámara viene
   en el video y el scroll la recorre (atlas.js); aquí solo va el paso a blanco, donde empieza el resto de la página.
   Sin JS o con movimiento reducido queda la foto fija. */
.heroe { position: relative; margin-top: -61px; }
.heroe-escena { position: relative; isolation: isolate; overflow: hidden; }
/* Velo azul para que el texto blanco se lea sobre el cielo, y velo blanco al que llega el viaje (lo enciende --r). */
.heroe-escena::before, .heroe-escena::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.heroe-escena::before { z-index: 3; background: radial-gradient(ellipse 46% 44% at 50% 52%, rgba(10, 36, 104, .34), transparent 75%), linear-gradient(180deg, rgba(16, 58, 150, .4) 0%, rgba(16, 58, 150, .3) 50%, rgba(16, 58, 150, .14) 76%, rgba(16, 58, 150, 0) 94%); }
.heroe-escena::after { z-index: 5; background: var(--paper); opacity: clamp(0, calc((var(--r, 0) - .58) / .3), 1); }
/* Unos píxeles de más por lado para que el paralaje del cursor no deje ver el borde. */
.patio { position: absolute; inset: -14px; z-index: 2; overflow: hidden; pointer-events: none; background: #5C98D6; }
.patio-foto, .patio video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.heroe-copia { position: relative; z-index: 4; display: flex; flex-direction: column; align-items: center; min-height: 100svh; padding-top: calc(61px + clamp(32px, 8vh, 96px)); padding-bottom: 40px; color: #fff; text-align: center; }
.ceja { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 9px; border-radius: 999px; background: rgba(255, 255, 255, .72); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .9), 0 1px 2px rgba(28, 36, 64, .06); color: var(--ink-wash); font-size: 14px; line-height: 20px; font-weight: 500; }
.ceja::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 0 3px var(--violet-bg); }
.heroe .ceja { background: rgba(255, 255, 255, .16); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5); color: #fff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.heroe .ceja::before { background: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .3); }
.heroe h1 { margin-top: 18px; max-width: 15em; font-size: clamp(34px, 4.8vw, 64px); line-height: 1.03; letter-spacing: -.04em; text-wrap: balance; text-shadow: 0 2px 30px rgba(10, 40, 110, .3); }
.heroe .entrada { max-width: 34em; margin-top: 18px; color: #fff; text-shadow: 0 1px 16px rgba(10, 40, 110, .5); }
.pide { display: flex; align-items: center; gap: 10px; width: min(100%, 460px); min-height: 52px; margin-top: 26px; padding: 6px 6px 6px 8px; border-radius: 16px; background: rgba(255, 255, 255, .9); box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(255, 255, 255, .7), 0 12px 32px rgba(10, 40, 110, .22); -webkit-backdrop-filter: blur(10px) saturate(1.4); backdrop-filter: blur(10px) saturate(1.4); color: var(--ink); text-align: left; }
.pide .cara { width: 32px; height: 32px; }
.pide-texto { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 15px; line-height: 22px; }
.pide-texto::after { content: ""; display: inline-block; width: 1.5px; height: 1.1em; margin-left: 2px; vertical-align: -.2em; background: var(--blue); animation: cursor 1s steps(1) infinite; }
@keyframes cursor { 50% { opacity: 0; } }
.pide .compositor-env { width: 36px; height: 36px; border-radius: 10px; }
.heroe .llamado { justify-content: center; }
.heroe .btn-linea { border-color: rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .16); color: #fff; box-shadow: none; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.heroe .btn-linea:hover { background: rgba(255, 255, 255, .26); }
.heroe .nota { color: #fff; text-shadow: 0 1px 12px rgba(10, 40, 110, .6); }
@keyframes entra { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } }
.arma .heroe-copia > * { animation: entra 900ms var(--ease) both; }
.arma .heroe h1 { animation: none; }
/* El título se escribe letra por letra (atlas.js); las letras ocultas guardan su lugar para que no brinque el renglón. */
.heroe h1 .letra:not(.vista) { visibility: hidden; }
.heroe h1 .cursor { position: relative; display: inline-block; width: 0; height: .9em; }
.heroe h1 .cursor::after { content: ""; position: absolute; left: .06em; top: .08em; width: .07em; height: .9em; border-radius: 2px; background: #fff; animation: cursor 1s steps(1) infinite; }
.arma .heroe-copia > .entrada { animation-delay: 1100ms; }
.arma .heroe-copia > .pide { animation-delay: 1300ms; }
.arma .heroe-copia > .llamado { animation-delay: 1450ms; }
.arma .heroe-copia > .nota { animation-delay: 1550ms; }
.arma .patio { translate: var(--hx, 0px) var(--hy, 0px); transition: translate 900ms var(--ease-std); }
@media (min-height: 640px) {
  .arma .heroe { height: 250vh; }
  .arma .heroe-escena { position: sticky; top: 0; height: 100svh; }
  .arma .heroe-escena::before { opacity: calc(1 - var(--r, 0) * 1.4); }
  .arma .heroe-copia { opacity: clamp(0, calc(1 - var(--r, 0) * 3.2), 1); transform: translateY(calc(var(--r, 0) * 30vh)); }
  .arma .heroe[data-arriba] .heroe-copia { visibility: hidden; }
}
@media (max-aspect-ratio: 4/5) {
  .heroe-escena::before { background: linear-gradient(180deg, rgba(16, 58, 150, .42) 0%, rgba(16, 58, 150, .36) 62%, rgba(16, 58, 150, 0) 88%); }
}

/* El clic deja una onda en el fondo: blanca sobre el patio, azul en el resto de la página. */
.onda { position: absolute; left: var(--x); top: var(--y); z-index: 3; width: 20px; height: 20px; margin: -10px; border: 1px solid rgba(39, 109, 240, .55); border-radius: 50%; background: radial-gradient(closest-side, rgba(39, 109, 240, .14), transparent); pointer-events: none; animation: onda 1200ms var(--ease) forwards; }
.heroe-escena > .onda { border-color: rgba(255, 255, 255, .95); background: radial-gradient(closest-side, rgba(255, 255, 255, .35), transparent); }
@keyframes onda { from { transform: scale(.3); opacity: 1; } to { transform: scale(16); opacity: 0; } }

/* Fondo: dos luces suaves, azul y violeta. Derivan despacio, se inclinan hacia el cursor (--lx, --ly) y bajan con el scroll (--s). */
.luz { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.luz::before, .luz::after { content: ""; position: absolute; width: 90vmax; height: 90vmax; border-radius: 50%; transition: transform 1600ms var(--ease-std); }
.luz::before { left: -18vmax; top: -52vmax; background: radial-gradient(closest-side, rgba(39, 109, 240, .12), rgba(39, 109, 240, 0)); transform: translate3d(var(--lx, 0px), calc(var(--ly, 0px) + var(--s, 0) * 30vh), 0); }
.luz::after { right: -48vmax; top: 18vh; background: radial-gradient(closest-side, rgba(145, 98, 249, .1), rgba(145, 98, 249, 0)); transform: translate3d(calc(var(--lx, 0px) * -.6), calc(var(--ly, 0px) * -.6 - var(--s, 0) * 40vh), 0); }
.arma .luz::before { animation: deriva 28s ease-in-out infinite alternate; }
.arma .luz::after { animation: deriva 34s ease-in-out -12s infinite alternate-reverse; }
@keyframes deriva { to { translate: 14vmax 9vmax; } }
.entrada { margin-top: 20px; max-width: 42em; color: var(--ink-2); font-size: clamp(17px, 1.6vw, 19px); line-height: 1.55; }
.llamado { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.nota { margin-top: 12px; max-width: 48em; color: var(--ink-2); font-size: 14px; line-height: 22px; }
figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; margin-top: 10px; color: var(--ink-2); font-size: 13px; line-height: 18px; }
.otra-vez { min-height: 28px; padding: 2px 8px; font-size: 13px; cursor: pointer; }
.burbuja { display: inline-block; padding: 7px 12px; border-radius: 14px; background: var(--bubble); color: var(--ink); font-size: 14px; line-height: 20px; }

/* Atlas */
.cara { width: 40px; height: 40px; flex: none; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--violet); }
.tag-ia { display: inline-flex; align-items: center; height: 20px; padding-inline: 5px; border: 1px solid var(--line-2); border-radius: 7px; background: var(--ai-label-bg); color: var(--ai-label); font-size: 12px; line-height: 16px; font-weight: 500; }
.azulejo { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 7px; }
.azulejo .i { width: 14px; height: 14px; }
.az-busca { background: var(--yellow-tile); color: var(--yellow-ink); }
.az-criterio { background: var(--pink-bg); color: var(--pink-ink); }
.az-evento { background: var(--blue-bg); color: var(--blue-ink); }
.az-ejecutor { background: var(--cyan-bg); color: var(--cyan-ink); }
.az-espera { background: var(--wash); color: var(--ink-wash); }

/* Panel de Atlas y tarjeta de plan: DESIGN.md 8 */
.ap-cab { display: flex; align-items: center; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.ap-nom { margin: 0 auto 0 6px; }
.ap-nom b { display: block; font-weight: 600; }
.ap-nom small { color: var(--ink-2); font-size: 12.5px; line-height: 18px; }
.carta-ui .burbuja-derecha { justify-self: end; }
.ap-plan { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: var(--e2); }
.ap-plan-cab { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.ap-plan-cab b { font-weight: 600; }
.ap-datos { font-size: 12.5px; line-height: 18px; font-variant-numeric: tabular-nums; }
.ap-datos div { display: flex; justify-content: space-between; gap: 12px; padding-block: 4px; }
.ap-datos dt { color: var(--ink-2); }
.ap-datos dd { text-align: right; }
.ap-aprobar { justify-self: end; cursor: pointer; }
span.ap-aprobar { cursor: default; }
.ap-pasos { display: grid; gap: 8px; }
.ap-pasos li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 8px; color: var(--ink-2); }
.ap-pasos code { margin-left: 2px; color: var(--ink-wash); font: 400 12px/18px ui-monospace, "SF Mono", Menlo, monospace; }
.ap-pasos .i { margin-top: 2px; }
.ap-pasos .ok { color: var(--green-ink); }
.ap-pasos .gira { display: none; color: var(--violet); }
.ap-fin { font-weight: 500; }

/* Sin JS no hay corrida que repetir. */
html:not(.js) [data-repetir] { display: none; }
.js .ap-pasos li[data-e="espera"] { display: none; }
.js .ap-pasos li[data-e="activo"] { color: var(--ai-text); animation: rise 320ms var(--ease) both; }
.js .ap-pasos li[data-e="activo"] .ok { display: none; }
.js .ap-pasos li[data-e="activo"] .gira { display: block; }
.js .ap-pasos li[data-e="hecho"] { color: var(--ink); }
.js [data-corrida]:not([data-e="fin"]) .ap-fin { display: none; }
.js [data-corrida][data-e="fin"] .ap-fin { animation: rise 320ms var(--ease) both; }


/* Etiquetas: DESIGN.md 7.1 */
.chip { display: inline-flex; align-items: center; gap: 4px; min-height: 20px; padding: 1px 6px; border-radius: 7px; font-size: 12.5px; line-height: 18px; font-weight: 500; white-space: nowrap; }
.chip .i { width: 14px; height: 14px; }
.chip-registro { background: var(--paper); border: 1px solid var(--line-2); color: var(--ink); }
.chip-dominio { background: var(--paper); border: 1px solid var(--blue-line); color: var(--blue); }
.chip-verde { background: var(--green-bg); color: var(--green-ink); }
.chip-azul { background: var(--blue-bg); color: var(--blue-ink); }
.chip-gris { background: var(--wash); color: var(--ink-wash); }
.chip-violeta { background: var(--violet-bg); color: var(--violet-ink); }
.chip-violeta .i { color: var(--violet); }
.chip-amarillo { background: var(--yellow-bg); color: var(--yellow-ink); }
.chip-punteado { background: var(--paper); border: 1px dashed var(--edge); color: var(--ink-2); }

/* Tabla: DESIGN.md 6 */
.tb { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; font-variant-numeric: tabular-nums; }
.tb th { font-weight: 500; text-align: left; white-space: nowrap; }
.tb th, .tb td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tb th:first-child, .tb td:first-child { padding-left: 16px; }
.tb tbody tr:last-child td { border-bottom: 0; }
.c-empresa { font-weight: 500; white-space: nowrap; }
.c-ubicacion { color: var(--ink-2); white-space: nowrap; }
.c-apagada { color: var(--ink-2); }
.trabajando { color: var(--ai-text); background: linear-gradient(90deg, var(--ai-text) 40%, #C7C3EE 50%, var(--ai-text) 60%) 120% 0 / 240% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: shimmer 1.6s linear infinite; }
.giro { animation: giro 1s linear infinite; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
@keyframes pop { from { opacity: 0; transform: scale(.96); } }
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
@keyframes giro { to { transform: rotate(360deg); } }

/* Secciones */
.seccion { margin-top: clamp(72px, 10vw, 128px); }
.atlas { font-size: 14px; line-height: 20px; }
.atlas b { display: block; font-weight: 500; color: var(--ink-2); font-size: 12.5px; line-height: 18px; }
.niveles { display: grid; gap: 14px; font-size: 14px; line-height: 20px; }
.niveles div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; align-items: start; }
.niveles dd { color: var(--ink-2); }

/* La tabla viva */
.mesa-fig { margin-top: clamp(28px, 3.5vw, 40px); }
.marco.mesa-fig { max-width: 1280px; }
.mesa-azul { padding: clamp(14px, 2.4vw, 32px) clamp(14px, 2.4vw, 32px) 116px; border-radius: 20px; }
.mesa-app { display: grid; grid-template-columns: minmax(0, 1fr) 280px; overflow: hidden; border-radius: 14px; background: var(--paper); box-shadow: var(--e3); font-size: 14px; line-height: 20px; }
.mesa-barra { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--line); }
.mesa-barra b { margin-right: auto; font-weight: 500; }
.tb-viva { table-layout: fixed; }
.tb-viva th, .tb-viva td { height: 42px; padding-block: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.tb-viva th:nth-child(1) { width: 25%; }
.tb-viva th:nth-child(2) { width: 16%; }
.tb-viva th:nth-child(3) { width: 12%; }
.tb-viva th:nth-child(5) { width: 19%; }
.tb-viva .tag-ia { margin-left: 4px; }
.trab { display: none; }
.js tr[data-e="espera"] .res, .js tr[data-e="trab"] .res { display: none; }
.js tr[data-e="trab"] .trab { display: inline-block; }
.js tr[data-e="listo"] td { animation: destello 480ms var(--ease-std); }
.js tr[data-e="listo"] .res.chip { animation: pop 200ms var(--ease); }
@keyframes destello { from { background: #ECEBFB; } }
.mesa-atlas { display: grid; align-content: start; gap: 12px; padding: 12px 14px; border-left: 1px solid var(--line); }
.mesa-linea { display: flex; align-items: center; gap: 8px; font-size: 12.5px; line-height: 18px; }
.mesa-linea .i { width: 14px; height: 14px; color: var(--violet); }
.chip[data-listo] { display: none; }
[data-e="fin"] [data-activo], [data-e="fin"] .mesa-linea, html:not(.js) [data-activo], html:not(.js) .mesa-linea { display: none; }
[data-e="fin"] .chip[data-listo], html:not(.js) .chip[data-listo] { display: inline-flex; }
.expediente { position: absolute; right: calc(clamp(14px, 2.4vw, 32px) + 5px); bottom: 14px; display: grid; gap: 4px; width: 270px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--paper); box-shadow: var(--e3); font-size: 14px; line-height: 20px; }
.expediente-fijo { position: static; width: auto; box-shadow: var(--e2); }
.expediente b { font-weight: 600; }
.expediente small { color: var(--ink-2); font-size: 12.5px; line-height: 18px; }
.expediente p { margin-top: 4px; }
.expediente div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.expediente.cambia { animation: rise 320ms var(--ease); }

/* Por qué no otra base de datos. Sin .arma (sin JS o con movimiento reducido) se lee de corrido. */
.problema { margin-top: clamp(72px, 10vw, 128px); }
/* A la izquierda, lo que cada herramienta te deja por hacer; a la derecha, la herramienta. */
.problema-pasos { display: grid; gap: 16px; max-width: 34em; margin-top: 24px; color: var(--ink-2); font-size: 17px; line-height: 1.5; }
.problema-pasos b { display: block; margin-bottom: 4px; color: var(--ink); font-size: clamp(21px, 2.2vw, 28px); line-height: 1.2; font-weight: 600; letter-spacing: -.02em; }
.pestanas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
.pestana { display: grid; align-content: start; gap: 16px; padding: clamp(16px, 2vw, 24px); border: 1px solid var(--line-2); border-radius: 18px; background: var(--paper); box-shadow: inset 0 1px 0 #fff, var(--e3); font-size: 16px; line-height: 24px; }
.pestana-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.pestana-bar b { font-size: 17px; font-weight: 600; }
.herramienta { display: inline-flex; align-items: center; gap: 10px; }
.herramienta img { display: block; width: 26px; height: 26px; border-radius: 6px; }
.herramienta img:not(:first-child) { margin-left: 8px; }
.pestana .segmento { min-height: 34px; padding-inline: 10px; font-size: 15px; }
/* Perfil al estilo de una red profesional: portada, foto genérica de plastilina (perfil.webp) y puesto. */
.perfil { position: relative; display: grid; justify-items: start; gap: 2px; padding-top: 26px; }
.perfil-portada { position: absolute; left: 0; right: 0; top: 0; height: 62px; border-radius: 12px; background: linear-gradient(115deg, #C8D9F6, #E6EEFA 55%, #D3E0F7); }
.perfil-foto { position: relative; width: 80px; height: 80px; margin-bottom: 8px; border-radius: 50%; background: var(--wash); box-shadow: 0 0 0 4px var(--paper), var(--e2); }
.perfil b, .perfil small { display: block; }
.perfil b { font-size: 19px; line-height: 26px; font-weight: 600; }
.perfil small { color: var(--ink-2); font-size: 14.5px; line-height: 21px; }
.faltan { display: grid; gap: 8px; }
.faltan div { display: flex; justify-content: space-between; gap: 12px; }
.faltan dt { color: var(--ink-2); }
.faltan dd { color: var(--red-ink); font-weight: 500; white-space: nowrap; }
.pide-mal { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r-row); background: var(--side); }
.pide-mal small { color: var(--red-ink); font-size: 14px; line-height: 20px; font-weight: 500; }
.hoja { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 22px; }
.hoja th, .hoja td { padding: 7px 10px; border: 1px solid var(--line); text-align: left; }
.hoja th { background: var(--side); color: var(--ink-2); font-weight: 500; }
.hoja td:not(:first-child) { color: var(--ink-3); }
.engranaje { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 56px); align-items: center; max-width: 1056px; margin: 24px auto 0; padding: clamp(24px, 4vw, 56px); border-radius: 20px; overflow: hidden; color: #fff; }
.engranaje h3 { font-size: clamp(26px, 3.6vw, 46px); line-height: 1.08; letter-spacing: -.03em; text-wrap: pretty; }
.engranaje h3 span { color: rgba(255, 255, 255, .72); }
.engranaje-texto p { margin-top: 18px; max-width: 34em; color: rgba(255, 255, 255, .9); font-size: clamp(15px, 1.4vw, 18px); line-height: 1.5; }
.engranaje-demo { display: grid; gap: 12px; padding: 16px; border-radius: var(--r-panel); background: var(--paper); box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(10, 34, 110, .2), 0 24px 56px rgba(10, 34, 110, .34); color: var(--ink); font-size: 14px; line-height: 20px; }
.demos { display: grid; }
.demo { grid-area: 1 / 1; display: grid; gap: 10px; align-content: start; }
.demo + .demo { visibility: hidden; }
.demo .burbuja { justify-self: end; }
.engranaje-nota { grid-column: 1 / -1; color: rgba(255, 255, 255, .82); font-size: 13px; line-height: 18px; }
.compositor { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; padding: 4px 6px 4px 12px; border: 1px solid var(--line-2); border-radius: var(--r-card); color: var(--ink-2); }
.compositor-env { display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-ctl); background: var(--blue); color: #fff; }
.carta-acciones { display: flex; flex-wrap: wrap; gap: 8px; }
.ap-aprobar [data-listo] { display: none; }
[data-e="fin"] .ap-aprobar, html:not(.js) span.ap-aprobar { background: var(--green-bg); color: var(--green-ink); box-shadow: none; }
[data-e="fin"] .ap-aprobar [data-listo], html:not(.js) .ap-aprobar [data-listo] { display: inline; }
.tb-viva tr.vista td { background: var(--hover); }

/* Paneles azules: gradiente, lustre arriba, grano y un brillo que sigue al cursor. */
.mesa-azul, .carta-azul, .engranaje, .cierre-panel, .celda.director { position: relative; isolation: isolate; background: radial-gradient(460px circle at var(--mx, 22%) var(--my, 4%), rgba(255, 255, 255, .34), transparent 70%), linear-gradient(180deg, rgba(255, 255, 255, .2) 0%, rgba(255, 255, 255, .04) 30%, transparent 46%), url(ruido.svg), linear-gradient(165deg, #3D86FF 0%, #1F63F0 44%, #0E3BB0 100%); box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .75), inset 0 0 0 1px rgba(255, 255, 255, .14), inset 0 -32px 56px rgba(6, 24, 90, .42), 0 18px 44px rgba(31, 99, 240, .3); }
.carta-azul::after, .engranaje::after, .cierre-panel::after, .director::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: linear-gradient(112deg, transparent 34%, rgba(255, 255, 255, .2) 48%, transparent 62%) no-repeat 140% 0 / 260% 100%; pointer-events: none; animation: lustre 6s var(--ease-std) infinite; }
@keyframes lustre { 0%, 45% { background-position: 140% 0; } 100% { background-position: -40% 0; } }
/* Carga de plastilina en azul (landing/carga/), fundida con el panel: solo deja su relieve. */
.carga { position: absolute; z-index: 0; right: -6%; bottom: -12%; width: clamp(180px, 46%, 340px); height: auto; aspect-ratio: 1; opacity: .5; mix-blend-mode: luminosity; pointer-events: none; -webkit-mask-image: radial-gradient(closest-side, #000 52%, transparent); mask-image: radial-gradient(closest-side, #000 52%, transparent); }
.mesa-azul > .carga { right: auto; left: -3%; bottom: -14%; width: clamp(200px, 30%, 380px); }
.engranaje > .carga { right: auto; left: -6%; bottom: -20%; width: clamp(200px, 36%, 420px); opacity: .42; }
.cierre-panel > .carga { bottom: -22%; width: clamp(160px, 26%, 320px); }
.cierre-panel > .carga-izq { right: auto; left: -4%; }
.cierre-panel > :not(.carga), .engranaje > :not(.carga), .mesa-app { position: relative; z-index: 1; }
.mesa-azul, .cierre-panel { overflow: hidden; }
.mesa-azul > .expediente { z-index: 1; }

/* Qué es Consilius: organigrama. Atlas dirige arriba y sus tres agentes, debajo, se turnan el trabajo. */
.organigrama { margin-top: clamp(28px, 3.5vw, 40px); }
.celda { position: relative; display: grid; align-content: start; gap: 12px; padding: 22px; border: 1px solid var(--line-2); border-radius: 20px; background: var(--paper); box-shadow: inset 0 1px 0 #fff, var(--e3); font-size: 15px; line-height: 22px; }
.celda p { color: var(--ink-2); }
.director { overflow: hidden; width: min(100%, 680px); margin-inline: auto; gap: 14px; padding: clamp(22px, 3vw, 32px); border: 0; color: #fff; }
.director > :not(.carga) { position: relative; z-index: 1; }
.director-cab { display: flex; align-items: center; gap: 14px; }
.director-cab > div { margin-right: auto; }
.director-cab .cara { width: 56px; height: 56px; box-shadow: 0 0 0 2px #fff, 0 0 0 5px rgba(255, 255, 255, .3); }
.director h3 { font-size: clamp(30px, 3.4vw, 42px); line-height: 1.04; letter-spacing: -.03em; }
.director p { max-width: 34em; color: rgba(255, 255, 255, .9); font-size: 16px; line-height: 24px; }
.director .celda-ceja { color: rgba(255, 255, 255, .75); font-size: 13.5px; line-height: 20px; font-weight: 500; }
.tareas { display: grid; gap: 8px; }
.tareas li { display: flex; align-items: flex-start; gap: 8px; color: var(--ink); font-size: 15px; line-height: 22px; }
.tareas .i { flex: none; width: 16px; height: 16px; margin-top: 3px; color: var(--blue); }
.director .tareas { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .22); }
.director .tareas li, .director .tareas .i { color: #fff; }
/* Líneas del organigrama: de Atlas baja una, se abre en tres y cae en cada agente; se pinta de violeta mientras trabaja. */
.agentes { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding-top: 56px; }
.agentes::before, .agentes::after, .agente::before { content: ""; position: absolute; background: var(--line-2); }
.agentes::before { top: 28px; left: calc((100% - 32px) / 6); right: calc((100% - 32px) / 6); height: 2px; }
.agentes::after, .agente::before { left: 50%; width: 2px; height: 28px; margin-left: -1px; }
.agentes::after { top: 0; }
.agente::before { top: -29px; transition: background 240ms var(--ease-std); }
.agente[data-e="activo"]::before { background: var(--violet); }
.agente { transition: border-color 240ms var(--ease-std), box-shadow 240ms var(--ease-std); }
.agente > p { color: var(--ink); font-size: 16px; line-height: 24px; font-weight: 500; }
.agente-cab { display: flex; align-items: center; gap: 8px; }
.agente-cab h3 { margin-right: auto; font-size: 17px; line-height: 24px; }
.agente .chip { display: none; }
.js .agente .est-espera { display: inline-flex; }
.agente:is([data-e="activo"], [data-e="hecho"]) .est-espera { display: none; }
.agente[data-e="activo"] .est-activo, .agente[data-e="hecho"] .est-hecho { display: inline-flex; }
.agente[data-e="activo"] { border-color: #D9CCFC; box-shadow: 0 0 0 4px var(--violet-bg), var(--e3); }

/* Diana: el ícono de Consilius, con ondas que salen de él. */
.diana { position: relative; display: grid; place-items: center; width: 88px; height: 88px; }
.diana img { position: relative; z-index: 1; width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .5), 0 14px 34px rgba(31, 99, 240, .38); }
.diana::before, .diana::after { content: ""; position: absolute; inset: 12px; border: 1.5px solid rgba(39, 109, 240, .42); border-radius: 20px; animation: radar 2.8s var(--ease-std) infinite; }
.diana::after { animation-delay: 1.4s; }
@keyframes radar { from { transform: scale(.9); opacity: 1; } to { transform: scale(1.75); opacity: 0; } }

/* Fuentes: haces de cada herramienta hacia la diana y de la diana a la lista. Port de Animated Beam (21st.dev);
   atlas.js traza las curvas y manda por ellas datos grises (ruido) y verdes (calificados). */
.marco.haz-fig { max-width: 1180px; margin-top: clamp(28px, 3.5vw, 40px); }
.haz { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, .8fr) minmax(0, 1.45fr); align-items: center; gap: clamp(24px, 5vw, 72px); padding: clamp(20px, 3vw, 40px); border: 1px solid var(--line-2); border-radius: 22px; background: radial-gradient(50% 70% at 45% 50%, rgba(39, 109, 240, .07), transparent 70%), var(--paper); box-shadow: var(--e3); }
.haz-lineas { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.haz-base { fill: none; stroke: var(--line-2); stroke-width: 1.5; }
.haz-pulso { fill: none; stroke: var(--blue); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 12 200; stroke-dashoffset: 12; animation: viaja 2.6s var(--ease-std) infinite; animation-delay: calc(var(--k) * -.52s); }
.haz-sale { stroke: var(--green); animation-delay: -1.3s; }
@keyframes viaja { to { stroke-dashoffset: -100; } }
.dato { position: absolute; left: 0; top: 0; z-index: 0; width: 16px; height: 6px; border-radius: 3px; background: #C3C7CE; offset-rotate: 0deg; animation: dato 2.6s linear infinite; animation-delay: calc(var(--k) * -.65s); }
.dato.corto { width: 9px; background: #D6D8DD; }
.dato.limpio { width: 20px; height: 8px; border-radius: 4px; background: var(--green); box-shadow: 0 0 0 3px rgba(15, 198, 125, .18); }
@keyframes dato { 0% { offset-distance: 0%; opacity: 0; } 12%, 82% { opacity: 1; } 100% { offset-distance: 100%; opacity: 0; } }
.haz-fuentes, .haz-centro, .haz-lista { position: relative; z-index: 1; }
.haz-fuentes { display: grid; gap: 12px; justify-items: start; }
.fuente { display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--paper); box-shadow: var(--e2); font-size: 14px; line-height: 20px; font-weight: 500; white-space: nowrap; }
.fuente-logo { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: var(--side); box-shadow: inset 0 0 0 1px var(--line); }
.fuente-logo img { display: block; width: 22px; height: 22px; object-fit: contain; }
.fuente-logo.fuente-ancha { width: 58px; }
.fuente-mas { color: var(--blue-ink); }
.fuente-mas .i { width: 20px; height: 20px; }
.fuente-ancha img { width: 47px; height: 16px; }
.haz-centro { display: grid; justify-items: center; gap: 10px; text-align: center; }
.haz-centro > b { font-size: 18px; line-height: 24px; letter-spacing: -.01em; }
.filtros { display: grid; gap: 4px; justify-items: start; color: var(--ink-2); font-size: 13px; line-height: 18px; }
.filtros li { display: flex; align-items: center; gap: 6px; }
.filtros .i { width: 14px; height: 14px; color: var(--green-ink); }
.haz-lista { overflow: hidden; border: 1px solid var(--line-2); border-radius: 16px; background: var(--paper); box-shadow: var(--e3); }
.haz-lista-cab { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; padding: 0 14px 0 16px; border-bottom: 1px solid var(--line); }
.haz-lista-cab b { font-size: 14px; font-weight: 600; }
.tb-lista th { color: var(--ink-2); font-size: 12.5px; line-height: 18px; }
.tb-lista td { height: 60px; vertical-align: middle; }
.tb-lista td b { display: block; font-weight: 500; white-space: nowrap; }
.tb-lista td small { color: var(--ink-2); font-size: 12.5px; line-height: 18px; white-space: nowrap; }

/* Velo para leer: la textura se ve en los márgenes y entre secciones, no detrás del texto. */

/* Armado con el scroll. --q y --r los pone atlas.js; .arma no existe sin JS ni con movimiento reducido. */
.arma .pieza { --q: 0; }
/* Cada sección traza su línea de arriba antes de armar sus piezas. */
.arma .seccion > .marco:first-child { position: relative; }
.arma .seccion > .marco:first-child::before { content: ""; position: absolute; left: clamp(16px, 4vw, 32px); right: clamp(16px, 4vw, 32px); top: calc(clamp(72px, 10vw, 128px) / -2); height: 1px; background: linear-gradient(90deg, var(--blue), var(--violet) 18%, var(--line-2) 46%); transform: scaleX(var(--p, 0)); transform-origin: left; }
.arma .pieza:not(h2, .mesa-azul, .frame, .cierre-panel) { opacity: var(--q); transform: translateY(calc((1 - var(--q)) * 32px)); }
/* Profundidad: tarjetas y paneles llegan inclinados desde atrás, y la carga de adentro se mueve más lento que el panel. */
.arma :is(.carta-azul, .celda, .plan, .haz-lista).pieza { transform-origin: 50% 0; transform: perspective(1200px) translateY(calc((1 - var(--q)) * 56px)) rotateX(calc((1 - var(--q)) * 16deg)) scale(calc(.96 + var(--q) * .04)); }
.arma .pieza > .carga { translate: 0 calc((1 - var(--q)) * 90px); scale: calc(1.2 - var(--q) * .2); }
.arma .fuente.pieza { transform: translateX(calc((1 - var(--q)) * -40px)); }
.arma .haz-centro.pieza { transform: scale(calc(.7 + var(--q) * .3)); }
.arma h2.pieza .palabra { opacity: clamp(.12, calc(var(--q) * (var(--n) + 3) - var(--i)), 1); }
.arma .mesa-azul { clip-path: inset(0 calc((1 - var(--q)) * 26%) calc((1 - var(--q)) * 74%) calc((1 - var(--q)) * 26%) round 20px); }
.arma .cierre-panel { clip-path: inset(calc((1 - var(--q)) * 36%) calc((1 - var(--q)) * 32%) round calc(20px + (1 - var(--q)) * 24px)); }
.arma .mesa-azul[data-lista], .arma .cierre-panel[data-lista] { clip-path: none; }
.arma .flujo-fig { overflow-x: clip; }   /* inclinado, el marco asoma unos píxeles fuera de la pantalla */
.arma .flujo-fig .frame { transform-origin: top center; transform: perspective(1400px) rotateX(calc((1 - var(--q)) * 14deg)) scale(calc(.95 + var(--q) * .05)); opacity: clamp(.25, calc(var(--q) * 1.6), 1); }
.arma .demo { visibility: hidden; }
.arma .demo[data-e="activo"] { visibility: visible; }
.arma .demo[data-e="activo"] > * { animation: rise 320ms var(--ease) both; }
.arma .demo[data-e="activo"] > .teclea { animation: teclea 900ms steps(28) both; }
.arma .demo[data-e="activo"] > :nth-child(2) { animation-delay: 1000ms; }
.arma .demo[data-e="activo"] > :nth-child(3) { animation-delay: 1500ms; }
@keyframes teclea { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.arma .carta-ui [data-paso] { transition: opacity 240ms var(--ease-std), transform 320ms var(--ease); }
.arma .carta-ui [data-paso][data-e="espera"] { opacity: 0; transform: translateY(8px); }
.arma .carta-ui .teclea[data-e="activo"] { animation: teclea 900ms steps(24) both; }
.arma .carta-ui .ap-aprobar[data-e="activo"] { transform: scale(.95); box-shadow: 0 0 0 4px rgba(39, 109, 240, .22); }
@media (min-height: 640px) {
  .arma .problema { height: 360vh; margin-top: clamp(40px, 6vw, 72px); }
  .arma .escena { position: sticky; top: 61px; height: calc(100svh - 61px); overflow: hidden; }
  .arma .escena-marco { --z: clamp(0, calc((var(--r, 0) - .6) / .12), 1); display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: center; gap: clamp(24px, 4vw, 56px); height: 100%; padding-block: 20px; opacity: calc(1 - var(--z)); transform: scale(calc(1 - var(--z) * .72)); }
  /* Cada texto entra con su tarjeta (mismas --a y --b): el que sale se va en la primera mitad y el que llega entra en la segunda. */
  .arma .problema-pasos { margin-top: clamp(20px, 4vh, 40px); gap: 0; }
  .arma .problema-pasos li { --e: clamp(0, calc((var(--r, 0) - var(--a)) / .13), 1); --s: clamp(0, calc((var(--r, 0) - var(--b)) / .13), 1); grid-area: 1 / 1; font-size: clamp(16px, 1.4vw, 19px); opacity: clamp(0, min(var(--e) * 2 - 1, 1 - var(--s) * 2), 1); transform: translateY(calc((1 - var(--e)) * 24px - var(--s) * 24px)); }
  .arma .problema-pasos b { margin-bottom: 8px; font-size: clamp(22px, 2.1vw, 28px); }
  .arma .pestana { font-size: 17px; line-height: 26px; }
  .arma .pestanas { position: relative; display: block; height: 100%; margin: 0; }
  .arma .pestana { --e: clamp(0, calc((var(--r, 0) - var(--a)) / .13), 1); --s: clamp(0, calc((var(--r, 0) - var(--b)) / .13), 1); position: absolute; left: 50%; top: 50%; width: min(100%, 560px); transform: translate(-50%, calc(-50% + (1 - var(--e)) * 110vh + var(--y) - var(--s) * 14px)) rotate(calc((1 - var(--e)) * var(--g))) scale(calc(1 - var(--s) * .05)); }
  .arma :is(.pestana, .problema-pasos li):nth-child(1) { --a: -.13; --b: .14; --y: 0px; --g: 0deg; }
  .arma :is(.pestana, .problema-pasos li):nth-child(2) { --a: .14; --b: .34; --y: 14px; --g: 5deg; }
  .arma :is(.pestana, .problema-pasos li):nth-child(3) { --a: .34; --b: 9; --y: 28px; --g: -4deg; }
  /* El panel azul abre desde el centro hasta cubrir la pantalla; el contenido conserva su ancho. */
  .arma .engranaje { --v: clamp(0, calc((var(--r, 0) - .64) / .14), 1); position: absolute; inset: 0; max-width: none; margin: 0; padding-inline: max(clamp(24px, 4vw, 56px), calc(50% - 472px)); border-radius: 0; align-content: center; clip-path: inset(calc((1 - var(--v)) * 46%) calc((1 - var(--v)) * 40%) round calc((1 - var(--v)) * 50px)); opacity: clamp(0, calc(var(--v) * 14), 1); }
  .arma .engranaje > * { --t: clamp(0, calc((var(--r, 0) - .72) / .08), 1); opacity: var(--t); transform: translateY(calc((1 - var(--t)) * 24px)); }
}
@media (min-width: 761px) and (min-height: 660px) {
  .arma .flujo-pin { height: 320vh; }
  .arma .flujo-fig .frame { position: sticky; top: 76px; }
}
@media (max-width: 900px) and (min-height: 640px) {
  .arma .escena-marco { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); align-items: stretch; gap: 16px; }
  .arma .problema-pasos { margin-top: 14px; }
  .arma .problema-pasos li { font-size: 15px; }
  .arma .problema-pasos b { font-size: 21px; }
}
@media (max-width: 900px) and (max-height: 900px) {
  .arma .engranaje { gap: 14px; padding: 20px; }
  .arma .engranaje-demo .ap-cab { display: none; }
}
@media (max-width: 900px) and (max-height: 760px) {
  .arma .engranaje-texto p { display: none; }
}
@media (max-width: 480px) {
  .cabecera-fila { gap: 12px; }
  .por-inducta { margin-left: 0; }
  .por-inducta span, .acciones .btn-callado { display: none; }
  .btn-chico { white-space: nowrap; }
}

/* Flujo de una corrida. Port de docs/design/especimen.html con sus clases; medidas de DESIGN.md 9. Sin JS se ve terminado. */
.marco.flujo-fig { max-width: 1280px; margin-top: clamp(28px, 3.5vw, 40px); }
.frame { overflow: hidden; border: 1px solid var(--line-2); border-radius: var(--r-panel); background: var(--paper); box-shadow: var(--e3); font: 500 var(--t-md) var(--font-ui); }
.bar { display: flex; align-items: center; gap: 8px; height: var(--bar-h); padding: 0 12px 0 14px; border-bottom: 1px solid var(--line); background: var(--paper); }
.crumb { display: inline-flex; flex: none; align-items: center; gap: 6px; color: var(--ink-2); }
.crumb .i { color: var(--ink-3); }
.bar-t { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tab { position: relative; display: inline-flex; flex: none; align-items: center; gap: 6px; height: var(--ctl-h); margin-left: auto; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--hover); }
.tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: -11px; height: 1px; background: var(--ink); }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 5px; background: var(--active); color: var(--ink-wash); font: 500 var(--t-xs) var(--font-ui); }
.stage { --panel: 340px; position: relative; overflow: hidden; height: 520px; background-color: var(--flow); background-image: radial-gradient(var(--dot) .7px, transparent .8px); background-size: 10px 10px; transition: background-position var(--d-camera) var(--ease); }
.world { position: absolute; inset: 0; transition: transform var(--d-camera) var(--ease); }
html:not(.js) .world { right: var(--panel); overflow-x: auto; }
.world svg.edges { position: absolute; left: 0; top: 0; overflow: visible; width: 1px; height: 1px; }
.edges path { fill: none; stroke: var(--green-edge); stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; transition: stroke var(--d-slow) var(--ease-std); }
.edges path[data-e="espera"] { stroke: var(--edge); }
.node { position: absolute; top: 226px; width: var(--node-w); height: var(--node-h); padding: 10.5px 12.5px; border: 1.5px solid var(--green-edge); border-radius: var(--r-panel); background: #fff; box-shadow: var(--e1); transition: border-color var(--d-slow) var(--ease-std); }
.node[data-e="espera"] { padding: 11px 13px; border: 1px solid var(--line); }
.node.wait-h[data-e="activo"] { border-color: var(--amber); }
.node[data-nodo="a"] { left: 40px; }
.node[data-nodo="b"] { left: 376px; }
.node[data-nodo="c"] { left: 712px; }
.node[data-nodo="d"] { left: 1048px; }
.node[data-nodo="e"] { left: 1384px; }
.node[data-nodo="f"] { left: 1720px; }
.node[data-nodo="g"] { left: 2096px; top: 146px; }
.node[data-nodo="h"] { left: 2096px; top: 306px; }
.node .t { display: flex; align-items: center; gap: 8px; height: 24px; }
.node .d { margin-top: 2px; overflow: hidden; color: var(--ink-2); font: 400 var(--t-sm) var(--font-ui); white-space: nowrap; text-overflow: ellipsis; }
.node .azulejo .i { width: 16px; height: 16px; }
.port { position: absolute; right: -7px; top: 50%; display: grid; place-items: center; width: 13px; height: 13px; margin-top: -6.5px; border: 1.5px solid var(--green-edge); border-radius: 50%; background: #fff; }
.port::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--green-port); }
.node:is([data-e="espera"], [data-e="activo"]) .port { border-color: var(--edge); }
.node:is([data-e="espera"], [data-e="activo"]) .port::after { background: var(--edge); }
.flag { position: absolute; right: -1.5px; bottom: calc(100% + 9.5px); white-space: nowrap; animation: flag var(--d-base) var(--ease) both; }
@keyframes flag { from { opacity: 0; transform: translateY(3px); } }
.node .n-act, .node[data-e="activo"] .n-ok, .node[data-e="espera"] .n-ok { display: none; }
.node[data-e="activo"] .n-act { display: inline-flex; }
.flag.tr { right: auto; left: -1.5px; height: 24px; padding: 0 8px; border-radius: var(--r-ctl); }
.runbar { position: absolute; left: 16px; top: 16px; z-index: 3; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--col); white-space: nowrap; }
.runbar .a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.runbar button { height: 100%; padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }
.runbar button:hover { color: var(--ink); }
.runbar [data-repetir]::before { content: ""; width: 1px; height: 18px; margin: 0 8px 0 4px; background: var(--line-2); }
.ic { display: grid; place-items: center; flex: none; width: 16px; height: 16px; border-radius: 50%; }
.ic.ok { background: var(--green); color: #fff; }
.ic.ok .i { width: 11px; height: 11px; stroke-width: 2.5; }
.ic.idle { background: var(--wash); color: var(--ink-wash); }
.ic.idle .i { width: 10px; height: 10px; }
.ic .pausa { fill: currentColor; }
.ic.go { color: var(--violet); }
.ic.go .i { animation: giro 1s linear infinite; }
.si-curso { display: none; }
.js [data-corrida]:not([data-e="fin"]) .si-curso { display: grid; }
.js [data-corrida]:not([data-e="fin"]) .si-fin { display: none; }
.js [data-corrida]:not([data-e="fin"]) .runbar .ic.ok { background: var(--wash); color: var(--ink-wash); }
.runs { position: absolute; right: 12px; top: 12px; bottom: 12px; z-index: 3; display: flex; flex-direction: column; width: var(--run-panel-w); border: 1px solid var(--line-2); border-radius: var(--r-panel); background: #fff; box-shadow: var(--e3); }
.runs h3 { margin: 0; padding: 14px 20px 10px; color: var(--ink); font: 600 var(--t-lg) var(--font-ui); letter-spacing: normal; }
.runs ul { flex: 1; margin: 0; padding: 0 12px; list-style: none; }
.runs li { display: flex; align-items: center; gap: 10px; height: 36px; margin: 0 0 2px; padding: 0 8px; border-radius: var(--r-row); }
.runs li.on { background: var(--hover); }
.runs time { margin-left: auto; color: var(--ink-2); font: 400 var(--t-sm) var(--font-ui); }
.over { padding: 14px 18px 18px; border-top: 1px solid var(--line); }
.over h4 { margin: 0 2px 10px; color: var(--ink-2); font: 500 var(--t-sm) var(--font-ui); letter-spacing: normal; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { position: relative; height: 56px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-card); }
.stat b { display: block; font: 600 var(--t-md) var(--font-ui); font-variant-numeric: tabular-nums; }
.stat span { color: var(--ink-2); font: 400 var(--t-xs) var(--font-ui); }
.stat .i { position: absolute; right: 10px; top: 9px; width: 14px; height: 14px; color: var(--ink-3); }
.stat.ok { border-color: #E3F6EB; background: radial-gradient(120% 120% at 0 0, #EEFBF4, var(--green-stat)); }
.stat.ok b { color: var(--green-stat-ink); }
.stat.ok span, .stat.ok .i { color: var(--green-stat-label); }
.stat.bad { border-color: #FBE9E9; background: radial-gradient(120% 120% at 0 0, #FFF2F2, var(--red-stat)); }
.stat.bad b { color: var(--red-stat-ink); }
.stat.bad span, .stat.bad .i { color: var(--red-stat-label); }
.meter { grid-column: span 2; height: 80px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-card); }
.meter .top { display: flex; align-items: baseline; gap: 6px; }
.meter .top b { font: 600 var(--t-md) var(--font-ui); font-variant-numeric: tabular-nums; }
.meter .top span { color: var(--ink-2); font: 400 var(--t-xs) var(--font-ui); }
.meter small { display: block; margin-top: 6px; color: var(--ink-2); font: 400 var(--t-sm) var(--font-ui); font-variant-numeric: tabular-nums; }
.railc { overflow: hidden; height: 4px; margin-top: 6px; border-radius: 2px; background: var(--rail); }
.fill { width: 36%; height: 100%; border-radius: 2px; background: var(--rail-fill); transition: width var(--d-move) var(--ease); }
.js [data-corrida]:not([data-e="fin"]) .fill { width: 26%; }

/* Tarjetas apiladas. Encogen con animación ligada al scroll donde existe; donde no, solo se apilan. */
.pila { timeline-scope: --c2, --c3, --c4; display: grid; gap: 28px; margin-top: 32px; }
.carta { position: sticky; top: calc(76px + var(--i) * 14px); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 44px); min-height: min(560px, 76vh); padding: 18px; border: 1px solid var(--line-2); border-radius: 22px; background: var(--paper); box-shadow: var(--e3); transform-origin: 50% 0; }
.carta:nth-child(1) { --i: 0; }
.carta:nth-child(2) { --i: 1; view-timeline: --c2 block; }
.carta:nth-child(3) { --i: 2; view-timeline: --c3 block; }
.carta:nth-child(4) { --i: 3; view-timeline: --c4 block; }
.carta-azul { display: flex; align-items: center; justify-content: center; padding: clamp(20px, 3vw, 40px); overflow: hidden; border-radius: 14px; }
.carta-ui { position: relative; z-index: 1; display: grid; gap: 12px; width: min(100%, 420px); padding: 16px; border-radius: 14px; background: var(--paper); box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(10, 34, 110, .2), 0 24px 56px rgba(10, 34, 110, .34); font-size: 14px; line-height: 20px; }
.carta-texto { display: flex; flex-direction: column; justify-content: space-between; gap: 28px; padding: clamp(12px, 2vw, 28px) clamp(8px, 1.5vw, 20px) clamp(12px, 2vw, 28px) 0; }
.carta-num { margin-bottom: 12px; font-size: 14px; line-height: 20px; font-weight: 500; }
.carta-texto h3 { font-size: clamp(28px, 3.4vw, 42px); line-height: 1.1; font-weight: 600; letter-spacing: -.03em; text-wrap: balance; }
.carta-texto > p { color: var(--ink-2); }
.segmentos { display: flex; flex-wrap: wrap; gap: 6px; }
.segmento { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding-inline: 8px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--side); font-weight: 500; font-size: 13px; }
.segmento i { color: var(--ink-2); font-style: normal; font-weight: 400; }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) and (min-width: 901px) {
    .carta:nth-child(1) { animation: encoge linear both; animation-timeline: --c2; animation-range: entry 0% entry 100%; }
    .carta:nth-child(2) { animation: encoge linear both; animation-timeline: --c3; animation-range: entry 0% entry 100%; }
    .carta:nth-child(3) { animation: encoge linear both; animation-timeline: --c4; animation-range: entry 0% entry 100%; }
  }
}
@keyframes encoge { to { transform: scale(.955); } }

#senales .tb { margin-top: 32px; }
.tb-senales th { color: var(--ink); }
.tb-senales td { color: var(--ink-2); }
.tb-senales td:last-child { color: var(--ink); }
.tb-senales th:first-child, .tb-senales td:first-child { padding-left: 0; white-space: nowrap; }
#senales .nota { margin-top: 16px; }

.alcance { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 56px; margin-top: 32px; }
.alcance h3 { padding-bottom: 12px; border-bottom: 1px solid var(--line-2); }
.lista { margin-top: 14px; display: grid; gap: 10px; color: var(--ink-2); }
.lista li { display: flex; gap: 10px; align-items: flex-start; }
.lista .i { margin-top: 6px; }
.i-si { color: var(--green-ink); }
.i-no { color: var(--red-ink); }
#alcance .nota { margin-top: 24px; }

/* Precios: port de Pricing Table (21st.dev). Las cifras ruedan dígito por dígito cuando la tarjeta termina de armarse. */
.planes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 40px; }
.plan { position: relative; display: flex; flex-direction: column; padding: 26px 24px 24px; border: 1px solid var(--line-2); border-radius: 20px; background: var(--paper); box-shadow: inset 0 1px 0 #fff, var(--e2); }
.plan-destacado { border-color: transparent; box-shadow: 0 0 0 1.5px var(--blue), 0 18px 44px rgba(31, 99, 240, .16); }
.plan-insignia { position: absolute; top: -12px; left: 22px; padding: 2px 10px; border-radius: 999px; background: linear-gradient(180deg, #4A87F7, var(--blue)); color: #fff; font-size: 12.5px; line-height: 20px; font-weight: 600; box-shadow: 0 4px 12px rgba(31, 99, 240, .3); }
.plan-desc { margin-top: 4px; color: var(--ink-2); font-size: 15px; line-height: 22px; }
.precio { margin-top: 20px; font-size: 40px; line-height: 48px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.precio small { color: var(--ink-2); font-size: 14px; font-weight: 400; letter-spacing: 0; white-space: nowrap; }
.rueda { display: inline-block; height: 48px; overflow: hidden; vertical-align: top; }
.tira { display: flex; flex-direction: column; transition: transform 1100ms var(--ease) calc(var(--k) * 80ms); }
.tira span { height: 48px; }
.plan[data-lista] .tira { transform: translateY(calc(var(--d) * -48px)); }
.oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.plan-nota { color: var(--ink-2); font-size: 13px; line-height: 18px; }
.plan .btn, .plan .btn-linea { justify-content: center; width: 100%; margin-top: 20px; }
.plan-incluye { display: grid; gap: 10px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14.5px; line-height: 21px; }
.plan-incluye li { display: flex; gap: 10px; }
.plan-incluye .i { margin-top: 2px; color: var(--blue); }
.paquetes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: 16px 48px; margin-top: 20px; padding: 24px 28px; border: 1px solid var(--line-2); border-radius: 20px; background: var(--side); }
.paquetes p { margin-top: 6px; color: var(--ink-2); }
.tb-paquetes th:first-child, .tb-paquetes td:first-child { padding-left: 0; }
.tb-paquetes td:last-child { font-weight: 500; }
#precios .nota { margin-top: 20px; }

/* Preguntas: port de FAQ Section (21st.dev), a dos columnas. Acordeón nativo: details con name abre una a la vez. */
.faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: 28px clamp(32px, 6vw, 96px); align-items: start; }
.faq-cab { position: sticky; top: 96px; }
.faq-cab h2 { margin-top: 14px; }
.faq-cab .entrada { margin-top: 14px; font-size: 17px; }
.faq .ceja { background: var(--side); box-shadow: inset 0 0 0 1px var(--line-2); }
.faq-lista { border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); interpolate-size: allow-keywords; }
summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 20px; font-weight: 500; font-size: 17px; line-height: 26px; cursor: pointer; list-style: none; transition: color 120ms var(--ease-std); }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; flex: none; width: 8px; height: 8px; margin: -4px 4px 0 0; border-right: 1.5px solid var(--ink-2); border-bottom: 1.5px solid var(--ink-2); transform: rotate(45deg); transition: transform 240ms var(--ease); }
details[open] > summary::after { transform: translateY(4px) rotate(-135deg); }
summary:hover { color: var(--blue-ink); }
details p { max-width: 42em; padding-bottom: 20px; color: var(--ink-2); }
details::details-content { block-size: 0; overflow: clip; transition: block-size 360ms var(--ease), content-visibility 360ms allow-discrete; }
details[open]::details-content { block-size: auto; }

.cierre { margin-top: clamp(72px, 10vw, 128px); }
.cierre-panel { display: grid; justify-items: center; gap: 24px; padding: clamp(48px, 7vw, 96px) clamp(20px, 4vw, 48px); border-radius: 20px; color: #fff; text-align: center; }
.cierre-panel .btn { background: linear-gradient(180deg, #fff 0%, #E8EEFF 100%); color: var(--blue-ink); box-shadow: inset 0 1px 0 #fff, 0 8px 24px rgba(10, 34, 110, .3); }

.pie { padding-block: 28px 40px; color: var(--ink-2); font-size: 13.5px; line-height: 22px; }
.pie-enlaces { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 10px; }
.pie-enlaces a { color: var(--ink-2); }

@media (max-width: 1160px) {
  .mesa-app { grid-template-columns: minmax(0, 1fr); }
  .mesa-atlas { border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 900px) {
  .menu { display: none; }
  .btn-chico, .btn-callado { min-height: 44px; }
  .alcance, .planes, .pestanas, .engranaje, .agentes, .haz, .faq, .paquetes { grid-template-columns: minmax(0, 1fr); }
  .agentes { gap: 28px; padding-top: 28px; }
  .agentes::before, .agentes::after { display: none; }
  .director .tareas { grid-template-columns: minmax(0, 1fr); }
  .planes { gap: 24px; }
  .faq-cab { position: static; }
  .haz { gap: 40px; }
  .haz-fuentes { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
  .fuente { padding-right: 10px; font-size: 13px; }
  .tb-lista td small { white-space: normal; }
  .carta { position: static; grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .carta-azul { min-height: 280px; }
}

@media (max-height: 640px) {
  .carta { position: static; min-height: 0; }
}

/* A 400 px las tablas anchas pasan a filas apiladas; los role del HTML conservan la tabla para lectores de pantalla. */
@media (max-width: 760px) {
  .stage { --panel: 0px; height: auto; }
  .world { bottom: auto; height: 420px; }
  .runs { position: relative; inset: auto; width: auto; margin: 420px 12px 12px; }
  .runbar .intento, .tab { display: none; }
  .tb-viva thead, .tb-senales thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .tb-viva, .tb-viva tbody, .tb-senales, .tb-senales tbody { display: block; }
  .tb-viva tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .tb-viva tr:last-child { border-bottom: 0; }
  .tb-viva td { display: block; height: auto; padding: 0 !important; border: 0; overflow: visible; white-space: normal; }
  .tb-viva td:empty { display: none; }
  .tb-viva .c-empresa { grid-column: 1; grid-row: 1; }
  .tb-viva td:last-child { grid-column: 2; grid-row: 1; }
  .tb-viva .c-ubicacion, .tb-viva .c-evidencia { grid-column: 1 / -1; }
  .expediente { position: static; width: auto; margin-top: 12px; }
  .mesa-azul { padding-bottom: 14px; }
  .mesa-barra { flex-wrap: wrap; padding-block: 10px; }
  .tb-senales tr { display: block; padding-block: 16px; border-bottom: 1px solid var(--line); }
  .tb-senales tr:first-child { border-top: 1px solid var(--line); }
  .tb-senales td { display: block; padding: 0 !important; border: 0; white-space: normal !important; }
  .tb-senales td + td { margin-top: 8px; }
  .tb-senales td:nth-child(2)::before { content: "Dónde la ve: "; color: var(--ink-3); }
  .tb-senales td:nth-child(3)::before { content: "Qué podría necesitar: "; color: var(--ink-3); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
  .trabajando { background: none; -webkit-text-fill-color: currentColor; }
  .world { right: var(--panel); overflow-x: auto; }
}
