/* SemAI — Onboarding */
body { background: #f4f3fb; background-image: radial-gradient(900px 400px at 70% -5%, #ece6ff 0%, rgba(236,230,255,0) 70%); }
.ob-wrap { max-width: 1240px; margin: 0 auto; padding: 4px 28px 48px; }
.ob-header-right { display: flex; align-items: center; gap: 20px; flex: none; }
.saved { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: #475569; text-decoration: underline; text-underline-offset: 3px; }
.saved svg { width: 18px; height: 18px; }
.saved.saving { color: var(--blue); }
.ob-header-right .btn-outline { border-radius: 12px; height: 44px; padding: 0 20px; font-size: 15px; }

.ob-title { margin: 22px 0 18px; display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.ob-title h1 { margin: 0; font-size: clamp(26px, 3.2vw, 38px); letter-spacing: -.02em; font-weight: 800; color: var(--ink); }
.ob-title p { margin: 6px 0 0; font-size: 17px; color: #475569; }

.stepper { list-style: none; display: flex; align-items: center; gap: 0; padding: 0; margin: 0 0 22px; }
.stepper li { display: flex; align-items: center; gap: 10px; flex: 1; font-size: 13.5px; color: #475569; white-space: nowrap; }
.stepper li:not(:last-child)::after { content: ""; flex: 1; height: 1px; background: #d6dbe7; margin: 0 14px; }
.stepper b { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #e9ecf3; color: #475569; font-weight: 600; flex: none; }
.stepper li.is-current { color: var(--ink); font-weight: 600; }
.stepper li.is-current b { background: #2ee0bd; color: #fff; box-shadow: 0 0 0 4px rgba(46,224,189,.2); }
.stepper-m { display: none; }

.ob-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.ob-form, .card { background: #fff; border: 1px solid #ebedf4; border-radius: 16px; box-shadow: 0 1px 2px rgba(15,23,42,.03); }
.ob-form { padding: 6px 22px 20px; }
.q { padding: 18px 0; border-bottom: 1px solid #f0f2f7; }
.q:last-child { border-bottom: 0; }
.q h2 { margin: 0; font-size: 19px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.hint { margin: 4px 0 14px; font-size: 13.5px; color: #64748b; }
.q-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.crumb { font-size: 13.5px; color: #475569; padding-top: 4px; text-align: right; }
.link { border: 0; background: none; padding: 0; color: #7c3aed; font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; }
.ai-link { display: inline-flex; align-items: center; gap: 6px; padding-top: 4px; white-space: nowrap; }
.ai-link svg { width: 16px; height: 16px; }
.empty { font-size: 13px; color: #94a3b8; }

/* groups */
.groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.group {
  position: relative; text-align: left; border: 1px solid #e3e6ef; background: #fff; border-radius: 12px; padding: 16px 16px 14px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 120px; transition: .15s; color: var(--ink);
}
.group:hover { border-color: #b9c2d8; }
.g-ic { width: 30px; height: 30px; stroke-width: 1.4; color: #1e293b; margin-bottom: 6px; }
.g-name { font-size: 15px; font-weight: 500; line-height: 1.3; }
.g-ex { font-size: 12.5px; color: #64748b; }
.group.is-primary { border: 1.5px solid #2ee0bd; background: linear-gradient(180deg, #ecfbf7, #f7fdfb); }
.group.is-primary .g-ic { color: #0f9d84; }
.group.is-on { border: 1.5px solid #9b7af5; background: linear-gradient(180deg, #f3eeff, #faf8ff); }
.group.is-on .g-ic { color: #7c3aed; }
.tag-primary { font-size: 11px; font-weight: 600; color: #0f9d84; background: #c8f4e8; padding: 2px 8px; border-radius: 6px; }
.check { position: absolute; top: 12px; right: 12px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #19c6a7; color: #fff; }
.is-on .check, .deep.lilac .check { background: #8b5cf6; }
.check svg { width: 14px; height: 14px; stroke-width: 3; }
.make-primary { font-size: 11.5px; color: #7c3aed; text-decoration: underline; text-underline-offset: 2px; margin-top: auto; }
.make-primary:hover { color: #5b21b6; }

/* chips */
.search-field { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 14px; border: 1px solid #e3e6ef; border-radius: 10px; background: #f8f9fc; margin-bottom: 14px; color: #64748b; }
.search-field input { border: 0; outline: 0; background: transparent; font: inherit; font-size: 14px; color: var(--ink); width: 100%; }
.search-field svg { width: 18px; height: 18px; flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips .chip { height: 38px; padding: 0 20px; border-radius: 10px; font-size: 14px; }
.chips .chip svg { width: 16px; height: 16px; }
.chips .chip.is-on { border-color: #2ee0bd; background: #eafbf6; color: #0f766e; font-weight: 600; }
.chips .chip.add { border-style: dashed; color: #475569; }
.chips.sm .chip { height: 32px; padding: 0 14px; font-size: 13px; }
.chip.solid { padding-right: 8px !important; }
.chip.solid button { border: 0; background: none; color: inherit; display: grid; place-items: center; padding: 2px; border-radius: 50%; }
.chip.solid button:hover { background: rgba(15,118,110,.12); }

/* deeps */
.deeps { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.deep {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 30px 10px 14px; text-align: left;
  border: 1px solid #e3e6ef; background: #fff; border-radius: 10px; font-size: 14px; color: var(--ink); transition: .15s;
}
.deep:hover { border-color: #b9c2d8; }
.deep svg { width: 24px; height: 24px; stroke-width: 1.5; flex: none; }
.deep.is-on { border: 1.5px solid #2ee0bd; background: #ecfbf7; }
.deep.is-on.lilac { border-color: #9b7af5; background: #f3eeff; }
.deep .check { top: 8px; right: 8px; width: 20px; height: 20px; }
.deeps-foot { text-align: right; margin-top: 10px; }
.deeps-foot .link { color: #475569; }

.skills-row { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: start; }
.skills-row .sugg { border-left: 1px solid #eef0f5; padding-left: 24px; }
.mini { display: block; font-size: 13px; color: #475569; margin-bottom: 8px; }

/* side */
.ob-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 16px; }
.card { padding: 18px; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.card h3 { margin: 0; font-size: 17px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.card-head svg { width: 20px; height: 20px; color: #475569; }
.card h4 { margin: 16px 0 10px; font-size: 15px; font-weight: 600; color: var(--ink); }
.node { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 10px; font-size: 14px; color: var(--ink); }
.node svg { width: 24px; height: 24px; stroke-width: 1.5; flex: none; }
.node em { font-style: normal; font-size: 11px; font-weight: 600; color: #0f9d84; background: #c8f4e8; padding: 2px 8px; border-radius: 6px; margin-left: auto; }
.node.primary { background: #ecfbf7; }
.node.sub { background: #f6f7fb; margin-left: 30px; }
.node.other { background: #f3eeff; margin-top: 12px; }
.node.other svg { color: #7c3aed; }
.arrow { margin-left: 52px; height: 22px; display: grid; place-items: center; width: 20px; color: #94a3b8; }
.arrow svg { width: 14px; height: 14px; }

.ai-card { background: linear-gradient(180deg, #f6f2ff, #fbfaff); border-color: #ece6ff; }
.ai-card h3 svg { width: 20px; height: 20px; color: #7c3aed; }
.ai-card .hint { font-size: 12px; }
.ai-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.ai-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px solid #eee9fb; font-size: 13.5px; }
.ai-list svg { width: 16px; height: 16px; color: #7c3aed; }
.draft { position: relative; background: #fff; border: 1px solid #eee9fb; border-radius: 10px; padding: 12px 40px 12px 14px; }
.draft p { margin: 0; font-size: 13.5px; line-height: 1.55; color: #334155; }
.copy { position: absolute; top: 10px; right: 10px; border: 0; background: none; color: #94a3b8; padding: 2px; }
.copy:hover { color: #7c3aed; }
.copy svg { width: 16px; height: 16px; }
.note { display: flex; gap: 8px; font-size: 12px; color: #64748b; margin: 12px 0; line-height: 1.5; }
.note svg { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.ghost-btn { width: 100%; height: 42px; border-radius: 10px; border: 1px solid #eee9fb; background: #fff; color: #94a3b8; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 13.5px; cursor: not-allowed; }
.ghost-btn svg { width: 16px; height: 16px; }

.side-actions { display: flex; gap: 10px; }
.side-actions .btn { height: 52px; border-radius: 12px; padding: 0 16px; font-size: 14.5px; }
.side-actions .btn-outline { flex: none; }
.btn-next { flex: 1; color: #fff; background: linear-gradient(90deg, #0b1533, #0d6e6a); }
.btn-next:hover { filter: brightness(1.12); }
.side-foot { margin: 0; text-align: center; font-size: 12.5px; color: #64748b; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; transition: .25s; z-index: 99; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* responsive */
@media (max-width: 1180px) {
  .groups { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 980px) {
  .ob-grid { grid-template-columns: 1fr; }
  .ob-side { position: static; }
}
@media (max-width: 640px) {
  .ob-wrap { padding: 12px 16px 32px; }
  .ob-header-right { gap: 10px; }
  .saved span { display: none; }
  .ob-header-right .btn-outline { height: 38px; width: 38px; padding: 0; font-size: 0; gap: 0; }
  .ob-title h1 span { display: block; }
  .ob-title { flex-direction: column-reverse; gap: 8px; margin-top: 12px; }
  .ob-header-right { align-self: flex-end; }
  .ob-title p { font-size: 14px; }
  .stepper { display: none; }
  .stepper-m { display: grid; grid-template-columns: auto repeat(5, 1fr); align-items: center; gap: 6px; margin-bottom: 16px; font-size: 12px; color: #64748b; }
  .stepper-m i { height: 2px; background: #d6dbe7; position: relative; }
  .stepper-m i.on::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; border-radius: 50%; background: #2ee0bd; transform: translate(-50%, -50%); box-shadow: 0 0 0 4px rgba(46,224,189,.2); }
  .stepper-m em { grid-column: auto; font-style: normal; color: var(--ink); font-weight: 600; }
  .ob-form { padding: 4px 14px 14px; }
  .q h2 { font-size: 16px; }
  .groups { grid-template-columns: 1fr 1fr; gap: 8px; }
  .group { min-height: 0; padding: 12px; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
  .group:last-child { grid-column: span 2; }
  .g-ic { width: 22px; height: 22px; margin: 0; }
  .g-name { font-size: 12.5px; flex: 1; padding-right: 18px; }
  .g-ex, .make-primary { display: none; }
  .tag-primary { order: 3; margin-left: 30px; }
  .check { top: 8px; right: 8px; width: 18px; height: 18px; }
  .deeps { grid-template-columns: 1fr 1fr; gap: 8px; }
  .deep { min-height: 52px; font-size: 12.5px; padding: 0 10px; gap: 8px; }
  .crumb { display: none; }
  .q-head { flex-direction: column; gap: 0; }
  .ai-link { padding: 0 0 10px; }
  .skills-row { grid-template-columns: 1fr; gap: 14px; }
  .skills-row .sugg { border: 0; padding: 0; }
  .chips .chip { height: 34px; padding: 0 14px; font-size: 13px; }
  .side-actions { flex-direction: column-reverse; }
  .side-actions .btn-outline { width: 100%; }
}

/* ---------- step 2 form & step 3 ---------- */
.ob-main { min-width: 0; }
.stepper li.is-done b { background: #c8f4e8; color: #0f9d84; }
.stepper-m { grid-template-columns: auto 1fr !important; }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; margin-top: 4px; }
.fld { display: grid; gap: 6px; font-size: 13.5px; color: #334155; font-weight: 500; }
.fld input, .fld select, .fld textarea {
  font: inherit; font-weight: 400; font-size: 14.5px; color: var(--ink); background: #f8f9fc;
  border: 1px solid #e3e6ef; border-radius: 10px; padding: 0 14px; height: 44px; outline: none; width: 100%;
}
.fld textarea { height: auto; padding: 12px 14px; line-height: 1.55; resize: vertical; }
.fld input:focus, .fld select:focus, .fld textarea:focus { border-color: #2ee0bd; background: #fff; box-shadow: 0 0 0 3px rgba(46,224,189,.18); }
.fld [aria-invalid="true"] { border-color: #ef4444; background: #fff5f5; }
.err { font-style: normal; font-size: 12.5px; color: #dc2626; min-height: 0; }
.err:empty { display: none; }
.fset { border: 0; padding: 0; margin: 16px 0 0; }
.fset legend { font-size: 13.5px; font-weight: 500; color: #334155; margin-bottom: 8px; padding: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.consents { display: grid; gap: 8px; margin-top: 16px; }
.ck { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: #334155; line-height: 1.5; cursor: pointer; }
.ck input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: #0f9d84; flex: none; }
.form-error { margin: 14px 0 0; padding: 12px 14px; border-radius: 10px; background: #fef2f2; color: #b91c1c; font-size: 13.5px; }
.btn-next:disabled { opacity: .7; cursor: progress; }

.done { text-align: center; padding: 48px 28px 44px; }
.done-ic { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 18px; display: grid; place-items: center; background: #d6f5ed; color: #0f9d84; box-shadow: 0 0 0 10px rgba(46,224,189,.12); }
.done-ic svg { width: 36px; height: 36px; stroke-width: 2.5; }
.done h2 { margin: 0 0 10px; font-size: 26px; color: var(--ink); }
.done p { margin: 0 auto 26px; max-width: 520px; color: #475569; line-height: 1.6; }
.done-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-sq { border-radius: 10px; height: 48px; padding: 0 22px; }

@media (max-width: 640px) {
  .fgrid { grid-template-columns: minmax(0, 1fr); }
  .done { padding: 32px 18px; }
  .done-actions .btn { width: 100%; }
}
