/* First steps for each role (web/js/screens/shell-onboarding.js and the crew's first run in shell-tips.js). Owned by the
   shell. Built on the design foundation in base.css: the ticket (stub, perforation, notches), tokens, buttons. */

/* ---------- The progress ticket on Today: a ticket whose stub says how many steps are done ---------- */
.ob-ticket { --stub-w: 96px; margin-bottom: var(--space-4); }
.ob-ticket .ticket-stub { justify-items: center; text-align: center; gap: 4px; padding: 16px 8px; align-content: start; }
.ob-stub-num { font-size: var(--fs-48); font-weight: 700; line-height: .95; }
.ob-stub-sub { font-family: var(--font-body); font-size: var(--fs-13); font-weight: 600; color: var(--stub-ink-2); line-height: 1.2; }
.ob-ticket.is-complete .ticket-stub { align-content: center; }
.ob-body { padding: 14px 16px 16px; min-width: 0; display: grid; gap: 10px; align-content: start; }
.ob-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ob-head h2, .ob-ticket h2 { margin: 0; font-size: var(--fs-18); }
.ob-hide { flex: none; margin: -6px -8px 0 0; }
.ob-next { display: grid; gap: 6px; }
.ob-next h3 { margin: 0; font-size: var(--fs-18); }
.ob-next p { margin: 0; }
.ob-next .btn-group { margin-top: 4px; }
.ob-next-label { margin: 0; font-size: var(--fs-15); font-weight: 700; color: var(--blue); }
.ob-skip { font-size: var(--fs-15); }
.ob-mini { list-style: none; margin: 0; padding: 0; display: none; }
@media (min-width: 640px) { .ob-mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); column-gap: 16px; } }
.ob-mini-link { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 6px; border-radius: var(--radius-control); color: var(--ink); text-decoration: none; font-size: var(--fs-15); font-weight: 600; }
.ob-mini-link:hover { background: var(--surface-sunk); color: var(--ink); }
.ob-mini .is-done .ob-mini-link { color: var(--ink-2); }
.ob-mini .is-done .ob-mini-link .grow { text-decoration: line-through; text-decoration-color: var(--line-firm); }
.ob-foot { margin: 0; }
.ob-foot-link { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 480px) { .ob-ticket { --stub-w: 72px; } .ob-stub-num { font-size: var(--fs-36); } .ob-body { padding: 12px 14px 14px; } }

