/* Matheria welcome tour: a dimmed page with one control lit up, and a small card
   beside it. Uses the foundation tokens, so it follows the light and dark themes. */

dialog.welcome-tour:not([open]){display:none}
dialog.welcome-tour[open]{position:fixed;inset:0;display:block;width:100vw;height:100vh;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;overflow:hidden;border:0;border-radius:0;background:transparent;box-shadow:none;color:var(--ink)}
dialog.welcome-tour::backdrop{background:transparent;backdrop-filter:none}

/* The lit control: a transparent box whose huge shadow dims everything else. */
.welcome-tour-spot{position:absolute;left:0;top:0;width:0;height:0;border-radius:12px;box-shadow:0 0 0 2px var(--accent-line),0 0 0 200vmax var(--overlay);pointer-events:none}
.welcome-tour-spot[data-empty]{box-shadow:0 0 0 200vmax var(--overlay)}

.welcome-tour-card{position:absolute;left:0;top:0;display:grid;gap:8px;width:min(340px,calc(100vw - 32px));padding:14px 16px 14px 18px;border:1px solid var(--line-strong);border-radius:var(--radius-lg);background:var(--surface);color:var(--ink);box-shadow:var(--shadow-pop)}
.welcome-tour-card header{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-right:-8px}
.welcome-tour-kicker{margin:0;color:var(--accent-text);font:500 11px var(--mono);letter-spacing:.12em;text-transform:uppercase}
.welcome-tour-close{width:32px;height:32px}
.welcome-tour-card h2{margin:0;color:var(--ink);font:600 18px/1.3 var(--font);letter-spacing:-.01em;text-wrap:balance}
.welcome-tour-card h2:focus{outline:none}
.welcome-tour-body{margin:0;color:var(--ink-2);font:400 14px/1.55 var(--font);text-wrap:pretty}
.welcome-tour-note{margin:0;color:var(--faint);font:400 12.5px/1.45 var(--font)}
.welcome-tour-card footer{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;margin-top:6px}
.welcome-tour-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px;margin-left:auto}

.welcome-tour-dots{display:flex;align-items:center;gap:5px;margin:0;padding:0;list-style:none}
.welcome-tour-dots li{width:6px;height:6px;border-radius:999px;background:var(--line-strong)}
.welcome-tour-dots li.is-done{background:var(--accent-line)}
.welcome-tour-dots li.is-current{width:16px;background:var(--accent)}

/* Movement only after the first frame has painted in place. */
dialog.welcome-tour[data-ready="true"] .welcome-tour-spot{transition:transform .32s cubic-bezier(.22,.8,.24,1),width .32s cubic-bezier(.22,.8,.24,1),height .32s cubic-bezier(.22,.8,.24,1)}
dialog.welcome-tour[data-ready="true"] .welcome-tour-card{transition:transform .32s cubic-bezier(.22,.8,.24,1)}
.welcome-tour-dots li{transition:width .2s ease,background-color .2s ease}
.welcome-tour-card.is-entering>:not(footer):not(.sr-only){animation:welcome-tour-copy .24s ease-out both}
@keyframes welcome-tour-copy{from{opacity:0;transform:translateY(3px)}to{opacity:1;transform:none}}

@media (max-width:760px){
  .welcome-tour-card{padding:14px 14px 14px 16px}
  .welcome-tour-card h2{font-size:17px}
  .welcome-tour-actions .primary,.welcome-tour-actions .secondary,.welcome-tour-actions .quiet-action{min-height:40px}
}
