/*
  style.css
  Mobile-first. Base styles are for a phone; the @media blocks near the
  bottom add tweaks for wider screens.

  Brand colors: teal #0C4652, lime #C4D118, off-white #F7F7F2.
*/

/* ---------- Colors, font and basics ---------- */
:root {
  --teal: #0C4652;
  --teal-600: #14596A;
  --teal-800: #0A3A45;
  --teal-900: #072F38;
  --lime: #C4D118;
  --lime-soft: #E2EC78;
  --lime-tint: #F3F7D2;
  --bg: #F7F7F2;
  --ink: #10262B;
  --muted: #55696E;
  --line: #E1E4DA;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --shadow-card: 0 0 0 1px rgba(12, 70, 82, 0.07), 0 24px 48px -28px rgba(12, 70, 82, 0.45);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  font-size: 17px;
  background: var(--bg);
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  color: var(--ink);
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Keeps content a readable width and centered */
.wrap { width: 100%; max-width: 860px; margin: 0 auto; padding: 0 18px; }

main.wrap { flex: 1; padding-top: 32px; padding-bottom: 56px; }

h1, h2, h3, p { margin: 0; }
h1 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; }
h2 { font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }

.lead { font-size: 1.05rem; color: var(--muted); margin: 10px 0 24px; max-width: 46ch; }
.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-600);
  margin-bottom: 6px;
}
.view-title { font-size: clamp(1.7rem, 6.5vw, 2.5rem); color: var(--teal); margin-bottom: 18px; }

/* Icons are inline SVGs filled in by app.js */
.ico { display: inline-flex; width: 1.15em; height: 1.15em; flex: none; }
.ico svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Animated background ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); }
.b1 { width: 520px; height: 520px; top: -160px; right: -140px; background: rgba(196, 209, 24, 0.28); animation: drift 18s ease-in-out infinite alternate; }
.b2 { width: 560px; height: 560px; bottom: -220px; left: -200px; background: rgba(12, 70, 82, 0.14); animation: drift 22s ease-in-out infinite alternate-reverse; }
.dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(12, 70, 82, 0.13) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 70%);
          mask-image: linear-gradient(180deg, #000, transparent 70%);
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-60px, 50px) scale(1.15); }
}

/* ---------- Header and progress ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  color: #fff;
  padding: 12px 0 14px;
  background: linear-gradient(135deg, var(--teal-900), var(--teal));
  border-bottom: 1px solid rgba(196, 209, 24, 0.28);
  box-shadow: 0 10px 30px -14px rgba(7, 47, 56, 0.6);
}

.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 8px; }

.brand { display: flex; align-items: center; gap: 10px; }
.logo {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--lime);
  color: var(--teal);
  box-shadow: 0 0 0 4px rgba(196, 209, 24, 0.18);
}
.logo .ico { width: 18px; height: 18px; }
.logo svg { fill: currentColor; stroke-width: 1.5; }
.site-title { font-weight: 500; font-size: 0.9rem; letter-spacing: -0.01em; }
.site-title strong { font-weight: 700; color: var(--lime); }

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.pill-btn:hover { background: var(--lime); color: var(--teal); border-color: var(--lime); }
.pill-btn .ico { transition: transform 0.5s var(--ease); }
.pill-btn:hover .ico { transform: rotate(-200deg); }

.progress {
  order: 3;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 2px 0 0;
  padding: 0;
}
.step { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; font-weight: 500; color: #8FB0B6; white-space: nowrap; transition: color 0.4s; }
.dot {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #3F7480;
  font-size: 0.75rem;
  font-weight: 600;
  transition: background 0.4s, border-color 0.4s, color 0.4s;
}
.step.current { color: #fff; font-weight: 600; }
.step.current .dot { background: var(--lime); border-color: var(--lime); color: var(--teal); animation: ring 2.4s ease-out infinite; }
.step.done { color: var(--lime); }
.step.done .dot { border-color: var(--lime); background: rgba(196, 209, 24, 0.14); color: var(--lime); }

/* The line between steps fills with lime as you move forward */
.line { flex: 1; height: 2px; min-width: 14px; border-radius: 2px; background: #2C6672; overflow: hidden; }
.line i { display: block; height: 100%; width: 0; background: var(--lime); transition: width 0.7s var(--ease); }
.line.filled i { width: 100%; }

@keyframes ring {
  0%   { box-shadow: 0 0 0 0 rgba(196, 209, 24, 0.55); }
  70%  { box-shadow: 0 0 0 9px rgba(196, 209, 24, 0); }
  100% { box-shadow: 0 0 0 0 rgba(196, 209, 24, 0); }
}

/* ---------- Stages: only one is visible, children rise in one by one ---------- */
.stage > :not(.frames):not(#prompt-list):not(#idea-area):not(.marquee) {
  animation: rise 0.7s var(--ease) both;
}
.stage > :nth-child(2) { animation-delay: 0.07s !important; }
.stage > :nth-child(3) { animation-delay: 0.14s !important; }
.stage > :nth-child(4) { animation-delay: 0.21s !important; }
.stage > :nth-child(5) { animation-delay: 0.28s !important; }
.stage > :nth-child(6) { animation-delay: 0.35s !important; }

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

/* ---------- Buttons ---------- */
.actions { display: flex; flex-direction: column; gap: 12px; margin-top: 26px; }

.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.3;
  padding: 15px 24px;
  border-radius: 16px;
  border: 2px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: transform 0.3s var(--ease), box-shadow 0.3s, background 0.25s, color 0.25s;
}
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn .ico { transition: transform 0.3s var(--ease); }
.btn:hover .ico[data-icon="arrow"] { transform: translateX(5px); }
.btn:hover .ico[data-icon="shuffle"] { transform: rotate(180deg); }
.btn:hover .ico[data-icon="back"] { transform: translateX(-5px); }

