/* Optional product tour (js/features/tour.js). Non-modal: no scrim, and the
   highlight ring ignores pointer events so the app remains usable. Sits below
   modals (150) so a dialog opened mid-tour stays on top. */
.tour-ring {
  position: fixed;
  z-index: 140;
  border: 2px solid var(--brand);
  border-radius: var(--r);
  box-shadow: 0 0 0 4px var(--brand-dim);
  pointer-events: none;
  transition: top .18s ease, left .18s ease, width .18s ease, height .18s ease;
}
.tour-pop {
  position: fixed;
  z-index: 145;
  width: min(340px, calc(100vw - 24px));
  padding: 16px 16px 14px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border2);
  border-top: 3px solid var(--brand);
  border-radius: var(--r);
  box-shadow: var(--shadow-float);
}
.tour-pop.is-docked {
  left: 12px;
  right: 12px;
  bottom: 72px; /* above the mobile tab bar */
  width: auto;
}
.tour-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.tour-count { font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
.tour-close {
  width: 32px; height: 32px; margin: -6px -6px 0 0;
  border: 0; background: transparent; color: var(--muted);
  font-size: 20px; line-height: 1; cursor: pointer; border-radius: var(--r2);
}
.tour-close:hover { color: var(--ink); background: var(--surface2); }
.tour-title { font-family: var(--font-display); font-size: 18px; line-height: 1.2; color: var(--ink); margin: 0 0 6px; }
.tour-title:focus { outline: none; }
.tour-title:focus-visible { outline: none; } /* focus is placed here for screen readers, not as a control */
.tour-body { font-size: 13px; line-height: 1.6; color: var(--muted); margin: 0 0 14px; }
.tour-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tour-nav { display: flex; gap: 6px; }
.tour-actions .btn.sm { min-height: 36px; }
.tour-pop button:focus-visible, .tour-close:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.tour-connect { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: -4px 0 14px; padding: 10px 12px; background: var(--brand-dim); border-radius: var(--r2); font-size: 12.5px; color: var(--muted); }
.tour-connect[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .tour-ring { transition: none; } }

/* Standalone invitation before the optional contextual tour. */
.postiq-welcome-backdrop { position: fixed; inset: 0; z-index: 210; display: grid; place-items: center; padding: 20px; background: rgba(10, 12, 19, .76); backdrop-filter: blur(7px); }
.postiq-welcome { width: min(530px, 100%); max-height: min(90vh, 720px); overflow: auto; padding: clamp(24px, 5vw, 48px); border: 1px solid var(--border2); border-radius: 20px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-float); }
.postiq-welcome-eyebrow { display: block; font: 11px 'DM Mono', monospace; letter-spacing: .14em; color: var(--brand); margin-bottom: 20px; }
.postiq-welcome h2 { font-family: var(--font-display); font-size: clamp(28px, 5vw, 40px); line-height: 1.07; margin: 0 0 18px; color: var(--ink); }
.postiq-welcome h2 em { font-style: normal; color: var(--brand); }
.postiq-welcome p { font-size: 15px; line-height: 1.6; color: var(--muted); margin: 0; }
.postiq-welcome-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 20px; }
.postiq-welcome-actions .btn { min-height: 44px; padding-inline: 18px; }
.postiq-welcome .postiq-welcome-footnote { font-size: 12px; }
.postiq-welcome button:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
@media (max-width: 520px) { .postiq-welcome-actions { flex-direction: column; } .postiq-welcome-actions .btn { justify-content: center; width: 100%; } }

.tour-extra-action { display:block; margin:0 0 12px; }
.tour-extra-action[hidden] { display:none; }

/* A calendar drawer should never cover an active tour explanation. */
body.tour-active .tour-ring { z-index:205; }
body.tour-active .tour-pop { z-index:206; }
body.tour-active .tour-pop.is-docked { bottom:14px; }

/* Full-width, standalone setup panel keeps checklist out of the narrow sidebar. */
.getting-started-dialog { width:min(580px,calc(100vw - 32px)); max-height:min(85dvh,760px); overflow:auto; padding:0; border:1px solid var(--border2); border-radius:18px; background:var(--surface); color:var(--text); box-shadow:var(--shadow-float); }
.getting-started-dialog::backdrop { background:rgba(10,12,19,.65); backdrop-filter:blur(3px); }
.getting-started-dialog-head { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; padding:28px 28px 18px; border-bottom:1px solid var(--border); }
.getting-started-dialog-head h2 { font:700 26px var(--font-display); color:var(--ink); margin:6px 0; }
.getting-started-dialog-head p { font-size:13px; color:var(--muted); line-height:1.5; margin:0; }
.gs-eyebrow { font:10px 'DM Mono',monospace; letter-spacing:.13em; color:var(--brand); }
.getting-started-dialog .getting-started { padding:22px 28px 28px; margin:0; background:none; border:0; box-shadow:none; }
.getting-started-dialog .gs-head { display:flex; justify-content:space-between; gap:12px; align-items:center; margin-bottom:18px; }
.getting-started-dialog .gs-title { display:none; }
.getting-started-dialog .gs-progress { font-size:12px; font-weight:700; color:var(--ink); }
.getting-started-dialog .gs-subtitle { font-size:11px; color:var(--muted); }
.getting-started-dialog .gs-steps { padding:0; margin:0; display:grid; gap:10px; list-style:none; }
.getting-started-dialog .gs-step { display:grid; grid-template-columns:24px minmax(0,1fr) auto; align-items:center; gap:12px; padding:14px; border:1px solid var(--border); border-radius:10px; background:var(--surface2); }
.getting-started-dialog .gs-check { color:var(--subtle); font-size:18px; }
.getting-started-dialog .gs-step.is-done .gs-check { color:var(--green); }
.getting-started-dialog .gs-step-body { display:flex; flex-direction:column; gap:4px; min-width:0; }
.getting-started-dialog .gs-step-label { color:var(--ink); font-size:14px; font-weight:700; }
.getting-started-dialog .gs-step-desc { color:var(--muted); font-size:12px; line-height:1.5; }
.getting-started-dialog .gs-step .btn { min-height:32px; }
@media(max-width:480px){ .getting-started-dialog-head { padding:20px 18px 14px; } .getting-started-dialog .getting-started { padding:18px; } .getting-started-dialog .gs-step { grid-template-columns:20px 1fr; } .getting-started-dialog .gs-step .btn { grid-column:2; width:fit-content; } }
