@import url("../assistant-polish-8/onboarding.css?v=assistant-polish-8");
@import url("../assistant-polish-8/premium.css?v=assistant-polish-8");

:root {
  --v9-blue: oklch(0.43 0.18 260);
  --v9-blue-deep: oklch(0.36 0.16 260);
  --v9-blue-bright: oklch(0.62 0.2 259);
  --v9-rail-muted: oklch(0.76 0.09 254);
  --v9-workspace: oklch(0.972 0.009 255);
  --v9-control: oklch(0.995 0.003 255);
  --v9-ink: oklch(0.2 0.022 255);
  --v9-copy: oklch(0.47 0.025 255);
  --v9-border: oklch(0.7 0.025 255);
  --v9-sidebar: clamp(300px, 33.333vw, 520px);
  --v9-form: 700px;
  --v9-control-height: 64px;
  --v9-marker: 38px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--v9-workspace);
  -webkit-font-smoothing: antialiased;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--v9-ink);
  background: var(--v9-workspace);
}

.setup-shell {
  display: grid;
  grid-template-columns: var(--v9-sidebar) minmax(0, 1fr);
  min-height: 100svh;
  background: var(--v9-workspace);
}

.setup-menu {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding: 52px clamp(32px, 4vw, 66px) 42px;
  color: oklch(0.985 0.006 255);
  background: var(--v9-blue);
  border: 0;
}

.brand-mark {
  width: max-content;
  color: oklch(0.985 0.006 255);
  font-size: 1.35rem;
  font-weight: 790;
}

.brand-mark span:last-child {
  color: oklch(0.83 0.12 57);
}

.rail-intro {
  display: grid;
  gap: 10px;
  margin-top: 46px;
}

.rail-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: oklch(0.985 0.006 255);
  background: var(--v9-blue-bright);
  border-radius: 50%;
}

