/* JurisTrainer surfaces and motion. Load after page styles. All content remains
   visible without JavaScript; animation is an enhancement, never a page gate. */
:root {
  --jt-canvas:#171222; --jt-surface:#211a31; --jt-surface-deep:#191422;
  --jt-edge:rgba(190,163,243,.23); --jt-edge-bright:rgba(190,163,243,.56);
  --jt-accent:#b49af5; --jt-text:#faf7ff; --jt-copy:#c9c0d8;
  --jt-shadow:0 16px 42px rgba(5,3,12,.15);
  --jt-ease:cubic-bezier(.2,.7,.2,1);
}
html[data-theme="light"] {
  --jt-canvas:#fcfbff; --jt-surface:#fff; --jt-surface-deep:#f6f2ff;
  --jt-edge:rgba(107,78,165,.19); --jt-edge-bright:rgba(107,78,165,.5);
  --jt-accent:#7150bf; --jt-text:#292139; --jt-copy:#665c76;
  --jt-shadow:0 16px 42px rgba(58,35,97,.065);
}
html.jt-design-system body {
  background-color:var(--jt-canvas);
  background-image:none;
}
/* Only an identified ordinary browser opts into the page aura. The default is
   flat, including before deferred scripts and when JavaScript is unavailable. */
html.jt-design-system.jt-web-atmosphere body {
  background-image:radial-gradient(ellipse 75rem 42rem at 13% 0%,rgba(130,79,211,.12),transparent 68%),
                   radial-gradient(ellipse 45rem 36rem at 100% 32rem,rgba(159,117,225,.045),transparent 70%);
  background-attachment:scroll;
}
html.jt-design-system.jt-web-atmosphere[data-theme="light"] body {
  background-image:radial-gradient(ellipse 75rem 42rem at 13% 0%,rgba(130,79,211,.06),transparent 68%);
}
/* The embedded app's native safe area is this same flat canvas. Keeping the
   WebView edge flat avoids recreating a colored strip above the page. */
