:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Segoe UI", sans-serif;
  color: #1f2633;
  background: #fffaf2;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 84% 4%, rgba(239, 126, 72, .13), transparent 28rem),
    #fffaf2;
}

button, a { -webkit-tap-highlight-color: transparent; }

.shell {
  width: min(100%, 680px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(22px, env(safe-area-inset-top)) 22px max(32px, env(safe-area-inset-bottom));
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #313744;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -.01em;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: #e96732;
  box-shadow: 0 7px 18px rgba(210, 76, 28, .22);
  font-size: 17px;
}

.hero, .success, .error-state { padding: 54px 0 20px; }

h1 {
  max-width: 620px;
  margin: 0;
  color: #1d2430;
  font-size: clamp(36px, 9.7vw, 58px);
  font-weight: 720;
  letter-spacing: -.055em;
  line-height: 1.08;
}

.success h1, .error-state h1 { font-size: clamp(34px, 8.8vw, 52px); }

.lead {
  max-width: 590px;
  margin: 22px 0 0;
  color: #626875;
  font-size: 17px;
  line-height: 1.75;
}

.journey {
  display: grid;
  gap: 0;
  margin: 36px 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid #eadfce;
}

.journey li {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 15px;
  min-height: 79px;
  border-bottom: 1px solid #eadfce;
}

.journey li > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid #ddcebb;
  border-radius: 50%;
  color: #aa5b37;
  font: 650 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.journey strong, .next-step strong { display: block; font-size: 16px; }
.journey small { display: block; margin-top: 5px; color: #777c86; font-size: 13px; }

.button, .copy-button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 16px;
  font: 650 16px/1.2 inherit;
  text-decoration: none;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.button:active, .copy-button:active { transform: scale(.985); }
.button:focus-visible, .copy-button:focus-visible { outline: 3px solid rgba(233, 103, 50, .28); outline-offset: 3px; }

.primary {
  width: 100%;
  padding: 0 24px;
  color: #fff;
  background: #242b36;
  box-shadow: 0 14px 30px rgba(24, 30, 40, .16);
}

.trust, .expiry, .copy-status {
  margin: 15px 2px 0;
  color: #858993;
  font-size: 13px;
  line-height: 1.6;
}

.ai-status {
  margin: 18px 0 0;
  color: #6d6f77;
  font-size: 13px;
  line-height: 1.6;
}

.status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: #54715b;
  font-size: 14px;
  font-weight: 650;
}

.status span { width: 9px; height: 9px; border-radius: 50%; background: #5e9a6d; box-shadow: 0 0 0 5px rgba(94,154,109,.12); }

.code-panel {
  display: grid;
  gap: 18px;
  margin-top: 34px;
  padding: 20px;
  border: 1px solid #e7d8c4;
  border-radius: 22px;
  background: rgba(255, 255, 255, .68);
  box-shadow: 0 18px 50px rgba(105, 72, 36, .08);
}

.code-panel small { display: block; color: #777b84; font-size: 12px; }
.code { display: block; margin-top: 8px; color: #242b36; font: 720 31px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; }

.copy-button { width: 100%; padding: 0 18px; color: #fff; background: #e96732; }
.actions { margin-top: 28px; }

.next-step {
  margin-top: 28px;
  padding: 20px 0 0;
  border-top: 1px solid #eadfce;
}

.next-step p { margin: 8px 0 0; color: #666c78; font-size: 15px; line-height: 1.7; }
.copy-status { min-height: 21px; color: #54715b; }

.error-mark {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 22px;
  place-items: center;
  border-radius: 50%;
  color: #a7452d;
  background: #f9dfd4;
  font: 720 20px/1 ui-monospace, monospace;
}

@media (min-width: 640px) {
  .shell { padding-inline: 38px; }
  .hero, .success, .error-state { padding-top: 78px; }
  .primary { width: auto; min-width: 260px; }
  .code-panel { grid-template-columns: 1fr auto; align-items: center; padding: 24px; }
  .copy-button { width: auto; min-width: 138px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
