:root {
  --bg: #070b12;
  --bg-2: #0a101a;
  --panel: #0d1522;
  --panel-2: #111c2d;
  --line: #223249;
  --line-soft: rgba(94, 128, 173, 0.24);
  --text: #eef4ff;
  --muted: #93a4bd;
  --faint: #6f819b;
  --accent: #3b82f6;
  --accent-strong: #60a5fa;
  --ok: #34d399;
  --error: #fb7185;
  --focus: rgba(96, 165, 250, 0.55);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 14px;
  color: var(--text);
  background:
    radial-gradient(90% 60% at 18% -10%, rgba(37, 99, 235, 0.2), transparent 62%),
    radial-gradient(70% 55% at 92% 108%, rgba(29, 78, 216, 0.12), transparent 65%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
  font-family:
    ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(148, 180, 225, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 180, 225, 0.12) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(70% 60% at 50% 36%, #000 10%, transparent 75%);
}

.shell {
  width: 100%;
  max-width: 440px;
}

.card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(22, 35, 56, 0.72), rgba(10, 17, 28, 0.94)),
    var(--panel);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(96, 165, 250, 0.55),
    transparent
  );
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 24px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(145deg, var(--accent-strong), #1d4ed8);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
  font-size: 13px;
  font-weight: 750;
}

.brand-name {
  color: var(--text);
  font-weight: 650;
  letter-spacing: 0.08em;
}

.brand-rule {
  width: 1px;
  height: 12px;
  background: var(--line);
}

.brand-context {
  color: var(--faint);
}

h1 {
  margin: 18px 0 7px;
  font-size: clamp(24px, 5.6vw, 28px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 680;
}

.lede {
  margin: 0;
  max-width: 34ch;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}

.challenge-wrap {
  display: grid;
  place-items: center;
  padding: 18px 0 14px;
}

.hold {
  --progress: 0;
  position: relative;
  display: block;
  width: 164px;
  height: 164px;
  padding: 5px;
  border: 0;
  border-radius: 50%;
  color: inherit;
  background: conic-gradient(
    from -90deg,
    var(--accent) calc(var(--progress) * 1%),
    rgba(63, 91, 128, 0.36) 0
  );
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 160ms ease,
    filter 200ms ease;
}

.hold:disabled {
  cursor: default;
  opacity: 0.56;
}

.hold:not(:disabled):hover {
  filter: brightness(1.08);
}

.hold:not(:disabled):active,
.hold.is-holding {
  transform: scale(0.985);
}

.hold:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 5px;
}

.hold-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(111, 146, 196, 0.32);
  border-radius: 50%;
  background:
    radial-gradient(80% 70% at 50% 18%, rgba(37, 99, 235, 0.16), transparent 60%),
    radial-gradient(circle at 50% 40%, #17253b, #0a111d 72%);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.4),
    0 1px 0 rgba(255, 255, 255, 0.05) inset;
  transition:
    box-shadow 220ms ease,
    border-color 220ms ease;
}

.hold.is-holding .hold-inner {
  border-color: rgba(96, 165, 250, 0.55);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.4),
    0 0 42px rgba(37, 99, 235, 0.23) inset,
    0 0 0 1px rgba(96, 165, 250, 0.18);
}

.hold.is-done .hold-inner {
  border-color: rgba(52, 211, 153, 0.55);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.4),
    0 0 34px rgba(52, 211, 153, 0.12) inset;
}

.hold-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-strong);
  box-shadow:
    0 0 0 5px rgba(59, 130, 246, 0.12),
    0 0 18px rgba(96, 165, 250, 0.7);
}

.hold.is-holding .hold-dot {
  animation: breathe 1.05s ease-in-out infinite;
}

.hold.is-done .hold-dot {
  background: var(--ok);
  box-shadow:
    0 0 0 5px rgba(52, 211, 153, 0.12),
    0 0 18px rgba(52, 211, 153, 0.65);
}

.hold-label {
  font-size: 17px;
  font-weight: 640;
  letter-spacing: -0.01em;
}

