/* the walkthrough (lib/tour.js): a spotlight tour and the one-card tips. Tokens only. */

/* above the sticky top bar (20), toasts (40) and the skip link (50); a <dialog> opened later
   is in the top layer, and the tour closes itself when one opens */
.tour{position:fixed;inset:0;z-index:60}
.tour-block{position:absolute;inset:0}                 /* the page behind cannot be clicked */

/* the cut-out: a box over the target whose huge shadow is the dimmed page */
.tour-hole{position:fixed;border-radius:var(--r-m);pointer-events:none;
  box-shadow:0 0 0 2px var(--accent),0 0 0 200vmax var(--scrim);
  transition:left .2s ease,top .2s ease,width .2s ease,height .2s ease}
.tour-hole.none{box-shadow:0 0 0 200vmax var(--scrim);transition:none}

.tour-card,.tour-tip{position:fixed;left:0;top:0;width:min(340px,calc(100vw - 24px));padding:var(--s3) var(--s4) var(--s4);
  background:var(--bg);color:var(--text);border:1px solid var(--line);border-radius:var(--r-l);box-shadow:var(--shadow)}
.tour-card{transition:left .2s ease,top .2s ease;animation:tour-in .18s ease}
@keyframes tour-in{from{opacity:0}to{opacity:1}}

.tour-head{display:flex;align-items:center;gap:var(--s2);min-height:30px;margin-bottom:var(--s1)}
.tour-count{color:var(--text-3);font-size:var(--fs-xs);font-variant-numeric:tabular-nums}
.tour-dots{display:inline-flex;gap:var(--s1)}
.tour-dots i{width:6px;height:6px;border-radius:var(--r-pill);background:var(--line-strong)}
.tour-dots i.on{background:var(--accent)}
.tour-x{width:30px;height:30px;margin-left:auto;margin-right:calc(var(--s2)*-1);flex:none}
.tour-x svg{width:16px;height:16px}
.tour-title{margin:0 0 var(--s1);font-size:var(--fs-m);font-weight:600;line-height:1.35;color:var(--text)}
.tour-body{margin:0;color:var(--text-2);font-size:var(--fs-s);line-height:1.5}
.tour-foot{display:flex;align-items:center;gap:var(--s2);margin-top:var(--s4)}
.tour-foot .tour-skip{margin-left:calc(var(--s2)*-1)}
.tour-grow{flex:1}
@media (pointer:coarse){.tour-foot .btn{height:36px;padding:0 14px}.tour-x{width:36px;height:36px}}

/* a tip: the same card, smaller, over the page without dimming it */
.tour-tip{z-index:45;width:min(300px,calc(100vw - 24px));padding:var(--s2) var(--s4) var(--s3);border-color:var(--line-strong);animation:tour-in .18s ease}
.tour-tip .tour-head{margin-bottom:0}
.tour-tip .tour-title{margin:0;font-size:var(--fs-s)}

@media (prefers-reduced-motion:reduce){
  .tour-hole,.tour-card,.tour-tip{transition:none!important;animation:none!important}
}
