/* First-run onboarding: the setup steps, the dashboard spotlight tour and the getting-started checklist.
   The setup screen reuses the "Add a website" layout (.add-layout, .add-form, .steps, .cta-bar) so it feels like
   the rest of the app; everything here only adds what that layout doesn't already have. */

/* Setup: header */
.onb .add-bar{gap:16px}
.onb-bar-right{display:flex;align-items:center;gap:18px;min-width:0;color:rgba(255,255,255,.8);font-size:13px}
.onb-bar-right span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.onb-signout{flex-shrink:0;padding:0;border:0;background:none;color:#fff;font-size:13px;font-weight:600;text-decoration:underline;text-underline-offset:3px}

.onb-step{display:flex;flex-direction:column;gap:32px}

/* Setup: fields */
.onb-email{font-family:var(--mono);font-size:14px}
.onb-why{display:flex;gap:12px;margin:0;padding:14px 16px;border-radius:var(--radius-sm);background:var(--accent-soft);font-size:13px;line-height:1.5;color:var(--ink)}
.onb-why svg{flex-shrink:0;margin-top:2px;stroke:var(--accent)}

/* Profile photo: the round face (also used in the live preview and the edit-profile dialog) */
.onb-face{position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;width:132px;height:132px;padding-top:.34em;border-radius:50%;background:#F5B800;color:var(--ink);font-family:var(--display);font-size:46px;font-weight:800;line-height:1}
.onb-face img{position:absolute;inset:0;width:100%;height:100%;border-radius:50%;object-fit:cover}
.onb-face.sm{width:36px;height:36px;font-size:14px}
.onb-face.md{width:88px;height:88px;font-size:32px}
.onb-face.busy::after{content:'';position:absolute;inset:-7px;border:3px solid var(--accent-line);border-top-color:var(--accent);border-radius:50%;animation:ui-spin .8s linear infinite}
.onb-face-badge{position:absolute;right:2px;bottom:2px;z-index:1;display:flex;align-items:center;justify-content:center;width:38px;height:38px;border:3px solid #fff;border-radius:50%;background:var(--ink);color:#fff}
.onb-face.md .onb-face-badge{width:30px;height:30px;right:-2px;bottom:-2px}

/* Profile photo: drop zone */
.onb-drop{position:relative;display:flex;flex-direction:column;align-items:center;gap:18px;padding:32px 24px 28px;border:2px dashed var(--line);border-radius:var(--radius);background:var(--hover);text-align:center;transition:border-color var(--fast),background var(--fast)}
.onb-drop:hover{border-color:var(--faint)}
.onb-drop.dragging{border-color:var(--accent);background:var(--accent-soft)}
.onb-drop input[type=file]{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.onb-drop-label{display:flex;flex-direction:column;align-items:center;gap:18px;cursor:pointer}
.onb-drop-label:focus-within .onb-face{box-shadow:0 0 0 3px #fff,0 0 0 5px var(--accent)}
.onb-drop-text{display:flex;flex-direction:column;gap:4px}
.onb-drop-text strong{font-size:15px;font-weight:600}
.onb-drop-text strong u{color:var(--accent);text-underline-offset:3px}
.onb-drop-text span{font-size:13px;color:var(--muted)}
.onb-photo-actions{display:flex;justify-content:center;gap:8px}

/* Setup: actions */
.onb-cta-row{display:flex;gap:10px}
.onb-cta-row .cta-bar{flex-grow:1;min-width:0}
.onb-back{height:52px;flex-shrink:0}
.onb-skip{align-self:center;padding:4px 8px;border:0;background:none;font-size:13px;font-weight:500;color:var(--muted);text-decoration:underline;text-underline-offset:3px}
.onb-skip:hover{color:var(--ink)}
.cta-bar .onb-spinner{width:14px;height:14px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:ui-spin .7s linear infinite}

/* Setup step 3: how it works */
.onb-how{display:flex;flex-direction:column;margin:0;padding:0;list-style:none;border-top:1px solid var(--line)}
.onb-how button{display:grid;grid-template-columns:32px minmax(0,1fr);align-items:start;gap:14px;width:100%;padding:16px 4px;border:0;border-bottom:1px solid var(--line);background:none;text-align:left;color:var(--ink)}
.onb-how button:hover strong{color:var(--accent)}
.onb-how-no{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:var(--radius-sm);background:var(--canvas);font-family:var(--mono);font-size:12px;transition:background var(--fast),color var(--fast)}
.onb-how button.seen .onb-how-no{background:var(--ink);color:#fff}
.onb-how button.active .onb-how-no{background:var(--accent);color:#fff}
.onb-how strong{display:block;padding-top:5px;font-size:15px;font-weight:600;transition:color var(--fast)}
.onb-how p{margin:6px 0 0;font-size:14px;line-height:1.55;color:var(--muted)}
.onb-how button:not(.active) p{display:none}

/* Setup: the preview stage on the right */
.onb-stage .preview-head span:first-child span{color:var(--muted)}
.onb-canvas{position:relative;flex-grow:1;display:flex;align-items:center;justify-content:center;min-height:0;padding:40px;border-radius:var(--radius);background:var(--stage);overflow:hidden}
.onb-scene{display:flex;flex-direction:column;align-items:center;gap:18px;width:min(100%,600px)}
.onb-caption{font-size:13px;color:var(--muted);text-align:center}
.onb-window{width:100%;background:#fff;border-radius:var(--radius);box-shadow:var(--card-shadow-hover);overflow:hidden}
.onb-window-bar{display:flex;align-items:center;gap:6px;height:36px;padding:0 14px;border-bottom:1px solid var(--line-soft);background:var(--hover)}
.onb-window-bar i{width:9px;height:9px;border-radius:50%;background:var(--line)}
.onb-window-bar em{margin-left:10px;padding:2px 10px;border:1px solid var(--line-soft);border-radius:999px;background:#fff;font-family:var(--mono);font-size:11px;font-style:normal;color:var(--muted)}
.onb-site{position:relative;display:flex;flex-direction:column;gap:10px;padding:28px 32px 30px;background:#152359;color:#F5F0E8}
.onb-site b{display:block;height:7px;border-radius:2px;background:currentColor;opacity:.25}
.onb-site b.h{height:22px;opacity:1}
.onb-site b.btn-mock{width:96px;height:26px;margin-top:8px;border-radius:999px;background:#F5B800;opacity:1}
.onb-site .pin{position:absolute;z-index:1;border-radius:var(--radius-sm);box-shadow:0 0 0 2px #fff}
.onb-site .pin.resolved{border:0}
.onb-thread{display:flex;flex-direction:column;gap:14px;padding:20px 24px 24px}
.onb-msg{display:grid;grid-template-columns:36px minmax(0,1fr);gap:12px}
.onb-msg .msg-meta{min-height:0;font-size:12px}
.onb-msg p{margin:2px 0 0;font-size:14px;line-height:1.55;overflow-wrap:anywhere}
.onb-msg.mine{position:relative;margin:0 -12px;padding:12px;border-radius:10px;background:var(--accent-soft);box-shadow:inset 0 0 0 1px var(--accent-line)}
.onb-msg.note p{padding:10px 12px;border:1px solid var(--note-line);border-radius:8px;background:var(--note)}
.onb-you-tag{position:absolute;right:12px;top:-10px;padding:2px 9px;border-radius:999px;background:var(--accent);color:#fff;font-size:11px;font-weight:700}
.onb-team{padding:1px 8px;border-radius:999px;background:var(--ink);color:#fff;font-size:11px;font-weight:600}
.onb-client{width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#152359;color:#F5F0E8;font-size:12px;font-weight:600}
.onb-card{display:flex;flex-direction:column;gap:18px;width:100%;padding:28px;border-radius:var(--radius);background:#fff;box-shadow:var(--card-shadow-hover)}
.onb-card .url-field input{pointer-events:none}
.onb-card .checklist li{height:46px}
.onb-card-title{font-family:var(--display);font-size:24px;font-weight:700;line-height:1.1;letter-spacing:-.02em;padding-top:4px}
.onb-bubble{align-self:flex-end;max-width:86%;padding:12px 14px;border-radius:14px 14px 4px 14px;background:var(--accent);color:#fff;font-size:14px;line-height:1.5}
.onb-bubble span{display:block;margin-top:6px;font-family:var(--mono);font-size:11px;opacity:.85;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.onb-composer{position:absolute;z-index:2;width:250px;padding:12px;border-radius:10px;background:#fff;box-shadow:var(--pop-shadow);color:var(--ink)}
.onb-composer>span{display:block;min-height:44px;font-size:13px;color:var(--ink)}
.onb-composer>div{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:11px;color:var(--muted)}
.onb-composer .btn{height:28px;padding:0 12px;font-size:12px}
.onb-status{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 24px;border-top:1px solid var(--line-soft);font-size:13px;color:var(--muted)}
.onb-status .segmented{pointer-events:none}

/* Spotlight tour over the dashboard */
.onb-tour{position:fixed;inset:0;z-index:95}
.onb-spot{position:fixed;border-radius:12px;box-shadow:0 0 0 4px rgba(255,255,255,.95),0 0 0 9999px rgba(21,21,21,.56);pointer-events:none;transition:left .34s var(--ease-out),top .34s var(--ease-out),width .34s var(--ease-out),height .34s var(--ease-out),border-radius .34s var(--ease-out)}
.onb-tip{position:fixed;width:340px;max-width:calc(100vw - 32px);padding:22px 22px 18px;border-radius:var(--radius);background:#fff;box-shadow:0 24px 64px rgba(21,21,21,.28);color:var(--ink);font-family:var(--sans)}
.onb-tip::before{content:'';position:absolute;left:var(--arrow-x,28px);top:-7px;width:14px;height:14px;margin-left:-7px;background:#fff;rotate:45deg;border-radius:2px}
.onb-tip.above::before{top:auto;bottom:-7px}
.onb-tip.flat::before{display:none}
.onb-tip-step{font-size:12px;font-weight:700;color:var(--accent)}
.onb-tip h3{margin:6px 32px 6px 0;padding-top:4px;font-family:var(--display);font-size:26px;font-weight:700;line-height:1.05;letter-spacing:-.02em}
.onb-tip p{margin:0;font-size:14px;line-height:1.55;color:var(--muted)}
.onb-tip p .ui-kbd{border-radius:4px}
.onb-tip-close{position:absolute;right:10px;top:10px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:0;border-radius:50%;background:none;color:var(--muted)}
.onb-tip-close:hover{background:var(--line-soft);color:var(--ink)}
.onb-tip-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:20px}
.onb-tip-foot>div{display:flex;gap:6px}
.onb-dots{display:flex;align-items:center;gap:5px}
.onb-dots i{width:6px;height:6px;border-radius:3px;background:var(--line);transition:width var(--med) var(--ease-out),background var(--med)}
.onb-dots i.on{width:18px;background:var(--accent)}

/* Getting-started checklist */
.onb-checklist{position:fixed;right:24px;bottom:24px;z-index:60;display:flex;flex-direction:column;width:360px;max-width:calc(100vw - 32px);border-radius:var(--radius);background:#fff;box-shadow:var(--pop-shadow);font-family:var(--sans);color:var(--ink);overflow:hidden}
.onb-cl-head{display:flex;align-items:center;gap:12px;width:100%;padding:14px 16px 14px 18px;border:0;background:var(--ink);color:#fff;text-align:left}
.onb-cl-head>span{display:flex;flex-direction:column;flex-grow:1;min-width:0}
.onb-cl-head strong{font-size:14px;font-weight:600}
.onb-cl-head small{font-size:12px;color:rgba(255,255,255,.7)}
.onb-cl-head svg.chev{flex-shrink:0;transition:rotate var(--med) var(--ease-out)}
.onb-checklist.collapsed .onb-cl-head svg.chev{rotate:180deg}
.onb-cl-bar{height:4px;background:var(--line-soft)}
.onb-cl-bar span{display:block;height:100%;background:var(--accent);transition:width .5s var(--ease-out)}
.onb-cl-list{display:flex;flex-direction:column;margin:0;padding:6px 0;list-style:none}
.onb-cl-item{display:grid;grid-template-columns:18px minmax(0,1fr);gap:12px;padding:10px 16px}
.onb-cl-item .check{margin-top:2px}
.onb-cl-item strong{font-size:14px;font-weight:600}
.onb-cl-item.done strong{font-weight:500;color:var(--muted);text-decoration:line-through;text-decoration-color:var(--faint)}
.onb-cl-item.current{background:var(--hover)}
.onb-cl-item p{margin:2px 0 10px;font-size:13px;line-height:1.5;color:var(--muted)}
.onb-cl-item:not(.current) p,.onb-cl-item:not(.current) .btn{display:none}
.onb-cl-done{display:flex;flex-direction:column;gap:4px;padding:18px 16px 6px}
.onb-cl-done strong{font-family:var(--display);font-size:22px;font-weight:700;letter-spacing:-.02em;padding-top:3px}
.onb-cl-done span{font-size:13px;color:var(--muted)}
.onb-cl-foot{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 16px 12px;border-top:1px solid var(--line-soft)}
.onb-cl-foot button{padding:0;border:0;background:none;font-size:12px;font-weight:500;color:var(--muted)}
.onb-cl-foot button:hover{color:var(--ink)}
.onb-checklist.collapsed{width:auto;border-radius:999px}
.onb-checklist.collapsed .onb-cl-head{padding:10px 18px 10px 22px}

@media (max-width:800px){
  .onb-bar-right span{display:none}
  .onb-face{width:112px;height:112px;font-size:40px}
  .onb-checklist{left:16px;right:16px;bottom:16px;width:auto;max-width:none}
  .onb-checklist.collapsed{left:auto}
  .onb-tip{width:auto;left:16px!important;right:16px}
}
