/* C.R.U.X engagement spiral, shared by dark.html and light.html. Tone set via data-tone. */
.sp {
  --sp-ink: #F6F7FB; --sp-muted: rgba(246,247,251,.7); --sp-faint: rgba(246,247,251,.48);
  --sp-accent: #C68EFF; --sp-rule: rgba(246,247,251,.12); --sp-chip: #1A2347;
  --sp-panel-m: rgba(26,35,71,.62); --sp-panel-shadow: inset 0 0 0 1px rgba(255,255,255,.1);
  position: relative;
}
.sp[data-tone="light"] {
  --sp-ink: #0B0F29; --sp-muted: #4A5070; --sp-faint: rgba(74,80,112,.8);
  --sp-accent: #7B2CFF; --sp-rule: rgba(11,15,41,.12); --sp-chip: #F6F7FB;
  --sp-panel-m: rgba(255,255,255,.94); --sp-panel-shadow: 0 24px 60px rgba(11,15,41,.12);
}
.sp-journey { position: relative; height: 320vh; }
.sp-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: grid; padding-top: 84px; }
.sp-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sp-panel {
  position: relative; z-index: 2; align-self: end; margin: 0 16px 16px; padding: 20px;
  border-radius: 6px; background: var(--sp-panel-m); box-shadow: var(--sp-panel-shadow);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: var(--sp-ink);
}
.sp-kicker, .sp-mini, .sp-out small {
  font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--sp-faint);
}
.sp-btns { list-style: none; display: flex; gap: 8px; margin-top: 14px; }
.sp-btns li { flex: 1; }
.sp-btns button {
  width: 100%; min-height: 44px; border: 0; border-radius: 999px; cursor: pointer;
  font: 700 16px var(--sp-display); color: var(--sp-ink); background: var(--sp-chip);
  box-shadow: inset 0 0 0 1px var(--sp-rule); transition: background .35s, box-shadow .35s, color .35s;
}
.sp-btns button.is-done { box-shadow: inset 0 0 0 1.5px var(--c); }
.sp-btns button.is-cur { background: var(--c); color: #fff; box-shadow: 0 0 24px color-mix(in srgb, var(--c) 55%, transparent); }
.sp-body { margin-top: 18px; }
.sp-in { animation: sp-fade .45s cubic-bezier(.22,1,.36,1); }
.sp-in h3 { font-family: var(--sp-display); font-weight: var(--sp-display-w, 600); font-size: clamp(30px, 3.6vw, 52px); line-height: 1.02; letter-spacing: -.02em; text-shadow: none; }
.sp-verbs { color: var(--sp-faint); margin-top: 8px; }
.sp-next { color: var(--sp-accent); font-weight: 600; margin-top: 8px; font-size: 15px; }
.sp-line { color: var(--sp-accent); font-family: var(--sp-line-font, inherit); font-style: var(--sp-line-style, normal); font-weight: var(--sp-line-w, 600); font-size: clamp(19px, 1.7vw, 24px); line-height: 1.25; margin-top: 14px; }
.sp-detail { display: none; color: var(--sp-muted); font-size: 16px; line-height: 1.65; margin-top: 10px; max-width: 30em; }
.sp-out { display: flex; gap: 12px; align-items: center; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--sp-rule); font-weight: 600; font-size: 16px; }
.sp-out i { flex: none; width: 10px; height: 10px; border-radius: 50%; }
.sp-out small { display: block; font-size: 11px; margin-bottom: 2px; }
.sp-loop { list-style: none; counter-reset: s; display: none; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.sp-loop li { counter-increment: s; font-size: 13px; border-radius: 999px; padding: 5px 11px; background: var(--sp-chip); box-shadow: inset 0 0 0 1px var(--sp-rule); }
.sp-loop li::before { content: counter(s, decimal-leading-zero) "  "; white-space: pre; color: var(--sp-accent); font-size: 11px; }
.sp-prios { display: none; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--sp-rule); }
.sp-prios ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sp-prios li { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 5px; border-radius: 999px; background: var(--sp-chip); font-size: 13px; color: var(--sp-ink); }
.sp-prios b { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font: 700 11px var(--sp-display); background: #9AA0B8; color: #fff; transition: background .4s; }
.sp-nogl .sp-journey { height: auto; }
.sp-nogl .sp-sticky { position: relative; height: auto; }
@keyframes sp-fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (min-width: 1024px) {
  .sp-sticky { grid-template-columns: 1.15fr .85fr; padding-top: 96px; }
  .sp-canvas { position: relative; }
  .sp-panel { align-self: center; margin: 0 clamp(24px, 4vw, 64px) 0 0; padding: 8px 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .sp-body { min-height: 19rem; }
  .sp-detail, .sp-prios { display: block; }
  .sp-loop { display: flex; }
}
@media (prefers-reduced-motion: reduce) { .sp-in { animation: none; } }
