:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --bg: #040807;
  --surface: rgba(13, 22, 21, .93);
  --surface-2: #111d1b;
  --surface-3: #172522;
  --line: rgba(145, 186, 176, .18);
  --text: #f5faf8;
  --muted: #92a8a2;
  --mint: #4de0b5;
  --mint-deep: #159d7c;
  --cyan: #2cbfd1;
  --amber: #f5c96b;
  --red: #ff7d8c;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -12%, rgba(61, 207, 168, .18), transparent 39%),
    linear-gradient(180deg, #07110f 0%, #040807 74%);
}

.ambient { position: fixed; z-index: 0; width: 320px; height: 320px; border-radius: 50%; filter: blur(100px); pointer-events: none; opacity: .22; }
.ambient-one { top: 6%; left: -180px; background: #20d4ac; }
.ambient-two { right: -180px; bottom: 4%; background: #22a9c2; }
.shell { position: relative; z-index: 1; width: min(560px, calc(100% - 28px)); margin: auto; padding: max(22px, env(safe-area-inset-top)) 0 48px; }

.brand { display: flex; align-items: center; gap: 12px; width: max-content; margin: 0 auto 22px; color: var(--text); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 16px; background: #0d1917; box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.brand img { width: 34px; height: 34px; }
.brand-copy b, .brand-copy small { display: block; }
.brand-copy b { font-size: 21px; letter-spacing: -.03em; }
.brand-copy small { margin-top: 2px; color: var(--muted); font-size: 11px; }

.card {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: linear-gradient(145deg, rgba(19, 31, 29, .97), rgba(8, 14, 13, .98));
  box-shadow: 0 30px 90px rgba(0, 0, 0, .46), inset 0 1px 0 rgba(255,255,255,.04);
  backdrop-filter: blur(18px);
}
.hidden { display: none !important; }
.state-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 29px; padding: 0 12px; border: 1px solid rgba(77, 224, 181, .23); border-radius: 999px; background: rgba(77, 224, 181, .08); color: #a8ead7; font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.state-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 12px var(--mint); }
.state-pill.centered { justify-content: center; margin: 0 auto; }
h1 { margin: 18px 0 10px; font-size: clamp(31px, 8vw, 42px); line-height: 1.02; letter-spacing: -.052em; }
.lead { margin: 0 0 24px; color: var(--muted); font-size: 15px; line-height: 1.55; }

.device-card { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 13px; margin: 24px 0; padding: 15px; border: 1px solid var(--line); border-radius: 18px; background: rgba(17, 29, 27, .88); }
.device-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: linear-gradient(145deg, rgba(77,224,181,.18), rgba(44,191,209,.1)); color: var(--mint); font-size: 28px; font-weight: 800; }
.device-card small, .device-card strong { display: block; }
.device-card small { margin-bottom: 4px; color: var(--muted); font-size: 11px; }
.device-card strong { overflow-wrap: anywhere; font-size: 14px; letter-spacing: .015em; }
.device-card em { padding: 6px 9px; border-radius: 9px; background: rgba(77,224,181,.12); color: var(--mint); font-size: 11px; font-style: normal; font-weight: 900; }

label { display: block; margin: 0 0 8px; color: #c0cfcb; font-size: 12px; font-weight: 750; }
input { width: 100%; height: 58px; padding: 0 17px; border: 1px solid #304743; border-radius: 17px; background: #07100e; color: white; font: 700 16px Inter, ui-sans-serif, system-ui, sans-serif; outline: none; transition: border-color .2s, box-shadow .2s; }
input::placeholder { color: #586a66; }
input:focus { border-color: var(--mint); box-shadow: 0 0 0 4px rgba(77,224,181,.1); }
.receipt-email { margin-bottom: 18px; text-transform: none; letter-spacing: 0; }
.price { display: flex; justify-content: space-between; align-items: center; margin: 0 0 20px; padding: 17px 18px; border: 1px solid var(--line); border-radius: 17px; background: rgba(5, 12, 10, .58); }
.price span { color: var(--muted); font-size: 13px; }
.price strong { font-size: 23px; letter-spacing: -.03em; }
.primary, .secondary { border: 0; font-family: inherit; cursor: pointer; }
.primary { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 58px; padding: 0 20px; border-radius: 17px; background: linear-gradient(105deg, var(--mint), var(--cyan)); color: #03120e; font-size: 15px; font-weight: 900; box-shadow: 0 14px 32px rgba(36,191,190,.2); }
.primary b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(3,18,14,.12); font-size: 18px; }
.primary:disabled { opacity: .52; cursor: wait; }
.message { min-height: 20px; margin-top: 13px; color: var(--red); font-size: 13px; line-height: 1.4; }
.test-badge { margin: -4px 0 16px; padding: 11px 13px; border: 1px solid rgba(245,201,107,.3); border-radius: 13px; background: rgba(92,67,20,.22); color: #f7d98e; font-size: 12px; }
.secure-note { display: flex; justify-content: center; align-items: center; gap: 7px; margin-top: 2px; color: #718782; font-size: 11px; }
.secure-note span { color: var(--mint); font-weight: 900; }

.result-card { padding-top: 38px; text-align: center; }
.result-orbit { position: relative; display: grid; place-items: center; width: 104px; height: 104px; margin: 0 auto 23px; border: 1px solid rgba(77,224,181,.26); border-radius: 34px; background: linear-gradient(145deg, rgba(77,224,181,.15), rgba(44,191,209,.06)); box-shadow: 0 18px 55px rgba(0,0,0,.3); }
.result-logo { display: grid; place-items: center; width: 74px; height: 74px; border-radius: 24px; background: #0b1518; }
.result-logo img { width: 54px; height: 54px; }
.result-orbit > i { position: absolute; right: -6px; bottom: -6px; display: grid; place-items: center; width: 38px; height: 38px; border: 5px solid #101c1a; border-radius: 50%; background: var(--mint); color: #04110e; font-size: 18px; font-style: normal; font-weight: 950; }
.result-card.pending .result-orbit > i { color: transparent; background: transparent; border: 3px solid rgba(77,224,181,.2); border-top-color: var(--mint); animation: spin 1s linear infinite; }
.result-card.failure .result-orbit { border-color: rgba(255,125,140,.25); background: rgba(255,125,140,.07); }
.result-card.failure .result-orbit > i { background: var(--red); color: #21070b; }
.result-card.failure .state-pill { border-color: rgba(255,125,140,.25); background: rgba(255,125,140,.08); color: #ffc1c8; }
.result-card.failure .state-pill i { background: var(--red); box-shadow: 0 0 12px var(--red); }
.result-copy { max-width: 430px; margin-left: auto; margin-right: auto; }

.receipt-card { display: grid; grid-template-columns: 1.35fr .65fr; gap: 1px; overflow: hidden; margin: 25px 0 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--line); text-align: left; }
.receipt-card > div { padding: 15px 17px; background: var(--surface-2); }
.receipt-card small, .receipt-card strong { display: block; }
.receipt-card small { margin-bottom: 6px; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.receipt-card strong { overflow-wrap: anywhere; font-size: 13px; }

.progress-list { margin: 0; padding: 0; list-style: none; text-align: left; }
.progress-list li { position: relative; display: grid; grid-template-columns: 38px 1fr 22px; align-items: center; gap: 12px; min-height: 62px; padding: 8px 4px; }
.progress-list li:not(:last-child)::after { content: ""; position: absolute; left: 22px; top: 48px; width: 1px; height: 28px; background: #2c403c; }
.progress-list li > i { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #314640; border-radius: 13px; color: #718782; font-size: 12px; font-style: normal; font-weight: 900; }
.progress-list li span b, .progress-list li span small { display: block; }
.progress-list li span b { font-size: 14px; }
.progress-list li span small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.progress-list li > em { width: 10px; height: 10px; border: 2px solid #39504b; border-radius: 50%; }
.progress-list li.done > i { border-color: rgba(77,224,181,.22); background: rgba(77,224,181,.12); color: var(--mint); }
.progress-list li.done > em { border-color: var(--mint); background: var(--mint); box-shadow: 0 0 10px rgba(77,224,181,.6); }
.progress-list li.active > em { border-color: var(--mint); border-top-color: transparent; animation: spin .8s linear infinite; }
.progress-list li.failed > i { border-color: rgba(255,125,140,.28); background: rgba(255,125,140,.1); color: var(--red); }
.progress-list li.failed > em { border-color: var(--red); background: var(--red); }

.secondary { width: 100%; min-height: 52px; margin-top: 18px; border: 1px solid #344b46; border-radius: 16px; background: #16231f; color: #d9e6e2; font-size: 14px; font-weight: 850; }
.footnote { margin: 16px 0 0; color: #657873; font-size: 11px; line-height: 1.45; }

@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 560px) {
  .shell { padding-top: max(16px, env(safe-area-inset-top)); }
  .card { padding: 25px 20px; border-radius: 25px; }
  .result-card { padding-top: 28px; }
  .device-card { grid-template-columns: 42px 1fr auto; }
  .receipt-card { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
