/* Password strength: four segments that fill one after another, red → amber → violet → blue. */
.sp-strength { display: grid; gap: 6px; margin: 8px 0 2px; }
.sp-strength[hidden] { display: none; }
.sp-strength-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.sp-strength-bar i { height: 5px; border-radius: 999px; background: rgba(120, 120, 160, .2); overflow: hidden; position: relative; }
.sp-strength-bar i::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--sp-strength-colour); transform: scaleX(0); transform-origin: left; transition: transform .28s var(--sp-ease-glide), background-color .28s ease; }
.sp-strength-bar i.on::after { transform: scaleX(1); }
.sp-strength-bar i:nth-child(2)::after { transition-delay: .06s; }
.sp-strength-bar i:nth-child(3)::after { transition-delay: .12s; }
.sp-strength-bar i:nth-child(4)::after { transition-delay: .18s; }
.sp-strength-text { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; line-height: 1.2; }
.sp-strength-label { color: var(--sp-strength-colour); }
.sp-strength-count { color: #52698f; font-weight: 500; }
html[data-theme="dark"] .sp-strength-bar i { background: rgba(255, 255, 255, .12); }
html[data-theme="dark"] .sp-strength-count { color: #9fb4d2; }
@media (prefers-reduced-motion: reduce) { .sp-strength-bar i::after { transition: none; } }

/* "Confirm password": a live line under the field — Keep typing…, Passwords match (green tick), Passwords don’t match (red). */
.sp-match { display: flex; align-items: center; gap: 6px; margin: 8px 0 2px; font-size: 12px; font-weight: 600; line-height: 1.2; color: var(--sp-match-colour); }
.sp-match[hidden] { display: none; }
.sp-match-icon { width: 14px; height: 14px; border-radius: 50%; flex: 0 0 14px; display: grid; place-items: center; }
.sp-match[data-state="match"] .sp-match-icon { background: var(--sp-match-colour); }
.sp-match[data-state="match"] .sp-match-icon::after { content: ""; width: 6px; height: 3px; border: solid #fff; border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }
.sp-match[data-state="mismatch"] .sp-match-icon { border: 2px solid var(--sp-match-colour); box-sizing: border-box; }
.sp-match[data-state="mismatch"] .sp-match-icon::after { content: "!"; font-size: 9px; line-height: 1; font-weight: 800; }
.sp-match[data-state="typing"] .sp-match-icon { border: 2px dotted var(--sp-match-colour); box-sizing: border-box; }
html[data-theme="dark"] .sp-match[data-state="typing"] { color: #9fb4d2; }
