:root {
  color-scheme: light dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #eef4ff;
  --card: #ffffff;
  --text: #172033;
  --muted: #5b6475;
  --accent: #3157d5;
  --accent-hover: #2645ae;
  --border: #ccd6eb;
  --result: #f5f8ff;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); }
.shell { width: min(760px, 100%); margin: 0 auto; padding: 48px 18px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 22px; padding: clamp(24px, 5vw, 48px); box-shadow: 0 18px 50px rgba(34, 56, 100, .12); }
.eyebrow { margin: 0; color: var(--accent); font-size: .78rem; font-weight: 800; letter-spacing: .14em; }
h1 { margin: 8px 0; font-size: clamp(2.2rem, 8vw, 4rem); line-height: 1; }
.intro { margin: 0 0 28px; color: var(--muted); font-size: 1.08rem; }
label { display: block; margin-bottom: 9px; font-weight: 750; }
textarea { width: 100%; resize: vertical; min-height: 132px; padding: 14px; border: 2px solid var(--border); border-radius: 12px; background: var(--card); color: var(--text); font: inherit; line-height: 1.5; }
textarea:focus { outline: 3px solid rgba(49, 87, 213, .22); border-color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
button { border: 0; border-radius: 10px; padding: 12px 18px; background: var(--accent); color: white; font: inherit; font-weight: 750; cursor: pointer; }
button:hover { background: var(--accent-hover); }
button:focus-visible { outline: 3px solid rgba(49, 87, 213, .35); outline-offset: 2px; }
button:disabled { opacity: .65; cursor: wait; }
button.secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.status { min-height: 24px; margin: 18px 0 0; color: var(--muted); }
.result { margin-top: 22px; padding: 20px; border: 1px solid var(--border); border-radius: 14px; background: var(--result); }
.result h2 { margin: 0 0 12px; }
#plan { white-space: pre-wrap; line-height: 1.7; }
@media (prefers-color-scheme: dark) {
  :root { --bg: #0d1424; --card: #151f33; --text: #eef3ff; --muted: #b7c1d8; --accent: #89a5ff; --accent-hover: #6f8de8; --border: #34415d; --result: #101a2d; }
  button { color: #0a1020; }
  button.secondary { color: var(--text); }
}

.step-viewer, .complete-view { margin-top: 24px; }
.progress-row { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .92rem; font-weight: 700; }
.progress-track { height: 10px; margin: 10px 0 24px; overflow: hidden; border-radius: 999px; background: var(--border); }
#progress-bar { width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width .25s ease; }
.step-slide { min-height: 330px; padding: clamp(22px, 5vw, 38px); border: 2px solid var(--border); border-radius: 18px; background: var(--result); }
.step-label { margin: 0 0 8px; color: var(--accent); font-size: .76rem; font-weight: 850; letter-spacing: .13em; }
.step-slide h2 { margin: 0; font-size: clamp(1.7rem, 6vw, 2.7rem); line-height: 1.15; }
.details-box { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.details-box h3 { margin: 0 0 8px; font-size: 1rem; }
.details-box p { margin: 0; color: var(--muted); font-size: 1.06rem; line-height: 1.7; white-space: pre-wrap; }
.step-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; }
.step-actions button:last-child { margin-left: auto; }
.complete-view { padding: 38px 20px; text-align: center; border: 2px solid var(--border); border-radius: 18px; background: var(--result); }
.checkmark { display: grid; width: 68px; height: 68px; margin: 0 auto 16px; place-items: center; border-radius: 50%; background: var(--accent); color: white; font-size: 2.2rem; font-weight: 900; }
.complete-view h2 { margin: 0 0 8px; font-size: 2rem; }
.complete-view p { margin: 0 0 20px; color: var(--muted); }
@media (max-width: 480px) {
  .step-actions { flex-direction: column-reverse; }
  .step-actions button { width: 100%; }
  .progress-row { font-size: .82rem; }
}
