:root {
  --navy: #101832;
  --blue: #0b55ff;
  --purple: #7c35ed;
  --muted: #5c6678;
  --line: #dfe5f0;
  --surface: #ffffff;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--navy);
  background:
    radial-gradient(circle at 8% 8%, rgba(124, 53, 237, 0.11), transparent 30%),
    radial-gradient(circle at 94% 8%, rgba(11, 85, 255, 0.13), transparent 32%),
    #f6f8fc;
  font-family: Inter, Arial, sans-serif;
}

button, input { font: inherit; }

.billing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 40px));
  margin: 20px auto 0;
  padding: 13px 18px;
  border: 1px solid rgba(210, 219, 233, 0.9);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 36px rgba(16, 24, 50, 0.08);
  backdrop-filter: blur(14px);
}

.billing-header img {
  display: block;
  width: 190px;
  height: auto;
}

.secure-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #526077;
  font-size: 13px;
  font-weight: 800;
}

.secure-label svg {
  width: 18px;
  fill: none;
  stroke: var(--blue);
  stroke-width: 2;
}

.billing-main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 52px 0 48px;
}

.billing-intro {
  max-width: 760px;
  margin: 0 auto 34px;
  text-align: center;
}

.eyebrow, .summary-kicker, .checkout-heading > span {
  display: block;
  color: var(--blue);
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.billing-intro h1 {
  margin: 12px 0 14px;
  font: 800 clamp(34px, 4.2vw, 58px)/1.03 Manrope, Inter, sans-serif;
  letter-spacing: -0.045em;
}

.billing-intro h1::after {
  content: "";
  display: inline-block;
  width: 0.18em;
  height: 0.18em;
  margin-left: 0.07em;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--purple));
}

.billing-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 650;
}

.billing-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(430px, 1.1fr);
  gap: 22px;
  align-items: start;
}

.order-summary, .checkout-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 24px 64px rgba(16, 24, 50, 0.1);
}

.order-summary {
  position: relative;
  overflow: hidden;
  padding: 30px;
  background:
    radial-gradient(circle at 100% 0%, rgba(124, 53, 237, 0.075), transparent 29%),
    radial-gradient(circle at 0% 100%, rgba(11, 85, 255, 0.065), transparent 31%),
    var(--surface);
}

.order-summary > * {
  position: relative;
  z-index: 1;
}
.checkout-panel { padding: 30px; min-height: 600px; }

.summary-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.summary-topline h2, .checkout-heading h2 {
  margin: 8px 0 0;
  font: 800 25px/1.1 Manrope, Inter, sans-serif;
}

.included-pill {
  flex: 0 0 auto;
  padding: 8px 10px;
  border: 1px solid #cad9ff;
  border-radius: 999px;
  color: #5934d3;
  background: linear-gradient(135deg, #f3f7ff, #f7f1ff);
  font-size: 10px;
  line-height: 1;
  font-weight: 900;
  text-transform: uppercase;
}

.billing-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 26px 0 0;
}

.plan-option {
  min-width: 0;
  padding: 16px;
  border: 2px solid #e1e6ef;
  border-radius: 15px;
  color: var(--navy);
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.plan-option:hover { transform: translateY(-1px); border-color: #a9bfff; }
.plan-option.is-active { border-color: var(--blue); background: #f5f8ff; box-shadow: 0 0 0 3px rgba(11, 85, 255, 0.08); }
.plan-option[data-plan="annual"].is-active {
  border-color: var(--purple);
  background: #faf7ff;
  box-shadow: 0 0 0 3px rgba(124, 53, 237, 0.08);
}
.plan-option > span { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 13px; font-weight: 850; }
.plan-option em { padding: 4px 6px; border-radius: 999px; color: #fff; background: linear-gradient(135deg, var(--blue), var(--purple)); font-size: 8px; font-style: normal; text-transform: uppercase; white-space: nowrap; }
.plan-option strong { display: block; margin-top: 10px; font: 800 22px/1 Manrope, Inter, sans-serif; }
.plan-option small { color: #657086; font-size: 11px; }
.plan-option .annual-equivalent {
  display: block;
  margin-top: 8px;
  color: #6a7488;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 750;
}

.savings-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  color: #6330c3;
  background: #f5efff;
  font-size: 12px;
  font-weight: 800;
}

.included-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
  margin: 26px 0;
  padding: 0;
  list-style: none;
}

.included-list li {
  position: relative;
  padding-left: 22px;
  color: #424e64;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 700;
}

.included-list li::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: inset 0 0 0 4px var(--blue);
}

.included-list li::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 4px;
  width: 5px;
  height: 3px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}

.summary-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 -4px;
  padding: 18px 16px;
  border: 1px solid #d8e1ff;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(11, 85, 255, 0.07), rgba(124, 53, 237, 0.075));
  font-weight: 800;
}

.summary-total strong { font: 800 30px/1 Manrope, Inter, sans-serif; }
.renewal-copy { margin: 10px 12px 0; color: #687389; font-size: 12px; line-height: 1.45; }
.checkout-heading { padding-bottom: 22px; border-bottom: 1px solid var(--line); }

.checkout-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 360px;
  color: #5d6980;
  font-size: 14px;
  font-weight: 750;
}

.spinner {
  width: 22px;
  height: 22px;
  border: 3px solid #dce4f5;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

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

.checkout-message {
  margin: 22px 0;
  padding: 14px;
  border: 1px solid #ffd0d0;
  border-radius: 12px;
  color: #8f2525;
  background: #fff6f6;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 700;
}

#checkout { margin-top: 20px; }

.checkout-legal {
  margin: 20px 0 0;
  color: #707a8e;
  font-size: 11px;
  line-height: 1.55;
  text-align: center;
}

.checkout-legal a, .billing-help a { color: var(--blue); font-weight: 800; }
.billing-help { margin: 24px 0 0; color: #626d81; font-size: 13px; text-align: center; }

@media (max-width: 900px) {
  .billing-layout { grid-template-columns: 1fr; }
  .checkout-panel { min-height: 500px; }
}

@media (max-width: 560px) {
  .billing-header { width: calc(100% - 24px); margin-top: 12px; padding: 11px 13px; border-radius: 16px; }
  .billing-header img { width: 150px; }
  .secure-label { font-size: 0; gap: 0; }
  .secure-label svg { width: 20px; }
  .billing-main { width: calc(100% - 24px); padding: 36px 0 30px; }
  .billing-intro { margin-bottom: 24px; }
  .billing-intro h1 { font-size: 36px; }
  .billing-intro p { font-size: 15px; }
  .order-summary, .checkout-panel { padding: 20px; border-radius: 18px; }
  .summary-topline { display: block; }
  .included-pill { display: inline-flex; margin-top: 14px; }
  .billing-choice { grid-template-columns: 1fr; }
  .included-list { grid-template-columns: 1fr; gap: 10px; }
}
