/* ─── /upgrade — tier selection + Stripe Elements checkout ──────────────── */

/* ─── Anonymous layout: no sidebar, top nav, full-width content ───────── */

.up-body--anon .main-content--anon {
  margin-left: 0;
  padding: 0 3.5rem 4rem;
}

.up-anon-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 3.5rem;
  border-bottom: 1px solid rgba(112, 92, 108, 0.12);
  background: var(--color-pearl);
}

.up-anon-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.up-anon-brand-logo {
  height: 42px;
  width: auto;
  display: block;
}

.up-anon-nav-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.up-anon-nav-link {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--color-ink-stained);
  text-decoration: none;
  transition: color 0.15s ease;
}
.up-anon-nav-link:hover {
  color: var(--color-bloem);
}

.up-anon-nav-cta {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--color-blank-page);
  background: var(--color-bloem);
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s ease;
}
.up-anon-nav-cta:hover {
  background: var(--color-bloem-mid);
}

@media (max-width: 640px) {
  .up-anon-nav {
    padding: 1rem 1.25rem;
  }
  .up-body--anon .main-content--anon {
    padding: 0 1.25rem 3rem;
  }
}

/* ─── Free-trial banner ─────────────────────────────────────────────── */

.up-trial-banner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
  align-items: center;
  padding: 1.75rem 2rem;
  margin: 0 0 2.25rem;
  background: var(--color-new-growth);
  border-radius: 18px;
  border: 1px solid rgba(118, 133, 108, 0.35);
}

.up-trial-copy {
  min-width: 0;
}

.up-trial-eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-understory);
  margin: 0 0 0.4rem;
}

.up-trial-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--color-ink-stained);
  margin: 0 0 0.6rem;
  line-height: 1.15;
}

.up-trial-body {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.55;
  color: rgba(16, 15, 16, 0.75);
  margin: 0;
}

.up-trial-cta-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.up-btn--trial {
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
}

.up-trial-chip {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--color-understory);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.up-trial-fineprint {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 300;
  color: rgba(16, 15, 16, 0.55);
  margin: 0;
}

@media (max-width: 720px) {
  .up-trial-banner {
    grid-template-columns: 1fr;
    padding: 1.5rem 1.25rem;
  }
  .up-trial-cta-wrap {
    align-items: flex-start;
  }
}

.up-header {
  margin: 2rem 0 2.5rem;
  max-width: 720px;
}

.up-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  color: var(--color-ink-stained);
  margin: 0 0 0.75rem;
}

.up-subtitle {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.6;
  color: rgba(16, 15, 16, 0.65);
  margin: 0;
}

.up-step { }
.up-step.is-hidden { display: none; }

/* ─── Tier cards: pricing-table style ──────────────────────────────────── */

.up-tier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 2rem 0 1.5rem;
  align-items: stretch;
}

.up-tier {
  display: block;
  cursor: pointer;
  position: relative;
  /* Radio input is visually hidden but still keyboard-focusable via the
     label wrapper. */
}
.up-tier-radio {
  position: absolute; opacity: 0; pointer-events: none;
}

.up-tier-inner {
  background: var(--color-blank-page);
  border: 2px solid rgba(112, 92, 108, 0.14);
  border-radius: 16px;
  padding: 2rem 1.75rem 1.5rem;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}
.up-tier:hover .up-tier-inner {
  border-color: rgba(112, 92, 108, 0.5);
  box-shadow: 0 6px 24px -12px rgba(112, 92, 108, 0.28);
  transform: translateY(-2px);
}
.up-tier.is-selected .up-tier-inner {
  border-color: var(--color-bloem);
  box-shadow: 0 0 0 4px rgba(112, 92, 108, 0.15), 0 6px 24px -12px rgba(112, 92, 108, 0.35);
}

/* "Most popular" middle tier — subtle warm-cream background so it reads
   as elevated without shouting. Badge sits at the top-right corner. */
.up-tier--recommended .up-tier-inner {
  background: linear-gradient(180deg, rgba(246, 201, 92, 0.06) 0%, var(--color-blank-page) 40%);
  border-color: var(--color-apricity);
}
.up-tier--recommended:hover .up-tier-inner {
  border-color: var(--color-apricity);
}
.up-tier-badge {
  position: absolute;
  top: -0.75rem;
  right: 1.25rem;
  background: var(--color-apricity);
  color: var(--color-ink-stained);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  box-shadow: 0 2px 8px -2px rgba(16, 15, 16, 0.15);
}

