:root {
  --ink: #452638;
  --ink-soft: #755565;
  --muted: #8d7881;
  --paper: #fffaf7;
  --panel: rgba(255, 252, 249, .8);
  --rose: #c96f76;
  --rose-soft: #f3c5c0;
  --plum: #71415b;
  --gold: #ddb86f;
  --sage: #91aa96;
  --line: rgba(91, 50, 70, .13);
  --shadow: 0 28px 80px rgba(82, 43, 61, .12);
}

* { box-sizing: border-box; }

html,
body { min-height: 100%; }

body {
  margin: 0;
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  background:
    radial-gradient(circle at 15% 12%, rgba(245, 203, 197, .72), transparent 28%),
    radial-gradient(circle at 91% 84%, rgba(221, 184, 111, .28), transparent 27%),
    linear-gradient(145deg, #fffaf7 0%, #f9e8e4 54%, #f5ded9 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .09;
  background-image:
    linear-gradient(rgba(99, 58, 78, .22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 58, 78, .22) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: radial-gradient(circle at center, #000, transparent 78%);
}

button,
input,
textarea,
select { font: inherit; }

button,
a { -webkit-tap-highlight-color: transparent; }

.onboarding-app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
}

.studio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  padding: 0 clamp(22px, 4vw, 62px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 250, 247, .45);
  backdrop-filter: blur(18px);
}

.studio-brand,
.studio-actions,
.draft-status {
  display: flex;
  align-items: center;
}

.studio-brand {
  gap: 10px;
  color: var(--ink);
  font: 700 14px Manrope, sans-serif;
  text-decoration: none;
}

.studio-logo {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(145deg, #a96883, #4a293b);
  box-shadow: inset 0 1px rgba(255,255,255,.35), 0 9px 24px rgba(74,41,59,.2);
  color: #fffaf7;
  font-size: 10px;
  letter-spacing: -.04em;
  border-radius: 44% 56% 52% 48% / 48% 43% 57% 52%;
}

.studio-logo::after {
  content: "";
  position: absolute;
  right: 3px;
  bottom: 4px;
  width: 5px;
  height: 5px;
  border: 1.5px solid #fffaf7;
  border-radius: 50%;
  background: #ddb86f;
}

.studio-brand small {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font: 500 8px "DM Sans", sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.studio-actions { gap: 18px; }

.studio-actions > a {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
  text-decoration: none;
}

.studio-actions > a span { color: var(--rose); font-size: 15px; }

.returning-login {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.3);
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 600;
  cursor: pointer;
}

.returning-login span { color: var(--rose); }

.draft-status {
  gap: 7px;
  color: var(--muted);
  font-size: 9px;
}

.draft-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 4px rgba(145,170,150,.15);
}

.builder-shell {
  display: grid;
  grid-template-columns: minmax(300px, 33%) minmax(0, 1fr);
  gap: clamp(26px, 4vw, 66px);
  width: min(1480px, 100%);
  height: calc(100vh - 76px);
  height: calc(100dvh - 76px);
  margin: 0 auto;
  padding: clamp(26px, 4vh, 46px) clamp(22px, 4vw, 62px);
  overflow: hidden;
}

.builder-sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: clamp(8px, 1.5vh, 18px) 0;
}

.eyebrow {
  margin: 0;
  color: #9c6f7d;
  font: 700 9px Manrope, sans-serif;
  letter-spacing: .17em;
}

.sidebar-copy h1 {
  max-width: 440px;
  margin: 20px 0 16px;
  font: 600 clamp(38px, 4.3vw, 66px)/1.02 Manrope, sans-serif;
  letter-spacing: -.06em;
}

.sidebar-copy h1 em {
  color: #a55570;
  font-family: Georgia, serif;
  font-weight: 400;
}

.sidebar-copy > p:last-child {
  max-width: 410px;
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(12px, 1vw, 14px);
  line-height: 1.65;
}

.step-navigation {
  display: grid;
  margin-top: clamp(24px, 4vh, 44px);
}

.step-item {
  position: relative;
  display: grid;
  grid-template-columns: 32px 1fr 9px;
  gap: 12px;
  align-items: center;
  min-height: 57px;
  padding: 8px 4px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  transition: color .18s ease, transform .18s ease, opacity .18s ease;
}

.step-item:disabled { cursor: default; opacity: .55; }
.step-item.active:disabled { opacity: 1; }
.step-item:not(:disabled):hover { color: var(--ink); transform: translateX(3px); }
.step-item:not(:disabled):focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }

.step-item > span:first-child {
  font: 700 9px Manrope, sans-serif;
  letter-spacing: .1em;
}

.step-item > span:nth-child(2) { display: grid; gap: 3px; }
.step-item strong { color: inherit; font: 600 11px Manrope, sans-serif; }
.step-item small { font-size: 9px; }

.step-item > i {
  width: 8px;
  height: 8px;
  border: 1px solid rgba(113,65,91,.25);
  border-radius: 50%;
}

.step-item.active { color: var(--ink); }
.step-item.active > span:first-child { color: var(--rose); }
.step-item.active > i { border: 0; background: var(--rose); box-shadow: 0 0 0 5px rgba(201,111,118,.13); }
.step-item.complete > i { border: 0; background: var(--sage); }

.sidebar-note {
  display: flex;
  gap: 12px;
  max-width: 400px;
  margin-top: auto;
  padding: 17px;
  border: 1px solid rgba(121,73,84,.11);
  border-radius: 15px;
  background: rgba(255,255,255,.28);
}

.sidebar-note > span { color: var(--gold); }
.sidebar-note p { margin: 0; color: var(--ink-soft); font-size: 9px; line-height: 1.55; }
.sidebar-note strong { display: block; margin-bottom: 3px; color: var(--ink); font: 600 10px Manrope, sans-serif; }

.builder-card {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(107,55,65,.12);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow), inset 0 1px rgba(255,255,255,.75);
  backdrop-filter: blur(22px);
}

.step-panel {
  display: none;
  height: 100%;
  padding: clamp(25px, 4vh, 48px) clamp(25px, 4vw, 54px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(74,41,59,.2) transparent;
  animation: panel-in .35s ease;
}

.step-panel.active { display: block; }
.mobile-progress { display: none; }

.panel-heading {
  display: grid;
  grid-template-columns: 43px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-bottom: clamp(24px, 3.5vh, 38px);
}

.panel-number {
  display: grid;
  place-items: center;
  width: 41px;
  height: 41px;
  border: 1px solid rgba(121,73,84,.18);
  border-radius: 50%;
  color: var(--rose);
  font: 700 9px Manrope, sans-serif;
}

.panel-heading h2,
.preview-heading h2 {
  margin: 8px 0 8px;
  font: 600 clamp(27px, 3vw, 43px)/1.05 Manrope, sans-serif;
  letter-spacing: -.05em;
}

.panel-heading > div > p:last-child,
.preview-heading > div > p:last-child {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.source-form { display: grid; gap: 18px; }

.multi-drop-zone {
  display: grid;
  place-items: center;
  min-height: clamp(190px, 27vh, 250px);
  padding: 24px;
  border: 1px dashed rgba(113,65,91,.3);
  border-radius: 20px;
  background:
    radial-gradient(circle at center, rgba(255,255,255,.76), transparent 70%),
    rgba(245,203,197,.09);
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s;
}

.multi-drop-zone:hover,
.multi-drop-zone.dragging {
  border-color: var(--rose);
  background-color: rgba(245,203,197,.2);
  transform: translateY(-2px);
}

.multi-drop-zone input { display: none; }

.upload-mark {
  display: grid;
  place-items: center;
  width: 49px;
  height: 49px;
  margin-bottom: 12px;
  border-radius: 16px;
  background: linear-gradient(145deg, #ae7088, #71415b);
  box-shadow: 0 13px 30px rgba(113,65,91,.2), inset 0 1px rgba(255,255,255,.25);
  color: #fff;
  font-size: 22px;
}

.multi-drop-zone strong { font: 600 14px Manrope, sans-serif; }
.multi-drop-zone p { margin: 5px 0; color: var(--rose); font-size: 10px; }
.multi-drop-zone small { color: var(--muted); font-size: 9px; }

.selected-files { display: grid; gap: 7px; }
.selected-files:empty { display: none; }

.file-pill {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.45);
}

.file-pill > span:first-child {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 9px;
  background: #f1dedb;
  color: var(--plum);
  font: 700 8px Manrope, sans-serif;
}

.file-pill div { display: grid; gap: 2px; min-width: 0; }
.file-pill strong { overflow: hidden; font: 600 10px Manrope, sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.file-pill small { color: var(--muted); font-size: 8px; }
.file-pill > span:last-child { color: var(--sage); font-size: 12px; }

.remove-evidence-file {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(169,85,112,.18);
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  color: var(--rose);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: color .2s, background .2s, border-color .2s, transform .2s;
}

.remove-evidence-file:hover,
.remove-evidence-file:focus-visible {
  border-color: rgba(169,85,112,.45);
  outline: 0;
  background: #f8e2df;
  color: #873f55;
  transform: scale(1.06);
}

.saved-file-check {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--sage);
  cursor: default;
}

.form-divider { display: flex; align-items: center; gap: 12px; }
.form-divider::before,
.form-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.form-divider span { color: var(--muted); font-size: 8px; letter-spacing: .12em; }

.field-label { display: grid; gap: 8px; }
.field-label > span { font: 600 10px Manrope, sans-serif; }

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: 0;
  background: rgba(255,255,255,.56);
  color: var(--ink);
}

input,
textarea { padding: 13px 14px; font-size: 12px; line-height: 1.55; }
textarea { resize: vertical; }
input:focus,
textarea:focus,
select:focus { border-color: rgba(169,85,112,.7); box-shadow: 0 0 0 3px rgba(231,161,159,.2); }
input::placeholder,
textarea::placeholder { color: #a6959c; }

.inline-alert { padding: 11px 13px; border-radius: 11px; font-size: 10px; }
.error-alert { background: #fbe1dc; color: #8e3934; }

.panel-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 2px;
}

.panel-actions > p {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--muted);
  font-size: 8px;
}

.panel-actions > p span { color: var(--sage); font-size: 15px; }

.primary-action,
.secondary-action,
.text-action {
  border: 0;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-width: 190px;
  padding: 13px 15px 13px 18px;
  border-radius: 13px;
  background: var(--ink);
  box-shadow: 0 13px 30px rgba(69,38,56,.18);
  color: #fffaf7;
  font: 600 10px Manrope, sans-serif;
}

.primary-action:hover { transform: translateY(-2px); box-shadow: 0 17px 38px rgba(69,38,56,.25); }
.primary-action:disabled { opacity: .55; cursor: wait; transform: none; }
.primary-action span { color: var(--rose-soft); font-size: 16px; }

.secondary-action {
  padding: 11px 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 10px;
}

.text-action { padding: 11px 5px; background: transparent; color: var(--muted); font-size: 9px; }
.text-action:hover,
.secondary-action:hover { color: var(--rose); }
.action-pair { display: flex; align-items: center; gap: 16px; }
.end-actions { margin-top: clamp(24px, 4vh, 42px); }

.review-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-bottom: 22px;
}