.rail-icon svg {
  width: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.rail-intro p,
.rail-intro h2 {
  margin: 0;
}

.rail-intro p {
  color: var(--v9-rail-muted);
  font-size: 0.76rem;
  font-weight: 720;
}

.rail-intro h2 {
  max-width: 15ch;
  color: oklch(0.985 0.006 255);
  font-size: clamp(1.45rem, 2.1vw, 2rem);
  font-weight: 680;
  line-height: 1.32;
  text-wrap: balance;
}

.menu-steps {
  display: grid;
  gap: 0;
  margin-top: 64px;
}

.menu-phase {
  position: relative;
  display: grid;
  grid-template-columns: var(--v9-marker) minmax(0, 1fr);
  gap: 20px;
  min-height: 108px;
}

.menu-phase:not(:last-child)::after {
  position: absolute;
  top: var(--v9-marker);
  bottom: 0;
  left: calc(var(--v9-marker) / 2 - 1px);
  width: 2px;
  content: "";
  background: oklch(0.72 0.1 254 / 0.72);
}

.phase-marker {
  z-index: 1;
  display: grid;
  width: var(--v9-marker);
  height: var(--v9-marker);
  place-items: center;
  color: var(--v9-rail-muted);
  background: var(--v9-blue);
  border: 2px solid oklch(0.66 0.11 254);
  border-radius: 50%;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.menu-phase.is-current .phase-marker {
  color: oklch(0.995 0.003 255);
  border-color: oklch(0.98 0.01 255);
}

.menu-phase.is-complete .phase-marker {
  color: var(--v9-blue-deep);
  background: oklch(0.84 0.1 248);
  border-color: oklch(0.84 0.1 248);
}

.phase-copy {
  display: grid;
  align-content: start;
  gap: 5px;
  padding-top: 7px;
}

.phase-copy strong {
  color: var(--v9-rail-muted);
  font-size: 0.96rem;
  font-weight: 650;
  line-height: 1.25;
}

.menu-phase.is-upcoming .phase-copy strong {
  color: oklch(0.82 0.07 254);
}

.phase-copy span {
  color: oklch(0.73 0.07 254);
  font-size: 0.7rem;
  line-height: 1.4;
}

.menu-phase.is-current .phase-copy strong {
  color: oklch(0.995 0.003 255);
}

.rail-account {
  display: grid;
  gap: 7px;
  margin-top: auto;
  color: var(--v9-rail-muted);
  font-size: 0.74rem;
}

.rail-account strong {
  overflow: hidden;
  color: oklch(0.95 0.018 255);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
}

.rail-account a {
  width: max-content;
  min-height: 40px;
  padding-top: 10px;
  color: oklch(0.82 0.07 254);
  font-weight: 630;
  text-decoration: none;
}

.rail-account a:hover {
  color: oklch(0.99 0.004 255);
}

.task-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100svh;
  padding: 36px clamp(28px, 7vw, 118px) 42px;
  background: var(--v9-workspace);
  border: 0;
}

.topline {
  display: none;
  min-height: 32px;
  align-items: center;
  justify-content: flex-end;
}

.topline .mini-label {
  color: oklch(0.55 0.035 255);
  font-size: 0.7rem;
}

.mobile-brand,
.progress-bars {
  display: none;
}

.task-content {
  display: flex;
  width: min(100%, var(--v9-form));
  min-height: calc(100svh - 110px);
  margin: 44px auto 0;
  flex: 1;
  flex-direction: column;
}

.step-copy {
  display: grid;
  gap: 13px;
  max-width: var(--v9-form);
  margin: 0 0 42px;
  text-align: left;
}

.step-copy .eyebrow {
  color: var(--v9-blue);
  font-size: 0.72rem;
  font-weight: 780;
}

.step-copy h1 {
  max-width: 21ch;
  margin: 0;
  color: var(--v9-ink);
  font-size: clamp(2rem, 3vw, 2.7rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.12;
  text-wrap: balance;
}

.step-copy p:last-child {
  max-width: 64ch;
  color: var(--v9-copy);
  font-size: 0.95rem;
  line-height: 1.65;
  text-wrap: pretty;
}

.step-form {
  display: grid;
  gap: 22px;
  width: 100%;
}

.field,
.control-block {
  gap: 9px;
}

.field > span,
.control-block > span {
  color: var(--v9-ink);
  font-size: 0.76rem;
  font-weight: 690;
}

.field input,
.field select,
.field textarea {
  min-height: var(--v9-control-height);
  padding: 14px 18px;
  color: var(--v9-ink);
  background: var(--v9-control);
  border: 1.5px solid var(--v9-border);
  border-radius: 9px;
  box-shadow: 0 7px 18px -17px oklch(0.24 0.04 255 / 0.5);
}

.field textarea {
  min-height: 132px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--v9-blue-bright);
  outline: 3px solid oklch(0.72 0.14 254 / 0.22);
}

.option-row,
.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.option-button,
.choice-pill {
  min-height: var(--v9-control-height);
  padding: 12px 15px;
  background: var(--v9-control);
  border: 1.5px solid oklch(0.84 0.018 255);
  border-radius: 9px;
  box-shadow: none;
}

.option-button:hover,
.choice-pill:hover {
  border-color: oklch(0.64 0.08 255);
  transform: none;
}

.option-button.is-selected,
.choice-pill:has(input:checked) {
  background: oklch(0.955 0.025 255);
  border-color: var(--v9-blue-bright);
  box-shadow: 0 0 0 2px oklch(0.72 0.14 254 / 0.12);
}

.promise-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid oklch(0.86 0.018 255);
}

.promise-card {
  min-height: 82px;
  padding: 15px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid oklch(0.86 0.018 255);
  border-radius: 0;
}

.promise-card .icon-tile {
  color: var(--v9-blue);
  background: oklch(0.93 0.036 255);
}

.preview-pane {
  display: none;
  width: 100%;
  margin-top: 30px;
  padding: 0;
  background: transparent;
  border: 0;
}

body[data-step="setup-preview"] .preview-pane,
body[data-step="caller-sms"] .preview-pane,
body[data-step="lead-alerts"] .preview-pane {
  display: block;
}

.preview-shell {
  display: grid;
  gap: 18px;
  width: 100%;
  padding: 0;
}

.preview-hero {
  padding-top: 22px;
  border-top: 1px solid oklch(0.86 0.018 255);
}

.preview-hero h2 {
  color: var(--v9-ink);
  font-size: 1rem;
}

.preview-card,
.call-path {
  padding: 20px;
  background: var(--v9-control);
  border: 1px solid oklch(0.84 0.018 255);
  border-radius: 9px;
  box-shadow: 0 18px 36px -32px oklch(0.25 0.05 255 / 0.48);
}

.task-actions {
  display: grid;
  grid-template-columns: auto auto;
  gap: 12px;
  width: max-content;
  max-width: 100%;
  margin-top: auto;
  padding: 42px 0 6px;
  align-self: center;
}