.btn-primary { background: var(--teal); color: #fff; box-shadow: 0 14px 28px -12px rgba(12, 70, 82, 0.7); }
.btn-primary:hover { background: var(--teal-600); box-shadow: 0 20px 34px -12px rgba(12, 70, 82, 0.75); }

.btn-secondary { background: #fff; color: var(--teal); border-color: rgba(12, 70, 82, 0.2); }
.btn-secondary:hover { border-color: var(--teal); background: #fff; }

.btn-lime { background: var(--lime); color: var(--teal-900); box-shadow: 0 14px 34px -10px rgba(196, 209, 24, 0.7); }
.btn-lime:hover { box-shadow: 0 20px 40px -10px rgba(196, 209, 24, 0.85); }

/* A soft shine that sweeps across the main buttons now and then */
.btn-primary::after, .btn-lime::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  animation: shine 4.5s ease-in-out infinite;
}

@keyframes shine {
  0%, 60% { left: -60%; }
  100%    { left: 130%; }
}

.btn-big { font-size: 1.2rem; padding: 18px 30px; border-radius: 18px; }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; }
.btn:focus-visible, .pill-btn:focus-visible, summary:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }

/* ---------- Stage 1: welcome panel ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 32px;
  padding: 40px 24px 38px;
  color: #fff;
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(196, 209, 24, 0.3), transparent 50%),
    linear-gradient(150deg, #0F5866, var(--teal) 45%, var(--teal-900));
  box-shadow: 0 40px 70px -30px rgba(12, 70, 82, 0.7);
}
/* a glow that follows the mouse (position is set in app.js) */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(380px circle at var(--mx, 75%) var(--my, 15%), rgba(196, 209, 24, 0.22), transparent 60%);
  transition: background 0.2s;
}
/* fine grid lines */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(circle at 70% 20%, #000, transparent 70%);
          mask-image: radial-gradient(circle at 70% 20%, #000, transparent 70%);
}

.hero h1 { font-size: clamp(2.2rem, 9vw, 3.6rem); font-weight: 700; margin: 18px 0 0; max-width: 14ch; }
.hero .lead { color: rgba(255, 255, 255, 0.78); margin: 16px 0 30px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); animation: ring 2s ease-out infinite; }

/* Lime word with an underline that draws itself */
.hl { position: relative; display: inline-block; color: var(--lime); }
.hl::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.04em;
  width: 100%;
  height: 0.11em;
  border-radius: 99px;
  background: var(--lime);
  transform-origin: left;
  transform: scaleX(0);
  animation: draw 0.9s 0.7s var(--ease) forwards;
}
@keyframes draw { to { transform: scaleX(1); } }

