/* MAVX — the handful of rules Tailwind utilities can't express.
   Everything else is Tailwind classes in the markup.
   Loaded AFTER tailwind.css, so plain declarations win on equal specificity —
   the play-CDN-era !important flags are gone. */

::selection { background: rgba(59, 78, 219, 0.16); }
html { scrollbar-gutter: stable; } /* stops the sideways jump when page height crosses the scrollbar threshold */

/* Tailwind preflight's [hidden]{display:none} loses to display utilities like .flex
   (equal specificity, utilities come later). Alpine's x-show and every hidden-attribute
   toggle depend on this winning. Keep the !important. */
[hidden] { display: none !important; }

/* Alpine: prevent the flash of un-initialised markup before x-data evaluates. */
[x-cloak] { display: none !important; }

/* Scroll reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* FAQ accordion: animating grid-template-rows gives a smooth open with no layout pop */
[data-faq-panel] {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .34s cubic-bezier(.16,1,.3,1);
}
.is-open [data-faq-panel] { grid-template-rows: 1fr; }
[data-faq-panel] > * { overflow: hidden; }
[data-faq-sign] { transition: transform .3s cubic-bezier(.16,1,.3,1); }
.is-open [data-faq-sign] { transform: rotate(45deg); }

/* Reason chip selected state */
.reason-chip.is-selected { background: #A32020; border-color: #A32020; color: #fff; }

/* Tab active states */
[data-tab] { color: #64748B; font-weight: 500; border-bottom-color: transparent; }
[data-tab].is-active { color: #0F172A; font-weight: 700; border-bottom-color: #3B4EDB; }

[data-doc-tab] { color: #9AA0AC; background: transparent; }
[data-doc-tab].is-active { color: #FFFFFF; background: #23262E; }

/* HTMX: fade the swap target while a request is in flight */
.htmx-request[data-swap-fade] { opacity: .55; transition: opacity .15s ease; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  [data-faq-panel], [data-faq-sign] { transition: none; }
}
