/* Pricing + post-checkout pages.
 *
 * Same design language as the Brief feed and /auth/sign-in: dark
 * surface, lime accent, Hanken Grotesk for prose + JetBrains Mono
 * for prices and labels. Card shape mirrors `.row` + `.auth-card`
 * (1px #1F1F25 border, #111114 fill, 10px radius). No shadows.
 */

.pricing {
  max-width: 980px;
  margin: 0 auto;
  padding: 56px 24px 96px;
  color: #ECECEE;
}

/* ── Hero ─────────────────────────────────────────────────────── */

.pricing-hero {
  text-align: center;
  margin-bottom: 48px;
}

/* Brand badge image — square SVG (same asset uploaded to Stripe).
   No border — the dark canvas blends seamlessly into the page bg
   so the mark + wordmark read as on a single surface. */
.pricing-hero-image {
  display: block;
  width: 100%;
  max-width: 315px;
  height: auto;
  margin: 0 auto 14px;
}

/* Tagline under the brand badge — picks up the page's Hanken
   Grotesk fonts (the SVG itself uses Helvetica fallback when
   rasterized for Stripe). */
.pricing-tagline {
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: 16px;
  line-height: 1.45;
  color: #BCBCC2;
  margin: 0 auto 18px;
  text-align: center;
}
.pricing-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 2.6px;
  color: #B8FF3C;
  display: inline-block;
  margin-bottom: 16px;
}
.pricing-headline {
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 4.4vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.5px;
  color: #ECECEE;
  margin: 0 auto 14px;
  max-width: 18ch;
}
.pricing-sub {
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: #BCBCC2;
  margin: 0 auto;
  max-width: 56ch;
}

/* ── Compare grid ────────────────────────────────────────────── */

.pricing-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: stretch;
}
@media (max-width: 720px) {
  .pricing-compare { grid-template-columns: 1fr; }
}

.pricing-card {
  background: #111114;
  border: 1px solid #1F1F25;
  border-radius: 10px;
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
}
.pricing-card-pro {
  border-color: rgba(184, 255, 60, 0.55);
  background: linear-gradient(180deg, rgba(184,255,60,0.02), rgba(184,255,60,0.00));
}

.pricing-card-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 2.4px;
  color: #8B8B92;
  margin-bottom: 18px;
}
.pricing-card-eyebrow-pro { color: #B8FF3C; }

/* ── Cadence toggle ──────────────────────────────────────────
 * Mirrors mobile Paywall (AnimatedCadenceToggle): segmented pill
 * with a sliding lime-tinted indicator behind the active option.
 * Lives ABOVE the plans grid (hero-level), centered, so the
 * billing cadence is the page's first decision.
 */

.pricing-cadence-row {
  display: flex;
  justify-content: center;
  margin: 0 auto 32px;
}

.pricing-toggle {
  /* Two equal-width segments + a sliding thumb behind them. The
     thumb is positioned absolutely; segments sit on top via
     z-index. The grid keeps both segments the same width so
     the indicator slides cleanly half the track width. */
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  width: 320px;
  max-width: 90vw;
  background: #0A0A0B;
  border: 1px solid #1F1F25;
  border-radius: 999px;
  padding: 4px;
}
.pricing-toggle-thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 999px;
  background: rgba(184, 255, 60, 0.14);
  border: 1px solid rgba(184, 255, 60, 0.55);
  transition: transform 240ms cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 0;
}
/* Annual is the default → thumb sits over the second slot. The
   thumb shifts back to the first slot when MONTHLY is selected. */
