/* ==========================================================================
   One Agent Company — Wizard
   Dark, atmospheric. Serif display for the hero. Warm cream text on a deep
   canvas, drifting aurora behind, electric accents for the agent's presence.
   ========================================================================== */

/* ---------- design tokens (Aurora — deep forest + mint glass) ---------- */
.wizard-body {
  --bg-0:           #010302;
  --bg-1:           #040605;
  --bg-2:           #060b09;
  --bg-3:           #0a120e;

  --ink-0:          #ecebe3;
  --ink-1:          rgba(236, 235, 227, 0.78);
  --ink-2:          rgba(236, 235, 227, 0.62);
  --ink-3:          rgba(236, 235, 227, 0.38);
  --ink-mute:       rgba(236, 235, 227, 0.45);

  --line:           rgba(236, 235, 227, 0.08);
  --line-strong:    rgba(236, 235, 227, 0.18);

  --surface:        rgba(236, 235, 227, 0.035);
  --surface-strong: rgba(236, 235, 227, 0.07);
  --surface-bright: rgba(236, 235, 227, 0.10);

  /* Mint accent everywhere (the old indigo/violet/cyan/warm tokens are aliased so
     legacy rules still resolve to the new palette without each one being edited). */
  --accent-mint:    #5eead4;
  --accent-mint-deep:#2dd4bf;
  --accent-indigo:  #5eead4;
  --accent-violet:  #5eead4;
  --accent-cyan:    #5eead4;
  --accent-warm:    #5eead4;
  --accent-emerald: #5eead4;

  --grad-text:      linear-gradient(120deg, #ffffff 0%, #a7f3e0 45%, #5eead4 100%);
  --grad-agent:     linear-gradient(135deg, #6ff0d8 0%, #5eead4 50%, #2dd4bf 100%);
  --grad-glow:      radial-gradient(circle at 50% 50%, rgba(94, 234, 212, 0.32), transparent 70%);

  --font-display:   "Instrument Serif", ui-serif, "Iowan Old Style", "Apple Garamond", Georgia, serif;
  --font-body:      "Geist", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --font-mono:      "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --ease-out:       cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring:    cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  height: 100%;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

.wizard-body {
  background: var(--bg-0);
  color: var(--ink-0);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
}

::selection {
  background: rgba(94, 234, 212, 0.35);
  color: var(--ink-0);
}

/* ---------- Three.js hero canvas ---------- */
.wiz-hero-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;       /* above aurora (0), below content which is also z-index:1 but later in DOM */
  pointer-events: none;
  opacity: 0;       /* fades in via JS once renderer is ready */
}

/* ---------- aurora background (fallback ambient) ---------- */
.wiz-aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: radial-gradient(ellipse at top, #060b09 0%, #010302 55%);
}

.wiz-aurora__orb {
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.20;
  mix-blend-mode: screen;
  will-change: transform;
}

.wiz-aurora__orb--1 {
  background: radial-gradient(circle, rgba(45, 212, 191, 0.40), transparent 65%);
  top: -25vmax;
  left: -20vmax;
  animation: aurora-drift-1 28s ease-in-out infinite alternate;
}
.wiz-aurora__orb--2 {
  background: radial-gradient(circle, rgba(14, 58, 47, 0.55), transparent 65%);
  bottom: -30vmax;
  right: -25vmax;
  animation: aurora-drift-2 36s ease-in-out infinite alternate;
}
.wiz-aurora__orb--3 {
  background: radial-gradient(circle, rgba(94, 234, 212, 0.28), transparent 65%);
  top: 30%;
  right: -10vmax;
  width: 40vmax;
  height: 40vmax;
  animation: aurora-drift-3 24s ease-in-out infinite alternate;
}

@keyframes aurora-drift-1 {
  from { transform: translate(0, 0) rotate(0deg); }
  to   { transform: translate(10vw, 8vh) rotate(45deg); }
}
@keyframes aurora-drift-2 {
  from { transform: translate(0, 0) rotate(0deg); }
  to   { transform: translate(-12vw, -6vh) rotate(-30deg); }
}
@keyframes aurora-drift-3 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-8vw, 10vh) scale(1.15); }
}

.wiz-aurora__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  opacity: 0.5;
}

/* All real content lives above the aurora */
.wiz-topbar, .wiz-shell { position: relative; z-index: 1; }

/* ---------- topbar ---------- */
.wiz-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 16, 12, 0.55);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  position: sticky;
  top: 0;
  z-index: 100;
}

.wiz-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--ink-0);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.wiz-brand img {
  filter: brightness(1.4);
  opacity: 0.95;
}

.wiz-brand__name {
  font-size: 0.95rem;
}

.wiz-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 0 0 rgba(94, 234, 212, 0.7);
  animation: live-pulse 2.4s ease-in-out infinite;
  margin-left: 2px;
}

@keyframes live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(94, 234, 212, 0.55); }
  50%      { box-shadow: 0 0 0 8px rgba(94, 234, 212, 0); }
}

.wiz-topnav {
  display: flex;
  gap: var(--space-5);
  align-items: center;
}

.wiz-topnav__link {
  font-size: 0.875rem;
  color: var(--ink-2);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  transition: color 200ms var(--ease-out);
  position: relative;
}

.wiz-topnav__link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent-cyan);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 280ms var(--ease-out);
}

.wiz-topnav__link:hover {
  color: var(--ink-0);
}
.wiz-topnav__link:hover::after {
  transform: scaleX(1);
}

.wiz-version {
  font-family: var(--font-mono), ui-monospace, monospace;
  font-size: 0.65rem;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
}

