/* ════════════════════════════════════════════════════════════════════════════════════════════
   sid-tour.css — TOUR-1 (2026-09-28): first-login spotlight tour. Design approved by Micki 2026-09-28
   from docs/main-site/tour-prototype/ (TOUR-0); this file is the prototype's "THE TOUR" CSS, 1:1.
   Served from uploads/sid/sid-tour.css, enqueued on /dash/* only by main-site-mu/sid-tour.php.
   Every rule is scoped under .sid-tour (the layer sid-tour.js appends to <body> at start and removes
   at end), so nothing here can touch the rest of the page.

   Tokens: design-tokens.css is NOT loaded on the live pages (measured 2026-09-28), so the values the
   prototype read from --sid-* are declared once on .sid-tour as private --st-* properties with the
   SAME values (docs/main-site/DESIGN-SYSTEM.md / design/tokens.json). No new tokens:
     dim = the SiD.modal backdrop rgba(17,24,39,.55) (SPEC 3.18) · ring = accent green #55a630 (graphics)
     · card = radius 20 + modal shadow · Rubik · primary pill #3a7a1c/#2f6316 · ghost pill gray-100.
   Z-index ladder (SPEC 3.18): header pops 2147483500 < tour 2147483550-552 < toasts 2147483600 < modal 2147483601.
   Specificity: Blocksy/Elementor style bare button/h2/p/img — every control here is `.sid-tour .x`
   (0,2,0) and resets what the theme sets, so the look does not depend on the theme.
   ════════════════════════════════════════════════════════════════════════════════════════════ */
.sid-tour{
  --st-green-500:#55a630; --st-green-700:#3a7a1c; --st-green-800:#2f6316;
  --st-ink:#213631; --st-gray-700:#374151; --st-gray-500:#6b7280; --st-gray-300:#d1d5db;
  --st-gray-200:#e5e7eb; --st-gray-100:#f3f4f6;
  --st-font:'Rubik',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  --st-fs-1:.72rem; --st-fs-2:.78rem; --st-fs-3:.8125rem; --st-fs-4:.875rem; --st-fs-6:1.05rem;
  --st-r-card:20px; --st-r-pill:100px;
  --st-shadow-modal:0 18px 50px rgba(0,0,0,.22);
  --st-t-micro:.15s; --st-t-standard:.2s; --st-t-zoom:.35s;
  --tour-dim:rgba(17,24,39,.55);
  --tour-ring:var(--st-green-500);
  --tour-z:2147483550;
  position:absolute;top:0;left:0;width:0;height:0;margin:0;padding:0;border:0;
  font-family:var(--st-font);
}
.sid-tour[hidden]{display:none}
/* TOUR-1b: while a tour runs (sid-tour.js sets html.sid-tour-open), the feedback launcher (widget-bug-report.html,
   .sidfb-btn, fixed, z-index 2147483600) would paint over the card — on phones it covered the sheet's primary
   button. Hidden for exactly as long as the tour is open; the class goes on close, skip and complete. This is the
   only rule in the file that is not under .sid-tour, and it only ever hides. */
html.sid-tour-open .sidfb-btn{display:none!important}
.sid-tour *,.sid-tour *::before,.sid-tour *::after{box-sizing:border-box}
.sid-tour .sid-tour-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* Click shield: the page underneath is inert while the tour runs (the spotlit element too — a tour
   never navigates the user away mid-way; "Skip tour" is the one explicit exit). */
.sid-tour .sid-tour-shield{position:fixed;inset:0;z-index:var(--tour-z);background:transparent}
/* The spotlight: ONE element whose huge box-shadow is the dim. Absolute in document coordinates (fixed
   when the target sits in a fixed container, e.g. the stuck header), so it only moves on step change. */
.sid-tour .sid-tour-spot{position:absolute;z-index:2147483551;pointer-events:none;border-radius:14px;
  box-shadow:0 0 0 2px var(--tour-ring),0 0 0 9999px var(--tour-dim);
  transition:top var(--st-t-zoom) cubic-bezier(.2,.7,.2,1),left var(--st-t-zoom) cubic-bezier(.2,.7,.2,1),
             width var(--st-t-zoom) cubic-bezier(.2,.7,.2,1),height var(--st-t-zoom) cubic-bezier(.2,.7,.2,1),
             border-radius var(--st-t-zoom) ease}
