:root {
  --ink: #12141c;
  --muted: #5b6172;
  --line: #e6e8ef;
  --accent: #4b3bff;
  --accent-ink: #ffffff;
  --success: #10924a;
  --danger: #c0392b;
  --bg: #f5f6fb;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 10px 40px rgba(20, 22, 40, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  clip: rect(0 0 0 0);
  overflow: hidden;
}

.test-banner {
  background: #fff7e6;
  border-bottom: 1px solid #ffe0a3;
  color: #7a5a12;
  font-size: 0.86rem;
  text-align: center;
  padding: 10px 16px;
}

.checkout {
  max-width: 880px;
  margin: 40px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: start;
}

.product .brand {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 6px;
}

.product h1 {
  font-size: 1.7rem;
  margin: 0 0 12px;
  line-height: 1.2;
}

.product-desc { color: var(--muted); margin: 0 0 20px; }

.includes {
  list-style: none;
  padding: 0;
  margin: 0;
}

.includes li {
  padding: 8px 0 8px 28px;
  position: relative;
  border-top: 1px solid var(--line);
}

.includes li::before {
  content: "✓";
  color: var(--success);
  position: absolute;
  left: 0;
  font-weight: 700;
}

.pay-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.price-label { color: var(--muted); }
.price-amount { font-size: 1.7rem; font-weight: 700; }

.terms-gate {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 18px;
  cursor: pointer;
}

.terms-gate input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

.pay-button {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 1rem;
  font-weight: 600;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.05s ease;
}

.pay-button:hover:not(:disabled) { opacity: 0.92; }
.pay-button:active:not(:disabled) { transform: translateY(1px); }

.pay-button:disabled {
  background: #c7c9d6;
  cursor: not-allowed;
}

.pay-error {
  color: var(--danger);
  font-size: 0.88rem;
  min-height: 1.2em;
  margin: 10px 0 0;
}

.secured {
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
  margin: 14px 0 0;
}

.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 24px 20px 40px;
}

/* Static document pages (terms) and result pages (success / cancel) */
.doc, .result {
  max-width: 640px;
  margin: 48px auto;
  padding: 0 24px;
}

.doc h1 { font-size: 1.6rem; }
.doc h2 { font-size: 1.1rem; margin-top: 28px; }
.doc p { color: #33384a; }

.result { text-align: center; }

.result-icon {
  width: 64px;
  height: 64px;
  line-height: 64px;
  border-radius: 50%;
  font-size: 2rem;
  font-weight: 700;
  margin: 0 auto 18px;
  color: #fff;
}

.result-icon.success { background: var(--success); }
.result-icon.cancel { background: var(--danger); }

.payment-summary {
  display: inline-block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 16px;
  color: var(--muted);
  font-size: 0.92rem;
}

.back { margin-top: 28px; }

@media (max-width: 720px) {
  .checkout {
    grid-template-columns: 1fr;
    margin-top: 24px;
  }
}