/* ---------- shell (chat + side panel) ---------- */
.wiz-shell {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

@media (max-width: 960px) {
  .wiz-shell { grid-template-columns: 1fr; }
}

/* ================================================================ chat */
.wiz-chat {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--line);
  overflow: hidden;
}

@media (max-width: 960px) {
  .wiz-chat { border-right: none; }
}

.wiz-chat__scroll {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-8) clamp(var(--space-4), 4vw, var(--space-12)) var(--space-6);
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.wiz-chat__scroll::-webkit-scrollbar { width: 8px; }
.wiz-chat__scroll::-webkit-scrollbar-track { background: transparent; }
.wiz-chat__scroll::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 4px;
}

.wiz-chat__intro {
  max-width: 720px;
  margin: 0 auto var(--space-8);
  text-align: left;
  animation: intro-in 800ms var(--ease-out) both;
}

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

.wiz-chat__intro.is-hidden { display: none; }

.wiz-chat__intro-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  color: var(--accent-violet);
  font-weight: 500;
  margin-bottom: var(--space-6);
  /* no background chip — keep it as a clean technical label */
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}
.wiz-chat__intro-eyebrow-text {
  opacity: 0;
  animation: wiz-reveal-fade 600ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 80ms;
}

.wiz-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-emerald);
  display: inline-block;
}
.wiz-dot--pulse {
  box-shadow: 0 0 0 0 rgba(94, 234, 212, 0.7);
  animation: live-pulse 2.4s ease-in-out infinite;
}

.wiz-chat__intro-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-5);
  color: var(--ink-0);
}

/* Character-by-character reveal — each glyph slides up + fades in staggered.
   The .wiz-word container is just a layout box that prevents the word from
   wrapping mid-glyph; the chars inside (.wiz-char, injected by wizard.js)
   carry the actual animation. */
.wiz-chat__intro-title .wiz-word {
  display: inline-block;
  margin-right: 0.18em;
  white-space: nowrap;
}

/* Outer span: stays anchored in place. Each char carries a --glow value (0..1,
   set by wizard.js as the cursor moves) that lerps its color toward mint and
   pumps a soft halo behind it — so the line "lights up" under the cursor
   instead of physically following it. */
.wiz-chat__intro-title .wiz-char {
  display: inline-block;
  color: color-mix(in oklab,
    var(--ink-0) calc(100% - var(--glow, 0) * 100%),
    #c1fff0 calc(var(--glow, 0) * 100%));
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.5),
    0 4px 16px rgba(0, 0, 0, 0.65),
    0 0 calc(6px + var(--glow, 0) * 48px) rgba(94, 234, 212, calc(var(--glow, 0) * 0.85)),
    0 0 calc(2px + var(--glow, 0) * 18px) rgba(255, 255, 255, calc(var(--glow, 0) * 0.55));
  transition: color 280ms ease-out, text-shadow 280ms ease-out;
}

/* The italic phrase ("Let your agent run it.") is already mint at rest — its
   lit state pushes toward bright white so it really pops under the cursor. */
.wiz-chat__intro-title em .wiz-char {
  color: color-mix(in oklab,
    #5eead4 calc(100% - var(--glow, 0) * 100%),
    #ffffff calc(var(--glow, 0) * 100%));
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.5),
    0 4px 16px rgba(0, 0, 0, 0.65),
    0 0 calc(10px + var(--glow, 0) * 56px) rgba(94, 234, 212, calc(0.25 + var(--glow, 0) * 0.7)),
    0 0 calc(2px + var(--glow, 0) * 22px) rgba(255, 255, 255, calc(var(--glow, 0) * 0.75));
}

/* Inner span: carries the reveal animation. Kept separate so the keyframes'
   `transform` and `filter` are isolated from the parent's lighting work. */
.wiz-chat__intro-title .wiz-char-inner {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.4em);
  filter: blur(8px);
  animation: wiz-reveal-char 620ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  /* animation-delay set per-char inline by wizard.js */
}

@keyframes wiz-reveal-char {
  from { opacity: 0; transform: translateY(0.4em); filter: blur(8px); }
  to   { opacity: 1; transform: translateY(0);     filter: blur(0); }
}
@keyframes wiz-reveal-fade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.wiz-chat__intro-title {
  /* Drop-shadow stack keeps the heading legible over the particle field */
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.5),
    0 4px 16px rgba(0, 0, 0, 0.7),
    0 0 60px rgba(7, 16, 12, 0.5);
}

/* Italic emphasis: warm cream/gold instead of the previous rainbow shimmer.
   Stays still — no animation competing with the reveal. */
.wiz-chat__intro-title em {
  font-style: italic;
  color: var(--accent-warm);
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.5),
    0 4px 16px rgba(0, 0, 0, 0.7),
    0 0 28px rgba(94, 234, 212, 0.25);
}

/* Mouse-reactive parallax — JS sets --mx / --my (range -1..1) on .wiz-chat__intro */
.wiz-chat__intro {
  --mx: 0; --my: 0;
  transform: translate3d(calc(var(--mx) * -10px), calc(var(--my) * -6px), 0);
  transition: transform 360ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
  position: relative;
  isolation: isolate;
}

/* Soft dark wash behind the copy. The bounding rect is intentionally far
 * larger than the text so the radial gradient's transparent edge sits well
 * inside the box — otherwise the box-edge clips the gradient and shows up as
 * a "squarish" shadow. A radial mask layered on top feathers anything that
 * might still touch the edges. */
