@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #f4f6f9;
  --card: #ffffff;
  --ink: #1a1f36;
  --ink-soft: #4b5563;
  --muted: #9aa1b1;
  --line: #e6e8ee;
  --line-strong: #c7ccd6;
  --navy: #262b4d;
  --navy-hover: #1b2040;
  --ring: rgba(38,43,77,.14);
  --ls: -0.02em;
  --shadow-card: 0 4px 6px -2px rgba(16,24,40,.04), 0 24px 48px -12px rgba(16,24,40,.12);
  --shadow-field: 0 1px 2px rgba(16,24,40,.06);
}
html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, sans-serif;
  letter-spacing: var(--ls);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 56px 20px;
}

.checkout {
  width: 100%; max-width: 468px;
  background: var(--card);
  border-radius: 22px;
  padding: 38px 38px 26px;
  box-shadow: var(--shadow-card);
}

/* test banner */
.test-banner {
  background: #fff3cd; color: #856404;
  border: 1px solid #ffc107; border-radius: 8px;
  padding: 8px 12px; font-size: 13px; font-weight: 600;
  text-align: center; margin-bottom: 16px;
}

/* header */
.co-head { display: flex; align-items: center; gap: 16px; }
.co-head .product { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; box-shadow: var(--shadow-field); }
.co-head-info { display: flex; flex-direction: column; line-height: 1.2; }
.plan-name { font-size: 30px; font-weight: 700; letter-spacing: -0.04em; }
.plan-price { font-size: 13px; color: var(--muted); margin-top: 4px; }
.slogan { font-size: 14.5px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.4; margin: 18px 0 26px; color: var(--ink-soft); }

/* fields */
.lbl { display: block; font-size: 14px; font-weight: 500; color: var(--ink-soft); margin: 16px 0 7px; }
.field {
  width: 100%; background: #fff; color: var(--ink);
  border: 1px solid var(--line); border-radius: 11px;
  padding: 13px 14px; font-family: inherit; letter-spacing: inherit; font-size: 15.5px;
  box-shadow: var(--shadow-field); transition: border-color .15s, box-shadow .15s;
}
.field::placeholder { color: var(--muted); }
.field:focus { outline: none; border-color: var(--line-strong); box-shadow: 0 0 0 4px var(--ring); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* payment methods */
.methods { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 22px 0 6px; }
.method {
  display: flex; align-items: center; justify-content: center; gap: 10px; position: relative;
  background: #fff; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 16px; font-size: 16px; font-weight: 500; color: #1F1F1F;
  box-shadow: var(--shadow-field); transition: .15s; cursor: pointer;
}
.method svg { width: 22px; height: 22px; }
.method:hover { border-color: var(--line-strong); }
.method.active { background: #000; border-color: #000; color: #fff; }
.method:active { transform: scale(.985); }

/* card accordion */
#card-fields {
  max-height: 0; opacity: 0; overflow: hidden;
  transform: translateY(-4px);
  transition: max-height .38s cubic-bezier(.4,0,.2,1), opacity .3s ease, transform .3s ease;
}
#card-fields.open { max-height: 460px; opacity: 1; transform: translateY(0); }

/* summary */
.summary { margin-top: 26px; border: 1px solid var(--line); border-radius: 14px; padding: 18px 18px 8px; background: #fcfcfd; }
.summary h3 { font-size: 14px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.srow { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.srow:last-child { border-bottom: none; }
.srow.minor { font-size: 13.5px; color: var(--ink-soft); }
.srow.total { font-weight: 700; font-size: 16px; }
.srow .old { color: var(--muted); text-decoration: line-through; }
.srow .disc { color: #1a8a4f; }

#turnstile { margin-top: 22px; min-height: 65px; }

/* pay button */
.pay-btn {
  width: 100%; margin-top: 24px; background: var(--navy); color: #fff;
  border: none; border-radius: 12px; padding: 16px; font-family: inherit;
  font-size: 16.5px; font-weight: 600; letter-spacing: var(--ls); cursor: pointer;
  transition: background .15s; box-shadow: 0 6px 16px -6px rgba(38,43,77,.5);
}
.pay-btn:hover { background: var(--navy-hover); }
.pay-btn:disabled { opacity: .6; cursor: default; }
.co-msg { font-size: 14px; text-align: center; margin-top: 14px; min-height: 18px; color: var(--ink-soft); }
.co-msg.ok { color: #1a8a4f; }
.co-msg.err { color: #c0392b; }

/* footer */
.co-foot {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; margin-top: 22px; color: var(--muted); font-size: 13px;
  white-space: nowrap;
}
.co-foot a { color: var(--muted); text-decoration: none; }
.co-foot a:hover { color: var(--ink-soft); }
.co-foot .powered { display: inline-flex; align-items: center; gap: 6px; }
.co-foot .stripe-logo { height: 17px; width: auto; color: #737373; }
.co-foot .sep { opacity: .5; }
.foot-wordmark { height: 17px; width: auto; vertical-align: middle; }

@media (max-width: 520px) {
  body { padding: 24px 14px; }
  .checkout { padding: 26px 22px 20px; border-radius: 14px; }
  .slogan { font-size: 13.5px; }
}