.sid-tour .sid-tour-spot.is-fixed{position:fixed}
.sid-tour .sid-tour-spot.is-center{box-shadow:0 0 0 0 transparent,0 0 0 9999px var(--tour-dim)}
/* The one flourish (Micki: yes, 2026-09-28): a single soft halo when the ring lands. Never loops. */
.sid-tour .sid-tour-spot::after{content:'';position:absolute;inset:0;border-radius:inherit;opacity:0}
.sid-tour .sid-tour-spot.is-landed::after{animation:sidTourHalo .7s ease-out .25s 1}
@keyframes sidTourHalo{0%{opacity:1;box-shadow:0 0 0 0 rgba(85,166,48,.55)}100%{opacity:0;box-shadow:0 0 0 14px rgba(85,166,48,0)}}

/* The card — anatomy eyebrow → title → body → actions (SPEC 1.8), card canon radius 20, modal shadow */
.sid-tour .sid-tour-card{position:absolute;z-index:2147483552;width:360px;max-width:calc(100vw - 32px);background:#fff;
  border-radius:var(--st-r-card);box-shadow:var(--st-shadow-modal);padding:22px 24px 20px;font-family:var(--st-font);
  color:var(--st-ink);text-align:left;opacity:0;transform:translateY(6px);transition:opacity var(--st-t-standard) ease,transform var(--st-t-standard) ease}
.sid-tour .sid-tour-card.is-fixed{position:fixed}
.sid-tour .sid-tour-card.is-in{opacity:1;transform:none}
.sid-tour .sid-tour-card.is-center{position:fixed;width:400px}
.sid-tour .sid-tour-card:focus{outline:none}
.sid-tour .sid-tour-arrow{position:absolute;width:14px;height:14px;background:#fff;transform:rotate(45deg);border-radius:3px}
.sid-tour .sid-tour-card[data-side="bottom"] .sid-tour-arrow{top:-6px}
.sid-tour .sid-tour-card[data-side="top"] .sid-tour-arrow{bottom:-6px}
.sid-tour .sid-tour-card[data-side="right"] .sid-tour-arrow{left:-6px}
.sid-tour .sid-tour-card[data-side="left"] .sid-tour-arrow{right:-6px}
.sid-tour .sid-tour-card[data-side="none"] .sid-tour-arrow{display:none}
/* Welcome illustration (waving-2, Micki: yes). Scoped img rule: `.elementor img{height:auto}` must never win. */
.sid-tour .sid-tour-ill{display:none;height:118px;margin:-22px -24px 18px;border-radius:var(--st-r-card) var(--st-r-card) 0 0;background:#fff;border-bottom:1px solid var(--st-gray-100);
  overflow:hidden;position:relative}
.sid-tour .sid-tour-ill img{position:absolute;left:50%;top:-6px;height:200px;width:auto;max-width:none;max-height:none;margin:0;border:0;border-radius:0;box-shadow:none;transform:translateX(-50%)}
.sid-tour .sid-tour-card.has-ill .sid-tour-ill{display:block}
.sid-tour .sid-tour-top{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:20px;margin:0 0 6px}
.sid-tour .sid-tour-eyebrow{font-size:var(--st-fs-1);font-weight:700;line-height:1.4;text-transform:uppercase;letter-spacing:.6px;color:var(--st-green-500)}
.sid-tour .sid-tour-title{font-family:var(--st-font);font-size:var(--st-fs-6);font-weight:800;line-height:1.3;letter-spacing:normal;text-transform:none;margin:0 0 6px;padding:0;color:var(--st-ink)}
.sid-tour .sid-tour-title:focus{outline:none}
.sid-tour .sid-tour-body{font-family:var(--st-font);font-size:var(--st-fs-4);font-weight:400;line-height:1.6;color:var(--st-gray-700);margin:0;padding:0}
.sid-tour .sid-tour-body a{color:var(--st-green-700);font-weight:600;text-decoration:underline;text-underline-offset:2px}
.sid-tour .sid-tour-body a:hover{color:var(--st-green-800)}
.sid-tour .sid-tour-body strong{font-weight:700;color:inherit}
.sid-tour .sid-tour-meta{display:flex;align-items:center;gap:6px;margin:10px 0 0;padding:0;font-size:var(--st-fs-2);font-weight:600;line-height:1.4;color:var(--st-gray-500)}
.sid-tour .sid-tour-meta[hidden]{display:none}
.sid-tour .sid-tour-meta svg{flex:none}
.sid-tour .sid-tour-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:18px}
.sid-tour .sid-tour-prog{display:flex;align-items:center;gap:10px;min-width:0}
.sid-tour .sid-tour-dots{display:flex;gap:4px}
.sid-tour .sid-tour-dots i{display:block;width:6px;height:6px;border-radius:100px;background:var(--st-gray-300);font-style:normal;transition:width var(--st-t-standard) ease,background var(--st-t-standard) ease}
.sid-tour .sid-tour-dots i.on{width:16px;background:var(--st-green-500)}
.sid-tour .sid-tour-dots i.done{background:var(--st-green-700)}
.sid-tour .sid-tour-count{font-size:var(--st-fs-2);font-weight:600;line-height:1.4;color:var(--st-gray-500);white-space:nowrap}
.sid-tour .sid-tour-actions{display:flex;gap:8px;margin-left:auto}
/* Buttons: the ONE button system (SPEC 3.1) — primary + ghost pills, 44px touch floor, never two greens.
   Full reset of what Blocksy's button styles set (height, text-transform, letter-spacing, shadow, border). */