/* Scrolling strip of idea names under the welcome panel */
.marquee {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 32px calc(50% - 50vw) 0;
  overflow: hidden;
  animation: rise 0.9s 0.35s var(--ease) both;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.track { display: flex; width: max-content; animation: marquee 55s linear infinite; }
.track.reverse { animation-direction: reverse; animation-duration: 65s; }
.marquee:hover .track { animation-play-state: paused; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-right: 12px;
  padding: 10px 18px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 20px -14px rgba(12, 70, 82, 0.5);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--teal);
  white-space: nowrap;
}
.chip-emoji { font-size: 1.15rem; }

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- Stage 1: idea card ---------- */
.idea-card {
  border-radius: 30px;
  background: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  animation: cardIn 0.75s cubic-bezier(0.2, 0.9, 0.25, 1.08) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(40px) scale(0.94); }
  to   { opacity: 1; transform: none; }
}

.idea-top {
  position: relative;
  overflow: hidden;
  padding: 28px 22px 26px;
  color: #fff;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(196, 209, 24, 0.3), transparent 55%),
    linear-gradient(150deg, #0F5866, var(--teal) 50%, var(--teal-900));
}

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 13px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
}
.tag.accent { background: var(--lime); border-color: var(--lime); color: var(--teal-900); }

.idea-emoji {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  margin-bottom: 18px;
  border-radius: 24px;
  font-size: 2.6rem;
  line-height: 1;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 16px 30px -14px rgba(0, 0, 0, 0.5);
  animation: emojiPop 0.8s 0.2s cubic-bezier(0.3, 1.5, 0.5, 1) both;
}
@keyframes emojiPop {
  from { opacity: 0; transform: scale(0.3) rotate(-18deg); }
  to   { opacity: 1; transform: none; }
}

.idea-top h2 { font-size: clamp(1.6rem, 6.5vw, 2.3rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; color: #fff; }
.idea-tagline { margin-top: 8px; font-size: 1.05rem; font-weight: 500; color: var(--lime-soft); }

.idea-body { padding: 8px 22px 28px; }
.idea-body h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0 10px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-600);
}
.idea-body h3::before { content: ""; width: 22px; height: 3px; border-radius: 3px; background: var(--lime); }
.idea-body p { color: var(--ink); }

.must-have { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.must-have li {
  position: relative;
  padding: 13px 16px 13px 50px;
  border-radius: 16px;
  background: var(--lime-tint);
  font-weight: 500;
  animation: rise 0.6s var(--ease) both;
  animation-delay: calc(0.35s + var(--i, 0) * 0.1s);
}
.must-have li::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 50%;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  border-radius: 50%;
  background: var(--teal);
}
.must-have li::after {
  content: "";
  position: absolute;
  left: 22px;
  top: 50%;
  width: 6px;
  height: 11px;
  margin-top: -7px;
  border: solid var(--lime);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

/* While shuffling: just the emoji and name, flickering like a slot machine */
.idea-card.shuffling { animation: none; box-shadow: var(--shadow-card), 0 0 0 4px rgba(196, 209, 24, 0.55); }
.idea-card.shuffling .idea-top { padding: 52px 22px; text-align: center; }
.idea-card.shuffling .idea-emoji { margin: 0 auto 16px; animation: reel 0.12s linear both; }
.idea-card.shuffling h2 { animation: reel 0.12s linear both; }
@keyframes reel {
  from { opacity: 0.2; transform: translateY(-45%); filter: blur(5px); }
  to   { opacity: 1; transform: none; filter: none; }
}

/* ---------- Stage 2: storyboard frames ---------- */
.frames { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 22px 0; }

.frame {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px;
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow-card);
  animation: rise 0.7s var(--ease) both;
  animation-delay: calc(0.15s + var(--i, 0) * 0.12s);
  transition: transform 0.4s var(--ease), box-shadow 0.4s;
}
.frame:hover { transform: translateY(-5px); box-shadow: 0 0 0 1px rgba(12, 70, 82, 0.1), 0 34px 50px -28px rgba(12, 70, 82, 0.55); }

/* Giant faint number in the corner */
.frame::after {
  content: attr(data-num);
  position: absolute;
  right: 16px;
  top: -6px;
  font-size: 5rem;
  font-weight: 800;
  line-height: 1;
  color: rgba(12, 70, 82, 0.06);
  pointer-events: none;
}