.wiz-chat__intro::before {
  content: "";
  position: absolute;
  inset: -240px -320px;
  background: radial-gradient(ellipse 50% 55% at center,
    rgba(7, 16, 12, 0.55) 0%,
    rgba(7, 16, 12, 0.30) 30%,
    rgba(7, 16, 12, 0.10) 55%,
    rgba(7, 16, 12, 0.0) 78%);
  mask-image: radial-gradient(ellipse 60% 60% at center,
    #000 0%, #000 35%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at center,
    #000 0%, #000 35%, transparent 85%);
  z-index: -1;
  pointer-events: none;
  filter: blur(18px);
}
/* The headline itself no longer translates as a block — each .wiz-char carries
   its own mouse-parallax via --cd (depth in px, set per-char by wizard.js). */
.wiz-chat__intro-sub {
  transform: translate3d(calc(var(--mx) * -8px), calc(var(--my) * -4px), 0);
  transition: transform 520ms cubic-bezier(0.16, 1, 0.3, 1);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}
/* (older eyebrow chip override removed — replaced by the technical-label style above) */

.wiz-chat__intro-sub {
  color: var(--ink-1);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
  max-width: 560px;
  font-weight: 400;
  opacity: 0;
  animation: wiz-reveal-fade 700ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 900ms;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.wiz-chat__intro-for {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  text-transform: uppercase;
  text-wrap: balance;
  max-width: 560px;
  opacity: 0;
  animation: wiz-reveal-fade 700ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 1250ms;
}

.wiz-chat__intro-signin {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--ink-3);
  text-decoration: none;
  opacity: 0;
  animation: wiz-reveal-fade 700ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 1400ms;
}
.wiz-chat__intro-signin strong {
  color: var(--accent-cyan);
  font-weight: 600;
}
.wiz-chat__intro-signin:hover {
  color: var(--ink-1);
}
.wiz-chat__intro-signin:hover strong {
  color: var(--ink-0);
}

/* ============================================================
   AURORA hero form — glass input with cycling placeholder + mint CTA.
   Replaces the old liquid-glass Start button. Visible only in empty state.
   ============================================================ */
.wiz-hero-form {
  margin-top: var(--space-6);
  width: min(620px, 100%);
  background: linear-gradient(180deg, rgba(236,235,227,0.07), rgba(236,235,227,0.035));
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 10px 10px 10px 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 0 0 1px rgba(255,255,255,0.02) inset,
    0 20px 60px rgba(0,0,0,0.45),
    0 0 60px rgba(94, 234, 212, 0.05);
  transition: border-color .25s ease, box-shadow .25s ease;
  position: relative;
  opacity: 0;
  transform: translateY(8px) scale(.985);
  transform-origin: center bottom;
  animation: wiz-reveal-fade 700ms cubic-bezier(0.16, 1, 0.3, 1) forwards,
             wiz-hero-form-settle 700ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 1100ms;
}
@keyframes wiz-hero-form-settle {
  from { transform: translateY(8px) scale(.985); }
  to   { transform: none; }
}
.wiz-hero-form:focus-within {
  border-color: rgba(94, 234, 212, 0.5);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.08) inset,
    0 20px 60px rgba(0,0,0,0.55),
    0 0 0 4px rgba(94, 234, 212, 0.08),
    0 0 80px rgba(94, 234, 212, 0.15);
}

.wiz-hero-input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--ink-0);
  font: inherit;
  font-family: var(--font-body);
  font-size: 16px;
  padding: 14px 0;
  min-width: 0;
  position: relative;
  z-index: 2;
}

.wiz-hero-placeholder {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-3);
  font-size: 16px;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  max-width: calc(100% - 130px);
  text-overflow: clip;
  z-index: 1;
}
.wiz-hero-input:focus ~ .wiz-hero-placeholder,
.wiz-hero-input:not(:placeholder-shown) ~ .wiz-hero-placeholder { display: none; }

.wiz-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 14px;
  border: 0;
  background: linear-gradient(180deg, #6ff0d8, #2dd4bf);
  color: #07221d;
  font: inherit;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.45) inset,
    0 -1px 0 rgba(0,0,0,0.15) inset,
    0 8px 24px rgba(94, 234, 212, 0.25);
  transition: transform .15s ease, box-shadow .25s ease;
  white-space: nowrap;
}
.wiz-hero-cta:hover {
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.55) inset,
    0 -1px 0 rgba(0,0,0,0.15) inset,
    0 12px 32px rgba(94, 234, 212, 0.35);
}
.wiz-hero-cta:active { transform: translateY(0); }
.wiz-hero-cta:disabled { opacity: 0.7; cursor: wait; transform: none; }
.wiz-hero-cta svg { width: 14px; height: 14px; }

/* When the conversation has started, the hero form disappears — composer takes over */
.wizard-body:not(.is-empty) .wiz-hero-form,
.wiz-chat__intro.is-hidden .wiz-hero-form { display: none; }

/* ---------- messages ---------- */
.wiz-messages {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.wiz-msg {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  animation: msg-in 420ms var(--ease-out);
  max-width: 100%;
}

@keyframes msg-in {
  from { opacity: 0; transform: translateY(10px); filter: blur(2px); }
  to   { opacity: 1; transform: translateY(0);   filter: blur(0);    }
}

.wiz-msg__avatar {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  background: var(--grad-agent);
  color: #07221d;
  font-weight: 600;
  position: relative;
  box-shadow: 0 4px 16px rgba(94, 234, 212, 0.25);
}

.wiz-msg__avatar::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 14px;
  background: var(--grad-agent);
  opacity: 0;
  filter: blur(8px);
  z-index: -1;
  transition: opacity 300ms var(--ease-out);
}

.wiz-msg--assistant:last-child .wiz-msg__avatar::after { opacity: 0.6; }

