/* Brand finish: restrained motion, chrome security seal, and a focused light form. */
:root {
  --ink: #252035;
  --purple: #5335C1;
  --brand: #5335C1;
  --brand-light: #8068d4;
  --brand-deep: #422a9a;
}
body { background: #191039; }
.ambient {
  background: radial-gradient(ellipse at 50% 20%, var(--brand) 0, #382481 31%, transparent 65%),
    radial-gradient(ellipse at 100% 90%, #332265 0, transparent 55%),
    linear-gradient(140deg, #24164e, #15102b 75%);
}
.ambient::before {
  content: ""; position: absolute; inset: -25%; opacity: .65;
  background: radial-gradient(ellipse at 52% 34%, #8068d426, transparent 35%), radial-gradient(ellipse at 30% 70%, #5335C10e, transparent 40%);
  animation: ambient-breathe 18s ease-in-out infinite alternate;
  will-change: transform;
}
.ambient::after {
  opacity: .2; background-size: 56px 56px;
  background-image: linear-gradient(#ddc9f40b 1px, transparent 1px), linear-gradient(90deg, #ddc9f40b 1px, transparent 1px);
  mask-image: linear-gradient(transparent, #000 68%, transparent);
}
.ambient-orbit { border-color: #d1b8eb0d; width: 115vw; height: 115vw; max-width: 1400px; max-height: 1400px; }
.orbit-a { left: -72vw; top: 14%; }
.orbit-b { right: -70vw; bottom: -60%; }
.topbar { position: relative; }
.brand-logo { border: 0; border-radius: 0; box-shadow: none; background: none; opacity: .96; }
.official-badge {
  padding: 8px 11px; border: 1px solid #d1b9ec2b; border-radius: 24px;
  background: #ffffff04; color: #d2c1e3; font-size: 12px; letter-spacing: .5px;
}
.official-badge svg { color: #c2a4e5; }
.security-art { position: relative; width: min(252px, 33vh); isolation: isolate; }
.security-art::before {
  content: ""; position: absolute; inset: 2%; z-index: -1; border-radius: 50%;
  background: conic-gradient(from 25deg, transparent 0 22%, #cfb3f290 24%, transparent 29% 70%, #b897d859 73%, transparent 78%);
  -webkit-mask: radial-gradient(transparent 68%, #000 69% 70%, transparent 71%);
  mask: radial-gradient(transparent 68%, #000 69% 70%, transparent 71%);
  animation: orbit-turn 34s linear infinite;
}
.security-art::after {
  content: ""; position: absolute; z-index: -2; inset: 15%; border-radius: 50%;
  box-shadow: 0 0 50px 14px #b49adf1a, inset 0 0 30px #d9c7f414;
  background: #cab5ed05; animation: seal-glow 7s ease-in-out infinite;
}
.security-art > svg { filter: drop-shadow(0 12px 24px #100a1b45); animation: seal-float 7s ease-in-out infinite; }
.scan-field { position: absolute; inset: 18%; overflow: hidden; border-radius: 50%; pointer-events: none; }
.scan-light {
  position: absolute; left: -15%; right: -15%; top: 0; height: 22%; opacity: 0;
  transform: translateY(-130%) rotate(-12deg);
  background: linear-gradient(transparent, #eee5ff0a 32%, #fff8ff59 53%, #e9d6ff16 66%, transparent);
  animation: seal-scan 8s ease-in-out infinite;
}
.seal-spark { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #eadcff; box-shadow: 0 0 8px #c2a2e7; opacity: .6; animation: spark-breathe 6s ease-in-out infinite; }
.spark-one { left: 9%; top: 36%; }
.spark-two { right: 11%; bottom: 22%; animation-delay: -3s; width: 2px; height: 2px; }
.eyebrow { color: #b9a0d1; font-size: 11px; font-weight: 500; letter-spacing: 3.2px; }
h1 { color: #f4eefb; text-shadow: 0 3px 22px #cbb4f012; font-weight: 600; letter-spacing: 2px; }
.intro-description { color: #b9a8c8; font-size: 15px; letter-spacing: 1px; }
.intro { animation: enter-surface .65s both; }
.query-card {
  border-color: #f9f5ff; border-radius: 21px;
  background: linear-gradient(145deg, #ffffff, #f8f5fc);
  box-shadow: 0 25px 65px #09051040, 0 3px 8px #09051012, inset 0 1px 0 #fff;
  animation: enter-surface .65s .08s both;
  transition: box-shadow .25s;
}
.query-card::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -55%; width: 35%;
  transform: skewX(-22deg); pointer-events: none; z-index: 0;
  background: linear-gradient(90deg, transparent, #ffffff80, transparent);
  animation: card-arrival 1.6s .4s both;
}
.query-card form { position: relative; z-index: 1; }
.query-card:focus-within { box-shadow: 0 25px 65px #09051040, 0 0 0 4px #d6bafa12, 0 0 30px #a07ad917; }
.card-accent { left: 24px; right: 24px; height: 2px; opacity: 1; background: linear-gradient(90deg, transparent, #d4cbef 20%, var(--brand) 50%, #d4cbef 80%, transparent); }
.label-row label { color: #2c2140; font-size: 17px; letter-spacing: 1px; }
.label-row > span { color: #8c7a9d; }
.input-hint { color: #867692; }
.input-wrap { background: #f2eef7; border-color: #e1d9eb; box-shadow: inset 0 2px 5px #44256103; }
.input-wrap:focus-within { background: #fff; border-color: var(--brand-light); box-shadow: 0 0 0 3px #5335C10a, inset 0 1px 3px #44256103; }
.input-wrap:focus-within .input-symbol, .input-wrap.has-code .input-symbol { color: var(--brand); }
.input-wrap.has-code:not(.is-invalid) { border-color: #c3b2d9; }
.input-wrap.is-invalid { border-color: #c58174; background: #fff8f7; }
.input-symbol { color: #a293b2; transition: color .25s; }
.input-wrap input { color: #493263; font-weight: 550; }
.input-wrap input::placeholder { color: #aa9bb7; font-weight: 400; }
.clear-code { background: #e9e0f0; color: #8c77a0; }
.submit-button, .modal-action {
  position: relative; overflow: hidden; border-color: #ffffff35;
  background: var(--brand);
  box-shadow: 0 8px 20px #5335C12b, inset 0 1px 0 #ffffff33;
  letter-spacing: 3px; font-weight: 500;
  transition: transform .18s, box-shadow .18s, filter .18s;
}
.submit-button::after, .modal-action::after {
  content: ""; position: absolute; inset: -60% auto -60% -80%; width: 35%;
  transform: skewX(-22deg); pointer-events: none;
  background: linear-gradient(90deg, transparent, #ffffff25, transparent);
}
.submit-button:active, .modal-action:active { transform: translateY(1px) scale(.99); box-shadow: 0 3px 10px #5335C122, inset 0 1px 0 #ffffff22; }
.privacy-note { color: #91809f; letter-spacing: 1px; }
.footer p { color: #897994; }
.footer p span { color: #6f5a82; }
.footer-line { background: linear-gradient(90deg, transparent, #ac8bc333); }
.modal-backdrop { background: #0d081cb3; backdrop-filter: blur(11px); -webkit-backdrop-filter: blur(11px); }
.result-card { border-radius: 22px; border-color: #faf5ff; box-shadow: 0 35px 100px #05010c66; }
.result-message { color: #786585; }
.result-kicker { color: #8b739e; }
.result-code-block { background: #f5f0f9; border-color: #eae0f1; }
.result-signature { color: #a08aae; }
.result-card[data-state="valid"] #result-icon-path { stroke-dasharray: 48; stroke-dashoffset: 0; animation: check-draw .55s .12s both; }
.result-card[data-state="valid"] .result-emblem { animation: result-bloom .65s both; }
body.is-verifying .scan-light { animation-duration: 1.2s; }
body.is-verifying .security-art::before { animation-duration: 8s; }
body.is-verifying .card-accent { background-size: 200% 100%; animation: progress-light 1.5s linear infinite; }
body.modal-visible .security-art > svg, body.modal-visible .security-art::before, body.modal-visible .security-art::after,
body.modal-visible .scan-light, body.modal-visible .seal-spark, body.modal-visible .ambient::before,
body.is-inactive *, body.is-inactive *::before, body.is-inactive *::after { animation-play-state: paused; }
@media (hover: hover) {
  .submit-button:hover, .modal-action:hover { filter: brightness(1.07); box-shadow: 0 10px 25px #5335C13b, inset 0 1px 0 #ffffff40; }
  .submit-button:hover::after, .modal-action:hover::after { animation: button-shine .65s ease-out; }
}
@media (max-width: 849px) {
  .security-art { width: clamp(140px, 21vh, 180px); margin-top: -5px; }
  .eyebrow { margin-top: 8px; margin-bottom: 10px; }
  h1 { font-size: 31px; letter-spacing: 2px; }
  .intro-description { margin-top: 10px; font-size: 14px; letter-spacing: .5px; }
  .query-card { padding-top: 24px; padding-bottom: 20px; }
  .field-error { margin-top: 5px; margin-bottom: 7px; }
  .official-badge { padding: 7px 9px; font-size: 11px; }
}
@media (max-width: 849px) and (max-height: 720px) {
  .security-art { width: 130px; margin-top: -8px; }
  .stage { gap: 20px; }
  .eyebrow { margin-top: 5px; margin-bottom: 7px; font-size: 10px; }
  h1 { font-size: 28px; }
  .intro-description { margin-top: 8px; }
  .query-card { padding-top: 20px; padding-bottom: 16px; }
  .field-error { margin-top: 3px; margin-bottom: 5px; }
}
@media (max-width: 849px) and (max-height: 620px) {
  .security-art { width: 90px; margin-top: -6px; }
  .stage { gap: 14px; }
  h1 { font-size: 26px; }
  .query-card { padding-top: 18px; padding-bottom: 15px; }
}
body.is-compact .query-card { padding-top: 18px; padding-bottom: 18px; }
@keyframes ambient-breathe { from { transform: translate3d(-3%, -1%, 0) scale(1); } to { transform: translate3d(3%, 2%, 0) scale(1.08); } }
@keyframes seal-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes seal-glow { 0%, 100% { opacity: .65; } 50% { opacity: 1; } }
@keyframes orbit-turn { to { transform: rotate(360deg); } }
@keyframes seal-scan { 0%, 14% { opacity: 0; transform: translateY(-130%) rotate(-12deg); } 22% { opacity: .8; } 44% { opacity: .8; } 52%, 100% { opacity: 0; transform: translateY(600%) rotate(-12deg); } }
@keyframes spark-breathe { 0%, 100% { opacity: .25; } 50% { opacity: .8; } }
@keyframes enter-surface { from { opacity: 1; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
@keyframes card-arrival { from { left: -55%; opacity: .8; } to { left: 140%; opacity: 0; } }
@keyframes button-shine { from { left: -80%; } to { left: 145%; } }
@keyframes check-draw { from { stroke-dashoffset: 48; } to { stroke-dashoffset: 0; } }
@keyframes result-bloom { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: scale(1); } }
@keyframes progress-light { to { background-position: 200% 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .query-card::after, .scan-light { display: none; }
}
