/* ── Pricing + Account pages — add-on for site.css ────────────────────────── */

/* ── Shared page shell ──────────────────────────────────────────────────── */
.pricing-page {
  max-width: 920px;
  margin: 0 auto;
  padding: 3rem 1.25rem 5rem;
}
.account-page {
  max-width: 500px;
  margin: 0 auto;
  padding: 3rem 1.25rem 5rem;
}

/* ── Page header ─────────────────────────────────────────────────────────── */
.page-intro {
  text-align: center;
  margin-bottom: 3rem;
}
.page-intro .section-eyebrow {
  margin-bottom: 0.5rem;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}
.page-intro h1 {
  font-family: var(--font);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
  line-height: 1.15;
  color: var(--text);
}
.page-intro .page-lead {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
  max-width: 34rem;
  margin-inline: auto;
}

/* ── Billing toggle (monthly / yearly) ────────────────────────────────────── */
.billing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  font-size: 0.9rem;
  font-weight: 500;
}
.billing-toggle__switch {
  position: relative;
  width: 44px;
  height: 24px;
  cursor: pointer;
}
.billing-toggle__switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.billing-toggle__track {
  position: absolute;
  inset: 0;
  background: var(--border-strong);
  border-radius: 999px;
  transition: background 0.2s;
}
.billing-toggle__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.billing-toggle__switch input:checked ~ .billing-toggle__track  { background: var(--accent); }
.billing-toggle__switch input:checked ~ .billing-toggle__thumb  { transform: translateX(20px); }
.billing-toggle__label--save {
  background: rgba(21,128,61,0.1);
  color: var(--ok);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

/* ── Plan grid ───────────────────────────────────────────────────────────── */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 3rem;
}
@media (max-width: 680px) {
  .plan-grid { grid-template-columns: 1fr; }
}

.plan-card {
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.25rem;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  transition: box-shadow 0.2s;
  min-width: 0;
}
.plan-card:hover {
  box-shadow: var(--shadow-sm);
}

/* Pro — highlighted */
.plan-card--pro {
  border-color: var(--accent);
  background: linear-gradient(160deg, rgba(234,88,12,0.04) 0%, var(--bg) 60%);
}
/* Lifetime — violet */
.plan-card--lifetime {
  border-color: var(--violet);
  background: linear-gradient(160deg, var(--violet-dim) 0%, var(--bg) 60%);
}