.wiz-msg--user .wiz-msg__avatar {
  background: var(--surface-bright);
  color: var(--ink-1);
  box-shadow: none;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}
.wiz-msg--user .wiz-msg__avatar::after { display: none; }

.wiz-msg__bubble {
  /* Bubbles hug their content with a sensible cap — no longer stretch full-width.
     The cap scales with viewport so long messages stay readable on big screens. */
  max-width: min(78%, 560px);
  background: var(--surface);
  border-radius: 14px;
  padding: var(--space-3) var(--space-4);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-0);
  border: 1px solid var(--line);
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  position: relative;
}

/* "Reading <site>…" hint shown while the wizard fetches a link the user shared. */
.wiz-browse-status .wiz-msg__bubble {
  font-style: italic;
  color: var(--ink-2, #b9c2bd);
  animation: wiz-browse-pulse 1.4s ease-in-out infinite;
}
@keyframes wiz-browse-pulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }

.wiz-msg--assistant .wiz-msg__bubble {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
  /* Soften the corner closest to the avatar — gives the bubble a "tail" feel. */
  border-top-left-radius: 4px;
}

.wiz-msg--user {
  flex-direction: row-reverse;
}

.wiz-msg--user .wiz-msg__bubble {
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.16), rgba(94, 234, 212, 0.08));
  border-color: rgba(94, 234, 212, 0.28);
  color: var(--ink-0);
  /* Tail on the right side (user side) instead. */
  border-top-right-radius: 4px;
  border-top-left-radius: 14px;
}

/* Mobile: bubbles can be wider since horizontal space is scarce. */
@media (max-width: 600px) {
  .wiz-msg__bubble { max-width: 88%; }
}

.wiz-msg--error .wiz-msg__bubble {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

.wiz-retry-link {
  background: rgba(252, 165, 165, 0.12);
  border: 1px solid rgba(252, 165, 165, 0.35);
  color: #fca5a5;
  font-family: inherit;
  font-size: 0.85rem;
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
  margin-left: 4px;
  transition: all 180ms var(--ease-out);
}
.wiz-retry-link:hover {
  background: rgba(252, 165, 165, 0.22);
  color: #fff;
}

/* typewriter caret on the latest assistant message while content's still streaming-in */
.wiz-msg--assistant.is-typing .wiz-msg__bubble::after {
  content: "▊";
  display: inline-block;
  color: var(--accent-cyan);
  margin-left: 2px;
  animation: caret-blink 1s steps(2) infinite;
}
@keyframes caret-blink {
  50% { opacity: 0; }
}

/* ---------- typing indicator ---------- */
.wiz-typing {
  max-width: 720px;
  margin: var(--space-3) auto 0;
  padding-left: 46px;
  display: flex;
  gap: 5px;
  align-items: center;
  animation: msg-in 240ms var(--ease-out);
}

.wiz-typing__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-violet);
  opacity: 0.4;
  animation: typing 1.2s infinite ease-in-out;
}

.wiz-typing__dot:nth-child(2) { animation-delay: 0.15s; }
.wiz-typing__dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes typing {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0)   scale(1);   }
  30%           { opacity: 1;   transform: translateY(-4px) scale(1.1); }
}

/* ---------- composer ---------- */
.wiz-composer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(7, 16, 12, 0.7) 30%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: var(--space-4) clamp(var(--space-4), 4vw, var(--space-12));
}

.wiz-chips {
  max-width: 720px;
  margin: 0 auto var(--space-3);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.wiz-chips:empty { margin: 0; }

.wiz-chip {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink-1);
  font-size: 0.85rem;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: all 200ms var(--ease-out);
  animation: chip-in 360ms var(--ease-spring) both;
  position: relative;
}

@keyframes chip-in {
  from { opacity: 0; transform: translateY(8px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0)   scale(1);    }
}

.wiz-chip:nth-child(1) { animation-delay: 40ms; }
.wiz-chip:nth-child(2) { animation-delay: 90ms; }
.wiz-chip:nth-child(3) { animation-delay: 140ms; }
.wiz-chip:nth-child(4) { animation-delay: 190ms; }
.wiz-chip:nth-child(5) { animation-delay: 240ms; }

.wiz-chip:hover {
  background: var(--surface-bright);
  border-color: rgba(94, 234, 212, 0.45);
  color: var(--ink-0);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(94, 234, 212, 0.2);
}

.wiz-chip:active {
  transform: translateY(0);
}

.wiz-input-row {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  gap: var(--space-2);
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 5px 6px 5px var(--space-5);
  transition: border-color 200ms var(--ease-out), box-shadow 300ms var(--ease-out);
  position: relative;
}

.wiz-input-row:focus-within {
  border-color: rgba(94, 234, 212, 0.6);
  box-shadow:
    0 0 0 5px rgba(94, 234, 212, 0.12),
    0 12px 40px rgba(94, 234, 212, 0.18);
}

.wiz-input {
  flex: 1;
  border: none;
  outline: none;
  background: none;
  font-family: inherit;
  font-size: 1rem;
  padding: var(--space-3) 0;
  color: var(--ink-0);
  caret-color: var(--accent-cyan);
}

.wiz-input::placeholder {
  color: var(--ink-3);
  font-style: italic;
}

.wiz-send {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: var(--grad-agent);
  color: #07221d;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 180ms var(--ease-out), box-shadow 200ms var(--ease-out);
  flex-shrink: 0;
}

.wiz-send svg {
  width: 18px;
  height: 18px;
  transition: transform 220ms var(--ease-out);
}