.up-tier-headline {
  margin-bottom: 1.25rem;
  min-height: 4.5rem;
}
.up-tier-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--color-ink-stained);
  margin: 0 0 0.35rem;
  letter-spacing: -0.005em;
}
.up-tier-tagline {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.88rem;
  font-weight: 300;
  color: rgba(16, 15, 16, 0.6);
  line-height: 1.45;
  margin: 0;
}

.up-tier-price-block {
  display: flex;
  flex-direction: column;
  align-items: baseline;
  gap: 0.15rem;
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid rgba(112, 92, 108, 0.12);
}

/* Struck-through "was $X" line above the discounted price. Reads as the
   old, no-longer-current number so the current price feels like a real
   savings and not just an arbitrary amount. */
.up-tier-price-original {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  color: rgba(16, 15, 16, 0.35);
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  line-height: 1;
  margin-bottom: 0.15rem;
}

.up-tier-price-amount {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 400;
  color: var(--color-bloem);
  line-height: 1;
  letter-spacing: -0.02em;
}
.up-tier-price-once {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(16, 15, 16, 0.45);
  margin-top: 0.3rem;
}

/* Base note style stays quiet for tiers that use it as flavor text; the
   discount variant (below) turns it into an amber pill for emphasis. */
.up-tier-price-note {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-style: italic;
  color: rgba(16, 15, 16, 0.55);
  margin-top: 0.35rem;
}
.up-tier-price-block--discounted .up-tier-price-note {
  display: inline-block;
  background: rgba(246, 201, 92, 0.22);
  color: #8a6f1a;
  font-style: normal;
  font-weight: 400;
  font-size: 0.78rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  margin-top: 0.6rem;
  align-self: flex-start;
}
.up-tier-price-block--discounted .up-tier-price-note strong {
  font-weight: 700;
  color: #6b5610;
}

/* ─── Feature checklist ────────────────────────────────────────────────── */

.up-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  flex: 1;  /* pushes the CTA to the bottom of the card */
}
.up-feature {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.4rem 0;
  font-family: var(--font-body);
  font-size: 0.88rem;
  line-height: 1.45;
}
.up-feature.is-included {
  color: var(--color-ink-stained);
}
.up-feature.is-included .up-feature-mark {
  color: var(--color-understory);  /* sage-green check */
}
.up-feature.is-excluded {
  color: rgba(16, 15, 16, 0.35);
}
.up-feature.is-excluded .up-feature-mark {
  color: rgba(16, 15, 16, 0.2);
}
.up-feature-mark {
  flex-shrink: 0;
  margin-top: 0.05rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

/* Card CTA — appears as a subtle "Choose X" pill at the bottom. Filled
   when the tier is selected so it feels like the button has committed. */
.up-tier-cta {
  border-top: 1px dashed rgba(112, 92, 108, 0.15);
  padding-top: 1.25rem;
  text-align: center;
}
.up-tier-cta-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--color-bloem);
  padding: 0.55rem 1.25rem;
  border: 1.5px solid var(--color-bloem);
  border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}
.up-tier:hover .up-tier-cta-label {
  background: rgba(112, 92, 108, 0.06);
}
.up-tier.is-selected .up-tier-cta-label {
  background: var(--color-bloem);
  color: var(--color-pearl);
}

/* ─── Actions ──────────────────────────────────────────────────────────── */

.up-actions {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

.up-btn {
  border: none;
  border-radius: 999px;
  padding: 0.85rem 2rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 400;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.up-btn--primary {
  background: var(--color-bloem);
  color: var(--color-pearl);
}
.up-btn--primary:hover:not(:disabled) {
  background: var(--color-bloem-mid);
}
.up-btn--primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.up-btn--full { width: 100%; margin-top: 1rem; }

/* ─── Step 2: summary + card panel ─────────────────────────────────────── */

.up-summary {
  background: var(--color-blank-page);
  border: 1px solid rgba(112, 92, 108, 0.12);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  max-width: 560px;
}
.up-back-inline {
  border: none;
  background: transparent;
  color: var(--color-bloem);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 300;
  cursor: pointer;
  padding: 0 0 0.75rem;
}
.up-back-inline:hover { text-decoration: underline; }

.up-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.5rem 0;
  border-top: 1px solid rgba(112, 92, 108, 0.08);
}
.up-summary-row:first-of-type { border-top: none; }
.up-summary-label {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 300;
  color: rgba(16, 15, 16, 0.55);
}
.up-summary-tier {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-ink-stained);
}
.up-summary-price {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--color-bloem);
}

