/* styles.css — CFM Onboarding (Conversational AI) */

:root {
  --bg: #f6f4ef;
  --bg-soft: #ffffff;
  --ink: #0c1416;
  --ink-2: #344048;
  --ink-3: #6b7780;
  --ink-4: #97a0a8;
  --line: #e6e2d8;
  --line-strong: #d4cfc1;
  --teal: #0089AF;
  --teal-deep: #006883;
  --teal-bright: #1aa6ce;
  --teal-tint: #e3f1f6;
  --teal-tint-2: #c8e4ec;
  --warn: #b8541d;
  --ok: #1f7a4a;
  --dark: #0a1418;
  --shadow-md: 0 4px 14px rgba(12,20,22,0.06), 0 2px 4px rgba(12,20,22,0.04);
  --shadow-lg: 0 20px 60px -20px rgba(12,20,22,0.18), 0 8px 20px -10px rgba(12,20,22,0.10);
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "DM Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}
h1, h2, h3, h4 {
  font-family: "Bricolage Grotesque", "DM Sans", ui-sans-serif, system-ui, sans-serif;
  font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; margin: 0; color: var(--ink);
}
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; color: var(--ink); }
a { color: var(--teal-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── INTRO SCREEN ─────────────────────────────────── */
.intro {
  position: fixed; inset: 0; z-index: 1000;
  background: radial-gradient(ellipse at 30% 20%, #0e3a4a 0%, #061a22 45%, #020a0e 100%);
  color: white; display: grid; place-items: center; overflow: hidden;
  transition: opacity .9s cubic-bezier(.4,0,.2,1), transform .9s cubic-bezier(.4,0,.2,1);
}
.intro.hide { opacity: 0; transform: scale(1.04); pointer-events: none; }
.intro::before, .intro::after {
  content: ""; position: absolute; inset: -50%;
  background: radial-gradient(circle at 60% 40%, rgba(0,184,240,.3), transparent 40%),
              radial-gradient(circle at 30% 70%, rgba(0,137,175,.35), transparent 45%),
              radial-gradient(circle at 80% 80%, rgba(0,184,200,.2), transparent 40%);
  filter: blur(40px); animation: aurora 22s linear infinite; pointer-events: none;
}
.intro::after { animation-duration: 35s; animation-direction: reverse; opacity: 0.6; }
@keyframes aurora { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.intro-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at center, black 30%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at center, black 30%, transparent 90%);
}
.intro-inner { position: relative; z-index: 2; text-align: center; padding: 40px; max-width: 720px; display: flex; flex-direction: column; align-items: center; }
.intro-eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.28em; text-transform: uppercase;
  color: rgba(255,255,255,0.6); margin-bottom: 28px; display: inline-flex; align-items: center; gap: 12px;
}
.intro-eyebrow::before, .intro-eyebrow::after { content: ""; width: 24px; height: 1px; background: rgba(255,255,255,0.3); }
.intro-title { color: white; font-size: clamp(40px, 6vw, 76px); letter-spacing: -0.035em; line-height: 1; }
.intro-title em {
  font-style: normal;
  background: linear-gradient(180deg, #5cd0ed 0%, #00b8f0 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 40px rgba(0,184,240,0.4);
}
.intro-sub { margin-top: 22px; max-width: 540px; font-size: 17px; line-height: 1.55; color: rgba(255,255,255,0.7); }
.intro-mic-wrap { margin-top: 56px; position: relative; width: 220px; height: 220px; display: grid; place-items: center; }
.intro-mic-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(0,184,240,0.25); animation: ring-pulse 3s ease-out infinite; }
.intro-mic-ring.r2 { animation-delay: 1s; }
.intro-mic-ring.r3 { animation-delay: 2s; }
@keyframes ring-pulse { 0% { transform: scale(.6); opacity: 0; } 20% { opacity: 1; } 100% { transform: scale(1.4); opacity: 0; } }
.intro-mic-btn {
  position: relative; width: 132px; height: 132px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  background: radial-gradient(circle at 35% 30%, #00b8f0, #006883 70%, #003a50);
  color: white; cursor: pointer;
  box-shadow: 0 0 80px rgba(0,184,240,0.35), 0 0 0 1px rgba(255,255,255,0.1) inset, 0 12px 40px -10px rgba(0,184,240,0.5);
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s ease; display: grid; place-items: center;
}
.intro-mic-btn:hover { transform: scale(1.05); box-shadow: 0 0 120px rgba(0,184,240,0.5), 0 0 0 1px rgba(255,255,255,0.2) inset, 0 16px 50px -10px rgba(0,184,240,0.6); }
.intro-mic-btn:active { transform: scale(0.98); }
.intro-mic-btn svg { width: 48px; height: 48px; filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4)); }
.intro-cta-label { margin-top: 26px; font-size: 18px; font-weight: 600; color: white; font-family: "Bricolage Grotesque", sans-serif; letter-spacing: -0.01em; }
.intro-cta-hint { margin-top: 6px; font-size: 13px; color: rgba(255,255,255,0.5); }
.intro-skip { margin-top: 36px; background: transparent; border: none; color: rgba(255,255,255,0.55); font-size: 14px; padding: 8px 16px; border-radius: 8px; }
.intro-skip:hover { color: white; background: rgba(255,255,255,0.05); }
.intro-brand { position: absolute; top: 32px; left: 32px; z-index: 3; display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,0.85); }
.intro-brand .brand-mark { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); }
.intro-brand .brand-text span { color: rgba(255,255,255,0.5); }
.intro-brand .brand-text strong { color: white; }
.intro-mic-wrap.launching .intro-mic-btn { animation: mic-launch 1.2s cubic-bezier(.6,0,.4,1) forwards; }
@keyframes mic-launch { 0% { transform: scale(1); } 40% { transform: scale(1.5); box-shadow: 0 0 200px rgba(0,184,240,0.7); } 100% { transform: scale(2.4); opacity: 0; } }
.intro-mic-wrap.launching .intro-mic-ring { animation-duration: 1.4s; }