.wiz-send:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(94, 234, 212, 0.4);
}
.wiz-send:hover svg { transform: translateX(2px); }
.wiz-send:active { transform: scale(0.96); }
.wiz-send:disabled { opacity: 0.35; cursor: not-allowed; transform: none; box-shadow: none; }

/* CRITICAL: `display: flex` on .wiz-typing was overriding the [hidden] attribute,
   so the dots stayed visible even after we set typing.hidden = true. */
.wiz-typing[hidden] { display: none !important; }

/* Topbar dashboard link — appears after deploy, sticks around as a clear path back */
.wiz-topnav__link--cta {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--grad-agent);
  color: #07221d !important;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(94, 234, 212, 0.3);
  animation: card-reveal 360ms var(--ease-out);
}
.wiz-topnav__link--cta::after { display: none; }
.wiz-topnav__link--cta:hover { transform: translateY(-1px); color: #07221d !important; }

/* Mobile blueprint toggle */
.wiz-blueprint-toggle {
  display: none;
  margin: var(--space-3) auto 0;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.85rem;
  color: var(--ink-1);
  cursor: pointer;
  font-family: inherit;
  align-items: center;
  gap: var(--space-2);
}
.wiz-blueprint-toggle:hover { background: var(--surface-bright); color: var(--ink-0); }
.wiz-blueprint-toggle__count {
  background: var(--grad-agent);
  color: #07221d;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 999px;
  min-width: 22px;
  text-align: center;
}
@media (max-width: 960px) {
  .wiz-blueprint-toggle { display: inline-flex; }
}

/* ============================================================ blueprint panel */
.wiz-blueprint {
  background: linear-gradient(180deg, rgba(255,255,255,0.015), transparent);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.wiz-blueprint__scroll {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.wiz-blueprint__scroll::-webkit-scrollbar { width: 8px; }
.wiz-blueprint__scroll::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }

.wiz-blueprint__header { margin-bottom: var(--space-2); }
.wiz-blueprint__eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent-violet); font-weight: 500; margin-bottom: var(--space-3);
}
.wiz-blueprint__eyebrow::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent-violet); box-shadow: 0 0 8px rgba(94, 234, 212, 0.6);
}
.wiz-blueprint__title {
  font-family: var(--font-display); font-weight: 400;
  font-size: 1.8rem; line-height: 1.15; margin: 0 0 var(--space-2);
  letter-spacing: -0.02em; color: var(--ink-0);
}
.wiz-blueprint__tagline {
  margin: 0; color: var(--ink-2); font-size: 0.9rem;
  font-style: italic; font-family: var(--font-display);
}

.bp-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: var(--space-4);
  position: relative;
  /* No overflow:hidden — was clipping real content; overlays below carry their own radius instead */
  animation: card-reveal 520ms var(--ease-out);
}
.bp-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.06), transparent 50%);
  opacity: 0; pointer-events: none; transition: opacity 240ms var(--ease-out);
}
.bp-card:hover::before { opacity: 1; }
.bp-card__label {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-2); font-weight: 500; margin-bottom: var(--space-3);
}
.bp-card__meta {
  background: var(--surface-strong); color: var(--ink-1);
  padding: 2px 9px; border-radius: 999px; font-size: 0.65rem;
  letter-spacing: 0.04em; text-transform: none; font-variant-numeric: tabular-nums;
}

.bp-persona { display: flex; align-items: center; gap: var(--space-3); }
.bp-persona__avatar {
  width: 52px; height: 52px; border-radius: 16px;
  background: var(--grad-agent); display: flex; align-items: center; justify-content: center;
  font-size: 26px; position: relative; box-shadow: 0 8px 24px rgba(94, 234, 212, 0.25);
}
.bp-persona__avatar::after {
  content: ""; position: absolute; inset: -4px; border-radius: 18px;
  background: var(--grad-agent); opacity: 0.4; filter: blur(12px); z-index: -1;
}
.bp-persona__name { font-family: var(--font-display); font-size: 1.4rem; color: var(--ink-0); letter-spacing: -0.01em; }
.bp-persona__voice { font-size: 0.75rem; color: var(--ink-2); text-transform: capitalize; margin-top: 2px; }

.bp-kv { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); font-size: 0.85rem; }
.bp-kv dt { color: var(--ink-3); font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 2px; }
.bp-kv dd { margin: 0; color: var(--ink-0); font-weight: 500; text-transform: capitalize; }

.bp-modules {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px 6px;
  font-size: 0.78rem;
}
.bp-modules li {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 10px; border-radius: 8px;
  color: var(--ink-3); background: transparent; border: 1px solid transparent;
  transition: all 320ms var(--ease-out); position: relative;
}
.bp-modules .bp-mod-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; flex-shrink: 0;
  color: var(--ink-3); opacity: 0.75;
  transition: color 320ms var(--ease-out), opacity 320ms var(--ease-out), transform 360ms var(--ease-spring);
}
.bp-modules .bp-mod-icon svg { width: 100%; height: 100%; display: block; }
.bp-modules li.is-enabled {
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.1), rgba(45, 212, 191, 0.06));
  border-color: rgba(94, 234, 212, 0.2); color: var(--ink-0); font-weight: 500;
}
.bp-modules li.is-enabled .bp-mod-icon { color: var(--accent-mint); opacity: 1; transform: scale(1.08); }
.bp-modules li.is-enabled.just-enabled::after {
  content: ""; position: absolute; inset: -1px; border-radius: 8px;
  background: radial-gradient(circle at 30% 50%, rgba(94, 234, 212, 0.6), transparent 60%);
  animation: sparkle 900ms ease-out forwards; pointer-events: none;
}
@keyframes sparkle {
  0%   { opacity: 0; transform: scale(0.8); }
  30%  { opacity: 1; transform: scale(1.1); }
  100% { opacity: 0; transform: scale(1.3); }
}

