/* In-product help: the (?) in each desk card's bar with its note (help-popover.js), and the first-run tour's hint card
   (tour.js). The terminal's own look: paper and grain, hairline rules, the sans for words, the serif for the title, and
   the one accent (oxblood) for the ring and the step's main button. No colours beyond the tokens. */

/* ---- the (?) and its note ---- */
.widget-actions .desk-help{display:inline-flex;align-items:center}
.widget-actions .desk-help-button{display:inline-grid;place-items:center;width:18px;height:18px;min-width:18px;margin:0 4px 0 2px;padding:0;border:1px solid var(--rule);border-radius:50%;background:transparent;color:var(--ink-3);font:600 .62rem/1 var(--sans);cursor:pointer}
.widget-actions .desk-help-button:hover,.widget-actions .desk-help.is-open .desk-help-button{color:var(--ink);border-color:var(--ink-3);background:var(--paper-2)}
.widget-actions .desk-help-button:focus-visible{outline:2px solid var(--oxblood);outline-offset:2px}
/* a 32 px hit area around the 18 px circle on touch screens, without moving the bar */
@media(pointer:coarse){.widget-actions .desk-help-button{position:relative}.widget-actions .desk-help-button::after{content:"";position:absolute;inset:-7px}}
.desk-help-note{position:fixed;inset:auto;margin:0;z-index:80;box-sizing:border-box;width:260px;max-width:calc(100vw - 16px);padding:10px 12px 11px;border:1px solid var(--rule);border-radius:10px;background-color:var(--paper);background-image:var(--grain);color:var(--ink);box-shadow:0 10px 34px #0002;font:400 .76rem/1.45 var(--sans);text-align:left;white-space:normal;cursor:auto;overflow:visible}
.desk-help-note[hidden]{display:none}
.desk-help-note p{margin:0;color:var(--ink-2)}
.desk-help-note a{display:inline-block;margin-top:6px;color:var(--ink);font-weight:500;text-decoration:underline;text-decoration-color:var(--rule);text-underline-offset:3px}
.desk-help-note a:hover{text-decoration-color:var(--oxblood)}
.desk-help-note a:focus-visible{outline:2px solid var(--oxblood);outline-offset:2px;border-radius:2px}

/* ---- the tour ---- */
.tour-ring{position:fixed;z-index:84;pointer-events:none;border-radius:calc(var(--r-card) + 2px);box-shadow:0 0 0 2px var(--oxblood),0 0 0 100vmax #0002}
.tour-card{position:fixed;z-index:85;box-sizing:border-box;width:340px;padding:12px 16px 14px;border:1px solid var(--rule);border-radius:var(--r-card);background-color:var(--paper);background-image:var(--grain);color:var(--ink);box-shadow:0 18px 60px #0003;font:400 .82rem/1.5 var(--sans)}
/* quick taps on Next or Back are two clicks, not a double-tap zoom that swallows the second (iOS) */
.tour-card,.tour-card button{touch-action:manipulation}
.tour-card:focus{outline:none}
.tour-card:focus-visible{outline:2px solid var(--oxblood);outline-offset:2px}
.tour-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.tour-count{font:500 .66rem/1 var(--sans);color:var(--ink-3);font-variant-numeric:tabular-nums}
.tour-close{border:0;background:transparent;color:var(--ink-3);font-size:1.05rem;line-height:1;padding:4px 6px;margin-right:-6px;border-radius:4px;cursor:pointer}
.tour-close:hover{color:var(--ink);background:var(--paper-2)}
.tour-title{margin:4px 0 0;font:italic 1.25rem/1.15 var(--fell);color:var(--ink);letter-spacing:0}
.tour-body{margin:6px 0 0;color:var(--ink-2)}
.tour-nav{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}
.tour-nav button{min-height:30px;padding:6px 14px;border:1px solid var(--rule);border-radius:999px;background:transparent;color:var(--ink-2);font:500 .72rem/1 var(--sans);cursor:pointer}
.tour-nav button:hover:not(:disabled){border-color:var(--ink-3);color:var(--ink)}
.tour-nav button:disabled{opacity:.4;cursor:default}
.tour-nav .tour-next{background:var(--oxblood);border-color:var(--oxblood);color:var(--paper)}
.tour-nav .tour-next:hover{filter:brightness(1.08);color:var(--paper)}
.tour-card button:focus-visible{outline:2px solid var(--oxblood);outline-offset:2px}
/* the arrow: a small square turned on the card's edge that faces the target, in the card's own paper and rule */
.tour-arrow{position:absolute;width:12px;height:12px;background:var(--paper);border:1px solid var(--rule);transform:rotate(45deg);pointer-events:none}
.tour-card[data-arrow=none] .tour-arrow{display:none}
.tour-card[data-arrow=top] .tour-arrow{top:-7px;left:calc(var(--arrow-at,24px) - 6px);border-right:0;border-bottom:0}
.tour-card[data-arrow=bottom] .tour-arrow{bottom:-7px;left:calc(var(--arrow-at,24px) - 6px);border-left:0;border-top:0}
.tour-card[data-arrow=left] .tour-arrow{left:-7px;top:calc(var(--arrow-at,24px) - 6px);border-right:0;border-top:0}
.tour-card[data-arrow=right] .tour-arrow{right:-7px;top:calc(var(--arrow-at,24px) - 6px);border-left:0;border-bottom:0}
/* a phone: the card docks to the foot of the screen, under the target scrolled above it */
.tour-card[data-mode=dock]{padding:10px 14px calc(12px + env(safe-area-inset-bottom,0px))}
.tour-card[data-mode=dock] .tour-title{font-size:1.12rem}
/* each new hint fades in; the card and the ring follow the page frame by frame, so they never trail behind a scroll */
@media(prefers-reduced-motion:no-preference){
  .tour-card.tour-enter{animation:tour-enter .2s ease-out}
  .tour-ring.tour-enter{animation:tour-ring .2s ease-out}
}
@keyframes tour-enter{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
@keyframes tour-ring{from{opacity:0}to{opacity:1}}
