:root {
  --bg: #ffffff;
  --tile: #f5f5f3;
  --ink: #17171a;
  --soft: rgba(23, 23, 26, 0.52);
  --line: rgba(23, 23, 26, 0.1);
  --accent: #0f9b8e;
}

*, *::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 12px;
}

.hc { position: relative; display: flex; align-items: stretch; width: min(308px, 100%); height: 76px; border-radius: 18px; background: var(--tile); box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 #ffffff, 0 16px 26px -18px rgba(23, 23, 26, 0.4); overflow: hidden; transition: background-color 0.4s ease, box-shadow 0.4s ease; }
.hc[data-state="done"] { background: color-mix(in srgb, var(--accent) 8%, #ffffff); box-shadow: inset 0 0 0 1.500px color-mix(in srgb, var(--accent) 38%, transparent), 0 16px 28px -18px color-mix(in srgb, var(--accent) 70%, #000000); }

.hc__btn { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 0 8px 0 18px; border: 0; border-radius: 18px 0 0 18px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; outline: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.hc[data-state="busy"] .hc__btn { cursor: progress; }
.hc[data-state="done"] .hc__btn { cursor: default; }
.hc__btn:focus-visible .hc__box { box-shadow: 0 0 0 2px var(--tile), 0 0 0 4px var(--ink); }

/* the square: it rounds into a ring while checking and fills when verified */
.hc__box { position: relative; flex: none; display: block; width: 28px; height: 28px; border-radius: 8px; background: #ffffff; box-shadow: inset 0 0 0 1.500px rgba(23, 23, 26, 0.28), 0 2px 3px -1px rgba(23, 23, 26, 0.2); }
@media (hover: hover) { .hc[data-state="idle"] .hc__btn:hover .hc__box { box-shadow: inset 0 0 0 1.500px var(--ink), 0 2px 3px -1px rgba(23, 23, 26, 0.2); } }
.hc__box svg { position: absolute; left: 0; top: 0; display: block; width: 28px; height: 28px; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.hc__ring { opacity: 0; stroke: var(--accent); stroke-width: 2.600; }
.hc__ring circle { stroke-dasharray: 1; stroke-dashoffset: 0.720; }
.hc__tick { stroke: #ffffff; stroke-width: 2.700; opacity: 0; }
.hc__tick path { stroke-dasharray: 1; stroke-dashoffset: 1; }

.hc__text { min-width: 0; display: grid; gap: 2px; }
.hc__label { display: block; height: 21px; overflow: hidden; font-size: 16px; line-height: 21px; font-weight: 680; font-stretch: 104%; letter-spacing: -0.008em; }
.hc__label span { display: block; white-space: nowrap; }
.hc__sub { display: block; font-size: 12px; line-height: 15px; font-weight: 500; color: var(--soft); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* who protects the form, on the right */
.hc__brand { flex: none; display: grid; justify-items: center; align-content: center; gap: 3px; width: 72px; border-left: 1px solid var(--line); color: var(--soft); transition: color 0.4s ease; }
.hc[data-state="done"] .hc__brand { color: var(--accent); }
.hc__brand svg { display: block; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.600; stroke-linecap: round; stroke-linejoin: round; }
.hc__ok { stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; }
.hc__brand b { font-size: 9.500px; line-height: 12px; font-weight: 650; letter-spacing: 0.04em; }

/* a band of light that crosses the tile once, when verified */
.hc__shine { position: absolute; top: 0; bottom: 0; left: 0; width: 34%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.95) 50%, transparent); opacity: 0; pointer-events: none; }

.live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ghost { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -3px 0 0 -5px; transform-origin: 20% 15%; pointer-events: none; opacity: 0; fill: #17171a; stroke: #ffffff; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)); z-index: 6; }
