/* Round 6 · "Your money": four paths after Rana delivers, each a short scene on a coloured stage.
   Path colours: ok = admin green · fix = tech blue · wait = marketing amber · wrong = coral. */
.safe { padding: var(--sec) 0; background: #fff; overflow: clip; }
.safe [data-path="ok"] { --c: var(--cat-admin); --cs: var(--cat-admin-s); --cd: var(--cat-admin-d); }
.safe [data-path="fix"] { --c: var(--cat-tech); --cs: var(--cat-tech-s); --cd: var(--cat-tech-d); }
.safe [data-path="wait"] { --c: var(--cat-marketing); --cs: var(--cat-marketing-s); --cd: var(--cat-marketing-d); }
.safe [data-path="wrong"] { --c: var(--coral); --cs: var(--coral-s); --cd: var(--coral-d); }
.safe__grid { display: grid; gap: 36px; }
.safe__title { font-size: clamp(38px, 3.7vw, 58px); line-height: 1; }
.safe__b { display: block; color: var(--cat-admin-d); }
.safe__lead { margin-top: 18px; max-width: 30em; font-size: 18px; line-height: 1.5; color: var(--text); }

/* ── the four paths ── */
.safe__paths { display: grid; gap: 10px; margin-top: 30px; }
.sp { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 72px; padding: 12px 18px 12px 12px; border: 0; border-radius: 20px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); text-align: left; cursor: pointer; overflow: hidden; transition: background-color .35s, box-shadow .35s, transform .35s var(--spring); -webkit-tap-highlight-color: transparent; }
.sp:hover { background: color-mix(in srgb, var(--cs) 55%, #fff); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 40%, transparent); }
.sp:active { transform: scale(.98); }
.sp[aria-selected="true"] { background: var(--cs); box-shadow: inset 0 0 0 2px var(--c), 0 16px 30px -20px var(--cd); }
.sp__ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; flex: none; background: var(--c); color: #fff; transition: transform .5s var(--spring); }
.sp[data-path="wait"] .sp__ic { color: var(--ink); }
.sp__ic svg { width: 22px; height: 22px; }
.sp[aria-selected="true"] .sp__ic { transform: rotate(-8deg) scale(1.08); }
.sp__t { display: grid; gap: 2px; min-width: 0; }
.sp__t b { font-size: 18px; line-height: 1.2; color: var(--ink); }
.sp__t small { font-size: 14.5px; line-height: 1.35; color: var(--muted); }
.sp[aria-selected="true"] .sp__t small { color: var(--text); }
.sp__bar { position: absolute; left: 14px; right: 14px; bottom: 0; height: 3px; border-radius: 3px; background: var(--c); transform: scaleX(0); transform-origin: 0 50%; }
.safe[data-auto] .sp.is-run .sp__bar { animation: sp-bar var(--dur, 7s) linear forwards; }
@keyframes sp-bar { to { transform: scaleX(1); } }

/* ── the stage ── */
.safe__stage { position: relative; isolation: isolate; display: grid; grid-template-rows: auto auto 1fr auto; gap: 18px; min-height: 540px; padding: clamp(18px, 2.4vw, 30px); border-radius: 32px; background: var(--cs); overflow: hidden; transition: background-color .5s ease; }
.safe__blob { position: absolute; z-index: -1; right: -120px; bottom: -140px; width: 380px; height: 380px; border-radius: 44% 56% 61% 39% / 42% 47% 53% 58%; background: var(--c); opacity: .16; transition: background-color .5s; }
.is-live .safe__blob { animation: blob 26s linear infinite; }
.safe__ex { justify-self: start; display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 999px; background: rgba(255, 255, 255, .78); font-weight: 700; font-size: 13px; color: var(--ink); }
.safe__exdot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }

/* the three spots, joined by a dashed line, with the money chip above */
.safe__row { position: relative; padding-top: 74px; }
.safe__spots { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); }
.spot { display: grid; justify-items: center; gap: 8px; }
.spot__ph { position: relative; z-index: 1; display: block; width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: #fff; box-shadow: 0 0 0 4px #fff, 0 10px 24px -12px rgba(3, 21, 20, .5); transition: box-shadow .5s var(--spring), transform .5s var(--spring); }
.spot__ph img { width: 100%; height: 100%; object-fit: cover; }
.spot--you .spot__ph img { object-position: 80% 20%; }
.spot__n { font-weight: 700; font-size: 14px; color: var(--ink); }
.safe__line { position: absolute; left: 16.66%; right: 16.66%; top: calc(74px + 31px); height: 0; border-top: 2px dashed color-mix(in srgb, var(--cd) 45%, transparent); }
.safe__stage[data-chip-at="held"] .spot--f .spot__ph,
.safe__stage[data-chip-at="frozen"] .spot--f .spot__ph,
.safe__stage[data-chip-at="rana"] .spot--rana .spot__ph { box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--c), 0 10px 24px -12px rgba(3, 21, 20, .5); transform: scale(1.06); }