.bp-gateways { display: flex; flex-wrap: wrap; gap: 6px; }
.bp-gateways span {
  font-size: 0.75rem; padding: 5px 11px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--ink-3); transition: all 320ms var(--ease-out);
}
.bp-gateways span.is-enabled {
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.15), rgba(94, 234, 212, 0.08));
  color: var(--accent-cyan); border-color: rgba(45, 212, 191, 0.35); font-weight: 500;
}

.bp-tasks {
  margin: 0; padding-left: 0; font-size: 0.85rem;
  color: var(--ink-1); list-style: none; counter-reset: task-counter;
}
.bp-tasks li {
  position: relative; padding: var(--space-2) 0 var(--space-2) var(--space-6);
  line-height: 1.5; counter-increment: task-counter;
  border-bottom: 1px solid var(--line);
}
.bp-tasks li:last-child { border-bottom: none; }
.bp-tasks li::before {
  content: counter(task-counter);
  position: absolute; left: 0; top: var(--space-2);
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--surface-strong); color: var(--ink-2);
  font-size: 0.7rem; display: flex; align-items: center; justify-content: center;
  font-variant-numeric: tabular-nums; font-weight: 500;
}
.bp-tasks li.is-must-have::before { background: var(--accent-warm); color: #1c1300; }
.bp-tasks strong { color: var(--ink-0); font-weight: 500; }
.bp-tasks a { color: var(--accent-cyan); text-decoration: none; border-bottom: 1px dashed rgba(45, 212, 191, 0.3); }
.bp-tasks a:hover { border-bottom-style: solid; }

.bp-deploy {
  background:
    radial-gradient(circle at 20% 0%, rgba(94, 234, 212, 0.2), transparent 50%),
    radial-gradient(circle at 80% 100%, rgba(45, 212, 191, 0.15), transparent 50%),
    rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(94, 234, 212, 0.3);
  border-radius: 16px; padding: var(--space-5);
  margin-top: var(--space-3); position: relative;
  animation: card-reveal 600ms var(--ease-out), deploy-glow 3s ease-in-out infinite;
}
@keyframes deploy-glow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.3), 0 0 30px rgba(94, 234, 212, 0.1); }
  50%      { box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.4), 0 0 40px rgba(45, 212, 191, 0.2); }
}
.bp-deploy__title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 400; color: var(--ink-0); margin-bottom: var(--space-2); letter-spacing: -0.01em; }
.bp-deploy__desc { font-size: 0.85rem; color: var(--ink-1); margin: 0 0 var(--space-4); line-height: 1.5; }
.bp-deploy__form { display: flex; flex-direction: column; gap: var(--space-2); }
.bp-deploy__email {
  width: 100%; padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line-strong); border-radius: 10px;
  font-family: inherit; font-size: 0.9rem;
  background: rgba(0, 0, 0, 0.3); color: var(--ink-0); outline: none;
  transition: border-color 180ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
.bp-deploy__email::placeholder { color: var(--ink-3); }
.bp-deploy__email:focus { border-color: var(--accent-cyan); box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.15); }
.bp-deploy__btn {
  width: 100%; padding: var(--space-3) var(--space-4);
  border: none; border-radius: 10px;
  background: var(--grad-agent); color: #07221d;
  font-family: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer;
  transition: transform 180ms var(--ease-out), box-shadow 220ms var(--ease-out);
}
.bp-deploy__btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(94, 234, 212, 0.4); }
.bp-deploy__btn:disabled { opacity: 0.6; cursor: wait; transform: none; }
.bp-deploy__status { font-size: 0.85rem; color: var(--ink-1); margin: var(--space-3) 0 0; text-align: center; }
.bp-deploy__status.is-error   { color: #fca5a5; }
.bp-deploy__status.is-success { color: var(--accent-emerald); font-weight: 500; }
.bp-deploy__dashboard {
  display: block; margin-top: var(--space-3); padding: var(--space-3);
  text-align: center; text-decoration: none;
  background: var(--grad-agent); color: #07221d;
  font-weight: 600; border-radius: 10px;
  transition: transform 180ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
.bp-deploy__dashboard:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(94, 234, 212, 0.4); }

/* Mobile: blueprint slides up as a sheet */
@media (max-width: 960px) {
  .wiz-blueprint {
    position: fixed; inset: 0; z-index: 600;
    background: var(--bg-0); border-left: none;
    transform: translateY(100%);
    transition: transform 320ms var(--ease-out);
    box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.4);
  }
  .wiz-blueprint.is-open { transform: translateY(0); }
  .wiz-blueprint__scroll { padding-top: var(--space-12); }
  .wiz-blueprint::before {
    content: "← Back to chat";
    position: absolute; top: var(--space-4); left: var(--space-4);
    font-size: 0.85rem; color: var(--accent-cyan); cursor: pointer; z-index: 1;
  }
}
/* ============================================================ inline snapshot cards
   The single-column redesign drops the side panel. Instead, blueprint milestones,
   the deploy form, and the success state all appear as inline message cards in the chat. */

.wiz-msg--snap {
  display: block; /* no avatar — cards stand alone */
  max-width: 100%;
}

.bp-snap,
.wiz-deploy-card,
.wiz-success-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: var(--space-4) var(--space-5);
  position: relative;
  animation: card-reveal 480ms var(--ease-out);
}