.up-card-panel {
  background: var(--color-blank-page);
  border: 1px solid rgba(112, 92, 108, 0.12);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  max-width: 560px;
}
.up-card-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(16, 15, 16, 0.5);
  margin-bottom: 0.75rem;
}
.up-payment-element { margin-bottom: 1rem; }

.up-error {
  background: rgba(220, 38, 38, 0.06);
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  color: #b91c1c;
  font-size: 0.85rem;
  margin: 0 0 1rem;
}

.up-note {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-style: italic;
  color: rgba(16, 15, 16, 0.45);
  text-align: center;
  margin: 0.75rem 0 0;
}
.up-note--warn { color: #b91c1c; font-style: normal; }

/* ─── Return page ──────────────────────────────────────────────────────── */
.up-return {
  max-width: 620px;
  margin: 4rem auto;
  text-align: center;
}

/* ─── Dashboard confirmation banner (rendered on /dashboard after upgrade) */
.up-success-banner {
  background: var(--color-bloem);
  color: var(--color-pearl);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.up-success-banner-copy strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  margin-bottom: 0.15rem;
}
.up-success-banner-copy span {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 300;
  opacity: 0.9;
}
.up-success-banner-cta {
  color: var(--color-pearl);
  text-decoration: underline;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 400;
}
.up-success-banner-close {
  background: transparent;
  border: none;
  color: var(--color-pearl);
  opacity: 0.6;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0 0.35rem;
}
.up-success-banner-close:hover { opacity: 1; }

/* ─── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .up-tier-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .up-tier-headline { min-height: 0; }
}
@media (max-width: 680px) {
  .up-title { font-size: 1.6rem; }
  .up-tier-inner { padding: 1.5rem 1.25rem 1.25rem; }
  .up-tier-price-amount { font-size: 2.15rem; }
  .up-summary, .up-card-panel { padding: 1.25rem; }
}

/* ─── Temporary "coming soon" page ───────────────────────────────────────── */
.cs-soon {
  padding: 2rem 2rem 2.25rem;
  margin: 0 0 2rem;
  background: var(--color-blank-page);
  border: 1px solid rgba(112, 92, 108, 0.22);
  border-radius: 18px;
}
.cs-soon-title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 400;
  color: var(--color-ink-stained);
  margin: 0 0 0.75rem;
  line-height: 1.15;
}
.cs-soon-body {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.6;
  color: rgba(16, 15, 16, 0.78);
  margin: 0 0 1.5rem;
  max-width: 46rem;
}
.cs-form { max-width: 34rem; }
.cs-form-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(16, 15, 16, 0.5);
  margin-bottom: 0.4rem;
}
.cs-form-row {
  display: flex;
  gap: 0.6rem;
  align-items: stretch;
}
.cs-form-input {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 300;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(112, 92, 108, 0.3);
  border-radius: 10px;
  background: var(--color-pearl);
  color: var(--color-ink-stained);
  outline: none;
  transition: border-color 0.15s;
}
.cs-form-input:focus { border-color: var(--color-bloem); }
.cs-form .up-btn { white-space: nowrap; }
.cs-form-msg {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  margin: 0.75rem 0 0;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
}
.cs-form-msg--success {
  color: #3d5232;
  background: var(--color-new-growth);
  border: 1px solid rgba(118, 133, 108, 0.4);
}
.cs-form-msg--error {
  color: #8a4a34;
  background: rgba(181, 101, 74, 0.1);
  border: 1px solid rgba(181, 101, 74, 0.25);
}
.cs-form-msg--note {
  color: var(--color-bloem-mid);
  background: rgba(112, 92, 108, 0.08);
  border: 1px solid rgba(112, 92, 108, 0.2);
}
.cs-form-fineprint {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 300;
  color: rgba(16, 15, 16, 0.5);
  margin: 0.6rem 0 0;
}
.cs-footer {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 300;
  color: rgba(16, 15, 16, 0.6);
  padding: 0.5rem 0 2rem;
}
.cs-footer a { color: var(--color-bloem); }
@media (max-width: 680px) {
  .cs-soon { padding: 1.5rem 1.25rem; }
  .cs-soon-title { font-size: 1.4rem; }
  .cs-form-row { flex-direction: column; }
  .cs-form .up-btn { width: 100%; }
}