.frame-main { position: relative; z-index: 1; min-width: 0; }
.frame-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.frame-num {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--teal);
  color: var(--lime);
  font-size: 0.85rem;
  font-weight: 700;
}
.frame h2 { font-size: 1.1rem; color: var(--teal); }
.frame p { font-size: 0.95rem; color: var(--muted); }

/* A tiny phone-screen sketch on each frame, as a hint of what to draw */
.wire {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 66px;
  height: 92px;
  padding: 8px;
  border-radius: 14px;
  border: 2px solid var(--teal);
  background: #FAFBF2;
  transition: transform 0.5s var(--ease);
}
.frame:hover .wire { transform: rotate(-5deg) scale(1.06); }
.wire i { display: block; border-radius: 4px; }
.wire i:nth-child(1) { height: 9px; background: var(--teal); }
.wire i:nth-child(2) { flex: 1; background: repeating-linear-gradient(180deg, rgba(12, 70, 82, 0.2) 0 5px, transparent 5px 9px); }
.wire i:nth-child(3) { height: 13px; background: var(--lime); }
.frame:nth-child(2) .wire i:nth-child(2) {
  background:
    linear-gradient(90deg, transparent 47%, #FAFBF2 47% 53%, transparent 53%),
    linear-gradient(180deg, rgba(12, 70, 82, 0.2) 48%, #FAFBF2 48% 54%, rgba(12, 70, 82, 0.2) 54%);
}
.frame:nth-child(3) .wire i:nth-child(2) { background: radial-gradient(circle at 50% 45%, rgba(12, 70, 82, 0.22) 0 30%, transparent 32%); }
.frame:nth-child(4) .wire i:nth-child(2) { background: repeating-linear-gradient(180deg, rgba(196, 209, 24, 0.7) 0 5px, transparent 5px 9px); }

.callout {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 22px;
  background: var(--lime-tint);
  border: 2px dashed rgba(12, 70, 82, 0.35);
  font-size: 1.02rem;
  font-weight: 500;
  color: var(--teal-900);
}
.callout-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: var(--teal);
  color: var(--lime);
  animation: wiggle 2.8s ease-in-out infinite;
}
@keyframes wiggle {
  0%, 70%, 100% { transform: rotate(0); }
  78% { transform: rotate(-14deg); }
  88% { transform: rotate(10deg); }
}

/* ---------- Stage 3: prompts ---------- */
#prompt-list { display: flex; flex-direction: column; gap: 14px; }

.prompt-box {
  border-radius: 28px;
  background: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-card), 0 0 0 2px rgba(196, 209, 24, 0.9);
  animation: cardIn 0.7s cubic-bezier(0.2, 0.9, 0.25, 1.05) both;
}
.prompt-head { padding: 22px 22px 6px; }
.prompt-head h2 { font-size: 1.3rem; color: var(--teal); margin-top: 12px; }

/* 4 little bars showing which prompt you are on */
.segs { display: flex; gap: 6px; }
.segs i { flex: 1; height: 5px; border-radius: 5px; background: var(--line); }
.segs i.on { background: var(--lime); }
.segs i.now { background: var(--teal); }

.prompt-see {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 22px 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--lime-tint);
  font-size: 0.92rem;
  color: var(--ink);
}
.prompt-see .ico { margin-top: 3px; color: var(--teal); }
.prompt-see strong { font-weight: 600; }

/* The prompt text sits in a dark "code window" */
.terminal { margin: 14px 22px 0; border-radius: 18px; overflow: hidden; background: var(--teal-900); }
.terminal-bar { display: flex; align-items: center; gap: 7px; padding: 11px 16px; background: var(--teal-800); }
.terminal-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.22); }
.terminal-bar i:first-child { background: var(--lime); }
.terminal-bar span { margin-left: auto; font-size: 0.72rem; font-weight: 500; letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.5); }