.bp-snap {
  border-color: rgba(94, 234, 212, 0.22);
  background:
    radial-gradient(circle at 0% 0%, rgba(94, 234, 212, 0.08), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
}

.bp-snap__title {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-violet);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.bp-snap__rows {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  font-size: 0.9rem;
  color: var(--ink-0);
  align-items: center;
}

.bp-snap__rows span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bp-snap__avatar {
  font-size: 1.4rem;
}

.bp-snap__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bp-snap__pill {
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(94, 234, 212, 0.12);
  border: 1px solid rgba(94, 234, 212, 0.25);
  color: var(--ink-0);
  text-transform: capitalize;
}

.bp-snap__pill--gw {
  background: rgba(45, 212, 191, 0.12);
  border-color: rgba(45, 212, 191, 0.3);
  color: var(--accent-cyan);
}

.bp-snap__tasks {
  margin: 0;
  padding-left: 0;
  list-style: none;
  counter-reset: snap-task;
  font-size: 0.9rem;
  color: var(--ink-1);
}

.bp-snap__tasks li {
  position: relative;
  padding: var(--space-2) 0 var(--space-2) var(--space-6);
  line-height: 1.5;
  counter-increment: snap-task;
  border-bottom: 1px solid var(--line);
}

.bp-snap__tasks li:last-child { border-bottom: none; }

.bp-snap__tasks li::before {
  content: counter(snap-task);
  position: absolute;
  left: 0;
  top: var(--space-2);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface-strong);
  color: var(--ink-2);
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.bp-snap__tasks li.is-must-have::before {
  background: var(--accent-warm);
  color: #1c1300;
}

.bp-snap__tasks b { color: var(--ink-0); font-weight: 500; }

.bp-snap__tasks a {
  color: var(--accent-cyan);
  text-decoration: none;
  border-bottom: 1px dashed rgba(45, 212, 191, 0.3);
}

.bp-snap__tasks a:hover { border-bottom-style: solid; }

/* ---------- inline deploy form card ---------- */
.wiz-deploy-card {
  background:
    radial-gradient(circle at 20% 0%, rgba(94, 234, 212, 0.18), transparent 50%),
    radial-gradient(circle at 80% 100%, rgba(45, 212, 191, 0.14), transparent 50%),
    rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(94, 234, 212, 0.35);
  animation: card-reveal 600ms var(--ease-out), deploy-glow 3s ease-in-out infinite;
}

@keyframes deploy-glow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.3), 0 0 30px rgba(94, 234, 212, 0.08); }
  50%      { box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.4), 0 0 40px rgba(45, 212, 191, 0.18); }
}

.wiz-deploy-card__eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.wiz-deploy-card__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--ink-0);
  margin-bottom: var(--space-4);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.wiz-deploy-card__form {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.wiz-deploy-card__email {
  flex: 1;
  min-width: 220px;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  background: rgba(0, 0, 0, 0.3);
  color: var(--ink-0);
  outline: none;
  transition: border-color 180ms var(--ease-out), box-shadow 200ms var(--ease-out);
}

.wiz-deploy-card__email::placeholder { color: var(--ink-3); }

.wiz-deploy-card__email:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.15);
}

.wiz-deploy-card__btn {
  padding: var(--space-3) var(--space-5);
  border: none;
  border-radius: 10px;
  background: var(--grad-agent);
  color: #07221d;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 180ms var(--ease-out), box-shadow 220ms var(--ease-out);
  white-space: nowrap;
}

.wiz-deploy-card__btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(94, 234, 212, 0.4); }
.wiz-deploy-card__btn:disabled { opacity: 0.6; cursor: wait; transform: none; }

.wiz-deploy-card__status {
  font-size: 0.85rem;
  color: var(--ink-2);
  margin-top: var(--space-3);
}

.wiz-deploy-card__status.is-error   { color: #fca5a5; }
.wiz-deploy-card__status.is-success { color: var(--accent-emerald); font-weight: 500; }

/* ---------- success card ---------- */
.wiz-success-card {
  background:
    radial-gradient(circle at 30% 20%, rgba(94, 234, 212, 0.18), transparent 60%),
    rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(94, 234, 212, 0.35);
  text-align: center;
  padding: var(--space-6) var(--space-5);
}

.wiz-success-card__check {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(94, 234, 212, 0.22);
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 auto var(--space-3);
}

.wiz-success-card__title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--ink-0);
  margin-bottom: var(--space-3);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.wiz-success-card__desc {
  color: var(--ink-1);
  margin-bottom: var(--space-4);
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.wiz-success-card__cta {
  display: inline-block;
  padding: var(--space-3) var(--space-6);
  border-radius: 999px;
  background: var(--grad-agent);
  color: #07221d;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: transform 180ms var(--ease-out), box-shadow 200ms var(--ease-out);
  box-shadow: 0 8px 28px rgba(94, 234, 212, 0.35);
}

.wiz-success-card__cta:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(94, 234, 212, 0.5); }

.wiz-success-card__meta {
  margin-top: var(--space-4);
  font-size: 0.75rem;
  color: var(--ink-3);
}
/* On the starting screen we want a clean, cinematic hero — no topbar/logo/nav.
 * The hero already has its own "Sign in" link, so nothing critical is lost. */
.wizard-body.is-empty .wiz-topbar { display: none; }

/* Once the conversation begins, kill the ambient animations entirely. The aurora orbs
 * keep moving via CSS even after the Three.js canvas fades out — that motion behind
 * the chat is distracting and makes the messages hard to read. Fade everything to
 * the flat dark bg-0 so the chat sits on solid contrast. */