/* ─── AGENT ORB ─────────────────────── */
.orb { position: relative; width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0; }
.orb-core {
  position: absolute; inset: 12px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #5cd0ed 0%, #00b8f0 35%, #006883 80%);
  box-shadow: 0 0 30px rgba(0,184,240,0.5), 0 0 0 1px rgba(255,255,255,0.2) inset; z-index: 2;
}
.orb-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(0,184,240,0.4); opacity: 0; }
.orb.listening .orb-ring, .orb.speaking .orb-ring { animation: orb-ping 1.8s ease-out infinite; }
.orb.listening .orb-ring.r2, .orb.speaking .orb-ring.r2 { animation-delay: 0.6s; }
.orb.listening .orb-ring.r3, .orb.speaking .orb-ring.r3 { animation-delay: 1.2s; }
@keyframes orb-ping { 0% { transform: scale(0.7); opacity: 0; } 15% { opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }
.orb.speaking .orb-core { animation: orb-bob 1.4s ease-in-out infinite; }
@keyframes orb-bob { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); box-shadow: 0 0 50px rgba(0,184,240,0.8), 0 0 0 1px rgba(255,255,255,0.3) inset; } }
.orb.thinking .orb-core {
  background: radial-gradient(circle at 35% 30%, #b89dff 0%, #7a5ae0 35%, #4a3380 80%);
  box-shadow: 0 0 30px rgba(122,90,224,0.5), 0 0 0 1px rgba(255,255,255,0.2) inset;
  animation: orb-spin 1.6s linear infinite;
}
@keyframes orb-spin { to { transform: rotate(360deg); } }
.orb.giant { width: 240px; height: 240px; }
.orb.giant .orb-core { inset: 50px; box-shadow: 0 0 120px rgba(0,184,240,0.6), 0 0 0 1px rgba(255,255,255,0.2) inset; }

/* ─── GREETING OVERLAY ─────────────────────── */
.agent-greet {
  position: fixed; inset: 0; z-index: 900;
  background: radial-gradient(ellipse at 50% 40%, rgba(14,58,74,0.92) 0%, rgba(6,26,34,0.95) 60%, rgba(2,10,14,1) 100%);
  display: grid; place-items: center; color: white;
  transition: opacity .9s ease, transform .9s ease;
}
.agent-greet.hide { opacity: 0; pointer-events: none; }
.agent-greet-inner { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 30px; }
.agent-bubble-big {
  max-width: 580px; font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(24px, 3vw, 36px); line-height: 1.25; color: white; font-weight: 600;
  letter-spacing: -0.02em; text-wrap: balance; text-shadow: 0 2px 30px rgba(0,184,240,0.3); min-height: 4em;
}
.agent-bubble-big .caret { display: inline-block; width: 3px; height: 0.9em; background: #00b8f0; margin-left: 4px; vertical-align: text-bottom; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ─── HEADER + LAYOUT ─────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(246,244,239,0.88);
  backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { max-width: 1180px; margin: 0 auto; padding: 16px 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand-lockup { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 9px; background: var(--teal); color: white;
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
  font-family: "Bricolage Grotesque", sans-serif; box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset, 0 1px 2px rgba(0,0,0,0.1);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; gap: 4px; }
.brand-text strong { font-size: 15px; font-family: "Bricolage Grotesque", sans-serif; letter-spacing: -0.01em; }
.brand-text span { font-size: 11px; color: var(--ink-3); letter-spacing: 0.04em; text-transform: uppercase; font-weight: 500; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.save-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.save-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(31,122,74,0.12); }
.save-pill.saving .dot { background: #d9a23a; animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

.shell { max-width: 1180px; margin: 0 auto; padding: 48px 28px 240px; }
@media (min-width: 1101px) { .shell:not(.review):not(.provisioning) { padding-right: 388px; max-width: 1568px; } }

/* ─── MAIN HEADER ─────────────────────── */
.main-eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--teal-deep); margin-bottom: 16px; }
.main-eyebrow .live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px var(--teal-tint); animation: pulse 1.5s infinite; }
.main-h1 { font-size: clamp(36px, 5vw, 56px); letter-spacing: -0.03em; }
.main-sub { margin-top: 18px; max-width: 640px; font-size: 17px; line-height: 1.5; color: var(--ink-2); }
.overall-progress-row { margin-top: 36px; display: flex; align-items: center; gap: 18px; }
.overall-progress-row .meta { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.overall-progress-row .meta strong { color: var(--ink); }
.progress-track { position: relative; flex: 1; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress-fill { position: absolute; top: 0; left: 0; bottom: 0; background: linear-gradient(90deg, var(--teal), var(--teal-bright)); border-radius: 999px; transition: width 0.6s cubic-bezier(.2,.7,.2,1); }

/* ─── SECTION PANELS ─────────────────────── */
.sections { margin-top: 44px; display: flex; flex-direction: column; gap: 18px; }
.panel { position: relative; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 18px; padding: 32px 32px 30px; transition: border-color .3s ease, box-shadow .3s ease, transform .3s ease, opacity .3s ease; scroll-margin-top: 100px; }
.panel.active { border-color: var(--teal); box-shadow: 0 0 0 4px var(--teal-tint), 0 20px 60px -20px rgba(0,137,175,0.25); }
.panel.complete { border-color: var(--teal-tint-2); background: linear-gradient(180deg, var(--teal-tint) 0%, var(--bg-soft) 50%); }
.panel.idle { opacity: 0.62; }
.panel.idle:hover { opacity: 1; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.panel-head-left { display: flex; gap: 18px; align-items: flex-start; }
.panel-num { font-family: "Bricolage Grotesque", sans-serif; font-size: 38px; font-weight: 600; color: var(--ink-3); letter-spacing: -0.02em; line-height: 0.9; flex-shrink: 0; }
.panel.active .panel-num, .panel.complete .panel-num { color: var(--teal-deep); }
.panel-titles h2 { font-size: 26px; letter-spacing: -0.02em; }
.panel-titles .eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.panel-titles .blurb { margin-top: 8px; color: var(--ink-3); font-size: 14px; max-width: 460px; }
.panel-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 6px 12px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--ink-3); white-space: nowrap; }
.panel-status .status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.panel.active .panel-status { color: var(--teal-deep); background: var(--teal-tint); border-color: var(--teal-tint-2); }
.panel.active .panel-status .status-dot { animation: pulse 1s infinite; }
.panel.complete .panel-status { background: var(--teal); color: white; border-color: var(--teal); }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.form .field-full { grid-column: 1 / -1; }
@media (max-width: 720px) { .form { grid-template-columns: 1fr; } .form .field-half { grid-column: 1 / -1; } }
.field { position: relative; transition: opacity .2s ease; }
.field.focused .field-label { color: var(--teal-deep); }
.field-label { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 8px; letter-spacing: -0.005em; transition: color .2s ease; }
.field-label .req { color: var(--warn); margin-left: 4px; }
.field-label .filled-tag { margin-left: 8px; display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--ok); font-weight: 500; vertical-align: middle; letter-spacing: 0.04em; text-transform: uppercase; }
.field-hint { display: flex; gap: 6px; align-items: flex-start; font-size: 12.5px; color: var(--ink-3); margin-bottom: 10px; line-height: 1.4; }
.field-hint .bulb { color: var(--teal); flex-shrink: 0; margin-top: 1px; }

.input, .textarea { width: 100%; background: var(--bg); border: 1px solid var(--line-strong); border-radius: 10px; padding: 12px 14px; font-size: 15px; color: var(--ink); transition: border-color .15s ease, box-shadow .15s ease, background .2s ease; font-family: inherit; }
.textarea { resize: vertical; line-height: 1.5; min-height: 80px; }
.input:focus, .textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-tint); background: var(--bg-soft); }
.field.focused .input, .field.focused .textarea { border-color: var(--teal); background: var(--bg-soft); box-shadow: 0 0 0 3px var(--teal-tint), 0 0 30px -10px rgba(0,137,175,0.3); }
.input-wrap { position: relative; }
.interim-overlay { position: absolute; left: 14px; right: 50px; top: 13px; pointer-events: none; font-size: 15px; color: var(--ink-3); font-style: italic; opacity: 0.7; }

