/* ============================================================
   CoreRoom — New-project onboarding + capabilities tutorial
   window.openOnboarding() → 7-step wizard → window.startTutorial()
   Matches app tokens. Warm-Swiss, lots of air.
   ============================================================ */

/* ===================== WIZARD SHELL ===================== */
.ob-ov { position: fixed; inset: 0; z-index: 9500; display: grid; grid-template-columns: 300px 1fr; background: var(--surface); animation: ob-fade 0.25s ease; }
.ob-ov[hidden] { display: none; }
@keyframes ob-fade { from { opacity: 0; } to { opacity: 1; } }

/* ---- step rail ---- */
.ob-rail { background: linear-gradient(165deg, #2A2620 0%, #423629 70%, #54402D 100%); color: #fff; padding: 34px 30px; display: flex; flex-direction: column; position: relative; overflow: hidden auto; }
.ob-rail-topo { position: absolute; inset: 0; opacity: 0.13; pointer-events: none; }
.ob-rail-brand { position: relative; display: flex; align-items: center; gap: 11px; margin-bottom: 38px; }
.ob-rail-brand svg { width: 30px; height: 30px; }
.ob-rail-brand b { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.ob-rail-title { position: relative; font-size: 20px; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 4px; }
.ob-rail-sub { position: relative; font-size: 13px; color: rgba(255,255,255,0.6); line-height: 1.5; margin-bottom: 30px; }
.ob-steps { position: relative; display: flex; flex-direction: column; gap: 2px; }
.ob-step { display: flex; align-items: center; gap: 13px; padding: 10px 10px; border-radius: 9px; cursor: default; transition: 0.16s; }
.ob-step-n { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,0.28); display: grid; place-items: center; font-family: var(--mono); font-size: 11px; color: rgba(255,255,255,0.7); transition: 0.18s; }
.ob-step-n svg { width: 13px; height: 13px; opacity: 0; }
.ob-step-l { font-size: 13.5px; color: rgba(255,255,255,0.62); transition: 0.16s; }
.ob-step.done .ob-step-n { background: #E8A36A; border-color: #E8A36A; color: transparent; }
.ob-step.done .ob-step-n svg { opacity: 1; color: #2A2620; }
.ob-step.done .ob-step-l { color: rgba(255,255,255,0.85); }
.ob-step.active { background: rgba(255,255,255,0.08); }
.ob-step.active .ob-step-n { border-color: #E8A36A; color: #fff; }
.ob-step.active .ob-step-l { color: #fff; font-weight: 500; }
.ob-rail-foot { position: relative; margin-top: auto; padding-top: 24px; font-size: 11.5px; color: rgba(255,255,255,0.4); line-height: 1.5; }

/* ---- step body ---- */
.ob-body { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.ob-bar { display: flex; align-items: center; justify-content: space-between; padding: 18px 30px; border-bottom: 1px solid var(--hairline-soft); flex: none; }
.ob-bar-prog { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.ob-bar-close { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--hairline); background: var(--surface); color: var(--muted); display: grid; place-items: center; cursor: pointer; transition: 0.15s; }
.ob-bar-close:hover { border-color: var(--faint); color: var(--ink); }
.ob-bar-close svg { width: 16px; height: 16px; }

.ob-scroll { flex: 1; overflow-y: auto; min-height: 0; }
.ob-scroll::-webkit-scrollbar { width: 10px; }
.ob-scroll::-webkit-scrollbar-thumb { background: var(--hairline); border-radius: 5px; border: 2px solid var(--surface); }
.ob-pane { max-width: 660px; margin: 0 auto; padding: 38px 40px 60px; animation: ob-slide 0.3s ease; }
@keyframes ob-slide { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.ob-eyebrow { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.ob-h { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; margin: 9px 0 8px; text-wrap: balance; }
.ob-lede { font-size: 14.5px; color: var(--muted); line-height: 1.6; max-width: 540px; text-wrap: pretty; }

/* ---- form atoms ---- */
.ob-field { margin-top: 24px; }
.ob-label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 7px; }
.ob-label .opt { font-weight: 400; color: var(--faint); font-size: 12px; }
.ob-input, .ob-textarea, .ob-select { width: 100%; font-family: var(--sans); font-size: 14px; color: var(--ink); background: var(--surface-warm); border: 1px solid var(--hairline); border-radius: 10px; padding: 11px 13px; transition: 0.15s; }
.ob-textarea { resize: vertical; min-height: 78px; line-height: 1.5; }
.ob-input:focus, .ob-textarea:focus, .ob-select:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px var(--accent-soft); }
.ob-input::placeholder, .ob-textarea::placeholder { color: var(--faint); }
.ob-hint { font-size: 12px; color: var(--faint); margin-top: 6px; line-height: 1.45; }
.ob-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ---- choice chips / cards ---- */
.ob-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.ob-chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid var(--hairline); border-radius: 100px; background: var(--surface); font-size: 13.5px; color: var(--ink); cursor: pointer; transition: 0.14s; user-select: none; }
.ob-chip .em { font-size: 15px; }
.ob-chip:hover { border-color: var(--faint); background: var(--surface-warm); }
.ob-chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); font-weight: 500; }

.ob-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.ob-card { display: flex; gap: 13px; padding: 15px; border: 1px solid var(--hairline); border-radius: 12px; background: var(--surface); cursor: pointer; transition: 0.15s; text-align: left; position: relative; }
.ob-card:hover { border-color: var(--faint); background: var(--surface-warm); }
.ob-card.on { border-color: var(--accent); background: var(--accent-soft); }
.ob-card.on::after { content: ""; position: absolute; top: 12px; right: 12px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/12px no-repeat; }
.ob-card-ic { width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); display: grid; place-items: center; flex: none; }
.ob-card-ic svg { width: 19px; height: 19px; color: var(--accent); }
.ob-card.on .ob-card-ic { background: rgba(180,83,9,0.18); }
.ob-card-tx { min-width: 0; padding-right: 16px; }
.ob-card-tx b { display: block; font-size: 13.5px; font-weight: 600; }
.ob-card-tx span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.4; }

/* ---- AOI methods (radio cards) ---- */
.ob-aoi-methods { display: flex; flex-direction: column; gap: 9px; }
.ob-aoi { display: flex; align-items: center; gap: 13px; padding: 14px 15px; border: 1px solid var(--hairline); border-radius: 11px; cursor: pointer; transition: 0.15s; }
.ob-aoi:hover { border-color: var(--faint); }
.ob-aoi.on { border-color: var(--accent); background: var(--accent-soft); }
.ob-aoi-radio { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--hairline); display: grid; place-items: center; }
.ob-aoi.on .ob-aoi-radio { border-color: var(--accent); }
.ob-aoi.on .ob-aoi-radio::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.ob-aoi-ic { width: 20px; height: 20px; color: var(--muted); flex: none; }
.ob-aoi-tx b { font-size: 13.5px; font-weight: 500; }
.ob-aoi-tx span { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }

/* ---- drop zone ---- */
.ob-drop { margin-top: 16px; border: 1.5px dashed var(--hairline); border-radius: 12px; padding: 30px; text-align: center; background: var(--surface-warm); cursor: pointer; transition: 0.15s; }
.ob-drop:hover { border-color: var(--accent); background: #fff; }
.ob-drop svg { width: 30px; height: 30px; color: var(--faint); }
.ob-drop b { display: block; font-size: 14px; margin-top: 10px; }
.ob-drop span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.ob-files { display: flex; flex-direction: column; gap: 7px; margin-top: 13px; }
.ob-file { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--hairline); border-radius: 9px; background: var(--surface); font-size: 13px; }
.ob-file .fx { font-family: var(--mono); font-size: 9px; font-weight: 600; padding: 2px 6px; border-radius: 4px; background: var(--accent-soft); color: var(--accent-ink); text-transform: uppercase; }
.ob-file .fsz { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--faint); }

