/* OO-587: the same approved strand card serves portal login and chat OTP. */
.ce {
  box-sizing: border-box;
  width: 100%;
  padding: 24px 20px 22px;
  border: 1px solid var(--ce-border);
  border-radius: 20px;
  background: var(--ce-bg);
  color: var(--ce-ink);
  text-align: center;
}
.ce-card { width: min(100%, 410px); margin: 0 auto 16px; }
.ce-title { margin: 0; color: var(--ce-ink); font: 700 22px/1.25 var(--font); }
.ce-dest { margin: 8px 0 22px; color: var(--ce-ink-dim); font: 400 14px/1.45 var(--font); }
.ce-masked { color: var(--ce-ink-masked); white-space: nowrap; }
.ce-stage { position: relative; width: min(320px, 100%); height: 96px; margin: 0 auto; }
.ce-digits {
  position: absolute;
  top: 0;
  left: 2.5%;
  right: 2.5%;
  display: flex;
  gap: 8px;
  height: 58px;
  transition: gap 420ms ease-in-out;
}
.ce-box {
  position: relative;
  display: grid;
  flex: 1 1 0;
  place-items: center;
  min-width: 0;
  height: 58px;
  border: 1.5px solid var(--ce-box-line);
  border-radius: 12px;
  background: var(--ce-box-bg);
  color: var(--ce-ink);
  transition: height 420ms ease-in-out, margin-top 420ms ease-in-out,
    border-color 180ms, border-radius 420ms ease-in-out, background 420ms ease-in-out,
    box-shadow 180ms;
}
.ce-box:focus-within { border-color: var(--ce-accent); box-shadow: 0 0 0 4px var(--ce-accent-ring); }
.ce .ce-digit {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: transparent;
  -webkit-text-fill-color: transparent;
  caret-color: transparent;
  outline: 0;
  font: 600 26px/1 var(--font);
}
.ce .ce-digit::selection { background: transparent; color: transparent; -webkit-text-fill-color: transparent; }
.ce-face { pointer-events: none; font: 600 26px/1 var(--font); }
.ce-box.ce-land .ce-face { animation: ce-spring 260ms cubic-bezier(.2,1.35,.4,1) both; }
.ce-strand { position: absolute; top: 78px; left: 2.5%; right: 2.5%; height: 2px; }
.ce-strand-left, .ce-strand-right {
  position: absolute;
  top: 0;
  display: block;
  width: 50%;
  height: 2px;
  background: var(--ce-box-line);
  transition: background 150ms;
}
.ce-strand-left { left: 0; transform-origin: left center; }
.ce-strand-right { right: 0; transform-origin: right center; }
.ce-progress { position: absolute; inset: 0; background: var(--ce-accent); transform: scaleX(0); transform-origin: left; }
.ce[data-state="checking"] .ce-progress { animation: ce-checking 800ms ease-out forwards; }
.ce[data-state="wrong"] .ce-strand-left,
.ce[data-state="wrong"] .ce-strand-right { background: var(--ce-bad); }
.ce[data-state="wrong"] .ce-strand-left { animation: ce-wrong-left 560ms ease-in-out; }
.ce[data-state="wrong"] .ce-strand-right { animation: ce-wrong-right 560ms ease-in-out; }
.ce[data-state="wrong"] .ce-digits { animation: ce-shake 560ms ease-in-out; }
.ce[data-state="wrong"] .ce-box { border-color: var(--ce-bad); }
.ce-result { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.ce-arm, .ce-joint { position: absolute; display: block; height: 7px; border-radius: 999px; background: var(--ce-good); }
.ce-arm { top: 26px; transition: top 460ms ease-in-out, left 460ms ease-in-out,
  width 460ms ease-in-out, transform 460ms ease-in-out, height 460ms ease-in-out; }
.ce-arm-left { left: 2.5%; width: 47.5%; transform-origin: right center; }
.ce-arm-right { left: 50%; width: 47.5%; transform-origin: left center; }
.ce-joint { top: 26px; left: calc(50% - 3.5px); width: 7px; opacity: 0;
  transition: top 460ms ease-in-out, left 460ms ease-in-out, opacity 460ms ease-in-out; }
.ce[data-state="confirming"] .ce-digits,
.ce[data-state="verified"] .ce-digits { gap: 0; }
.ce[data-state="confirming"] .ce-box,
.ce[data-state="verified"] .ce-box {
  height: 7px;
  margin-top: 25.5px;
  border: 0;
  border-radius: 0;
  background: var(--ce-good);
  box-shadow: none;
}
.ce[data-state="confirming"] .ce-box:first-child,
.ce[data-state="verified"] .ce-box:first-child { border-radius: 999px 0 0 999px; }
.ce[data-state="confirming"] .ce-box:last-child,
.ce[data-state="verified"] .ce-box:last-child { border-radius: 0 999px 999px 0; }
.ce[data-state="confirming"] .ce-face,
.ce[data-state="verified"] .ce-face { opacity: 0; transition: opacity 250ms; }
.ce[data-state="confirming"] .ce-box.ce-land .ce-face,
.ce[data-state="verified"] .ce-box.ce-land .ce-face { animation: none; }
.ce[data-state="confirming"] .ce-strand,
.ce[data-state="verified"] .ce-strand { opacity: 0; transition: opacity 250ms; }
.ce.ce-line .ce-digits { opacity: 0; }
.ce.ce-line .ce-result { opacity: 1; }
.ce.ce-bend .ce-arm-left { top: 50.5px; left: calc(48.125% - 22.6px); width: 22.6px; height: 5.5px; transform: rotate(45deg); }
.ce.ce-bend .ce-arm-right { top: 50.5px; left: 48.125%; width: 43.9px; height: 5.5px; transform: rotate(-46.8deg); }
.ce.ce-bend .ce-joint { top: 49.75px; left: calc(48.125% - 3px); width: 6px; height: 6px; opacity: 1; }
.ce-status { min-height: 40px; margin: 8px 0 5px; color: var(--ce-ink-dim); font: 600 14px/1.4 var(--font); }
.ce[data-state="wrong"] .ce-status,
.ce[data-state="error"] .ce-status { color: var(--ce-bad-ink); }
.ce[data-state="verified"] .ce-status { color: var(--ce-good); }
.ce-resend {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--ce-pill-line);
  border-radius: 20px;
  background: var(--ce-pill-bg);
  color: var(--ce-pill-ink);
  cursor: pointer;
  font: 600 14px var(--font);
}
.ce-resend::before { position: absolute; inset: -2px; content: ''; }
.ce-resend[hidden], .ce-timer-ring[hidden] { display: none; }
.ce-resend:disabled { cursor: default; }
.ce-resend:focus-visible { outline: 3px solid var(--ce-accent); outline-offset: 3px; }
.ce-timer-ring { position: relative; width: 16px; height: 16px; border-radius: 50%;
  background: conic-gradient(var(--ce-accent) var(--timer-angle, 0deg), var(--ce-pill-line) 0); }
.ce-timer-ring::after { position: absolute; inset: 3px; border-radius: 50%; background: var(--ce-pill-bg); content: ''; }
.cw-panel:has(.cw-verify-entry:not([hidden])) .cw-messages { min-height: 36px; }
.cw-verify-entry.ce { padding: 20px 10px 18px; }
@keyframes ce-spring { from { opacity: 0; transform: translateY(-6px) scale(.9); }
  70% { opacity: 1; transform: translateY(2px) scale(1.05); } to { opacity: 1; transform: none; } }
@keyframes ce-checking { to { transform: scaleX(1); } }
@keyframes ce-shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
@keyframes ce-wrong-left { 50% { transform: rotate(6deg); } }
@keyframes ce-wrong-right { 50% { transform: rotate(-6deg); } }
@media (prefers-reduced-motion: reduce) {
  .ce *, .ce *::before, .ce *::after { animation-duration: .01ms !important;
    transition-duration: .01ms !important; }
}
