:root {
  color-scheme: light dark;
  --bg: #edf3fb;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: #ffffff;
  --text: #14243a;
  --muted: #5f7088;
  --border: rgba(77, 96, 126, 0.18);
  --primary: #6558e8;
  --teal: #079a8f;
  --red: #c93650;
  --shadow: 0 20px 60px rgba(41, 60, 92, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 90% 5%, rgba(101, 88, 232, 0.2), transparent 32rem),
    radial-gradient(circle at 5% 70%, rgba(7, 154, 143, 0.14), transparent 30rem),
    var(--bg);
  line-height: 1.65;
}

a {
  color: var(--primary);
  font-weight: 700;
  text-underline-offset: 3px;
}

.site-header {
  width: min(100% - 32px, 920px);
  margin: 0 auto;
  padding: 28px 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1.08rem;
  font-weight: 900;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(140deg, var(--primary), #8074f4);
  box-shadow: 0 10px 24px rgba(101, 88, 232, 0.26);
}

.header-link {
  font-size: 0.9rem;
}

.secure-label {
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 900;
}

main {
  width: min(100% - 32px, 920px);
  margin: 0 auto;
  padding: 34px 0 70px;
}

.hero {
  padding: clamp(28px, 6vw, 58px);
  border: 1px solid var(--border);
  border-radius: 32px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.eyebrow {
  display: inline-block;
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.03em;
}

h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(2.2rem, 7vw, 4.5rem);
}

.hero-copy {
  max-width: 710px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.16rem);
}

.meta {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.actions,
.link-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  min-height: 46px;
  padding: 11px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  background: var(--surface-strong);
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(48, 65, 94, 0.08);
}

.button-primary {
  border-color: transparent;
  color: #fff;
  background: var(--primary);
}

.content {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.section-card {
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 10px 34px rgba(41, 60, 92, 0.07);
}

.section-card h2 {
  margin: 0 0 13px;
  font-size: clamp(1.3rem, 3vw, 1.7rem);
}

.section-card h3 {
  margin: 22px 0 8px;
  font-size: 1.05rem;
}

.section-card p {
  margin: 10px 0;
}

.section-card ul,
.section-card ol {
  margin: 10px 0 0;
  padding-left: 22px;
}

.section-card li + li {
  margin-top: 8px;
}

.notice {
  border-left: 4px solid var(--teal);
}

.danger-notice {
  border-left: 4px solid var(--red);
}

.subscription-hero {
  margin-bottom: 22px;
}

.sandbox-banner {
  margin-top: 22px;
  padding: 12px 16px;
  border: 1px solid rgba(201, 54, 80, 0.28);
  border-radius: 14px;
  color: var(--red);
  background: rgba(201, 54, 80, 0.08);
  font-weight: 800;
}

.subscription-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(0, 1.6fr);
  align-items: start;
  gap: 22px;
}

.auth-card {
  position: sticky;
  top: 20px;
}

.auth-card h2 {
  margin-top: 0;
}

.muted-copy,
.form-status {
  color: var(--muted);
}

.auth-form {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.auth-form label {
  font-size: 0.88rem;
  font-weight: 800;
}

.auth-form input {
  width: 100%;
  min-height: 46px;
  margin-bottom: 6px;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  background: var(--surface-strong);
  font: inherit;
}

.auth-form input:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(101, 88, 232, 0.15);
}

.auth-form .button,
.account-summary + .button,
#sign-out-button {
  width: 100%;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
}

.button-quiet {
  margin-top: 10px;
  color: var(--muted);
  background: transparent;
}

.form-status {
  min-height: 1.65em;
  margin: 18px 0 0;
  font-size: 0.9rem;
}

.form-status[data-tone="error"] {
  color: var(--red);
}

.form-status[data-tone="success"] {
  color: var(--teal);
}

.account-summary {
  display: grid;
  gap: 12px;
  margin: 20px 0;
}

.account-summary div {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.account-summary dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.account-summary dd {
  margin: 2px 0 0;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.plans-column {
  min-width: 0;
}

.billing-cycle {
  width: fit-content;
  margin: 0 auto 18px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  gap: 4px;
  background: var(--surface);
}

.cycle-button {
  min-height: 40px;
  padding: 8px 14px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.cycle-button.is-active {
  color: #fff;
  background: var(--primary);
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.plan-card {
  min-width: 0;
  padding: 24px 20px;
  border: 1px solid var(--border);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--surface);
  box-shadow: 0 10px 34px rgba(41, 60, 92, 0.07);
}

.plan-card.featured {
  border-color: rgba(101, 88, 232, 0.5);
  box-shadow: 0 16px 44px rgba(101, 88, 232, 0.14);
}

.plan-card h2 {
  margin: 2px 0 0;
}

.plan-kicker {
  min-height: 2.6em;
  margin: 0;
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.web-plan-price {
  margin: 12px 0 0;
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  font-weight: 900;
  line-height: 1;
}

.web-plan-price span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.feature-list {
  flex: 1;
  margin: 0;
  padding-left: 19px;
  color: var(--muted);
  font-size: 0.9rem;
}

.feature-list li + li {
  margin-top: 8px;
}

.plan-included {
  min-height: 46px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  text-align: center;
}

.checkout-hero {
  text-align: center;
}

.checkout-hero h1,
.checkout-hero .hero-copy {
  margin-left: auto;
  margin-right: auto;
}

.checkout-actions {
  justify-content: center;
}

.checkout-loader {
  width: 42px;
  height: 42px;
  margin: 28px auto 0;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: checkout-spin 0.9s linear infinite;
}

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

.step-list {
  counter-reset: steps;
  list-style: none;
  padding: 0 !important;
}

.step-list li {
  position: relative;
  min-height: 46px;
  padding-left: 56px;
}

.step-list li::before {
  counter-increment: steps;
  content: counter(steps);
  position: absolute;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--primary);
  font-weight: 900;
}

footer {
  width: min(100% - 32px, 920px);
  margin: 0 auto;
  padding: 0 0 42px;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #07111f;
    --surface: rgba(17, 31, 51, 0.78);
    --surface-strong: #14233a;
    --text: #f4f7fc;
    --muted: #acb8ca;
    --border: rgba(255, 255, 255, 0.12);
    --primary: #9a8fff;
    --teal: #42d6c8;
    --red: #ff7a8e;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.26);
  }
}

@media (max-width: 520px) {
  .site-header {
    padding-top: 18px;
  }

  main {
    padding-top: 18px;
  }

  .hero {
    border-radius: 24px;
  }

  .button {
    width: 100%;
  }
}

@media (max-width: 820px) {
  .subscription-layout {
    grid-template-columns: 1fr;
  }

  .auth-card {
    position: static;
  }

  .plan-grid {
    grid-template-columns: 1fr;
  }

  .plan-kicker {
    min-height: 0;
  }
}
