/* The confirm password field: two quiet fields on white, a ladder of hairline stitches between them. */
:root {
  --paper: #ffffff;
  --ink: #111214;
  --muted: #8c8c88;
  --line: #e2e1dc;          /* the fields' edge at rest */
  --thread: #cfcec8;        /* a stitch while the password is still being typed */
  --accent: #3a5cff;        /* the focus, the caret, the stitches once everything matches, the tick */
}
* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
html { touch-action: manipulation; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.stage {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 16px;
}
.pair {
  position: relative;
  width: min(340px, 100%);
}

/* ---------------------------------------------------------------- a field */
.fld {
  position: relative;
  height: 60px;
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(17, 18, 20, 0.04);
  transition: box-shadow 0.3s;
}
.fld.is-on,
.fld:focus-within {
  box-shadow: 0 0 0 1.5px var(--accent), 0 0 0 5px rgba(58, 92, 255, 0.1), 0 1px 2px rgba(17, 18, 20, 0.04);
}
.fld__cap {
  position: absolute;
  left: 18px;
  top: 10px;
  font-size: 11.5px;
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--muted);
  font-variation-settings: 'wght' 480, 'wdth' 100;
  pointer-events: none;
  z-index: 2;
}
/* the real input over the whole field, its letters and caret invisible: the dots are drawn */
.fld__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 18px 48px 0 18px;
  border: 0;
  border-radius: 14px;
  outline: none;
  background: transparent;
  color: transparent;
  -webkit-text-fill-color: transparent;
  caret-color: transparent;
  font: 16px/1 system-ui, sans-serif;
  cursor: text;
  z-index: 3;
}
.fld__input::selection { background: transparent; }
.fld__row {
  position: absolute;
  left: 0;
  right: 44px;
  bottom: 13px;
  height: 18px;
  overflow: hidden;
  pointer-events: none;
}
/* a dot: GSAP moves the span, the CSS paints its child (full, or a ring when it does not match) */
.dot {
  position: absolute;
  top: 6px;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  will-change: transform;
}
.dot i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: inset 0 0 0 1.4px var(--ink);
  transition: background-color 0.22s;
}
.dot.is-off i { background: transparent; }
.caret {
  position: absolute;
  top: 0;
  width: 1.5px;
  height: 18px;
  margin-left: -0.75px;
  border-radius: 1px;
  background: var(--accent);
  opacity: 0;
}
.fld__tick {
  position: absolute;
  right: 14px;
  top: 50%;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  overflow: visible;
}
.fld__tick path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------------------------------------------------------------- the stitches */
.rungs {
  position: relative;
  height: 18px;
  margin: 0 44px 0 0;
}
.rung {
  position: absolute;
  top: 0;
  width: 1px;
  height: 100%;
  margin-left: -0.5px;
  transform-origin: 50% 0;
  will-change: transform;
}
.rung i {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--thread);
  transition: background-color 0.25s;
}
.rung.is-done i { background: var(--accent); }

/* ---------------------------------------------------------------- the line under */
.note {
  margin: 14px 0 0 4px;
  height: 18px;
  font-size: 13.5px;
  line-height: 18px;
  color: var(--muted);
}
.note.is-done { color: var(--accent); }
.note__clip {
  display: block;
  height: 18px;
  overflow: hidden;
  clip-path: inset(0 -30px);
}
.note__word {
  display: block;
  white-space: nowrap;
  font-variation-settings: 'wght' 480, 'wdth' 100;
  will-change: transform;
}
