/* home-tour.css: the "60-second tour" on the Home page (/home). Linked ONLY from templates/home.html, together with home-tour.js. Members only (see the script).
   Owner brief 2026-10-23: an intro, skip or explore on your own, point at each part and say what it is, stupidly easy to understand.
   Look: the page's own tokens (dark panel, cyan #00E5FF to pink #FF4FA3 gradient, 16px radius, system font). Calm, nothing flashy.
   Layers (all position:fixed, above the page's highest z-index of 60): offer card 99990 < shield 100000 < ring 100001 < popover 100002.
   nginx caches /static for a year: BUMP the ?v= on both links in home.html when this file or home-tour.js changes. */

/* ---- the header button: .head > #tour-btn.tour-btn, a quiet pill with a play triangle ---- */
.tour-btn{-webkit-tap-highlight-color:transparent;display:inline-flex;align-items:center;gap:8px;min-height:34px;padding:0 14px 0 12px;border:1px solid var(--border,#30363d);border-radius:999px;background:rgba(255,255,255,.03);color:var(--muted,#8b949e);font-family:inherit;font-size:13.5px;font-weight:600;line-height:1;white-space:nowrap;cursor:pointer;touch-action:manipulation;transition:color .15s ease,border-color .15s ease,background-color .15s ease}
.tour-btn[hidden]{display:none}   /* members only: the page renders the button hidden for everyone else, and the script removes it */
.tour-btn svg{flex:none;width:12px;height:12px;color:#00e5ff}
.tour-btn:hover{color:var(--text,#e6edf3);border-color:rgba(0,229,255,.55);background:rgba(0,229,255,.07)}
.tour-btn:focus-visible{outline:2px solid #5ceaff;outline-offset:2px}
@media (max-width:679px){.tour-btn{min-height:40px}}

/* ---- shield (a transparent layer that stops accidental clicks) < ring (highlight + dimmed page) ---- */
.tt-shield{position:fixed;left:0;top:0;right:0;bottom:0;z-index:100000;background:transparent}
.tt-ring{position:fixed;z-index:100001;left:0;top:0;width:0;height:0;box-sizing:border-box;border-radius:16px;pointer-events:none;box-shadow:0 0 0 2px #00e5ff,0 0 0 9999px rgba(5,8,13,.7);animation:tt-fade .22s ease-out}
.tt-ring.tt-none{box-shadow:0 0 0 9999px rgba(5,8,13,.7)}
.tt-ring::after{content:"";position:absolute;left:-3px;top:-3px;right:-3px;bottom:-3px;border:2px solid rgba(0,229,255,.6);border-radius:inherit;animation:tt-pulse 2.4s ease-out infinite}
.tt-ring.tt-none::after{display:none}
@keyframes tt-pulse{0%{left:-3px;top:-3px;right:-3px;bottom:-3px;opacity:.7}100%{left:-13px;top:-13px;right:-13px;bottom:-13px;opacity:0}}
@keyframes tt-fade{from{opacity:0}to{opacity:1}}
@keyframes tt-rise{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}

/* phone only: an invisible block at the very end of the page while the tour runs, so the last card can be scrolled up above the bottom sheet */
.tt-spacer{display:block;width:1px;height:0;pointer-events:none}

/* ---- the popover (one step) and the offer card (first visit): same card look ---- */
.tt-pop,.tt-offer{position:fixed;box-sizing:border-box;width:340px;max-width:calc(100vw - 24px);padding:16px 18px 14px;color:#e6edf3;background:#1a212c;border:1px solid #3b4656;border-radius:16px;box-shadow:0 18px 48px rgba(0,0,0,.65);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;font-size:15px;line-height:1.5;text-align:left}
.tt-pop *,.tt-offer *{box-sizing:border-box}
.tt-pop [hidden],.tt-offer [hidden]{display:none!important}
.tt-pop{z-index:100002;left:0;top:0}
.tt-pop.tt-in{animation:tt-fade .2s ease-out}
.tt-live{max-height:calc(100vh - 190px);overflow-y:auto}
.tt-count{padding-right:44px;font-size:14px;font-weight:700;letter-spacing:.02em;color:#5ceaff}
.tt-title{margin:2px 0 6px;padding-right:30px;font-size:19px;line-height:1.25;font-weight:800;letter-spacing:-.01em;color:#fff}
.tt-text{margin:0;color:#cdd7e3;font-size:15px;line-height:1.5}
.tt-text b{color:#fff;font-weight:700}
.tt-dots{display:flex;flex-wrap:wrap;gap:7px;margin:14px 0 2px}
.tt-dots i{display:block;width:7px;height:7px;border-radius:50%;background:#3b4656}
.tt-dots i.d{background:rgba(0,229,255,.45)}
.tt-dots i.on{background:#00e5ff;box-shadow:0 0 0 3px rgba(0,229,255,.22)}
.tt-foot{display:flex;align-items:center;gap:8px;margin-top:8px}
.tt-nav{display:flex;gap:8px;margin-left:auto}

/* buttons: all at least 40px high (touch) */
.tt-btn{min-height:40px;padding:0 18px;border:1px solid transparent;border-radius:999px;font-family:inherit;font-size:15px;font-weight:700;line-height:1;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.tt-next,.tt-go{background:linear-gradient(90deg,#00e5ff,#ff4fa3);color:#0d1117;border:0}
.tt-next:hover,.tt-go:hover{filter:brightness(1.08)}
.tt-back{background:transparent;color:#e6edf3;border-color:#3b4656}
.tt-back:hover{border-color:#5a6678;background:rgba(255,255,255,.05)}
.tt-skip,.tt-quiet{padding:0 8px;background:none;color:#9aa7b6;font-weight:600;text-decoration:underline;text-underline-offset:3px}
.tt-skip{margin-left:-8px}
.tt-skip:hover,.tt-quiet:hover{color:#fff}
.tt-x{-webkit-tap-highlight-color:transparent;position:absolute;right:6px;top:6px;width:40px;height:40px;padding:0;border:0;border-radius:50%;background:none;color:#9aa7b6;font-family:inherit;font-size:26px;line-height:1;cursor:pointer;touch-action:manipulation}
.tt-x:hover{color:#fff;background:rgba(255,255,255,.07)}
.tt-btn:focus-visible,.tt-x:focus-visible{outline:2px solid #5ceaff;outline-offset:2px}

/* the caret: a small diamond on the popover edge that faces the highlighted part (set by data-side; the offset along the edge is set by the script) */
.tt-caret{display:none;position:absolute;width:14px;height:14px;background:#1a212c;border:1px solid #3b4656;transform:rotate(45deg)}
.tt-pop[data-side=bottom] .tt-caret{display:block;top:-8px;border-right:0;border-bottom:0}
.tt-pop[data-side=top] .tt-caret{display:block;bottom:-8px;border-left:0;border-top:0}
.tt-pop[data-side=right] .tt-caret{display:block;left:-8px;border-right:0;border-top:0}
.tt-pop[data-side=left] .tt-caret{display:block;right:-8px;border-left:0;border-bottom:0}

/* the offer card: small, bottom-right, never blocks the page */
.tt-offer{z-index:99990;right:20px;bottom:20px;animation:tt-rise .3s ease-out}
.tt-offer .tt-title{margin:0 0 6px;font-size:20px}
.tt-offer-d{margin:0 0 12px;color:#cdd7e3;font-size:15px;line-height:1.5}
.tt-offer-b{display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px}
.tt-offer-b .tt-quiet{margin-left:-8px}

/* under 680px both cards become full-width bottom sheets (the highlighted part is scrolled into view above the sheet) */
@media (max-width:679px){
  .tt-pop,.tt-offer{left:0!important;right:0!important;top:auto!important;bottom:0!important;width:auto;max-width:none;border-radius:16px 16px 0 0;border-bottom:0;padding-bottom:calc(14px + env(safe-area-inset-bottom,0px))}
  .tt-pop .tt-caret{display:none!important}
}

/* Windows high-contrast mode removes box-shadows: keep a visible outline around the highlighted part */
@media (forced-colors:active){
  .tt-ring{outline:3px solid Highlight;outline-offset:0}
  .tt-pop,.tt-offer{border-color:CanvasText}
}

@media (prefers-reduced-motion:reduce){
  .tt-ring,.tt-pop.tt-in,.tt-offer{animation:none}
  .tt-ring::after{display:none}
  .tour-btn{transition:none}
}
@media print{.tour-btn,.tt-shield,.tt-ring,.tt-pop,.tt-offer,.tt-spacer{display:none!important}}
