/* Learn AI (/learn-ai): the page stays hidden until the sign-in check passes (pages/learn-ai.js),
   the tab bar (one section at a time), and the one-time welcome dialog. Everything else is
   learn-ai/roadmap.css. Tokens only, so it follows Violet, Warm, light and dark. */
body[data-gate] main, body[data-gate] .xnav__right { visibility: hidden; }
/* the header's own section links are the tab bar now */
.rm .xlinks { display: none; }

/* --- tabs: sticky under the header, scroll sideways on a phone ------------------------------ */
.la-tabs {
  position: sticky; top: 72px; z-index: 35; border-bottom: 1px solid var(--line);   /* under the 72px header */
  background: var(--glass, var(--surface)); -webkit-backdrop-filter: saturate(1.5) blur(14px); backdrop-filter: saturate(1.5) blur(14px);
}
.la-tabs__list {
  max-width: var(--frame); margin: 0 auto; padding: 8px 24px; display: flex; gap: 6px;
  overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity;
}
.la-tabs__list::-webkit-scrollbar { display: none; }
.la-tab {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px;
  border: 1px solid transparent; border-radius: var(--r-btn, 10px); background: transparent; color: var(--sub);
  font: inherit; font-weight: 650; font-size: var(--fs-sm); cursor: pointer; scroll-snap-align: start;
  transition: background-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out);
}
.la-tab:hover { color: var(--ink); background: var(--tint, var(--surface-2)); }
.la-tab[aria-selected="true"] { color: var(--accent-ink); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.la-tab[aria-selected="true"] svg { color: var(--accent); }
.la-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rm main > [role="tabpanel"] { animation: la-in var(--dur-3, 320ms) var(--ease-out) both; }
@keyframes la-in { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }

/* --- the welcome dialog ------------------------------------------------------------------- */
.la-modal {
  width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 0; overflow: auto;
  border-radius: 20px; background: var(--surface); color: var(--ink);
  box-shadow: 0 30px 80px color-mix(in srgb, var(--ink) 30%, transparent), 0 0 0 1px var(--line);
}
.la-modal[open] { animation: la-pop 420ms var(--ease-spring, cubic-bezier(.2, 1.3, .4, 1)) both; }
.la-modal::backdrop { background: color-mix(in srgb, var(--ink) 45%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: la-fade 260ms ease-out both; }
@keyframes la-pop { from { opacity: 0; transform: translateY(18px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes la-fade { from { opacity: 0; } to { opacity: 1; } }
.la-modal__x {
  position: absolute; top: 12px; right: 12px; z-index: 2; width: 36px; height: 36px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: color-mix(in srgb, var(--surface) 80%, transparent); color: var(--ink); cursor: pointer;
}
.la-modal__x:hover { background: var(--surface); }
.la-modal__top {
  position: relative; display: grid; place-items: center; padding: 22px 24px 4px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, var(--surface)),
                                       color-mix(in srgb, var(--band-mint-accent) 18%, var(--surface)));
}
.la-modal__top { padding: 30px 24px 18px; }
.la-modal__bot { width: 120px; height: 108px; filter: drop-shadow(0 12px 18px color-mix(in srgb, var(--accent) 30%, transparent));
  animation: la-float 4s var(--ease-in-out) infinite; }
.la-modal__bot .wz-bot__ant { transform-origin: 20px 9px; animation: la-wave 2.4s var(--ease-in-out) infinite; }
@keyframes la-wave { 0%, 100% { rotate: 0deg; } 50% { rotate: -14deg; } }
@keyframes la-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
.la-modal__spark { position: absolute; color: var(--accent); animation: la-twinkle 2.6s var(--ease-in-out) infinite; }
.la-modal__spark--a { top: 22%; left: 18%; }
.la-modal__spark--b { top: 30%; right: 20%; animation-delay: -1.1s; color: var(--band-mint-accent); }
@keyframes la-twinkle { 0%, 100% { transform: scale(.85) rotate(0); opacity: .7; } 50% { transform: scale(1.2) rotate(18deg); opacity: 1; } }
.la-modal__body { display: grid; gap: 12px; padding: 22px 28px 26px; }
.la-modal__kicker { display: inline-flex; align-items: center; gap: 6px; justify-self: start; padding: 4px 10px; border-radius: var(--pill);
  background: var(--accent-soft); color: var(--accent-ink); font-size: var(--fs-xs); font-weight: 700; }
.la-modal__title { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.12; color: var(--ink); }
.la-modal__title em { font-style: normal; color: var(--accent-deep); }
.la-modal__line { font-weight: 600; color: var(--sub); }
.la-modal__asks { list-style: none; display: grid; gap: 10px; margin: 4px 0 6px; padding: 0; }
.la-ask {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface-2, var(--surface)); color: var(--ink); text-decoration: none;
  transition: transform var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out), box-shadow var(--dur-1) var(--ease-out);
}
.la-ask:hover, .la-ask:focus-visible { text-decoration: none; border-color: var(--accent); transform: translateY(-1px);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 18%, transparent); }
.la-ask > svg { margin-left: auto; color: var(--muted); flex: 0 0 auto; }
.la-ask__ic { width: 44px; height: 44px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; }
.la-ask--violet .la-ask__ic { background: var(--accent-soft); color: var(--accent-deep); }
.la-ask--mint .la-ask__ic { background: color-mix(in srgb, var(--band-mint-accent) 18%, var(--surface)); color: var(--band-mint-accent); }
.la-ask__txt { display: grid; gap: 2px; }
.la-ask__txt b { font-weight: 750; }
.la-ask__txt span { color: var(--sub); font-size: var(--fs-sm); }
.la-modal__go { justify-self: stretch; justify-content: center; }
.la-modal__skip { text-align: center; color: var(--muted); font-size: var(--fs-xs); }
@media (max-width: 520px) { .la-modal__body { padding: 18px 20px 22px; } .la-modal__title { font-size: 25px; } .la-modal__bot { width: 100px; height: 90px; } }
@media (prefers-reduced-motion: reduce) {
  .la-modal[open], .la-modal::backdrop, .la-modal__bot, .la-modal__bot .wz-bot__ant, .la-modal__spark, .rm main > [role="tabpanel"] { animation: none; }
}
