/* The first-run reveal (assets/js/ems-onboard.js): the name tag flying to the
   avatar, the sidebar built from All tools' own cards, the tour bar over the
   real pages. Layers: scrim (mentor) 1100 < sidebar while it is built 1110 <
   tour bar / callouts 1120 < the tag and flying cards 1130. */

/* ── the name tag ────────────────────────────────────────────────────────── */
.onb-tag {
  position: fixed; z-index: 1130; display: flex; align-items: center; gap: 12px;
  padding: 8px 18px 8px 8px; border-radius: 999px; background: #fff;
  box-shadow: 0 18px 44px rgba(14, 21, 71, .28); pointer-events: none; transform-origin: 0 50%;
}
.onb-tag-av { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; flex: none; display: grid; place-items: center;
  background: var(--ems-navy-500, #2A3890); color: #fff; font: 700 20px/1 var(--ems-font-ui, inherit); }
.onb-tag-av > * { width: 100%; height: 100%; }
.onb-tag-av img { width: 100%; height: 100%; object-fit: cover; }
.onb-tag-txt { display: flex; flex-direction: column; gap: 2px; white-space: nowrap; }
.onb-tag-txt b { font: 700 16px/1.2 var(--ems-font-ui, inherit); color: var(--ems-navy-900, #0e1547); }
.onb-tag-txt span { font: 500 12.5px/1.2 var(--ems-font-ui, inherit); color: #5b6478; }
#acctBtn.onb-land { animation: onb-land .9s cubic-bezier(.22, 1, .36, 1); }
@keyframes onb-land {
  0% { box-shadow: 0 0 0 0 rgba(212, 160, 23, .0); transform: scale(1); }
  30% { box-shadow: 0 0 0 8px rgba(212, 160, 23, .45); transform: scale(1.12); }
  100% { box-shadow: 0 0 0 14px rgba(212, 160, 23, 0); transform: scale(1); }
}

/* ── the scrim, and the sidebar held empty until it is built ─────────────── */
.onb-scrim { position: fixed; inset: 0; z-index: 1100; background: rgba(14, 21, 71, .5); }
body.onb-side .sidebar, body.onb-at-foot .sidebar { z-index: 1110; }
body.onb-building #nav > a:not(.nav-home):not(.onb-in),
body.onb-building #nav > .nav-group:not(.onb-in) { visibility: hidden; opacity: 0; }
body.onb-building #nav > a, body.onb-building #nav > .nav-group { transition: opacity .3s ease; }
body.onb-building:not(.onb-at-foot) #sidebarConnect { visibility: hidden; opacity: 0; }
body.onb-at-foot #sidebarConnect { transition: opacity .35s ease; }
#nav > a.onb-pop { animation: onb-pop .55s cubic-bezier(.22, 1, .36, 1); }
@keyframes onb-pop {
  0% { background: rgba(212, 160, 23, .55); transform: translateX(-6px); }
  100% { background: transparent; transform: none; }
}
#sidebarConnect .onb-lit { position: relative; border-radius: 10px; box-shadow: 0 0 0 2px var(--ems-gold-500, #d4a017), 0 0 22px rgba(212, 160, 23, .55); transition: box-shadow .3s ease; }

/* ── the tour bar: at the foot of the page, which stop they are on ───────── */
.onb-bar {
  position: fixed; z-index: 1120; bottom: 20px; left: max(16px, calc(var(--onb-side, 280px) + 24px)); right: 24px;
  max-width: 760px; margin-left: auto; margin-right: auto; padding: 12px 14px 12px 18px; border-radius: 16px;
  background: var(--ems-navy-900, #0e1547); color: #fff; box-shadow: 0 22px 54px rgba(14, 21, 71, .38);
  display: flex; flex-direction: column; gap: 8px; font-family: var(--ems-font-ui, inherit);
}
.onb-stops { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font: 700 11px/1.2 var(--ems-font-ui, inherit); letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .45); }
.onb-stops li { display: inline-flex; align-items: center; gap: 6px; }
.onb-stops li::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.onb-stops li.is-done { color: rgba(255, 255, 255, .72); }
.onb-stops li.is-on { color: var(--ems-gold-400, #e8b93a); }
.onb-bar-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.onb-bar-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.onb-bar-txt b { font: 700 16px/1.3 var(--ems-font-ui, inherit); }
.onb-bar-txt span { font: 500 13.5px/1.4 var(--ems-font-ui, inherit); color: rgba(255, 255, 255, .78); font-variant-numeric: tabular-nums; }
.onb-bar .onb-go { background: var(--ems-gold-500, #d4a017); color: var(--ems-navy-900, #0e1547); padding: 12px 18px; }
.onb-bar .onb-go:hover { background: var(--ems-gold-400, #e8b93a); }
.onb-bar .onb-quiet { color: rgba(255, 255, 255, .75); }
.onb-bar .onb-quiet:hover { background: rgba(255, 255, 255, .1); color: #fff; }

/* ── a tool card flying from All tools into the sidebar ──────────────────── */
.onb-fly { position: fixed; z-index: 1130; margin: 0; padding: 0; max-width: none; transform-origin: 0 0; pointer-events: none; }
.onb-fly > .tx { list-style: none; height: 100%; margin: 0; }
.onb-fly > .tx .tx-card { height: 100%; box-shadow: 0 16px 40px rgba(14, 21, 71, .32); }
.ems-cat .tx.onb-placed .tx-kind { background: var(--ems-navy-500, #2A3890); color: #fff; }
.ems-cat .tx.onb-placed .tx-kind svg { color: #fff; }

/* ── buttons ─────────────────────────────────────────────────────────────── */
.onb-go { flex: none; display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 10px; padding: 10px 16px; cursor: pointer;
  background: var(--ems-navy-500, #2A3890); color: #fff; font: 700 14px/1 var(--ems-font-ui, inherit); }
.onb-go:hover { background: var(--ems-navy-600, #24317f); }
.onb-go:disabled { opacity: .45; cursor: default; }
.onb-go:focus-visible, .onb-quiet:focus-visible { outline: 3px solid var(--ems-gold-500, #d4a017); outline-offset: 2px; }
.onb-quiet { flex: none; border: 0; background: none; padding: 8px 10px; border-radius: 8px; cursor: pointer; color: #5b6478; font: 600 13px/1 var(--ems-font-ui, inherit); }
.onb-quiet:hover { background: #f1f2f7; color: var(--ems-navy-800, #162063); }

/* ── callouts ────────────────────────────────────────────────────────────── */
.onb-call {
  position: fixed; z-index: 1120; width: min(340px, calc(100vw - 24px)); padding: 16px 16px 12px; border-radius: 14px;
  background: #fff; box-shadow: 0 20px 50px rgba(14, 21, 71, .32); font-family: var(--ems-font-ui, inherit);
  display: flex; flex-direction: column; gap: 6px;
}
.onb-call > b { font: 700 15.5px/1.3 var(--ems-font-ui, inherit); color: var(--ems-navy-900, #0e1547); }
.onb-call > span { font: 500 13.5px/1.45 var(--ems-font-ui, inherit); color: #4b5468; }
.onb-call-acts { display: flex; justify-content: flex-end; align-items: center; gap: 6px; margin-top: 6px; }
.onb-call-acts .onb-go { white-space: normal; text-align: left; line-height: 1.25; }
/* Two real choices (step 1, or on my own): the step full width, the other under it. */
.onb-call-acts:has([data-alt]) { flex-direction: column-reverse; align-items: stretch; gap: 2px; }
.onb-call-acts:has([data-alt]) .onb-go { justify-content: center; text-align: center; }
.onb-call-rows { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.onb-call-rows li { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; transition: background .25s ease; }
.onb-call-rows li b { font: 700 13.5px/1.25 var(--ems-font-ui, inherit); color: var(--ems-navy-900, #0e1547); }
.onb-call-rows li span { font: 500 12.5px/1.4 var(--ems-font-ui, inherit); color: #5b6478; }
.onb-call-rows li.is-on { background: color-mix(in srgb, var(--ems-gold-500, #d4a017) 14%, #fff); }

@media (max-width: 760px) {
  /* The phone's sidebar box is display: contents (its nav is a strip in the
     flow), so the strip itself is lifted above the dim. */
  body.onb-side #nav, body.onb-at-foot #nav, body.onb-at-foot #sidebarConnect { position: relative; z-index: 1110; }
  .onb-bar { left: 12px; right: 12px; bottom: 12px; padding: 10px 12px 10px 14px; }
  .onb-bar-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .onb-bar .onb-quiet { align-self: flex-end; }
  .onb-tag-av { width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  #acctBtn.onb-land, #nav > a.onb-pop { animation: none; }
  #sidebarConnect .onb-lit { transition: none; }
}

/* ── a résumé / LinkedIn arriving (ems-ready.js) ───────────────────────── */
.rdy { position: fixed; inset: 0; z-index: 1150; display: grid; place-items: center; padding: 16px; }
.rdy-scrim { position: absolute; inset: 0; background: rgba(14, 21, 71, .5); }
.rdy-card { position: relative; width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 28px 26px 20px; border-radius: 18px; background: #fff;
  box-shadow: 0 24px 60px rgba(14, 21, 71, .32); text-align: center; }
.rdy-badge { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--ems-navy-500, #2A3890); color: #fff; margin-bottom: 12px; }
.rdy-k { margin: 0 0 4px; font: 700 11.5px/1.2 var(--ems-font-ui, inherit); letter-spacing: .08em; text-transform: uppercase; color: var(--ems-red-600, #a01523); }
.rdy-card h2 { margin: 0; font: 700 23px/1.25 var(--ems-font-display, var(--ems-font-ui, inherit)); color: var(--ems-navy-900, #0e1547); outline: none; }
.rdy-line { margin: 6px 0 16px; font: 400 14.5px/1.45 var(--ems-font-body, inherit); color: #4a5368; }
.rdy-tools { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; text-align: left; }
.rdy-t { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 0; margin: 0; padding: 11px 12px; border: 1px solid #e3e6f0; border-radius: 12px; background: #fff;
  cursor: pointer; box-shadow: none; color: inherit; text-align: left; transition: border-color .15s, background-color .15s; }
.rdy-t:hover, .rdy-t:focus-visible { border-color: var(--ems-navy-300, #8c96cc); background: var(--ems-navy-50, #f2f4fb); outline: none; }
.rdy-t-ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--ems-navy-50, #f2f4fb); color: var(--ems-navy-600, #24317f); }
.rdy-t-b { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.rdy-t-b b { font: 700 14.5px/1.3 var(--ems-font-ui, inherit); color: var(--ems-navy-900, #0e1547); }
.rdy-t-b em { font: 700 10.5px/1 var(--ems-font-ui, inherit); font-style: normal; letter-spacing: .04em; text-transform: uppercase; padding: 3px 6px; border-radius: 5px;
  background: var(--ems-gold-100, #fbefd0); color: var(--ems-gold-700, #8a6100); }
.rdy-t-b small { flex-basis: 100%; font: 400 13px/1.4 var(--ems-font-body, inherit); color: #5b6478; }
.rdy-t-go { flex: none; font: 700 16px/1 var(--ems-font-ui, inherit); color: var(--ems-navy-400, #5a67b4); }
.rdy-prof { margin: 0 0 10px; padding: 12px 14px; border-radius: 12px; background: #f6f7fb; text-align: left; }
.rdy-prof p { margin: 8px 0 0; font: 400 13.5px/1.45 var(--ems-font-body, inherit); color: #4a5368; }
.rdy-meter { display: block; height: 6px; border-radius: 3px; background: #e3e6f0; overflow: hidden; }
.rdy-meter i { display: block; height: 100%; border-radius: 3px; background: var(--ems-navy-500, #2A3890); }
.rdy-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
@media (max-width: 560px) { .rdy-card { padding: 22px 16px 16px; } .rdy-acts { flex-direction: column-reverse; } .rdy-acts .onb-go { justify-content: center; } }