.sid-tour .sid-tour-btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;height:auto;min-width:0;padding:10px 18px;margin:0;border-radius:var(--st-r-pill);
  font-family:inherit;font-size:var(--st-fs-4);font-weight:700;line-height:1.2;letter-spacing:normal;text-transform:none;border:0;box-shadow:none;cursor:pointer;white-space:nowrap;
  transition:background var(--st-t-micro) ease,transform var(--st-t-micro) ease;text-decoration:none}
.sid-tour .sid-tour-btn:active{transform:scale(.98)}
.sid-tour .sid-tour-btn--primary{background:var(--st-green-700);color:#fff}
.sid-tour .sid-tour-btn--primary:hover{background:var(--st-green-800);color:#fff}
.sid-tour .sid-tour-btn--ghost{background:var(--st-gray-100);color:var(--st-gray-700)}
.sid-tour .sid-tour-btn--ghost:hover{background:var(--st-gray-200);color:var(--st-gray-700)}
.sid-tour .sid-tour-btn[hidden]{display:none}
/* "Skip tour": a quiet text control in the card's top row — 44px hit area, compact visual */
.sid-tour .sid-tour-skip{font-family:inherit;font-size:var(--st-fs-3);font-weight:600;line-height:1.2;letter-spacing:normal;text-transform:none;color:var(--st-gray-500);background:none;border:0;box-shadow:none;cursor:pointer;
  padding:12px 10px;margin:-12px -10px -12px 0;min-height:44px;height:auto;border-radius:var(--st-r-pill)}
.sid-tour .sid-tour-skip:hover{color:var(--st-gray-700);background:none;text-decoration:underline;text-underline-offset:2px}
.sid-tour .sid-tour-skip[hidden]{display:none}
/* Finish: the signature check (SPEC 3.13 / 3.10) — a completion is the one thing it is for */
.sid-tour .sid-tour-done{display:none;width:44px;height:44px;border-radius:50%;background:var(--st-green-700);align-items:center;justify-content:center;margin-bottom:14px}
.sid-tour .sid-tour-card.is-finish .sid-tour-done{display:flex}
.sid-tour .sid-tour-done svg{width:22px;height:22px;overflow:visible}
.sid-tour .sid-tour-done polyline{fill:none;stroke:#fff;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:30;stroke-dashoffset:30}
.sid-tour .sid-tour-card.is-finish.is-in .sid-tour-done polyline{animation:sidTourSign .45s ease-out .15s forwards}
@keyframes sidTourSign{to{stroke-dashoffset:0}}

/* Phones: the card docks to the bottom as a sheet; the spotlight stays visible above it */
@media (max-width:500px){
  .sid-tour .sid-tour-card,.sid-tour .sid-tour-card.is-center,.sid-tour .sid-tour-card.is-fixed{position:fixed;left:0!important;right:0;top:auto!important;bottom:0;width:auto;max-width:none;
    border-radius:var(--st-r-card) var(--st-r-card) 0 0;padding:20px 18px calc(16px + env(safe-area-inset-bottom));transform:translateY(16px)}
  .sid-tour .sid-tour-card.is-in{transform:none}
  .sid-tour .sid-tour-card .sid-tour-arrow{display:none}
  .sid-tour .sid-tour-ill{margin:-20px -18px 16px}
  .sid-tour .sid-tour-card::before{content:'';display:block;width:36px;height:4px;border-radius:100px;background:var(--st-gray-200);margin:-8px auto 12px}
  .sid-tour .sid-tour-card.has-ill::before{display:none}
  .sid-tour .sid-tour-foot{flex-wrap:wrap}
}

/* Reduced motion: complete near-instantly (.01ms pattern, never animation:none — SPEC 2.5) */
@media (prefers-reduced-motion:reduce){
  .sid-tour .sid-tour-spot,.sid-tour .sid-tour-card,.sid-tour .sid-tour-dots i{transition-duration:.01ms!important}
  .sid-tour .sid-tour-spot.is-landed::after{animation-duration:.01ms!important;animation-delay:0s!important}
  .sid-tour .sid-tour-card.is-finish.is-in .sid-tour-done polyline{animation-duration:.01ms!important;animation-delay:0s!important}
}
