:root {
  --amber: #f5a623;
  --amber-dark: #cc8910;
  --border: #e8e0d5;
  --ink: #1c1a17;
  --muted: #6b6a67;
  --navy: #0d1117;
  --paper: #fafaf8;
  --sand: #f2ede4;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
  margin: 0;
}
button, input { font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }

.checkout-shell {
  margin: 0 auto;
  max-width: 720px;
  min-height: 100dvh;
  padding: clamp(1.1rem, 4vw, 2.4rem);
  position: relative;
}
.checkout-close {
  align-items: center;
  background: var(--navy);
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  display: flex;
  font-size: 1.35rem;
  height: 40px;
  justify-content: center;
  position: absolute;
  right: 1rem;
  top: 1rem;
  width: 40px;
}
.checkout-kicker {
  color: var(--amber-dark);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .09em;
  margin: 0 0 .55rem;
  text-transform: uppercase;
}
h1 {
  font-size: clamp(1.55rem, 5vw, 2.15rem);
  letter-spacing: -.035em;
  line-height: 1.12;
  margin: 0 3rem .7rem 0;
}
.checkout-copy {
  color: var(--muted);
  font-size: .91rem;
  line-height: 1.6;
  margin: 0 0 1.35rem;
}
.checkout-fields { display: grid; gap: .9rem; }
.checkout-fields-two { display: grid; gap: .9rem; grid-template-columns: 1fr 1fr; }
label > span, .field-label {
  display: block;
  font-size: .78rem;
  font-weight: 750;
  margin-bottom: .32rem;
}
input {
  background: #fff;
  border: 1px solid #bdb5a8;
  border-radius: 10px;
  color: var(--ink);
  min-height: 46px;
  padding: .7rem .8rem;
  width: 100%;
}
input:focus { border-color: var(--amber-dark); box-shadow: 0 0 0 3px rgba(245, 166, 35, .18); outline: 0; }
input[readonly] { background: var(--sand); }
small, .checkout-hint { color: var(--muted); display: block; font-size: .72rem; margin-top: .25rem; }
.turnstile { min-height: 66px; overflow: hidden; }
.checkout-error {
  background: #fff0f0;
  border: 1px solid #efb2b2;
  border-radius: 10px;
  color: #8d1b1b;
  font-size: .8rem;
  margin-top: 1rem;
  padding: .75rem;
}
.checkout-primary, .checkout-secondary {
  align-items: center;
  border: 1px solid var(--amber);
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  font-size: .85rem;
  font-weight: 800;
  justify-content: center;
  margin-top: 1rem;
  min-height: 48px;
  padding: .75rem 1rem;
  text-align: center;
  width: 100%;
}
.checkout-primary { background: var(--amber); color: var(--navy); }
.checkout-primary:hover { background: var(--amber-dark); }
.checkout-secondary { background: #fff; border-color: #bdb5a8; color: var(--ink); }
.checkout-primary:disabled, .checkout-secondary:disabled { cursor: wait; opacity: .62; }
.checkout-link { text-decoration: none; }
.status-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 1rem 0;
  padding: 1rem;
}
.status-row { display: flex; font-size: .82rem; gap: 1rem; justify-content: space-between; padding: .28rem 0; }
.status-row span { color: var(--muted); }
.status-row strong { overflow-wrap: anywhere; text-align: right; }
.checkout-spinner {
  animation: spin .9s linear infinite;
  border: 3px solid #ddd5c8;
  border-radius: 50%;
  border-top-color: var(--amber);
  height: 28px;
  margin: .8rem 0;
  width: 28px;
}
.success-mark {
  align-items: center;
  background: #dcfce7;
  border-radius: 50%;
  color: #15803d;
  display: flex;
  font-size: 1.5rem;
  font-weight: 800;
  height: 52px;
  justify-content: center;
  margin-bottom: 1rem;
  width: 52px;
}
.next-steps { font-size: .84rem; margin: 1rem 0 0 1.2rem; padding: 0; }
.next-steps li { margin-bottom: .42rem; padding-left: .2rem; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 580px) {
  .checkout-shell { padding: 1rem; }
  .checkout-fields-two { grid-template-columns: 1fr; }
  .checkout-close { right: .7rem; top: .7rem; }
  .turnstile { overflow: visible; }
}
