:root {
  color: #1a1a1a;
  background: #f7f5f1;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Avenir Next", sans-serif;
  font-synthesis: none;
  --paper: #f7f5f1;
  --surface: #ffffff;
  --ink: #1a1a1a;
  --muted: #696661;
  --border: #d9d4cc;
  --coral: #ff5f42;
  --coral-hover: #ed4f34;
  --success: #2e944b;
  --danger: #b43a2d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--paper);
}

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

.page-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 48px 24px;
}

.handoff {
  width: min(100%, 560px);
  text-align: center;
}

.brand-lockup {
  display: block;
  width: 174px;
  height: auto;
  margin: 0 auto 40px;
}

.state h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2rem, 4.6vw, 3rem);
  font-weight: 850;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.lede {
  max-width: 510px;
  margin: 18px auto 26px;
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.5;
}

.security-list {
  overflow: hidden;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  text-align: left;
}

.security-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 13px 20px;
  font-size: 0.98rem;
  line-height: 1.35;
}

.security-list li + li {
  border-top: 1px solid var(--border);
}

.security-list svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.market-note {
  margin: 20px 0 14px;
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.4;
}

.primary-action,
.text-action {
  width: 100%;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.primary-action {
  min-height: 52px;
  padding: 13px 22px;
  border-radius: 9px;
  background: var(--coral);
  color: white;
  box-shadow: 0 7px 18px rgb(255 95 66 / 18%);
  font-size: 1.2rem;
  font-weight: 760;
  transition: background 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.primary-action:hover {
  background: var(--coral-hover);
  box-shadow: 0 9px 22px rgb(255 95 66 / 24%);
  transform: translateY(-1px);
}

.primary-action:focus-visible,
.text-action:focus-visible,
a:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.primary-action:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

.text-action {
  display: inline-block;
  width: auto;
  min-height: 44px;
  margin: 8px auto 0;
  padding: 10px 8px;
  background: transparent;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

footer {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.5;
}

footer p {
  margin: 0 0 10px;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0 10px;
}

footer a {
  display: inline-block;
  min-height: 44px;
  padding: 12px 4px;
  color: inherit;
  text-underline-offset: 3px;
}

.state--success,
.state--error,
.state--loading {
  padding: 16px 0 6px;
}

.success-mark,
.error-mark {
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  fill: none;
  stroke: var(--success);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.error-mark {
  stroke: var(--danger);
}

.spinner {
  display: block;
  width: 34px;
  height: 34px;
  margin: 0 auto 22px;
  border: 3px solid var(--border);
  border-top-color: var(--coral);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.state--loading p {
  color: var(--muted);
}

[hidden] {
  display: none !important;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .primary-action {
    transition: none;
  }

  .spinner {
    animation: none;
  }
}

@media (max-width: 600px) {
  .page-shell {
    place-items: start center;
    padding: max(32px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
  }

  .brand-lockup {
    width: 152px;
    margin-bottom: 34px;
  }

  .state h1 {
    font-size: 2.22rem;
  }

  .lede {
    margin-top: 16px;
    font-size: 1rem;
  }

  .security-list li {
    min-height: 64px;
    padding: 13px 16px;
    font-size: 0.93rem;
  }

  footer {
    margin-top: 26px;
  }
}

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