.wizard-body:not(.is-empty) .wiz-aurora {
  opacity: 0;
  transition: opacity 800ms ease;
  pointer-events: none;
}
.wizard-body:not(.is-empty) .wiz-aurora__orb {
  animation: none;
}

/* Hide the right-side blueprint panel on the starting screen AND whenever blueprint is empty.
 * (`no-blueprint` covers stale localStorage where blueprint has data but messages array is empty.) */
.wizard-body.is-empty .wiz-blueprint,
.wizard-body.no-blueprint .wiz-blueprint { display: none; }
.wizard-body.is-empty .wiz-shell,
.wizard-body.no-blueprint .wiz-shell { grid-template-columns: 1fr; }
.wizard-body.is-empty .wiz-chat,
.wizard-body.no-blueprint .wiz-chat { border-right: none; }
.wizard-body.is-empty .wiz-blueprint-toggle,
.wizard-body.no-blueprint .wiz-blueprint-toggle { display: none !important; }

.wizard-body.is-empty .wiz-chat {
  justify-content: center;
}

.wizard-body.is-empty .wiz-chat__scroll {
  flex: 0 0 auto;
  overflow: visible;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 0;
}

.wizard-body.is-empty .wiz-chat__intro {
  text-align: center;
  margin-bottom: var(--space-8);
}

.wizard-body.is-empty .wiz-chat__intro-eyebrow {
  margin-left: auto;
  margin-right: auto;
}

.wizard-body.is-empty .wiz-chat__intro-title {
  font-size: clamp(3rem, 7vw, 5rem);
}

.wizard-body.is-empty .wiz-chat__intro-sub {
  margin: 0 auto;
}

.wizard-body.is-empty .wiz-composer {
  /* The Start button in the hero is the entry point now. Composer only appears once chat begins. */
  display: none;
}

.wizard-body.is-empty .wiz-input-row {
  max-width: 640px;
  padding: 6px 6px 6px var(--space-5);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line-strong);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--line);
  animation: input-breathe 4s ease-in-out infinite;
}

@keyframes input-breathe {
  0%, 100% { box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--line); }
  50%      { box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(94, 234, 212, 0.3); }
}

.wizard-body.is-empty .wiz-input-row:focus-within {
  animation: none;
}

.wizard-body.is-empty .wiz-input {
  padding: var(--space-4) 0;
  font-size: 1.1rem;
}

.wizard-body.is-empty .wiz-send {
  width: 46px;
  height: 46px;
}


/* In empty state, center the typing dots and shrink them subtly */
.wizard-body.is-empty .wiz-typing {
  padding-left: 0;
  justify-content: center;
  margin-top: var(--space-4);
}


/* ============================================================ mobile responsive (wizard) */
@media (max-width: 720px) {
  /* Topbar: smaller padding, compact nav. "Start over" + version label are nice-to-haves on mobile. */
  .wiz-topbar {
    padding: var(--space-3) var(--space-4);
    flex-wrap: wrap;
    gap: var(--space-2);
  }
  .wiz-brand__name { font-size: 0.85rem; }
  .wiz-topnav {
    gap: var(--space-3);
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .wiz-topnav__link { font-size: 0.8rem; }
  .wiz-version { display: none; }              /* version badge hidden on phones */
  /* "Start over" stays reachable on phones — shown as a compact tappable chip. */
  .wiz-reset {
    display: inline-block;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    padding: 5px 12px;
  }
  .wiz-reset::after { display: none; }         /* drop the underline animation on the chip */

  /* Hero content: tighter padding + smaller type */
  .wiz-chat__scroll {
    padding: var(--space-6) var(--space-4) var(--space-4);
  }
  .wiz-chat__intro {
    margin-bottom: var(--space-6);
  }
  .wizard-body.is-empty .wiz-chat__intro-title { font-size: clamp(2rem, 9vw, 3rem); }
  .wiz-chat__intro-eyebrow { font-size: 0.7rem; padding: 4px 10px; }
  .wiz-chat__intro-sub { font-size: 0.95rem; }

  /* Start button — full-width on phones, easier to tap */
  .wizard-body.is-empty .wiz-chat__intro-cta {
    width: 100%;
    align-items: stretch;
  }
  .wiz-start-btn {
    width: 100%;
    font-size: 1rem;
    padding: 14px 20px;
  }
  .wiz-chat__intro-signin { text-align: center; }

  /* Composer */
  .wiz-composer { padding: var(--space-3) var(--space-4); }
  .wiz-input-row { padding: 4px 4px 4px var(--space-4); }
  .wiz-input { font-size: 0.95rem; padding: var(--space-3) 0; }
  .wiz-send { width: 38px; height: 38px; }
  .wiz-send svg { width: 16px; height: 16px; }

  /* Message bubbles — tighten gutters */
  .wiz-messages { gap: var(--space-3); }
  .wiz-msg__avatar { width: 28px; height: 28px; border-radius: 10px; font-size: 0.9rem; }
  .wiz-msg__bubble {
    max-width: 88%;
    padding: var(--space-2) var(--space-3);
    font-size: 0.92rem;
  }

  /* Chips — wrap nicely */
  .wiz-chips { gap: 6px; margin-bottom: var(--space-2); }
  .wiz-chip { font-size: 0.8rem; padding: 6px 12px; }
}

/* Very narrow phones */
@media (max-width: 380px) {
  .wiz-brand__name { display: none; }          /* logo + dot only */
  .wiz-topnav { gap: var(--space-2); }
  .wiz-topnav__link { font-size: 0.75rem; }
  .wizard-body.is-empty .wiz-chat__intro-title { font-size: 1.75rem; }
}

/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .wiz-aurora__orb { animation: none; }
}
