/* SS-252: one 24-second UI walkthrough. Every timed element shares the same clock. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.walkthrough {
  --flow-time: 24s;
  position: relative;
  width: min(100%, 390px);
  margin: 28px auto 0;
}
.flow-shell {
  border: 7px solid var(--ink);
  border-radius: 38px;
  background: var(--paper);
  overflow: hidden;
  box-shadow: 0 24px 64px -30px rgb(23 27 34 / 0.4);
}
.flow-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.flow-brand {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 700;
}
.flow-badge {
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 400;
  padding-left: 2px;
}
.flow-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  min-width: 64px;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  background: white;
}
.flow-control:hover {
  background: var(--muted);
}
.flow-toggle:focus-visible ~ .flow-shell .flow-control {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.flow-play {
  display: none;
}
.flow-toggle:not(:checked) ~ .flow-shell .flow-play {
  display: inline;
}
.flow-toggle:not(:checked) ~ .flow-shell .flow-pause {
  display: none;
}
.flow-toggle:not(:checked) ~ .flow-shell * {
  animation-play-state: paused !important;
}
.flow-steps {
  list-style: none;
  padding: 12px;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  background: white;
  border-bottom: 1px solid var(--border);
}
.flow-steps li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}
.flow-steps li > span {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--muted);
}
.flow-steps .flow-step-0 {
  animation: step-niche var(--flow-time) linear infinite;
}
.flow-steps .flow-step-1 {
  animation: step-idea var(--flow-time) linear infinite;
}
.flow-steps .flow-step-2 {
  animation: step-make var(--flow-time) linear infinite;
}
.flow-steps .flow-step-3 {
  animation: step-download var(--flow-time) linear infinite;
}
.flow-stage {
  position: relative;
  height: 512px;
  pointer-events: none;
}
.flow-scene {
  position: absolute;
  inset: 0;
  padding: 20px 16px;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
}
.flow-scene h3 {
  font-size: 1.3rem;
  line-height: 1.2;
}
.flow-muted {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.flow-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-hover);
  font-size: 0.72rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.flow-niche {
  animation: scene-niche var(--flow-time) linear infinite;
}
.flow-ideas {
  animation: scene-ideas var(--flow-time) linear infinite;
}
.flow-making {
  animation: scene-making var(--flow-time) linear infinite;
}
.flow-result {
  animation: scene-result var(--flow-time) linear infinite;
}
.flow-niches {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}
.flow-choice {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 118px;
  padding: 12px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  font-size: 0.8rem;
  font-weight: 600;
}
.flow-niche-icon {
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  width: 34px;
  height: 34px;
  color: var(--accent-hover);
  background: var(--accent-soft);
  border-radius: 9px;
  flex: none;
}
.flow-niche .flow-picked {
  animation: select-niche var(--flow-time) linear infinite;
}
.flow-check {
  margin-left: auto;
  color: var(--accent-hover);
  font-weight: 700;
  opacity: 0;
}
.flow-niche .flow-check {
  animation: check-niche var(--flow-time) linear infinite;
}
.flow-action {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  background: var(--accent);
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
  min-height: 46px;
  padding: 10px 12px;
  margin-top: 20px;
}
.flow-action > span:not(.flow-pointer) {
  margin-left: auto;
}
.flow-niche > .flow-action {
  animation: press-ideas var(--flow-time) linear infinite;
}
.flow-niche-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--muted);
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 14px;
}
.flow-idea-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.flow-idea {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 76px;
  padding: 12px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: white;
  font-size: 0.85rem;
}
.flow-radio {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  flex: none;
}
.flow-ideas .flow-picked {
  animation: select-idea var(--flow-time) linear infinite;
}
.flow-ideas .flow-picked .flow-radio {
  animation: radio-idea var(--flow-time) linear infinite;
}
.flow-ideas .flow-check {
  animation: check-idea var(--flow-time) linear infinite;
}
.flow-ideas > .flow-action {
  animation: press-make var(--flow-time) linear infinite;
  margin-top: 16px;
}
.flow-making {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}
.flow-spinner {
  width: 56px;
  height: 56px;
  border: 4px solid var(--accent-soft);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin-bottom: 26px;
  animation: flow-spin 1.2s linear infinite;
}
.flow-tasks {
  display: grid;
  gap: 8px;
  text-align: left;
  color: var(--text-muted);
  margin-top: 24px;
  font-size: 0.92rem;
}
.flow-tasks p {
  display: flex;
  align-items: center;
  gap: 10px;
}
.flow-tasks span {
  color: var(--accent);
}
.flow-loading {
  width: min(300px, 100%);
  height: 5px;
  background: var(--accent-soft);
  border-radius: 4px;
  margin-top: 26px;
  overflow: hidden;
}
.flow-loading span {
  display: block;
  height: 100%;
  background: var(--accent);
  transform-origin: left;
  animation: loading-post var(--flow-time) linear infinite;
}
.flow-result-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.flow-result-title > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: #e6f4ea;
  color: #24613c;
  border-radius: 50%;
}
.flow-result-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 14px;
  align-items: start;
}
.flow-image {
  width: 152px;
  height: 190px;
  object-fit: contain;
  border-radius: 10px;
  margin: 0 auto;
}
.flow-caption {
  border: 1px solid var(--border);
  padding: 12px 14px;
  border-radius: 12px;
  background: white;
  font-size: 0.8rem;
  line-height: 1.45;
}
.flow-caption p + p {
  margin-top: 8px;
}
.flow-caption .flow-caption-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.flow-download {
  margin-top: 14px;
  font-size: 0.8rem;
  animation: press-download var(--flow-time) linear infinite;
}
.flow-toast {
  position: absolute;
  left: 50%;
  bottom: 92px;
  transform: translate(-50%, 12px);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px;
  width: max-content;
  max-width: calc(100% - 24px);
  background: var(--ink);
  color: white;
  border-radius: 14px;
  box-shadow: 0 8px 30px rgb(0 0 0 / 0.2);
  opacity: 0;
  animation: downloaded-post var(--flow-time) linear infinite;
}
.flow-toast-check {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  background: #c9f0d6;
  color: #24613c;
  border-radius: 50%;
}
.flow-toast strong {
  font-size: 0.8rem;
}
.flow-toast p {
  color: #d9d4ea;
  font-size: 0.72rem;
  margin-top: 2px;
}
.flow-pointer {
  position: absolute;
  z-index: 3;
  right: 20px;
  top: 24px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgb(23 27 34 / 0.55);
  border: 3px solid white;
  box-shadow: 0 1px 6px rgb(0 0 0 / 0.2);
  opacity: 0;
}
.flow-pointer i {
  position: absolute;
  width: 38px;
  height: 38px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  left: -10px;
  top: -10px;
  opacity: 0;
}
.flow-niche .flow-pointer {
  animation: pointer-niche var(--flow-time) linear infinite;
}
.flow-niche .flow-pointer i {
  animation: tap-niche var(--flow-time) linear infinite;
}
.flow-ideas .flow-pointer {
  right: 26%;
  top: 20px;
  animation: pointer-make var(--flow-time) linear infinite;
}
.flow-ideas .flow-pointer i {
  animation: tap-make var(--flow-time) linear infinite;
  border-color: var(--peach);
}
.flow-download .flow-pointer {
  right: 24%;
  top: 20px;
  animation: pointer-download var(--flow-time) linear infinite;
}
.flow-download .flow-pointer i {
  animation: tap-download var(--flow-time) linear infinite;
  border-color: var(--peach);
}
.flow-progress {
  height: 3px;
  background: var(--accent-soft);
}
.flow-progress span {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left;
  background: var(--accent);
  animation: flow-progress var(--flow-time) linear infinite;
}
.demo-full {
  margin-top: 20px;
}
.demo-full > summary {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 10px 0;
  text-underline-offset: 4px;
}
.demo-full[open] > summary {
  margin-bottom: 16px;
}

@keyframes scene-niche {
  0%,
  18% {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  19.5%,
  100% {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
  }
}
@keyframes scene-ideas {
  0%,
  19.5% {
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
  }
  21%,
  38% {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  39.5%,
  100% {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
  }
}
@keyframes scene-making {
  0%,
  39.5% {
    opacity: 0;
    visibility: hidden;
  }
  41%,
  53% {
    opacity: 1;
    visibility: visible;
  }
  54.5%,
  100% {
    opacity: 0;
    visibility: hidden;
  }
}
@keyframes scene-result {
  0%,
  54.5% {
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
  }
  56%,
  97% {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  99%,
  100% {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
  }
}
@keyframes select-niche {
  0%,
  9% {
    background: white;
    border-color: var(--border);
  }
  11%,
  100% {
    background: var(--accent-soft);
    border-color: var(--accent);
  }
}
@keyframes select-idea {
  0%,
  25% {
    background: white;
    border-color: var(--border);
  }
  27%,
  100% {
    background: var(--accent-soft);
    border-color: var(--accent);
  }
}
@keyframes check-niche {
  0%,
  9% {
    opacity: 0;
  }
  11%,
  100% {
    opacity: 1;
  }
}
@keyframes check-idea {
  0%,
  25% {
    opacity: 0;
  }
  27%,
  100% {
    opacity: 1;
  }
}
@keyframes radio-idea {
  0%,
  25% {
    border-color: var(--border);
    background: white;
  }
  27%,
  100% {
    border: 5px solid var(--accent);
    background: white;
  }
}
@keyframes press-ideas {
  0%,
  16%,
  18%,
  100% {
    transform: scale(1);
  }
  17% {
    transform: scale(0.98);
  }
}
@keyframes press-make {
  0%,
  35%,
  38%,
  100% {
    transform: scale(1);
  }
  36.5% {
    transform: scale(0.98);
  }
}
@keyframes press-download {
  0%,
  81%,
  84%,
  100% {
    transform: scale(1);
  }
  82.5% {
    transform: scale(0.98);
  }
}
@keyframes pointer-niche {
  0%,
  4% {
    opacity: 0;
    transform: translate(36px, 32px);
  }
  8%,
  13% {
    opacity: 1;
    transform: translate(0, 0);
  }
  16%,
  100% {
    opacity: 0;
    transform: translate(0, 0);
  }
}
@keyframes pointer-make {
  0%,
  31% {
    opacity: 0;
    transform: translate(28px, 28px);
  }
  34%,
  38% {
    opacity: 1;
    transform: translate(0, 0);
  }
  40%,
  100% {
    opacity: 0;
    transform: translate(0, 0);
  }
}
@keyframes pointer-download {
  0%,
  76% {
    opacity: 0;
    transform: translate(24px, 24px);
  }
  80%,
  85% {
    opacity: 1;
    transform: translate(0, 0);
  }
  87%,
  100% {
    opacity: 0;
    transform: translate(0, 0);
  }
}
@keyframes tap-niche {
  0%,
  9% {
    opacity: 0;
    transform: scale(0.3);
  }
  10% {
    opacity: 0.8;
  }
  12% {
    opacity: 0;
    transform: scale(1.4);
  }
  100% {
    opacity: 0;
  }
}
@keyframes tap-make {
  0%,
  35% {
    opacity: 0;
    transform: scale(0.3);
  }
  36% {
    opacity: 0.8;
  }
  38% {
    opacity: 0;
    transform: scale(1.4);
  }
  100% {
    opacity: 0;
  }
}
@keyframes tap-download {
  0%,
  81% {
    opacity: 0;
    transform: scale(0.3);
  }
  82% {
    opacity: 0.8;
  }
  84% {
    opacity: 0;
    transform: scale(1.4);
  }
  100% {
    opacity: 0;
  }
}
@keyframes loading-post {
  0%,
  40% {
    transform: scaleX(0);
  }
  54%,
  100% {
    transform: scaleX(1);
  }
}
@keyframes downloaded-post {
  0%,
  84% {
    opacity: 0;
    transform: translate(-50%, 12px);
  }
  86%,
  96% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  98%,
  100% {
    opacity: 0;
    transform: translate(-50%, 0);
  }
}
@keyframes step-niche {
  0%,
  19.5% {
    color: var(--accent-hover);
  }
  20%,
  100% {
    color: var(--text-muted);
  }
}
@keyframes step-idea {
  0%,
  19.5% {
    color: var(--text-muted);
  }
  20%,
  39.5% {
    color: var(--accent-hover);
  }
  40%,
  100% {
    color: var(--text-muted);
  }
}
@keyframes step-make {
  0%,
  39.5% {
    color: var(--text-muted);
  }
  40%,
  79.5% {
    color: var(--accent-hover);
  }
  80%,
  100% {
    color: var(--text-muted);
  }
}
@keyframes step-download {
  0%,
  79.5% {
    color: var(--text-muted);
  }
  80%,
  99.5% {
    color: var(--accent-hover);
  }
  100% {
    color: var(--text-muted);
  }
}
@keyframes flow-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes flow-progress {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* Phone furniture is decorative; the demo's only real control is Play/Pause. */
.flow-status {
  height: 30px;
  padding: 4px 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 600;
  position: relative;
}
.flow-island {
  position: absolute;
  left: 50%;
  top: 7px;
  transform: translateX(-50%);
  width: 68px;
  height: 17px;
  background: var(--ink);
  border-radius: 99px;
}
.flow-home {
  height: 20px;
  display: grid;
  place-items: center;
  background: var(--paper);
}
.flow-home::before {
  content: "";
  width: 96px;
  height: 4px;
  background: var(--ink);
  border-radius: 99px;
}
.flow-choice .flow-check {
  position: absolute;
  top: 12px;
  right: 12px;
}
.flow-caption-window {
  height: 96px;
  overflow: hidden;
  mask-image: linear-gradient(transparent, black 10px, black calc(100% - 10px), transparent);
}
.flow-caption-text {
  animation: caption-scroll var(--flow-time) linear infinite;
}
.mobile-flow-guide {
  display: grid;
  gap: 22px;
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
}
.mobile-flow-guide li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.mobile-flow-guide li > span {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-size: 0.85rem;
  font-weight: 600;
}
.mobile-flow-guide h3 {
  font-size: 1rem;
}
.mobile-flow-guide p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 6px;
  max-width: 28rem;
}
@keyframes caption-scroll {
  0%,
  65% {
    transform: translateY(0);
  }
  79%,
  97% {
    transform: translateY(calc(-100% + 96px));
  }
  99%,
  100% {
    transform: translateY(0);
  }
}
@media (min-width: 720px) {
  .demo {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    column-gap: 64px;
    align-items: center;
  }
  .demo .walkthrough {
    margin-top: 0;
  }
  .demo-full,
  .demo > .small {
    grid-column: 1 / -1;
  }
}
@media (max-width: 719px) {
  .mobile-flow-guide {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .flow-shell * {
    animation: none !important;
  }
  .flow-toggle,
  .flow-control,
  .flow-pointer,
  .flow-niche,
  .flow-ideas,
  .flow-making,
  .flow-progress {
    display: none;
  }
  .flow-result {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .flow-result .flow-toast {
    display: none;
  }
  .flow-steps .flow-step-3 {
    color: var(--accent-hover);
  }
}