.safe__track { position: absolute; left: 0; right: 0; top: 0; height: 64px; pointer-events: none; }
.safe__mover { width: 100%; height: 100%; --pos: 50%; transform: translateX(var(--pos)); transition: transform .7s cubic-bezier(.45, 0, .2, 1); }
.safe__stage[data-chip-at="rana"] .safe__mover { --pos: 83.33%; }
.safe__hop { position: absolute; left: 0; top: 0; }
.safe__hop.is-hop { animation: hop .7s cubic-bezier(.45, 0, .2, 1); }
@keyframes hop { 50% { transform: translateY(-34px); } }
.safe__chip { position: relative; display: grid; justify-items: center; gap: 1px; padding: 9px 16px 7px; border-radius: 18px; background: #fff; transform: translateX(-50%); box-shadow: 0 0 0 2px var(--c), 0 16px 30px -14px rgba(3, 21, 20, .45); white-space: nowrap; overflow: hidden; transition: box-shadow .4s; }
.safe__amt { font-family: var(--display); font-size: 26px; line-height: 1; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.safe__lbl { font-weight: 700; font-size: 11.5px; letter-spacing: .04em; color: var(--cd); }
.safe__chip::after { content: ""; position: absolute; inset: -2px; border-radius: inherit; box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 60%, transparent); }
.safe__stage.is-still .safe__chip::after { animation: still 1.6s ease-out infinite; }
@keyframes still { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 60%, transparent); } 100% { box-shadow: 0 0 0 16px color-mix(in srgb, var(--c) 0%, transparent); } }
.safe__frost { position: absolute; inset: 0; display: grid; place-items: start end; padding: 4px 6px; background: linear-gradient(140deg, rgba(219, 241, 255, .92), rgba(190, 227, 255, .75)); color: #2b6cb0; opacity: 0; transition: opacity .5s; }
.safe__lblrow { display: inline-flex; align-items: center; gap: 4px; }
.safe__snow { display: none; width: 15px; height: 15px; color: #2b6cb0; flex: none; }
.safe__stage[data-chip-at="frozen"] .safe__snow { display: block; animation: snow-in .6s var(--spring); }
@keyframes snow-in { from { transform: rotate(-90deg) scale(.4); opacity: 0; } }
.safe__stage[data-chip-at="frozen"] .safe__chip { padding-right: 20px; padding-left: 20px; }
.safe__stage[data-chip-at="frozen"] .safe__frost { opacity: 1; }
.safe__stage[data-chip-at="frozen"] .safe__chip { box-shadow: 0 0 0 2px #7cc4f5, 0 16px 30px -14px rgba(43, 108, 176, .55); }
.safe__stage[data-chip-at="frozen"] .safe__amt, .safe__stage[data-chip-at="frozen"] .safe__lblrow { position: relative; z-index: 1; color: #1e4e79; }
.safe__stage[data-chip-at="frozen"] .safe__lbl { color: #1e4e79; }

/* ── scenes: only the current path's scene shows; its pieces come in with .is-on ── */
.safe__scenes { position: relative; display: grid; align-content: center; min-height: 220px; }
.scene { display: none; }
.safe__stage[data-path="ok"] .scene--ok, .safe__stage[data-path="fix"] .scene--fix,
.safe__stage[data-path="wait"] .scene--wait, .safe__stage[data-path="wrong"] .scene--wrong { display: grid; }
.scene [data-s] { transition: opacity .35s ease, transform .6s var(--spring); }
.scene [data-s]:not(.is-on):not([data-s="approve"]):not([data-s="wallet"]):not([data-s="bell"]) { opacity: 0; transform: translateY(12px) scale(.94); }

.scene--ok { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 22px 28px; }
.sc-approve { position: relative; display: inline-flex; align-items: center; gap: 10px; height: 60px; padding: 0 26px; border-radius: 999px; background: var(--cd); color: #fff; font-weight: 700; font-size: 18px; white-space: nowrap; box-shadow: 0 18px 30px -16px var(--cd); }
.sc-approve > svg:first-child { width: 20px; height: 20px; }
.sc-approve.is-hit { animation: press-hit .38s var(--spring); }
.sc-approve.is-done { background: var(--c); color: var(--ink); }
.sc-cursor { position: absolute; left: 64%; top: 56%; width: 30px; height: 30px; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .3)); opacity: 0; transform: translate(150px, 70px); }
.sc-cursor.is-on { opacity: 1; transform: none; transition: transform 1s cubic-bezier(.3, .7, .2, 1), opacity .3s; }
.sc-wallet { display: grid; gap: 2px; padding: 16px 20px; border-radius: 22px; background: #fff; box-shadow: 0 20px 40px -24px rgba(3, 21, 20, .45); }
.sc-wallet small { font-weight: 700; font-size: 13px; color: var(--muted); }
.sc-wallet b { font-family: var(--display); font-size: clamp(36px, 3.6vw, 50px); line-height: 1.05; letter-spacing: -.02em; color: var(--cd); font-variant-numeric: tabular-nums; }
.sc-wallet span { font-size: 14px; color: var(--muted); }
.sc-wallet.is-paid { animation: m-pop 520ms var(--spring); }

.scene--fix { gap: 10px; }
.sc-bub { max-width: 86%; padding: 12px 16px; border-radius: 20px; font-size: 16px; line-height: 1.4; box-shadow: 0 12px 24px -16px rgba(3, 21, 20, .45); }
.sc-bub--you { justify-self: end; background: var(--cd); color: #fff; border-bottom-right-radius: 6px; font-weight: 700; }
.sc-bub--her { justify-self: start; display: flex; align-items: center; gap: 10px; background: #fff; color: var(--ink); border-bottom-left-radius: 6px; }
.sc-bub--her img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex: none; }
.sc-count { justify-self: end; padding: 5px 11px; border-radius: 999px; background: #fff; font-weight: 700; font-size: 12.5px; color: var(--cd); }
.scene--fix .m-dots { color: var(--c); }
.scene--fix .m-dots.is-gone { display: none; }
.sc-sent { display: none; align-items: center; gap: 6px; font-weight: 700; }
.sc-sent.is-on { display: inline-flex; }
.sc-sent svg { width: 18px; height: 18px; padding: 2px; border-radius: 50%; background: var(--c); color: #fff; }

.scene--wait { gap: 12px; }
.sc-days__h { font-weight: 700; font-size: 13px; color: var(--cd); }
.sc-days { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; }
.sc-days li { display: grid; place-items: center; aspect-ratio: 1; border-radius: 12px; background: rgba(255, 255, 255, .7); font-family: var(--display); font-size: clamp(13px, 1.3vw, 18px); color: color-mix(in srgb, var(--cd) 55%, transparent); transition: background-color .25s, color .25s, transform .4s var(--spring); }
.sc-days li.is-lit { background: var(--c); color: var(--ink); transform: translateY(-3px); }
.sc-days li:nth-child(8).is-lit { background: var(--cd); color: #fff; }
.sc-days li:last-child.is-lit { background: var(--cat-admin); color: var(--ink); }
.sc-toast { justify-self: start; display: flex; align-items: center; gap: 12px; margin-top: 6px; padding: 12px 18px 12px 12px; border-radius: 18px; background: #fff; box-shadow: 0 18px 34px -20px rgba(3, 21, 20, .5); font-size: 15px; color: var(--ink); }
.sc-toast b { display: block; font-size: 12px; color: var(--muted); }
.sc-bell { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--c); color: var(--ink); flex: none; }
.sc-bell svg { width: 22px; height: 22px; }
.sc-bell.is-ring { animation: bell .6s ease-in-out 2; transform-origin: 50% 10%; }
@keyframes bell { 20% { transform: rotate(16deg); } 45% { transform: rotate(-14deg); } 70% { transform: rotate(8deg); } }

.scene--wrong { grid-template-columns: minmax(0, 1fr) auto; gap: 12px 18px; align-items: center; }
.sc-thread { display: grid; gap: 10px; }
.sc-team { display: grid; justify-items: center; gap: 8px; padding: 16px 18px; border-radius: 22px; background: #fff; text-align: center; box-shadow: 0 18px 34px -22px rgba(3, 21, 20, .5); }
.sc-team span { display: grid; font-size: 13px; line-height: 1.3; color: var(--muted); }
.sc-team b { font-size: 15px; color: var(--ink); }
.sc-ring { width: 64px; height: 64px; transform: rotate(-90deg); }
.sc-ring circle { fill: none; stroke-width: 6; }
.sc-ring__bg { stroke: var(--cs); }
.sc-ring__fg { stroke: var(--cd); stroke-linecap: round; --len: 164; --dur: 1.6s; stroke-dasharray: 164; stroke-dashoffset: 164; }
.sc-ring__fg.is-on { stroke-dashoffset: 0; }
.sc-ring text { transform: rotate(90deg); transform-origin: 32px 32px; font-family: var(--display); font-size: 15px; fill: var(--ink); }
.sc-outs { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.safe__out { padding: 10px 16px; border-radius: 999px; background: #fff; font-weight: 700; font-size: 15px; color: var(--ink); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 35%, transparent); transition: background-color .3s, color .3s, transform .4s var(--spring); }
.sc-outs[data-hl="0"] .safe__out:nth-child(1), .sc-outs[data-hl="1"] .safe__out:nth-child(2), .sc-outs[data-hl="2"] .safe__out:nth-child(3) { background: var(--cd); color: #fff; transform: translateY(-3px) scale(1.04); }

/* ── caption + replay ── */
.safe__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px 18px; min-height: 52px; }
.safe__cap { max-width: 38em; font-weight: 700; font-size: 16px; line-height: 1.4; color: var(--ink); opacity: 0; transform: translateY(6px); transition: opacity .4s, transform .5s var(--spring); }
.safe__cap.is-on { opacity: 1; transform: none; }
.safe__replay { display: inline-flex; align-items: center; gap: 8px; flex: none; height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .85); font-weight: 700; font-size: 14px; color: var(--ink); cursor: pointer; transition: background-color .2s, transform .3s var(--spring); }
.safe__replay:hover { background: #fff; }
.safe__replay:active { transform: scale(.95); }
.safe__replay svg { width: 17px; height: 17px; }

/* ── desktop: copy + paths left (5fr), stage right (7fr) ── */
@media (min-width: 960px) {
  .safe { padding: clamp(80px, 8vw, 128px) 0; }
  .safe__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(36px, 4vw, 64px); align-items: center; }
  .safe__row { padding-top: 84px; }
  .safe__line { top: calc(84px + 35px); }
  .spot__ph { width: 72px; height: 72px; }
  .safe__track { height: 72px; }
}
@media (min-width: 960px) and (max-height: 800px) {
  .safe { padding: 72px 0; }
  .safe__stage { min-height: 500px; gap: 12px; }
  .safe__paths { margin-top: 22px; gap: 8px; }
  .sp__t small { font-size: 14px; }
  .safe__lead { font-size: 17px; }
  .sp { min-height: 64px; padding-block: 9px; }
}
/* ── phone: paths become a 2×2 grid above the stage ── */
@media (max-width: 959px) {
  .safe__paths { grid-template-columns: 1fr 1fr; gap: 8px; }
  .sp { flex-direction: column; align-items: flex-start; gap: 10px; min-height: 0; padding: 12px; }
  .sp__ic { width: 36px; height: 36px; }
  .sp__ic svg { width: 19px; height: 19px; }
  .sp__t b { font-size: 16px; }
  .safe__stage { min-height: 460px; border-radius: 26px; }
  .scene--ok { grid-template-columns: 1fr; justify-items: start; }
  .scene--wrong { grid-template-columns: 1fr; }
  .sc-team { grid-auto-flow: column; justify-content: start; text-align: left; }
  .sc-ring { width: 52px; height: 52px; }
  .sc-days { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .safe__chip { padding: 7px 12px 6px; }
  .safe__amt { font-size: 22px; }
  .safe__foot { flex-direction: column; align-items: stretch; }
  .safe__replay { align-self: flex-end; }
  .safe__ex { font-size: 12px; }
  .safe__cap { font-size: 15px; }
}
@media (max-width: 480px) { .sp__t small { display: none; } .sp__t b { font-size: 15px; } .sp { padding: 11px 10px; } }

@media (prefers-reduced-motion: reduce) {
  .safe__blob { animation: none !important; }
  .scene [data-s] { transition: none; }
}