/* ---- connectors ---- */
.ob-conns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 8px; }
.ob-conn { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 10px; border: 1px solid var(--hairline); border-radius: 12px; background: var(--surface); cursor: pointer; transition: 0.15s; }
.ob-conn:hover { border-color: var(--faint); background: var(--surface-warm); }
.ob-conn.on { border-color: var(--accent); background: var(--accent-soft); }
.ob-conn-logo { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; }
.ob-conn b { font-size: 12px; font-weight: 500; }
.ob-conn span { font-size: 10.5px; color: var(--muted); }

/* ---- team invite ---- */
.ob-invite { display: flex; gap: 9px; margin-top: 8px; }
.ob-invite .ob-input { flex: 1; }
.ob-invite-role { width: 150px; }
.ob-add-btn { flex: none; padding: 0 16px; border-radius: 10px; border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent-ink); font-family: var(--sans); font-size: 13px; font-weight: 500; cursor: pointer; transition: 0.15s; }
.ob-add-btn:hover { background: var(--accent); color: #fff; }
.ob-members { display: flex; flex-direction: column; gap: 7px; margin-top: 14px; }
.ob-member { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border: 1px solid var(--hairline-soft); border-radius: 9px; }
.ob-member .av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 600; color: #fff; flex: none; }
.ob-member .em { flex: 1; font-size: 13px; }
.ob-member .ro { font-size: 11.5px; color: var(--muted); }
.ob-member .rm { width: 22px; height: 22px; border: none; background: none; color: var(--faint); cursor: pointer; border-radius: 5px; display: grid; place-items: center; }
.ob-member .rm:hover { color: #b00020; background: rgba(176,0,32,0.08); }
.ob-member .rm svg { width: 13px; height: 13px; }

/* ---- agents / model ---- */
.ob-agentlist { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.ob-agent { display: flex; align-items: center; gap: 12px; padding: 13px 15px; border: 1px solid var(--hairline); border-radius: 11px; }
.ob-agent-ic { width: 34px; height: 34px; border-radius: 9px; background: var(--accent-soft); display: grid; place-items: center; flex: none; }
.ob-agent-ic svg { width: 17px; height: 17px; color: var(--accent); }
.ob-agent-tx { flex: 1; min-width: 0; }
.ob-agent-tx b { font-size: 13.5px; font-weight: 600; }
.ob-agent-tx span { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
.ob-sw { flex: none; width: 38px; height: 22px; border-radius: 11px; background: var(--hairline); position: relative; cursor: pointer; transition: 0.18s; }
.ob-sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.2); transition: 0.18s; }
.ob-sw.on { background: var(--accent); }
.ob-sw.on::after { transform: translateX(16px); }
.ob-callout { display: flex; gap: 11px; margin-top: 20px; padding: 14px 16px; border-radius: 11px; background: var(--surface-warm); border: 1px solid var(--hairline-soft); }
.ob-callout svg { width: 18px; height: 18px; color: var(--accent); flex: none; margin-top: 1px; }
.ob-callout p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.ob-callout b { color: var(--ink); font-weight: 500; }

/* ---- review ---- */
.ob-review { display: flex; flex-direction: column; gap: 0; margin-top: 8px; border: 1px solid var(--hairline); border-radius: 12px; overflow: hidden; }
.ob-rev-row { display: flex; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--hairline-soft); }
.ob-rev-row:last-child { border-bottom: none; }
.ob-rev-k { width: 130px; flex: none; font-size: 12px; color: var(--faint); font-family: var(--mono); letter-spacing: 0.04em; text-transform: uppercase; padding-top: 2px; }
.ob-rev-v { font-size: 13.5px; color: var(--ink); line-height: 1.5; }

/* ---- deposit-tuned card ---- */
.ob-tuned { margin-top: 16px; border: 1px solid var(--accent); border-radius: 12px; overflow: hidden; background: linear-gradient(180deg, rgba(232,163,106,0.07), rgba(232,163,106,0.02)); }
.ob-tuned-head { display: flex; gap: 11px; align-items: flex-start; padding: 14px 16px 12px; }
.ob-tuned-head svg { width: 20px; height: 20px; color: var(--accent); flex: none; margin-top: 1px; }
.ob-tuned-head b { display: block; font-size: 14px; font-weight: 600; color: var(--ink); }
.ob-tuned-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.ob-tuned-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--hairline-soft); border-top: 1px solid var(--hairline-soft); }
.ob-tuned-grid > div { background: var(--surface); padding: 10px 16px; display: flex; flex-direction: column; gap: 2px; }
.ob-tuned-grid .k { font-size: 10.5px; color: var(--faint); font-family: var(--mono); letter-spacing: 0.05em; text-transform: uppercase; }
.ob-tuned-grid .v { font-size: 12.5px; color: var(--ink); line-height: 1.4; }
.ob-tuned-note { margin: 0; padding: 11px 16px 13px; font-size: 12px; color: var(--muted); line-height: 1.5; border-top: 1px solid var(--hairline-soft); background: var(--surface); }
.ob-rev-v .muted { color: var(--muted); }

