:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #15171a;
  --muted: #67717e;
  --muted-2: #8a939f;
  --line: #e2e6ea;
  --line-strong: #cfd5dc;
  --blue: #0a66ff;
  --green: #12a150;
  --green-hover: #0d8b44;
  --shadow: 0 10px 35px rgba(25, 34, 45, .08);
  --radius: 10px;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Open Sans", Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
a { color: #246bd9; }

.page-shell { min-height: 100vh; }
.topbar {
  height: 72px;
  background: #fff;
  border-bottom: 1px solid #e9ebee;
}
.topbar__inner {
  width: min(760px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.secure-label { display: flex; align-items: center; gap: 8px; color: #525a65; font-size: 13px; }
.lock-icon { width: 22px; height: 22px; border: 1px solid #d7dce2; border-radius: 50%; display: grid; place-items: center; font-size: 8px; color: #606975; }
.brand-name { font-weight: 700; font-size: 14px; color: #20242a; }

body:not(.checkout-ready) .checkout-grid { opacity: 0; pointer-events: none; }

.checkout-grid {
  width: min(760px, calc(100% - 32px));
  margin: 28px auto 70px;
}

.checkout-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 22px 18px;
  overflow: hidden;
}
.product-block { display: flex; gap: 14px; align-items: flex-start; }
.product-copy h1 { font-size: 17px; margin: 0 0 4px; font-weight: 600; color: #20242a; }
.product-description { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 0; }
.divider { border-top: 1px solid #edf0f2; margin: 20px -22px 0; }
.checkout-section { margin-top: 20px; }
.checkout-section h2 { font-size: 15px; margin: 0 0 10px; font-weight: 600; }

.plan-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plan-option {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  padding: 14px 14px 12px;
  text-align: left;
  cursor: pointer;
  position: relative;
  transition: border-color .15s, box-shadow .15s;
}
.plan-option:hover { border-color: #9fb3c8; }
.plan-option.is-active { border-color: #12a150; box-shadow: 0 0 0 2px rgba(18,161,80,.14); }
.plan-option__badge { position: absolute; top: -9px; right: 12px; background: #12a150; color: #fff; font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 3px 7px; border-radius: 999px; }
.plan-option__label { font-size: 12px; font-weight: 700; color: #30363d; text-transform: uppercase; letter-spacing: .03em; }
.plan-option__price { font-size: 21px; font-weight: 800; margin: 6px 0 2px; }
.plan-option__price small { font-size: 12px; font-weight: 600; color: var(--muted); }
.plan-option__note { font-size: 11px; color: var(--muted); margin: 0; }

.field { margin-bottom: 12px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field label { display: block; font-size: 11px; font-weight: 600; margin-bottom: 5px; color: #30363d; }
.field input {
  width: 100%;
  height: 43px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  outline: none;
  font-size: 13px;
  transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder { color: #a5adb6; }
.field input:focus { border-color: #6b9ff4; box-shadow: 0 0 0 3px rgba(56, 126, 237, .10); }
.field input.is-invalid { border-color: #d95555; }
.phone-input { display:flex; align-items:center; height:43px; border:1px solid var(--line-strong); border-radius:6px; background:#fff; overflow:hidden; }
.phone-input:focus-within { border-color:#6b9ff4; box-shadow:0 0 0 3px rgba(56,126,237,.10); }
.phone-input__prefix { display:flex; align-items:center; align-self:stretch; padding:0 10px; border-right:1px solid var(--line); color:#4e5965; font-size:12px; white-space:nowrap; background:#fafbfc; }
.phone-input input { border:0; border-radius:0; height:100%; min-width:0; box-shadow:none!important; }

.payment-methods { border: 1px solid var(--line); border-radius: 7px; overflow: hidden; padding: 12px 11px; background: #fff; }
.stripe-element-shell { border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; background: #fff; padding: 12px 12px 9px; box-sizing: border-box; width: 100%; }
.wallet-hint { margin-top: 9px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.wallet-hint small { width: 100%; color: #4b5563; font-size: 10px; }

.summary-list { display: flex; flex-direction: column; gap: 7px; }
.summary-row { display: flex; justify-content: space-between; gap: 14px; font-size: 11px; }.summary-row strong { font-weight: 600; }.summary-row span { white-space: nowrap; }
.summary-total { margin-top: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 6px; display: flex; justify-content: space-between; font-size: 12px; }
.tax-note { margin:8px 0 0; color:#7d8792; font-size:9px; line-height:1.4; }

.form-error { margin: 16px 0 -4px; padding: 10px 12px; border-radius: 6px; background: #fff3f3; color: #b43737; border: 1px solid #f0caca; font-size: 11px; }
.checkout-status { margin: 12px 0 -4px; padding: 10px 12px; border-radius:6px; background:#effaf2; color:#237346; border:1px solid #bce3c7; font-size:11px; }
.purchase-button { width: 100%; height: 47px; margin-top: 16px; border: 0; border-radius: 6px; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; cursor: pointer; transition: background .15s, transform .05s; }
.purchase-button:hover { background: var(--green-hover); }.purchase-button:active { transform: translateY(1px); }.purchase-button__lock { font-size: 8px; }
.purchase-button:disabled { opacity: .65; cursor: default; }
.security-strip { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 14px 0 20px; color: #626c77; text-align: left; }
.security-strip .shield { width: 25px; height: 25px; border: 1px solid #cbd2d9; border-radius: 50%; display: grid; place-items: center; font-size: 11px; color: #4a7658; }
.security-strip strong { display: block; font-size: 10px; font-weight: 600; }.security-strip small { display: block; font-size: 8px; color: #949ca5; }
.checkout-footer { border-top: 1px solid #edf0f2; padding-top: 15px; display: flex; flex-direction: column; gap: 8px; color: #7b8490; font-size: 9px; }
.checkout-footer div { display: flex; gap: 7px; }.checkout-footer a { color: #68727e; }

@media (max-width: 560px) {
  body { background: #fff; }
  .topbar { height: 62px; }
  .topbar__inner { width: calc(100% - 22px); }
  .checkout-grid { width: 100%; margin: 0 auto; }
  .checkout-card { border-radius: 0; border-left: 0; border-right: 0; box-shadow: none; padding: 18px 16px 22px; }
  .divider { margin-left: -16px; margin-right: -16px; }
  .field-grid { grid-template-columns: 1fr; gap: 0; }
  .plan-toggle { grid-template-columns: 1fr; }
}