/* A step's number, or its check once done. */
.ob-mark { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid var(--line-firm); color: var(--ink-2); font: 700 var(--fs-13)/1 var(--font-num); background: var(--surface); }
.ob-mark.is-done { background: var(--done); border-color: var(--done); color: #fff; }
.ob-mark.is-waiting { border-color: var(--warn); color: var(--warn); border-style: dashed; }
.ob-mark.is-skipped { border-style: dashed; color: var(--ink-3); }
.ob-steps .step .ob-mark { width: 32px; height: 32px; font-size: var(--fs-15); margin-top: 2px; }
.ob-powers { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.ob-powers li { display: flex; gap: 10px; align-items: flex-start; }
.ob-power-icon { display: inline-flex; flex: none; width: 32px; height: 32px; align-items: center; justify-content: center; border-radius: var(--radius-control); background: var(--blue-soft); color: var(--blue); }
.ob-welcome-foot { flex-wrap: wrap; gap: 12px; }

/* ---------- The crew's first run on /crew: three screens, then "add to home screen" ---------- */
.crew-first { display: grid; gap: 10px; border-color: var(--blue-line); margin-bottom: var(--space-4); }
.crew-first-top { display: flex; align-items: center; gap: 12px; }
.crew-first-art { display: inline-flex; flex: none; width: 48px; height: 48px; align-items: center; justify-content: center; border-radius: var(--radius-ticket); background: var(--blue-soft); color: var(--blue); }
.crew-first-count { margin: 0; flex: 1 1 auto; font-size: var(--fs-15); font-weight: 600; color: var(--ink-2); }
.crew-first-count .num { font-size: var(--fs-22); font-weight: 700; color: var(--ink); }
.crew-first-skip { flex: none; }
.crew-first h2 { margin: 0; font-size: var(--fs-22); line-height: 1.2; }
.crew-first h2:focus { outline: none; }
.crew-first h2:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
.crew-first-text { margin: 0; font-size: var(--fs-16); }
.crew-first .tip-steps { margin: 0; }
.crew-first-dots { list-style: none; margin: 2px 0 0; padding: 0; display: flex; gap: 6px; }
.crew-first-dots li { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.crew-first-dots li.is-done { background: var(--blue-line); }
.crew-first-dots li.is-here { background: var(--blue); width: 22px; border-radius: 4px; }
.crew-first-actions { display: flex; gap: 10px; margin-top: 4px; }
.crew-first-next { flex: 1 1 auto; }
.tip-local { color: var(--warn); background: var(--warn-soft); border-radius: var(--radius-control); padding: 8px 10px; }
.tip-local strong { color: var(--warn); }

/* ---------- The board tour on /schedule: each stop sits in the page above what it points at, never over it ---------- */
.coach { position: relative; margin: 0 0 16px; padding: 12px 14px 14px; border-radius: var(--radius-ticket); background: var(--ink); color: #FFFFFF; display: grid; gap: 6px; max-width: 560px; }
.coach::after { content: ""; position: absolute; left: 28px; bottom: -9px; border: 9px solid transparent; border-bottom: 0; border-top-color: var(--ink); }
.coach-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.coach-count { margin: 0; font: 600 var(--fs-13)/1.2 var(--font-num); color: #C9D0CB; }
.coach-title { margin: 0; font-size: var(--fs-18); color: #FFFFFF; }
.coach-title:focus { outline: none; }
.coach-title:focus-visible { outline: 3px solid #FFFFFF; outline-offset: 3px; border-radius: 4px; }
.coach-text { margin: 0; color: #E6E9E4; font-size: var(--fs-15); }
.coach-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.coach .btn:not(.btn-primary) { background: #FFFFFF; color: var(--ink); border-color: #FFFFFF; }
.coach .btn-link, .coach .coach-skip { color: #FFFFFF; padding-left: 0; }
.coach .btn.coach-close { color: #FFFFFF; margin: -8px -8px -8px 0; background: transparent; border-color: transparent; }
.coach .btn.coach-close:hover { background: var(--rail-hover); }
.coach :focus-visible { outline: 3px solid #FFFFFF; outline-offset: 2px; }
.coach-target { outline: 3px dashed var(--blue); outline-offset: 4px; border-radius: var(--radius-ticket); }
.ops-board > .coach, .ops-tray > .coach { margin-top: 4px; }
@media (prefers-reduced-motion: no-preference) { .coach { animation: coach-in .2s ease-out; } }
@keyframes coach-in { from { opacity: 0; transform: translateY(4px); } }

/* ---------- Account: crew work still waiting to send ---------- */
.account-waiting:not(:empty) { margin-bottom: 12px; }
.account-waiting .btn { margin-top: 6px; }
.today-drafts { margin: -4px 0 16px; }
.ob-skip, .coach-skip, .crew-first-skip { font-family: var(--font-body); }
/* Brought into view clear of the sticky top bar and the phone's tab bar. */
.coach { scroll-margin-top: calc(var(--topbar-h) + 12px); scroll-margin-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 12px); }
/* Today's jobs, as tickets. */
.today-tickets { padding: 8px 16px 16px; }
@media (min-width: 960px) { .today-tickets { padding: 8px 20px 20px; } }
.today-tickets .job-who { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-15); color: var(--ink-2); }
.today-tickets .job-who.is-missing { color: var(--warn); font-weight: 600; }
.tip-how { display: grid; gap: 8px; }
.tip-how .tip-steps { margin: 0; }

/* Guided walkthrough: a sturdy inline panel, not a modal or a decoration over work. */
.fw-tour-home{max-width:780px}.fw-tour-intro{border:1px solid var(--line);border-left:5px solid var(--blue);border-radius:10px;padding:clamp(18px,4vw,32px);background:var(--surface);margin-bottom:20px}
.fw-tour-role{font-weight:700;color:var(--blue);font-size:.88rem;margin:0 0 5px}.fw-tour-intro h1{margin:.15em 0 .3em}.fw-tour-intro p:not(.fw-tour-role){max-width:52ch}.fw-tour-intro .btn{margin-top:10px;min-height:44px}
.fw-tour-outline{border:1px solid var(--line);border-radius:10px;padding:18px;background:var(--surface)}.fw-tour-outline h2{margin:0}.fw-tour-outline ol{padding:0;list-style:none;margin:14px 0 0}.fw-tour-outline li{display:flex;gap:12px;align-items:center;border-top:1px solid var(--line);padding:10px 0}.fw-tour-outline li small{display:block;color:var(--ink-2)}.fw-tour-number{background:var(--ground);border-radius:5px;display:grid;place-items:center;min-width:30px;height:30px;color:var(--blue);font-weight:700;font-variant-numeric:tabular-nums}
.fw-tour-card,.fw-tour-resume{margin:12px auto 18px;width:min(calc(100% - 32px),1150px);background:var(--surface);border:1px solid var(--line);border-left:4px solid var(--blue);border-radius:10px;padding:16px;color:var(--ink)}
.fw-tour-card h2{font-size:1.35rem;margin:11px 0 5px}.fw-tour-card p{margin:0 0 12px;max-width:60ch}.fw-tour-card-top,.fw-tour-resume{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px}.fw-tour-count{font-size:.85rem;color:var(--ink-2);font-weight:650}.fw-tour-card progress{display:block;width:100%;height:7px;accent-color:var(--blue);margin:3px 0 0}
.fw-tour-actions{display:flex;flex-wrap:wrap;gap:8px}.fw-tour-actions .btn,.fw-tour-resume .btn{min-height:44px}.fw-tour-target{outline:3px solid var(--blue);outline-offset:2px}
@media(max-width:560px){.fw-tour-card{padding:14px}.fw-tour-card .btn-primary{min-height:56px;flex:1 0 120px}.fw-tour-actions .btn{padding-inline:10px}}

/* Setup is a working checklist, not a second marketing hero. */
.ob-launch { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(220px, .9fr); gap: 24px; padding: 24px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }
.ob-launch-label { margin: 0 0 8px; color: var(--ink-2); font-weight: 600; font-size: .85rem; }
.ob-launch h2 { margin: 0; color: var(--ink); font-size: clamp(1.3rem, 2.4vw, 1.65rem); line-height: 1.25; max-width: 26ch; }
.ob-launch-note { color: var(--ink-2); line-height: 1.6; margin: 12px 0 18px; max-width: 44ch; }
.ob-launch .ob-launch-continue { min-height: 44px; white-space: normal; text-align: left; }
.ob-launch button.ob-launch-continue { background: var(--blue); border-color: var(--blue); color: var(--blue-ink); }
.ob-launch a.ob-launch-continue { margin-top: 12px; }
.ob-launch-reassurance { color: var(--ink-2); font-size: .8rem; line-height: 1.55; margin: 12px 0 0; max-width: 44ch; }
.ob-route-map { align-self: start; border-left: 1px solid var(--line); padding: 0 0 0 20px; }
.ob-route-title { margin: 0 8px 8px; font-weight: 600; font-size: .85rem; color: var(--ink-2); }
.ob-route-map ol { list-style: none; padding: 0; margin: 0; }
.ob-route-stop { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 8px; text-align: left; background: transparent; border: 1px solid transparent; border-radius: 6px; color: var(--ink); font: inherit; cursor: pointer; }
.ob-route-stop:hover { background: var(--surface-sunk); }
.ob-route-stop.is-current { background: var(--blue-soft); border-color: var(--blue-line); }
.ob-route-stop .ob-mark { width: 28px; height: 28px; }
.ob-route-copy { min-width: 0; }
.ob-route-copy strong { display: block; font-weight: 600; font-size: .9rem; line-height: 1.4; }
.ob-route-copy small { display: block; margin-top: 2px; color: var(--ink-2); font-size: .78rem; }
.ob-launch :focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.ob-welcome .ob-progress { padding: 4px 2px; }
.ob-welcome .ob-steps { gap: 14px; }
.ob-welcome .ob-steps .step { border-radius: 16px; padding: clamp(18px, 3vw, 26px); scroll-margin-block: calc(var(--topbar-h, 64px) + 24px) 24px; }
.ob-welcome .ob-steps .step.is-next { border-color: var(--blue); box-shadow: inset 4px 0 0 var(--blue); }
.ob-welcome .ob-steps .step:focus { outline: 3px solid var(--blue); outline-offset: 3px; }
.ob-welcome .step-body { min-width: 0; }
.ob-welcome .step-body > p { line-height: 1.65; max-width: 62ch; }
.ob-welcome .ob-welcome-foot { padding-top: 12px; border-top: 1px solid var(--line); }
/* Crew first-run and the existing full-feature tour use the same generous, legible surfaces. */
.crew-first { padding: clamp(20px, 4vw, 30px); gap: 16px; border-radius: 18px; border-top: 4px solid var(--blue); }
.crew-first-art { width: 56px; height: 56px; border-radius: 16px; }
.crew-first-text { line-height: 1.65; max-width: 56ch; }
.crew-first-actions .btn { min-height: 48px; }
.fw-tour-intro, .fw-tour-outline { border-radius: 18px; }
.fw-tour-intro { border-left-width: 1px; border-top: 4px solid var(--blue); }
.fw-tour-outline { padding: clamp(18px, 3vw, 28px); }
.fw-tour-outline li { min-height: 64px; }
.fw-tour-number { min-width: 36px; height: 36px; border-radius: 11px; }
.fw-tour-card { border-radius: 16px; padding: 20px; box-shadow: 0 8px 24px #132b430a; }
@media (max-width: 680px) {
  .ob-launch { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 18px; }
  .ob-route-map { border-left: 0; border-top: 1px solid var(--line); padding: 16px 0 0; }
  .ob-launch h2 { max-width: 26ch; }
  .ob-launch-continue { width: 100%; justify-content: center; }
  .ob-route-stop { min-height: 60px; }
  .ob-welcome .ob-progress { flex-wrap: wrap; }
  .ob-welcome .ob-steps .step { gap: 12px; }
}
@media (prefers-reduced-motion: no-preference) {
  .ob-route-stop { transition: background-color .15s ease, border-color .15s ease; }
}