.pricing-toggle[data-cadence="annual"] .pricing-toggle-thumb {
  transform: translateX(100%);
}
.pricing-toggle[data-cadence="monthly"] .pricing-toggle-thumb {
  transform: translateX(0);
}
.pricing-toggle-seg {
  position: relative;
  z-index: 1;
  appearance: none;
  background: transparent;
  border: 0;
  padding: 9px 14px;
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.2px;
  color: #8B8B92;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: color 200ms cubic-bezier(0.16, 1, 0.3, 1);
}
.pricing-toggle-seg:hover { color: #BCBCC2; }
.pricing-toggle-seg.is-active { color: #B8FF3C; }
.pricing-save-pill {
  display: inline-block;
  padding: 2px 7px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: #B8FF3C;
  background: rgba(184, 255, 60, 0.10);
  border: 1px solid rgba(184, 255, 60, 0.35);
  border-radius: 999px;
  transition: opacity 200ms;
}
/* Quiet the SAVE pill when annual isn't the active option — it
   still occupies space (so the segment width doesn't jitter)
   but visually steps aside. */
.pricing-toggle-seg:not(.is-active) .pricing-save-pill {
  opacity: 0.55;
}

/* ── Per-digit price odometer ────────────────────────────────
 * The JS rebuilds .pricing-price-amount and .pricing-price-suffix
 * into a sequence of .pricing-char slots. Each slot is a 1em
 * window (overflow:hidden) over a vertical stack of
 * .pricing-char-line elements — one per cadence. Flipping
 * cadence translates the stack so the new line is on screen,
 * giving the dial/odometer feel from the mobile Paywall. */
.pricing-price-amount .pricing-char,
.pricing-price-suffix .pricing-char {
  display: inline-block;
  height: 1em;
  line-height: 1;
  overflow: hidden;
  vertical-align: top;
}
.pricing-price-amount .pricing-char-stack,
.pricing-price-suffix .pricing-char-stack {
  display: block;
  /* Match mobile Paywall (AnimatedPrice): 420ms cubic-out. */
  transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}
.pricing-price-amount .pricing-char-line,
.pricing-price-suffix .pricing-char-line {
  display: block;
  height: 1em;
  line-height: 1;
  white-space: pre;  /* preserve padding spaces in monthly amount */
}

.pricing-card-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 22px;
}
.pricing-price-amount {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 40px;
  line-height: 1;
  letter-spacing: -1px;
  color: #ECECEE;
}
.pricing-price-suffix {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #8B8B92;
  letter-spacing: 0.5px;
}

/* Feature lists */
.pricing-feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pricing-feature-list li {
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: 14px;
  line-height: 1.4;
  color: #ECECEE;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.pricing-card-free .pricing-feature-list li { color: #BCBCC2; }
.pricing-check {
  flex: 0 0 auto;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 13px;
  width: 18px;
  text-align: center;
  color: #B8FF3C;
  margin-top: 1px;
}
.pricing-check-muted { color: #5A5A60; font-weight: 500; }

/* Highlight state for /pricing?feature=<key>. Mobile Paywall draws a
   lime ring + lime-tinted fill around the row whose feature key
   matches the gate that bounced the user; mirror that on web. The
   row stretches a few px into the card padding via negative margin
   so the ring frames it cleanly without nudging surrounding text. */
.pricing-feature-list li.is-highlighted {
  position: relative;
  margin: 0 -10px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(184, 255, 60, 0.08);
  border: 1px solid rgba(184, 255, 60, 0.55);
  color: var(--accent, #B8FF3C);
  /* Soft pulse on first paint so the eye lands on this row before the
     visitor reads the rest of the list. Plays once and settles. */
  animation: pricing-feature-hit 1200ms cubic-bezier(0.16, 1, 0.3, 1) 1;
}
.pricing-feature-list li.is-highlighted .pricing-check { color: var(--accent, #B8FF3C); }
.pricing-feature-list li.is-highlighted .pricing-feature-text { font-weight: 600; }

@keyframes pricing-feature-hit {
  0%   { box-shadow: 0 0 0 0 rgba(184, 255, 60, 0.40); }
  60%  { box-shadow: 0 0 0 12px rgba(184, 255, 60, 0.00); }
  100% { box-shadow: 0 0 0 0 rgba(184, 255, 60, 0.00); }
}
@media (prefers-reduced-motion: reduce) {
  .pricing-feature-list li.is-highlighted { animation: none; }
}

/* CTA */
.pricing-cta {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
  padding: 14px 22px;
  border-radius: 12px;
  border: 1px solid rgba(184, 255, 60, 0.45);
  background: rgba(184, 255, 60, 0.10);
  color: #B8FF3C;
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.4px;
  cursor: pointer;
  text-decoration: none;
  transition: background 120ms, border-color 120ms, opacity 120ms;
  margin-top: auto;
}
.pricing-cta:hover {
  background: rgba(184, 255, 60, 0.20);
  border-color: rgba(184, 255, 60, 0.65);
}
.pricing-cta-secondary {
  background: transparent;
  border-color: #1F1F25;
  color: #ECECEE;
}
.pricing-cta-secondary:hover {
  background: #18181D;
  border-color: #30303A;
}
.pricing-cta-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.pricing-fineprint {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.4px;
  color: #6E6E76;
  text-align: center;
  margin: 10px 0 0;
}
.pricing-status-paid {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 1.6px;
  color: #B8FF3C;
  text-align: center;
  margin-bottom: 12px;
}

/* Trust strip */
.pricing-trust {
  margin-top: 32px;
  text-align: center;
}
.pricing-trust-row {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 1.6px;
  color: #8B8B92;
}
.pricing-trust-cell { white-space: nowrap; }
.pricing-trust-sep { color: #3A3A42; }

/* ── /billing/success and /billing/cancel ────────────────────── */

.billing-landing {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 24px;
}
.billing-landing-card {
  width: 100%;
  max-width: 480px;
  text-align: center;
  background: #111114;
  border: 1px solid #1F1F25;
  border-radius: 12px;
  padding: 36px 28px;
}
.billing-landing-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: rgba(184, 255, 60, 0.10);
  border: 1px solid rgba(184, 255, 60, 0.45);
  color: #B8FF3C;
  font-family: 'JetBrains Mono', monospace;
  font-size: 26px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.billing-landing-icon-muted {
  background: transparent;
  border-color: #1F1F25;
  color: #6E6E76;
}
.billing-landing-headline {
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 700;
  font-size: 26px;
  margin: 0 0 8px;
  color: #ECECEE;
}
.billing-landing-sub {
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #BCBCC2;
  margin: 0 0 24px;
}
.billing-landing-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* The account-page Subscription section styles previously lived
 * here, but that file isn't loaded on /account (only /pricing +
 * /billing/{success,cancel}), so the Upgrade pill rendered as a
 * default link. They moved into auth.css which IS loaded on
 * every page via base.html. */
