/* How it works — flow-first mixtape user guide */
:root {
  --ink: #141210;
  --mute: #5c534b;
  --line: rgba(20, 18, 16, 0.12);
  --teal: #2fd9c0;
  --teal-deep: #0e8f7e;
  --panel: rgba(255, 255, 255, 0.86);
  --ink-panel: #141210;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
  --radius: 1.05rem;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(90% 55% at 0% 0%, rgba(47, 217, 192, 0.26), transparent 55%),
    radial-gradient(70% 45% at 100% 0%, rgba(176, 155, 135, 0.32), transparent 52%),
    linear-gradient(168deg, #fbf9f6 0%, #efe8df 52%, #e7ddd2 100%);
  -webkit-font-smoothing: antialiased;
}

body.theme-mike {
  background:
    radial-gradient(80% 50% at 10% 0%, rgba(61, 139, 255, 0.22), transparent 55%),
    radial-gradient(60% 40% at 100% 10%, rgba(212, 160, 23, 0.18), transparent 50%),
    linear-gradient(168deg, #e8eef4 0%, #d5dde8 55%, #c5d0de 100%);
  --teal: #3d8bff;
  --teal-deep: #1e5fc4;
  --ink: #0f1419;
  --mute: #4a5a6c;
}

.wrap {
  max-width: 36rem;
  margin: 0 auto;
  padding: 1.75rem 1.15rem calc(5.5rem + env(safe-area-inset-bottom, 0px));
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.75rem;
  animation: rise 0.45s ease both;
}

.kicker {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--mute);
}

.back {
  font-size: 0.85rem;
  color: var(--teal-deep);
  text-decoration: none;
  font-weight: 600;
}
.back:hover {
  text-decoration: underline;
}

h1 {
  font-family: var(--serif);
  font-size: clamp(2.45rem, 8.5vw, 3.35rem);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: -0.03em;
  margin-bottom: 0.7rem;
  animation: rise 0.5s ease both;
}

.lede {
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--mute);
  max-width: 26rem;
  margin-bottom: 1.35rem;
  animation: rise 0.55s ease both;
}

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 2rem;
  animation: rise 0.6s ease both;
}

.toc a {
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--teal-deep);
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(14, 143, 126, 0.28);
  background: rgba(255, 255, 255, 0.55);
  transition: background 0.2s ease, transform 0.2s ease;
}
body.theme-mike .toc a {
  border-color: rgba(61, 139, 255, 0.35);
}
.toc a:hover,
.toc a:focus-visible {
  background: rgba(47, 217, 192, 0.14);
  transform: translateY(-1px);
  outline: none;
}

/* One scenario = one composition */
.flow {
  margin-bottom: 1.75rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: var(--panel);
  overflow: hidden;
  animation: rise 0.7s ease both;
  box-shadow: 0 10px 28px rgba(20, 18, 16, 0.05);
}

.flow-hero {
  padding: 1.15rem 1.15rem 1rem;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(47, 217, 192, 0.14), transparent 55%),
    rgba(255, 255, 255, 0.4);
}
body.theme-mike .flow-hero {
  background:
    linear-gradient(135deg, rgba(61, 139, 255, 0.16), transparent 55%),
    rgba(255, 255, 255, 0.35);
}

.flow-hero .label {
  display: inline-block;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--teal-deep);
  margin-bottom: 0.45rem;
}

.flow-hero h2 {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.4rem;
}

.flow-hero p {
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--mute);
  max-width: 28rem;
}

.steps {
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.1rem 1fr;
  gap: 0.75rem;
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.steps li:last-child {
  border-bottom: 0;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.2;
  color: var(--teal-deep);
  padding-top: 0.05rem;
}

.steps strong {
  display: block;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.2rem;
}

.steps .body {
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--mute);
}

.steps .ex {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--ink);
  opacity: 0.78;
  font-style: italic;
}

.steps a.jump {
  display: inline-block;
  margin-top: 0.45rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--teal-deep);
  text-decoration: none;
  border-bottom: 1px solid rgba(14, 143, 126, 0.35);
}
.steps a.jump:hover {
  border-bottom-color: var(--teal-deep);
}

.flow-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.85rem 1.1rem 1rem;
  background: rgba(20, 18, 16, 0.03);
  border-top: 1px solid var(--line);
}

.flow-bar span {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mute);
  padding: 0.32rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.65);
}

.flow-bar span.is-you {
  color: var(--teal-deep);
  border-color: rgba(14, 143, 126, 0.35);
  background: rgba(47, 217, 192, 0.12);
}

.tip {
  padding: 1.15rem 1.15rem 1.25rem;
  border-radius: var(--radius);
  background: var(--ink-panel);
  color: #f4f0ea;
  animation: rise 0.8s ease both;
}

.tip .kicker {
  color: var(--teal);
  margin-bottom: 0.4rem;
}

.tip p {
  font-size: 0.95rem;
  line-height: 1.45;
  color: rgba(244, 240, 234, 0.88);
}

.tip .links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.9rem;
}

.tip a {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(244, 240, 234, 0.22);
  color: rgba(244, 240, 234, 0.92);
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.tip a:hover,
.tip a:focus-visible {
  background: rgba(47, 217, 192, 0.14);
  border-color: rgba(47, 217, 192, 0.45);
  outline: none;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