.opt-list { display: flex; flex-direction: column; gap: 8px; }
.opt-list.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.opt-list.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 12px; }
@media (max-width: 720px) { .opt-list.cols-2, .opt-list.cols-3 { grid-template-columns: 1fr; } }
.opt { display: flex; align-items: center; gap: 10px; padding: 11px 14px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; transition: border-color .12s ease, background .12s ease, transform .15s ease; font-size: 14px; color: var(--ink); user-select: none; }
.opt:hover { border-color: var(--line-strong); }
.opt.checked { border-color: var(--teal); background: var(--teal-tint); box-shadow: 0 0 0 1px var(--teal) inset; }
.opt.just-set { animation: pop 0.4s cubic-bezier(.2,1,.4,1); }
@keyframes pop { 0% { transform: scale(0.95); } 50% { transform: scale(1.03); } 100% { transform: scale(1); } }
.opt input { display: none; }
.opt-box { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--line-strong); background: var(--bg-soft); display: grid; place-items: center; flex-shrink: 0; transition: all .12s ease; }
.opt-box.radio { border-radius: 50%; }
.opt.checked .opt-box { border-color: var(--teal); background: var(--teal); }
.opt.checked .opt-box.radio::after { content: ""; width: 8px; height: 8px; background: white; border-radius: 50%; display: block; }
.opt.checked .opt-box:not(.radio)::after { content: ""; width: 9px; height: 5px; border-left: 2px solid white; border-bottom: 2px solid white; transform: rotate(-45deg); margin-top: -2px; }

