:root {
  --bg: #ffffff;
  --ink: #15161a;
  --soft: rgba(21, 22, 26, 0.56);
  --line: rgba(21, 22, 26, 0.14);
  --accent: #3157ff;
  --good: #159a5c;
  --bad: #d8452e;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 10px 16px;
}

/* --tone is the field's colour: blue while typing, green when verified, red on a wrong check digit */
.vf { --tone: var(--accent); width: min(326px, 100%); }

.vf__top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; height: 20px; margin-bottom: 7px; }
.vf__label { font-size: 13.5px; font-weight: 680; font-stretch: 104%; }
.vf__hint { font-size: 12px; font-weight: 620; color: var(--soft); white-space: nowrap; }
.vf.is-busy .vf__hint, .vf.is-good .vf__hint, .vf.is-bad .vf__hint { color: var(--tone); }
.vf__roll { display: block; height: 18px; line-height: 18px; overflow: hidden; }
.vf__roll > span { display: block; }

.vf__field {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 14px 0 8px;
  border-radius: 17px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1.500px var(--line), 0 1px 2px rgba(21, 22, 26, 0.04);
  transition: box-shadow 0.3s ease;
}
.vf__field:focus-within, .vf.is-typing .vf__field, .vf.is-busy .vf__field, .vf.is-good .vf__field, .vf.is-bad .vf__field { box-shadow: inset 0 0 0 1.500px var(--tone), 0 0 0 4px color-mix(in srgb, var(--tone) 14%, transparent), 0 12px 26px -16px color-mix(in srgb, var(--tone) 70%, transparent); }

.vf__country { display: flex; align-items: center; gap: 7px; flex: none; height: 40px; padding: 0 11px 0 9px; border-radius: 11px; background: rgba(21, 22, 26, 0.05); font-size: 13.5px; font-weight: 700; letter-spacing: 0.02em; }
.vf__flag { display: flex; width: 18px; height: 13px; border-radius: 3px; overflow: hidden; box-shadow: 0 0 0 1px rgba(21, 22, 26, 0.12); }
.vf__flag b { flex: 1; }
.vf__flag b:nth-child(1) { background: #1f8f4d; }
.vf__flag b:nth-child(2) { background: #ffffff; }
.vf__flag b:nth-child(3) { background: #d43b3b; }

.vf__input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: none; color: var(--ink); font: inherit; font-size: 19px; font-weight: 400; letter-spacing: 0.02em; font-variation-settings: "wght" 620, "wdth" 96; }
.vf__input::placeholder { color: rgba(21, 22, 26, 0.26); }

.vf__status { position: relative; flex: none; width: 22px; height: 22px; }
.vf__status svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; fill: none; stroke: var(--tone); stroke-width: 2.200; stroke-linecap: round; stroke-linejoin: round; }
.vf__spin { opacity: 0; }
.vf__spin circle { stroke-dasharray: 0.3 1; }
.vf__mark path { stroke-dasharray: 1; stroke-dashoffset: 1; }

/* eleven marks, one per digit: they fill as the number is typed */
.vf__marks { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 3px; height: 4px; margin: 8px 6px 0; }
.vf__marks i { border-radius: 2px; background: rgba(21, 22, 26, 0.1); overflow: hidden; }
.vf__marks i b { display: block; height: 100%; border-radius: inherit; background: var(--tone); transform: scaleX(0); transform-origin: 0 50%; }

.vf__out { height: 0; overflow: hidden; }
.vf__company { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 9px 10px; border-radius: 15px; background: color-mix(in srgb, var(--good) 8%, #ffffff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--good) 22%, transparent); }
.vf__tile { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 11px; background: #ffffff; box-shadow: 0 0 0 1px rgba(21, 22, 26, 0.08); font-size: 12px; font-weight: 720; }
.vf__who { display: flex; flex-direction: column; min-width: 0; }
.vf__who b { font-size: 13.5px; line-height: 18px; font-weight: 680; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vf__who span { font-size: 11.5px; line-height: 16px; font-weight: 540; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vf__pill { margin-left: auto; flex: none; height: 22px; padding: 0 9px; border-radius: 11px; background: var(--good); color: #ffffff; font-size: 11px; line-height: 22px; font-weight: 700; }
