:root {
  --page-bg: #f6f1e7;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #ffffff;
  --text-high: #111111;
  --text-med: #4d473f;
  --text-low: #7a7168;
  --border: rgba(17, 17, 17, 0.08);
  --border-strong: rgba(17, 17, 17, 0.14);
  --shadow-soft: 0 18px 40px rgba(28, 19, 8, 0.09);
  --shadow-strong: 0 28px 68px rgba(28, 19, 8, 0.16);
  --accent: #b79353;
  --accent-deep: #8d6a39;
  --accent-soft: rgba(183, 147, 83, 0.16);
  --success-soft: rgba(54, 130, 87, 0.12);
  --success-text: #23593a;
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Google Sans", "Segoe UI", Arial, sans-serif;
}

body {
  min-height: 100vh;
  color: var(--text-high);
  background:
    radial-gradient(circle at top left, rgba(183, 147, 83, 0.24), transparent 34%),
    radial-gradient(circle at top right, rgba(0, 0, 0, 0.06), transparent 26%),
    linear-gradient(180deg, #fbfaf6 0%, var(--page-bg) 100%);
}

.page-shell {
  width: min(1380px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 20px 0 42px;
}

.topbar {
  min-height: 72px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  color: #050505;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  text-decoration: none;
}

.back-link {
  color: var(--text-med);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  padding: 12px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(17, 17, 17, 0.06);
}

.page-content {
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding-top: 26px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(290px, 0.8fr);
  gap: 28px;
  align-items: stretch;
}

.hero-copy,
.hero-panel {
  background: var(--surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}

.hero-copy {
  padding: 34px 34px 36px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

h1 {
  margin-top: 18px;
  max-width: 780px;
  font-size: clamp(2.5rem, 5vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.lede {
  margin-top: 20px;
  max-width: 740px;
  color: var(--text-med);
  font-size: 1.08rem;
  line-height: 1.7;
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.status-pill-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.status-pill {
  width: fit-content;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.08);
  color: var(--text-high);
  display: inline-flex;
  align-items: center;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.status-pill.status-active {
  background: var(--success-soft);
  color: var(--success-text);
}

.status-pill.status-login {
  background: rgba(183, 147, 83, 0.16);
  color: var(--accent-deep);
}

.status-summary {
  color: var(--text-med);
  font-size: 0.96rem;
  line-height: 1.5;
}

.portal-btn {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  background: #ffffff;
  color: var(--text-high);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.portal-btn:hover:not(:disabled),
.plan-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(17, 17, 17, 0.08);
}

.portal-btn:disabled,
.plan-button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
  box-shadow: none;
}

.hero-panel {
  padding: 20px;
  display: grid;
  gap: 14px;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 18px 16px;
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  border: 1px solid rgba(17, 17, 17, 0.06);
}

.hero-stat-label {
  color: var(--text-low);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-stat-value {
  font-size: 1.16rem;
  font-weight: 800;
  color: var(--text-high);
}

.plans-section {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 22px;
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-height: 100%;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.plan-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-strong);
}

.plan-card.is-current {
  border-color: rgba(54, 130, 87, 0.34);
  box-shadow: 0 24px 60px rgba(35, 89, 58, 0.12);
}

.plan-card.is-current::after {
  content: "Current plan";
  position: absolute;
  top: 18px;
  right: 18px;
  min-height: 30px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success-text);
  font-size: 0.78rem;
  font-weight: 800;
}

.plan-featured {
  border-color: rgba(183, 147, 83, 0.34);
  box-shadow: var(--shadow-strong);
}

.plan-pro {
  grid-column: span 6;
  background:
    linear-gradient(180deg, rgba(183, 147, 83, 0.12), rgba(255, 255, 255, 0.94)),
    rgba(255, 255, 255, 0.94);
}

.plan-super,
.plan-plus,
.plan-lite,
.plan-flash {
  grid-column: span 3;
}

.plan-badge {
  width: fit-content;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 800;
}

.plan-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.plan-head h2 {
  font-size: 1.55rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

.plan-subtitle {
  margin-top: 8px;
  color: var(--text-med);
  font-size: 0.98rem;
  line-height: 1.55;
}

.plan-price {
  font-size: 2.15rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.plan-price span {
  color: var(--text-low);
  font-size: 0.98rem;
  font-weight: 600;
}

.plan-features {
  list-style: none;
  display: grid;
  gap: 14px;
  flex: 1;
}

.plan-features li {
  display: flex;
  gap: 10px;
  color: var(--text-med);
  font-size: 0.97rem;
  line-height: 1.55;
}

.plan-features .material-symbols-rounded {
  color: var(--accent-deep);
  font-size: 20px;
  flex: 0 0 auto;
  margin-top: 1px;
}

.plan-button {
  width: 100%;
  min-height: 50px;
  border-radius: var(--radius-sm);
  font-size: 0.96rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.plan-button.primary {
  background: #111111;
  color: #ffffff;
  border: none;
}

.plan-button.secondary {
  background: #f3efe7;
  color: #111111;
  border: 1px solid rgba(17, 17, 17, 0.08);
}

.plan-button.current {
  background: #ecf5ef;
  color: var(--success-text);
  border: 1px solid rgba(35, 89, 58, 0.14);
}

.plan-button.portal {
  background: #fffaf0;
  color: var(--accent-deep);
  border: 1px solid rgba(183, 147, 83, 0.2);
}

.checkout-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.76);
}

.stripe-badge {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid rgba(17, 17, 17, 0.08);
  color: var(--text-high);
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
}

.stripe-badge-icon {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: linear-gradient(135deg, #635bff 0%, #8b84ff 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  position: relative;
}

.stripe-badge-icon::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.92);
}

.billing-note {
  color: var(--text-med);
  font-size: 0.94rem;
  line-height: 1.6;
  text-align: right;
}

@media (max-width: 1180px) {
  .plan-pro {
    grid-column: span 12;
  }

  .plan-super,
  .plan-plus,
  .plan-lite,
  .plan-flash {
    grid-column: span 6;
  }
}

@media (max-width: 920px) {
  .page-shell {
    width: min(100vw - 20px, 100%);
    padding-top: 12px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 0 4px;
  }

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

  .hero-copy,
  .hero-panel {
    padding: 24px;
  }

  .hero-actions,
  .checkout-note {
    flex-direction: column;
    align-items: flex-start;
  }

  .billing-note {
    text-align: left;
  }
}

@media (max-width: 720px) {
  .plans-section {
    grid-template-columns: 1fr;
  }

  .plan-pro,
  .plan-super,
  .plan-plus,
  .plan-lite,
  .plan-flash {
    grid-column: span 1;
  }

  .plan-card.is-current::after {
    position: static;
    margin-top: -6px;
    width: fit-content;
  }
}