.limited-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (max-width: 540px) { .limited-grid { grid-template-columns: 1fr; } }
.limited-opt { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; cursor: pointer; text-align: left; transition: border-color .12s ease, background .12s ease, transform .15s ease; display: flex; flex-direction: column; gap: 3px; position: relative; }
.limited-opt:hover { border-color: var(--line-strong); }
.limited-opt.checked { border-color: var(--teal); background: var(--teal-tint); box-shadow: 0 0 0 1px var(--teal) inset; }
.limited-opt.just-set { animation: pop 0.4s cubic-bezier(.2,1,.4,1); }
.limited-opt .label { font-weight: 600; font-size: 14px; }
.limited-opt .desc { font-size: 13px; color: var(--ink-3); }
.limited-opt .corner { position: absolute; top: 12px; right: 12px; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: var(--bg-soft); }
.limited-opt.checked .corner { background: var(--teal); border-color: var(--teal); }
.limited-opt.checked .corner::after { content: ""; position: absolute; left: 4px; top: 1px; width: 5px; height: 9px; border-right: 2px solid white; border-bottom: 2px solid white; transform: rotate(45deg); }
.limited-cap { display: inline-block; margin-bottom: 10px; font-size: 12px; font-weight: 500; color: var(--ink-3); }
.limited-cap.full { color: var(--warn); }

