/* Página de curso: Power BI para RRHH. Identidad propia: el ciclo de vida del empleado.
   Acento ciruela cálido, etiquetas de paso con el caso de cada unidad y cifras en itálica. */
.c-power-bi-rrhh { --rh: #a3346f; --rh-soft: #f7dceb; --rh-ink: #5e1340; --rh-2: #e07a3f; }
:root[data-theme="dark"] .c-power-bi-rrhh { --rh: #f08ac0; --rh-soft: #44203a; --rh-ink: #ffd3ea; --rh-2: #f5a571; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .c-power-bi-rrhh { --rh: #f08ac0; --rh-soft: #44203a; --rh-ink: #ffd3ea; --rh-2: #f5a571; }
}
.c-power-bi-rrhh .c-hero h1 { font-size: clamp(2.2rem, 1.3rem + 2.9vw, 3.6rem); max-width: 17ch; }
.c-power-bi-rrhh .c-hero h1 em, .c-power-bi-rrhh .section-head h2 em, .c-power-bi-rrhh .cs-path h2 em { color: var(--rh); }
.c-power-bi-rrhh .cs-step-n { justify-self: start; padding-left: 14px; border-left: 3px solid var(--rh); font-family: var(--f-body); font-weight: 600; font-size: .8rem; letter-spacing: .02em; color: var(--rh); }
.c-power-bi-rrhh .gain-list span { -webkit-text-stroke-color: var(--rh); font-style: italic; }
.c-power-bi-rrhh .c-facts dd { font-style: italic; }

/* ---------- Portada: tablero de personas con el recorrido del empleado ---------- */
.rh-hero { background: var(--surface); border: 1px solid var(--line); padding: 18px 20px 20px; display: grid; gap: 14px; }
.rh-hero header { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.rh-hero header span { font-weight: 700; }
.rh-hero header small { font-size: .74rem; color: var(--muted); }
.rh-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rh-kpis span { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.rh-kpis small { font-size: .68rem; color: var(--muted); line-height: 1.2; }
.rh-kpis b { font-family: var(--f-display); font-style: italic; font-size: 1.35rem; }
.rh-kpis b.hot { color: var(--rh); }
.rh-journey { position: relative; aspect-ratio: 400 / 150; padding-bottom: 0; }
.rh-journey svg { position: absolute; inset: 0 0 auto; width: 100%; aspect-ratio: 400 / 120; overflow: visible; }
.rh-line { fill: none; stroke: var(--rh); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 2 7; }
.rh-stop { fill: var(--surface); stroke: var(--rh); stroke-width: 2.5; }
.rh-walker { fill: var(--rh-2); stroke: var(--surface); stroke-width: 3; }
.rh-journey ol { list-style: none; margin: 0; padding: 0; position: absolute; left: 0; right: 0; top: 0; aspect-ratio: 400 / 120; }
.rh-journey li { position: absolute; left: var(--x); top: var(--y); translate: -50% 12px; font-size: .68rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.rh-journey li.t { translate: -50% calc(-100% - 12px); }
.rh-journey li:first-child { translate: -8% 12px; }
.rh-journey li:last-child { translate: -92% 12px; }
.rh-ask { position: absolute; left: -22px; bottom: -24px; max-width: 70%; padding: 11px 16px; border-radius: 16px 16px 16px 4px; background: var(--rh); color: #fff; font-weight: 700; font-size: .9rem; box-shadow: var(--shadow); animation: c-in .7s .7s cubic-bezier(.2, .8, .2, 1) both, c-bob 5s 1.6s ease-in-out infinite; }
:root[data-theme="dark"] .rh-ask { color: #2b0a1d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rh-ask { color: #2b0a1d; } }

/* ---------- Historia ---------- */
.rh-stage { font-size: .86rem; }
.c-power-bi-rrhh .s2, .c-power-bi-rrhh .s4 { display: block; }
.c-power-bi-rrhh .s5 { padding: 7%; }

/* Escena 1: planillas sueltas */
.rh-stage .s1 { background: radial-gradient(circle at 20% 85%, color-mix(in srgb, var(--rh) 10%, transparent), transparent 55%); }
.rh-file { position: absolute; width: 40%; display: grid; gap: 4px; padding: 12px 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); box-shadow: 0 14px 30px -18px rgba(16, 42, 67, .5); }
.rh-file b { font-family: var(--f-data); font-weight: 500; font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rh-file b::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 2px; background: #1d7044; }
.rh-file span { font-size: .7rem; color: var(--muted); }
.rh-file::after { content: ""; height: 26px; background: repeating-linear-gradient(transparent 0 6px, var(--line) 6px 8px); border-radius: 2px; }
.rh-file.f1 { left: 7%; top: 8%; transform: rotate(-4deg); }
.rh-file.f2 { right: 7%; top: 12%; transform: rotate(5deg); --d: .1s; }
.rh-file.f3 { left: 12%; top: 42%; transform: rotate(3deg); --d: .2s; }
.rh-file.f4 { right: 10%; top: 46%; transform: rotate(-6deg); --d: .3s; }
.rh-boss { position: absolute; left: 50%; bottom: 7%; translate: -50% 0; width: max-content; max-width: 80%; padding: 10px 16px; border-radius: 14px; background: var(--ink); color: var(--bg); font-weight: 700; font-size: .92rem; text-align: center; --d: .5s; }
.rh-boss small { display: block; font-weight: 500; font-size: .68rem; opacity: .7; }
.cs-stage:not([data-step="1"]) .rh-file { opacity: 0; transform: translateY(26px) rotate(0); }
.cs-stage:not([data-step="1"]) .rh-boss { opacity: 0; transform: scale(.85); }

/* Escena 2: Power Query y dotación */
.rh-pq { border-radius: 14px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; }
.rh-pq header { padding: 8px 12px; font-weight: 700; font-size: .78rem; background: var(--surface); border-bottom: 1px solid var(--line); }
.rh-row { display: grid; grid-template-columns: .7fr 1.2fr 1.1fr .8fr; gap: 6px; padding: 6px 12px; border-top: 1px solid var(--line); font-family: var(--f-data); font-size: .7rem; color: var(--muted); }
.rh-row.h { border-top: 0; color: var(--ink); font-weight: 500; background: var(--rh-soft); }
.rh-row span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rh-applied { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; --d: .2s; }
.rh-applied li { padding: 4px 10px; border-radius: 999px; font-size: .68rem; font-weight: 600; background: var(--surface); border: 1px solid var(--line); }
.rh-applied li::before { content: "✓ "; color: var(--rh); }
.rh-hc { margin-top: 12px; display: grid; gap: 6px; --d: .4s; }
.rh-hc small { font-size: .72rem; color: var(--muted); }
.rh-hc p { margin: 0; display: grid; grid-template-columns: 96px 1fr; gap: 8px; align-items: center; font-size: .72rem; }
.rh-hc i { height: 14px; width: var(--w); border-radius: 0 6px 6px 0; background: var(--rh); transform-origin: left; transition: transform .8s .5s cubic-bezier(.2, .8, .2, 1); }
.cs-stage:not([data-step="2"]) .rh-hc i { transform: scaleX(0); }
.cs-stage:not([data-step="2"]) .s2 > * { opacity: 0; transform: translateY(14px); }

/* Escena 3: funnel */
.rh-funnel { display: grid; gap: 6px; justify-items: center; }
.rh-funnel p { margin: 0; width: var(--w); display: flex; justify-content: space-between; gap: 8px; padding: 8px 12px; border-radius: 10px; box-sizing: border-box; background: color-mix(in srgb, var(--rh) calc(30% + var(--w) * .5), var(--surface)); color: #fff; font-size: .74rem; font-weight: 600; transform-origin: center; transition: transform .6s cubic-bezier(.2, .8, .2, 1); min-width: 120px; }
.rh-funnel p:nth-child(2) { transition-delay: .08s; } .rh-funnel p:nth-child(3) { transition-delay: .16s; } .rh-funnel p:nth-child(4) { transition-delay: .24s; } .rh-funnel p:nth-child(5) { transition-delay: .32s; }
.rh-funnel b { font-family: var(--f-display); font-style: italic; }
:root[data-theme="dark"] .rh-funnel p { color: #2b0a1d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rh-funnel p { color: #2b0a1d; } }
.cs-stage:not([data-step="3"]) .rh-funnel p { transform: scaleX(.2); }
.rh-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; --d: .4s; }
.rh-side span { display: grid; gap: 1px; padding: 8px 10px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
.rh-side small { font-size: .66rem; color: var(--muted); } .rh-side b { font-style: italic; font-size: 1rem; }
.rh-guide { position: absolute; left: 7%; right: 7%; bottom: 6%; margin: 0; font-size: .8rem; font-weight: 600; font-style: italic; color: var(--rh); --d: .6s; }
.rh-guide::before { content: "Pregunta guía · "; font-style: normal; color: var(--muted); font-weight: 500; }
.cs-stage:not([data-step="3"]) .s3 .rh-side, .cs-stage:not([data-step="3"]) .s3 .rh-guide { opacity: 0; transform: translateY(12px); }

/* Escena 4: mapa de calor */
.rh-heat { display: grid; grid-template-columns: minmax(0, 1.2fr) repeat(4, minmax(0, 1fr)); gap: 4px; align-items: center; }
.rh-heat b { font-size: .64rem; font-weight: 700; color: var(--muted); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rh-heat b.a { text-align: left; color: var(--ink); font-size: .72rem; }
.rh-heat i { height: 40px; border-radius: 8px; background: color-mix(in srgb, var(--rh) calc(var(--v) * 100%), var(--sky)); transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.cs-stage:not([data-step="4"]) .rh-heat i { transform: scale(.4); }
.rh-heat i:nth-of-type(6) { outline: 3px solid var(--rh-2); outline-offset: 2px; }
.rh-driver { margin-top: 16px; display: grid; gap: 2px; padding: 10px 14px; border-radius: 12px; background: var(--rh-soft); border-left: 4px solid var(--rh-2); --d: .4s; }
.rh-driver small { font-size: .7rem; color: var(--muted); } .rh-driver b { font-size: .95rem; color: var(--rh-ink); }
.cs-stage:not([data-step="4"]) .s4 .rh-driver, .cs-stage:not([data-step="4"]) .s4 .rh-guide, .cs-stage:not([data-step="4"]) .s4 .rh-heat { opacity: 0; transform: translateY(12px); }

/* Escena 5: rotación y el mensaje */
.rh-exit small { font-size: .74rem; color: var(--muted); }
.rh-cols { display: flex; align-items: flex-end; gap: 6%; height: 130px; margin-top: 8px; border-bottom: 1px solid var(--line); }
.rh-cols p { position: relative; flex: 1; height: var(--h); margin: 0; }
.rh-cols i { display: block; height: 100%; border-radius: 8px 8px 0 0; background: color-mix(in srgb, var(--rh) 30%, var(--sky)); transform-origin: bottom; transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.rh-cols p.hi i { background: var(--rh); }
.rh-cols span { position: absolute; left: 0; right: 0; bottom: -20px; text-align: center; font-size: .66rem; color: var(--muted); white-space: nowrap; }
.cs-stage:not([data-step="5"]) .rh-cols i { transform: scaleY(.05); }
.rh-story { position: absolute; left: 7%; right: 7%; bottom: 7%; display: grid; gap: 4px; padding: 12px 16px; border-radius: 14px; background: var(--deep); color: var(--on-deep); --d: .5s; }
.rh-story small { font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--rh); }
:root .rh-story small { color: #f5a8cf; }
.rh-story b { font-family: var(--f-display); font-style: italic; font-size: 1.05rem; }
.rh-story span { font-size: .78rem; opacity: .8; }
.cs-stage:not([data-step="5"]) .rh-story { opacity: 0; transform: translateY(16px); }

/* ---------- Programa y recorrido ---------- */
.rh-units { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.c-power-bi-rrhh .unit-n { color: var(--rh); }
.c-power-bi-rrhh .unit li::before { background: var(--rh); }
.c-power-bi-rrhh .rh-case { background: color-mix(in srgb, var(--rh) 7%, var(--surface)); border-color: color-mix(in srgb, var(--rh) 28%, var(--line)); }
.rh-q { margin: 4px 0 0; padding-top: 10px; border-top: 1px dashed color-mix(in srgb, var(--rh) 35%, var(--line)); font-style: italic; font-weight: 600; color: var(--rh-ink); }
:root[data-theme="dark"] .rh-q { color: var(--rh); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rh-q { color: var(--rh); } }
.rh-road .dots { grid-template-columns: repeat(10, 1fr); }
.c-power-bi-rrhh .road-classes.on .dots i { background: var(--rh); }
.c-power-bi-rrhh .road-line i { background: linear-gradient(90deg, var(--rh), var(--rh-2)); }

@media (max-width: 1000px) { .rh-units { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .rh-ask { left: -8px; } .c-power-bi-rrhh .c-hero-art { margin-bottom: 18px; } }
@media (max-width: 560px) {
  .rh-units { grid-template-columns: minmax(0, 1fr); }
  .rh-hero { padding: 12px; gap: 10px; } .rh-kpis span { padding: 7px 8px; } .rh-kpis b { font-size: 1rem; } .rh-kpis small { font-size: .58rem; }
  .rh-journey li { font-size: .54rem; } .rh-ask { font-size: .76rem; padding: 8px 12px; max-width: 80%; }
  .rh-stage { font-size: .76rem; }
  .rh-file { width: 44%; padding: 7px 9px; gap: 2px; } .rh-file b { font-size: .6rem; } .rh-file span { font-size: .56rem; } .rh-file::after { height: 12px; }
  .rh-file.f1 { left: 4%; top: 5%; } .rh-file.f2 { right: 4%; top: 8%; } .rh-file.f3 { left: 6%; top: 38%; } .rh-file.f4 { right: 5%; top: 42%; }
  .rh-boss { font-size: .74rem; padding: 7px 11px; bottom: 5%; }
  .rh-pq header { padding: 5px 9px; font-size: .66rem; } .rh-row { padding: 3px 9px; font-size: .56rem; gap: 4px; }
  .rh-applied { margin-top: 6px; gap: 4px; } .rh-applied li { font-size: .54rem; padding: 3px 7px; }
  .rh-hc { margin-top: 6px; gap: 3px; } .rh-hc small { font-size: .6rem; } .rh-hc p { grid-template-columns: 72px 1fr; font-size: .58rem; } .rh-hc i { height: 9px; }
  .rh-funnel { gap: 3px; } .rh-funnel p { padding: 4px 9px; font-size: .6rem; min-width: 104px; }
  .rh-side { margin-top: 6px; gap: 5px; } .rh-side span { padding: 4px 8px; } .rh-side small { font-size: .54rem; } .rh-side b { font-size: .76rem; }
  .rh-guide { font-size: .62rem; bottom: 4%; left: 5%; right: 5%; }
  .rh-heat { gap: 3px; } .rh-heat b { font-size: .5rem; } .rh-heat b.a { font-size: .56rem; } .rh-heat i { height: 26px; border-radius: 5px; }
  .rh-driver { margin-top: 8px; padding: 6px 10px; } .rh-driver small { font-size: .56rem; } .rh-driver b { font-size: .74rem; }
  .rh-cols { height: 70px; } .rh-cols span { font-size: .54rem; bottom: -16px; }
  .rh-story { padding: 7px 10px; gap: 2px; bottom: 5%; left: 5%; right: 5%; } .rh-story small { font-size: .52rem; } .rh-story b { font-size: .78rem; } .rh-story span { font-size: .6rem; }
}
@media (prefers-reduced-motion: reduce) {
  .rh-ask { animation: none !important; }
  .rh-walker { display: none; }
  .rh-funnel p, .rh-hc i, .rh-heat i, .rh-cols i { transition: none !important; }
}