.plan-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.85rem;
  border-radius: 999px;
  white-space: nowrap;
}
.plan-card--pro     .plan-badge { background: var(--accent);  color: #fff; }
.plan-card--lifetime .plan-badge { background: var(--violet); color: #fff; }

.plan-name {
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-secondary);
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.07em;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
  margin-bottom: 0.2rem;
  flex-wrap: nowrap;
  min-width: 0;
}
.plan-price__amount {
  font-family: var(--font);
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  flex-shrink: 0;
  color: var(--text);
}
.plan-price__period {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.plan-price__original {
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: line-through;
  margin-bottom: 0.5rem;
  min-height: 1.2em;
}

.plan-tagline {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0 0 1.25rem;
  min-height: 2.5em;
}

.plan-cta {
  display: block;
  width: 100%;
  padding: 0.65rem 1rem;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s, opacity 0.15s;
  border: none;
  margin-bottom: 1.5rem;
}
.plan-cta:disabled { opacity: 0.5; cursor: not-allowed; }

.plan-card--free     .plan-cta { background: var(--surface-2); color: var(--text); border: 1.5px solid var(--border-strong); }
.plan-card--free     .plan-cta:hover { background: var(--bg-deep); }
.plan-card--pro      .plan-cta { background: var(--accent); color: #fff; }
.plan-card--pro      .plan-cta:hover { background: var(--accent-2); }
.plan-card--lifetime .plan-cta { background: var(--violet); color: #fff; }
.plan-card--lifetime .plan-cta:hover { background: var(--violet-2); }

/* Feature list */
.plan-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-size: 0.875rem;
}
.plan-feature {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  color: var(--text-secondary);
}
.plan-feature--yes { color: var(--text); }
.plan-feature__icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 2px;
}
.plan-feature--yes  .plan-feature__icon { color: var(--ok); }
.plan-feature--no   .plan-feature__icon { color: var(--border-strong); }

/* ── Pricing FAQ ─────────────────────────────────────────────────────────── */
.pricing-faq {
  max-width: 600px;
  margin: 0 auto 3rem;
}
.pricing-faq h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin: 0 0 1.25rem;
  text-align: center;
}

/* ── Account page ────────────────────────────────────────────────────────── */
.account-card {
  max-width: 440px;
  margin: 0 auto;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 2rem;
  background: var(--bg);
}

/* Auth tabs */
.auth-tabs {
  display: flex;
  border-bottom: 1.5px solid var(--border);
  margin-bottom: 1.5rem;
}
.auth-tab {
  flex: 1;
  padding: 0.6rem 1rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  background: none;
  border: none;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1.5px;
  color: var(--muted);
  font-family: var(--font);
  transition: color 0.15s, border-color 0.15s;
}
.auth-tab.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Form fields */
.form-field {
  margin-bottom: 1rem;
}
.form-field label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  color: var(--text);
}
.form-field input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font: inherit;
  font-size: 0.92rem;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.15s;
}
.form-field input:focus {
  outline: none;
  border-color: var(--accent);
}

.form-submit {
  width: 100%;
  padding: 0.7rem 1rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 0.5rem;
}
.form-submit:hover { background: var(--accent-2); }
.form-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.form-error {
  margin-top: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius);
  background: rgba(180,83,9,0.08);
  border: 1px solid rgba(180,83,9,0.25);
  color: var(--warn);
  font-size: 0.85rem;
}
.form-success {
  margin-top: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius);
  background: rgba(21,128,61,0.07);
  border: 1px solid rgba(21,128,61,0.2);
  color: var(--ok);
  font-size: 0.85rem;
}

/* Subscription dashboard */
.sub-dashboard { display: flex; flex-direction: column; gap: 1.25rem; }

.sub-plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.sub-plan-badge--free     { background: var(--surface-2); color: var(--muted); }
.sub-plan-badge--pro      { background: rgba(234,88,12,0.12); color: var(--accent-2); }
.sub-plan-badge--lifetime { background: var(--violet-dim); color: var(--violet-2); }

.sub-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.sub-info-row:last-child { border-bottom: none; }
.sub-info-label { color: var(--text-secondary); }
.sub-info-value { font-weight: 600; }

.sub-actions { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 0.25rem; }
.sub-btn {
  display: block;
  width: 100%;
  padding: 0.65rem 1rem;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s;
  border: none;
  text-decoration: none;
}
.sub-btn--primary   { background: var(--accent); color: #fff; }
.sub-btn--primary:hover { background: var(--accent-2); color: #fff; }
.sub-btn--secondary { background: var(--surface-2); color: var(--text); border: 1.5px solid var(--border-strong); }
.sub-btn--secondary:hover { background: var(--bg-deep); }
.sub-btn--danger    { background: transparent; color: var(--muted); font-weight: 500; font-size: 0.85rem; }
.sub-btn--danger:hover { color: var(--warn); }

/* spinner */
.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 0.35rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* upgrade banner on account page */
.upgrade-banner {
  background: linear-gradient(135deg, rgba(234,88,12,0.06) 0%, var(--surface) 100%);
  border: 1.5px solid rgba(234,88,12,0.2);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
}
.upgrade-banner h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0 0 0.35rem;
}
.upgrade-banner p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0 0 1rem;
}

/* active nav link */
nav.nav-main a.is-active {
  color: var(--text);
  font-weight: 700;
}