.dropzone { border: 1.5px dashed var(--line-strong); background: var(--bg-soft); border-radius: 14px; padding: 28px; text-align: center; transition: border-color .15s ease, background .15s ease; cursor: pointer; }
.dropzone:hover, .dropzone.dragging { border-color: var(--teal); background: var(--teal-tint); }
.dropzone .dz-icon { width: 40px; height: 40px; margin: 0 auto 10px; border-radius: 10px; background: var(--teal-tint); display: grid; place-items: center; color: var(--teal-deep); }
.dropzone .dz-title { font-weight: 600; font-size: 15px; }
.dropzone .dz-sub { font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.dropzone .dz-or { color: var(--ink-3); margin: 0 6px; }
.dropzone .dz-link { color: var(--teal-deep); font-weight: 600; }
.file-list { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.file-item { display: flex; align-items: center; gap: 10px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-size: 13px; }
.file-item .fi-icon { color: var(--teal-deep); }
.file-item .fi-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item .fi-size { color: var(--ink-3); font-size: 12px; }
.file-item .fi-remove { background: transparent; border: none; color: var(--ink-3); padding: 4px 6px; border-radius: 6px; }
.file-item .fi-remove:hover { background: var(--bg); color: var(--ink); }
.color-wrap { display: flex; gap: 10px; align-items: center; }
.color-swatch { width: 48px; height: 48px; border-radius: 10px; border: 1px solid var(--line-strong); flex-shrink: 0; }
.color-input { flex: 1; }

/* ─── AGENT FLOATING WIDGET ─────────────────────── */
.agent-widget {
  position: fixed; top: 24px; right: 24px; width: 340px;
  background: rgba(10,20,24,0.92);
  backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 18px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.4), 0 0 0 1px rgba(0,184,240,0.1), 0 0 60px -20px rgba(0,184,240,0.25);
  color: white; z-index: 950; overflow: hidden; transition: opacity .4s ease, transform .4s ease;
}
.agent-widget.collapsed { width: 78px; cursor: pointer; }
.agent-widget.collapsed .agent-widget-body, .agent-widget.collapsed .agent-widget-controls,
.agent-widget.collapsed .agent-input-row, .agent-widget.collapsed .agent-widget-head .meta { display: none; }
.agent-widget.collapsed .agent-widget-head { padding: 12px; justify-content: center; }
.agent-widget-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 12px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.agent-widget-head .meta { flex: 1; min-width: 0; }
.agent-widget-head .meta .name { font-family: "Bricolage Grotesque", sans-serif; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; display: flex; align-items: center; gap: 6px; }
.agent-widget-head .meta .name .liveball { width: 6px; height: 6px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 3px rgba(74,222,128,0.2); }
.agent-widget-head .meta .state { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.5); margin-top: 2px; }
.agent-widget-head .meta .state.listening { color: #00b8f0; }
.agent-widget-head .meta .state.speaking { color: #5cd0ed; }
.agent-widget-head .meta .state.thinking { color: #b89dff; }
.agent-collapse-btn { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); color: rgba(255,255,255,0.7); width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; transition: all .15s ease; }
.agent-collapse-btn:hover { background: rgba(255,255,255,0.1); color: white; }
.agent-widget-body { padding: 14px 16px 10px; }
.agent-msg { font-size: 14.5px; line-height: 1.4; color: rgba(255,255,255,0.92); font-family: "Bricolage Grotesque", sans-serif; letter-spacing: -0.005em; min-height: 50px; }

/* Scrollable chat transcript */
.agent-chat { max-height: 230px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 4px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.2) transparent; }
.agent-chat::-webkit-scrollbar { width: 5px; }
.agent-chat::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 3px; }
.chat-bubble { font-size: 14px; line-height: 1.4; padding: 9px 12px; border-radius: 12px; max-width: 92%; word-wrap: break-word; }
.chat-bubble.agent { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.95); align-self: flex-start; border-bottom-left-radius: 4px; font-family: "Bricolage Grotesque", sans-serif; }
.chat-bubble.user { background: var(--teal); color: white; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-bubble.user.interim { opacity: 0.55; font-style: italic; }
.agent-hint-line { margin-top: 8px; font-size: 12px; color: rgba(255,255,255,0.45); }
.agent-error { margin-top: 8px; font-size: 12px; color: #ff8a7a; }
.agent-tap-hint { margin-top: 12px; background: rgba(0,184,240,0.12); border: 1px solid rgba(0,184,240,0.28); border-radius: 10px; padding: 10px 12px; font-size: 13px; color: rgba(255,255,255,0.9); display: flex; gap: 8px; align-items: center; animation: tap-hint-in .3s ease; }
@keyframes tap-hint-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.agent-tap-hint .tap-icon { font-size: 16px; flex-shrink: 0; }
.agent-transcript { margin-top: 12px; background: rgba(0,184,240,0.08); border: 1px solid rgba(0,184,240,0.18); border-radius: 10px; padding: 10px 12px; font-size: 13px; color: rgba(255,255,255,0.8); display: flex; gap: 8px; align-items: flex-start; min-height: 38px; }
.agent-transcript .you { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(0,184,240,0.7); font-weight: 700; padding-top: 2px; flex-shrink: 0; }

/* Chat text input */
.agent-input-row { display: flex; gap: 8px; padding: 10px 16px 4px; }
.agent-input { flex: 1; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); color: white; border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.agent-input::placeholder { color: rgba(255,255,255,0.4); }
.agent-input:focus { outline: none; border-color: rgba(0,184,240,0.6); box-shadow: 0 0 0 3px rgba(0,184,240,0.15); }
.agent-send { background: var(--teal); border: none; color: white; width: 40px; border-radius: 10px; display: grid; place-items: center; transition: background .15s ease; }
.agent-send:hover { background: var(--teal-bright); }

.agent-widget-controls { padding: 8px 16px 14px; display: flex; gap: 6px; align-items: center; }
.agent-btn { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); color: rgba(255,255,255,0.78); font-size: 12px; font-weight: 500; padding: 7px 12px; border-radius: 9px; display: inline-flex; align-items: center; gap: 6px; transition: all .15s ease; }
.agent-btn:hover { background: rgba(255,255,255,0.12); color: white; }
.agent-btn.primary { background: var(--teal); border-color: var(--teal); color: white; }
.agent-btn.primary:hover { background: var(--teal-bright); }
.agent-btn.icon { padding: 7px; }
.agent-btn.icon.on { color: #00b8f0; border-color: rgba(0,184,240,0.4); background: rgba(0,184,240,0.1); }
.agent-spacer { flex: 1; }

.wave { display: inline-flex; gap: 2px; align-items: flex-end; height: 14px; }
.wave span { display: block; width: 2px; background: currentColor; border-radius: 1px; animation: wave 0.9s ease-in-out infinite; }
.wave span:nth-child(1) { animation-delay: 0s; }
.wave span:nth-child(2) { animation-delay: 0.12s; }
.wave span:nth-child(3) { animation-delay: 0.24s; }
.wave span:nth-child(4) { animation-delay: 0.36s; }
.wave span:nth-child(5) { animation-delay: 0.48s; }
@keyframes wave { 0%, 100% { height: 3px; } 50% { height: 14px; } }

/* ─── REVIEW SCREEN ─────────────────────── */
.review .main-eyebrow svg { width: 14px; height: 14px; }
.review-warn { margin-top: 24px; background: #fdf3ea; border: 1px solid #f0d3b8; color: #8a4419; border-radius: 12px; padding: 14px 18px; font-size: 14px; line-height: 1.5; }
.review-list { margin-top: 36px; display: flex; flex-direction: column; gap: 16px; }
.review-section { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 16px; padding: 24px 26px; }
.review-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.review-section-head > div { display: flex; align-items: baseline; gap: 12px; }
.review-section-head h3 { font-size: 20px; }
.review-num { font-family: "Bricolage Grotesque", sans-serif; font-size: 15px; color: var(--teal-deep); font-weight: 600; }
.review-edit { background: var(--bg); border: 1px solid var(--line); color: var(--ink-2); font-size: 13px; font-weight: 500; padding: 7px 12px; border-radius: 9px; display: inline-flex; align-items: center; gap: 6px; transition: all .15s ease; }
.review-edit:hover { border-color: var(--teal); color: var(--teal-deep); background: var(--teal-tint); }
.review-edit svg { width: 13px; height: 13px; }
.review-empty { font-size: 14px; color: var(--ink-4); font-style: italic; }
.review-rows { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.review-row { display: grid; grid-template-columns: 240px 1fr; gap: 18px; align-items: start; }
@media (max-width: 640px) { .review-row { grid-template-columns: 1fr; gap: 4px; } }
.review-row dt { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.review-row dd { margin: 0; font-size: 15px; color: var(--ink); white-space: pre-wrap; }
.review-actions { margin-top: 40px; display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
@media (max-width: 640px) { .review-actions { flex-direction: column-reverse; align-items: stretch; } }

.btn-primary { background: var(--teal); color: white; border: none; border-radius: 12px; padding: 13px 22px; font-size: 15px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: background .15s ease, transform .1s ease; }
.btn-primary:hover { background: var(--teal-bright); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.6; cursor: default; }
.btn-primary.big { padding: 16px 28px; font-size: 16px; }
.btn-ghost { background: transparent; color: var(--ink-2); border: 1px solid var(--line-strong); border-radius: 12px; padding: 13px 20px; font-size: 15px; font-weight: 500; }
.btn-ghost:hover { background: var(--bg-soft); border-color: var(--ink-3); }

/* ─── PROVISIONING SCREEN ─────────────────────── */
.provisioning { text-align: center; max-width: 760px; display: flex; flex-direction: column; align-items: center; padding-top: 72px; }
.provisioning .main-h1, .provisioning .main-sub { text-align: center; }
.provisioning .main-sub { margin-left: auto; margin-right: auto; }
.provision-card { margin-top: 40px; width: 100%; max-width: 560px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 18px; padding: 28px 30px; box-shadow: var(--shadow-md); text-align: left; }
.provision-bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.provision-fill { height: 100%; background: linear-gradient(90deg, var(--teal), var(--teal-bright)); border-radius: 999px; transition: width 1s cubic-bezier(.2,.7,.2,1); }
.provision-steps { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.provision-steps li { display: flex; align-items: center; gap: 12px; font-size: 14.5px; color: var(--ink-4); transition: color .3s ease; }
.provision-steps li.active { color: var(--ink); font-weight: 600; }
.provision-steps li.done { color: var(--ink-2); }
.provision-dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; flex-shrink: 0; color: white; }
.provision-steps li.done .provision-dot { background: var(--ok); border-color: var(--ok); }
.provision-steps li.active .provision-dot { border-color: var(--teal); animation: pulse 1.2s infinite; }
.provision-card .btn-primary { margin-top: 24px; }

/* ─── COMPLETION / CONFETTI ─────────────────────── */
.confetti-layer { position: fixed; inset: 0; pointer-events: none; z-index: 1100; overflow: hidden; }
.confetti-piece { position: absolute; top: -20px; width: 10px; height: 14px; animation: confetti-fall linear forwards; }
@keyframes confetti-fall { to { transform: translateY(110vh) rotate(720deg); opacity: 0.2; } }

/* ─── WEBSITE ENTRY SCREEN ───────────────────────────────────────── */
.website-entry {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 28px; text-align: center; position: relative; overflow: hidden;
  background: radial-gradient(ellipse at 30% 20%, #0e3a4a 0%, #061a22 50%, #020a0e 100%); color: white;
}
.website-entry::before {
  content: ""; position: absolute; inset: -50%;
  background: radial-gradient(circle at 60% 40%, rgba(0,184,240,.2), transparent 40%),
              radial-gradient(circle at 30% 70%, rgba(0,137,175,.25), transparent 45%);
  filter: blur(40px); animation: aurora 22s linear infinite; pointer-events: none;
}
.website-entry > * { position: relative; z-index: 2; }
.website-entry-orb { margin-bottom: 22px; }
.website-entry-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(255,255,255,0.5); margin-bottom: 14px; }
.website-entry-title { font-family: "Bricolage Grotesque",sans-serif; font-size: clamp(28px,4vw,46px); font-weight: 700; letter-spacing: -0.025em; color: white; margin: 0 0 14px; }
.website-entry-sub { font-size: 16px; line-height: 1.55; color: rgba(255,255,255,0.65); max-width: 500px; margin: 0 auto 36px; }
.website-entry-form { width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: 14px; }
.website-url-input-wrap { display: flex; align-items: center; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14); border-radius: 14px; overflow: hidden; transition: border-color .2s ease, box-shadow .2s ease; }
.website-url-input-wrap:focus-within { border-color: rgba(0,184,240,0.7); box-shadow: 0 0 0 3px rgba(0,184,240,0.2); }
.url-prefix { padding: 0 2px 0 18px; font-size: 15px; color: rgba(255,255,255,0.35); white-space: nowrap; pointer-events: none; }
.website-url-input { flex: 1; background: transparent; border: none; outline: none; color: white; font-size: 16px; padding: 16px 14px 16px 0; font-family: inherit; }
.website-url-input::placeholder { color: rgba(255,255,255,0.3); }
.url-mic { background: rgba(255,255,255,0.08); border: none; color: rgba(255,255,255,0.7); width: 46px; align-self: stretch; display: grid; place-items: center; cursor: pointer; transition: all .15s ease; }
.url-mic:hover { background: rgba(255,255,255,0.14); color: white; }
.url-mic.on { background: var(--teal); color: white; animation: pulse 1.2s infinite; }
.website-scan-btn { width: 100%; justify-content: center; }
.website-skip-link { margin-top: 18px; background: transparent; border: none; color: rgba(255,255,255,0.4); font-size: 14px; cursor: pointer; padding: 8px 16px; border-radius: 8px; }
.website-skip-link:hover { color: rgba(255,255,255,0.7); background: rgba(255,255,255,0.05); }

/* ─── MID-CONVERSATION SCANNING OVERLAY ─────────────────────────── */
/* Appears on top of the live form when Momentum triggers a site crawl */
.scan-overlay {
  position: fixed; inset: 0; z-index: 800;
  background: rgba(6,26,34,0.96);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  animation: scan-overlay-in .3s ease;
}
@keyframes scan-overlay-in { from { opacity: 0; } to { opacity: 1; } }
.scan-overlay-inner {
  text-align: center; display: flex; flex-direction: column; align-items: center;
  gap: 16px; padding: 48px 32px; max-width: 420px; width: 100%;
}
.scan-overlay-url { font-size: 14px; color: rgba(0,184,240,0.8); font-weight: 600; letter-spacing: 0.02em; }
.scan-overlay-step { font-family: "Bricolage Grotesque",sans-serif; font-size: clamp(18px,3vw,26px); font-weight: 600; color: white; letter-spacing: -0.02em; min-height: 1.4em; }
.scan-bar-wrap { width: 100%; display: flex; align-items: center; gap: 12px; }
.scan-bar { flex: 1; height: 6px; border-radius: 999px; background: rgba(255,255,255,0.1); overflow: hidden; }
.scan-fill { height: 100%; background: linear-gradient(90deg, var(--teal), #00d4ff); border-radius: 999px; transition: width 0.8s cubic-bezier(.2,.7,.2,1); }
.scan-pct { font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.5); width: 32px; text-align: right; }
.scan-skip-btn { background: transparent; border: none; color: rgba(255,255,255,0.35); font-size: 13px; cursor: pointer; padding: 8px 16px; border-radius: 8px; margin-top: 8px; }
.scan-skip-btn:hover { color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.04); }

/* Small note when falling back to browser voice */
.agent-voice-note { margin-top: 6px; font-size: 11px; color: rgba(255,255,255,0.3); }

/* ─── RESPONSIVE ─────────────────────── */
@media (max-width: 1100px) {
  .agent-widget { top: auto; bottom: 16px; right: 16px; left: 16px; width: auto; max-width: 560px; margin: 0 auto; }
  .agent-widget.collapsed { left: auto; width: 78px; }
}
@media (max-width: 640px) {
  .shell { padding: 32px 18px 320px; }
  .panel { padding: 22px 20px 22px; }
  .panel-num { font-size: 30px; }
  .panel-titles h2 { font-size: 22px; }
}
