/* Página de curso: Step into RPA (solo empresas). Identidad propia: un robot de software que lee una planilla y completa pantallas. */
.c-step-into-rpa {
  --rp: #d9541e; --rp-soft: color-mix(in srgb, var(--rp) 12%, var(--surface));
  --rp-ok: #1a9e5c; --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}
:root[data-theme="dark"] .c-step-into-rpa { --rp: #ff8a55; --rp-ok: #4cd18a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .c-step-into-rpa { --rp: #ff8a55; --rp-ok: #4cd18a; } }
.c-step-into-rpa .c-hero h1 em, .c-step-into-rpa h2 em { color: var(--rp); }
.c-step-into-rpa .c-hero h1 { font-size: clamp(2.2rem, 1.3rem + 3vw, 3.7rem); max-width: 15ch; }
.c-step-into-rpa .cs-step-n, .c-step-into-rpa .unit-n { font-family: var(--mono); color: var(--rp); letter-spacing: 0; }
.c-step-into-rpa .unit li::before { background: var(--rp); border-radius: 0; width: 7px; height: 2px; top: .7em; }
.c-step-into-rpa .gain-list span { font-family: var(--mono); -webkit-text-stroke-color: var(--rp); }
.c-step-into-rpa .dots { grid-template-columns: repeat(3, 1fr); max-width: 90px; }

/* Etiqueta "solo empresas" */
.c-solo-emp { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 6px 12px; border-radius: 6px; font-family: var(--mono); font-size: .76rem; font-weight: 600; color: var(--rp); background: var(--rp-soft); border: 1px solid color-mix(in srgb, var(--rp) 35%, transparent); }
.c-solo-emp::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: currentColor; }

/* ---------- Portada: el bot completa un formulario ---------- */
.rp-float { position: absolute; left: -24px; bottom: -30px; width: min(64%, 270px); border-radius: 16px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 24px 50px -20px rgba(40, 15, 5, .5); animation: c-in .8s .5s cubic-bezier(.2, .8, .2, 1) both; }
.rp-float-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-family: var(--mono); font-size: .7rem; color: #fff; background: var(--rp); }
:root[data-theme="dark"] .rp-float-bar { color: #2a1006; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rp-float-bar { color: #2a1006; } }
.rp-bot { animation: hi-blink 1.2s infinite; }
.rp-float-form { position: relative; display: grid; gap: 7px; padding: 12px; }
.rp-float-form .fld { height: 20px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); overflow: hidden; }
.rp-float-form .fill { display: block; height: 100%; width: 0; background: color-mix(in srgb, var(--rp) 22%, transparent); animation: rp-fill 3s infinite; }
.rp-float-form .fill.f2 { animation-delay: .4s; }
.rp-save { justify-self: end; padding: 4px 12px; border-radius: 6px; font-size: .7rem; font-weight: 700; color: #fff; background: var(--ink); }
.rp-cursor { position: absolute; width: 14px; height: 14px; background: var(--rp); clip-path: polygon(0 0, 100% 60%, 55% 62%, 75% 100%, 60% 100%, 42% 66%, 0 90%); animation: rp-cur 3s infinite; }
.rp-count { margin: 0; padding: 0 12px 10px; font-family: var(--mono); font-size: .72rem; color: var(--muted); }
.rp-count b { color: var(--rp); }
@keyframes rp-fill { 0% { width: 0; } 40%, 100% { width: 70%; } }
@keyframes rp-cur { 0% { left: 20%; top: 18px; } 35% { left: 70%; top: 44px; } 60% { left: 82%; top: 70px; } 66% { transform: scale(.8); } 72% { transform: none; } 100% { left: 82%; top: 70px; } }
@keyframes hi-blink { 50% { opacity: .35; } }

/* ---------- Historia ---------- */
.rp-stage { font-size: .86rem; }
.c-step-into-rpa .s1.scene { background: none; }
.c-step-into-rpa .s2, .c-step-into-rpa .s4 { display: block; }
.c-step-into-rpa .s5 { padding: 7%; }
.rp-k { margin: 0 0 8px; font-family: var(--mono); font-size: .7rem; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }

/* Escena 1 */
.rp-xl { position: absolute; left: 6%; top: 8%; width: 42%; display: grid; grid-template-columns: 1.4fr 1fr; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); font-size: .72rem; }
.rp-xl header { grid-column: 1 / -1; display: flex; gap: 6px; align-items: center; padding: 6px 8px; font-family: var(--mono); font-size: .66rem; color: var(--muted); border-bottom: 1px solid var(--line); }
.rp-xl header i { font-style: normal; width: 16px; height: 16px; border-radius: 4px; display: grid; place-items: center; font-size: .58rem; font-weight: 700; color: #fff; background: #1d7044; }
.rp-xl span { padding: 5px 8px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.rp-xl span:nth-child(odd) { border-right: 1px solid var(--line); }
.rp-xl .h { font-weight: 700; background: var(--surface); border-top: 0; }
.rp-xl .cur { background: color-mix(in srgb, #1d7044 18%, transparent); outline: 2px solid #1d7044; outline-offset: -2px; }
.rp-web { position: absolute; right: 6%; top: 18%; width: 42%; display: grid; gap: 8px; padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); --d: .15s; }
.rp-web header { font-size: .72rem; font-weight: 700; color: var(--muted); }
.rp-web label { display: grid; gap: 3px; font-size: .66rem; color: var(--muted); }
.rp-web label span { height: 22px; padding: 3px 7px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-size: .74rem; }
.rp-web .typing::after { content: "|"; animation: hi-blink 1s steps(1) infinite; }
.rp-btn { justify-self: end; padding: 5px 12px; border-radius: 6px; font-size: .72rem; color: #fff; background: var(--ink); }
:root[data-theme="dark"] .rp-btn, :root[data-theme="dark"] .rp-save { color: var(--bg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rp-btn, :root:not([data-theme="light"]) .rp-save { color: var(--bg); } }
.rp-hand { position: absolute; right: 18%; bottom: 6px; width: 18px; height: 18px; background: var(--ink); clip-path: polygon(0 0, 100% 60%, 55% 62%, 75% 100%, 60% 100%, 42% 66%, 0 90%); animation: rp-slow 2.4s ease-in-out infinite; }
@keyframes rp-slow { 50% { transform: translate(-30px, -40px); } }
.rp-manual { position: absolute; left: 6%; bottom: 8%; padding: 9px 14px; border-radius: 10px; background: var(--bad); color: #fff; font-family: var(--mono); font-size: .76rem; --d: .4s; }
.cs-stage:not([data-step="1"]) .s1 > * { opacity: 0; transform: translateY(14px); }

/* Escena 2 */
.rp-check { width: 62%; padding: 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.rp-check ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.rp-check li { display: flex; gap: 10px; align-items: center; font-size: .82rem; transition: opacity .4s, transform .4s; }
.rp-check li::before { content: "✓"; flex: none; width: 20px; height: 20px; border-radius: 5px; display: grid; place-items: center; font-size: .7rem; font-weight: 700; color: #fff; background: var(--rp-ok); }
.rp-check li:nth-child(2) { transition-delay: .15s; } .rp-check li:nth-child(3) { transition-delay: .3s; } .rp-check li:nth-child(4) { transition-delay: .45s; }
.rp-verdict { position: absolute; right: 7%; top: 14%; padding: 12px 16px; border-radius: 12px; border: 2px solid var(--rp); color: var(--rp); font-weight: 700; font-family: var(--mono); font-size: .86rem; rotate: 4deg; --d: .7s; }
.rp-benef { position: absolute; left: 7%; right: 7%; bottom: 7%; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .78rem; --d: .85s; }
.rp-benef span { padding: 5px 10px; border-radius: 999px; background: var(--rp-soft); }
.cs-stage:not([data-step="2"]) .rp-check li { opacity: 0; transform: translateX(-10px); }
.cs-stage:not([data-step="2"]) .rp-verdict, .cs-stage:not([data-step="2"]) .rp-benef { opacity: 0; transform: scale(.9); }

/* Escena 3 */
.rp-studio { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); box-shadow: var(--shadow); }
.rp-studio header { display: flex; gap: 8px; align-items: center; padding: 9px 12px; font-size: .74rem; border-bottom: 1px solid var(--line); background: var(--surface); }
.rp-logo { width: 22px; height: 22px; border-radius: 5px; display: grid; place-items: center; font-size: .64rem; font-weight: 700; color: #fff; background: var(--rp); }
.rp-proj { display: grid; gap: 2px; padding: 12px; font-size: .8rem; }
.rp-proj small { font-size: .66rem; color: var(--muted); }
.rp-proj .ok { margin-top: 6px; font-size: .72rem; color: var(--rp-ok); font-weight: 600; }
.rp-act { margin: 0 12px 14px; display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--rp); background: var(--rp-soft); font-size: .8rem; font-weight: 600; }
.rp-act i { font-style: normal; width: 20px; height: 16px; border-radius: 4px; border: 2px solid var(--rp); }
.rp-act code { font-family: var(--mono); font-weight: 400; font-size: .74rem; }
.rp-dialog { position: absolute; right: 8%; bottom: 8%; width: 40%; display: grid; gap: 10px; padding: 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 24px 40px -16px rgba(0,0,0,.45); --d: .5s; }
.rp-dialog b { font-size: .95rem; }
.rp-dialog span { justify-self: end; padding: 4px 14px; border-radius: 6px; font-size: .74rem; font-weight: 700; color: #fff; background: var(--rp); }
.cs-stage:not([data-step="3"]) .rp-studio { opacity: 0; transform: translateY(14px); }
.cs-stage:not([data-step="3"]) .rp-dialog { opacity: 0; transform: scale(.7); }

/* Escena 4 */
.rp-seq { display: grid; gap: 7px; }
.rp-seq .a { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--rp); font-size: .78rem; transition: opacity .4s, transform .4s; }
.rp-seq code, .rp-sel { font-family: var(--mono); font-size: .72rem; color: var(--rp); }
.rp-seq .loop { display: grid; gap: 6px; padding: 8px 8px 8px 14px; border-radius: 10px; border: 1.5px dashed var(--line); }
.rp-seq .loop p { margin: 0; font-size: .74rem; font-weight: 700; }
.rp-seq .loop .a:nth-child(2) { transition-delay: .15s; } .rp-seq .loop .a:nth-child(3) { transition-delay: .3s; } .rp-seq .loop .a:nth-child(4) { transition-delay: .45s; }
.rp-seq .click { box-shadow: 0 0 0 3px color-mix(in srgb, var(--rp) 22%, transparent); }
.rp-rec { color: var(--bad); font-weight: 700; animation: hi-blink 1.2s infinite; }
.rp-sel { position: absolute; left: 7%; right: 7%; bottom: 6%; margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--deep); color: #ffb48f; white-space: pre-wrap; --d: .6s; }
.cs-stage:not([data-step="4"]) .rp-seq .a { opacity: 0; transform: translateX(16px); }
.cs-stage:not([data-step="4"]) .rp-sel { opacity: 0; }

/* Escena 5 */
.rp-run { padding: 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); box-shadow: var(--shadow); }
.rp-run header { display: flex; gap: 8px; align-items: center; font-weight: 700; font-size: .84rem; }
.rp-led { width: 10px; height: 10px; border-radius: 50%; background: var(--rp-ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--rp-ok) 25%, transparent); animation: hi-blink 1.2s infinite; }
.rp-prog { margin-top: 12px; height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; }
.rp-prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--rp), var(--rp-ok)); transform-origin: left; transform: scaleX(.05); transition: transform 1.6s .2s cubic-bezier(.3, .7, .2, 1); }
.cs-stage[data-step="5"] .rp-prog i { transform: scaleX(1); }
.rp-prog-t { margin: 6px 0 10px; font-family: var(--mono); font-size: .74rem; color: var(--muted); } .rp-prog-t b { color: var(--rp-ok); }
.rp-log { list-style: none; margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--surface); display: grid; gap: 3px; font-family: var(--mono); font-size: .7rem; color: var(--rp-ok); }
.rp-free { position: absolute; right: 7%; bottom: 7%; padding: 10px 14px; border-radius: 12px; background: var(--deep); color: var(--on-deep); font-size: .82rem; --d: .9s; }
.rp-free b { color: var(--on-deep-accent); }
.cs-stage:not([data-step="5"]) .rp-run, .cs-stage:not([data-step="5"]) .rp-free { opacity: 0; transform: translateY(14px); }

@media (min-width: 901px) { .rp-road { grid-template-columns: 1.4fr 1fr 1fr; } }
@media (max-width: 900px) { .rp-float { left: -10px; bottom: -24px; width: 62%; } }
@media (max-width: 560px) {
  .rp-stage { font-size: .76rem; }
  .rp-xl { font-size: .58rem; width: 46%; } .rp-xl span { padding: 3px 5px; } .rp-xl header { font-size: .54rem; padding: 4px 6px; }
  .rp-web { width: 40%; padding: 8px; gap: 5px; top: 12%; } .rp-web label { font-size: .54rem; } .rp-web label span { height: 17px; font-size: .58rem; padding: 1px 4px; } .rp-btn { font-size: .58rem; padding: 3px 8px; } .rp-web header { font-size: .58rem; }
  .rp-manual { font-size: .62rem; padding: 6px 9px; bottom: 6%; }
  .rp-check { width: 72%; padding: 9px; } .rp-check li { font-size: .66rem; } .rp-check ul { gap: 4px; } .rp-check li::before { width: 16px; height: 16px; }
  .rp-verdict { font-size: .62rem; padding: 6px 8px; top: auto; bottom: 26%; right: 7%; } .rp-benef { font-size: .6rem; gap: 5px; } .rp-k { font-size: .58rem; margin-bottom: 5px; }
  .rp-studio header { font-size: .58rem; padding: 6px 8px; } .rp-proj { padding: 8px; font-size: .66rem; } .rp-act { font-size: .64rem; padding: 6px 8px; margin: 0 8px 10px; } .rp-act code { font-size: .58rem; }
  .rp-dialog { padding: 8px; gap: 5px; } .rp-dialog b { font-size: .72rem; }
  .rp-seq { gap: 4px; } .rp-seq .a { padding: 4px 7px; font-size: .62rem; } .rp-seq code, .rp-sel { font-size: .56rem; } .rp-seq .loop { gap: 3px; padding: 5px 5px 5px 9px; } .rp-seq .loop p { font-size: .6rem; }
  .rp-sel { padding: 5px 7px; bottom: 4%; }
  .rp-run { padding: 9px; } .rp-run header { font-size: .7rem; } .rp-log { font-size: .58rem; } .rp-prog-t { font-size: .62rem; margin: 4px 0 6px; } .rp-free { font-size: .66rem; padding: 6px 10px; }
  .rp-float { width: 70%; }
}
@media (prefers-reduced-motion: reduce) {
  .rp-float, .rp-bot, .rp-cursor, .rp-float-form .fill, .rp-hand, .rp-rec, .rp-led, .rp-web .typing::after { animation: none !important; }
  .rp-float-form .fill { width: 70%; }
  .rp-check li, .rp-seq .a, .rp-prog i { transition: none !important; }
}

@media (max-width: 560px) { .c-step-into-rpa .c-facts dd { font-size: .95rem; } .c-step-into-rpa .c-facts div { padding: 14px 16px; } }