.prompt-text {
  margin: 0;
  padding: 18px 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.7;
  color: #D6E6E8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.prompt-text .l-step { color: var(--lime); font-weight: 700; }
.prompt-text .l-rule { color: #9CC0C6; }
.prompt-text .l-paste { color: var(--teal-900); background: var(--lime-soft); border-radius: 4px; padding: 1px 4px; }

.prompt-actions { padding: 18px 22px 22px; }
.copy-btn { width: 100%; background: var(--lime); color: var(--teal-900); box-shadow: 0 14px 28px -12px rgba(196, 209, 24, 0.8); }
.copy-btn .ico-check { display: none; }
.copy-btn.copied { background: var(--teal); color: #fff; }
.copy-btn.copied .ico-copy { display: none; }
.copy-btn.copied .ico-check { display: inline-flex; animation: pop 0.45s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }

/* Earlier prompts shrink to a single row */
.prompt-collapsed { border-radius: 20px; background: #fff; box-shadow: var(--shadow-card); overflow: hidden; }
.prompt-collapsed summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--teal);
}
.prompt-collapsed summary::-webkit-details-marker { display: none; }
.tick { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--lime); color: var(--teal-900); }
.tick .ico { width: 14px; height: 14px; }
.chev { margin-left: auto; transition: transform 0.35s var(--ease); }
.prompt-collapsed[open] .chev { transform: rotate(180deg); }
.prompt-collapsed .prompt-body { animation: rise 0.45s var(--ease) both; }
.prompt-collapsed .terminal { margin-top: 0; }

/* Finish message */
.finish {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: 26px;
  padding: 36px 24px 30px;
  border-radius: 30px;
  text-align: center;
  color: #fff;
  background:
    radial-gradient(100% 100% at 50% 0%, rgba(196, 209, 24, 0.32), transparent 60%),
    linear-gradient(150deg, #0F5866, var(--teal) 50%, var(--teal-900));
  box-shadow: 0 40px 70px -30px rgba(12, 70, 82, 0.7);
  animation: cardIn 0.8s cubic-bezier(0.2, 0.9, 0.25, 1.05) both;
}
.finish p { max-width: 30ch; margin: 0 auto; font-size: 1.3rem; font-weight: 500; line-height: 1.45; }
.finish .actions { align-items: center; }
.finish-check { width: 72px; height: 72px; margin: 0 auto 20px; }
.finish-check svg { width: 100%; height: 100%; fill: rgba(196, 209, 24, 0.12); stroke: var(--lime); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.finish-check circle { stroke-dasharray: 152; stroke-dashoffset: 152; animation: stroke 0.9s 0.2s var(--ease) forwards; }
.finish-check path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: stroke 0.5s 0.9s var(--ease) forwards; }
@keyframes stroke { to { stroke-dashoffset: 0; } }

/* ---------- Footer ---------- */
.site-footer { padding: 30px 0; text-align: center; color: #fff; background: var(--teal-900); border-top: 1px solid rgba(196, 209, 24, 0.3); }
.tagline { font-size: 1.05rem; font-weight: 600; letter-spacing: 0.01em; }
.tagline span { display: inline-block; opacity: 0.5; animation: lit 6s ease-in-out infinite; }
.tagline span:nth-child(2) { animation-delay: 2s; }
.tagline span:nth-child(3) { animation-delay: 4s; }
.tagline .accent { color: var(--lime); }
@keyframes lit {
  0%, 100% { opacity: 0.5; }
  15%, 30% { opacity: 1; }
  45%      { opacity: 0.5; }
}

/* Very small phones: Start over becomes just an icon so the header stays on one row */
@media (max-width: 420px) {
  .pill-btn span:last-child { display: none; }
  .pill-btn { padding: 8px; }
}

/* ---------- Wider screens ---------- */
@media (min-width: 640px) {
  .header-inner { flex-wrap: nowrap; }
  .progress { order: 0; width: auto; flex: 1; max-width: 380px; margin: 0; }
  .hero { padding: 64px 52px 58px; }
  .idea-top { padding: 38px 40px 34px; }
  .idea-body { padding: 10px 40px 38px; }
  .frames { grid-template-columns: 1fr 1fr; gap: 18px; }
  .frame { flex-direction: column; align-items: flex-start; }
  .wire { width: 84px; height: 112px; }
  .actions { flex-direction: row; flex-wrap: wrap; }
  .finish .actions { justify-content: center; }
  .copy-btn { width: auto; }
  .prompt-head, .prompt-actions { padding-left: 32px; padding-right: 32px; }
  .prompt-see, .terminal { margin-left: 32px; margin-right: 32px; }
}

@media (min-width: 900px) {
  html { font-size: 19px; }
  .frames { grid-template-columns: repeat(2, 1fr); }
}

/* People who prefer less motion get a calm page */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
