/* Human Touch CAPTCHA — polished, accessible and theme-aware */
.aislp-captcha {
  --ht-ink: var(--aislp-fg, #1e2140);
  --ht-muted: var(--aislp-fg-2, #667085);
  --ht-line: var(--aislp-border, rgba(92, 73, 170, .16));
  --ht-primary: var(--aislp-primary, #6d28d9);
  --ht-primary-2: var(--aislp-primary-2, #8b5cf6);
  --ht-accent: var(--aislp-accent, #f59e0b);
  position: relative;
  isolation: isolate;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--ht-line);
  border-radius: var(--aislp-r-lg, 18px);
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--ht-accent) 18%, transparent), transparent 34%),
    radial-gradient(circle at 0% 100%, color-mix(in srgb, var(--ht-primary) 8%, transparent), transparent 40%),
    linear-gradient(145deg, color-mix(in srgb, var(--aislp-surface-solid, #fff) 92%, transparent), color-mix(in srgb, var(--aislp-bg, #f8fafc) 92%, var(--ht-primary) 8%));
  box-shadow: 0 16px 38px color-mix(in srgb, var(--ht-primary) 10%, transparent), inset 0 1px rgba(255,255,255,.8);
  color: var(--ht-ink);
  overflow: hidden;
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.aislp-captcha::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: auto -30px -48px auto;
  width: 132px;
  height: 132px;
  border: 1px solid color-mix(in srgb, var(--ht-primary) 12%, transparent);
  border-radius: 50%;
  pointer-events: none;
}
.aislp-captcha.is-loading { opacity: .72; }
.aislp-captcha.is-attention { border-color: var(--aislp-danger, #ef4444); box-shadow: 0 0 0 4px color-mix(in srgb, var(--aislp-danger, #ef4444) 11%, transparent), 0 16px 38px color-mix(in srgb, var(--ht-primary) 10%, transparent); animation: aislp-captcha-shake .35s ease; }
.aislp-captcha.is-error { border-color: var(--aislp-danger, #e11d48); }
.aislp-captcha.is-complete { border-color: color-mix(in srgb, var(--aislp-success, #10b981) 48%, transparent); }
.aislp-captcha__top { position: relative; z-index: 1; display: flex; align-items: center; gap: 11px; }
.aislp-captcha__top strong { display: block; font-size: 13px; letter-spacing: -.01em; }
.aislp-captcha__top p { margin: 4px 0 0; color: var(--ht-muted); font-size: 11px; line-height: 1.55; }
.aislp-captcha__badge { position: relative; flex: 0 0 36px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 13px; background: linear-gradient(135deg, var(--ht-primary), var(--ht-primary-2)); box-shadow: 0 8px 18px color-mix(in srgb, var(--ht-primary) 24%, transparent); }
.aislp-captcha__badge span { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #fff; }
.aislp-captcha__badge span:nth-child(1) { transform: translate(-6px, -5px); opacity: .75; }
.aislp-captcha__badge span:nth-child(2) { transform: translate(5px, 5px); width: 7px; height: 7px; background: #fcd34d; }
.aislp-captcha__badge span:nth-child(3) { transform: translate(7px, -6px); opacity: .55; }
.aislp-captcha__refresh { margin-inline-start: auto; position: relative; z-index: 2; width: 34px; height: 34px; padding: 0; border: 1px solid var(--ht-line); border-radius: 11px; background: rgba(255,255,255,.66); color: var(--ht-muted); cursor: pointer; transition: transform .2s ease, color .2s ease, background .2s ease, box-shadow .2s ease; }
.aislp-captcha__refresh span:first-child { display: inline-block; font-size: 19px; line-height: 1; }
.aislp-captcha__refresh:hover:not(:disabled) { transform: rotate(-18deg); color: var(--ht-primary); background: var(--aislp-surface-solid, #fff); box-shadow: 0 5px 12px color-mix(in srgb, var(--ht-primary) 13%, transparent); }
.aislp-captcha__refresh:focus-visible { outline: 3px solid color-mix(in srgb, var(--ht-primary) 30%, transparent); outline-offset: 2px; }
.aislp-captcha__refresh:disabled, .aislp-captcha__tile:disabled { cursor: wait; }
.aislp-captcha__grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 15px 0 10px; }
.aislp-captcha__tile { min-height: 56px; padding: 0; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--ht-primary) 13%, transparent); border-radius: 13px; background: color-mix(in srgb, var(--aislp-surface-solid, #fff) 62%, transparent); cursor: pointer; transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease; }
.aislp-captcha__tile:hover:not(:disabled) { transform: translateY(-3px) rotate(-1deg); border-color: color-mix(in srgb, var(--ht-primary) 38%, transparent); background: var(--aislp-surface-solid, #fff); box-shadow: 0 8px 16px color-mix(in srgb, var(--ht-primary) 14%, transparent); }
.aislp-captcha__tile:focus-visible { outline: 3px solid color-mix(in srgb, var(--ht-primary) 30%, transparent); outline-offset: 2px; }
.aislp-captcha__tile.is-picked { transform: translateY(-2px); border-color: var(--ht-primary); background: color-mix(in srgb, var(--ht-primary) 9%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ht-primary) 12%, transparent), 0 8px 16px color-mix(in srgb, var(--ht-primary) 10%, transparent); }
.aislp-captcha__mark { display: block; width: 15px; height: 15px; transform: rotate(var(--captcha-tilt)); background: var(--ht-primary); box-shadow: 0 0 0 5px color-mix(in srgb, var(--ht-primary) 12%, transparent); }
.aislp-captcha__mark--orb { border-radius: 50%; }
.aislp-captcha__mark--dot { width: 9px; height: 9px; border-radius: 50%; opacity: .72; }
.aislp-captcha__mark--ring { border: 3px solid var(--ht-primary); border-radius: 50%; background: transparent; box-shadow: none; }
.aislp-captcha__mark--diamond { border-radius: 3px; }
.aislp-captcha__mark--spark { position: relative; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle, #fff 0 11%, color-mix(in srgb, var(--ht-accent) 35%, #fff) 18%, var(--ht-accent) 47%, color-mix(in srgb, var(--ht-accent) 65%, #000) 100%); box-shadow: 0 0 0 5px color-mix(in srgb, var(--ht-accent) 18%, transparent), 0 0 20px color-mix(in srgb, var(--ht-accent) 72%, transparent); animation: aislp-captcha-pulse 1.3s ease-in-out infinite; }
.aislp-captcha__mark--spark::before, .aislp-captcha__mark--spark::after { content: ""; position: absolute; inset: 50% auto auto 50%; width: 25px; height: 1px; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--ht-accent) 80%, transparent), transparent); transform: translate(-50%, -50%); }
.aislp-captcha__mark--spark::after { transform: translate(-50%, -50%) rotate(90deg); }
.aislp-captcha__status { position: relative; z-index: 1; min-height: 17px; text-align: center; color: var(--ht-muted); font-size: 11px; }
.aislp-captcha__status::before { content: "•"; display: inline-block; margin-inline-end: 5px; color: var(--ht-primary); }
.aislp-captcha.is-complete .aislp-captcha__status { color: var(--aislp-success, #138a61); font-weight: 700; }
.aislp-captcha.is-complete .aislp-captcha__status::before { content: "✓"; }
.aislp-captcha.is-error .aislp-captcha__status { color: var(--aislp-danger, #be123c); }
.aislp-captcha.is-error .aislp-captcha__status::before { content: "!"; }
@keyframes aislp-captcha-pulse { 0%,100% { transform: scale(.9); } 50% { transform: scale(1.12); } }
@keyframes aislp-captcha-shake { 25% { transform: translateX(3px); } 75% { transform: translateX(-3px); } }
@media (max-width: 420px) { .aislp-captcha { padding: 13px; } .aislp-captcha__grid { gap: 6px; } .aislp-captcha__tile { min-height: 50px; border-radius: 11px; } .aislp-captcha__mark { width: 13px; height: 13px; } .aislp-captcha__mark--spark { width: 16px; height: 16px; } }
@media (prefers-reduced-motion: reduce) { .aislp-captcha *, .aislp-captcha { animation: none !important; transition: none !important; } }