/* The Tutorial: the button in the top bar, and the guided tour's spotlight and card (tour.js) */

.tour-btn { flex: none; display: inline-flex; align-items: center; height: 28px; padding: 0 13px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--ink-2); font: 500 12.5px var(--sans); cursor: pointer; white-space: nowrap; }
.tour-btn:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
/* at launch: a faint ring and glow that slowly comes and goes (it does not move) */
.tour-btn { position: relative; }
.tour-btn.pulse { animation: tour-glow 3s ease-in-out infinite; }
@keyframes tour-glow {
  0%, 100% { box-shadow: 0 0 0 0 transparent; }
  50% { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--accent) 16%, transparent), 0 0 10px 0 color-mix(in srgb, var(--accent) 18%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .tour-btn.pulse { animation: none; box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--accent) 16%, transparent); } }
/* room for it: the search box (which widens when used) may shrink a little more */
.topbar .search { min-width: 140px; }

/* while the tour runs the page cannot be clicked: a clear layer over it takes every click (only the card works) */
.tour-block { position: fixed; inset: 0; z-index: 899; cursor: default; }
/* the spotlight: everything else dimmed */
.tour-spot { position: fixed; z-index: 900; pointer-events: none; border-radius: 10px; box-shadow: 0 0 0 2px var(--accent), 0 0 0 9999px rgba(15, 23, 42, .45);
  transition: left .55s cubic-bezier(.4, 0, .2, 1), top .55s cubic-bezier(.4, 0, .2, 1), width .55s cubic-bezier(.4, 0, .2, 1), height .55s cubic-bezier(.4, 0, .2, 1), opacity .35s; }
@media (prefers-reduced-motion: reduce) { .tour-spot { transition: opacity .2s; } }

/* the card */
.tour-card { position: fixed; z-index: 901; width: min(340px, calc(100vw - 16px)); padding: 12px 14px 10px; border-radius: 12px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 14px 40px rgba(0, 0, 0, .28); font-family: var(--sans);
  transition: left .55s cubic-bezier(.4, 0, .2, 1), top .55s cubic-bezier(.4, 0, .2, 1); }
.tour-card-h { display: flex; align-items: center; gap: 8px; }
.tour-kicker { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); }
.tour-step { font-size: 11.5px; color: var(--ink-3); }
.tour-x { margin-left: auto; width: 26px; height: 26px; border: 0; border-radius: 7px; background: none; color: var(--ink-3); font-size: 19px; line-height: 1; cursor: pointer; }
.tour-x:hover { background: var(--surface-2); color: var(--ink); }
.tour-title { margin: 4px 0 4px; font: 600 15.5px/1.3 var(--sans); }
.tour-text { margin: 0; font: 13.5px/1.5 var(--sans); color: var(--ink-2); }
.tour-f { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.tour-gap { flex: 1; }
.tour-dots { display: flex; gap: 4px; }
.tour-dot { width: 6px; height: 6px; padding: 0; border: 0; border-radius: 50%; background: var(--line); cursor: pointer; transition: width .2s, background .2s; }
.tour-dot[aria-current="true"] { width: 16px; border-radius: 3px; background: var(--accent); }
.tour-f .btn { padding: 4px 12px; font-size: 12.5px; }
.tour-f .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--surface); font-weight: 600; }
.tour-f .btn.primary:hover { filter: brightness(1.12); }
/* while a step gets the page ready (opening an act, a menu) */
.tour-card.busy .tour-next { opacity: .6; }
/* (no "…" after the words while a step plays: it could take a new line and make the card jump) */

/* a right-click step: what is right-clicked is outlined, and a cursor presses on it (a ripple) before the menu opens */
.tour-target { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; background: var(--accent-soft) !important; }
/* the cursor: tour.js moves it (a transform, frame by frame) */
.tour-pointer { position: fixed; left: 0; top: 0; z-index: 903; width: 0; height: 0; pointer-events: none; transition: opacity .35s ease; will-change: transform; }
.tour-pointer svg { position: absolute; left: -1px; top: -1px; width: 13px; height: 21px; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .3)); }
.tour-pointer i { position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 22%, transparent); opacity: 0; }
/* a second, wider ring a beat behind the first */
.tour-pointer i::after { content: ''; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); opacity: 0; }
.tour-pointer.press i::after { animation: tour-ripple2 .75s ease-out .12s both; }
.tour-pointer.press svg { animation: tour-click .4s ease-out both; transform-origin: 0 0; }
.tour-pointer.press i { animation: tour-ripple .6s ease-out .05s both; }
@keyframes tour-click { 0%, 100% { transform: none; } 40% { transform: scale(.84); } }
.ctx-win.tour-pressed { background: var(--accent); color: var(--surface); border-color: var(--accent); transition: background .2s, color .2s; }
.tour-pointer.gone { opacity: 0; }