.hold-sub {
  color: var(--faint);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hint {
  margin: 0 auto;
  max-width: 34ch;
  color: var(--faint);
  font-size: 11.5px;
  line-height: 1.5;
  text-align: center;
}

.status {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-height: 20px;
  margin: 14px 0 0;
  padding: 9px 11px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(8, 14, 24, 0.55);
  font-size: 12px;
  line-height: 1.45;
}

.status::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--faint);
}

.status[data-tone="working"]::before {
  background: var(--accent-strong);
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.7);
}

.status[data-tone="ok"] {
  color: #c9f7e7;
  border-color: rgba(52, 211, 153, 0.24);
  background: rgba(16, 78, 61, 0.16);
}

.status[data-tone="ok"]::before {
  background: var(--ok);
}

.status[data-tone="error"] {
  color: #ffd4db;
  border-color: rgba(251, 113, 133, 0.23);
  background: rgba(83, 25, 38, 0.15);
}

.status[data-tone="error"]::before {
  background: var(--error);
}

.fallback {
  margin-top: 15px;
  padding: 13px;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 14px;
  background: rgba(15, 30, 52, 0.45);
}

.fallback label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.token {
  display: block;
  width: 100%;
  min-height: 62px;
  resize: vertical;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #dbeafe;
  background: #070d16;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.copy,
.retry {
  min-height: 38px;
  border-radius: 10px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 650;
  cursor: pointer;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.copy {
  margin-top: 9px;
  padding: 0 13px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(23, 37, 59, 0.8);
}

.retry {
  width: 100%;
  padding: 0 16px;
  border: 1px solid rgba(96, 165, 250, 0.4);
  color: #eff6ff;
  background: linear-gradient(180deg, #2f6fdd, #2457b8);
}

.copy:hover,
.retry:hover {
  filter: brightness(1.1);
}

.copy:active,
.retry:active {
  transform: translateY(1px);
}

.copy:focus-visible,
.retry:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.fallback-note {
  margin: 9px 0 0;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.5;
}

.actions {
  margin-top: 12px;
}

.fineprint {
  margin-top: 17px;
  padding-top: 14px;
  border-top: 1px solid rgba(94, 128, 173, 0.16);
  color: var(--faint);
  font-size: 10px;
  line-height: 1.5;
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(0.85);
    opacity: 0.75;
  }
  50% {
    transform: scale(1.12);
    opacity: 1;
  }
}

@media (max-width: 420px) {
  body {
    padding: 8px;
  }

  .card {
    padding: 20px 16px;
    border-radius: 20px;
  }

  .challenge-wrap {
    padding: 16px 0 13px;
  }

  .hold {
    width: 156px;
    height: 156px;
  }
}

@media (max-height: 620px) {
  body {
    justify-content: flex-start;
  }
}

@media (max-height: 560px) {
  .card {
    padding-top: 18px;
    padding-bottom: 18px;
  }

  h1 {
    margin-top: 12px;
  }

  .challenge-wrap {
    padding: 14px 0;
  }

  .hold {
    width: 144px;
    height: 144px;
  }

  .fineprint {
    margin-top: 13px;
    padding-top: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .hold.is-holding .hold-dot {
    animation: none;
  }
}


/* Compact mode used by the AYME signup iframe. */
html[data-embed="1"] body {
  min-height: 100%;
  padding: 10px;
}
html[data-embed="1"] .card {
  padding: 18px;
  border-radius: 18px;
  box-shadow: none;
}
html[data-embed="1"] h1 {
  margin: 12px 0 4px;
  font-size: 22px;
}
html[data-embed="1"] .lede {
  max-width: 44ch;
  font-size: 12.5px;
  line-height: 1.4;
}
html[data-embed="1"] .challenge-wrap {
  padding: 10px 0 8px;
}
html[data-embed="1"] .hold {
  width: 132px;
  height: 132px;
}
html[data-embed="1"] .hold-label {
  font-size: 15px;
}
html[data-embed="1"] .hold-sub {
  font-size: 10.5px;
}
html[data-embed="1"] .brand-context,
html[data-embed="1"] .fineprint {
  display: none;
}