/* ---- footer nav ---- */
.ob-foot { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 16px 30px; border-top: 1px solid var(--hairline-soft); background: var(--surface); }
.ob-back { font-family: var(--sans); font-size: 13.5px; color: var(--muted); background: none; border: none; cursor: pointer; padding: 9px 4px; display: inline-flex; align-items: center; gap: 6px; }
.ob-back svg { width: 15px; height: 15px; }
.ob-back:hover { color: var(--ink); }
.ob-back.hide { visibility: hidden; }
.ob-next { font-family: var(--sans); font-size: 14px; font-weight: 600; color: #fff; background: var(--accent); border: none; border-radius: 10px; padding: 11px 22px; cursor: pointer; transition: 0.15s; display: inline-flex; align-items: center; gap: 8px; }
.ob-next svg { width: 16px; height: 16px; }
.ob-next:hover { background: var(--accent-ink); }
.ob-next:disabled { opacity: 0.45; cursor: not-allowed; background: var(--accent); }

/* ---- creating / success ---- */
.ob-creating { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 18px; text-align: center; padding: 40px; }
.ob-spin { width: 42px; height: 42px; border-radius: 50%; border: 3px solid var(--hairline); border-top-color: var(--accent); animation: ob-rot 0.8s linear infinite; }
@keyframes ob-rot { to { transform: rotate(360deg); } }
.ob-creating h2 { font-size: 21px; font-weight: 600; margin: 0; }
.ob-creating p { font-size: 14px; color: var(--muted); margin: 0; max-width: 380px; line-height: 1.55; }
.ob-creating .ob-task { font-family: var(--mono); font-size: 12px; color: var(--faint); height: 18px; }
.ob-success-badge { width: 64px; height: 64px; border-radius: 50%; background: var(--ok); display: grid; place-items: center; animation: ob-pop 0.4s cubic-bezier(0.3,1.4,0.5,1); }
.ob-success-badge svg { width: 32px; height: 32px; color: #fff; }
@keyframes ob-pop { from { transform: scale(0); } to { transform: scale(1); } }

/* ---- AOI draw map ---- */
.ob-map { margin-top: 14px; height: 340px; border-radius: 12px; overflow: hidden; border: 1px solid var(--hairline); position: relative; }
.ob-map .leaflet-container { width: 100%; height: 100%; background: #dfe6ea; font-family: var(--sans); }
.ob-map-bar { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 500; display: flex; align-items: center; gap: 8px; pointer-events: none; }
.ob-map-hint { pointer-events: none; font-family: var(--mono); font-size: 11px; color: #2A2620; background: rgba(255,255,255,0.86); padding: 5px 10px; border-radius: 7px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
.ob-map-stat { margin-left: auto; pointer-events: none; font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--accent-ink); background: rgba(255,255,255,0.92); padding: 5px 10px; border-radius: 7px; box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
.ob-map-clear { pointer-events: auto; font-family: var(--sans); font-size: 12px; color: var(--ink); background: rgba(255,255,255,0.92); border: none; padding: 5px 11px; border-radius: 7px; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
.ob-map-clear:hover { color: var(--accent); }

/* ---- inline custom ("Other") input ---- */
.ob-other { display: flex; gap: 8px; margin-top: 10px; }
.ob-other[hidden] { display: none; }
.ob-other .ob-input { flex: 1; }
.ob-chip.add { border-style: dashed; color: var(--muted); }
.ob-chip .x { margin-left: 2px; font-size: 14px; line-height: 1; opacity: 0.6; }
.ob-chip .x:hover { opacity: 1; }

@media (max-width: 760px) {
  .ob-ov { grid-template-columns: 1fr; }
  .ob-rail { display: none; }
  .ob-row2, .ob-cards, .ob-conns { grid-template-columns: 1fr; }
}

/* ===================== TUTORIAL TOUR ===================== */
.tut-ov { position: fixed; inset: 0; z-index: 9400; }
.tut-ov[hidden] { display: none; }
.tut-scrim { position: absolute; inset: 0; background: rgba(24,22,15,0.55); -webkit-backdrop-filter: blur(1px); backdrop-filter: blur(1px); transition: clip-path 0.34s ease; }
.tut-ring { position: absolute; border: 2px solid #E8A36A; border-radius: 12px; box-shadow: 0 0 0 4px rgba(232,163,106,0.25); pointer-events: none; transition: all 0.34s cubic-bezier(0.4,0,0.1,1); }
.tut-card { position: absolute; width: 320px; background: var(--surface); border-radius: 14px; box-shadow: 0 24px 70px rgba(24,22,15,0.4); padding: 20px; transition: all 0.34s cubic-bezier(0.4,0,0.1,1); }
.tut-card-step { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.tut-card h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; margin: 7px 0 7px; display: flex; align-items: center; gap: 9px; }
.tut-card h3 svg { width: 18px; height: 18px; color: var(--accent); }
.tut-card p { font-size: 13.5px; color: var(--muted); line-height: 1.55; margin: 0; text-wrap: pretty; }
.tut-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; }
.tut-dots { display: flex; gap: 6px; }
.tut-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--hairline); transition: 0.16s; }
.tut-dot.on { background: var(--accent); width: 18px; border-radius: 3px; }
.tut-btns { display: flex; gap: 8px; }
.tut-skip { font-family: var(--sans); font-size: 13px; color: var(--muted); background: none; border: none; cursor: pointer; padding: 8px 10px; }
.tut-skip:hover { color: var(--ink); }
.tut-next { font-family: var(--sans); font-size: 13.5px; font-weight: 600; color: #fff; background: var(--accent); border: none; border-radius: 9px; padding: 9px 18px; cursor: pointer; transition: 0.15s; }
.tut-next:hover { background: var(--accent-ink); }
.tut-card.center { left: 50%; top: 50%; transform: translate(-50%, -50%); width: 380px; text-align: center; }
.tut-card.center h3 { justify-content: center; font-size: 20px; }
.tut-card.center .tut-card-foot { justify-content: center; flex-direction: column; gap: 14px; }
.tut-hero { width: 56px; height: 56px; border-radius: 15px; background: var(--accent-soft); display: grid; place-items: center; margin: 0 auto 4px; }
.tut-hero svg { width: 28px; height: 28px; color: var(--accent); }

/* expand the sidebar while the tour points at the + button */
.app.__tut-nav { --nav-w: 252px; }