/* the article box, opened (drawn by the tour in place of the browser's own list) */
/* like the browser's: square, a thin grey border, a scrollbar, the lit row blue — and no animation */
.tour-dd { position: fixed; z-index: 902; overflow-y: auto; overflow-x: hidden; width: max-content; max-width: min(560px, calc(100vw - 16px)); padding: 0; background: Canvas; color: CanvasText; border: 1px solid #767676; box-shadow: 0 2px 6px rgba(0, 0, 0, .18); pointer-events: none; }
.tour-dd-o { padding: 1px 6px 1px 4px; line-height: 16px; white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.tour-dd-o.on { background: #1a73e8; color: #fff; }
/* the box while its list is open */
.tour-focus { outline: 2px solid #1a73e8 !important; outline-offset: 0; }

/* the card's words change with a short fade */
.tour-body { transition: opacity .16s ease; }
.tour-body.fade { opacity: 0; }
@keyframes tour-ripple { 0% { transform: scale(.15); opacity: 1; } 100% { transform: scale(1); opacity: 0; } }
@keyframes tour-ripple2 { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.7); opacity: 0; } }
/* what the cursor clicks flashes */
.tour-hit { animation: tour-hit .6s ease-out; }
@keyframes tour-hit { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); filter: brightness(.92); } 100% { box-shadow: 0 0 0 10px transparent; filter: none; } }
@media (prefers-reduced-motion: reduce) { .tour-pointer svg, .tour-pointer i, .tour-pointer i::after, .tour-hit { animation: none; } }

/* the window buttons named in the card, as the menu draws them */
.tour-text .ctx-win.static { width: 21px; height: 19px; font-size: 11px; margin: 0 1px; }
/* a list in the card's words: the name in one column, what it is beside it (wrapped lines stay in their column) */
.tour-lv { display: grid; grid-template-columns: max-content 1fr; column-gap: 10px; row-gap: 4px; }
.tour-lv b { white-space: nowrap; }
.tour-lv b, .tour-lv span { transition: opacity .35s, color .35s; }
.tour-lv.live > * { opacity: .45; }
.tour-lv.live > .on { opacity: 1; }
.tour-lv.live > b.on { color: var(--accent); }

/* a soft band over part of the menu, gliding from one part to the next */
.tour-band { position: fixed; z-index: 901; pointer-events: none; border-radius: 7px; background: color-mix(in srgb, var(--accent) 9%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 70%, transparent); opacity: 0;
  transition: top .75s cubic-bezier(.4, 0, .2, 1), height .75s cubic-bezier(.4, 0, .2, 1), left .75s cubic-bezier(.4, 0, .2, 1), width .75s cubic-bezier(.4, 0, .2, 1), opacity .35s; }
.tour-band.on { opacity: 1; }

/* while the tour runs, what a window shows fades in rather than appearing at once, and so do the § and its citation */
body.tour-on .pane-body > * { animation: tour-in .45s ease-out; }
body.tour-on .cite-btn.show, body.tour-on .cite-tip.show { animation: tour-in .3s ease-out; }
@keyframes tour-in { from { opacity: 0; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { body.tour-on .pane-body > *, body.tour-on .cite-btn.show, body.tour-on .cite-tip.show, .tour-band { animation: none; transition: none; } }

/* the tour opening and closing: the dimming and the card fade in where they belong (not flying in from a corner) and
   fade out at the end; while the legislation list slides, the spotlight and card keep exactly to its edge */
.tour-card { visibility: hidden; }
.tour-card.in { visibility: visible; animation: tour-card-in .38s cubic-bezier(.2, .8, .2, 1); }
.tour-card.out { opacity: 0; transform: translateY(4px); transition: opacity .25s ease-in, transform .25s ease-in; pointer-events: none; }
@keyframes tour-card-in { from { opacity: 0; transform: translateY(6px) scale(.985); } }
.tour-spot.snap, body.tour-track .tour-spot { transition: opacity .4s ease; }
.tour-card.snap, body.tour-track .tour-card { transition: none; }
@media (prefers-reduced-motion: reduce) { .tour-card.in { animation: none; } }
/* the tags explained in the tutorial's card: a key, each tag in a column of its own and what it means beside it */
.tour-key { display: grid; grid-template-columns: max-content 1fr; gap: 7px 10px; align-items: center; margin: 10px 0 8px; }
.tour-key > .chip { justify-self: start; font-size: 11px; }
.tour-key > span:not(.chip) { font-size: 12.5px; line-height: 1.35; }
.tour-key-foot { display: block; font-size: 12px; color: var(--ink-3); }