html.jt-design-system.jt-native-embedded body {background-image:none}
html.jt-design-system :is(.dashboard,.steps>.card,.membership-card,.lesson,.review-overview,.review-focus,.onboarding-card,.profile-menu,[data-jt-surface]),
html.jt-design-system #drill-grid>.card {
  background:linear-gradient(145deg,var(--jt-surface),var(--jt-surface-deep));
  border-color:var(--jt-edge);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035),var(--jt-shadow);
}
html.jt-design-system .membership-card-plus,
html.jt-design-system [data-jt-surface="accent"] {
  border-color:var(--jt-edge-bright);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05),0 18px 48px rgba(96,49,174,.13);
}
html.jt-design-system :is(.dashboard,.membership-card,.onboarding-card,[data-jt-surface]) {border-radius:26px}
html.jt-design-system .practice-action {
  border-color:var(--jt-edge);
  transition:border-color .2s ease,box-shadow .2s ease,transform .2s var(--jt-ease);
}
html.jt-design-system #drill-grid>.card {
  border-radius:22px;
  transition:border-color .2s ease,box-shadow .2s ease,transform .2s var(--jt-ease);
}
html.jt-design-system :is(.review-overview,.review-focus) {border-radius:21px}
html.jt-design-system .review-tabs,
html.jt-design-system .choices {border-color:var(--jt-edge)}
html.jt-design-system .review-tab[aria-pressed="true"] {
  background:color-mix(in srgb,var(--jt-accent) 13%,var(--jt-surface));
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--jt-accent) 18%,transparent);
}
html.jt-design-system :is(.metric b,.stat strong) {font-variant-numeric:tabular-nums}
html.jt-design-system :is(button,a,input,select,textarea,summary):focus-visible {
  outline:3px solid var(--jt-accent);
  outline-offset:4px;
}
html.jt-design-system :is(.auth-option,.onboarding-input) {border-radius:13px}
html.jt-design-system .auth-option {
  transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease;
}
html.jt-design-system .auth-option:focus-visible {box-shadow:0 0 0 5px color-mix(in srgb,var(--jt-accent) 12%,transparent)}
.jt-gradient-text {
  color:var(--jt-accent);
  background:linear-gradient(105deg,#bda3f6,#9167dd 65%,#d5c6f5);
  -webkit-background-clip:text;background-clip:text;
  -webkit-text-fill-color:transparent;
}
html[data-theme="light"] .jt-gradient-text {background-image:linear-gradient(105deg,#7650bd,#5e3d9f 65%,#8462b6)}

/* Optional halo belongs on an overview card, not a question or passage. */
[data-jt-ambient="halo"] {position:relative;isolation:isolate}
[data-jt-ambient="halo"]::before {
  content:"";position:absolute;inset:0;z-index:-1;border-radius:inherit;pointer-events:none;
  background:radial-gradient(ellipse at 0% 0%,rgba(170,112,242,.16),transparent 58%);
  background-size:160% 160%;
  animation:jt-halo-drift 13s ease-in-out infinite alternate paused;
}
/* Replace older large pulse/bounce loops with a quiet surface reflection. */
html.jt-design-system :is(.plus-nav-link,.profile-plus-badge,#guest-plan-cta) {
  background:linear-gradient(110deg,#61378e,#8052be 44%,#6b409f 72%,#61378e)!important;
  background-size:220% 100%!important;
  color:#fff!important;
  animation-name:jt-brand-sheen;
  animation-duration:8s;
  animation-timing-function:ease-in-out;
  animation-iteration-count:infinite;
}
html.jt-design-system #guest-plan-cta::before {
  background:linear-gradient(90deg,transparent,rgba(205,179,255,.14),transparent);
}
html.jt-design-system .plus-nav-link::after {
  animation:jt-sparkle-breathe 3.8s ease-in-out infinite;
}
html.jt-design-system #guest-plan-cta::after {animation:none!important}
html.jt-design-system :is(.plus-nav-link,.profile-plus-badge,#guest-plan-cta,[data-jt-ambient]),
html.jt-design-system :is(.plus-nav-link,.profile-plus-badge,#guest-plan-cta,[data-jt-ambient])::before,
html.jt-design-system :is(.plus-nav-link,.profile-plus-badge,#guest-plan-cta,[data-jt-ambient])::after {
  animation-play-state:paused!important;
}
html.jt-design-system :is(.plus-nav-link,.profile-plus-badge,#guest-plan-cta,[data-jt-ambient]).jt-motion-active,
html.jt-design-system :is(.plus-nav-link,.profile-plus-badge,#guest-plan-cta,[data-jt-ambient]).jt-motion-active::before,
html.jt-design-system :is(.plus-nav-link,.profile-plus-badge,#guest-plan-cta,[data-jt-ambient]).jt-motion-active::after {
  animation-play-state:running!important;
}
html.jt-design-system.jt-motion-suspended :is(.plus-nav-link,.profile-plus-badge,#guest-plan-cta,[data-jt-ambient]),
html.jt-design-system.jt-motion-suspended :is(.plus-nav-link,.profile-plus-badge,#guest-plan-cta,[data-jt-ambient])::before,
html.jt-design-system.jt-motion-suspended :is(.plus-nav-link,.profile-plus-badge,#guest-plan-cta,[data-jt-ambient])::after {
  animation-play-state:paused!important;
}
@keyframes jt-brand-sheen {0%,100%{background-position:0% 50%}50%{background-position:100% 50%}}
@keyframes jt-sparkle-breathe {0%,100%{opacity:.72;transform:scale(.94)}50%{opacity:1;transform:scale(1.05)}}
@keyframes jt-halo-drift {from{background-position:0% 0%}to{background-position:100% 50%}}
@media(hover:hover) and (pointer:fine) {
  html.jt-design-system :is(.practice-action,[data-jt-interactive]):hover,
  html.jt-design-system #drill-grid>.card:hover {
    transform:translateY(-3px);border-color:var(--jt-edge-bright);
    box-shadow:inset 0 1px rgba(255,255,255,.04),0 19px 45px rgba(69,39,119,.18);
  }
}
@media(prefers-reduced-motion:reduce) {
  html.jt-design-system {scroll-behavior:auto!important}
  html.jt-design-system :is(.plus-nav-link,.profile-plus-badge,#guest-plan-cta,[data-jt-ambient]),
  html.jt-design-system :is(.plus-nav-link,.profile-plus-badge,#guest-plan-cta,[data-jt-ambient])::before,
  html.jt-design-system :is(.plus-nav-link,.profile-plus-badge,#guest-plan-cta,[data-jt-ambient])::after {animation:none!important}
  html.jt-design-system :is(.practice-action,[data-jt-interactive],#drill-grid>.card) {transition:none!important;transform:none!important}
}
@media(forced-colors:active) {
  .jt-gradient-text {background:none;-webkit-text-fill-color:currentColor;color:CanvasText}
  html.jt-design-system :is(.dashboard,.membership-card,.onboarding-card,[data-jt-surface]) {border:1px solid CanvasText;box-shadow:none}
}