.review-summary article {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.34);
}

.review-summary span { color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .08em; }
.review-summary strong { grid-row: span 2; align-self: center; font: 600 25px Manrope, sans-serif; }
.review-summary small { overflow: hidden; color: var(--ink-soft); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }

.review-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .82fr);
  gap: 16px;
}

.review-fields,
.analysis-column { display: grid; align-content: start; gap: 14px; }

.detected-block,
.analysis-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255,255,255,.34);
}

.block-title { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.block-title > span { font: 600 10px Manrope, sans-serif; }
.block-title small { color: var(--muted); font-size: 8px; }
.detected-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.detected-chips span { padding: 6px 8px; border-radius: 999px; background: #f1dedb; color: #714557; font-size: 8px; }
.detected-chips .empty-chip { background: #eee9e6; color: var(--muted); }

.analysis-card ul { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.analysis-card li { position: relative; padding-left: 17px; color: var(--ink-soft); font-size: 9px; line-height: 1.45; }
.analysis-card li::before { content: "✓"; position: absolute; left: 0; color: var(--sage); font-weight: 700; }
.gap-card li::before { content: "+"; color: var(--rose); }

.interview-panel { padding-top: clamp(24px, 3.5vh, 42px); }

.interview-topline,
.interview-topline > div:first-child,
.answer-field > small,
.preview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.interview-topline > div:first-child { gap: 10px; }
.interview-topline span { color: var(--rose); font: 700 9px Manrope, sans-serif; letter-spacing: .13em; }
.interview-topline small { color: var(--muted); font-size: 8px; }
.interview-progress { width: min(220px, 34%); height: 3px; overflow: hidden; border-radius: 4px; background: rgba(121,73,84,.11); }
.interview-progress i { display: block; width: 12.5%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--rose), var(--gold)); transition: width .3s ease; }

.interviewer {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 25px;
  align-items: center;
  max-width: 800px;
  margin: clamp(35px, 7vh, 76px) auto clamp(30px, 5vh, 55px);
}

.interviewer-orb {
  position: relative;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 43% 57% 52% 48% / 51% 45% 55% 49%;
  background: radial-gradient(circle at 31% 24%, rgba(255,255,255,.48), transparent 14%), linear-gradient(145deg, #aa6983, #75405f 50%, #3b2538);
  box-shadow: inset -9px -10px 28px rgba(45,24,37,.26), 0 16px 40px rgba(107,55,65,.22);
  color: #fff;
  font: 600 26px Manrope, sans-serif;
  animation: interviewer-float 5s ease-in-out infinite;
}

.interviewer-orb i { position: absolute; right: 3px; bottom: 7px; width: 11px; height: 11px; border: 3px solid #fff9f5; border-radius: 50%; background: var(--gold); }
.interviewer > div:last-child > p { margin: 0 0 9px; color: var(--rose); font: 700 8px Manrope, sans-serif; letter-spacing: .16em; }
.interviewer h2 { margin: 0 0 12px; font: 600 clamp(25px, 3vw, 41px)/1.15 Manrope, sans-serif; letter-spacing: -.05em; }
.interviewer > div:last-child > span { color: var(--muted); font-size: 10px; line-height: 1.55; }

.answer-field {
  display: block;
  max-width: 800px;
  margin: 0 auto;
}

.answer-field textarea { min-height: clamp(145px, 22vh, 210px); padding: 18px; background: rgba(255,255,255,.48); font-size: 13px; }
.answer-field > small { margin-top: 8px; color: var(--muted); font-size: 8px; }
.answer-field > small span { color: #789079; }

.interview-tip,
.prototype-note {
  display: flex;
  gap: 10px;
  max-width: 800px;
  margin: 17px auto 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(221,184,111,.1);
}

.interview-tip > span,
.prototype-note > span { color: var(--gold); }
.interview-tip p,
.prototype-note p { margin: 0; color: var(--ink-soft); font-size: 8px; line-height: 1.5; }

.visibility-list { display: grid; border-top: 1px solid var(--line); }

.visibility-row {
  display: grid;
  grid-template-columns: 37px 1fr 140px;
  gap: 14px;
  align-items: center;
  min-height: 72px;
  border-bottom: 1px solid var(--line);
}

.topic-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: #f0dcda; color: var(--plum); }
.visibility-row > div { display: grid; gap: 4px; }
.visibility-row strong { font: 600 10px Manrope, sans-serif; }
.visibility-row small { color: var(--muted); font-size: 8px; }
.visibility-row select { padding: 10px 31px 10px 11px; color: var(--ink-soft); font-size: 9px; cursor: pointer; }
.boundary-field { margin-top: 22px; }

.preview-heading { gap: 20px; align-items: flex-start; }
.readiness-score { display: grid; flex: 0 0 auto; text-align: right; }
.readiness-score strong { color: var(--rose); font: 600 35px Manrope, sans-serif; letter-spacing: -.05em; }
.readiness-score span { color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .08em; }

.agent-preview-card {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) 1.2fr;
  align-items: center;
  min-height: 285px;
  margin-top: clamp(22px, 3vh, 34px);
  overflow: hidden;
  border: 1px solid rgba(107,55,65,.13);
  border-radius: 22px;
  background:
    radial-gradient(circle at 24% 48%, rgba(255,255,255,.95), transparent 26%),
    linear-gradient(135deg, #f5deda, #fffaf6 58%, #f0dfc1);
}

.preview-visual { position: relative; display: grid; place-items: center; height: 100%; min-height: 280px; }
.preview-orb { position: relative; z-index: 3; display: grid; place-items: center; width: 145px; height: 145px; border-radius: 43% 57% 52% 48% / 51% 45% 55% 49%; background: radial-gradient(circle at 31% 24%, rgba(255,255,255,.52), transparent 14%), linear-gradient(145deg, #aa6983, #75405f 50%, #3b2538); box-shadow: inset -16px -18px 48px rgba(45,24,37,.28), 0 25px 60px rgba(107,55,65,.24); color: white; animation: interviewer-float 5.8s ease-in-out infinite; }
.preview-orb strong { margin-top: -12px; font: 600 49px Manrope, sans-serif; }
.preview-orb > span { position: absolute; bottom: 31px; display: flex; align-items: center; gap: 4px; }
.preview-orb > span i { width: 3px; height: 9px; border-radius: 3px; background: rgba(255,255,255,.85); animation: preview-wave 1.2s ease-in-out infinite; }
.preview-orb > span i:nth-child(2) { height: 17px; animation-delay: .18s; }
.preview-orb > span i:nth-child(3) { animation-delay: .34s; }
.preview-orbit { position: absolute; z-index: 2; border: 1px solid rgba(201,111,118,.28); border-radius: 50%; }
.preview-orbit i { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.orbit-a { width: 230px; height: 130px; transform: rotate(-13deg); }
.orbit-a i { right: 13%; top: 7%; }
.orbit-b { width: 145px; height: 235px; transform: rotate(28deg); }
.orbit-b i { left: 7%; bottom: 20%; background: var(--rose); }

.preview-copy { padding: 30px 40px 30px 10px; }
.preview-copy > span { color: #9c6f7d; font: 700 8px Manrope, sans-serif; letter-spacing: .16em; }
.preview-copy h3 { margin: 12px 0 7px; font: 600 clamp(30px, 3.5vw, 50px)/1 Manrope, sans-serif; letter-spacing: -.055em; }
.preview-copy > p { max-width: 520px; margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.55; }
.preview-stats { display: flex; gap: 9px; margin-top: 23px; }
.preview-stats span { padding: 8px 10px; border: 1px solid rgba(121,73,84,.12); border-radius: 999px; background: rgba(255,255,255,.38); color: var(--muted); font-size: 8px; }
.preview-stats strong { color: var(--ink); }

.next-knowledge { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 13px; }
.next-knowledge article { display: grid; grid-template-columns: 24px 1fr auto; gap: 9px; min-height: 89px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.3); }
.next-knowledge article > span { color: var(--rose); font: 700 8px Manrope, sans-serif; }
.next-knowledge article div { display: grid; align-content: start; gap: 4px; }
.next-knowledge strong { font: 600 9px Manrope, sans-serif; }
.next-knowledge p { margin: 0; color: var(--muted); font-size: 8px; line-height: 1.4; }
.next-knowledge article > i { color: var(--sage); font: 600 8px Manrope, sans-serif; }
.prototype-note { max-width: none; margin-top: 13px; background: rgba(145,170,150,.1); }
.link-action { text-decoration: none; }
.danger-text { color: #9b4e52; }

.toast {
  position: fixed;
  z-index: 20;
  right: 25px;
  bottom: 25px;
  max-width: 360px;
  padding: 13px 16px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 12px;
  background: #4a293b;
  box-shadow: 0 18px 45px rgba(74,41,59,.25);
  color: #fffaf7;
  font-size: 10px;
  animation: toast-in .25s ease;
}

@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes interviewer-float { 0%,100% { transform: translateY(0) rotate(-.4deg); } 50% { transform: translateY(-8px) rotate(.5deg); } }
@keyframes preview-wave { 0%,100% { transform: scaleY(.6); opacity: .55; } 50% { transform: scaleY(1.2); opacity: 1; } }

@media (max-width: 1050px) {
  .builder-shell { grid-template-columns: 285px minmax(0, 1fr); gap: 24px; padding-inline: 24px; }
  .sidebar-copy h1 { font-size: 43px; }
  .sidebar-note { display: none; }
  .step-panel { padding-inline: 30px; }
  .review-grid { grid-template-columns: 1fr; }
  .analysis-column { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 780px) {
  body { overflow: auto; }
  .studio-header { height: 64px; padding-inline: 16px; }
  .studio-brand small,
  .draft-status { display: none; }
  .builder-shell { display: block; height: auto; min-height: calc(100dvh - 64px); padding: 14px; overflow: visible; }
  .builder-sidebar { display: none; }
  .builder-card { min-height: calc(100dvh - 92px); border-radius: 20px; }
  .mobile-progress { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 19px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 8px; }
  .mobile-progress > i { flex: 1; height: 3px; overflow: hidden; border-radius: 4px; background: var(--line); }
  .mobile-progress b { display: block; width: 20%; height: 100%; border-radius: inherit; background: var(--rose); transition: width .3s ease; }
  .step-panel { height: auto; min-height: calc(100dvh - 134px); padding: 26px 20px; overflow: visible; }
  .panel-heading { grid-template-columns: 35px 1fr; gap: 12px; }
  .panel-number { width: 34px; height: 34px; }
  .panel-heading h2,
  .preview-heading h2 { font-size: 29px; }
  .multi-drop-zone { min-height: 190px; }
  .review-summary { grid-template-columns: 1fr; }
  .analysis-column { grid-template-columns: 1fr; }
  .interviewer { grid-template-columns: 58px 1fr; gap: 15px; margin-block: 40px 30px; }
  .interviewer-orb { width: 56px; height: 56px; font-size: 20px; }
  .interviewer h2 { font-size: 25px; }
  .visibility-row { grid-template-columns: 34px 1fr; padding-block: 12px; }
  .visibility-row select { grid-column: 2; }
  .agent-preview-card { grid-template-columns: 1fr; }
  .preview-visual { min-height: 250px; }
  .preview-copy { padding: 0 25px 28px; text-align: center; }
  .preview-stats { justify-content: center; flex-wrap: wrap; }
  .next-knowledge { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .studio-actions > a { font-size: 9px; }
  .panel-heading { display: block; }
  .panel-number { margin-bottom: 13px; }
  .panel-actions,
  .end-actions { align-items: stretch; flex-direction: column-reverse; }
  .panel-actions > p { justify-content: center; text-align: center; }
  .primary-action { width: 100%; }
  .action-pair { width: 100%; align-items: stretch; flex-direction: column-reverse; gap: 5px; }
  .interview-topline { align-items: flex-start; gap: 12px; }
  .interview-progress { width: 34%; }
  .preview-heading { display: block; }
  .readiness-score { margin-top: 15px; text-align: left; }
}

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

/* Focused first step: one clear action in the center of the page. */
body[data-current-step="1"] .builder-shell {
  display: block;
  width: min(980px, 100%);
  padding: clamp(22px, 3.5vh, 38px) clamp(18px, 3vw, 32px);
}

body[data-current-step="1"] .builder-sidebar { display: none; }

body[data-current-step="1"] .builder-card {
  width: min(880px, 100%);
  height: 100%;
  margin: 0 auto;
  border-radius: 30px;
  background: rgba(255, 252, 249, .68);
  box-shadow: 0 30px 90px rgba(82, 43, 61, .11), inset 0 1px rgba(255,255,255,.82);
}

body[data-current-step="1"] .mobile-progress { display: none; }

body[data-current-step="1"] [data-step-panel="1"].active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 4vh, 44px) clamp(24px, 5vw, 58px);
}

.compact-journey {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: min(590px, 100%);
  margin: 0 auto clamp(23px, 3.5vh, 38px);
}

.compact-journey span {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  gap: 6px;
  color: #ae9ca3;
}

.compact-journey span[data-back-enabled="true"] {
  cursor: pointer;
  border-radius: 10px;
  transition: color .18s ease, transform .18s ease;
}

.compact-journey span[data-back-enabled="true"]:hover {
  color: var(--ink);
  transform: translateY(-2px);
}

.compact-journey span[data-back-enabled="true"]:hover i {
  box-shadow: 0 6px 14px rgba(69,38,56,.16);
}

.compact-journey span[data-back-enabled="true"]:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 4px;
}

.compact-journey i {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid rgba(113,65,91,.16);
  border-radius: 50%;
  background: rgba(255,255,255,.42);
  font: 600 8px Manrope, sans-serif;
  font-style: normal;
  transition: box-shadow .18s ease;
}

.compact-journey b {
  font: 500 8px "DM Sans", sans-serif;
}

.compact-journey em {
  flex: 1 1 50px;
  height: 1px;
  margin: 12px 8px 0;
  background: rgba(113,65,91,.12);
}

.compact-journey .current { color: var(--ink); }
.compact-journey .current i { border-color: transparent; background: var(--ink); color: #fffaf7; box-shadow: 0 6px 16px rgba(69,38,56,.18); }

.source-intro {
  max-width: 650px;
  margin: 0 auto clamp(21px, 3.2vh, 34px);
  text-align: center;
}

.source-intro h2 {
  margin: 9px 0 9px;
  font: 600 clamp(34px, 4.5vw, 54px)/1.03 Manrope, sans-serif;
  letter-spacing: -.06em;
}

.source-intro > p:last-child {
  max-width: 540px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

body[data-current-step="1"] .source-form {
  width: min(700px, 100%);
  gap: 13px;
}

body[data-current-step="1"] .multi-drop-zone {
  min-height: clamp(210px, 29vh, 285px);
  border-color: rgba(169,85,112,.28);
  border-radius: 23px;
  background:
    radial-gradient(circle at 50% 44%, rgba(255,255,255,.92), transparent 45%),
    linear-gradient(145deg, rgba(245,203,197,.09), rgba(255,255,255,.24));
}

body[data-current-step="1"] .multi-drop-zone strong {
  font-size: 15px;
}

body[data-current-step="1"] .multi-drop-zone p {
  margin: 7px 0 9px;
}

body[data-current-step="1"] .multi-drop-zone p u {
  color: var(--rose);
  font-weight: 600;
  text-decoration: none;
}

body[data-current-step="1"] .upload-mark {
  position: relative;
  width: 47px;
  height: 57px;
  border-radius: 9px 15px 9px 9px;
  font: 700 10px Manrope, sans-serif;
  letter-spacing: .08em;
}

body[data-current-step="1"] .upload-mark::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 13px;
  height: 13px;
  border-radius: 0 10px 0 7px;
  background: rgba(255,255,255,.4);
}

body[data-current-step="1"] .multi-drop-zone.has-files {
  border-style: solid;
  border-color: rgba(145,170,150,.62);
  background:
    radial-gradient(circle at 50% 44%, rgba(255,255,255,.94), transparent 45%),
    linear-gradient(145deg, rgba(145,170,150,.1), rgba(255,255,255,.27));
}

body[data-current-step="1"] .multi-drop-zone.has-files .upload-mark {
  background: linear-gradient(145deg, #8fae95, #5f7e67);
}

.notes-option {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.notes-option summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 43px;
  color: var(--ink-soft);
  font-size: 9px;
  cursor: pointer;
  list-style: none;
}

.notes-option summary::-webkit-details-marker { display: none; }

.notes-option summary i {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--rose);
  font-size: 13px;
  font-style: normal;
  transition: transform .2s ease;
}

.notes-option[open] summary i { transform: rotate(45deg); }
.notes-option .field-label { padding: 3px 0 14px; }

.source-next-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-top: 3px;
}

.source-next-actions .primary-action {
  min-width: 230px;
  border-radius: 999px;
}

.source-next-actions p {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: 8px;
}

.source-next-actions p span { color: var(--sage); font-size: 14px; }

@media (max-width: 780px) {
  body[data-current-step="1"] .builder-shell {
    min-height: calc(100dvh - 64px);
    padding: 12px;
  }

  body[data-current-step="1"] .builder-card {
    min-height: calc(100dvh - 88px);
    border-radius: 22px;
  }

  body[data-current-step="1"] [data-step-panel="1"].active {
    min-height: calc(100dvh - 88px);
    padding: 25px 18px;
  }

  .compact-journey {
    margin-bottom: 27px;
  }

  .compact-journey b { display: none; }
  .compact-journey em { margin-inline: 5px; }
  .source-intro h2 { font-size: 38px; }
  body[data-current-step="1"] .multi-drop-zone { min-height: 230px; }
}

@media (max-height: 760px) and (min-width: 781px) {
  body[data-current-step="1"] [data-step-panel="1"].active { justify-content: flex-start; padding-block: 24px; }
  .compact-journey { margin-bottom: 19px; }
  .source-intro { margin-bottom: 18px; }
  .source-intro h2 { font-size: 39px; }
  body[data-current-step="1"] .multi-drop-zone { min-height: 190px; }
}

/* Step 2: verify extracted identity and create the protected account. */
body[data-current-step="2"] .builder-shell {
  display: block;
  width: min(1040px, 100%);
  padding: clamp(18px, 3vh, 34px) clamp(18px, 3vw, 32px);
}

body[data-current-step="2"] .builder-sidebar { display: none; }

body[data-current-step="2"] .builder-card {
  width: min(940px, 100%);
  height: 100%;
  margin: 0 auto;
  border-radius: 30px;
  background: rgba(255, 252, 249, .72);
}

body[data-current-step="2"] .mobile-progress { display: none; }

body[data-current-step="2"] [data-step-panel="2"].active {
  display: block;
  padding: clamp(22px, 3vh, 36px) clamp(28px, 5vw, 58px);
}

.account-journey { margin-bottom: clamp(18px, 2.5vh, 27px); }
.compact-journey .complete { color: #708a76; }
.compact-journey .complete i { border-color: transparent; background: #91aa96; color: white; }

.account-intro { margin-bottom: 18px; }
.account-intro h2 { font-size: clamp(32px, 4vw, 47px); }

.cv-read-status {
  display: grid;
  grid-template-columns: 35px 1fr auto;
  gap: 11px;
  align-items: center;
  width: min(720px, 100%);
  margin: 0 auto 16px;
  padding: 10px 12px;
  border: 1px solid rgba(145,170,150,.3);
  border-radius: 13px;
  background: rgba(145,170,150,.08);
}

.status-check {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 10px;
  background: #dce9dd;
  color: #65806b;
  font-weight: 700;
}

.cv-read-status > div { display: grid; gap: 2px; }
.cv-read-status strong { font: 600 9px Manrope, sans-serif; }
.cv-read-status small { color: var(--muted); font-size: 8px; }
.cv-read-status button { border: 0; background: transparent; color: var(--rose); font-size: 8px; cursor: pointer; }

.account-form {
  width: min(720px, 100%);
  margin: 0 auto;
}

.account-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.account-headline { grid-column: 1 / -1; }

.verified-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.verified-label small {
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(145,170,150,.13);
  color: #708a76;
  font: 500 7px "DM Sans", sans-serif;
}

.password-shell { position: relative; display: block; }
.password-shell input { padding-right: 57px; }

.password-shell button {
  position: absolute;
  right: 8px;
  top: 50%;
  padding: 5px 7px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--rose);
  font-size: 8px;
  cursor: pointer;
  transform: translateY(-50%);
}

.password-requirements {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 15px;
  margin: 10px 0 13px;
}

.password-requirements span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 7px;
}

.password-requirements i {
  width: 6px;
  height: 6px;
  border: 1px solid rgba(121,73,84,.2);
  border-radius: 50%;
}

.password-requirements .valid { color: #66806b; }
.password-requirements .valid i { border-color: #91aa96; background: #91aa96; }

.extracted-glimpse {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding: 8px 11px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.extracted-glimpse > div:first-child { display: grid; flex: 0 0 auto; gap: 2px; }
.extracted-glimpse > div:first-child span { color: var(--muted); font-size: 7px; text-transform: uppercase; letter-spacing: .08em; }
.extracted-glimpse > div:first-child strong { max-width: 250px; overflow: hidden; font: 600 8px Manrope, sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.extracted-glimpse .detected-chips { flex: 1; justify-content: flex-end; }
.extracted-glimpse .detected-chips span:nth-child(n+6) { display: none; }

.ownership-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 13px 0;
  color: var(--ink-soft);
  font-size: 8px;
  line-height: 1.45;
  cursor: pointer;
}

.ownership-check input { flex: 0 0 auto; width: 14px; height: 14px; margin: 0; accent-color: var(--plum); }

.account-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.password-privacy {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 7px;
}

.password-privacy span { color: var(--sage); font-size: 13px; }

.account-form.account-created .password-field,
.account-form.account-created .password-requirements,
.account-form.account-created .ownership-check { display: none; }

.account-form.account-created .account-fields { grid-template-columns: 1fr 1fr; }
.account-form.account-created .account-headline { grid-column: 1 / -1; }

@media (max-width: 780px) {
  body[data-current-step="2"] .builder-shell { min-height: calc(100dvh - 64px); padding: 12px; }
  body[data-current-step="2"] .builder-card { min-height: calc(100dvh - 88px); border-radius: 22px; }
  body[data-current-step="2"] [data-step-panel="2"].active { min-height: calc(100dvh - 88px); padding: 24px 18px; }
  .account-fields { grid-template-columns: 1fr; }
  .account-headline { grid-column: auto; }
  .extracted-glimpse { align-items: flex-start; flex-direction: column; }
  .extracted-glimpse .detected-chips { justify-content: flex-start; }
}

@media (max-width: 520px) {
  .cv-read-status { grid-template-columns: 32px 1fr; }
  .cv-read-status button { grid-column: 2; justify-self: start; padding: 0; }
  .account-actions { align-items: stretch; flex-direction: column-reverse; }
  .account-actions .primary-action { width: 100%; }
}

/* Step 3: a focused question at a time, consistent with the first two steps. */
body[data-current-step="3"] .builder-shell {
  display: block;
  width: min(1040px, 100%);
  padding: clamp(18px, 3vh, 34px) clamp(18px, 3vw, 32px);
}

body[data-current-step="3"] .builder-sidebar { display: none; }

body[data-current-step="3"] .builder-card {
  width: min(940px, 100%);
  height: 100%;
  margin: 0 auto;
  border-radius: 30px;
  background: rgba(255, 252, 249, .72);
}

body[data-current-step="3"] .mobile-progress { display: none; }

body[data-current-step="3"] [data-step-panel="3"].active {
  display: flex;
  flex-direction: column;
  padding: clamp(22px, 3vh, 36px) clamp(28px, 5vw, 58px);
}

.interview-journey {
  flex: 0 0 auto;
  margin-bottom: clamp(24px, 3.5vh, 38px);
}

body[data-current-step="3"] .interview-topline {
  flex: 0 0 auto;
  width: min(760px, 100%);
  margin: 0 auto;
}

body[data-current-step="3"] .interviewer {
  flex: 0 0 auto;
  grid-template-columns: 68px 1fr;
  gap: 21px;
  width: min(760px, 100%);
  margin: clamp(27px, 4.5vh, 48px) auto clamp(22px, 3.5vh, 36px);
}

body[data-current-step="3"] .interviewer-orb {
  width: 64px;
  height: 64px;
  font-size: 23px;
}

body[data-current-step="3"] .interviewer h2 {
  max-width: 680px;
  font-size: clamp(28px, 3.3vw, 42px);
}

body[data-current-step="3"] .answer-field {
  width: min(760px, 100%);
}

body[data-current-step="3"] .answer-field textarea {
  min-height: clamp(175px, 24vh, 225px);
  border-radius: 17px;
  background: rgba(255,255,255,.58);
}

body[data-current-step="3"] .interview-tip {
  width: min(760px, 100%);
}

body[data-current-step="3"] .interview-panel > .end-actions {
  width: min(760px, 100%);
  margin: clamp(20px, 3.5vh, 36px) auto 0;
}

@media (max-width: 780px) {
  body[data-current-step="3"] .builder-shell { min-height: calc(100dvh - 64px); padding: 12px; }
  body[data-current-step="3"] .builder-card { min-height: calc(100dvh - 88px); border-radius: 22px; }
  body[data-current-step="3"] [data-step-panel="3"].active { min-height: calc(100dvh - 88px); padding: 24px 18px; }
  .interview-journey { margin-bottom: 28px; }
  body[data-current-step="3"] .interviewer { grid-template-columns: 56px 1fr; gap: 15px; margin-block: 31px 26px; }
  body[data-current-step="3"] .interviewer-orb { width: 54px; height: 54px; font-size: 19px; }
  body[data-current-step="3"] .interviewer h2 { font-size: clamp(25px, 7vw, 33px); }
}

@media (max-width: 520px) {
  body[data-current-step="3"] .interviewer { display: block; text-align: center; }
  body[data-current-step="3"] .interviewer-orb { margin: 0 auto 16px; }
  body[data-current-step="3"] .interview-topline > div:first-child { align-items: flex-start; flex-direction: column; gap: 4px; }
  body[data-current-step="3"] .interview-panel > .end-actions { align-items: stretch; }
}

@media (max-height: 760px) and (min-width: 781px) {
  body[data-current-step="3"] [data-step-panel="3"].active { padding-block: 20px; }
  .interview-journey { margin-bottom: 18px; }
  body[data-current-step="3"] .interviewer { margin-block: 22px 18px; }
  body[data-current-step="3"] .answer-field textarea { min-height: 150px; }
  body[data-current-step="3"] .interview-panel > .end-actions { margin-top: 17px; }
}

/* Steps 4–6 keep the same focused, centered visual language. */
body[data-current-step="4"] .builder-shell,
body[data-current-step="5"] .builder-shell,
body[data-current-step="6"] .builder-shell {
  display: block;
  width: min(1040px, 100%);
  padding: clamp(18px, 3vh, 34px) clamp(18px, 3vw, 32px);
}

body[data-current-step="4"] .builder-sidebar,
body[data-current-step="5"] .builder-sidebar,
body[data-current-step="6"] .builder-sidebar { display: none; }

body[data-current-step="4"] .builder-card,
body[data-current-step="5"] .builder-card,
body[data-current-step="6"] .builder-card {
  width: min(940px, 100%);
  height: 100%;
  margin: 0 auto;
  border-radius: 30px;
  background: rgba(255, 252, 249, .72);
}

body[data-current-step="4"] .mobile-progress,
body[data-current-step="5"] .mobile-progress,
body[data-current-step="6"] .mobile-progress { display: none; }

body[data-current-step="4"] [data-step-panel="4"].active,
body[data-current-step="5"] [data-step-panel="5"].active,
body[data-current-step="6"] [data-step-panel="6"].active {
  padding: clamp(22px, 3vh, 36px) clamp(28px, 5vw, 58px);
}

.evidence-journey,
.privacy-journey,
.preview-journey { margin-bottom: clamp(20px, 3vh, 32px); }

.evidence-intro,
.privacy-intro { margin-bottom: 20px; }

.evidence-intro h2,
.privacy-intro h2 { font-size: clamp(32px, 4vw, 47px); }

.evidence-form,
.privacy-panel > .visibility-list,
.privacy-panel > .boundary-field,
.privacy-panel > .end-actions {
  width: min(760px, 100%);
  margin-inline: auto;
}

.evidence-drop-zone {
  display: grid;
  place-items: center;
  min-height: clamp(205px, 27vh, 270px);
  padding: 25px;
  border: 1px dashed rgba(169,85,112,.3);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 44%, rgba(255,255,255,.92), transparent 46%),
    linear-gradient(145deg, rgba(245,203,197,.09), rgba(255,255,255,.24));
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s;
}

.evidence-drop-zone:hover,
.evidence-drop-zone.dragging {
  border-color: var(--rose);
  transform: translateY(-2px);
}

.evidence-drop-zone.has-files { border-style: solid; border-color: rgba(145,170,150,.62); }
.evidence-drop-zone input { display: none; }
.evidence-drop-zone strong { font: 600 14px Manrope, sans-serif; }
.evidence-drop-zone p { margin: 7px 0 9px; color: var(--muted); font-size: 10px; }
.evidence-drop-zone p u { color: var(--rose); font-weight: 600; text-decoration: none; }
.evidence-drop-zone small { color: var(--muted); font-size: 9px; }

.evidence-mark {
  display: grid;
  place-items: center;
  width: 49px;
  height: 49px;
  margin-bottom: 12px;
  border-radius: 16px;
  background: linear-gradient(145deg, #ae7088, #71415b);
  box-shadow: 0 13px 30px rgba(113,65,91,.2);
  color: white;
  font-size: 25px;
}

.evidence-selected-files { margin-top: 10px; }
.evidence-actions { margin-top: 18px; }

.privacy-panel .visibility-row { min-height: 64px; }
.privacy-panel .boundary-field { display: block; margin-top: 18px; }
.privacy-panel > .end-actions { margin-top: 18px; }

.floating-theme-picker {
  position: fixed;
  z-index: 90;
  right: 24px;
  bottom: 22px;
  --picker-a: #4a293b;
  --picker-b: #a95772;
  --picker-c: #f5cbc5;
}

.floating-theme-picker[data-theme="ocean"] { --picker-a: #183448; --picker-b: #2f7fa3; --picker-c: #b7dfeb; }
.floating-theme-picker[data-theme="forest"] { --picker-a: #244233; --picker-b: #4d8062; --picker-c: #cbe2c9; }
.floating-theme-picker[data-theme="violet"] { --picker-a: #3e2d52; --picker-b: #7652a3; --picker-c: #d8c6ea; }
.floating-theme-picker[data-theme="sunset"] { --picker-a: #573328; --picker-b: #c46f48; --picker-c: #ffd1b5; }
.floating-theme-picker[data-theme="midnight"] { --picker-a: #111827; --picker-b: #526dce; --picker-c: #7ed5cf; }

.theme-picker-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 8px 12px 8px 8px;
  border: 1px solid rgba(74,41,59,.15);
  border-radius: 999px;
  background: rgba(255,253,250,.88);
  box-shadow: 0 14px 38px rgba(74,41,59,.16);
  color: var(--ink);
  cursor: pointer;
  backdrop-filter: blur(14px);
}

.current-theme-colors { display: flex; width: 42px; height: 25px; overflow: hidden; border-radius: 999px; }
.current-theme-colors i { flex: 1; }
.current-theme-colors i:nth-child(1) { background: var(--picker-a); }
.current-theme-colors i:nth-child(2) { background: var(--picker-b); }
.current-theme-colors i:nth-child(3) { background: var(--picker-c); }
.theme-picker-toggle b { font: 600 9px Manrope, sans-serif; }
.floating-theme-picker + .toast { right: 24px; bottom: 82px; }

.floating-theme-picker fieldset {
  position: absolute;
  right: 0;
  bottom: 54px;
  width: 322px;
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(74,41,59,.13);
  border-radius: 19px;
  background: rgba(255,252,249,.96);
  box-shadow: 0 24px 70px rgba(74,41,59,.18);
  backdrop-filter: blur(18px);
}

.floating-theme-picker fieldset[hidden] { display: none; }
.floating-theme-picker legend { padding: 0; color: var(--ink); font: 600 12px Manrope, sans-serif; }
.floating-theme-picker fieldset > p { margin: 4px 0 12px; color: var(--muted); font-size: 9px; }
.theme-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.theme-option {
  position: relative;
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,.35);
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}

.theme-option:hover { transform: translateY(-2px); }
.theme-option:has(input:checked) { border-color: var(--plum); box-shadow: 0 0 0 2px rgba(169,85,112,.14); }
.theme-option input { position: absolute; opacity: 0; pointer-events: none; }
.theme-option > span { display: flex; height: 27px; overflow: hidden; border-radius: 8px; }
.theme-option i { flex: 1; }
.theme-option b { color: var(--ink-soft); font: 600 8px Manrope, sans-serif; text-align: center; }
.theme-rose i:nth-child(1) { background: #4a293b; } .theme-rose i:nth-child(2) { background: #a95772; } .theme-rose i:nth-child(3) { background: #f5cbc5; }
.theme-ocean i:nth-child(1) { background: #183448; } .theme-ocean i:nth-child(2) { background: #2f7fa3; } .theme-ocean i:nth-child(3) { background: #b7dfeb; }
.theme-forest i:nth-child(1) { background: #244233; } .theme-forest i:nth-child(2) { background: #4d8062; } .theme-forest i:nth-child(3) { background: #cbe2c9; }
.theme-violet i:nth-child(1) { background: #3e2d52; } .theme-violet i:nth-child(2) { background: #7652a3; } .theme-violet i:nth-child(3) { background: #d8c6ea; }
.theme-sunset i:nth-child(1) { background: #573328; } .theme-sunset i:nth-child(2) { background: #c46f48; } .theme-sunset i:nth-child(3) { background: #ffd1b5; }
.theme-midnight i:nth-child(1) { background: #111827; } .theme-midnight i:nth-child(2) { background: #526dce; } .theme-midnight i:nth-child(3) { background: #7ed5cf; }

.preview-panel .preview-heading,
.preview-panel .agent-preview-card,
.preview-panel .next-knowledge,
.preview-panel .prototype-note,
.preview-panel > .end-actions {
  width: min(800px, 100%);
  margin-inline: auto;
}

@media (max-width: 780px) {
  body[data-current-step="4"] .builder-shell,
  body[data-current-step="5"] .builder-shell,
  body[data-current-step="6"] .builder-shell { min-height: calc(100dvh - 64px); padding: 12px; }

  body[data-current-step="4"] .builder-card,
  body[data-current-step="5"] .builder-card,
  body[data-current-step="6"] .builder-card { min-height: calc(100dvh - 88px); border-radius: 22px; }

  body[data-current-step="4"] [data-step-panel="4"].active,
  body[data-current-step="5"] [data-step-panel="5"].active,
  body[data-current-step="6"] [data-step-panel="6"].active {
    min-height: calc(100dvh - 88px);
    padding: 24px 18px;
  }

  .evidence-drop-zone { min-height: 220px; }
  .floating-theme-picker { right: 14px; bottom: 14px; }
  .floating-theme-picker fieldset { width: min(322px, calc(100vw - 28px)); }
  .floating-theme-picker + .toast { right: 14px; bottom: 72px; }
}

/* Step 6 is the product itself: a direct, full conversation preview. */
body[data-current-step="6"] .studio-header { display: none; }

body[data-current-step="6"] .builder-shell {
  width: min(1220px, 100%);
  height: 100vh;
  height: 100dvh;
  padding: clamp(12px, 2vw, 24px);
}

body[data-current-step="6"] .builder-card {
  width: 100%;
  height: 100%;
  border-radius: 28px;
}

body[data-current-step="6"] [data-step-panel="6"].active {
  height: 100%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.preview-portal {
  position: relative;
  display: grid;
  place-items: center;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 43%, rgba(255,255,255,.95), transparent 24%),
    radial-gradient(circle at 18% 18%, rgba(245,203,197,.66), transparent 30%),
    radial-gradient(circle at 84% 76%, rgba(221,184,111,.27), transparent 31%),
    linear-gradient(145deg, #fff9f5, #f9e8e4 52%, #f5ded9);
}

.preview-portal::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .13;
  background-image:
    linear-gradient(rgba(121,73,84,.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(121,73,84,.1) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle, black, transparent 68%);
}

.preview-portal-back {
  position: absolute;
  z-index: 5;
  left: 24px;
  top: 22px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.42);
  color: var(--ink-soft);
  font-size: 9px;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.preview-portal-entry {
  position: relative;
  width: min(72vw, 620px);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  outline: 0;
  background: transparent;
  color: var(--plum);
  cursor: pointer;
}

.preview-portal-ring {
  position: absolute;
  left: 50%;
  top: 44%;
  border: 1px solid rgba(201,111,87,.22);
  border-radius: 50%;
  pointer-events: none;
  transition: transform .65s ease, border-color .65s ease;
}

.preview-portal-ring.ring-one { width: 78%; height: 78%; transform: translate(-50%,-50%) rotate(-5deg); animation: portal-ring-one 12s ease-in-out infinite alternate; }
.preview-portal-ring.ring-two { width: 62%; height: 69%; border-color: rgba(221,184,111,.32); transform: translate(-50%,-50%) rotate(10deg); animation: portal-ring-two 10s ease-in-out infinite alternate; }

.preview-portal-orb {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 43%;
  display: grid;
  place-items: center;
  width: 43%;
  aspect-ratio: 1;
  border: 5px solid rgba(255,253,249,.92);
  border-radius: 44% 56% 52% 48% / 51% 45% 55% 49%;
  background:
    radial-gradient(circle at 32% 24%, rgba(255,255,255,.55), transparent 15%),
    linear-gradient(145deg, #b87590, #75405f 55%, #3b2538);
  box-shadow: inset -18px -20px 55px rgba(45,24,37,.24), 0 30px 80px rgba(107,55,65,.22), 0 0 90px rgba(255,255,255,.7);
  color: white;
  transform: translate(-50%,-50%);
  animation: portal-float 5.6s ease-in-out infinite;
  transition: box-shadow .5s ease;
}

.preview-portal-orb strong { font: 600 clamp(56px, 8vw, 88px) Manrope, sans-serif; }
.preview-portal-orb i { position: absolute; right: 9%; bottom: 11%; width: 14px; height: 14px; border: 3px solid #fffaf7; border-radius: 50%; background: var(--sage); }

.preview-portal-copy {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 3%;
  display: grid;
  gap: 8px;
  width: max-content;
  transform: translateX(-50%);
  text-align: center;
  transition: transform .3s ease;
}

.preview-portal-copy strong { font: 700 clamp(23px, 3vw, 34px) Manrope, sans-serif; letter-spacing: -.045em; }
.preview-portal-copy small { color: rgba(121,73,84,.62); font-size: 9px; letter-spacing: .15em; text-transform: uppercase; }
.preview-portal-copy b { color: var(--rose); font-size: 14px; }
.preview-portal-label { position: absolute; right: 24px; top: 25px; color: rgba(121,73,84,.52); font: 600 8px Manrope, sans-serif; letter-spacing: .16em; }

.preview-portal-entry:hover .preview-portal-orb,
.preview-portal-entry:focus-visible .preview-portal-orb { box-shadow: inset -18px -20px 55px rgba(45,24,37,.2), 0 36px 95px rgba(107,55,65,.28), 0 0 115px rgba(255,255,255,.9); }
.preview-portal-entry:hover .ring-one,
.preview-portal-entry:focus-visible .ring-one { border-color: rgba(201,111,87,.52); }
.preview-portal-entry:hover .preview-portal-copy { transform: translateX(-50%) translateY(-5px); }

@keyframes portal-float { 0%,100% { transform: translate(-50%,-50%) translateY(0); } 50% { transform: translate(-50%,-50%) translateY(-8px); } }
@keyframes portal-ring-one { to { transform: translate(-50%,-50%) scale(1.025) rotate(8deg); } }
@keyframes portal-ring-two { to { transform: translate(-50%,-50%) scale(.98) rotate(-7deg); } }

.preview-chat-app {
  display: none;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background:
    radial-gradient(circle at 92% 0%, rgba(231,161,159,.2), transparent 28%),
    linear-gradient(145deg, rgba(255,253,250,.96), rgba(250,240,235,.94));
}

.preview-chat-header {
  display: grid;
  grid-template-columns: 38px 48px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  flex: 0 0 78px;
  padding: 0 clamp(18px, 3vw, 34px);
  border-bottom: 1px solid var(--line);
  background: rgba(255,252,249,.65);
  backdrop-filter: blur(16px);
}

.live-preview-panel.chat-open .preview-portal { display: none; }
.live-preview-panel.chat-open .preview-chat-app { display: flex; animation: panel-in .4s ease; }

.preview-back {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255,255,255,.45);
  color: var(--ink-soft);
  cursor: pointer;
}

.preview-back:hover { border-color: var(--plum); color: var(--plum); }

.preview-agent-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 43% 57% 52% 48% / 51% 45% 55% 49%;
  background: linear-gradient(145deg, #aa6983, #75405f 55%, #3b2538);
  box-shadow: 0 8px 22px rgba(107,55,65,.2);
  color: white;
  font: 600 17px Manrope, sans-serif;
}

.preview-agent-avatar i {
  position: absolute;
  right: 0;
  bottom: 2px;
  width: 10px;
  height: 10px;
  border: 2px solid #fffaf7;
  border-radius: 50%;
  background: var(--sage);
}

.preview-agent-identity { min-width: 0; }
.preview-agent-identity h2 { margin: 0 0 4px; font: 600 14px Manrope, sans-serif; }
.preview-agent-identity p { display: flex; align-items: center; gap: 7px; margin: 0; color: var(--muted); font-size: 9px; }
.preview-agent-identity p i { width: 5px; height: 5px; border-radius: 50%; background: var(--sage); }
.preview-agent-identity p span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.preview-mode-badge {
  padding: 7px 11px;
  border: 1px solid rgba(169,85,112,.15);
  border-radius: 999px;
  background: rgba(245,203,197,.22);
  color: var(--rose);
  font: 600 8px Manrope, sans-serif;
  text-transform: uppercase;
  letter-spacing: .09em;
}

.preview-chat-actions { display: flex; align-items: center; gap: 8px; }

.preview-clear {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.4);
  color: var(--muted);
  font-size: 8px;
  cursor: pointer;
}

.preview-clear:hover { border-color: var(--plum); color: var(--plum); }

.preview-chat-messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: clamp(30px, 5vh, 62px) clamp(22px, 7vw, 92px) 28px;
  scroll-behavior: smooth;
}

.preview-message {
  width: min(78%, 720px);
  margin-bottom: 22px;
  animation: message-in .3s ease;
}

.preview-message.user { margin-left: auto; }
.preview-message-label { margin: 0 0 7px 11px; color: var(--muted); font-size: 8px; letter-spacing: .14em; }
.preview-message.user .preview-message-label { margin-right: 11px; text-align: right; }

.preview-message-bubble {
  padding: 17px 20px;
  border: 1px solid var(--line);
  border-radius: 6px 21px 21px 21px;
  background: rgba(255,253,249,.88);
  box-shadow: 0 12px 34px rgba(74,41,59,.045);
  font-size: clamp(13px, 1.2vw, 16px);
  line-height: 1.62;
  white-space: pre-wrap;
}

.preview-message.user .preview-message-bubble {
  border-color: var(--plum);
  border-radius: 21px 6px 21px 21px;
  background: var(--plum);
  color: #fffaf7;
}

.preview-suggestions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  width: min(100%, 820px);
  margin: 35px auto 0;
}

.preview-suggestions button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 57px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,.34);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.preview-suggestions button:hover { border-color: var(--plum); background: var(--blush); transform: translateY(-2px); }
.preview-suggestions span { font: 500 10px Manrope, sans-serif; }
.preview-suggestions b { color: var(--rose); font-size: 15px; }

.preview-chat-composer {
  flex: 0 0 auto;
  padding: 15px clamp(22px, 7vw, 92px) 19px;
  border-top: 1px solid var(--line);
  background: rgba(250,240,235,.88);
}

.preview-input-shell {
  display: grid;
  grid-template-columns: 1fr 50px;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,253,249,.9);
  box-shadow: 0 15px 45px rgba(74,41,59,.08);
}

.preview-input-shell:focus-within { border-color: var(--plum); box-shadow: 0 0 0 3px rgba(231,161,159,.24), 0 15px 45px rgba(74,41,59,.08); }
.preview-input-shell textarea { min-height: 50px; max-height: 130px; padding: 14px 12px; resize: none; border: 0; background: transparent; box-shadow: none; font-size: 14px; }
.preview-input-shell textarea:focus { box-shadow: none; }

.preview-input-shell button {
  align-self: end;
  width: 50px;
  height: 50px;
  padding: 0;
  border: 0;
  border-radius: 13px;
  background: var(--rose);
  color: var(--plum);
  font-size: 21px;
  cursor: pointer;
}

.preview-input-shell button:hover { background: var(--plum); color: var(--blush); }
.preview-chat-composer > p { margin: 8px 0 0; color: var(--muted); font-size: 8px; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 700px) {
  body[data-current-step="6"] .builder-shell { padding: 0; }
  body[data-current-step="6"] .builder-card { border: 0; border-radius: 0; }
  .preview-chat-header { grid-template-columns: 34px 42px minmax(0, 1fr); gap: 10px; padding-inline: 14px; }
  .preview-agent-avatar { width: 41px; height: 41px; }
  .preview-mode-badge { display: none; }
  .preview-chat-messages { padding: 25px 14px 20px; }
  .preview-message { width: 92%; }
  .preview-suggestions { grid-template-columns: 1fr; margin-top: 24px; }
  .preview-suggestions button { min-height: 48px; }
  .preview-chat-composer { padding: 11px 14px 13px; }
  .preview-portal-entry { width: min(112vw, 570px); }
  .preview-portal-orb { width: 46%; }
  .preview-portal-back { left: 14px; top: 14px; }
  .preview-portal-label { display: none; }
  .preview-portal-copy { bottom: 8%; }
}

/* Step 6 belongs to the private studio. It publishes a separate visitor URL. */
body[data-current-step="6"] .studio-header { display: flex; }

body[data-current-step="6"] .builder-shell {
  width: min(100%, 1180px);
  height: auto;
  min-height: calc(100vh - 70px);
  min-height: calc(100dvh - 70px);
  padding: clamp(18px, 4vw, 54px) clamp(16px, 4vw, 48px);
}

body[data-current-step="6"] .builder-card {
  width: 100%;
  height: auto;
  min-height: min(780px, calc(100vh - 120px));
  border-radius: 28px;
}

body[data-current-step="6"] [data-step-panel="6"].active {
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: min(780px, calc(100vh - 120px));
  padding: clamp(28px, 5vw, 62px);
  overflow: auto;
}

.share-panel {
  background:
    radial-gradient(circle at 50% 42%, rgba(255,255,255,.94), transparent 32%),
    radial-gradient(circle at 12% 12%, rgba(245,203,197,.32), transparent 31%),
    linear-gradient(145deg, rgba(255,253,250,.95), rgba(250,240,235,.92));
}

.share-ready {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(100%, 760px);
  margin: 0 auto;
  text-align: center;
}

.share-ready-mark {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 24px;
  padding: 8px 13px;
  border: 1px solid rgba(113,153,125,.25);
  border-radius: 999px;
  background: rgba(225,239,227,.65);
  color: #5b7d64;
  font: 600 9px Manrope, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.share-ready-mark i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 4px rgba(113,153,125,.12);
}

.share-ready h2 {
  max-width: 690px;
  margin: 8px 0 16px;
  color: var(--plum);
  font: 600 clamp(34px, 5.5vw, 64px)/1.04 Manrope, sans-serif;
  letter-spacing: -.055em;
}

.share-ready > p:not(.eyebrow) {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.share-link-shell {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: min(100%, 680px);
  margin: 38px 0 22px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255,255,255,.76);
  box-shadow: 0 22px 65px rgba(74,41,59,.09);
}

.share-link-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--blush);
  color: var(--rose);
  font-size: 18px;
}

.share-link-shell input {
  min-width: 0;
  padding: 10px 4px;
  overflow: hidden;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink-soft);
  font: 500 12px DM Sans, sans-serif;
  text-overflow: ellipsis;
}

.share-link-shell input:focus { box-shadow: none; }

.share-link-shell button {
  padding: 13px 19px;
  border: 0;
  border-radius: 11px;
  background: var(--plum);
  color: #fffaf7;
  font: 600 10px Manrope, sans-serif;
  cursor: pointer;
}

.share-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.share-actions .primary-action { text-decoration: none; }
.share-note { margin-top: 28px; color: var(--muted); font-size: 9px; }

@media (max-width: 700px) {
  body[data-current-step="6"] .builder-shell { padding: 0; }
  body[data-current-step="6"] .builder-card { min-height: calc(100dvh - 58px); border-radius: 0; }
  body[data-current-step="6"] [data-step-panel="6"].active { min-height: calc(100dvh - 58px); padding: 22px 16px 30px; }
  .share-journey { margin-bottom: 34px; }
  .share-ready h2 { font-size: 38px; }
  .share-link-shell { grid-template-columns: 38px minmax(0, 1fr); }
  .share-link-icon { width: 38px; height: 38px; }
  .share-link-shell button { grid-column: 1 / -1; width: 100%; }
  .share-actions { flex-direction: column-reverse; }
  .share-actions > * { justify-content: center; width: 100%; }
}

/* The owner's studio follows the same palette as the published profile. */
body[data-studio-theme] {
  --ink: var(--studio-ink);
  --ink-soft: var(--studio-ink-soft);
  --muted: var(--studio-muted);
  --paper: var(--studio-paper);
  --panel: var(--studio-panel);
  --rose: var(--studio-accent);
  --rose-soft: var(--studio-accent-soft);
  --plum: var(--studio-strong);
  --gold: var(--studio-gold);
  --sage: var(--studio-sage);
  --line: var(--studio-line);
  --blush: var(--studio-accent-wash);
  --shadow: 0 28px 80px var(--studio-shadow);
  color-scheme: light;
  background:
    radial-gradient(circle at 15% 12%, var(--studio-glow-a), transparent 28%),
    radial-gradient(circle at 91% 84%, var(--studio-glow-b), transparent 27%),
    linear-gradient(145deg, var(--studio-bg-a) 0%, var(--studio-bg-b) 54%, var(--studio-bg-c) 100%);
  transition: color .35s ease, background .45s ease;
}

body[data-studio-theme="rose"] {
  --studio-ink: #452638;
  --studio-ink-soft: #755565;
  --studio-muted: #8d7881;
  --studio-paper: #fffaf7;
  --studio-panel: rgba(255,252,249,.8);
  --studio-card: rgba(255,255,255,.5);
  --studio-header: rgba(255,250,247,.45);
  --studio-accent: #c96f76;
  --studio-accent-soft: #f3c5c0;
  --studio-accent-wash: #f7e3df;
  --studio-strong: #71415b;
  --studio-gold: #ddb86f;
  --studio-sage: #91aa96;
  --studio-line: rgba(91,50,70,.13);
  --studio-shadow: rgba(82,43,61,.12);
  --studio-glow-a: rgba(245,203,197,.72);
  --studio-glow-b: rgba(221,184,111,.28);
  --studio-bg-a: #fffaf7;
  --studio-bg-b: #f9e8e4;
  --studio-bg-c: #f5ded9;
  --studio-button-text: #fffaf7;
}

body[data-studio-theme="ocean"] {
  --studio-ink: #183448;
  --studio-ink-soft: #3e6273;
  --studio-muted: #6f8792;
  --studio-paper: #f8fdff;
  --studio-panel: rgba(248,253,255,.82);
  --studio-card: rgba(255,255,255,.55);
  --studio-header: rgba(242,251,254,.5);
  --studio-accent: #2f7fa3;
  --studio-accent-soft: #b7dfeb;
  --studio-accent-wash: #dceff4;
  --studio-strong: #214e68;
  --studio-gold: #d6ae62;
  --studio-sage: #71a49b;
  --studio-line: rgba(24,52,72,.13);
  --studio-shadow: rgba(27,70,91,.13);
  --studio-glow-a: rgba(183,223,235,.74);
  --studio-glow-b: rgba(126,213,207,.25);
  --studio-bg-a: #f8fdff;
  --studio-bg-b: #e3f2f7;
  --studio-bg-c: #d7eaf1;
  --studio-button-text: #f8fdff;
}

body[data-studio-theme="forest"] {
  --studio-ink: #244233;
  --studio-ink-soft: #526c5d;
  --studio-muted: #74877a;
  --studio-paper: #fbfdf8;
  --studio-panel: rgba(251,253,248,.82);
  --studio-card: rgba(255,255,255,.52);
  --studio-header: rgba(248,252,245,.5);
  --studio-accent: #4d8062;
  --studio-accent-soft: #cbe2c9;
  --studio-accent-wash: #e2efe0;
  --studio-strong: #315d45;
  --studio-gold: #c9a85e;
  --studio-sage: #73a17e;
  --studio-line: rgba(36,66,51,.13);
  --studio-shadow: rgba(45,77,57,.13);
  --studio-glow-a: rgba(203,226,201,.76);
  --studio-glow-b: rgba(218,190,112,.22);
  --studio-bg-a: #fbfdf8;
  --studio-bg-b: #e6f1e2;
  --studio-bg-c: #dbe9d7;
  --studio-button-text: #fbfdf8;
}

body[data-studio-theme="violet"] {
  --studio-ink: #3e2d52;
  --studio-ink-soft: #665578;
  --studio-muted: #82748f;
  --studio-paper: #fdfaff;
  --studio-panel: rgba(253,250,255,.82);
  --studio-card: rgba(255,255,255,.52);
  --studio-header: rgba(251,247,255,.5);
  --studio-accent: #7652a3;
  --studio-accent-soft: #d8c6ea;
  --studio-accent-wash: #ebe1f4;
  --studio-strong: #553a76;
  --studio-gold: #d3ad63;
  --studio-sage: #859f8a;
  --studio-line: rgba(62,45,82,.13);
  --studio-shadow: rgba(62,40,85,.14);
  --studio-glow-a: rgba(216,198,234,.76);
  --studio-glow-b: rgba(210,173,99,.22);
  --studio-bg-a: #fdfaff;
  --studio-bg-b: #eee4f6;
  --studio-bg-c: #e4d7ef;
  --studio-button-text: #fdfaff;
}

body[data-studio-theme="sunset"] {
  --studio-ink: #573328;
  --studio-ink-soft: #79594e;
  --studio-muted: #91786e;
  --studio-paper: #fffaf5;
  --studio-panel: rgba(255,250,245,.82);
  --studio-card: rgba(255,255,255,.5);
  --studio-header: rgba(255,248,242,.5);
  --studio-accent: #c46f48;
  --studio-accent-soft: #ffd1b5;
  --studio-accent-wash: #ffe6d7;
  --studio-strong: #87472f;
  --studio-gold: #d8a54f;
  --studio-sage: #8fa17b;
  --studio-line: rgba(87,51,40,.13);
  --studio-shadow: rgba(112,58,38,.13);
  --studio-glow-a: rgba(255,209,181,.78);
  --studio-glow-b: rgba(233,166,95,.24);
  --studio-bg-a: #fffaf5;
  --studio-bg-b: #ffe7d8;
  --studio-bg-c: #f9d7c4;
  --studio-button-text: #fffaf5;
}

body[data-studio-theme="midnight"] {
  --studio-ink: #edf2ff;
  --studio-ink-soft: #c4cee3;
  --studio-muted: #9ba8c1;
  --studio-paper: #111827;
  --studio-panel: rgba(24,34,55,.84);
  --studio-card: rgba(29,40,63,.78);
  --studio-header: rgba(15,23,39,.68);
  --studio-accent: #7ed5cf;
  --studio-accent-soft: #a9e5df;
  --studio-accent-wash: #253b4b;
  --studio-strong: #526dce;
  --studio-gold: #e1bd6d;
  --studio-sage: #7fc29c;
  --studio-line: rgba(225,233,255,.14);
  --studio-shadow: rgba(0,0,0,.34);
  --studio-glow-a: rgba(82,109,206,.25);
  --studio-glow-b: rgba(126,213,207,.13);
  --studio-bg-a: #182238;
  --studio-bg-b: #121a2b;
  --studio-bg-c: #0d1422;
  --studio-button-text: #f5f7ff;
  color-scheme: dark;
}

body[data-studio-theme]::before {
  background-image:
    linear-gradient(var(--studio-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--studio-line) 1px, transparent 1px);
}

body[data-studio-theme] .studio-header { background: var(--studio-header); }
body[data-studio-theme] .builder-card { border-color: var(--studio-line); background: var(--studio-panel); }
body[data-studio-theme] .sidebar-note,
body[data-studio-theme] .review-summary article,
body[data-studio-theme] .next-knowledge article,
body[data-studio-theme] .visibility-row,
body[data-studio-theme] .file-pill,
body[data-studio-theme] .cv-read-status,
body[data-studio-theme] .account-form input,
body[data-studio-theme] input,
body[data-studio-theme] textarea,
body[data-studio-theme] select { border-color: var(--studio-line); background-color: var(--studio-card); color: var(--studio-ink); }

body[data-studio-theme] textarea::placeholder,
body[data-studio-theme] input::placeholder { color: var(--studio-muted); }

body[data-studio-theme] .multi-drop-zone,
body[data-studio-theme] .evidence-drop-zone {
  border-color: color-mix(in srgb, var(--studio-accent) 44%, transparent);
  background:
    radial-gradient(circle at center, color-mix(in srgb, var(--studio-accent-soft) 38%, transparent), transparent 44%),
    var(--studio-card);
}

body[data-studio-theme] .studio-logo,
body[data-studio-theme] .upload-mark,
body[data-studio-theme] .evidence-mark,
body[data-studio-theme] .interviewer-orb,
body[data-studio-theme] .preview-orb,
body[data-studio-theme] .preview-agent-avatar {
  background: radial-gradient(circle at 31% 24%, rgba(255,255,255,.42), transparent 15%), linear-gradient(145deg, var(--studio-accent), var(--studio-strong));
  color: var(--studio-button-text);
}

body[data-studio-theme] .primary-action,
body[data-studio-theme] .compact-journey .current i,
body[data-studio-theme] .share-link-shell button {
  background: var(--studio-strong);
  color: var(--studio-button-text);
}

body[data-studio-theme] .eyebrow,
body[data-studio-theme] .preview-copy > span,
body[data-studio-theme] .sidebar-copy h1 em { color: var(--studio-accent); }
body[data-studio-theme] .topic-icon,
body[data-studio-theme] .detected-chips span { background: var(--studio-accent-wash); color: var(--studio-strong); }

body[data-studio-theme] .share-panel,
body[data-studio-theme] .preview-portal {
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--studio-card) 78%, transparent), transparent 32%),
    radial-gradient(circle at 12% 12%, var(--studio-glow-a), transparent 31%),
    linear-gradient(145deg, var(--studio-bg-a), var(--studio-bg-b) 52%, var(--studio-bg-c));
}

body[data-studio-theme] .share-link-shell,
body[data-studio-theme] .theme-picker-toggle,
body[data-studio-theme] .floating-theme-picker fieldset,
body[data-studio-theme] .theme-option {
  border-color: var(--studio-line);
  background: color-mix(in srgb, var(--studio-panel) 94%, transparent);
  color: var(--studio-ink);
}

body[data-studio-theme="midnight"] .builder-card { box-shadow: 0 30px 90px rgba(0,0,0,.28), inset 0 1px rgba(255,255,255,.06); }
body[data-studio-theme="midnight"] .share-ready-mark { background: rgba(61,111,81,.3); color: #a9d9b8; }
body[data-studio-theme="midnight"] .error-alert { background: rgba(159,61,61,.28); color: #ffc2bd; }

.profile-login-dialog {
  width: min(430px, calc(100vw - 30px));
  margin: auto;
  padding: 38px;
  overflow: visible;
  border: 1px solid var(--studio-line, rgba(91,50,70,.13));
  border-radius: 26px;
  background: var(--studio-panel, rgba(255,252,249,.96));
  box-shadow: 0 35px 110px var(--studio-shadow, rgba(82,43,61,.22));
  color: var(--ink);
  text-align: center;
  backdrop-filter: blur(24px);
}

.profile-login-dialog::backdrop {
  background: rgba(35,22,30,.42);
  backdrop-filter: blur(8px);
}

.profile-login-dialog:not([open]) { display: none; }
.profile-login-dialog .login-close {
  position: absolute;
  right: 15px;
  top: 14px;
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 19px;
  cursor: pointer;
}

.login-symbol {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 20px;
  border-radius: 44% 56% 52% 48% / 48% 43% 57% 52%;
  background: linear-gradient(145deg, var(--rose), var(--plum));
  color: var(--studio-button-text, #fffaf7);
  font: 700 12px Manrope, sans-serif;
  letter-spacing: -.04em;
  box-shadow: 0 13px 30px var(--studio-shadow, rgba(82,43,61,.18));
}

.login-symbol::after {
  content: "";
  position: absolute;
  right: 5px;
  bottom: 6px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--studio-button-text, #fffaf7);
  border-radius: 50%;
  background: var(--gold);
}

.profile-login-dialog h2 {
  margin: 9px 0 9px;
  font: 600 36px/1.05 Manrope, sans-serif;
  letter-spacing: -.05em;
}

.profile-login-dialog > p:not(.eyebrow) {
  max-width: 330px;
  margin: 0 auto 25px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.profile-login-dialog form { display: grid; gap: 13px; text-align: left; }
.profile-login-dialog form label { display: grid; gap: 7px; color: var(--ink-soft); font-size: 9px; font-weight: 600; }
.profile-login-dialog form input { width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; }
.profile-login-dialog .primary-action { width: 100%; margin-top: 4px; }
.profile-login-dialog > small { display: block; margin-top: 18px; color: var(--muted); font-size: 8px; }

body[data-studio-theme] .returning-login,
body[data-studio-theme] .profile-login-dialog,
body[data-studio-theme] .profile-login-dialog form input {
  border-color: var(--studio-line);
  background-color: color-mix(in srgb, var(--studio-panel) 94%, transparent);
  color: var(--studio-ink);
}

.site-legal-links {
  position: fixed;
  z-index: 7;
  left: 24px;
  bottom: 15px;
  display: flex;
  gap: 9px;
  color: var(--muted);
  font-size: 10px;
}
.site-legal-links a { color: inherit; text-decoration: none; }
.site-legal-links a:hover { color: var(--ink); text-decoration: underline; }
.account-settings-dialog { width: min(520px, calc(100vw - 32px)); }
.danger-zone { margin-top: 24px; padding: 20px; border: 1px solid #e9c2c2; border-radius: 17px; text-align: left; background: #fff7f6; }
.danger-zone h3 { margin: 0 0 6px; color: #8d2f3b; font-size: 16px; }
.danger-zone p { margin: 0 0 16px; color: #805d61; font-size: 12px; }
.danger-action { width: 100%; min-height: 46px; border: 0; border-radius: 13px; color: white; background: #9d3141; font-weight: 700; cursor: pointer; }
.danger-action:disabled { opacity: .42; cursor: not-allowed; }
@media (max-width: 700px) { .site-legal-links { position: static; justify-content: center; padding: 14px 0; } }

@media (max-width: 620px) {
  .draft-status { display: none; }
  .returning-login { max-width: 145px; }
  .profile-login-dialog { padding: 34px 22px 27px; }
}