.primary-button,
.secondary-button {
  min-height: 52px;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 720;
  transition-property: transform, background-color, border-color, box-shadow;
  transition-duration: 180ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.primary-button {
  min-width: 236px;
  max-width: 320px;
  color: oklch(0.99 0.004 255);
  background: var(--v9-blue-bright);
  border-color: var(--v9-blue-bright);
}

.concierge-cue {
  padding: 2px 0;
  color: var(--v9-copy);
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 0.76rem;
  line-height: 1.5;
}

.concierge-cue a {
  color: var(--v9-blue);
  font-weight: 720;
  text-underline-offset: 3px;
}

.waiting-for-number {
  gap: 14px;
  padding: 24px;
  background: var(--v9-control);
  border: 1px solid oklch(0.82 0.022 255);
  border-radius: 9px;
  box-shadow: 0 18px 36px -32px oklch(0.25 0.05 255 / 0.48);
}

.waiting-for-number h2 {
  margin: 0;
  font-size: 1.22rem;
}

.waiting-for-number p {
  margin: 0;
}

.waiting-for-number p strong {
  color: var(--v9-ink);
}

.waiting-for-number .unlock-condition {
  padding-top: 14px;
  color: var(--v9-ink);
  border-top: 1px solid oklch(0.88 0.014 255);
  font-weight: 680;
}

.waiting-for-number .secondary-button {
  width: max-content;
  min-width: 170px;
  margin-top: 2px;
}

.forwarding-next-step {
  display: grid;
  gap: 8px;
  padding: 18px 0 0;
  border-top: 1px solid oklch(0.86 0.018 255);
}

.forwarding-next-step p:last-child {
  max-width: 62ch;
  margin: 0;
  color: var(--v9-copy);
  font-size: 0.82rem;
  line-height: 1.62;
}

.primary-button:hover {
  background: var(--v9-blue);
  border-color: var(--v9-blue);
  transform: translateY(-1px);
}

.primary-button:active,
.secondary-button:active {
  transform: scale(0.96);
}

.action-note {
  grid-column: 1 / -1;
  text-align: center;
}

@media (max-width: 980px) {
  :root {
    --v9-sidebar: 286px;
  }

  .setup-menu {
    padding-inline: 30px;
  }

  .task-pane {
    padding-inline: 34px;
  }
}

@media (max-width: 760px) {
  .setup-shell {
    display: block;
  }

  .setup-menu {
    position: static;
    display: block;
    min-height: 0;
    padding: 22px 20px 18px;
  }

  .brand-mark,
  .rail-account,
  .rail-icon,
  .rail-intro p {
    display: none;
  }

  .rail-intro {
    margin: 0;
  }

  .rail-intro h2 {
    max-width: none;
    font-size: 1rem;
  }

  .menu-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 18px;
  }

  .menu-phase {
    display: grid;
    min-height: 0;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 7px;
  }

  .menu-phase::after {
    display: none;
  }

  .phase-marker {
    width: 28px;
    height: 28px;
    font-size: 0.66rem;
  }

  .phase-copy {
    gap: 2px;
    padding-top: 1px;
  }

  .phase-copy strong {
    font-size: 0.68rem;
  }

  .phase-copy span {
    display: none;
  }

  .task-pane {
    min-height: calc(100svh - 118px);
    padding: 18px 20px 26px;
  }

  .topline {
    display: flex;
    justify-content: space-between;
  }

  .mobile-brand {
    display: block;
    color: var(--v9-ink);
    font-size: 1rem;
    font-weight: 790;
  }

  .mobile-brand span:last-child {
    color: oklch(0.57 0.12 42);
  }

  .task-content {
    min-height: calc(100svh - 190px);
    margin-top: 28px;
  }

  .step-copy {
    gap: 10px;
    margin-bottom: 30px;
  }

  .step-copy h1 {
    font-size: 1.8rem;
    line-height: 1.16;
  }

  .step-copy p:last-child {
    font-size: 0.88rem;
    line-height: 1.58;
  }

  .option-row,
  .choice-grid {
    grid-template-columns: 1fr;
  }

  .task-actions {
    position: sticky;
    bottom: 0;
    width: calc(100% + 8px);
    margin-inline: -4px;
    padding: 18px 4px calc(4px + env(safe-area-inset-bottom));
    background: linear-gradient(to bottom, transparent, var(--v9-workspace) 18px);
  }

  .primary-button {
    min-width: 0;
    max-width: none;
  }

  .primary-button,
  .secondary-button {
    border-radius: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
